/* ===========================================================================
   Grammar Glitch: The Grammar-Verse — base theme & design tokens
   Single stylesheet. Mobile-first. DARK is the default theme, always —
   deliberately independent of the visitor's OS/browser `prefers-color-scheme`
   (per user, 2026-08-24: "make the dark theme the default one no matter what
   the browser settings are"). A manual light/dark toggle in the navbar
   (`.theme-toggle`, both NavBar and LpNav — see app.js) is the only thing
   that changes it; the choice is persisted in localStorage (`gg_theme`) and
   applied inline in index.php's <head> before first paint, so there's no
   flash of the other theme on a return visit.
   =========================================================================== */

/* ---- Design tokens ---------------------------------------------------------
   Two blocks:
     1. Bare :root — DARK values. Always applies, unconditionally — this IS
        the default, regardless of the OS/browser setting.
     2. :root[data-theme="light"] — LIGHT values, applied only once the
        reader manually picks light via the navbar toggle.
   There is no [data-theme="dark"] override block: a manual "dark" choice
   just means "no override" (data-theme is cleared, not set to "dark") and
   the bare :root above already provides dark — see app.js `applyTheme()`.
   Every rule in this stylesheet reads color through these custom properties
   — never a hard-coded hex — so a theme change only ever means editing this
   block, not any of the ~1000 rules below it (verified by audit, 2026-08-24
   Phase 6c Stage 2, re-confirmed when the toggle was added). */
:root {
  color-scheme: dark;

  /* Base / surfaces */
  --bg:            #0a0d1a;
  --bg-2:          #11142a;
  --surface:       #141833;
  --surface-2:     #1b2044;
  --border:        rgba(231, 230, 245, 0.14);
  --text:          #e7e6f5;
  --text-muted:    #9793b8;

  /* Canon character accents (from the book bible) — brightened neon set. */
  --zee:      #1ec464;  --zee-2:    #00c79a;   /* Present — green   */
  --trix:     #ff2ea6;  --trix-2:   #a742ff;   /* Present Perfect — magenta */

  /* "GLITCH" brand wordmark (nav brand, hero logo) — fixed vivid pink in
     BOTH themes, deliberately not the same token as --trix (2026-08-27, per
     user). --trix is deepened to #c2185b under the light override below to
     stay AA-legible as real text/chip color (Trix's own tense-accent, used
     for body-scale content on white); the wordmark is large decorative
     display type where that contrast constraint doesn't apply, and the user
     wants it to read as the same punchy pink as the dark theme rather than
     inherit the muted deepened value. Not redefined in the light block below
     — same element, so the light override simply never touches it and this
     value carries through unchanged. */
  --lp-glitch-brand: #ff2ea6;
  --cass:     #ffab1f;  --cass-2:   #ff5d3d;   /* Past — amber      */
  --nova:     #1ab2ff;  --nova-2:   #7c5cff;   /* Future — blue     */
  --quantum:  #c98bff;                          /* glitch llama — rainbow-ish */

  /* Professor Gram O'Clock — brighter cyan/violet for the dark surface. */
  --prof-a: #22d3ee; --prof-b: #a78bfa;

  /* Dex (The Helper) — warm copper/amber, brighter for the dark surface.
     Added 2026-09-06. Kept distinct from Cass's amber (#ffab1f/#ff5d3d,
     more orange-red) by leaning cooler/more metallic-copper. */
  --dex: #e0975a;

  /* Functional accents */
  --accent:     var(--nova);
  --accent-2:   var(--trix);
  /* Fills that carry WHITE text (selected answers, primary buttons, active
     tabs) — 2026-09-22. The neon --nova/--trix are too bright for white
     text (1ab2ff = 2.4:1); these deeper stops keep the same blue→magenta
     look at ≥5:1. Light theme already uses deep accents, so it maps back. */
  --fill-a:     #0874b5;
  --fill-b:     #c8157f;
  /* Text on a bright CHARACTER-colour fill (zone-cleared Continue button). */
  --on-char:    #0f1222;
  --success:    #1ec464;
  --danger:     #ff4d6d;
  --warning:    #ffab1f;

  /* Decorative tokens for spots that used to be hard-coded literals (nav
     glass blur, hero grid/vignette, low-alpha card/input tints) — see the
     matching selectors further down. */
  --nav-glass:    rgba(10, 13, 26, 0.85);
  --nav-glass-0:  rgba(10, 13, 26, 0);
  --grid-line:    rgba(231, 230, 245, 0.06);
  --hero-scrim-a: rgba(6, 9, 20, 0.78);
  --hero-scrim-b: rgba(6, 9, 20, 0.45);
  --hero-scrim-c: rgba(6, 9, 20, 0);
  --panel-tint:   rgba(255, 255, 255, 0.03);
  --input-tint:   rgba(255, 255, 255, 0.04);

  /* Type scale (mobile-first, fluid) — theme-independent, declared once. */
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --fs-xs:   0.78rem;
  --fs-sm:   0.9rem;
  --fs-base: 1rem;
  --fs-lg:   1.2rem;
  --fs-xl:   1.6rem;
  --fs-2xl:  clamp(1.8rem, 5vw, 2.8rem);

  /* Spacing / radius — theme-independent, declared once. */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem;
  --sp-4: 1rem;    --sp-5: 1.5rem; --sp-6: 2rem; --sp-8: 3rem;
  --radius:    14px;
  --radius-sm: 9px;

  /* Shadows */
  --shadow:    0 20px 50px rgba(0, 0, 0, 0.55);
  --glow:      0 0 0 1px var(--border), 0 0 18px rgba(124, 88, 255, 0.25);
  --lp-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
}

/* Manual light override — set only by the navbar ThemeToggle (app.js), which
   writes data-theme="light" + localStorage `gg_theme`="light". Nothing else
   on the page ever sets this attribute, so it only ever reflects an explicit
   reader choice, never the OS setting. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg:            #f6f7fb;
  --bg-2:          #eceff8;
  --surface:       #ffffff;
  --surface-2:     #eef0f9;
  --border:        rgba(20, 22, 40, 0.12);
  --text:          #171a2b;
  --text-muted:    #5b5f78;

  /* Deepened from the dark theme's brighter neon set so they hold AA-ish
     contrast used as text/chip colors on light/white surfaces. */
  --zee:      #0e9f5a;  --zee-2:    #00897b;
  --trix:     #c2185b;  --trix-2:   #6d28d9;
  --cass:     #b45309;  --cass-2:   #c2410c;
  --nova:     #0369a1;  --nova-2:   #4338ca;
  --quantum:  #7c3aed;

  /* Canon card palette (Shared/CANON.md) for the light surface. */
  --prof-a: #0891b2; --prof-b: #7c3aed;

  /* Dex (The Helper) — deepened copper for AA-ish contrast on white. */
  --dex: #b5651d;

  --accent:     var(--nova);
  --accent-2:   var(--trix);
  --fill-a:     var(--nova);
  --fill-b:     var(--trix);
  --on-char:    #ffffff;
  --success:    #0e9f5a;
  --danger:     #dc2626;
  --warning:    #b45309;

  --nav-glass:    rgba(255, 255, 255, 0.85);
  --nav-glass-0:  rgba(255, 255, 255, 0);
  --grid-line:    rgba(20, 22, 40, 0.05);
  --hero-scrim-a: rgba(246, 247, 251, 0.85);
  --hero-scrim-b: rgba(246, 247, 251, 0.5);
  --hero-scrim-c: rgba(246, 247, 251, 0);
  --panel-tint:   rgba(10, 13, 26, 0.035);
  --input-tint:   rgba(10, 13, 26, 0.05);

  --shadow:    0 20px 50px rgba(20, 22, 40, 0.12);
  --glow:      0 0 0 1px var(--border), 0 0 18px rgba(124, 88, 255, 0.18);
  --lp-shadow: 0 30px 70px -20px rgba(20, 22, 40, 0.18);
}

/* ---- Reset-ish ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x:hidden lives here, not on .gg-landing or any other wrapper
   further down the tree (2026-08-26) — any ancestor with overflow other
   than visible breaks position:sticky for descendants (it becomes the
   sticky element's containing/scroll context instead of the viewport),
   which is exactly why header.lp-site wasn't sticking on the landing page.
   <html> is special-cased by the spec (its overflow controls the viewport's
   own scroll behavior rather than creating a separate scroll container), so
   it clips the same horizontal bleed from .lp-orb/decorative elements
   without that side effect. */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124,58,237,0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(10,147,214,0.16), transparent 55%),
    var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--sp-3); }
h1 { font-size: var(--fs-2xl); }
p  { margin: 0 0 var(--sp-3); }
a  { color: var(--nova); }
.muted { color: var(--text-muted); }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-5);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--nova); outline-offset: 2px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--fill-a), var(--fill-b));
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(124, 58, 237, 0.5); }
.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); }

/* ---- Glitch frame (shared neon panel) ------------------------------------ */
.glitch-frame {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.glitch-frame::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(120deg, var(--zee), var(--nova), var(--trix), var(--cass));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.7;
  pointer-events: none;
}

/* =====================  AUTH GATE  ======================================== */
.auth-body { display: grid; place-items: center; padding: var(--sp-5); }
.auth-shell { width: 100%; max-width: 460px; }
.auth-card { padding: var(--sp-6); }
.auth-kicker {
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: var(--fs-xs); color: var(--text-muted); margin: 0 0 var(--sp-2);
}
.auth-title { font-size: var(--fs-xl); margin-bottom: var(--sp-1); }
.auth-logo { width: min(300px, 82%); height: auto; margin: 0 auto var(--sp-3); display: block; }
.auth-tagline { color: var(--text-muted); margin-bottom: var(--sp-5); text-align: center; }

.auth-tabs { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.auth-tab {
  flex: 1; font: inherit; font-weight: 600; cursor: pointer;
  padding: var(--sp-2) var(--sp-3);
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.auth-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--fill-a), var(--fill-b));
  border-color: transparent;
}

.auth-form { display: grid; gap: var(--sp-4); }
.auth-form.is-hidden, .is-hidden { display: none; }
.auth-form label,
label {
  display: grid; gap: var(--sp-2);
  font-size: var(--fs-sm); color: var(--text-muted);
}
.auth-form input, .auth-form select,
input[type="text"], input[type="email"], input[type="password"], select,
textarea.fix-input {
  font: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-3);
}
input:focus, select:focus, textarea.fix-input:focus { outline: 2px solid var(--nova); outline-offset: 1px; }

/* Chrome/Safari/Edge paint an autofilled field with their own forced text
   color + background (via -webkit-text-fill-color / an inset box-shadow),
   ignoring the `color`/`background` set above — found 2026-08-24 on the
   Account page's Username/Email fields, both realistic autofill targets.
   The near-1000px inset shadow is the standard trick to override the
   autofill background without a jarring flash; the long transition delay
   stops Chrome's own color-flash animation from briefly showing through. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset;
  box-shadow: 0 0 0 1000px var(--bg-2) inset;
  caret-color: var(--text);
  transition: background-color 5000s ease-in-out 0s;
}

.auth-error {
  background: rgba(255, 77, 109, 0.10);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: var(--sp-3);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-sm);
}

/* =====================  APP SHELL  ======================================== */
/* Static first-paint splash for #home — index.php now renders this using the
   SAME .gg-landing/.lp-* markup+classes as LpNav/LpHero in app.js (not a
   separate hand-maintained design), so it can't drift stale the way the old
   dedicated .boot-* splash rules did. See index.php's boot markup + ROADMAP.md §9. */
.app-loading { min-height: 100vh; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 800; letter-spacing: 0.02em; }
.topbar-right { display: flex; align-items: center; gap: var(--sp-3); }
.user-chip {
  font-size: var(--fs-sm); color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: var(--sp-1) var(--sp-3); border-radius: 999px;
}

.container { max-width: 960px; margin: 0 auto; padding: var(--sp-6) var(--sp-4); }
.panel { padding: var(--sp-6); }

.char-row {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  margin-top: var(--sp-5);
}
.avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: var(--glow);
}

/* ---- Responsive ---------------------------------------------------------- */
@media (min-width: 720px) {
  .avatar { width: 110px; height: 110px; }
}

/* ---- Accessibility / motion --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
:focus-visible { outline: 3px solid var(--nova); outline-offset: 2px; }

/* Skip-to-content link: visually hidden until focused (keyboard users). */
.skip-link {
  position: absolute; left: var(--sp-3); top: -64px;
  z-index: 100;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-4); font-weight: 600; text-decoration: none;
  box-shadow: var(--shadow);
  transition: top .15s ease;
}
.skip-link:focus { top: var(--sp-3); outline: 3px solid var(--nova); outline-offset: 2px; }
main:focus { outline: none; } /* programmatic focus target — no focus ring on the region */

