/* ============================================================================
   VOID HORIZON — landing / teaser design system
   ----------------------------------------------------------------------------
   Identity: "starship bridge console" — phosphor cyan + amber HUD on deep-space
   glass. Display type is an angular HUD stencil (Chakra Petch); the data/console
   body is IBM Plex Mono. Extracted from index.html's inline styles (task: design
   -system refresh) into one tokenized, fully responsive sheet.

   Organisation:
     1. Tokens        — colour, type scale, spacing, radius, shadow, motion
     2. (Dark-only — brand look; light theme removed 2026-09-18 per brand)
     3. Base + game   — reset, canvas, the flight-sim HUD chrome
     4. Layout        — teaser shell, section headers
     5. Components     — hero, nav, dev-blog, galleries, status, scoreboard, CTAs,
                        lightbox, review CMS, stats modal  (reused via shared tokens)
     6. Motion        — one orchestrated load reveal (reduced-motion aware)

   Every colour is painted from a token so BOTH themes stay coherent; the dark
   look is the game's brand (default), light is a refined "daylight blueprint".
   Selectors are preserved verbatim so all inline scripts + data bindings still
   hook the same nodes (posts.json, status.json, concept-match, model manifest,
   lightbox R2 zoom, review flags, stats modal).
   ========================================================================== */

/* ── 1. Tokens (dark = default, the brand) ────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Grounds & surfaces */
  --space:      #04060d;              /* deep-space base            */
  --space-2:    #070c17;              /* one step up from the void  */
  --bg-grad:    radial-gradient(120% 80% at 50% -10%, #0b1226 0%, var(--space) 60%);
  --surface:    #060a13;             /* image / media wells        */
  --surface-2:  #08111d;             /* modals, forms, controls    */
  --panel:      rgba(10,19,34,.55);  /* glass panel fill           */
  --panel-solid:#0a1322;
  --caption-bg: rgba(6,12,24,.72);
  --control-bg: #10233a;
  --control-edge:#315270;
  --hover-fill: #0e1e30;
  --archive-bg: rgba(8,16,30,.35);
  --hero-inset: rgba(95,212,245,.06);
  --row-hover:  rgba(95,212,245,.05);

  /* Teaser atmosphere layers (kept as explicit rgba — a bad value here would
     blank the whole overlay, so no color-mix) */
  --teaser-top: #0d1836;
  --teaser-bot: rgba(11,20,42,.6);
  --grid-line:  rgba(95,212,245,.035);
  --grid-line2: rgba(95,212,245,.028);

  /* Hairlines & glow */
  --edge:       #163049;
  --edge-soft:  #0f2033;
  --edge-glow:  rgba(95,212,245,.30);

  /* Phosphor accents */
  --cyan:       #5fd4f5;
  --cyan-deep:  #2f9fc4;
  --cyan-bright:#78e0fb;
  --amber:      #f5b96a;
  --green:      #6fe3a0;
  --violet:     #b79cf5;
  --on-accent:  #04121e;             /* ink on a cyan/amber fill   */

  /* Text ramp */
  --ink-hi:     #eaf3ff;             /* headings / hero            */
  --text:       #c9d6e8;
  --text-2:     #b7c4d8;             /* long-form body             */
  --text-dim:   #98a9c2;             /* captions, notes            */
  --text-mute:  #8193ad;             /* ≥4.5:1 on panel + space */

  /* Status accents reuse the phosphor ramp */
  --live:  var(--green);
  --wip:   var(--amber);
  --plan:  var(--violet);
  --fail:  #ff6b6b;

  /* Review CMS (danger) */
  --danger:     #b8404f;
  --danger-bg:  #7a1725;
  --danger-ink: #ffe6e6;

  /* Lightbox stays dark in both themes (viewing full-res art) */
  --overlay:    rgba(2,4,10,.94);

  /* Type — fluid where it earns it, crisp px where data must stay legible */
  --display: 'Chakra Petch', 'IBM Plex Mono', ui-monospace, monospace;
  --mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --fs-micro: 12px;
  --fs-sm:    12px;
  --fs-data:  13px;
  --fs-base:  14px;
  --fs-body:  clamp(13.5px, 0.4vw + 12px, 14.5px);
  --fs-lede:  clamp(14px, 0.6vw + 12px, 16px);
  --fs-h3:    clamp(15px, 0.5vw + 13px, 16px);
  --fs-sec:   13px;
  --fs-h1:    clamp(36px, 8.4vw, 74px);
  --fs-sub:   clamp(12px, 2.5vw, 14px);

  /* Spacing scale (4px rhythm) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 42px; --sp-8: 64px;

  /* Radius scale */
  --r-xs: 5px; --r-sm: 7px; --r-md: 10px; --r-lg: 12px; --r-xl: 14px;

  /* Elevation */
  --shadow-1: 0 8px 22px rgba(0,0,0,.40);
  --shadow-2: 0 12px 28px rgba(0,0,0,.50);
  --shadow-3: 0 18px 54px rgba(0,0,0,.55);
  --shadow-modal: 0 20px 60px rgba(0,0,0,.70);
  --ring: 0 0 0 1px var(--edge-glow);

  /* Motion */
  --dur-fast: .16s;
  --dur: .18s;
  --dur-slow: .6s;
  --ease: cubic-bezier(.2,.7,.2,1);

  /* Layout */
  --content-max: 940px;
  --gutter: clamp(16px, 4vw, 22px);
}

