/* ==========================================================================
   Reset + base typography and layout utilities.
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-app);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

body.no-chrome {
  padding-bottom: 0;
}

h1, h2, h3, h4, h5, h6, p, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

a {
  color: var(--accent-blue-ink);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

img, svg, video { max-width: 100%; display: block; }

/* Focus visibility — keyboard only */
:focus-visible {
  outline: 2px solid var(--accent-blue-ink);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Layout */
.app-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 12px 12px calc(var(--nav-height) + 24px);
}

.app-main--full {
  max-width: none;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Utility */
.muted  { color: var(--text-muted); }
.small  { font-size: 12px; }
.center { text-align: center; }

.section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 12px 2px 8px;
  color: var(--text);
}
.section-title.red { color: var(--accent-red-ink); }

@media (min-width: 1200px) {
  .app-main {
    max-width: 1120px;
  }
}