/* =====================  PUBLIC SITE  ====================================== */
.site { min-height: 100vh; display: flex; flex-direction: column; }
.site main { flex: 1; }
.btn-sm { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); }
.grad {
  background: linear-gradient(110deg, var(--zee), var(--nova), var(--trix));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.narrow { max-width: 520px; }
.section-lede { max-width: 60ch; margin-top: calc(-1 * var(--sp-2)); margin-bottom: var(--sp-5); }

/* ---- Nav ----------------------------------------------------------------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-5);
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-glass);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { font-weight: 800; text-decoration: none; color: var(--text); letter-spacing: .02em; display: inline-flex; align-items: center; }
.nav-logo { height: 42px; width: auto; display: block; }
/* Text brand mark — used by the plain app Footer() below. The header itself
   used to have its own near-identical .nav-brand/.brand-mark version (the
   old NavBar) but that was merged into the single shared header's .lp-brand
   on 2026-08-26 — see header.lp-site below. .nav/.nav-brand/.nav-logo/
   .nav-toggle/.nav-links (above/below) are dead CSS from that same NavBar,
   left in place rather than risk deleting something still referenced. */
.brand-mark {
  text-decoration: none; font-family: 'Lato', sans-serif; font-weight: 900; letter-spacing: .02em;
  font-size: 1.05rem; display: inline-flex; gap: .5em; align-items: baseline;
  background: none; border: none; padding: 0; margin: 0; cursor: pointer; color: var(--text);
}
.brand-mark .brand-mark-g2 { color: var(--lp-glitch-brand); }
.nav-toggle {
  display: none; font-size: 1.4rem; background: none; border: 0; color: var(--text); cursor: pointer;
}
.nav-links { display: flex; align-items: center; gap: var(--sp-4); }
.nav-links a { color: var(--text-muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { text-decoration: none; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
.nav-links a.btn-ghost { color: var(--text); }

/* ---- Theme toggle (light/dark) --------------------------------------------
   A segmented Dark/Light switch, reused in both NavBar (.nav-links, above)
   and LpNav (the .gg-landing header, below) — reads the same base tokens
   everywhere so no context-specific variant is needed. Both states are
   always visible (not one icon that only implies the other exists). See
   app.js `ThemeToggle`. */
.theme-toggle {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  gap: 2px; padding: 3px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2);
}
.theme-seg {
  display: inline-flex; align-items: center; gap: 5px;
  border: none; background: transparent; color: var(--text-muted);
  font-size: .8rem; font-weight: 500; line-height: 1; white-space: nowrap;
  cursor: pointer; padding: 6px 12px; border-radius: 999px;
  transition: background-color .2s, color .2s, transform .15s;
}
.theme-seg:hover { color: var(--text); }
/* Same "selected" treatment as .opt.is-selected / .dlg-choice.is-selected
   elsewhere in the app — a solid accent gradient reads as active far more
   clearly than a same-family surface tint did. */
.theme-seg.is-active {
  background: linear-gradient(135deg, var(--fill-a), var(--fill-b));
  color: #fff; font-weight: 700;
}
.theme-seg:active { transform: scale(.94); }

/* Offset in-page anchor scrolls so the sticky nav doesn't cover the heading. */
#how { scroll-margin-top: 96px; }

/* ---- Shared bits reused across the app ----------------------------------- */
.micro { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--sp-3); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.btn-lg { padding: var(--sp-4) var(--sp-6); font-size: var(--fs-lg); border-radius: var(--radius); }
.btn-glass {
  color: #fff; background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.30); backdrop-filter: blur(6px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.18); }

/* ---- Cinematic hero (dark "grammar-verse" stage) --------------------------- */
.hero-stage {
  position: relative; overflow: hidden; isolation: isolate;
  text-align: center; color: #eef1ff;
  /* Fill the viewport below the sticky nav and centre the content so the
     whole intro (logo → crew) is visible in one screen. */
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(2rem, 5vw, 3.5rem) var(--sp-5) clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(1100px 520px at 50% -10%, #20254a 0%, transparent 60%),
    linear-gradient(180deg, #0e1022 0%, #141733 60%, #11132a 100%);
}
.hero-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.fx-orb {
  position: absolute; width: 42vw; max-width: 560px; aspect-ratio: 1;
  border-radius: 50%; filter: blur(70px); opacity: 0.55;
  animation: drift 16s ease-in-out infinite;
}
.fx-a { top: -14%; left: -6%;  background: radial-gradient(circle, var(--zee), transparent 65%); }
.fx-b { top: -20%; right: -8%; background: radial-gradient(circle, var(--trix), transparent 65%); animation-delay: -5s; }
.fx-c { bottom: -28%; left: 32%; background: radial-gradient(circle, var(--nova), transparent 65%); animation-delay: -9s; }
.fx-scan {
  position: absolute; inset: 0; opacity: 0.06; mix-blend-mode: screen;
  background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 4px);
  animation: scan 8s linear infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(2.5%, 4%) scale(1.08); }
}
@keyframes scan { from { background-position: 0 0; } to { background-position: 0 200px; } }

.hero-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; transform: translateY(-4%); }
.hero-logo {
  width: min(560px, 86vw); height: auto; margin: 0 auto clamp(1.5rem, 4vw, 2.75rem);
  filter: drop-shadow(0 8px 30px rgba(124, 58, 237, 0.45));
}
.hero-kicker {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: var(--fs-sm);
  color: #aab2e0; margin: 0 0 clamp(1rem, 2.5vw, 1.5rem);
}
.hero-lede { font-size: var(--fs-lg); color: #c7cdf0; max-width: 56ch; margin: 0 auto clamp(1.75rem, 4vw, 2.75rem); }
.hero-cta { justify-content: center; }
.hero-micro { font-size: var(--fs-sm); color: #9aa2cf; margin-top: clamp(1rem, 2.5vw, 1.5rem); }
.hero-crew { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--sp-4); margin-top: clamp(1rem, 2.5vw, 1.75rem); }
.crew-orb {
  width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--orb, #fff);
  box-shadow: 0 0 22px color-mix(in srgb, var(--orb, #fff) 60%, transparent);
  animation: float 5s ease-in-out infinite;
}
.crew-orb:nth-child(2) { animation-delay: -1s; }
.crew-orb:nth-child(3) { animation-delay: -2s; }
.crew-orb:nth-child(4) { animation-delay: -3s; }
.crew-orb:nth-child(5) { animation-delay: -4s; }
.crew-orb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (min-width: 720px) { .crew-orb { width: 92px; height: 92px; } }

/* ---- Sections / cards ---------------------------------------------------- */
.section { padding: var(--sp-6) 0; }
.section > h2 { font-size: var(--fs-xl); }
.grid-3 { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.card { padding: var(--sp-5); }
.step-n {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; font-weight: 800; margin-bottom: var(--sp-3);
  background: linear-gradient(135deg, var(--fill-a), var(--fill-b)); color: #fff;
}

/* Locks background scroll while ANY Modal is open (toggled in app.js's
   Modal component) — same fix as the nav drawer's body.lp-nav-open, see
   that rule's comment. Without it, content taller than the screen (e.g. a
   character bio on a short phone viewport) combined with a still-scrollable
   page behind the modal let Chrome/Android's toolbar collapse/expand
   mid-touch and visibly move the fixed-position modal (OnePlus 11,
   2026-08-27). */
body.gg-modal-open{ overflow:hidden; }

/* ---- Generic modal dialog (Modal component in app.js) --------------------- */
.gg-modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  background: rgba(4, 6, 14, .66);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.gg-modal {
  position: relative;
  width: 100%; max-width: 440px;
  padding: var(--sp-5);
  /* Capped so content taller than the viewport (e.g. a long character bio
     on a short phone) can't run off the screen with nothing to bring it
     back into view — the exact gap flagged as an accepted tradeoff when the
     modal's old max-height/overflow-y was dropped 2026-08-26, now hit for
     real on a OnePlus 11 (2026-08-27): the card kept growing past the
     viewport and text visibly spilled out past its own rounded/gradient
     border onto the page behind it. display:flex + the .gg-modal-scroll
     child below do the actual scrolling — NOT overflow on .gg-modal itself,
     deliberately: this element also owns .glitch-frame::before (the
     gradient-ring border, position:absolute;inset:-1px, so it extends
     slightly OUTSIDE this box's padding edge) — giving *this* element
     overflow:hidden/auto would clip that ring's outer sliver along with
     everything else. Scrolling one layer in avoids that entirely. */
  display: flex; flex-direction: column;
  max-height: calc(100vh - 2 * var(--sp-4));
  animation: gg-modal-in .15s ease-out;
}
@supports (height: 100dvh) {
  .gg-modal{ max-height: calc(100dvh - 2 * var(--sp-4)); }
}
/* The actual scroll container — wraps props.children only (the close button
   is a sibling, so it stays pinned top-right instead of scrolling away with
   long content, which position:absolute alone never guaranteed before).
   min-height:0 is load-bearing: without it a flex child never shrinks below
   its content's natural height, so it would just push .gg-modal past
   max-height instead of actually becoming scrollable. Both axes set
   explicitly, same reasoning as any overflow rule in this file now —
   leaving overflow-x on its default `visible` is what caused a stray
   horizontal scrollbar here on 2026-08-26 last time this had a scrollbar. */
.gg-modal-scroll{ min-height: 0; overflow-y: auto; overflow-x: hidden; }
.gg-modal h2 { margin: 0 0 var(--sp-2); }
.gg-modal .cta-row { margin-top: var(--sp-4); }
.cta-row--center { justify-content: center; }
.gg-modal-close {
  position: absolute; top: var(--sp-3); right: var(--sp-3);
  width: 32px; height: 32px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-muted); cursor: pointer; font-size: var(--fs-sm);
}
.gg-modal-close:hover { background: var(--surface-2); color: var(--text); }
.gg-modal-close:focus-visible { outline: 3px solid var(--nova); outline-offset: 2px; }
@keyframes gg-modal-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gg-modal { animation: none; } }

/* ---- Wide modal variant (CharacterModal — squad card "More about...")
   ---------------------------------------------------------------------- */
.gg-modal-wide { max-width: 620px; padding: 0; }
.char-modal-hero {
  display: flex; justify-content: center; padding: 34px 0 6px;
  background: radial-gradient(360px 200px at 50% -10%, color-mix(in srgb, var(--card-accent) 26%, transparent), transparent 72%);
}
.char-modal-avatar { width: 132px; height: 132px; border-width: 3px; }
.char-modal-body { padding: 8px 30px 30px; text-align: center; }
.char-modal-kicker {
  font-family: 'Space Mono', monospace; font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; margin: 0 0 4px;
}
.char-modal-name { margin: 0 0 4px; }
.char-modal-tense { margin-bottom: var(--sp-5); }
.char-modal-body .grid-2 {
  text-align: left; margin-bottom: var(--sp-4);
  padding-top: var(--sp-5); border-top: 1px solid var(--border);
}
.char-modal-body h4 {
  font-family: 'Space Mono', monospace; font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 6px;
}
.char-modal-body .grid-2 p { margin: 0; }
.char-modal-voice { text-align: left; }

/* ---- Promo blocks (book / join) ----------------------------------------- */
.promo {
  display: grid; gap: var(--sp-5); align-items: center; padding: var(--sp-6);
  grid-template-columns: 1fr;
}
.promo-art { font-size: 4rem; text-align: center; }
.promo-join::before { background: linear-gradient(120deg, var(--nova), var(--trix), var(--quantum)); }

/* ---- Auth view ----------------------------------------------------------- */
.auth-view { padding: var(--sp-6); }
.auth-view .auth-form { margin-top: var(--sp-4); }

/* ---- Footer -------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-6) var(--sp-5);
  text-align: center; color: var(--text-muted);
}
.footer a { color: var(--nova); }
.footer-logo { height: 46px; width: auto; margin: 0 auto var(--sp-2); display: block; }
.footer .brand-mark { justify-content: center; margin: 0 auto var(--sp-2); font-size: 1.15rem; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 719px) {
  .nav-toggle { display: block; order: 3; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: flex-start;
    gap: var(--sp-3); padding-top: var(--sp-3);
  }
  .nav-links.is-open { display: flex; }
}
@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .promo { grid-template-columns: 1.4fr 0.6fr; }
}

/* =====================  PHASE 1: ZONES / MAP / EXERCISES  ================== */

/* ---- Loading card -------------------------------------------------------- */
.loading-card { text-align: center; color: var(--text-muted); padding: var(--sp-8) var(--sp-5); }

/* ---- Two-column grid (account / teacher / zone-hero pages) ---------------- */
.grid-2 { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; margin-bottom: var(--sp-5); }
.grid-2 .card h3 { font-size: var(--fs-base); margin-top: var(--sp-4); }
.grid-2 .card h3:first-child { margin-top: 0; }
.voice-list { margin: 0; padding-left: var(--sp-5); }
.voice-list li { margin-bottom: var(--sp-2); font-style: italic; }

/* ---- Zone hero ----------------------------------------------------------- */
.zone-hero {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(800px 300px at 15% -40%, color-mix(in srgb, var(--card-accent) 22%, transparent), transparent 70%),
    var(--surface);
}
.zone-hero-inner { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }
.zone-hero .avatar { width: 96px; height: 96px; border-color: var(--card-accent); }
.zone-hero h1 { margin-bottom: var(--sp-1); }
.zone-tense { color: var(--text-muted); margin: 0; }
.zone-intro {
  padding: var(--sp-5); margin: var(--sp-5) 0;
  border-left: 4px solid var(--card-accent, var(--nova));
  box-shadow: none;
}
/* Opts out of .glitch-frame's shared rainbow ring (2026-08-31, per user:
   "the discreet border style ... for every level on the exercises pages")
   — this card already carries its own dedicated single-accent left bar
   above, correctly per-owner now that ZonePlayer sets --card-accent on the
   whole page wrapper instead of just the .zone-hero header (a pre-existing
   gap: .zone-intro is a sibling of .zone-hero, not a descendant, so it
   never actually inherited the accent before this fix). A second, generic
   4-color ring on top of that would just be noise, same reasoning as
   .tl-vault-teaser::before further down. */
.zone-intro::before { display: none; }
.zone-intro p { margin: 0; }
.save-note { margin-top: var(--sp-4); }

/* ---- Quantum reaction ---------------------------------------------------- */
.quantum-reaction {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); margin: var(--sp-5) 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2);
}
.quantum-llama {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--quantum);
}
.quantum-cap { font-weight: 600; }
.quantum-reaction.is-calm   { border-color: var(--success); background: rgba(22,166,71,0.08); }
.quantum-reaction.is-glitch { border-color: var(--warning); background: rgba(221,142,0,0.10); animation: shake .4s ease; }
.quantum-reaction.is-storm  { border-color: var(--danger);  background: rgba(255,77,109,0.10); animation: shake .5s ease; }
.quantum-reaction.is-glitch .quantum-llama,
.quantum-reaction.is-storm .quantum-llama { animation: jitter .3s steps(2) 2; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes jitter { 0% { transform: translate(0,0); } 50% { transform: translate(2px,-2px); } 100% { transform: translate(-2px,1px); } }

/* ---- Exercises ----------------------------------------------------------- */
.exercise { padding: var(--sp-5); margin-bottom: var(--sp-5); box-shadow: none; }
/* Same "thin ring" treatment as .tl-card (2026-08-31, per user: "use this
   discreet border style for every level on the exercises pages"). Flattens
   to the single owning character's accent, same recipe as the Timeline Map
   cards — 1px, 0.45 opacity, no shadow — now that ZonePlayer sets
   --card-accent on the whole page (see the .zone-intro note above), rather
   than the shared 4-color rainbow every other .glitch-frame panel uses. */
.exercise::before {
  background: var(--card-accent, var(--border));
  padding: 1px;
  opacity: 0.45;
}
.ex-prompt { font-weight: 600; }
.ex-items { display: grid; gap: var(--sp-3); margin: var(--sp-4) 0; }
.ex-item { padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.ex-item input[type="text"] { width: 100%; }
/* Fix-the-stream line (2026-09-23): a <textarea> that looks like the old
   one-line input everywhere except portrait phones (see media block below). */
.ex-item textarea.fix-input {
  display: block; width: 100%; box-sizing: border-box;
  resize: none; overflow: hidden; line-height: 1.4;
  white-space: pre; overflow-wrap: normal;
}
.ex-item.is-correct { border-color: var(--success); background: rgba(22,166,71,0.08); }
.ex-item.is-wrong   { border-color: var(--danger);  background: rgba(255,77,109,0.07); }
.ex-fix { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); color: var(--success); font-weight: 600; }
.ex-note { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); line-height: 1.4; }
.ex-note-explain { color: var(--text); background: rgba(22,166,71,0.08); border-left: 3px solid var(--success); padding: var(--sp-2); border-radius: var(--radius-sm); }
.ex-note-encourage { color: var(--text-muted); font-style: italic; padding: 0 var(--sp-2); }
.ex-blank { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.blank-options { display: inline-flex; gap: var(--sp-2); flex-wrap: wrap; }
.opt {
  font: inherit; cursor: pointer; padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text);
}
.opt:hover { border-color: var(--nova); }
.opt.is-selected { color: #fff; background: linear-gradient(135deg, var(--fill-a), var(--fill-b)); border-color: transparent; }
.opt:disabled { cursor: default; opacity: 0.85; }
.ex-result { margin-top: var(--sp-4); padding: var(--sp-4); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.ex-result.is-calm   { border-color: var(--success); background: rgba(22,166,71,0.08); }
.ex-result.is-glitch { border-color: var(--warning); background: rgba(221,142,0,0.10); }
.ex-result.is-storm  { border-color: var(--danger);  background: rgba(255,77,109,0.10); }
.ex-result.is-frozen { border-color: #38bdf8; background: rgba(56,189,248,0.10); }
.ex-result.is-locked { border-color: var(--warning); background: rgba(221,142,0,0.12); }
.ex-head { font-weight: 700; margin-bottom: var(--sp-1); }
.ex-score { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }

/* ---- Attempt machine: tries / sittings / sets --------------------------- */
.attempt-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-top: var(--sp-4);
}
.attempt-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.attempt-chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: var(--fs-xs, 0.78rem); font-weight: 700; letter-spacing: .02em;
  border: 1px solid var(--border); color: var(--text-muted); background: var(--surface);
}
.attempt-chip.attempt-tries { border-color: var(--card-accent, var(--nova)); color: var(--card-accent, var(--nova)); }
.exercise.is-blocked { opacity: .96; }
.exercise.is-blocked .opt, .exercise.is-blocked .dlg-choice, .exercise.is-blocked input,
.exercise.is-blocked textarea { cursor: not-allowed; }

/* ---- Dialogue exercise (Trix's interrogation) ---------------------------- */
.dlg-thread { display: grid; gap: var(--sp-4); margin: var(--sp-4) 0; }
.dlg-turn {
  padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--bg-2);
}
.dlg-turn.is-correct { border-color: var(--success); border-left-color: var(--success); background: rgba(22,166,71,0.08); }
.dlg-turn.is-wrong   { border-color: var(--danger);  border-left-color: var(--danger);  background: rgba(255,77,109,0.07); }
.dlg-prompt { margin: 0 0 var(--sp-3); }
.dlg-speaker { font-weight: 800; color: var(--accent); margin-right: 4px; }
.dlg-choices { display: grid; gap: var(--sp-2); }
.dlg-choice {
  font: inherit; text-align: left; cursor: pointer; padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text);
}
.dlg-choice:hover { border-color: var(--nova); }
.dlg-choice.is-selected { color: #fff; background: linear-gradient(135deg, var(--fill-a), var(--fill-b)); border-color: transparent; }
.dlg-choice:disabled { cursor: default; opacity: 0.9; }

/* ---- Escape room (Trix's Chrono-Core) ------------------------------------ */
.escape-hint {
  margin: 0 0 var(--sp-2); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm);
  border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text-muted);
}
.escape-unlock {
  display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4);
  padding: var(--sp-4); border-radius: var(--radius-sm);
  border: 1px solid var(--success); background: rgba(22,166,71,0.10);
}
.escape-icon { font-size: 2rem; line-height: 1; }
.escape-unlock-head { margin: 0; font-weight: 800; }
.escape-code { margin: 2px 0 0; letter-spacing: .18em; }
.escape-code strong { font-size: var(--fs-lg); color: var(--success); }
.escape-code-help { margin: 4px 0 0; font-size: var(--fs-sm); opacity: .85; }
.escape-sealed {
  margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm);
  border-radius: var(--radius-sm); border: 1px solid var(--warning);
  background: rgba(221,142,0,0.10);
}