/* ── 2. Light theme — "daylight blueprint" (same tokens, re-pointed) ───────── */

/* ── 3. Base + flight-sim chrome ──────────────────────────────────────────── */
html, body {
  margin: 0; height: 100%;
  background: var(--space); color: var(--text);
  font: var(--fs-base)/1.5 var(--mono); overscroll-behavior: none;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body { background-image: var(--bg-grad); }

/* The playfield IS the window: the canvas fills the viewport and the control
   bars float over it. touch-action:none hands touches to the camera gestures. */
#game-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }
/* Floating panels scroll internally instead of colliding on short viewports. */
#fc-controls { max-height: 70vh; overflow: auto; }

@media (max-width: 700px) {
  #fc-hud { white-space: pre-wrap; right: 12px; font-size: var(--fs-sm); }
  #fc-topbar { top: 60px; gap: 6px; padding: 4px 6px; max-height: 32vh; overflow: auto; }
  #fc-controls { max-height: 46vh; gap: 10px; }
}
/* Touch devices: finger-sized targets over precision desktop controls. */
@media (pointer: coarse) {
  button, select { font-size: 15px; padding: 8px 12px; min-height: 40px; }
  label { font-size: 14px; }
  input[type="range"] { min-height: 32px; }
  input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; }
  input[type="number"], input[type="text"] { font-size: 16px; min-height: 36px; }
}

/* ── 4. Teaser shell + section headers ────────────────────────────────────── */
#teaser {
  position: fixed; inset: 0; z-index: 200; overflow: auto; color: var(--text);
  -webkit-tap-highlight-color: transparent;
  /* Deep-space glass: a top glow, a faint HUD grid, and a settling vignette. */
  background:
    radial-gradient(120% 85% at 50% -8%, var(--teaser-top) 0%, transparent 56%),
    radial-gradient(90% 60% at 50% 108%, var(--teaser-bot) 0%, transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 -1px / 100% 46px,
    linear-gradient(90deg, var(--grid-line2) 1px, transparent 1px) -1px 0 / 46px 100%,
    var(--space);
}
#teaser[hidden] { display: none; }
#teaser-scroll {
  max-width: var(--content-max); margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) var(--gutter) clamp(56px, 8vh, 96px);
}
#teaser header { margin: 0; }
#teaser h1 {
  font: 700 var(--fs-h1)/.98 var(--display); letter-spacing: .06em; margin: 0;
  color: var(--ink-hi);
  text-shadow: 0 0 30px var(--edge-glow), 0 2px 0 rgba(4,6,13,.35);
}
#teaser .sub {
  color: var(--cyan); letter-spacing: .32em; margin: var(--sp-3) 0 0;
  font: 500 var(--fs-sub)/1.4 var(--display); text-transform: uppercase;
}
#teaser .lede {
  color: var(--text-2); max-width: 760px; margin: var(--sp-5) 0 var(--sp-6);
  font-size: var(--fs-lede); line-height: 1.75;
}
#teaser .lede::first-line { color: var(--ink-hi); }

