/* ============================================================
   GenCast -- Warm Radio design system (spec/reskin-warm-radio.md §4)
   One place for tokens, fonts and the shared components (B-282).
   Screen-specific rules live in index.html's <style> and use only
   these tokens.
   ============================================================ */

/* ---- Fonts, self-hosted (RS-FR-05 to RS-FR-07; OFL 1.1, fonts/OFL.txt).
   unicode-range values copied verbatim from the artifact's template.html. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/dm-sans-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/dm-sans-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-600-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-600-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-600-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Tokens (§4.1 to §4.3). Light only; there is no dark theme. ---- */
:root {
  --paper: #FBF3E4;
  --card: #FFFCF6;
  --line: #E9DCC6;
  --ink: #2B211A;
  --muted: #6B5646;
  --subtle: #8C7A6B;
  --teal: #1D6B66;
  --orange: #B4461E;
  --orange-hover: #9A3A18;
  --mustard: #F2C14E;
  --peach: #F6D5BE;
  --error: #A3321C;
  --success: #2F6B34;
  --on-accent: #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 40px;
  --space-10: 56px;

  --radius-pill: 999px;
  --radius-card: 16px;
  --radius-inner: 14px;
  --radius-field: 12px;

  --shadow-card: 0 2px 0 var(--line);
  --shadow-selected: 0 2px 0 var(--teal);

  --rail-width: 256px;
  --tabbar-height: 72px;

  color-scheme: light;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--teal); }
button { font-family: inherit; cursor: pointer; color: inherit; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

/* RS-FR-04 / RS-NFR-03: one focus ring for every focusable element. */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Inline SVG icons from the gc-* sprite. */
.gc-icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}
.gc-icon-sm { width: 16px; height: 16px; }
.gc-icon-lg { width: 22px; height: 22px; }

/* ---- Page container (§4.3) ---- */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 40px 96px;
}

/* ---- Wordmark (dial + GenCast) ---- */
.gc-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--orange);
  text-decoration: none;
}
.gc-wordmark:hover { color: var(--orange); }
.gc-wordmark .gc-dial { width: 38px; height: 30px; flex: none; }

/* ---- Front-page header ---- */
nav.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  font-size: 16px;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover { color: var(--teal); text-decoration: underline; }

/* ---- Hero / display type ---- */
header.hero { padding: 56px 0 40px; }
.kicker {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 16px;
}
h1.headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 5.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 15ch;
  text-wrap: balance;
}
.sub {
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 32px;
}

/* ---- Sections ---- */
section { padding: 56px 0; }
.section-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.gc-divider {
  display: block;
  width: 100%;
  height: 24px;
}

/* ---- Cards ---- */
.gc-card, .grid-2 > .cell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.grid-2 > .cell { padding: 28px; }

/* ---- Forms (§4.6 Field) ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.field label .req { color: var(--muted); font-weight: 500; }
.field input,
.field textarea,
.field select {
  min-height: 48px;
  background: var(--card);
  border: 1px solid var(--subtle);
  border-radius: var(--radius-field);
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  width: 100%;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--teal);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border: 2px solid var(--error);
  padding: 11px 13px;
}
.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: var(--paper);
  color: var(--muted);
  cursor: not-allowed;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%236B5646' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
/* §4.1 fix 1: placeholders in --muted, never the artifact's #8C7A6B. */
::placeholder { color: var(--muted); opacity: 1; }

/* ---- Buttons (§4.6) ---- */
/* Primary: orange pill, white 700 text, trailing gc-arrow. */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 24px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--orange);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.submit-btn:hover { background: var(--orange-hover); color: var(--on-accent); }
.submit-btn .gc-icon { width: 20px; height: 20px; }
/* Disabled (K8): --line fill and --muted text; disabled/aria-disabled stay. */
.submit-btn:disabled,
.submit-btn[aria-disabled="true"] {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}
/* Secondary: transparent pill, 2 px teal border, teal text. */
.submit-btn.ghost {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}
.submit-btn.ghost:hover { background: var(--card); color: var(--teal); }
.submit-btn.ghost:disabled,
.submit-btn.ghost[aria-disabled="true"] {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
/* Destructive: error fill (confirm actions). */
.submit-btn.destructive {
  background: var(--error);
  color: var(--on-accent);
  border: 0;
}
.submit-btn.destructive:hover { background: var(--error); color: var(--on-accent); text-decoration: underline; }
.submit-btn.destructive:disabled { background: var(--line); color: var(--muted); }
/* Destructive secondary: 2 px error outline ("Delete account"). */
.submit-btn.destructive-outline {
  background: transparent;
  color: var(--error);
  border: 2px solid var(--error);
}
.submit-btn.destructive-outline:hover { background: var(--card); color: var(--error); }
/* Quiet: text only, ink, underline on hover. */
.quiet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}
.quiet-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
/* Text link button inside a sentence. */
.link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px; /* RS-NFR-02: a short word ("Back") is still a 44 px target */
  justify-content: center;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  color: var(--orange);
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 2px;
  vertical-align: baseline;
}
.link-btn:hover { color: var(--teal); }
/* Disclosure: teal text button with a rotating chevron. */
.disclosure-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--teal);
  font-size: 16px;
  font-weight: 700;
}
.disclosure-btn .gc-chev { width: 18px; height: 18px; transition: transform .2s ease-out; }
.disclosure-btn[aria-expanded="true"] .gc-chev { transform: rotate(180deg); }