/* ---- Time-gate code entry (locked zone) ---------------------------------- */
.code-unlock {
  margin: var(--sp-4) 0; padding: var(--sp-4); border-radius: var(--radius-sm);
  border: 1px dashed var(--card-accent, var(--nova));
  background: color-mix(in srgb, var(--card-accent, var(--nova)) 8%, transparent);
}
.code-unlock-label { display: block; font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.code-unlock-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.code-input {
  flex: 1 1 180px; min-width: 0; padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-md); font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: inherit;
}
.code-input:focus-visible { outline: 3px solid var(--card-accent, var(--nova)); outline-offset: 2px; }

/* ---- Stats bar ----------------------------------------------------------- */
.stats-bar {
  display: flex; flex-wrap: wrap; gap: var(--sp-5);
  padding: var(--sp-4) var(--sp-5); margin: var(--sp-4) 0 var(--sp-5);
  box-shadow: none;
}
/* Same "thin ring" treatment as the zone cards' .tl-card::before (2026-08-31,
   per user: "the same as well but keep the colors, drop the shadow") — this
   card has no single owner accent to flatten to, so it keeps the shared
   4-color rainbow gradient, just thinner (1px vs 1.5px) and lower-opacity
   (0.45 vs 0.7) than .glitch-frame's default, and with the drop shadow
   dropped like the zone cards. Scoped to .stats-bar, later in the cascade
   than .glitch-frame::before, so it wins at equal specificity without
   touching the shared rule other .glitch-frame panels still use. */
.stats-bar::before {
  padding: 1px;
  opacity: 0.45;
}
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: var(--fs-xl); font-weight: 800; line-height: 1; }
.stat-lbl { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.stat-badges { flex: 1 1 240px; }
.badge-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.badge-chip {
  font-size: var(--fs-xs); font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
}
/* Per-track progress breakdown — Account page only, sits under the combined
   StatsBar above (2026-08-31, per user: track stats should be both combined
   AND shown separately). Deliberately lighter than a second StatsBar — no
   streak/badges repeated here, since those are account-wide, not per track
   (see gg_progress_summary's comment in api.php); just points + zones
   cleared per track, in TrackProgressRow. */
.track-progress-grid { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-3); }
.track-progress-row {
  flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2);
}
.track-progress-label { font-size: var(--fs-sm); font-weight: 700; }
.track-progress-cefr { font-weight: 400; color: var(--text-muted); font-size: var(--fs-xs); }
.track-progress-nums { font-size: var(--fs-sm); color: var(--text-muted); }
.track-progress-nums strong { color: inherit; font-weight: 800; }

/* ---- Timeline map -------------------------------------------------------- */
.tl-volume { margin: var(--sp-6) 0 0; }
.tl-volume:first-of-type { margin-top: var(--sp-5); }
/* Volume header is now a toggle button (2026-08-31, per user: volume
   accordion, combined with the compact row below — from a 5-way compaction
   mockup, "37 zones across 4 volumes made for a lot of scroll"). Only the
   volume holding the learner's next open zone auto-expands (see
   TimelineMap's isVolOpen/toggleVol); the rest collapse to just this header
   + a cleared-count badge. Nothing is dropped, only tucked one click away. */
.tl-volume-header {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left;
  cursor: pointer; font: inherit; color: inherit; background: none;
  border: none; border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-2); margin-bottom: var(--sp-2);
}
.tl-volume-header:hover { opacity: .85; }
.tl-volume-heading { flex: 1; min-width: 0; }
.tl-volume-kicker { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); margin: 0; }
.tl-volume-title { margin: 0; font-size: var(--fs-lg); }
.tl-volume-progress { font-size: var(--fs-xs); font-weight: 800; color: var(--text-muted); white-space: nowrap; flex: none; }
.tl-volume-chev { color: var(--text-muted); font-size: .75rem; flex: none; transition: transform .15s ease; }
.tl-volume.is-open .tl-volume-chev { transform: rotate(180deg); }

/* Track tabs (2026-08-31, level/track picker) — sit above the volume
   accordion, switching which independently-unlockable chain the map below
   shows (see CONTENT_GUIDE.md's "Tracks" section). Same segmented-control
   language as nothing else on this page yet, so kept deliberately simple:
   a pill-shaped strip, active tab gets the surface color, everything else
   stays flat. */
.track-tabs {
  display: inline-flex; gap: 2px; padding: 3px; margin: var(--sp-4) 0 var(--sp-2);
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
}
.track-tab {
  font: inherit; font-weight: 700; font-size: var(--fs-sm); cursor: pointer;
  padding: 8px 16px; border: none; border-radius: 9px; background: none; color: var(--text-muted);
}
/* Active tab was previously just a flat white-on-grey swap (background:
   var(--surface) inside a var(--surface-2) strip) — too low-contrast to
   read as "selected" at a glance (user report, live screenshot). Now lifts
   off the strip with a real shadow and picks up its own track's brand
   color (prequel=zee green, main=fuchsia glitch-brand — see .track-tab-main
   below), so which tab is active is unmistakable even before reading the
   label. 2026-08-31. */
.track-tab.is-active {
  background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.12), 0 0 0 1px var(--border);
  font-weight: 800;
}
.track-tab-prequel.is-active { color: var(--zee); }
.track-tab-main.is-active { color: var(--lp-glitch-brand); }
.track-tab-pill {
  display: inline-block; margin-left: 6px; font-size: .68rem; font-weight: 800;
  padding: 1px 7px; border-radius: 999px; background: var(--surface-2);
}
.track-tab-prequel.is-active .track-tab-pill { background: color-mix(in srgb, var(--zee) 18%, transparent); color: var(--zee); }
.track-tab-main.is-active .track-tab-pill { background: color-mix(in srgb, var(--lp-glitch-brand) 18%, transparent); color: var(--lp-glitch-brand); }

/* "Coming soon" empty state — shown by a track with zero zones yet (the
   A1-A2 Prequel today: Part One has one drafted chapter, Part Two none). Not
   an error state, just an honest placeholder so the tab still ships now
   instead of waiting for content (2026-08-31, per user). */
.tl-track-empty {
  text-align: center; padding: var(--sp-8) var(--sp-5); margin: var(--sp-4) 0 0;
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
}
.tl-track-empty .avatar { width: 64px; height: 64px; }
.tl-track-empty h2 { margin: 0; font-size: var(--fs-lg); }
.tl-track-empty p { max-width: 520px; }

.timeline { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: grid; gap: var(--sp-3); }
/* min-width:0 on the grid item -- without it, a CSS Grid item's default
   auto-min-width is based on its content's min-content size, so long
   unbreakable zone-title/blurb text inside .tl-body (below) could still
   force this row's grid track wider than the real container, pushing the
   whole card (and the page) past the screen edge on narrow phones -- root
   caused on a real OnePlus 11, 2026-08-27, reported as the Timeline Map's
   zone cards running wider than the screen with horizontal scroll to match.
   Same load-bearing role as `min-height:0` already plays on `.gg-modal-scroll`
   for the vertical axis. */
.tl-node { min-width: 0; }
.tl-card {
  width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit;
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: none;
}
/* "Thin ring" border treatment (2026-08-31, per user: picked from a 6-way
   comparison mockup, zone_card_border_options.html — a throwaway preview
   file, never part of the site). Same family as .glitch-frame's shared
   rainbow ring (::before below), but a single flat per-card accent hue
   instead of the 4-color gradient, half the ring thickness (1px vs 1.5px),
   lower opacity, no drop shadow, and the old 3px accent top-bar dropped so
   all four sides read evenly. Scoped to .tl-card and placed later in the
   cascade than .glitch-frame::before, so at equal specificity this wins —
   the shared rule itself (used by many other panels site-wide) is
   untouched. */
.tl-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: var(--card-accent, var(--border));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.45; pointer-events: none;
}
.tl-node.is-bonus .tl-card::before { opacity: 0.65; }
.tl-card:hover { transform: translateY(-2px); transition: transform .12s ease; }
.tl-card:focus-visible { outline: 3px solid var(--card-accent, var(--nova)); outline-offset: 2px; }
.tl-card .avatar { width: 72px; height: 72px; border-color: var(--card-accent); flex: none; }
.tl-status {
  font-size: 1.2rem; font-weight: 800; width: 34px; height: 34px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
}
.tl-node.is-cleared .tl-status { color: #fff; background: var(--success); border-color: transparent; }
.tl-node.is-open .tl-status { color: #fff; background: var(--card-accent, var(--nova)); border-color: transparent; }
/* The 🔒 emoji glyph carries more built-in padding than the plain ✓/▶
   characters, so at the shared 1.2rem it reads visibly smaller — bumped up
   for visual parity. Also dropped the dark circle badge (background/border)
   that the cleared/open states use for their solid-color fill: a locked
   emoji is already a full-color glyph, so the muted surface-2 circle behind
   it just dulled it down instead of adding anything. */
.tl-node.is-locked .tl-status { font-size: 1.6rem; background: transparent; border: none; }
.tl-node.is-locked .tl-card { opacity: 0.72; }
/* Reader Code bonus zones ("Quantum's Reader Vault") used to get a distinct
   dashed top-border here so a bonus card read as "extra" rather than just
   another numbered zone. Superseded 2026-08-31 by the thin-ring treatment
   above (.tl-node.is-bonus .tl-card::before) — the top border is no longer
   accent-colored on its own, so a dashed *neutral* line would be nearly
   invisible; the ring-opacity bump does that job now, alongside the
   "🎁 Reader Bonus" tag already in the card body.
   A locked bonus card fades the same 0.72 opacity as a normal locked zone
   (changed 2026-08-31, dropped the old opacity:1 override) — once the
   gating fix made an un-redeemed arc-starter collapse into .tl-vault-teaser
   instead of rendering here, every bonus card that still reaches .is-locked
   is a genuine "clear the prerequisite" dead-end, same as the main chain,
   not an active "redeem me" prompt any more — that CTA lives on the teaser
   card only now, so it's the one that should stay bright. */
.tl-bonus-tag {
  display: inline-block; font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--card-accent, var(--nova)) 16%, transparent);
  color: var(--card-accent, var(--nova));
}

/* Reader Vault teaser card — stands in for a whole volume's 3-zone bonus arc
   on the Timeline Map while its Reader Code hasn't been redeemed yet, so an
   un-redeemed visitor sees "there's more" instead of 3 individual locked
   mystery-box cards (see the vaultTeaser() note in app.js). Built on the
   same dashed-border bonus language as .tl-node.is-bonus, but with its own
   soft gradient fill so it visually reads as one combined "more content"
   affordance rather than a fourth zone in the sequence. Always full-opacity
   and clickable (routes to the Account page's redeem card via open()) — it's
   the one bonus-related card that's genuinely actionable pre-redemption, so
   it's the one that keeps the bright treatment .tl-node.is-bonus.is-locked
   gave up above. */
.tl-vault-teaser {
  /* border-top-width pinned explicitly (2026-08-31): it used to inherit 3px
     from the old shared .tl-card rule, which the thin-ring treatment above
     removed — without this it would've silently shrunk to .glitch-frame's
     plain 1px. This card keeps its own bigger, dashed, quantum-colored top
     border regardless of whatever the ordinary zone cards' ring does. */
  border-top-width: 3px; border-top-style: dashed; border-top-color: var(--quantum);
  background: linear-gradient(135deg, color-mix(in srgb, var(--quantum) 10%, var(--surface)), var(--surface));
}
/* Opts out of the ordinary zone cards' thin-ring ::before (added above) —
   this card was never part of that comparison and already has its own
   dashed/gradient look; a second faint ring under it would just be noise. */
.tl-vault-teaser::before { display: none; }
.tl-vault-teaser .avatar { border-color: var(--quantum); }
.tl-vault-teaser .tl-cta { color: var(--quantum); }
/* Signed-in teaser holds an inline Reader Code form (2026-09-23, per user:
   redeem on the map, don't send the learner to the Account page). It's a
   <div>, not a button, so no pointer cursor; the form's focus ring + Redeem
   button pick up Quantum's colour via --card-accent. */
.tl-vault-teaser--form { cursor: default; align-items: flex-start; --card-accent: var(--quantum); }
.tl-vault-teaser--form .reader-code-form { margin-top: var(--sp-3); gap: var(--sp-2); }
.tl-vault-teaser--form .reader-code-form .form-ok,
.tl-vault-teaser--form .reader-code-form .auth-error { margin: 0; }
.tl-vault-flash { list-style: none; }
.tl-vault-flash .form-ok { margin: 0 0 var(--sp-2); }
.tl-node.is-teaser .tl-bonus-tag {
  background: color-mix(in srgb, var(--quantum) 18%, transparent); color: var(--quantum);
}
/* min-width:0 -- the actual overflow driver: as a flex item (of .tl-card,
   flex row) this defaults to auto/min-content, so its own long unbreakable
   text (zone titles, blurbs) refused to shrink below that width, forcing
   .tl-card wider than 100% of its (already min-width:0'd, see .tl-node
   above) container. */
.tl-body { flex: 1; min-width: 0; }
.tl-body h3 { margin: var(--sp-1) 0; }
.tl-num { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); font-weight: 700; }
.tl-cta { display: inline-block; margin-top: var(--sp-2); font-weight: 700; color: var(--card-accent, var(--nova)); }

/* Compact row layout for ordinary zone cards (main-chain + already-visible
   bonus zones) — 2026-08-31, per user: combine "compact row" + "volume
   accordion" from a 5-way comparison mockup. Shrinks the avatar/status and
   folds the old separate tense/summary/stats lines (.tl-tense, .tl-score —
   removed, no longer rendered) into one .tl-meta line, with the CTA pinned
   to the row's right edge instead of stacked under the text. Scoped to
   .tl-card--row (zoneCard only) so the Reader Vault teaser card
   (.tl-vault-teaser — a one-off promotional card, not part of the
   repetitive list) keeps its original larger, more prominent layout. */