/* HUD section header: a bracket tick, uppercase stencil label, a fading rule. */
#teaser .sec {
  position: relative; color: var(--cyan); font: 600 var(--fs-sec)/1.2 var(--display);
  letter-spacing: .24em; text-transform: uppercase; margin: var(--sp-7) 0 var(--sp-4);
  padding: 0 0 11px 24px; border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--cyan-deep), transparent 72%) 1;
}
#teaser .sec::before {
  content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px;
  border: 1.5px solid var(--cyan); border-radius: 3px; box-shadow: 0 0 10px var(--edge-glow);
}
#teaser .sec span { color: var(--text-dim); }

/* Section intro note — reused across every data section */
#teaser .galnote { color: var(--text-dim); font-size: var(--fs-data); margin: -4px 0 var(--sp-4); line-height: 1.6; }

/* ── 5. Components ────────────────────────────────────────────────────────── */

/* Hero (image / video / model-viewer share one frame) */
#teaser .hero {
  margin: 0; border: 1px solid var(--edge); border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-3), inset 0 0 0 1px var(--hero-inset);
}
#teaser .hero img, #teaser .hero video, #teaser .hero model-viewer {
  width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover;
}
#teaser .hero figcaption {
  padding: 11px 15px; font-size: var(--fs-data); color: var(--text-dim);
  background: var(--caption-bg); border-top: 1px solid var(--edge-soft);
}

/* Android King rig demo (model-viewer + controls) */
#teaser .king-effort-media { border-color: var(--cyan-deep); box-shadow: var(--ring), var(--shadow-2); }
#teaser .king-rig-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  padding: 10px 12px; background: var(--surface-2); border-top: 1px solid var(--edge-soft);
}
#teaser .king-rig-controls button, #teaser .king-rig-controls select {
  color: var(--text); background: var(--control-bg); border: 1px solid var(--control-edge);
  border-radius: var(--r-xs); padding: 7px 10px; font: 600 var(--fs-sm)/1.2 var(--mono);
}
#teaser .king-rig-controls [data-king-rig-form][aria-pressed="true"] {
  color: var(--on-accent); background: var(--cyan); border-color: var(--cyan);
}
#teaser .king-rig-controls label { display: flex; align-items: center; gap: 6px; color: var(--text-dim); }
#teaser .king-rig-controls [data-king-rig-status] { flex: 1 1 210px; color: var(--cyan); font-size: var(--fs-sm); }
#teaser .king-effort-link { margin: var(--sp-3) 0 var(--sp-5); text-align: center; }
#teaser .king-effort-link a { color: var(--cyan); font-weight: 700; }

/* Accent chip */
#teaser .tag {
  color: var(--on-accent); background: linear-gradient(180deg, var(--cyan-bright), var(--cyan));
  font-weight: 700; letter-spacing: .08em; font-size: 12px; padding: 3px 8px;
  border-radius: 4px; margin-right: var(--sp-2); box-shadow: 0 0 12px var(--edge-glow);
}

/* Studies & labs nav — pill grid */
#teaser nav.studies { display: flex; flex-wrap: wrap; gap: 9px; margin: 10px 0 4px; }
#teaser nav.studies a {
  flex: 1 1 auto; min-width: 150px; text-align: center; text-decoration: none;
  color: var(--cyan); border: 1px solid var(--edge); border-radius: var(--r-md);
  padding: 12px; background: var(--panel); font-size: var(--fs-base); letter-spacing: .02em;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