/* ---- Messages (§4.6) ---- */
/* Form message: 12 px radius, card fill, 1 px border, icon. */
.form-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: var(--radius-field);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
}
.form-message.error { border-color: var(--error); color: var(--error); }
.form-message.success { border-color: var(--success); color: var(--success); }
/* Inline field error: 15 px 500 in --error under the field. */
.field-error {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--error);
}
/* Banner (a screen-level notice). */
.gc-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  border: 1px solid var(--error);
  background: var(--card);
}
.gc-banner-icon { width: 22px; height: 22px; flex: none; color: var(--error); margin-top: 2px; }
.gc-banner-body { flex: 1 1 240px; min-width: 0; }
.gc-banner-title { margin: 0 0 4px; font-weight: 700; color: var(--ink); }
.gc-banner-text { margin: 0; color: var(--muted); }
.gc-banner-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gc-banner-actions .submit-btn { margin-top: 0; }

/* ---- Badges (§4.6): pill 26 px, 13 px 700 ---- */
.gc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--ink);
  background: var(--peach);
  border: 1px solid transparent;
}
.gc-badge[data-badge-kind="peach"] { background: var(--peach); color: var(--ink); }
.gc-badge[data-badge-kind="mustard"] { background: var(--mustard); color: var(--ink); }
.gc-badge[data-badge-kind="teal"] { background: var(--card); border-color: var(--teal); color: var(--teal); }
.gc-badge[data-badge-kind="error"] { background: var(--card); border-color: var(--error); color: var(--error); }
.gc-badge[data-badge-kind="muted"] { background: var(--card); border-color: var(--subtle); color: var(--muted); }
/* RS-FR-09: the `made with AI` tag. */
.gc-ai-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--peach);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---- Chips (idea chips alternate mustard / peach) ---- */
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--mustard);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}
.chip:nth-child(even) { background: var(--peach); }
.chip:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---- Footer ---- */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 0 0;
  font-size: 14px;
  color: var(--muted);
}
footer a { color: var(--ink); text-decoration: none; }
footer a:hover { color: var(--teal); text-decoration: underline; }

/* ---- Motion (§4.4): one pulse; reduced motion turns everything off. ---- */
@keyframes gc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.gc-pulse { animation: gc-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   App shell (RS-FR-13, §5.5): desktop rail from 1024 px up, the
   phone shell (top bar + bottom tab bar) below it (v1.1, D-228).
   The rail and tab bar are attached/detached by script; these
   rules only style them.
   ============================================================ */
body.app-shell-active { padding-left: var(--rail-width); }
body.app-shell-active .wrap {
  max-width: none;
  margin: 0;
  padding: 40px 48px 96px;
}
body.app-shell-active nav.top { display: none; }
body.app-shell-active header.hero { padding: 0; }

.app-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 16px 20px;
  background: var(--card);
  border-right: 1px solid var(--line);
  z-index: 20;
  overflow-y: auto;
}
.app-rail-wordmark { font-size: 24px; padding: 0 6px; }
.app-rail-wordmark .gc-dial { width: 34px; height: 27px; }
.app-rail-nav-item.app-rail-new-episode {
  width: 100%;
  margin: 0;
  min-height: 52px;
  font-size: 17px;
}
.app-rail-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.app-rail-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}
.app-rail-nav-link .gc-icon { color: var(--teal); }
.app-rail-nav-link:hover { background: var(--paper); }
.app-rail-nav-link[aria-current="page"] {
  background: var(--peach);
  font-weight: 700;
}

.app-rail-balance-card {
  margin-top: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.app-rail-balance-caption {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.app-rail-balance-amount {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
}
.app-rail-balance-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--line);
  overflow: hidden;
}
.app-rail-balance-bar-fill {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}
.app-rail-balance-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}
.app-rail-topup-button.submit-btn { width: 100%; margin-top: 4px; min-height: 44px; font-size: 15px; }

.app-rail-account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-rail-account-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mustard);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.app-rail-account-email {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-rail-account-chip .quiet-btn { font-size: 14px; flex: none; }

/* Phone shell: top bar (in the content flow), bottom tab bar, mini player. */
.mobile-top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 20px;
}
.mobile-top-bar-show { min-width: 0; flex: 1 1 auto; }
.mobile-top-bar-eyebrow {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.mobile-top-bar-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-topbar-credits-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--teal);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.mobile-topbar-credits-link:hover { text-decoration: underline; text-underline-offset: 2px; }

.mobile-tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.mobile-tab-bar-item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 2px;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}
.mobile-tab-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 30px;
  border-radius: var(--radius-pill);
  color: var(--teal);
}
.mobile-tab-bar-item[aria-current="page"] { font-weight: 700; }
.mobile-tab-bar-item[aria-current="page"] .mobile-tab-bar-icon { background: var(--peach); }

.mobile-mini-player {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--tabbar-height) + 8px);
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.mobile-mini-player-toggle {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  border: 0;
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-mini-player-body { flex: 1 1 auto; min-width: 0; }
.mobile-mini-player-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-mini-player-progress {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--line);
  overflow: hidden;
}
.mobile-mini-player-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--orange);
}
.mobile-mini-player-elapsed {
  flex: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* The shell breakpoint (§5.18, D-228): the phone shell below 1024 px. */
@media (max-width: 1023.98px) {
  body.app-shell-active { padding-left: 0; padding-bottom: calc(var(--tabbar-height) + 16px); }
  body.app-shell-active .wrap { padding: 20px 20px 96px; }
}

/* Front page and auth reflow at phone sizes (§5.18: <= 700 px). */
@media (max-width: 700px) {
  .wrap { padding: 16px 16px 72px; }
  body.app-shell-active .wrap { padding: 16px 16px 96px; }
  header.hero { padding: 32px 0 24px; }
  h1.headline { font-size: 38px; }
  .sub { font-size: 18px; }
  .section-label { font-size: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 12px; }
}