.tl-card--row { align-items: center; padding: var(--sp-3) var(--sp-4); gap: var(--sp-3); }
.tl-card--row .avatar { width: 44px; height: 44px; }
.tl-card--row .tl-status { width: 26px; height: 26px; font-size: .85rem; }
.tl-node.is-locked .tl-card--row .tl-status { font-size: 1.15rem; }
.tl-card--row .tl-topline { display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
.tl-card--row .tl-topline h3 { margin: 0; font-size: var(--fs-base); color: var(--card-accent, var(--nova)); font-weight: 700; }
.tl-card--row .tl-meta { margin: 2px 0 0; font-size: var(--fs-sm); }
.tl-card--row .tl-meta strong { color: var(--text); font-weight: 700; }
.tl-card--row .tl-cta { flex: none; margin: 0 0 0 auto; padding-left: var(--sp-3); white-space: nowrap; }

/* Elements that only exist for the mobile "Progress Strip" card below —
   .tl-avwrap is a no-op wrapper everywhere (so it never disturbs desktop
   flex layout), the rest stay display:none outside the phone breakpoint. */
.tl-avwrap { position: relative; display: inline-flex; flex: none; }
.tl-mini-status, .tl-strip, .tl-tense-cap, .tl-cta-icon { display: none; }

/* ===========================================================================
   MOBILE-ONLY zone card: "Progress Strip" (2026-08-31, per user)
   Scoped to phone widths only — iPhone 17 Pro Max (~430px) and OnePlus 11
   (~412px) both fall inside this; small tablets in portrait (≥768px) don't.
   Desktop/tablet keep the .tl-card--row compact-row layout completely
   untouched below this block. Picked from a 5-way comparison mockup
   (mobile_card_variants.html, throwaway, never part of the site) after the
   live compact row's prose summary line was still wrapping to 4-5 lines on
   a real phone (iPhone screenshot, 2026-08-31), pushing the CTA out of
   position. Drops the prose sentence for a glanceable status strip; the
   fill is a real (if coarse) signal, not a fabricated percentage — the API
   only ever tells us cleared/not-cleared and whether a zone_score exists,
   so "attempted, not cleared" reads as a half-filled strip, "never
   attempted" as an empty track, nothing more precise than that. */
@media (max-width: 600px) {
  /* Status icon moves onto the avatar's corner; the separate status circle
     at the card's left edge is retired at this width to buy back room. */
  .tl-card--row .tl-status { display: none; }
  .tl-mini-status {
    display: grid; place-items: center; position: absolute; right: -3px; bottom: -3px;
    width: 17px; height: 17px; border-radius: 50%; font-size: .6rem; font-weight: 900;
    border: 2px solid var(--surface); background: var(--surface-2); color: var(--text);
  }
  .tl-node.is-cleared .tl-mini-status { background: var(--success); color: #fff; }
  .tl-node.is-open .tl-mini-status { background: var(--card-accent, var(--nova)); color: #fff; }
  /* No mini-status for a locked card — the lock glyph already lives on the
     CTA icon button below, showing it twice on a 44px avatar was clutter. */
  .tl-node.is-locked .tl-mini-status { display: none; }

  /* Drop the plain "Zone N" label to save width — the Reader Bonus tag
     stays (a meaningful signal a bare zone number isn't, at this size). */
  .tl-num-plain { display: none; }

  /* Prose summary line is replaced by the strip + tense caption below. */
  .tl-card--row .tl-meta { display: none; }

  .tl-strip {
    display: block; height: 4px; border-radius: 999px; margin: 6px 0 4px;
    background: var(--surface-2); overflow: hidden;
  }
  .tl-strip-fill { display: block; height: 100%; border-radius: 999px; background: var(--card-accent, var(--nova)); width: 0; }
  .tl-node.is-open.has-attempt .tl-strip-fill { width: 50%; }
  .tl-node.is-cleared .tl-strip-fill { width: 100%; background: var(--success); }
  .tl-node.is-locked .tl-strip {
    background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 10px);
  }

  .tl-tense-cap { display: block; font-size: var(--fs-xs); color: var(--text-muted); font-weight: 700; }

  /* CTA collapses from a text label to a single icon button, buying the
     title line back the room the label used to take. */
  .tl-card--row .tl-cta { display: none; }
  .tl-cta-icon {
    display: grid; place-items: center; flex: none; margin-left: auto;
    width: 32px; height: 32px; border-radius: 50%; font-size: .95rem;
    background: var(--card-accent, var(--nova)); color: #fff;
  }
  .tl-node.is-cleared .tl-cta-icon { background: var(--surface-2); color: var(--card-accent, var(--nova)); }
  .tl-node.is-locked .tl-cta-icon { background: var(--surface-2); color: var(--text-muted); font-size: .82rem; }

  .tl-card--row { padding: var(--sp-3) var(--sp-3); gap: var(--sp-3); }
  .tl-card--row .tl-topline h3 { font-size: var(--fs-sm); }
}

/* CEFR level pill — plain-app-page counterpart to .gg-landing's .lp-cefr-pill
   (same recipe: border-only, no fill, uppercase, pill-shaped) so the level
   badge reads as one consistent piece of design language across the book
   covers, the landing page's shop cards, and the app itself. Neutral/muted
   rather than character-accent-colored: CEFR level is a curriculum fact, not
   something owned by a character, and tl-node already spends --card-accent
   on the status dot/border/CTA — a third accent-colored element per card
   would compete rather than add information.
   Contrast bump 2026-08-26 (per user: pills read as too faint in both
   themes): --border/--text-muted were too low-contrast on their own
   surface. Border thickened to 1.5px and darkened via color-mix off
   --text (so it tracks whichever theme is active) instead of --border;
   text switched from --text-muted to full --text. Still border-only/
   no-fill — the neutral-vs-character-color reasoning above is unchanged,
   this only turns up the volume on the existing recipe. */
.cefr-pill {
  display: inline-block; vertical-align: middle; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; padding: 3px 11px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--text) 45%, transparent);
  color: var(--text);
}
.cefr-pill-sm { padding: 2px 9px; font-size: 0.68rem; margin-left: var(--sp-2); }
.cefr-pill-range { margin-left: var(--sp-2); }

/* ---- Badge toast --------------------------------------------------------- */
.badge-toast {
  position: fixed; left: 50%; bottom: var(--sp-5); transform: translateX(-50%);
  z-index: 50; max-width: 92vw; width: 420px; padding: var(--sp-4) var(--sp-5);
  animation: toast-in .3s ease;
}
.badge-toast-head { font-weight: 800; margin-bottom: var(--sp-2); }
.badge-toast-item { font-size: var(--fs-sm); margin-bottom: var(--sp-1); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---- Back to top ----------------------------------------------------------
   Deliberately discreet: a small circular ghost button, low-contrast until
   hovered/focused, bottom-right so it never competes with `.badge-toast`
   (bottom-center) or the drawer/CTA area. Always mounted (see app.js
   `BackToTop`) so `.is-visible` can transition opacity+transform instead of
   the button popping in/out; `pointer-events` follows visibility so it's
   never an invisible click target. `env(safe-area-inset-*)` matches the
   convention already used for the nav drawer/briefing bar on notched phones. */
.back-to-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 1.1rem; line-height: 1;
  cursor: pointer;
  opacity: 0; transform: translateY(8px) scale(.9);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
}
.back-to-top.is-visible { opacity: .55; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover,
.back-to-top:focus-visible { opacity: 1; color: var(--text); border-color: var(--accent); }
.back-to-top:active { transform: scale(.92); }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: opacity .2s ease; } }
/* Stay clear of the drawer's own bottom-right-adjacent controls and the
   badge toast on narrow phones — nudge up slightly under the drawer
   breakpoint so it doesn't crowd the hamburger's touch target row. */
@media (max-width: 1279px) {
  .back-to-top {
    width: 38px; height: 38px; font-size: 1rem;
    /* `right` anchors to the fixed-position containing block's right edge --
       normally the true viewport, but reported on a real OnePlus 11
       (2026-08-27) as sitting off past the visible screen, needing a
       horizontal scroll to reach it. The only other fixed/off-canvas element
       sharing this breakpoint is the closed nav drawer
       (`.lp-drawer`, `right:0` + `transform:translateX(100%)`, ~300px wide)
       -- some mobile browsers let a transformed-off-screen box like that
       inflate the effective containing-block width `right` measures from,
       even though it's spec-excluded from generating real page scroll and
       doesn't reproduce in desktop-emulated mobile testing here. `100vw` is
       always the true device viewport width regardless, so anchoring via
       `left` instead of `right` sidesteps the whole class of bug. Safe only
       inside this breakpoint -- desktop has a vertical scrollbar that makes
       `100vw` overcount, which is why the base (desktop) rule above keeps
       `right`. */
    right: auto;
    left: calc(100vw - max(18px, env(safe-area-inset-right)) - 38px);
  }
}

/* ---- Account / "My account" page ----------------------------------------- */
/* Account hero, redesigned 2026-09-22 (per user: the full-bleed bright
   blue→magenta gradient bar was too loud). Now the same quiet surface every
   other .zone-hero uses, with two soft corner glows, a monogram ringed in
   the four squad colours, and the landing page's 4-colour dash under the
   name. Everything uses reactive tokens, so the old pinned-white text rules
   (2026-08-24/08-27 contrast fixes for the gradient) are no longer needed.
   Previous version: _backups/style_pre-account-hero_2026-09-22.css. */