#teaser nav.studies a:hover {
  background: var(--hover-fill); border-color: var(--cyan); transform: translateY(-2px);
  box-shadow: var(--shadow-1), var(--ring);
}
#teaser nav.studies h3.navgroup {
  flex: 1 1 100%; margin: var(--sp-3) 0 0; font-size: var(--fs-data); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
}
#teaser nav.studies h3.navgroup:first-child { margin-top: 0; }
#teaser nav.studies details.navother { flex: 1 1 100%; margin-top: var(--sp-4); }
#teaser nav.studies details.navother summary {
  cursor: pointer; font-size: var(--fs-data); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); padding: 4px 0;
}
#teaser nav.studies details.navother .navrow { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; }

/* Dev blog — dated <details> cards from posts.json */
#teaser #dev-blog { margin: 0 0 var(--sp-2); }
#teaser .post {
  border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--panel);
  padding: 0 var(--sp-4); margin: 0 0 var(--sp-4); transition: border-color var(--dur);
}
/* The dev blog starts ~3,600 px down the page and holds 130+ cards; opening "Show N earlier posts"
   laid every card out in one frame (the landing's slowest interaction). Skip rendering cards that
   are off-screen; `auto` remembers each card's real height once it has rendered
   (modern-web-guidance: defer-rendering-heavy-content). */
#teaser #dev-blog .post { content-visibility: auto; contain-intrinsic-size: auto none auto 200px; }
#teaser .post:hover { border-color: var(--cyan-deep); }
#teaser .post[open] { border-color: var(--cyan-deep); box-shadow: var(--ring); }
#teaser .post > summary { cursor: pointer; padding: 15px 4px; list-style: revert; }
#teaser .post > summary::-webkit-details-marker { color: var(--cyan); }
#teaser .post > summary:hover .post-head h3 { color: var(--cyan); }
#teaser .post > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
#teaser .post-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; }
#teaser .post-head time { color: var(--cyan); font: 500 var(--fs-sm)/1.2 var(--display); letter-spacing: .1em; }
#teaser .post-head h3 {
  margin: 0; font: 600 var(--fs-h3)/1.3 var(--display); color: var(--ink-hi);
  letter-spacing: .01em; flex: 1 1 auto; transition: color var(--dur);
}
#teaser .post-preview { color: var(--text-dim); font-size: var(--fs-body); line-height: 1.62; margin: var(--sp-2) 0 0; flex: 1 1 100%; }
#teaser .post-more { color: var(--cyan); margin-left: 6px; white-space: nowrap; }
#teaser .post-more-open { display: none; }
#teaser .post[open] .post-more-closed { display: none; }
#teaser .post[open] .post-more-open { display: inline; }
#teaser .post-full { padding: 2px 0 var(--sp-4); }
#teaser .post-body { color: var(--text-2); font-size: var(--fs-body); line-height: 1.65; margin: 0 0 var(--sp-3); }
#teaser .post-body:last-child { margin-bottom: 0; }
#teaser .post .gwrap { margin: var(--sp-3) 0 0; }
@media (prefers-reduced-motion: no-preference) {
  #teaser .post[open] > .post-full { animation: post-open var(--dur) ease; }
}
@keyframes post-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Galleries — feature grid, tile grid, forge roster (shared card tokens) */
#teaser .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-2); }
#teaser .gallery figure {
  margin: 0; border: 1px solid var(--edge); border-radius: var(--r-md); overflow: hidden; background: var(--surface);
  transition: border-color var(--dur), transform var(--dur), box-shadow var(--dur);
}
#teaser .gallery figure:hover { border-color: var(--cyan-deep); transform: translateY(-3px); box-shadow: var(--shadow-2), var(--ring); }
#teaser .gallery img { width: 100%; height: 128px; object-fit: cover; display: block; background: var(--surface); }
#teaser .gallery figcaption { padding: 9px 11px; font-size: var(--fs-data); line-height: 1.45; color: var(--text-dim); }

#teaser .fullgal { margin: 0 0 var(--sp-2); }
#teaser .fullgal figure img, #teaser .forge-card img { cursor: zoom-in; }
#teaser .gcat { color: var(--cyan); font: 600 var(--fs-sm)/1.3 var(--display); letter-spacing: .18em; text-transform: uppercase; margin: var(--sp-4) 0 9px; }
#teaser .gwrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-2); }
#teaser .gwrap figure {
  margin: 0; border: 1px solid var(--edge); border-radius: var(--r-sm); overflow: hidden; background: var(--surface);
  transition: border-color var(--dur-fast), transform var(--dur-fast);
}
#teaser .gwrap figure:hover { border-color: var(--cyan-deep); transform: translateY(-2px); }
#teaser .gwrap img { width: 100%; height: 96px; object-fit: cover; display: block; }
#teaser .post .gwrap figure:has(img[src$=".svg"]) { grid-column: 1 / -1; }
#teaser .post .gwrap img[src$=".svg"] { height: auto; object-fit: contain; }
#teaser .gwrap figcaption { padding: 6px 8px; font-size: var(--fs-micro); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* In-engine clip players in dev-blog posts (clip-player.js): full-width 16:9, poster until play. */
#teaser .post-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--sp-3); margin: var(--sp-3) 0 0; }
#teaser .post-clips figure { margin: 0; border: 1px solid var(--edge); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
#teaser .post-clips video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
#teaser .post-clips figcaption { padding: 6px 8px; font-size: var(--fs-micro); color: var(--text-dim); }

#teaser .rnd-variants { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); margin: 0 0 var(--sp-3); }
#teaser .rnd-variants figure { margin: 0; border: 1px solid var(--edge); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
#teaser .rnd-variants img { display: block; width: 100%; height: auto; cursor: zoom-in; }
#teaser .rnd-variants figcaption { padding: 7px 8px; color: var(--text-dim); font-size: var(--fs-micro); }
@media (max-width: 720px) { #teaser .rnd-variants { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Archive expander */
#teaser .archive {
  border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--archive-bg);
  padding: 0 var(--sp-4); margin: 0 0 var(--sp-2); transition: border-color var(--dur);
}
#teaser .archive:hover { border-color: var(--cyan-deep); }
#teaser .archive > summary { cursor: pointer; color: var(--text-dim); font-size: var(--fs-body); line-height: 1.55; padding: 15px 4px; list-style: revert; }
#teaser .archive > summary::-webkit-details-marker { color: var(--cyan); }
#teaser .archive > summary:hover { color: var(--ink-hi); }
#teaser .archive[open] > summary { border-bottom: 1px solid var(--edge-soft); margin-bottom: var(--sp-2); }

/* Status columns (status.json) + the "how we're improving" board */
#teaser .status { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--sp-4); margin: 0 0 var(--sp-2); }