.account-hero {
  background:
    radial-gradient(700px 260px at 8% -30%, color-mix(in srgb, var(--nova) 18%, transparent), transparent 70%),
    radial-gradient(600px 240px at 92% 130%, color-mix(in srgb, var(--trix) 14%, transparent), transparent 70%),
    var(--surface);
}
.account-hero .kicker { color: var(--nova); letter-spacing: .14em; }
.account-hero h1 { color: var(--text); }
.account-monogram {
  flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 200deg, var(--nova), var(--trix), var(--cass), var(--zee), var(--nova));
}
.account-monogram span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: var(--surface); color: var(--text);
  font-family: 'Lato', sans-serif; font-weight: 900; font-size: 2.2rem; line-height: 1;
}
.account-hero-bars { display: flex; gap: 8px; margin-top: var(--sp-3); }
.account-hero-bars span { width: 28px; height: 3px; border-radius: 2px; }
.account-hero-bars span:nth-child(1) { background: var(--trix); }
.account-hero-bars span:nth-child(2) { background: var(--nova); }
.account-hero-bars span:nth-child(3) { background: var(--zee); }
.account-hero-bars span:nth-child(4) { background: var(--cass); }
@media (max-width: 520px) {
  .account-monogram { width: 64px; height: 64px; }
  .account-monogram span { font-size: 1.7rem; }
}
.account-section { margin: var(--sp-5) 0; }
.account-section h2 { margin-bottom: var(--sp-3); }
.account-card { display: flex; flex-direction: column; }
.account-card h3 { margin-top: 0; }
/* ---- Reader Code Vault (Account page) ------------------------------------ */
.reader-code-list {
  list-style: none; margin: var(--sp-4) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
}
.reader-code-list li {
  font-size: var(--fs-sm); font-weight: 600; padding: 4px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.reader-code-list li.is-redeemed { color: var(--success); border-color: var(--success); background: rgba(22, 166, 71, 0.08); }
.reader-code-card { margin-bottom: var(--sp-5); }
.account-danger { margin-top: var(--sp-5); border-color: var(--danger); }
.account-danger h3 { margin-top: 0; }
.danger-confirm { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.form-ok {
  border: 1px solid var(--success); color: var(--success);
  background: rgba(22, 166, 71, 0.08);
  border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-3); font-size: var(--fs-sm); font-weight: 600;
}
.btn-danger {
  color: #fff; background: var(--danger); border-color: var(--danger);
}
.btn-danger:hover { filter: brightness(1.08); }

/* ---- Phase 4: Teacher / Parent mode ------------------------------------- */
/* Calm, scannable, trustworthy — deliberately low on game chrome. This navy
   gradient is fixed (not a theme token) — a stable, calm background for
   teacher mode regardless of the site's light/dark setting. Because it
   doesn't flip with the theme, its own text can't rely on the reactive
   --text/--text-muted tokens (in light mode those go dark and would sit
   dark-on-dark here) — pinned to a light color instead, same fix pattern as
   .account-hero below. */
.teacher-hero { background: linear-gradient(135deg, #2b3350, #3a4470); color: rgba(255, 255, 255, 0.92); }
.teacher-hero .kicker,
.teacher-hero .zone-tense { color: rgba(255, 255, 255, 0.72); }
.teacher-hero .zone-hero-inner { justify-content: space-between; }
.teacher-print { white-space: nowrap; }

.teacher-resources { display: grid; gap: var(--sp-5); padding-top: var(--sp-5); padding-bottom: var(--sp-8); }

.tk-zone { padding: var(--sp-5); border-left: 4px solid var(--card-accent); }
.tk-zone-head {
  display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.tk-zone-head .avatar { width: 64px; height: 64px; border-color: var(--card-accent); }
.tk-zone-meta { flex: 1 1 200px; }
.tk-zone-meta h2 { margin: var(--sp-1) 0; }
.tk-tense { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.tk-tense strong { color: var(--text); }
.tk-preview { flex: 0 0 auto; }
.tk-summary { margin: 0 0 var(--sp-4); }

.tk-block { margin-top: var(--sp-4); }
.tk-block h3 {
  font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin: 0 0 var(--sp-2);
}
.tk-obj { margin: 0; padding-left: 1.2rem; }
.tk-obj li { margin-bottom: var(--sp-2); }

.tk-ex {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); margin-bottom: var(--sp-3); overflow: hidden;
}
.tk-ex[open] { box-shadow: var(--shadow); }
.tk-ex-summary {
  cursor: pointer; padding: var(--sp-3) var(--sp-4); display: flex;
  flex-wrap: wrap; align-items: baseline; gap: var(--sp-2); list-style: none;
}
.tk-ex-summary::-webkit-details-marker { display: none; }
.tk-ex-summary::before { content: "▸"; color: var(--card-accent); font-weight: 700; }
.tk-ex[open] .tk-ex-summary::before { content: "▾"; }
.tk-ex-type {
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--card-accent);
}
.tk-ex-prompt { flex: 1 1 240px; font-size: var(--fs-sm); }
.tk-ex-pts { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }

.tk-set { padding: 0 var(--sp-4) var(--sp-3); overflow-x: auto; } /* keys never overflow narrow screens */
.tk-set-head {
  font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted);
  margin: var(--sp-3) 0 var(--sp-2); text-transform: uppercase; letter-spacing: 0.05em;
}
.tk-key { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tk-key th {
  text-align: left; font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted); padding: var(--sp-1) var(--sp-2);
  border-bottom: 1px solid var(--border);
}
.tk-key td { padding: var(--sp-2); border-bottom: 1px solid var(--border); vertical-align: top; }
.tk-q { color: var(--text-muted); width: 55%; }
.tk-a { color: var(--success); font-weight: 600; }

@media print {
  .nav, .footer, .teacher-print, .tk-preview { display: none !important; }
  .tk-ex .tk-set { display: block !important; } /* expand all keys when printing */
  .tk-zone { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}

/* ---- Phase 1 responsive -------------------------------------------------- */
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}



/* ===========================================================================
   Phase 6 — the imported grammar-glitch.com design IS the #home page
   (2026-08-24 correction, per user: "I do not want the site's design
   reflected in the new look, just its elements integrated in the landing
   page design language"). Ported from the standalone Grammar Glitch -
   Landing Page project's index.html. Everything below is scoped under
   .gg-landing (custom props, classes, ids, keyframes all "lp-" prefixed) so
   it can never bleed into the rest of the app's own styles (used by every
   other view — login, account, teacher, the zone player), which already
   define .btn/.card/.brand/.footer/.avatar/.nav-toggle etc. with
   different values. LpNav/LpHero/LpFooter are the marketing page's own
   header/hero/footer, with the app's functional elements (sign in / create
   account / dashboard / account links, the clickable squad) wired directly
   into them — see ROADMAP.md §9 Phase 6 / §10 for the full rationale.
   =========================================================================== */
/* ---------- GG THEME TOKENS (aliases onto the real theme tokens) ----------
   Promoted from .gg-landing-scoped to :root (2026-08-24, Phase 6 gateway
   page) so they're available to ANY view, not just the imported landing
   markup. Now pure var() aliases onto the light/dark tokens defined at the
   top of this file (added when the light/dark toggle was built) — every
   rule below already reads color via var(--lp-*), never a hard-coded hex,
   so nothing here needed to change except this block itself. The --lp-
   prefix is kept as-is (a scope promotion, not a rename) to avoid touching
   every existing rule that already references it. --lp-shadow is NOT
   aliased — it's its own themed token (top of file), tuned bigger/softer
   than --shadow for floating landing-page cards. */
:root {
  --lp-ink: var(--bg);
  --lp-text: var(--text);
  --lp-text-dim: var(--text-muted);
  --lp-zee:   var(--zee);   --lp-zee-2:   var(--zee-2);
  --lp-trix:  var(--trix);  --lp-trix-2:  var(--trix-2);
  --lp-cass:  var(--cass);  --lp-cass-2:  var(--cass-2);
  --lp-nova:  var(--nova);  --lp-nova-2:  var(--nova-2);
  --lp-quantum: var(--quantum);
  --lp-prof-a: var(--prof-a); --lp-prof-b: var(--prof-b);
  --lp-dex: var(--dex);
  --lp-line: var(--border);
}
.gg-landing {
  position: relative;
  background: var(--lp-ink);
  color: var(--lp-text);
  font-family: 'Sora', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.gg-landing *{ box-sizing: border-box; }
.gg-landing img{ max-width:100%; display:block; }
.gg-landing a{ color:inherit; }
.gg-landing .lp-eyebrow{
  font-family:'Space Mono',monospace; letter-spacing:.22em; text-transform:uppercase;
  font-size:.72rem; color:var(--lp-text-dim);
}

/* ---------- background atmosphere ---------- */
.gg-landing .lp-noise{
  position:fixed; inset:0; pointer-events:none; z-index:2; opacity:.05; mix-blend-mode:overlay;
}
.gg-landing .lp-scanlines{
  position:fixed; inset:0; pointer-events:none; z-index:3;
  background:repeating-linear-gradient(to bottom, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 3px);
  opacity:.5;
}
.gg-landing .lp-grid-bg{
  position:absolute; inset:0; pointer-events:none; z-index:0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size:42px 42px;
  -webkit-mask-image:radial-gradient(ellipse 70% 55% at 50% 20%, black 0%, transparent 75%);
          mask-image:radial-gradient(ellipse 70% 55% at 50% 20%, black 0%, transparent 75%);
}
/* Dimmed 2026-09-22 (per user, live-screenshot review): opacity .55/blur 60px
   read as too hot/saturated on the real dark hero — same 3 colors, same
   sizes/positions (app.js untouched), just quieter. opacity .55→.3, blur
   60px→75px (softer diffusion spreads the color out instead of concentrating
   it, compounding with the lower opacity rather than fighting it). */
.gg-landing .lp-orb{ position:absolute; border-radius:50%; filter:blur(75px); opacity:.3; pointer-events:none; z-index:0; }
.gg-landing .lp-hero-scrim{
  position:absolute; inset:0; pointer-events:none; z-index:0;
  background:radial-gradient(ellipse 78% 62% at 50% 44%, var(--hero-scrim-a) 0%, var(--hero-scrim-b) 45%, var(--hero-scrim-c) 78%);
}
.gg-landing .lp-hero-badge, .gg-landing .lp-hero h1.lp-logo, .gg-landing .lp-hero .lp-tagline,
.gg-landing .lp-hero .lp-subtitle-line, .gg-landing .lp-hero .lp-cta-row, .gg-landing .lp-hero .lp-hero-micro{ position:relative; z-index:1; }
@keyframes lp-drift{
  0%,100%{ transform:translate(0,0) scale(1); }
  50%{ transform:translate(24px,-30px) scale(1.08); }
}
.gg-landing .lp-orb{ animation: lp-drift 16s ease-in-out infinite; }
/* Dropped on tablet and below (2026-08-27, per user: reads too bright/glowy
   in dark theme and as a muddy smudge in light theme on mobile). The 3 orbs
   (380/320/260px, blurred 60px) are sized for a wide desktop hero where they
   sit apart from each other — on a narrow viewport they overlap almost
   entirely, so their blended colors (blue+magenta+green) dominate the whole
   hero instead of reading as a subtle accent. `.lp-hero-scrim`/`.lp-grid-bg`
   (the vignette + grid pattern) are untouched — only the colored circles are
   the reported problem, and those stay fine at every width. */
@media (max-width:1024px){
  .gg-landing .lp-orb{ display:none; }
}
/* Dropped at EVERY width in the light theme specifically (2026-08-27, per
   user follow-up: the desktop-width light-theme hero has the same smudge
   problem, not just mobile — dark theme's desktop look was never the
   complaint, so only light gets the unconditional drop). Same reasoning
   applies to .lp-char-glow below (the per-character colored blob behind each
   squad card) — reads as a soft accent in dark, a beige/pink smudge on white. */
:root[data-theme="light"] .gg-landing .lp-orb{ display:none; }

/* ---------- nav ----------------------------------------------------------
   De-scoped from ".gg-landing" (2026-08-26, per user: one uniform header
   for every page) — this same header now mounts on both the .gg-landing
   marketing pages AND the plain .site/<main> app pages (see SiteHeader in
   app.js), so its rules can no longer require a .gg-landing ancestor. The
   --lp-* and --nav-glass custom properties it reads are already :root-scoped
   (see the "lp-* tokens promoted to :root" note near the top of this file),
   so nothing else needs to change for it to render identically in both
   contexts.
   FOUND (2026-08-26): the wrapping <div> app.js's SiteHeader used to return
   (around header+drawer-backdrop+drawer) was only ever as tall as the
   header itself, because its other two children are position:fixed and
   contribute zero height in flow — and position:sticky can only stay stuck
   while its PARENT is still on screen, so the header had nowhere to stick
   to. Fixed in app.js by returning a Fragment instead of a <div>, so
   header.lp-site's real parent is .gg-landing/.site (both page-length) —
   not a div that shrinks to the header's own height. Keeping this note
   since it explains why sticky kept failing even after the comment-swallow
   bug below was fixed.
   Rebuilt on CSS Grid (2026-08-26, per user, after the merged header kept
   rendering brand-on-top/nav-below with nav packed to the left instead of
   brand-left/nav-right on one line — even after switching fixed→sticky,
   after a fresh upload, after a hard reload, in a spec-correct
   two-child-flex-row rule that matched the original working LpNav
   structure). No CSS or DOM-inspection reason for that was ever found, so
   rather than keep patching the same flexbox approach, this trades
   `display:flex; justify-content:space-between` (which only ever "works"
   for exactly two children behaving as expected) for a 2-column grid: brand
   is always column 1 (auto-width), nav is always column 2 (justify-self:
   end pins it to the right edge of that column) — nav's own child count or
   width can't change that. sticky (top:0) is unchanged from the prior fix. */
header.lp-site{
  position:sticky; top:0; z-index:50;
  display:grid; grid-template-columns:auto 1fr; align-items:center;
  padding:18px clamp(20px,5vw,64px);
  /* Solid, not translucent (2026-08-26, per user) — the old glass gradient
     faded to fully transparent at the bottom edge, so scrolled content
     (character art, etc.) showed through/blurred underneath the nav text
     once the header was actually sticking and staying on screen while
     scrolling. background-color (not the --nav-glass custom property,
     which is itself semi-transparent) is fully opaque at every point. */
  background-color:var(--bg);
  border-bottom:1px solid var(--border);
}
.lp-brand{
  text-decoration:none; font-family:'Lato',sans-serif; font-weight:900; letter-spacing:.02em;
  font-size:1.05rem; display:flex; gap:.5em; align-items:baseline;
  background:none; border:none; padding:0; margin:0; cursor:pointer; color:var(--lp-text);
}
.lp-brand .lp-g2{ color:var(--lp-glitch-brand); }
header.lp-site nav a, header.lp-site nav button{
  /* Chakra Petch 600 (2026-09-22, per user — picked from _redesign/nav-font-compare.html; was Space Mono .78rem/.12em). Matches the mobile drawer. */
  font-family:'Chakra Petch',sans-serif; font-weight:600; font-size:.86rem; text-transform:uppercase;
  letter-spacing:.1em; text-decoration:none; color:var(--lp-text-dim);
  margin-left:28px; transition:color .2s; background:none; border:none; padding:0; cursor:pointer;
}
header.lp-site nav a:hover, header.lp-site nav button:hover{ color:var(--lp-nova); }
header.lp-site nav{ display:flex; flex-wrap:nowrap; align-items:center; justify-self:end; }
.lp-nav-cta{ border:1px solid var(--lp-line); padding:8px 16px; border-radius:999px; color:var(--lp-text)!important; }
.lp-nav-cta:hover{ border-color:var(--lp-nova); color:var(--lp-nova)!important; }

/* ---------- Nav redesign 2026-09-22 (option A + account menu + "Up next"
   strip, per user). The game gets the first, outlined slot; signed-out
   signed-in users get a points chip and one account menu instead of
   username + Log out. (Sign in / Join free + a compact theme icon were
   tried same day and removed per user: the Play pill's Mission Briefing
   already holds Create account / Sign in, and the two-segment theme
   switch stays in the nav.) Backups:
   _backups/*_pre-nav-play-account_2026-09-22.*  ------------------------- */
/* Rainbow ring (2026-09-22, per user: option D — still at rest, spins only
   on hover; "C with D", always turning, was tried first and dropped). The four squad colours on a conic
   gradient under a --bg-filled padding box, so it follows the theme.
   Browsers without @property just show a static ring. */
@property --gg-pill-a{ syntax:'<angle>'; inherits:false; initial-value:0deg; }
header.lp-site nav .lp-play-pill{
  display:inline-flex; align-items:center; gap:6px;
  border:1px solid transparent; border-radius:999px; padding:7px 14px;
  color:var(--lp-text);
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    conic-gradient(from var(--gg-pill-a), var(--lp-trix), var(--lp-nova), var(--lp-zee), var(--lp-cass), var(--lp-trix)) border-box;
}
header.lp-site nav .lp-play-pill:hover{ color:var(--lp-text); animation:gg-pill-spin 1.6s linear infinite; }
header.lp-site nav .lp-play-pill .lp-play-ico{ color:var(--lp-trix); }
/* Ring width: 1px in dark (the default theme), 1.5px kept in light (per user 2026-09-22). */
:root[data-theme="light"] header.lp-site nav .lp-play-pill{ border-width:1.5px; }
@keyframes gg-pill-spin{ to{ --gg-pill-a:360deg; } }
@media (prefers-reduced-motion:reduce){ header.lp-site nav .lp-play-pill:hover{ animation:none; } }
header.lp-site nav .lp-play-pill .lp-level-trigger-caret{ color:var(--lp-text-dim); }
.lp-acct{ position:relative; display:inline-flex; align-items:center; margin-left:24px; }
header.lp-site nav .lp-acct-trigger{
  margin-left:0; display:inline-flex; align-items:center; gap:8px;
  padding:4px 12px 4px 4px; border:1px solid var(--lp-line); border-radius:999px; color:var(--lp-text);
}
header.lp-site nav .lp-acct-trigger:hover{ border-color:var(--lp-nova); color:var(--lp-text); }
.lp-acct-mono{
  width:28px; height:28px; border-radius:50%; display:inline-grid; place-items:center;
  border:2px solid var(--lp-nova); font-family:'Lato',sans-serif; font-weight:900; font-size:.82rem; letter-spacing:0;
}
/* Points + streak live INSIDE the account pill (merged 2026-09-22, per
   user — was a separate chip), after a thin divider. */
.lp-acct-stats{
  color:var(--lp-cass, var(--cass)); letter-spacing:.04em; white-space:nowrap;
  padding-left:10px; margin-left:2px; border-left:1px solid var(--lp-line);
}
.lp-acct-menu{
  position:absolute; top:calc(100% + 10px); right:0; z-index:40; width:260px;
  background:var(--bg); border:1px solid var(--lp-line); border-radius:14px; padding:6px;
  box-shadow:0 16px 40px rgba(0,0,0,.22);
}
.lp-acct-head{ display:flex; flex-direction:column; gap:2px; padding:10px 14px 10px; margin-bottom:4px; border-bottom:1px solid var(--lp-line); }
.lp-acct-head strong{ font-family:'Lato',sans-serif; font-size:.95rem; color:var(--lp-text); }
.lp-acct-head span{ font-family:'Space Mono',monospace; font-size:.7rem; text-transform:uppercase; letter-spacing:.12em; color:var(--lp-text-dim); }
header.lp-site nav .lp-acct-menu .lp-acct-item{
  display:flex; width:100%; margin-left:0; padding:10px 14px; border-radius:10px;
  font-family:'Lato',sans-serif; font-size:.9rem; font-weight:600; text-transform:none; letter-spacing:normal;
  color:var(--lp-text); text-align:left; text-decoration:none; background:none; border:none; cursor:pointer;
}
header.lp-site nav .lp-acct-menu .lp-acct-item:hover{ background:var(--panel-tint); color:var(--lp-text); }
header.lp-site nav .lp-acct-menu .lp-acct-logout{ color:var(--lp-trix); margin-top:4px; border-top:1px solid var(--lp-line); border-radius:0 0 10px 10px; }
header.lp-site nav .lp-acct-menu .lp-acct-logout:hover{ color:var(--lp-trix); }
@media (max-width:1279px){
  header.lp-site nav .lp-play-pill, .lp-acct{ display:none; }
}
.lp-drawer-play{ color:var(--lp-nova)!important; }

/* "Up next" strip — signed-in only, under the sticky header (scrolls away
   with the page). Tinted with the next zone's owner colour. */
.lp-continue{
  position:relative; z-index:1;
  background:color-mix(in srgb, var(--strip-accent) 9%, var(--bg));
  border-bottom:1px solid var(--border);
}
.lp-continue-in{
  display:flex; align-items:center; gap:12px; width:100%;
  padding:10px clamp(20px,5vw,64px); background:none; border:0; cursor:pointer;
  color:var(--text); font-family:'Lato',sans-serif; font-size:.92rem; text-align:left;
}
.lp-continue-in:hover{ background:color-mix(in srgb, var(--strip-accent) 8%, transparent); }
.lp-continue-play{ color:var(--strip-accent); font-size:.8rem; }
.lp-continue-label{ font-family:'Space Mono',monospace; font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.14em; color:var(--strip-accent); white-space:nowrap; }
.lp-continue-zone{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lp-continue-go{ color:var(--strip-accent); font-weight:700; white-space:nowrap; }
@media (max-width:620px){ .lp-continue-label{ display:none; } .lp-continue-in{ font-size:.86rem; } }

/* "Timeline Map ▾" nav dropdown — restored 2026-08-31 after briefly trying
   two flat nav links instead (Phase 22): per user, the dropdown was "the
   best" version and the flat links were a downgrade. Reinstated with menu
   items reading label + "(CEFR range)" on one line instead of a separate
   label/pill pair; the control renders for signed-out visitors too, not
   just signed-in (there's no separate landing-page picker to fall back on
   any more — see SiteHeader's NavTimelineMap/pickTrack in app.js). Live
   screenshot then showed two problems, both fixed same pass: (1) the emoji
   ("🌱"/"🚀") looked crowded and ugly at the dropdown's width — dropped
   entirely, TRACK_LABELS in app.js is now plain text; (2) a fixed
   `min-width:240px` was forcing "Intermediate (CEFR B1–B2)" to wrap onto
   3 lines in an uppercase monospace font instead of the intended Lato —
   root cause was a SPECIFICITY bug, not the width itself: the menu-item
   selector was a single class (`.lp-level-switcher-opt`, specificity 0-1-0),
   which loses to the page's base `header.lp-site nav a, header.lp-site nav
   button` rule (0-1-3, 3 type selectors) since class-tier ties at 1 and type
   -tier then decides. Fixed by qualifying the selector with its menu
   ancestor (`.lp-level-switcher-menu .lp-level-switcher-opt`, two classes,
   0-2-0 — wins outright once the class tier is unequal, so the Lato/
   lowercase override actually applies now) and switching the menu to
   `width:max-content` (no min-width) with `white-space:nowrap` throughout,
   so it sizes to whichever label is longer instead of wrapping. Desktop/
   tablet only — the mobile drawer keeps its own two stacked one-tap rows
   (SiteHeader's drawer nav), where a nested dropdown inside an already-
   vertical menu would just add a click. */
.lp-level-switcher{ position:relative; display:inline-flex; align-items:center; margin-left:28px; }
.lp-level-trigger{
  margin-left:0!important; display:inline-flex; align-items:center; gap:6px;
  padding:4px 8px; border-radius:8px;
}
.lp-level-trigger:hover{ background:var(--panel-tint); }
.lp-level-trigger-caret{ font-size:.65rem; color:var(--lp-text-dim); transition:color .2s; }
.lp-level-trigger:hover .lp-level-trigger-caret{ color:var(--lp-nova); }
.lp-level-switcher-menu{
  position:absolute; top:calc(100% + 10px); right:0; z-index:40; width:max-content;
  background:var(--bg); border:1px solid var(--lp-line); border-radius:14px; padding:6px;
  box-shadow:0 16px 40px rgba(0,0,0,.22);
}
.lp-level-switcher-menu .lp-level-switcher-opt{
  display:flex; align-items:center; gap:8px; width:100%; white-space:nowrap;
  margin-left:0; padding:10px 14px; border-radius:10px; background:none; border:none;
  font-family:'Lato',sans-serif; font-size:.86rem; text-transform:none; letter-spacing:normal;
  color:var(--lp-text); cursor:pointer; text-align:left; text-decoration:none;
}
.lp-level-switcher-menu .lp-level-switcher-opt:hover{ background:var(--panel-tint); }
.lp-level-switcher-menu .lp-level-switcher-opt.is-current{ background:var(--panel-tint); font-weight:700; }
.lp-level-switcher-cefr{
  font-family:'Space Mono',monospace; font-size:.72rem; letter-spacing:.02em; color:var(--lp-text-dim);
  white-space:nowrap;
}
.lp-level-switcher-opt.is-current .lp-level-switcher-cefr{ color:var(--lp-nova); }
@media (max-width:1279px){ .lp-level-switcher{ display:none; } }

/* Override the generic "nav a, nav button" text-link styling above for the
   theme toggle specifically — it's a segmented switch, not a nav link.
   React only ever mounts this header copy when useNarrowHeader() says
   ≥1280px (narrow widths get the drawer copy instead, see .lp-drawer-theme
   below) — so this rule purely styles it, it doesn't decide visibility.
   The @media(max-width:1279px) block further down ALSO hides this same
   selector — redundant for the live JS-driven header (which never renders
   it there at that width to begin with), but it's the only thing standing
   between index.php's static pre-hydration mirror (a hand-duplicated copy
   of this header, always includes the toggle, has no JS to decide
   placement) and a real flash of it sitting in the header on a phone before
   React mounts and relocates it into the drawer (reported on a OnePlus 11,
   2026-08-27). */
header.lp-site nav .theme-toggle{
  margin-left: 16px; background: var(--panel-tint); border: 1px solid var(--lp-line);
}
header.lp-site nav .theme-toggle .theme-seg{
  font-family: inherit; text-transform: none; letter-spacing: normal;
  font-size: .8rem; margin-left: 0; padding: 6px 12px;
  color: var(--lp-text);
}
header.lp-site nav .theme-toggle .theme-seg:hover{ color: var(--lp-nova); }
header.lp-site nav .theme-toggle .theme-seg.is-active{
  background: linear-gradient(135deg, var(--lp-nova), var(--lp-nova-2));
  color: #fff; font-weight: 700;
}

/* ---------- mobile side menu (also de-scoped, same reason as above) ---------- */
.lp-nav-toggle{
  display:none; width:42px; height:42px; margin-left:12px; flex:0 0 auto;
  background:none; border:1px solid var(--lp-line); border-radius:12px; padding:0;
  cursor:pointer; flex-direction:column; align-items:center; justify-content:center; gap:5px;
}
/* Header collapses to brand + theme toggle + hamburger below this width;
   every other link/CTA (How it works, Characters, Shop the Series, account
   links, login CTA) lives only in the side drawer down here. Raised from a
   620px cutoff to ~1280px (2026-08-27, per user request to audit mobile nav)
   after live testing found the inline nav row — flex-wrap:nowrap, no
   fallback — wrapping onto 2-3 ugly lines well into tablet AND small-laptop
   widths (broken at 640/768/860/960/1024px, only clean from ~1200px up for
   the logged-out nav; a logged-in nav has more items still, e.g. Timeline
   Map/Teacher mode/username/Log out, so needs at least as much headroom).
   The theme toggle itself was already correctly excluded from every
   .lp-hide-mobile/.lp-nav-cta rule below — it stays visible at every width,
   only the breakpoint that decided when the drawer kicks in was too narrow.
   The .theme-toggle rule right below is a static-mirror backstop only — see
   the comment above header.lp-site nav .theme-toggle further up. */
@media (max-width:1279px){
  header.lp-site nav a.lp-hide-mobile, header.lp-site nav button.lp-hide-mobile{ display:none; }
  header.lp-site nav .theme-toggle{ display:none; }
  .lp-nav-cta{ display:none; }
  .lp-nav-toggle{ display:flex; }
}
.lp-nav-toggle .lp-bar{
  display:block; width:18px; height:2px; border-radius:2px; background:var(--lp-text);
  transition:transform .28s cubic-bezier(.22,.8,.2,1), opacity .18s;
}
body.lp-nav-open .lp-nav-toggle .lp-bar:nth-child(1){ transform:translateY(7px) rotate(45deg); }
body.lp-nav-open .lp-nav-toggle .lp-bar:nth-child(2){ opacity:0; }
body.lp-nav-open .lp-nav-toggle .lp-bar:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* Body-scroll lock while the drawer is open. Without this the page behind
   the drawer can still scroll on touch, which lets Chrome/Android's dynamic
   address bar collapse or expand mid-gesture — the visual viewport resizes
   underneath it and the fixed-position drawer/backdrop visibly jumps
   ("flickers and moves", reported on a real OnePlus 11, 2026-08-27).
   Locking background scroll keeps the toolbar (and the viewport it eats
   into) stable for as long as the drawer is up. */
body.lp-nav-open{ overflow:hidden; }

.lp-drawer-backdrop{
  position:fixed; inset:0; z-index:60; background:rgba(4,6,14,.66);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none; transition:opacity .28s;
}
body.lp-nav-open .lp-drawer-backdrop{ opacity:1; pointer-events:auto; }

.lp-drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:70;
  width:min(78vw,300px); display:flex; flex-direction:column;
  padding:26px 24px 32px;
  padding-top:max(26px, calc(env(safe-area-inset-top) + 20px));
  padding-right:max(24px, env(safe-area-inset-right));
  padding-bottom:max(32px, env(safe-area-inset-bottom));
  background:linear-gradient(180deg, var(--surface-2), var(--surface));
  border-left:1px solid var(--lp-line);
  box-shadow:-26px 0 64px -22px rgba(0,0,0,.85);
  transform:translateX(100%); visibility:hidden;
  transition:transform .32s cubic-bezier(.22,.8,.2,1), visibility 0s linear .32s;
}
body.lp-nav-open .lp-drawer{
  transform:translateX(0); visibility:visible;
  transition:transform .32s cubic-bezier(.22,.8,.2,1), visibility 0s;
}
/* Close button + (when present) theme toggle share one row now, toggle on
   the left and close on the right (per user, 2026-08-27) — previously the
   close button was position:absolute and the toggle stacked below it in its
   own centered row; moved both into normal flow so they align on one line
   whenever there's room. flex-wrap is a safety net, not the primary layout:
   .lp-drawer is capped at min(78vw,300px), and the toggle+gap+close-button
   combined only needs ~218px, comfortably inside that down to ~360-375px
   viewports (today's realistic phone floor) — below that rare width the row
   wraps instead of overflowing, same discipline as the header-overflow fix
   above (never let flex/grid content silently overflow sideways). */
.lp-drawer-top{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end;
  gap:12px; margin-bottom:26px;
}
.lp-drawer-theme{ display:flex; margin-right:auto; }
.lp-drawer-close{
  flex:0 0 auto;
  width:40px; height:40px; background:none; border:1px solid var(--lp-line);
  border-radius:12px; color:var(--lp-text); font-size:1.3rem; line-height:1; cursor:pointer; padding:0;
}
.lp-drawer-nav{ display:flex; flex-direction:column; margin-top:0; }
.lp-drawer-link{
  font-family:'Chakra Petch',sans-serif; font-weight:600; font-size:1.02rem;
  text-decoration:none; color:var(--lp-text); padding:15px 2px; min-height:54px;
  border-bottom:1px solid var(--lp-line); display:flex; align-items:center; transition:color .2s;
  background:none; border-left:none; border-right:none; border-top:none; width:100%; text-align:left; cursor:pointer;
}
.lp-drawer-link:active{ color:var(--lp-nova); }
.lp-drawer-cta{
  margin-top:24px; border-bottom:none; justify-content:center; border-radius:999px;
  background:linear-gradient(100deg,#ffd166,#ff9f45); color:#12100a; font-weight:700; padding:15px 18px;
}
.lp-drawer-foot{ margin-top:auto; padding-top:26px; font-size:.76rem; line-height:1.55; color:var(--lp-text-dim); }

/* ---------- hero ---------- */
/* overflow:hidden here (not relied on `html`'s overflow-x:hidden alone) --
   root-caused 2026-08-27: the 3 decorative .lp-orb circles are absolutely
   positioned + drift-animated (`translate(24px,-30px) scale(1.08)` at the
   animation's midpoint) and the left-anchored orb (`left:8%, width:380px`)
   pushes past the real viewport edge on phone widths around 412px --
   confirmed live (`document.documentElement.scrollWidth` 40px wider than
   `clientWidth`, exactly matching the orb's measured right edge). `html`'s
   own overflow-x:hidden was supposed to be the backstop for exactly this
   kind of decorative bleed (see the comment at the top of this file) but a
   real OnePlus 11 could still pan/scroll into it -- `overflow:hidden`
   scoped to `.lp-hero` itself removes the actual overflow at its source
   instead of just hoping the viewport-level clip holds on every browser.
   Safe here specifically because `.lp-hero` is a sibling of `header.lp-site`
   (see `Landing()` in app.js), not an ancestor -- unlike `.gg-landing` or
   `body`, clipping it can't break the header's position:sticky. Matches the
   same pattern `.hero-stage` (the dark cinematic hero) already uses for its
   own drifting `.fx-orb` circles. */
.gg-landing .lp-hero{
  position:relative; overflow:hidden; min-height:100vh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center;
  padding:92px 20px 116px; isolation:isolate; scroll-margin-top:0;
}
@supports (min-height:100svh){ .gg-landing .lp-hero{ min-height:100svh; } }
.gg-landing .lp-hero-badge{
  /* Chakra Petch 700 (2026-09-22, per user) — matches the navbar; was Space Mono .72rem/.18em. */
  font-family:'Chakra Petch',sans-serif; font-size:.8rem; letter-spacing:.16em; font-weight:700;
  text-transform:uppercase; color:var(--lp-text-dim); border:1px solid var(--lp-line);
  background:var(--panel-tint); text-shadow:none;
  padding:7px 16px; border-radius:999px; margin-bottom:28px;
}
.gg-landing h1.lp-logo{
  font-family:'Lato',sans-serif; font-weight:900;
  font-size:clamp(2.8rem,9vw,6.4rem); line-height:.98; margin:0; letter-spacing:.01em;
}
.gg-landing h1.lp-logo span{ display:block; }
.gg-landing h1.lp-logo .lp-l1{ color:var(--lp-text); }
.gg-landing h1.lp-logo .lp-l2{ color:var(--lp-glitch-brand); position:relative; display:inline-block; }
@keyframes lp-glitchshift{
  0%   { transform:translate(0,0);   text-shadow:none; }
  86%  { transform:translate(-3px,0); text-shadow:3px 0 0 var(--lp-nova), -3px 0 0 var(--lp-zee); }
  88%  { transform:translate(3px,0);  text-shadow:-4px 0 0 var(--lp-nova-2), 4px 0 0 var(--lp-cass); }
  90%  { transform:translate(-2px,0); text-shadow:2px 0 0 var(--lp-zee-2), -2px 0 0 var(--lp-nova); }
  92%  { transform:translate(0,0);   text-shadow:none; }
  100% { transform:translate(0,0);   text-shadow:none; }
}
.gg-landing h1.lp-logo .lp-l2{
  -webkit-animation: lp-glitchshift 2.6s steps(1,end) infinite;
          animation: lp-glitchshift 2.6s steps(1,end) infinite;
}
.gg-landing h1.lp-logo .lp-l2 .lp-g-slice{
  position:absolute; inset:0; overflow:hidden; color:var(--lp-nova); pointer-events:none; opacity:0;
  -webkit-clip-path:inset(0 0 100% 0); clip-path:inset(0 0 100% 0);
}
@supports ((clip-path:inset(0 0 0 0)) or (-webkit-clip-path:inset(0 0 0 0))){
  @keyframes lp-glitchburst{
    0%,86%,100%{ -webkit-clip-path:inset(0 0 100% 0); clip-path:inset(0 0 100% 0); transform:translate(0,0); opacity:0; }
    88%{ -webkit-clip-path:inset(10% 0 60% 0); clip-path:inset(10% 0 60% 0); transform:translate(-6px,0); opacity:1; }
    90%{ -webkit-clip-path:inset(55% 0 12% 0); clip-path:inset(55% 0 12% 0); transform:translate(5px,0); opacity:1; }
    92%{ -webkit-clip-path:inset(30% 0 40% 0); clip-path:inset(30% 0 40% 0); transform:translate(-3px,0); opacity:1; }
    94%,99%{ -webkit-clip-path:inset(0 0 100% 0); clip-path:inset(0 0 100% 0); opacity:0; }
  }
  .gg-landing h1.lp-logo .lp-l2 .lp-g-slice{
    -webkit-animation: lp-glitchburst 2.6s steps(1,end) infinite;
            animation: lp-glitchburst 2.6s steps(1,end) infinite;
  }
}
.gg-landing .lp-hero .lp-tagline{
  font-family:'Chakra Petch',sans-serif; font-weight:500; color:var(--lp-text-dim);
  font-size:clamp(1rem,2.4vw,1.3rem); margin:26px 0 6px; max-width:640px;
}
.gg-landing .lp-hero .lp-subtitle-line{ display:flex; gap:10px; align-items:center; margin-top:6px; }
.gg-landing .lp-subtitle-line .lp-bar{ width:34px; height:3px; border-radius:2px; }
.gg-landing .lp-b1{ background:var(--lp-trix); } .gg-landing .lp-b2{ background:var(--lp-nova); }
.gg-landing .lp-b3{ background:var(--lp-zee); }  .gg-landing .lp-b4{ background:var(--lp-cass); }
.gg-landing .lp-hero .lp-cta-row{ display:flex; gap:16px; margin-top:44px; flex-wrap:wrap; justify-content:center; }
.gg-landing .lp-hero .lp-hero-micro{ margin-top:20px; font-size:.82rem; color:var(--lp-text-dim); max-width:420px; }

.gg-landing .lp-btn{
  font-family:'Chakra Petch',sans-serif; font-weight:600; font-size:.95rem;
  letter-spacing:.03em; text-decoration:none; padding:14px 30px; border-radius:999px;
  display:inline-flex; align-items:center; gap:10px; transition:transform .25s, box-shadow .25s;
  border:1px solid transparent; background:none; cursor:pointer;
  -webkit-appearance:none; appearance:none; margin:0;
}
.gg-landing .lp-btn:hover{ transform:translateY(-2px); }
.gg-landing .lp-btn-primary{
  background:linear-gradient(120deg,var(--lp-trix),var(--lp-nova-2)); color:#fff;
  box-shadow:0 14px 30px -10px rgba(255,46,166,.45);
}
.gg-landing .lp-btn-primary:hover{ box-shadow:0 18px 40px -8px rgba(124,92,255,.55); }
.gg-landing .lp-btn-ghost{ border-color:var(--lp-line); color:var(--lp-text); }
.gg-landing .lp-btn-ghost:hover{ border-color:var(--lp-nova); color:var(--lp-nova); }

.gg-landing .lp-scroll-cue{
  position:absolute; bottom:34px; left:50%; transform:translateX(-50%);
  pointer-events:none; z-index:1; font-family:'Space Mono',monospace; font-size:.68rem;
  color:var(--lp-text-dim); letter-spacing:.2em; text-transform:uppercase;
  display:flex; flex-direction:column; align-items:center; gap:8px;
}
.gg-landing .lp-scroll-cue .lp-line{
  width:1px; height:34px; background:linear-gradient(to bottom, var(--lp-text-dim), transparent);
  animation: lp-pulse-scroll 2.2s ease-in-out infinite;
}
@keyframes lp-pulse-scroll{ 0%,100%{opacity:.25;} 50%{opacity:1;} }

/* ---------- section shell ---------- */
.gg-landing section{ position:relative; padding:96px clamp(20px,5vw,64px); scroll-margin-top:84px; }
.gg-landing .lp-hero{ scroll-margin-top:0; }
.gg-landing .lp-section-head{ text-align:center; max-width:640px; margin:0 auto 64px; scroll-margin-top:96px; }
.gg-landing #lp-squad{ max-width:720px; }
.gg-landing .lp-section-head .lp-eyebrow{ color:var(--lp-nova); }
.gg-landing .lp-section-head h2{
  font-family:'Lato',sans-serif; font-weight:900; text-transform:uppercase;
  font-size:clamp(1.8rem,4vw,2.6rem); margin:10px 0 14px; color:var(--lp-text);
}
.gg-landing .lp-section-head p{ color:var(--lp-text-dim); font-size:1.02rem; line-height:1.6; margin:0; }

/* ---------- how it works ---------- */
.gg-landing .lp-steps{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; max-width:1000px; margin:0 auto;
}
.gg-landing .lp-step{
  background:var(--panel-tint); border:1px solid var(--lp-line); border-radius:20px;
  padding:28px 24px; text-align:left;
}
.gg-landing .lp-step-n{
  font-family:'Space Mono',monospace; font-size:1.4rem; font-weight:700; color:var(--lp-nova); margin-bottom:10px;
}
.gg-landing .lp-step h3{ font-family:'Lato',sans-serif; font-weight:900; text-transform:uppercase; font-size:1rem; margin:0 0 8px; color:var(--lp-text); }
.gg-landing .lp-step p{ color:var(--lp-text-dim); font-size:.9rem; line-height:1.6; margin:0; }

/* The "Choose Your Level" landing section (.lp-level-picker/.lp-guide-strip/
   .lp-picker-*) was removed 2026-08-31 along with its LpLevelPicker
   component in app.js — it duplicated the navbar's track links, and the
   decision was one track picker for the whole app, not a nav shortcut plus
   a landing-page section doing the same job. Recoverable from git history /
   prior file versions if a dedicated marketing pitch for the two tracks is
   wanted again later. */

/* ---------- squad ---------- */
/* Gap was 8px 4px (row/column) — cards sat almost edge-to-edge, especially
   once a border makes each card's boundary visible. Widened 2026-09-21;
   card padding grew to match. See the "thin ring" block below. */
.gg-landing .lp-squad-grid{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:44px 28px; max-width:1180px; margin:0 auto;
}
.gg-landing .lp-char-card{
  position:relative; padding:26px 20px 34px; border-radius:28px; text-align:center; overflow:hidden;
  border:1px solid var(--lp-line); transition:border-color .25s ease;
}
.gg-landing .lp-char-card.lp-is-clickable{ cursor:pointer; transition:transform .12s ease, box-shadow .2s ease, border-color .25s ease; }
.gg-landing .lp-char-card.lp-is-clickable:hover{ transform:translateY(-3px); }
.gg-landing .lp-char-card.lp-is-clickable:focus-visible{ outline:3px solid var(--lp-nova); outline-offset:3px; }
.gg-landing .lp-char-glow{
  position:absolute; left:50%; top:14%; width:220px; height:220px; pointer-events:none;
  transform:translateX(-50%); border-radius:50%; filter:blur(46px); opacity:.5; z-index:0; transition:opacity .35s;
}
.gg-landing .lp-char-card:hover .lp-char-glow{ opacity:.85; }
/* Dropped in the light theme at every width (2026-08-27, per user: the same
   colored-blur smudge problem as the hero orbs above, on every squad card —
   see the comment on .lp-orb's light-theme rule near the top of this file).
   Dark theme keeps it — the soft glow reads fine there, was never the
   complaint. */
:root[data-theme="light"] .gg-landing .lp-char-glow{ display:none; }
.gg-landing .lp-char-art-wrap{ position:relative; z-index:1; height:230px; display:flex; align-items:flex-end; justify-content:center; }
.gg-landing .lp-char-art{ max-height:230px; width:auto; filter:drop-shadow(0 18px 24px rgba(0,0,0,.55)); transition:transform .4s cubic-bezier(.2,.8,.2,1); }
.gg-landing .lp-char-card:hover .lp-char-art{ transform:translateY(-6px) scale(1.035); }
/* Light theme: drop the drop-shadow entirely (2026-08-27, per user: character
   art should blend into the white card, not sit on a "greyish backdrop").
   A `filter:drop-shadow()` blurs the PNG's own alpha silhouette outward on
   ALL sides, not just downward — even with an 18px downward offset, a 24px
   blur radius spreads enough around the top/sides too, which on a white
   surface reads as a soft grey halo hugging each character rather than a
   grounding shadow. Dark theme keeps it (the same halo is far less visible
   against the dark surface, and gives the art some lift there). */
:root[data-theme="light"] .gg-landing .lp-char-art{ filter:none; }
.gg-landing .lp-char-name{
  font-family:'Lato',sans-serif; font-weight:900; font-size:1.15rem; text-transform:uppercase;
  margin:18px 0 2px; position:relative; z-index:1; letter-spacing:.02em;
}
.gg-landing .lp-char-title{ font-family:'Chakra Petch',sans-serif; font-size:.86rem; color:var(--lp-text-dim); margin:0 0 12px; position:relative; z-index:1; }
.gg-landing .lp-tense-chip{
  font-family:'Space Mono',monospace; font-size:.66rem; letter-spacing:.08em; text-transform:uppercase;
  padding:5px 12px; border-radius:999px; border:1px solid var(--lp-line);
  display:inline-block; margin-bottom:14px; position:relative; z-index:1;
}
.gg-landing .lp-char-blurb{ font-size:.88rem; line-height:1.55; color:var(--lp-text-dim); max-width:230px; margin:0 auto; position:relative; z-index:1; }
.gg-landing .lp-char-cta{
  display:block; margin-top:12px; font-family:'Space Mono',monospace; font-size:.7rem;
  letter-spacing:.08em; text-transform:uppercase; color:var(--lp-nova); position:relative; z-index:1;
}

.gg-landing .lp-c-zee .lp-char-glow{background:var(--lp-zee);} .gg-landing .lp-c-zee .lp-tense-chip{color:var(--lp-zee); border-color:rgba(30,196,100,.4);} .gg-landing .lp-c-zee .lp-char-name{color:var(--lp-zee);} .gg-landing .lp-c-zee.lp-char-card{border-color:rgba(30,196,100,.4);} .gg-landing .lp-c-zee.lp-char-card:hover{border-color:var(--lp-zee);}
.gg-landing .lp-c-trix .lp-char-glow{background:var(--lp-trix);} .gg-landing .lp-c-trix .lp-tense-chip{color:var(--lp-trix); border-color:rgba(255,46,166,.4);} .gg-landing .lp-c-trix .lp-char-name{color:var(--lp-trix);} .gg-landing .lp-c-trix.lp-char-card{border-color:rgba(255,46,166,.4);} .gg-landing .lp-c-trix.lp-char-card:hover{border-color:var(--lp-trix);}
.gg-landing .lp-c-cass .lp-char-glow{background:var(--lp-cass);} .gg-landing .lp-c-cass .lp-tense-chip{color:var(--lp-cass); border-color:rgba(255,171,31,.4);} .gg-landing .lp-c-cass .lp-char-name{color:var(--lp-cass);} .gg-landing .lp-c-cass.lp-char-card{border-color:rgba(255,171,31,.4);} .gg-landing .lp-c-cass.lp-char-card:hover{border-color:var(--lp-cass);}
.gg-landing .lp-c-nova .lp-char-glow{background:var(--lp-nova);} .gg-landing .lp-c-nova .lp-tense-chip{color:var(--lp-nova); border-color:rgba(26,178,255,.4);} .gg-landing .lp-c-nova .lp-char-name{color:var(--lp-nova);} .gg-landing .lp-c-nova.lp-char-card{border-color:rgba(26,178,255,.4);} .gg-landing .lp-c-nova.lp-char-card:hover{border-color:var(--lp-nova);}
.gg-landing .lp-c-quantum .lp-char-glow{background:var(--lp-quantum);} .gg-landing .lp-c-quantum .lp-tense-chip{color:var(--lp-quantum); border-color:rgba(201,139,255,.4);} .gg-landing .lp-c-quantum .lp-char-name{color:var(--lp-quantum);} .gg-landing .lp-c-quantum.lp-char-card{border-color:rgba(201,139,255,.4);} .gg-landing .lp-c-quantum.lp-char-card:hover{border-color:var(--lp-quantum);}
.gg-landing .lp-c-professor .lp-char-glow{background:linear-gradient(90deg,var(--lp-prof-a),var(--lp-prof-b));} .gg-landing .lp-c-professor .lp-tense-chip{color:var(--lp-prof-a); border-color:rgba(34,211,238,.4);} .gg-landing .lp-c-professor .lp-char-name{background:linear-gradient(90deg,var(--lp-prof-a),var(--lp-prof-b)); -webkit-background-clip:text; background-clip:text; color:transparent;} .gg-landing .lp-c-professor.lp-char-card{border-color:rgba(34,211,238,.4);} .gg-landing .lp-c-professor.lp-char-card:hover{border-color:var(--lp-prof-a);}
.gg-landing .lp-c-dex .lp-char-glow{background:var(--lp-dex);} .gg-landing .lp-c-dex .lp-tense-chip{color:var(--lp-dex); border-color:rgba(224,151,90,.4);} .gg-landing .lp-c-dex .lp-char-name{color:var(--lp-dex);} .gg-landing .lp-c-dex.lp-char-card{border-color:rgba(224,151,90,.4);} .gg-landing .lp-c-dex.lp-char-card:hover{border-color:var(--lp-dex);}

/* Two groups inside the squad section — "The Squad" (4 tense-owning kids)
   and "The Support Cast" (3 helpers who don't own a single tense the way
   the kids do). Added 2026-09-06 when Dex joined as a 7th card: a flat
   3-column grid left an orphan card on the last row at every width, so the
   section splits into two always-full rows instead (same pattern as
   .lp-book-group / .lp-book-group-head below, added for the Prequel). */
.gg-landing .lp-squad-group + .lp-squad-group{ margin-top:56px; }
.gg-landing .lp-squad-group-head{ display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; margin-bottom:28px; }
.gg-landing .lp-squad-group-head h3{
  font-family:'Lato',sans-serif; font-weight:900; text-transform:uppercase; letter-spacing:.02em;
  font-size:1.1rem; margin:0; color:var(--lp-text);
}
.gg-landing .lp-squad-group-pill{
  display:inline-block; font-family:'Chakra Petch',sans-serif; font-weight:700; letter-spacing:.12em;
  font-size:.66rem; text-transform:uppercase; border-radius:999px; padding:5px 15px; border:1.5px solid currentColor;
}
.gg-landing .lp-squad-group-pill--squad{ color:var(--lp-nova); }
.gg-landing .lp-squad-group-pill--support{ color:var(--lp-dex); }
/* Column count per group — each renders as one full row instead of both
   groups sharing the base 3-column grid (which would leave the 4-card
   Squad group uneven). Collapses together with the base grid at the
   existing ≤860/≤720 breakpoints below (same specificity, later source
   wins), except where a group-specific override says otherwise. */
.gg-landing .lp-squad-grid--4{ grid-template-columns:repeat(4,minmax(0,1fr)); }
/* Support Cast (3 cards) used to stretch across the same 1180px row as the
   4-card Squad group, making its cards visibly bigger. Capped to the exact
   width 3 Squad-sized cards + 2 gaps would take: (1180 - 3*28)/4 = 274px
   per card, so 3*274 + 2*28 = 878px. Recompute if --squad-grid gap changes. */
.gg-landing .lp-squad-grid--3{ grid-template-columns:repeat(3,minmax(0,1fr)); max-width:min(878px,100%); }

/* ---------- book section ---------- */
.gg-landing .lp-book-section{
  background:linear-gradient(180deg, transparent, rgba(255,255,255,.02) 15%, rgba(255,255,255,.02) 85%, transparent);
  border-top:1px solid var(--lp-line); border-bottom:1px solid var(--lp-line);
}
.gg-landing #lp-book{ max-width:820px; }
.gg-landing .lp-book-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:32px; max-width:1440px; margin:0 auto; align-items:stretch; }
/* Only 2 cards live in the Prequel group today — force the same 2-up centered
   layout the main grid only gets at tablet width (~L2026), so 2 cards read as
   a deliberate pair instead of a 4-column grid with an empty half. */
.gg-landing .lp-book-grid--pair{ grid-template-columns:repeat(2,minmax(0,1fr)); max-width:720px; }
.gg-landing .lp-book-card{
  background:var(--panel-tint); border:1px solid var(--lp-line); border-radius:24px;
  padding:38px 28px 34px; text-align:center; display:flex; flex-direction:column; align-items:center;
  transition:transform .3s ease, border-color .3s ease;
}
.gg-landing .lp-book-card .lp-book-cta{ margin-top:auto; display:flex; flex-direction:column; align-items:center; }
.gg-landing .lp-book-card:hover{ transform:translateY(-5px); border-color:rgba(255,255,255,.24); }
.gg-landing .lp-book-cover-wrap{ position:relative; display:flex; justify-content:center; margin-bottom:24px; }
.gg-landing .lp-book-cover-frame{ position:relative; width:190px; border-radius:14px; transform:rotate(-3deg); box-shadow:var(--lp-shadow); transition:transform .5s cubic-bezier(.2,.8,.2,1); }
.gg-landing .lp-book-card:hover .lp-book-cover-frame{ transform:rotate(-1deg) translateY(-4px); }
.gg-landing .lp-book-cover-frame img{ border-radius:12px; display:block; width:100%; height:auto; }
.gg-landing .lp-book-cover-frame::before{
  content:''; position:absolute; inset:-3px; border-radius:16px; z-index:-1;
  background:linear-gradient(140deg,var(--lp-trix),var(--lp-nova),var(--lp-zee),var(--lp-cass));
  opacity:.7; filter:blur(2px);
}
.gg-landing .lp-book-card .lp-eyebrow{ color:var(--lp-cass); font-size:.68rem; }
/* The grammar-topic badge (added 2026-09-08) was removed 2026-09-09 per
   user: the description/blurb already names the grammar focus, so the
   badge line was redundant. `.lp-book-card h3`'s top margin reverts to its
   pre-badge 8px (was tightened to 2px only because the badge used to sit
   directly above it). */
.gg-landing .lp-book-card h3{ font-family:'Lato',sans-serif; font-weight:900; text-transform:uppercase; font-size:1.12rem; margin:8px 0 12px; color:var(--lp-text); }
.gg-landing .lp-book-card p{ color:var(--lp-text-dim); line-height:1.6; font-size:.88rem; margin:0 0 18px; }
.gg-landing .lp-book-facts{ display:flex; justify-content:center; margin-bottom:22px; }
.gg-landing .lp-cefr-pill{
  display:inline-block; font-family:'Chakra Petch',sans-serif; font-weight:700; letter-spacing:.14em;
  font-size:.68rem; text-transform:uppercase; border-radius:999px; padding:5px 15px; border:1.5px solid currentColor;
}
.gg-landing .lp-amazon-btn{
  font-family:'Chakra Petch',sans-serif; font-weight:700; font-size:.94rem; text-decoration:none;
  color:#12100a; padding:14px 28px; border-radius:999px; display:inline-flex; align-items:center; gap:10px;
  background:linear-gradient(100deg,#ffd166,#ff9f45); box-shadow:0 16px 34px -10px rgba(255,159,69,.5);
  transition:transform .25s, box-shadow .25s; position:relative; overflow:hidden;
}
.gg-landing .lp-amazon-btn:hover{ transform:translateY(-2px); box-shadow:0 20px 42px -8px rgba(255,159,69,.65); }
.gg-landing .lp-amazon-avail{ display:block; margin-top:14px; font-size:.76rem; color:var(--lp-text-dim); }

/* Coming-soon card state (Prequel duology, not yet published — no ASIN/Amazon
   link exists yet). Same footprint as a live card so the grid never reflows
   once a book ships. Per user (2026-09-06): the card itself stays at full
   strength — no dimmed opacity, no desaturated cover — the dashed "Coming
   soon" pill below is the only signal, and that's enough on its own. */
.gg-landing .lp-amazon-btn.lp-amazon-btn--soon{
  background:none; box-shadow:none; border:1.5px dashed var(--lp-line);
  color:var(--lp-text-dim); cursor:default;
}
.gg-landing .lp-amazon-btn.lp-amazon-btn--soon:hover{ transform:none; box-shadow:none; }

/* Two level groups inside the book-shop section (Prequel A1-A2 / Main Series
   B1-B2), added when the Prequel duology joined the book-shop 2026-09-05. Pill
   colors intentionally reuse the app's own track colors (.track-tab-prequel/
   .track-tab-main, style.css ~L915) so "Beginner=green, Intermediate=fuchsia"
   reads the same whether you're shopping for books or picking a Timeline Map
   track. */
.gg-landing .lp-book-group + .lp-book-group{ margin-top:72px; }
.gg-landing .lp-book-group-head{ display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center; margin-bottom:32px; }
.gg-landing .lp-book-group-head h3{
  font-family:'Lato',sans-serif; font-weight:900; text-transform:uppercase; letter-spacing:.02em;
  font-size:1.3rem; margin:0; color:var(--lp-text);
}
.gg-landing .lp-book-group-pill{
  display:inline-block; font-family:'Chakra Petch',sans-serif; font-weight:700; letter-spacing:.14em;
  font-size:.7rem; text-transform:uppercase; border-radius:999px; padding:6px 18px; border:1.5px solid currentColor;
}
.gg-landing .lp-book-group-pill--a1a2{ color:var(--zee); }
.gg-landing .lp-book-group-pill--b1b2{ color:var(--lp-glitch-brand); }

/* ---------- footer ---------- */
.gg-landing footer.lp-footer{ padding:56px clamp(20px,5vw,64px) 40px; text-align:center; position:relative; }
.gg-landing footer.lp-footer .lp-brand{ justify-content:center; margin-bottom:14px; opacity:.9; }
.gg-landing footer.lp-footer p{ color:var(--lp-text-dim); font-size:.84rem; margin:6px 0; }
.gg-landing footer.lp-footer a{ text-decoration:underline; text-decoration-color:var(--lp-line); }
.gg-landing footer.lp-footer a:hover{ color:var(--lp-nova); }
.gg-landing footer.lp-footer .lp-footer-social{ font-family:'Space Mono',monospace; font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; margin:16px 0 12px; }
.gg-landing footer.lp-footer .lp-footer-social a{ margin:0 8px; text-decoration:none; color:var(--lp-text-dim); }
.gg-landing footer.lp-footer .lp-footer-social a:hover{ color:var(--lp-nova); text-decoration:underline; text-decoration-color:var(--lp-line); }

/* ---------- Mission Briefing (gateway page, Phase 6b) ---------------------
   Reached from the landing page's single entry CTA (nav + hero). Explains
   the rules, then hands off to the real Sign In / Create Account views.
   Same .gg-landing dark canvas + noise/scanlines; only the few rules below
   are new — everything else (.lp-section-head, .lp-steps/.lp-step,
   .lp-btn/.lp-btn-primary/.lp-btn-ghost, .lp-brand) is reused as-is.
   =========================================================================== */
.gg-landing .lp-briefing-bar{
  padding:20px clamp(20px,5vw,64px); display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:12px; position:relative; z-index:1;
}
/* Lightweight "back to home" affordance alongside the clickable brand mark —
   Mission Briefing + the auth pages (.lp-auth-wrap below) otherwise have no
   nav chrome at all (2026-08-26). Matches header.lp-site nav a/button's look. */
.gg-landing .lp-briefing-back{
  font-family:'Chakra Petch',sans-serif; font-weight:600; font-size:.86rem; text-transform:uppercase;
  letter-spacing:.1em; text-decoration:none; color:var(--lp-text-dim);
  background:none; border:none; padding:0; cursor:pointer; transition:color .2s;
}
.gg-landing .lp-briefing-back:hover{ color:var(--lp-nova); }
/* Mission Briefing is a MODAL since 2026-09-22 (was a full page): the
   .gg-modal shell gets .gg-modal-wide + .lp-bmodal, content sits in
   .lp-briefing. Everything is sized to fit one desktop screen; ≤620px the
   modal becomes a full-screen sheet (see the media block below). */
.gg-landing .gg-modal.lp-bmodal{ max-width:960px; }
.gg-landing .lp-bmodal .lp-briefing{ padding:36px clamp(20px,4vw,44px) 28px; }
.gg-landing .lp-briefing-hero{ text-align:center; }
.gg-landing .lp-briefing-rules{ padding-top:24px; }
.gg-landing .lp-briefing-hero h2{
  font-family:'Lato',sans-serif; font-weight:900; text-transform:uppercase;
  font-size:clamp(1.7rem,3.6vw,2.4rem); margin:10px 0 10px; color:var(--lp-text);
}
.gg-landing .lp-briefing-hero p{ color:var(--lp-text-dim); font-size:.98rem; line-height:1.6; max-width:600px; margin:0 auto; }
.gg-landing .lp-bmodal .lp-steps{ gap:16px; max-width:none; }
.gg-landing .lp-bmodal .lp-step{ padding:20px 20px; border-radius:16px; }
.gg-landing .lp-bmodal .lp-step-n{ font-size:1.2rem; margin-bottom:6px; }
.gg-landing .lp-bmodal .lp-step p{ font-size:.88rem; line-height:1.55; }
/* Level picker — moved here from the navbar (2026-09-22 declutter, see
   CHECKPOINT.md/ROADMAP.md §9): reuses .lp-level-switcher-opt's token
   palette (panel-tint/line/nova) but as two always-visible pill buttons,
   not a popover menu — this is the only place a signed-out visitor picks
   a level now, so it needs to read as a real, deliberate choice rather
   than a small nav-corner control. */
.gg-landing .lp-briefing-level{ display:flex; flex-direction:column; align-items:center; gap:10px; margin-top:22px; }
.gg-landing .lp-briefing-level-label{
  font-family:'Space Mono',monospace; font-size:.72rem; text-transform:uppercase;
  letter-spacing:.12em; color:var(--lp-text-dim);
}
.gg-landing .lp-briefing-level-opts{ display:inline-flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.gg-landing .lp-briefing-level-opt{
  font-family:'Lato',sans-serif; font-size:.92rem; font-weight:700; color:var(--lp-text);
  background:var(--panel-tint); border:1px solid var(--lp-line); border-radius:999px;
  padding:9px 18px; cursor:pointer; display:inline-flex; align-items:center; gap:6px;
  transition:border-color .2s, background .2s, color .2s;
}
.gg-landing .lp-briefing-level-opt:hover{ border-color:var(--lp-nova); }
.gg-landing .lp-briefing-level-opt.is-selected{ background:var(--lp-nova); border-color:var(--lp-nova); color:#fff; }
.gg-landing .lp-briefing-level-cefr{ font-family:'Space Mono',monospace; font-size:.72rem; letter-spacing:.02em; opacity:.8; }
.gg-landing .lp-briefing-cta{ display:flex; gap:16px; justify-content:center; flex-wrap:wrap; margin-top:28px; }
.gg-landing .lp-briefing-note{ margin-top:14px; margin-bottom:0; font-size:.82rem; color:var(--lp-text-dim); text-align:center; }
@media (max-width:620px){
  /* Full-screen sheet on phones: no backdrop gutter, no rounded corners. */
  .gg-landing .gg-modal-backdrop:has(.lp-bmodal){ padding:0; }
  .gg-landing .gg-modal.lp-bmodal{ max-width:none; height:100%; max-height:100vh; border-radius:0; }
  .gg-landing .lp-bmodal .lp-briefing{ padding:48px 18px 28px; }
  .gg-landing .lp-briefing-cta{ flex-direction:column; align-items:stretch; max-width:320px; margin-inline:auto; margin-top:24px; }
  .gg-landing .lp-briefing-cta .lp-btn{ width:100%; justify-content:center; min-height:52px; padding:15px 24px; }
  .gg-landing .lp-briefing-level-opts{ flex-direction:column; width:100%; max-width:280px; margin-inline:auto; }
  .gg-landing .lp-briefing-level-opt{ justify-content:center; }
}

/* ---------- Auth pages (Sign In / Create Account), dark reskin -----------
   Phase 6c, start (2026-08-24) — see ROADMAP.md §9. Same .gg-landing canvas
   + .lp-briefing-bar back link + .lp-btn/.lp-btn-primary as everywhere else.
   LoginView/RegisterView's own markup keeps its original .kicker/.muted/
   .auth-form/.auth-error class names (see app.js) — reskinned in place here
   rather than renamed, so they still degrade sanely if ever rendered
   outside .gg-landing. */
.gg-landing .lp-auth-wrap{ display:flex; justify-content:center; padding:24px clamp(20px,5vw,64px) 96px; }
.gg-landing .lp-auth-card{
  width:100%; max-width:440px; background:var(--panel-tint); border:1px solid var(--lp-line);
  border-radius:20px; padding:clamp(28px,4vw,44px); box-shadow:var(--lp-shadow);
}
.gg-landing .lp-auth-card .kicker{
  font-family:'Space Mono',monospace; letter-spacing:.22em; text-transform:uppercase;
  font-size:.72rem; color:var(--lp-nova); margin:0 0 10px;
}
.gg-landing .lp-auth-card h1{
  font-family:'Lato',sans-serif; font-weight:900; text-transform:uppercase;
  font-size:clamp(1.6rem,4vw,2rem); margin:0 0 28px; color:var(--lp-text);
}
.gg-landing .lp-auth-card .auth-form{ display:flex; flex-direction:column; gap:18px; }
.gg-landing .lp-auth-card .auth-form label{
  display:flex; flex-direction:column; gap:8px; font-size:.86rem; color:var(--lp-text-dim);
}
.gg-landing .lp-auth-card .auth-form input,
.gg-landing .lp-auth-card .auth-form select{
  background:var(--input-tint); border:1px solid var(--lp-line); border-radius:10px;
  padding:12px 14px; color:var(--lp-text); font-family:'Sora',sans-serif; font-size:.95rem;
}
.gg-landing .lp-auth-card .auth-form input:focus-visible,
.gg-landing .lp-auth-card .auth-form select:focus-visible{
  outline:2px solid var(--lp-nova); outline-offset:1px; border-color:var(--lp-nova);
}
.gg-landing .lp-auth-card .auth-form .lp-btn{ margin-top:6px; width:100%; justify-content:center; }
.gg-landing .lp-auth-card .muted{ color:var(--lp-text-dim); font-size:.86rem; margin:22px 0 0; text-align:center; }
.gg-landing .lp-auth-card .muted a{ color:var(--lp-nova); text-decoration:underline; text-decoration-color:var(--lp-line); }
.gg-landing .lp-auth-card .auth-error{
  background:rgba(255,46,166,.12); border:1px solid rgba(255,46,166,.4); color:var(--danger);
  border-radius:12px; padding:12px 16px; font-size:.86rem; margin-bottom:22px;
}
@media (max-width:480px){
  .gg-landing .lp-auth-wrap{ padding-top:8px; }
  .gg-landing .lp-auth-card{ border-radius:16px; }
}

@media (max-width:860px){
  .gg-landing .lp-squad-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gg-landing .lp-book-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); max-width:720px; margin-inline:auto; }
  .gg-landing .lp-steps{ grid-template-columns:1fr; max-width:520px; margin-inline:auto; }
}
@media (min-width:721px) and (max-width:860px){
  .gg-landing .lp-tense-chip{ font-size:.6rem; letter-spacing:.06em; }
  /* The 3-card Support Cast group stays 3-across at tablet width instead of
     collapsing to 2 (which would leave a 2+1 orphan row) — same fixed-count
     special case as .lp-book-grid--pair above. Scoped to this narrower band
     (not ≤860) so the ≤720 mobile rule below, which drops EVERY squad grid
     to 1 column, is never outranked by this compound-selector's higher
     specificity. */
  .gg-landing .lp-squad-grid.lp-squad-grid--3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:720px){
  .gg-landing .lp-squad-grid{ grid-template-columns:minmax(0,1fr); max-width:460px; margin-inline:auto; gap:0; }
  /* Stacked mobile cards keep the pre-existing divider-only pattern instead
     of the new thin-ring border (a full-width boxed card here would look
     odd against border-radius:0 + the border-top divider below). */
  .gg-landing .lp-char-card{ padding:28px 12px 32px; border-radius:0; border:0; }
  .gg-landing .lp-char-card + .lp-char-card{ border-top:1px solid var(--lp-line); }
  .gg-landing .lp-char-blurb{ max-width:36ch; }
  .gg-landing .lp-char-art-wrap{ height:250px; }
  .gg-landing .lp-char-art{ max-height:250px; }
  .gg-landing section{ padding:72px clamp(14px,3.5vw,64px); }
  .gg-landing .lp-section-head{ margin-bottom:44px; }
  .gg-landing .lp-book-grid{ grid-template-columns:1fr; max-width:380px; margin-inline:auto; }
}
@media (max-width:620px){
  header.lp-site{
    padding:12px 16px; padding-top:max(12px, env(safe-area-inset-top));
    padding-left:max(14px, env(safe-area-inset-left)); padding-right:max(14px, env(safe-area-inset-right));
  }
  .lp-brand{ font-size:.95rem; gap:.38em; }
  .gg-landing .lp-hero{ padding:78px 14px 86px; }
  .gg-landing .lp-hero-badge{ font-size:.66rem; letter-spacing:.1em; padding:7px 14px; max-width:100%; line-height:1.5; margin-bottom:22px; }
  .gg-landing h1.lp-logo{ font-size:clamp(2.5rem,13vw,3.6rem); }
  .gg-landing .lp-hero .lp-tagline{ font-size:1.02rem; margin:20px 0 6px; }
  .gg-landing .lp-hero .lp-cta-row{ flex-direction:column; align-items:stretch; flex-wrap:nowrap; width:100%; max-width:320px; gap:12px; margin-top:34px; }
  .gg-landing .lp-hero .lp-cta-row .lp-btn{ width:100%; justify-content:center; min-height:52px; padding:15px 24px; }
  .gg-landing .lp-scroll-cue{ display:none; }
  .gg-landing .lp-book-cover-frame{ width:min(240px,72vw); }
  .gg-landing .lp-amazon-btn{ width:100%; max-width:320px; justify-content:center; min-height:54px; padding:16px 24px; }
  .gg-landing footer.lp-footer{ padding-bottom:max(40px, env(safe-area-inset-bottom)); }
}
@media (max-width:400px){
  .gg-landing .lp-hero-badge{ font-size:.6rem; letter-spacing:.08em; padding:6px 12px; }
}
@media (max-height:520px) and (orientation:landscape){
  .gg-landing .lp-hero{ min-height:auto; padding-top:92px; padding-bottom:56px; }
  .gg-landing .lp-scroll-cue{ display:none; }
  .gg-landing section{ padding-left:max(20px, env(safe-area-inset-left)); padding-right:max(20px, env(safe-area-inset-right)); }
}
@media (hover:none){
  .gg-landing .lp-btn:hover, .gg-landing .lp-amazon-btn:hover, .gg-landing .lp-book-card:hover{ transform:none; }
  .gg-landing .lp-book-cover-wrap:hover .lp-book-cover-frame{ transform:rotate(-4deg); }
  .gg-landing .lp-char-card:hover .lp-char-art{ transform:none; }
  .gg-landing .lp-char-card:hover .lp-char-glow{ opacity:.5; }
}
@media (prefers-reduced-motion:reduce){
  .gg-landing *{ animation:none!important; transition:none!important; }
}

/* ---- Zone-cleared celebration modal (ZoneClearModal, 2026-09-22) ----------
   Replaces the retired time-gate codes (.escape-unlock / .code-unlock above
   are now unused). Themed per zone owner via --zc-accent. */
.zc { position: relative; text-align: center; }
.zc-burst {
  position: absolute; left: calc(-1 * var(--sp-5)); right: calc(-1 * var(--sp-5)); top: calc(-1 * var(--sp-5));
  height: 180px; overflow: hidden; pointer-events: none;
}
.zc-bit {
  position: absolute; top: -14px; width: 7px; height: 12px; border-radius: 2px; opacity: 0;
  animation-name: zc-fall; animation-timing-function: ease-in; animation-iteration-count: 2; animation-fill-mode: forwards;
}
@keyframes zc-fall {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(190px) rotate(540deg); }
}
.zc-hero { position: relative; padding-top: var(--sp-2); }
.zc-avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--zc-accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--zc-accent) 22%, transparent), 0 0 36px color-mix(in srgb, var(--zc-accent) 55%, transparent);
  animation: zc-pop .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes zc-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.zc-kicker {
  margin: var(--sp-3) 0 0; font-family: 'Chakra Petch', 'Space Mono', monospace; font-weight: 700;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--zc-accent);
}
.zc-head { margin: var(--sp-1) 0 0; font-size: 1.6rem; line-height: 1.15; }
.zc-zone { margin: var(--sp-1) 0 0; color: var(--text-muted); font-weight: 600; }
.zc-line {
  margin: var(--sp-4) 0 0; padding: var(--sp-3) var(--sp-4); text-align: left;
  border-left: 4px solid var(--zc-accent); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--zc-accent) 10%, var(--surface-2));
}
.zc-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-4); }
.zc-stat {
  font-size: var(--fs-sm); padding: 4px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--zc-accent) 45%, transparent);
}
.zc-stat strong { color: var(--zc-accent); }
.zc-note, .zc-end { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.zc-actions { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
.zc-actions .btn { width: 100%; white-space: normal; }
.zc-next {
  /* Own colour only (the old mix toward --accent turned amber into sage),
     with ink picked per theme: dark text on the bright dark-theme
     character colours, white on the deepened light-theme ones. */
  color: var(--on-char);
  background: linear-gradient(135deg, var(--zc-next), color-mix(in srgb, var(--zc-next) 82%, var(--text)));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--zc-next) 35%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  .zc-bit { display: none; }
  .zc-avatar { animation: none; }
}

/* ---- Required-word chips (gw() in app.js, 2026-09-22, option A) ----------
   Words a learner must use, marked with backticks in content. Mono font +
   square corners so they never read as the round, clickable .opt pills.
   Tinted by the zone owner's accent (--card-accent on the zone wrapper). */
.gword {
  --gw: var(--card-accent, var(--nova));
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: .9em; font-weight: 700; letter-spacing: 0;
  color: var(--gw);
  background: color-mix(in srgb, var(--gw) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--gw) 60%, transparent);
  border-radius: 4px; padding: 0 .4em; margin: 0 .15em; /* 2026-09-23: was .05em — room beside ( , ! */
  white-space: nowrap; line-height: 1.5;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
:root[data-theme="light"] .gword { color: color-mix(in srgb, var(--gw) 75%, #000); }
.escape-hint .gword, .tk-q .gword { font-size: .88em; }

/* Fill-blank verb cues drop their brackets everywhere: "(stand)" -> stand
   chip, no parens — the chip styling already marks it as the cue, the
   parens were redundant clutter (2026-09-23; widened from portrait-phone-only
   to all screen sizes same day, per user). */
.gw-paren { display: none; }
.gw-cue { color: var(--text-muted); white-space: normal; }

/* ---- Portrait phones only: exercise tweaks (2026-09-23) -----------------
   1. Fix-the-stream lines wrap and grow (fitFixInput in app.js) instead of
      cutting off at the box edge.
   2. "Submit to Quantum" sits centred under the attempt chips. */
@media (max-width: 719px) and (orientation: portrait) {
  .ex-item textarea.fix-input { white-space: pre-wrap; overflow-wrap: anywhere; }
  .attempt-bar { flex-direction: column; align-items: stretch; }
  .attempt-bar > .btn { align-self: center; }
}