.replacement-board {
  position: relative;
  margin: var(--sp-6) 0;
  padding: clamp(1.4rem, 4vw, 3.2rem);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cyan) 55%, transparent);
  background: linear-gradient(112deg, rgba(2, 15, 22, .96), rgba(13, 24, 31, .9));
  box-shadow: inset 5px 0 0 var(--cyan), 0 24px 70px rgba(0, 0, 0, .34);
}
.replacement-board::after {
  content: "REBUILD";
  position: absolute;
  right: -1.2rem;
  bottom: -2.1rem;
  color: rgba(86, 231, 255, .055);
  font: 700 clamp(4rem, 14vw, 10rem)/1 "Chakra Petch", sans-serif;
  letter-spacing: -.08em;
  pointer-events: none;
}
.replacement-kicker,
.replacement-next span {
  color: var(--cyan);
  font: 600 .8rem/1.4 "IBM Plex Mono", monospace;
  letter-spacing: .18em;
}
.replacement-board h2 {
  max-width: 19ch;
  margin: .7rem 0 1rem;
  color: var(--text);
  font: 700 clamp(1.9rem, 5vw, 3.8rem)/.98 "Chakra Petch", sans-serif;
}
.replacement-board > p { max-width: 78ch; color: var(--text-dim); }
.replacement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 1px;
  margin: 1.8rem 0;
  background: rgba(86, 231, 255, .2);
}
.replacement-grid div { padding: 1rem; background: #071117; }
.replacement-grid strong { display: block; color: var(--text); font: 700 2rem/1 "Chakra Petch", sans-serif; }
.replacement-grid span { color: var(--text-dim); font: 500 .78rem/1.35 "IBM Plex Mono", monospace; text-transform: uppercase; }
.replacement-next { padding-top: 1rem; border-top: 1px solid rgba(86, 231, 255, .2); }
.replacement-next span { margin-right: .7rem; }
.replacement-empty {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px dashed rgba(86, 231, 255, .35);
  background: repeating-linear-gradient(-45deg, rgba(86, 231, 255, .025) 0 8px, transparent 8px 16px);
}
.replacement-empty p { max-width: 78ch; color: var(--text-dim); }
#teaser .col { position: relative; border: 1px solid var(--edge); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-4) var(--sp-3); background: var(--panel); overflow: hidden; }
#teaser .col::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px; opacity: .85; }
#teaser .live::before { background: var(--live); box-shadow: 0 0 12px rgba(111,227,160,.5); }
#teaser .wip::before  { background: var(--wip);  box-shadow: 0 0 12px rgba(245,185,106,.5); }
#teaser .plan::before { background: var(--plan); box-shadow: 0 0 12px rgba(183,156,245,.5); }
#teaser .col h3 { margin: 0 0 10px; font: 600 var(--fs-base)/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
#teaser .live h3 { color: var(--live); }
#teaser .wip h3 { color: var(--wip); }
#teaser .plan h3 { color: var(--plan); }
#teaser .col ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: var(--fs-data); line-height: 1.72; }
#teaser .col li::marker { color: var(--cyan-deep); }

/* Build log timeline */
#teaser .devlog { list-style: none; margin: 0 0 var(--sp-2); padding: 0; }
#teaser .devlog li { display: flex; gap: var(--sp-3); padding: 10px 0; border-bottom: 1px solid var(--edge-soft); font-size: var(--fs-data); color: var(--text-2); line-height: 1.58; }
#teaser .devlog time { color: var(--cyan); flex: 0 0 52px; font: 500 var(--fs-sm)/1.4 var(--display); letter-spacing: .04em; padding-top: 1px; }

/* Concept-match scoreboard — diagnostic render-vs-concept evidence (concept-match-scores.json) */
#teaser #cms-scoreboard { margin: 0 0 var(--sp-2); }
#teaser .cms-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; color: var(--text-dim); font-size: var(--fs-data); margin: -4px 0 var(--sp-3); }
#teaser .cms-meta strong { color: var(--cyan); }
#teaser .cms-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--panel); }
#teaser table.cms { width: 100%; border-collapse: collapse; font: var(--fs-data)/1.4 var(--mono); min-width: 560px; }
#teaser table.cms th, #teaser table.cms td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--edge-soft); white-space: nowrap; vertical-align: middle; }
#teaser table.cms tbody tr:last-child td { border-bottom: 0; }
#teaser table.cms thead th { color: var(--cyan); font: 600 var(--fs-micro)/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; position: sticky; top: 0; background: var(--panel-solid); }
#teaser table.cms tbody tr:hover { background: var(--row-hover); }
#teaser .cms-thumbs { display: flex; gap: 6px; }
#teaser .cms-thumbs img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--edge); background: var(--surface); display: block; }
#teaser .cms-thumbs .cms-noimg { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 6px; border: 1px dashed var(--edge); color: var(--text-mute); }
#teaser .cms-name { color: var(--ink-hi); }
#teaser .cms-kind { color: var(--text-mute); font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: .08em; }
#teaser td.cms-metric { font-variant-numeric: tabular-nums; }
#teaser td.cms-metric.pass { color: var(--green); }
#teaser td.cms-metric.fail { color: var(--fail); }
#teaser td.cms-metric.pending { color: var(--amber); }
#teaser .cms-badge { display: inline-block; font: 700 12px/1 var(--display); letter-spacing: .1em; padding: 4px 8px; border-radius: var(--r-xs); }
#teaser .cms-badge.pass { color: var(--on-accent); background: var(--green); }
#teaser .cms-badge.fail { color: #fff; background: #c0392b; }
#teaser .cms-badge.pending { color: var(--on-accent); background: var(--amber); line-height: 1.25; }

/* Character-motion CTA */
#motion-cta {
  display: block; position: relative; margin: 0 0 var(--sp-5); border: 1px solid var(--edge);
  border-radius: var(--r-lg); overflow: hidden; text-decoration: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
#motion-cta:hover { border-color: var(--cyan); box-shadow: var(--ring), var(--shadow-2); }
#motion-cta img { display: block; width: 100%; height: auto; }
#motion-cta .motion-play {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  padding: 10px 20px; background: rgba(5,8,16,.86); border: 1px solid var(--cyan); border-radius: var(--r-sm);
  color: var(--cyan); letter-spacing: .06em; font-size: var(--fs-base); white-space: nowrap; backdrop-filter: blur(3px);
  transition: background var(--dur), color var(--dur);
}
#motion-cta:hover .motion-play { background: var(--cyan); color: var(--on-accent); }

/* Launch CTA — the one loud button on the page */
#enter-sim {
  display: inline-block; position: relative; background: linear-gradient(180deg, #124a6e, #0b2b45);
  color: #eaf7ff; border: 1px solid var(--cyan-deep); border-radius: var(--r-lg); padding: 15px 26px; cursor: pointer;
  font: 600 15px/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 10px 34px rgba(20,80,120,.45), inset 0 1px 0 rgba(120,224,251,.25);
  transition: transform var(--dur-fast), box-shadow var(--dur), background var(--dur);
}
#enter-sim:hover { background: linear-gradient(180deg, #1a5f8c, #0f3a5c); transform: translateY(-2px); box-shadow: 0 16px 44px rgba(30,110,160,.55), var(--ring), inset 0 1px 0 rgba(120,224,251,.35); }
#enter-sim:active { transform: translateY(0); }
#teaser .foot { color: var(--text-mute); font-size: var(--fs-sm); margin: var(--sp-5) 0 0; line-height: 1.6; }

/* Lightbox, review-flag overlay and stats modal live in landing-overlays.css. */

/* ── 6. One orchestrated load reveal (reduced-motion aware) ────────────────── */
@media (prefers-reduced-motion: no-preference) {
  #teaser-scroll > header, #teaser-scroll > .lede,
  #teaser-scroll > .sec:first-of-type, #teaser-scroll > .hero:first-of-type {
    animation: teaser-rise var(--dur-slow) var(--ease) both;
  }
  #teaser-scroll > .lede { animation-delay: .08s; }
  #teaser-scroll > .sec:first-of-type { animation-delay: .16s; }
  #teaser-scroll > .hero:first-of-type { animation-delay: .24s; }
}
@keyframes teaser-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Narrow-screen refinements (mobile-first base already flows; these tune) ── */
@media (max-width: 480px) {
  #teaser .gallery { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  #teaser .gwrap { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  #teaser .sec { letter-spacing: .18em; }
}

/* Prism rollout (docs/web-prism-swap): the landing hero video and the per-class count table. */
.landing-hero { margin: 1.2rem 0 1.4rem; }
.landing-hero img { display: block; width: 100%; height: auto; }
.landing-hero video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #05070b;
  border: 1px solid var(--edge, #163049); border-radius: 12px; }
.landing-hero figcaption { margin-top: .5rem; color: var(--text-dim); font-size: .85rem; }
.prism-table { width: 100%; margin: 1rem 0 0; border-collapse: collapse; font: 500 .85rem/1.4 "IBM Plex Mono", monospace; }
.prism-table caption { text-align: left; color: var(--text-dim); padding-bottom: .4rem; }
.prism-table th, .prism-table td { padding: .35rem .5rem; border-bottom: 1px solid rgba(95, 212, 245, .12); text-align: right; }
.prism-table th[scope="row"], .prism-table thead th:first-child { text-align: left; text-transform: capitalize; }
#teaser .prism-gallery img { height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #05070b; }
#teaser .prism-gallery figcaption .tag { margin-left: .35rem; }
