/* ═══════════════════════════════════════════════════════════════════
   MABEL — shared design system · "ISSUE Nº 01"
   NYC Art Deco × golden-age comic book.
   Aged newsprint, Gotham-navy night, printed vermillion, deco brass.
   Limelight (marquee display) · Bangers (action lettering) ·
   Archivo (body) · Space Mono (captions, figures, code).
   Used by index.html + all subsystem pages.
═══════════════════════════════════════════════════════════════════ */

/* ─── Reset & root ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { overflow-x: hidden; }

:root {
  /* aged comic newsprint */
  --bone:        #F4EAD2;
  --paper:       #ECDFBC;
  --paper-2:     #E0D0A6;
  --panel:       #FDF6E2;   /* the white of a comic panel */
  /* Gotham night */
  --ink:         #151820;
  --ink-soft:    #2A2E3A;
  --ash:         #6D6551;
  --ash-light:   #A99F87;
  /* ── printed colour ──────────────────────────────────────────────────
     THREE voices, and every element on the site picks one of them:

       --hi    the HIGHLIGHT. A warm comic red. Primary buttons, live links,
               accents, the letter that starts a lede. It replaced an apple
               orange; a warmer red sits better against the newsprint and
               reads as ink rather than as a highlighter.
       --pop   the SHOUT. Saturated cab yellow, and there is at most one of
               these in view — the BUILD ONE NOW! star. If two things shout,
               neither does.
       --rust  the DEEP voice. Bursts, seals, error states, the hover of --hi.

     Everything else is support: --yellow narrates (step cards, panel notes),
     --blue and --green label, --gold is deco brass on dark sections.
     Full guidance: STYLE.md. */
  --hi:          #E4442A;   /* warm comic red — THE highlight */
  --hi-deep:     #B92E17;   /* its hover / its shadow */
  --pop:         #FFCE0A;   /* saturated cab yellow — the one thing that shouts */
  --pop-deep:    #E0A800;
  /* `--orange` is kept as an alias so nothing has to be renamed in one pass;
     new code should say --hi. */
  --orange:      #E4442A;
  --orange-dim:  #B92E17;
  --yellow:      #F2C94C;   /* NYC taxi yellow — narration, step cards */
  --nyc:         #FFCE0A;   /* alias of --pop */
  --rust:        #C6301A;   /* vermillion — the LOUD voice: bursts, seals */
  --rust-dim:    #93220F;
  --clay:        #8B5A3C;
  --gold:        #D9A13F;   /* deco brass */
  --gold-deep:   #B77E1E;
  --blue:        #23577E;   /* process blue */
  --green:       #2E7D4F;   /* pub tag green, tuned to print */

  --font-display: 'Limelight', 'Arial Narrow', 'Impact', sans-serif;
  --font-comic:   'Bangers', 'Arial Black', 'Impact', sans-serif;
  --font-head:    'Jost', -apple-system, 'Helvetica Neue', sans-serif;
  --font-sans:    'Jost', -apple-system, 'Helvetica Neue', sans-serif;
  --font-mono:    'Space Mono', 'SFMono-Regular', Menlo, monospace;

  --max:    1320px;
  --max-narrow: 920px;
  --gutter: clamp(20px, 4vw, 56px);

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
  --spring:      cubic-bezier(0.34, 1.56, 0.64, 1);   /* overshoot — snap */

  /* Comic-panel recipe: what used to be liquid glass is now flat print.
     Solid panel fills, ink line-work, hard offset shadows — every
     component that consumed the --glass-* tokens re-themes through here. */
  --line-w:       2px;
  --glass-blur:   none;
  --glass-bg:     var(--panel);
  --glass-bg-2:   #FFFDF0;                       /* hover / denser */
  --glass-border: rgba(21, 24, 32, 0.85);
  --glass-hi:     inset 0 0 0 0 transparent;
  --glass-sh:     6px 6px 0 rgba(21, 24, 32, 0.9);
  /* Dark-surface variant — night panels with brass line-work */
  --glass-bg-d:     rgba(253, 246, 226, 0.045);
  --glass-bg-d-2:   rgba(253, 246, 226, 0.09);
  --glass-border-d: rgba(217, 161, 63, 0.5);
  --glass-hi-d:     inset 0 0 0 0 transparent;
  --glass-sh-d:     6px 6px 0 rgba(0, 0, 0, 0.6);

  /* Halftone dot screens (comic print texture) */
  --dots-ink:  radial-gradient(rgba(21,24,32,0.13) 1px, transparent 1.6px);
  --dots-red:  radial-gradient(rgba(198,48,26,0.16) 1px, transparent 1.6px);
  --dots-gold: radial-gradient(rgba(217,161,63,0.20) 1px, transparent 1.6px);
  --dots-cream: radial-gradient(rgba(244,234,210,0.10) 1px, transparent 1.6px);
}

body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.58;
  letter-spacing: 0.004em;
}
::selection { background: var(--orange); color: #FFF9F0; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }

/* ─── Typography scale — deco marquee display ─────────────────────── */
.display-xl { font-family: var(--font-display); font-weight: 400; font-size: clamp(64px, 12vw, 190px); line-height: 0.95; letter-spacing: 0.01em; }
.display-lg { font-family: var(--font-display); font-weight: 400; font-size: clamp(46px, 7vw, 104px); line-height: 1.0; letter-spacing: 0.01em; }
.display-md { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4.4vw, 64px); line-height: 1.06; letter-spacing: 0.01em; }
.display-sm { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 2.8vw, 38px); line-height: 1.14; letter-spacing: 0.01em; }
/* Limelight has no italic — inside display type, .italic reads as the
   marquee's lit-up word instead: upright + vermillion. */
.italic { font-style: italic; }
.display-xl .italic, .display-lg .italic, .display-md .italic, .display-sm .italic {
  font-style: normal; color: var(--orange);
}
.dark-sec .display-xl .italic, .dark-sec .display-lg .italic,
.dark-sec .display-md .italic, .dark-sec .display-sm .italic,
.page-hero .display-xl .italic, .page-hero .display-lg .italic,
.page-hero .display-md .italic { color: var(--gold); }
.accent { color: var(--orange); }

/* kickers become action lettering */
.eyebrow {
  font-family: var(--font-comic); font-size: clamp(15px, 1.3vw, 18px); text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--orange); font-weight: 400;
}
.lede { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-soft); letter-spacing: -0.008em; max-width: 58ch; }
.body-lg { font-size: clamp(16px, 1.15vw, 18px); line-height: 1.65; color: var(--ink-soft); }
.body { font-size: 16px; line-height: 1.72; color: var(--ink-soft); }

/* ─── Layout primitives ───────────────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; }
.pad-y { padding: clamp(56px, 8vh, 96px) 0; }
.pad-y-sm { padding: clamp(40px, 6vh, 68px) 0; }
/* deco rule: double line with a center diamond */
.divider { height: 7px; width: 100%; position: relative; background:
  linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 2px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 1px no-repeat; opacity: 0.85; }
.divider::after { content: '◆'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%);
  font-size: 11px; line-height: 1; color: var(--rust); background: inherit; padding: 0 10px;
  background: var(--bone); }
.soft-sec .divider::after { background: var(--paper); }

/* night sections: Gotham navy with a faint cream halftone screen and a
   brass double-rule across the top edge */
.dark-sec { background: var(--ink); color: var(--bone); position: relative; }
.dark-sec::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; pointer-events: none;
  background:
    linear-gradient(var(--gold), var(--gold)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 5px / 100% 1px no-repeat;
  opacity: 0.75; }
.dark-sec::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--dots-cream); background-size: 22px 22px; opacity: 0.28;
  mask-image: radial-gradient(ellipse at 50% 0%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 10%, transparent 70%); }
.dark-sec > * { position: relative; z-index: 1; }
.dark-sec .lede, .dark-sec .body, .dark-sec .body-lg { color: var(--ash-light); }
.dark-sec .eyebrow { color: var(--gold); }
.soft-sec { background: var(--paper); }

/* ─── Progress bar ────────────────────────────────────────────────── */
#progress { position: fixed; top: 0; left: 0; width: 0%; height: 3px; background: var(--orange); z-index: 9999; transition: width 0.1s linear; box-shadow: 0 1px 0 rgba(21,24,32,0.4); }

/* ─── Nav — a floating masthead sticker: solid print, ink line, hard shadow ── */
.nav {
  position: fixed; z-index: 100; top: 12px;
  left: 50%; transform: translateX(-50%);
  width: -moz-fit-content;
  width: fit-content;
  max-width: min(calc(100% - 20px), var(--max));
  padding: 8px 16px;
  gap: clamp(16px, 3vw, 38px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--panel);
  border: var(--line-w) solid var(--ink);
  box-shadow: 4px 4px 0 rgba(21, 24, 32, 0.9);
  transition: box-shadow 0.35s var(--ease-out), top 0.35s var(--ease-out);
}
.nav.scrolled { top: 8px; box-shadow: 5px 6px 0 rgba(21, 24, 32, 0.9); }
.nav-logo {
  font-family: var(--font-display); font-size: 21px; letter-spacing: 0.04em;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px;
  margin-right: clamp(10px, 2vw, 22px);   /* keep the wordmark clear of the first nav item */
}
/* the marquee bulb */
.nav-logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); border: 1.5px solid var(--ink); display: inline-block; animation: pulse 2.4s ease-in-out infinite; box-shadow: 0 0 0 3px rgba(198,48,26,0.18); }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.65; } }
.nav-links { display: flex; gap: 2px; font-size: 13.5px; font-weight: 600; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; opacity: 0.72; transition: opacity 0.2s ease, background 0.3s var(--ease-out), color 0.2s ease; padding: 7px 12px; border-radius: 8px; white-space: nowrap; }
.nav-links a:hover { opacity: 1; background: rgba(21, 24, 32, 0.07); }
.nav-links a.on { opacity: 1; background: var(--ink); color: var(--bone); }
.nav-links a.ext { color: var(--orange); opacity: 1; font-weight: 700; }
.nav-links a.ext:hover { opacity: 1; background: rgba(198, 48, 26, 0.12); }


/* hamburger / mobile */
.hbg { display: none; width: 38px; height: 38px; border: none; background: none; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 12px; }
.hbg span { display: block; width: 20px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease-out); }
.mob {
  display: none; position: fixed; top: 8px; left: 10px; right: 10px; z-index: 95;
  background: var(--panel);
  border: var(--line-w) solid var(--ink);
  border-radius: 12px;
  padding: 62px 14px 12px;
  box-shadow: 6px 6px 0 rgba(21, 24, 32, 0.9);
  transform: translateY(calc(-100% - 22px)); transition: transform 0.4s var(--ease-out);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.mob a { display: block; padding: 8px 8px; font-size: 14.5px; font-weight: 600; color: var(--ink); text-decoration: none; border-radius: 8px; }
.mob a.ext { color: var(--rust); margin-top: 4px; }
.mob-grp { display: block; padding: 12px 8px 3px; font-family: var(--font-comic); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); font-weight: 400; }
.mob a.sub { padding: 6px 8px 6px 18px; font-size: 13px; font-weight: 400; opacity: 0.82; }
/* The bar is 1245 px at full size. Below 1500 px it tightens (smaller type,
   closer items) so the store dock at the top right has room; below 1400 px it
   hugs the left edge instead of centring; below 1260 px the burger takes over.
   scripts/navfit.py measures all three. */
@media (max-width: 1500px) {
  .nav { gap: 14px; padding: 8px 12px; }
  .nav-logo { margin-right: 18px; font-size: 20px; }   /* Limelight overhangs its box; less than this and the wordmark paints over the first link */
  .nav-links { font-size: 13px; gap: 0; }
  .nav-links a, .nav-grp-btn { padding: 7px 8px; font-size: 13px; }
  .nav-cta { font-size: 13px; padding: 6px 10px 5px !important; }
}
@media (max-width: 1400px) {
  .nav { left: 12px; transform: none; max-width: calc(100% - 140px); }
}
@media (max-width: 1260px) {
  .nav { left: 50%; transform: translateX(-50%); max-width: min(calc(100% - 20px), var(--max)); }
  .nav-links { display: none; } .hbg { display: flex; } .mob { display: block; }
  /* mobile: full-width bar again so the logo sits left and the burger sits right */
  .nav {
    width: min(calc(100% - 20px), var(--max));
    justify-content: space-between; gap: 0;
    padding: 10px 14px 10px 22px;
  }
}

/* ── Dropdown nav groups ── */
.nav-group { position: relative; display: inline-flex; }
.nav-grp-btn { font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); opacity: 0.72; background: none; border: none; cursor: pointer; padding: 7px 12px; border-radius: 8px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; transition: opacity 0.2s ease, background 0.3s var(--ease-out); }
.nav-grp-btn:hover { opacity: 1; background: rgba(21,24,32,0.07); }
.nav-group.on .nav-grp-btn { opacity: 1; background: var(--ink); color: var(--bone); }
.nav-caret { font-size: 9px; opacity: 0.7; transition: transform 0.25s var(--ease-out); }
.nav-group:hover .nav-caret, .nav-group.open .nav-caret { transform: rotate(180deg); }
.nav-menu { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(6px); min-width: 218px; display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--panel); border: var(--line-w) solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 rgba(21,24,32,0.9); opacity: 0; visibility: hidden; transition: opacity 0.2s ease, transform 0.22s var(--ease-out); z-index: 200; }
.nav-group:hover .nav-menu, .nav-group.open .nav-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-menu a { padding: 9px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink); opacity: 0.85; white-space: nowrap; text-decoration: none; transition: opacity 0.15s, background 0.15s; }
.nav-menu a:hover { opacity: 1; background: rgba(21,24,32,0.07); }
.nav-menu a.on { opacity: 1; background: rgba(198,48,26,0.12); color: var(--rust); }
/* invisible bridge so moving from the button to the menu doesn't drop :hover */
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 16px; }

/* ── Left in-section sidebar ── */
.sidenav { display: none; }
.sidenav-title { font-family: var(--font-comic); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); font-weight: 400; padding: 2px 12px 12px; }
.sidenav a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--ink); opacity: 0.7; text-decoration: none; transition: opacity 0.15s, background 0.15s; white-space: nowrap; }
.sidenav a:hover { opacity: 1; background: rgba(21,24,32,0.06); }
.sidenav a.on { opacity: 1; color: var(--rust); background: rgba(198,48,26,0.10); font-weight: 600; }
@media (min-width: 1780px) {
  /* floating index card. Only shown when the viewport leaves a genuinely
     free left column beside the 1320px content wrap — the old translucent
     glass card could overlay text; solid print can't. */
  .sidenav {
    display: flex; flex-direction: column; gap: 1px;
    position: fixed; top: 50%; left: 22px; transform: translateY(-50%);
    width: 192px; z-index: 95;
    max-height: calc(100vh - 140px); overflow-y: auto;
    padding: 14px 10px;
    background: var(--panel);
    border: var(--line-w) solid var(--ink);
    border-radius: 14px;
    box-shadow: 5px 5px 0 rgba(21,24,32,0.9);
  }
}

/* ─── Buttons — action lettering, ink line, hard shadow ───────────── */
.btn {
  font-family: var(--font-comic); font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 11px 22px 10px; border-radius: 10px; text-decoration: none; position: relative;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s var(--ease-out);
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  border: var(--line-w) solid var(--ink); white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); }
/* primary — vermillion plate */
/* ONE button recipe, three roles. Primary carries the highlight, ghost is
   the paper itself, and the shout (.nav-build) is the only --pop on a page.
   Every other button on the site — .cl-btn, .hs-more, .wt-btn, .tl-reset,
   .hs-arrow — inherits these colours through the tokens rather than naming
   its own, so "make the buttons consistent" is one edit and not thirty. */
.btn-primary { background: var(--hi); color: #FFF9F0; box-shadow: 4px 4px 0 rgba(21,24,32,0.9); }
.btn-primary:hover { background: var(--hi-deep); color: #FFF9F0; box-shadow: 6px 6px 0 rgba(21,24,32,0.9); }
/* ghost — paper plate */
.btn-ghost {
  color: var(--ink); background: var(--panel); border-color: var(--ink);
  box-shadow: 4px 4px 0 rgba(21,24,32,0.9);
}
.btn-ghost:hover { background: #FFFDF0; box-shadow: 6px 6px 0 rgba(21,24,32,0.9); }
/* on dark backgrounds — brass line-work, gold plate primary */
.dark-sec .btn-primary, .page-hero .btn-primary { background: var(--pop); color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,0.85); }
.dark-sec .btn-primary:hover, .page-hero .btn-primary:hover { background: var(--hi); color: #FFF6E4; box-shadow: 6px 6px 0 rgba(0,0,0,0.85); }
.dark-sec .btn-ghost, .page-hero .btn-ghost {
  color: var(--bone); background: transparent; border-color: rgba(217,161,63,0.75);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.85);
}
.dark-sec .btn-ghost:hover, .page-hero .btn-ghost:hover { background: rgba(253,246,226,0.08); border-color: var(--gold); box-shadow: 6px 6px 0 rgba(0,0,0,0.85); }

/* ─── Section header ──────────────────────────────────────────────── */
.sec-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 90px); align-items: end; margin-bottom: clamp(30px, 4.5vh, 52px); }
@media (max-width: 880px) { .sec-head { grid-template-columns: 1fr; gap: 22px; } }
.sec-head .eyebrow { margin-bottom: 16px; display: block; }
.sec-head .title { margin-bottom: 0; }
.sec-head-center { text-align: center; max-width: 720px; margin: 0 auto clamp(28px, 4vh, 48px); }
.sec-head-center .eyebrow { display: block; margin-bottom: 16px; }

/* ─── Hero: home — the Issue Nº 01 cover ──────────────────────────── */
.hero-home {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--gutter) clamp(56px, 9vh, 100px);
  background: linear-gradient(180deg, var(--paper) 0%, var(--bone) 70%);
  position: relative; overflow: hidden;
}
/* deco sunburst radiating from behind the wordmark */
.hero-home::before {
  content: ''; position: absolute; inset: -20%;
  background: repeating-conic-gradient(from 0deg at 38% 78%,
    rgba(198,48,26,0.07) 0deg 5deg, transparent 5deg 12deg);
  mask-image: radial-gradient(ellipse at 38% 78%, black 15%, transparent 62%);
  -webkit-mask-image: radial-gradient(ellipse at 38% 78%, black 15%, transparent 62%);
}
/* halftone screen over the burst */
.hero-home::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--dots-ink); background-size: 22px 22px; opacity: 0.4;
  mask-image: radial-gradient(ellipse at 62% 30%, black 12%, transparent 66%);
  -webkit-mask-image: radial-gradient(ellipse at 62% 30%, black 12%, transparent 66%);
}
.hero-home-inner { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; width: 100%; }
.hero-eyebrow { display: inline-block; margin-bottom: 22px; }
.hero-title { margin-bottom: 26px; text-shadow: 5px 5px 0 rgba(21,24,32,0.12); }
.hero-title .line { display: block; }
.hero-sub { font-family: var(--font-comic); font-size: clamp(26px, 3.6vw, 52px); line-height: 1.05; color: var(--ink-soft); letter-spacing: 0.03em; }
.hero-tag { font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-soft); max-width: 52ch; line-height: 1.5; margin-bottom: 14px; }
.hero-authors { font-family: var(--font-mono); font-size: 12px; color: var(--ash); letter-spacing: 0.04em; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
/* The build CTA gets its own line and its own size: it is the one thing on
   the home page a reader is meant to DO, and sitting fourth in a row of four
   equal buttons it read as a footnote to "GitHub". Not --pop, though — the
   nav starburst is the single --pop on this screen and stays that way. */
.hero-build { margin-top: 14px; }
.btn-xl { font-size: 21px; letter-spacing: 0.09em; padding: 17px 34px 15px;
  border-radius: 13px; border-width: 3px; box-shadow: 6px 6px 0 var(--ink); }
.btn-xl:hover { box-shadow: 9px 9px 0 var(--ink); }
@media (max-width: 560px) {
  .btn-xl { font-size: 18px; padding: 14px 24px 12px; }
}
.hero-coord-row { position: absolute; top: clamp(80px, 12vh, 120px); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; z-index: 2; gap: 24px; }
.hero-coord { font-family: var(--font-mono); font-size: 11px; color: var(--ash); letter-spacing: 0.04em; line-height: 1.7; }
.hero-coord b { color: var(--ink-soft); font-weight: 700; }
.hero-coord.r { text-align: right; }
@media (max-width: 600px) { .hero-coord-row { display: none; } }

/* ─── Hero: subsystem pages — deco night marquee ──────────────────── */
.page-hero {
  background: linear-gradient(180deg, #1B2030 0%, var(--ink) 100%);
  color: var(--bone);
  padding: clamp(104px, 15vh, 150px) var(--gutter) clamp(44px, 7vh, 72px);
  position: relative; overflow: hidden;
}
/* brass sunburst out of the bottom-left, screened with halftone */
.page-hero::before {
  content: ''; position: absolute; inset: -30% -10%;
  background: repeating-conic-gradient(from 0deg at 18% 100%,
    rgba(217,161,63,0.08) 0deg 4deg, transparent 4deg 11deg);
  mask-image: radial-gradient(ellipse at 18% 100%, black 12%, transparent 58%);
  -webkit-mask-image: radial-gradient(ellipse at 18% 100%, black 12%, transparent 58%);
}
.page-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--dots-cream); background-size: 20px 20px; opacity: 0.35;
  mask-image: radial-gradient(ellipse at 78% 20%, black 10%, transparent 62%);
  -webkit-mask-image: radial-gradient(ellipse at 78% 20%, black 10%, transparent 62%);
}
.page-hero-inner { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; }
.page-hero .eyebrow { color: var(--gold); display: block; margin-bottom: 18px; }
.page-hero h1 { color: var(--bone); margin-bottom: 22px; text-shadow: 4px 4px 0 rgba(0,0,0,0.55); }
.page-hero .lede { color: var(--ash-light); }
.page-hero .crumbs { font-family: var(--font-mono); font-size: 11px; color: var(--ash-light); letter-spacing: 0.1em; margin-bottom: 28px; text-transform: uppercase; }
.page-hero .crumbs a { color: var(--ash-light); text-decoration: none; }
.page-hero .crumbs a:hover { color: var(--gold); }

/* ─── Stats strip ─────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; } }
.stat { border-top: 3px solid var(--ink); padding-top: 20px; position: relative; }
.stat::before { content: ''; position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: var(--ink); opacity: 0.8; }
.dark-sec .stat { border-top-color: var(--gold); }
.dark-sec .stat::before { background: var(--gold); }
.stat-num { font-family: var(--font-display); font-size: clamp(44px, 5.6vw, 84px); line-height: 1; letter-spacing: 0.01em; margin-bottom: 12px; display: flex; align-items: baseline; color: var(--rust); }
.dark-sec .stat-num { color: var(--gold); }
.stat-num .unit { font-family: var(--font-comic); font-size: 0.34em; color: var(--ash); margin-left: 8px; letter-spacing: 0.06em; }
.dark-sec .stat-num .unit { color: var(--ash-light); }
.stat-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ash); line-height: 1.5; }
.dark-sec .stat-label { color: var(--ash-light); }

/* ─── Contribution grid ───────────────────────────────────────────── */
.contrib-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .contrib-grid { grid-template-columns: 1fr; } }
.contrib-cell {
  background: var(--glass-bg);
  border: var(--line-w) solid var(--ink); border-radius: 12px; padding: 22px 20px;
  box-shadow: var(--glass-sh);
  transition: background 0.45s var(--ease-out), transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.contrib-cell:hover { background: var(--glass-bg-2); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(21,24,32,0.9); }
.contrib-cell h3 { font-family: var(--font-head); font-weight: 700; font-size: clamp(19px, 1.7vw, 24px); letter-spacing: -0.02em; margin-bottom: 10px; }
.contrib-cell p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* ─── Resource / navigation cards (link to subpages) ──────────────── */
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .res-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .res-grid { grid-template-columns: 1fr; } }
.res-card {
  background: var(--glass-bg);
  border: var(--line-w) solid var(--ink); border-radius: 12px;
  padding: 28px 26px; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  min-height: 200px; box-shadow: var(--glass-sh);
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out), background 0.3s ease;
}
.res-card:hover { background: var(--glass-bg-2); box-shadow: 9px 9px 0 rgba(21,24,32,0.9); transform: translate(-3px, -3px); }
.res-tag { font-family: var(--font-comic); font-size: 14px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
.res-card h3 { font-family: var(--font-head); font-weight: 700; font-size: clamp(20px, 1.9vw, 26px); letter-spacing: -0.02em; margin-bottom: 10px; line-height: 1.1; }
.res-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; flex: 1; }
.res-arrow { font-family: var(--font-comic); font-size: 14px; color: var(--rust); margin-top: 18px; text-transform: uppercase; letter-spacing: 0.1em; transition: transform 0.3s var(--ease-out); }
.res-card:hover .res-arrow { transform: translateX(5px); }

/* ─── Demo tabs — action lettering with a brass baseline ──────────── */
.tab-bar { display: flex; gap: 2px; border-bottom: 2px solid rgba(217,161,63,0.5); margin-bottom: 26px; overflow-x: auto; scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0; padding: 11px 18px 9px; font-family: var(--font-comic); font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(244,234,210,0.45); background: none; border: none; border-bottom: 3px solid transparent;
  margin-bottom: -2px; cursor: pointer; transition: color 0.2s, border-color 0.2s; white-space: nowrap;
}
.tab-btn.on { color: var(--gold); border-bottom-color: var(--gold); }
/* light variant */
.tab-bar.light { border-bottom-color: rgba(21,24,32,0.4); }
.tab-bar.light .tab-btn { color: var(--ash); }
.tab-bar.light .tab-btn.on { color: var(--orange); border-bottom-color: var(--orange); }
.tab-panel { display: none; }
.tab-panel.on { display: block; animation: tabIn 0.5s var(--ease-out); }
@keyframes tabIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.demo-media { border-radius: 12px; overflow: hidden; background: #0B0E15; border: var(--line-w) solid rgba(217,161,63,0.55); box-shadow: 6px 6px 0 rgba(0,0,0,0.6); }
.demo-media img, .demo-media video { width: 100%; display: block; max-height: 560px; object-fit: cover; }
.demo-caption { font-family: var(--font-mono); font-size: 11px; color: rgba(244,234,210,0.42); margin-top: 12px; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; }

/* ─── Media placeholder (drop real assets later) ──────────────────── */
.ph {
  width: 100%; height: 100%; position: relative;
  background:
    radial-gradient(ellipse at 30% 35%, rgba(198,48,26,0.08), transparent 58%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.ph.dark { background: radial-gradient(ellipse at 50% 35%, rgba(217,161,63,0.10), transparent 62%), linear-gradient(180deg, #1B2030 0%, #0B0E15 100%); }
.ph::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--dots-ink);
  background-size: 20px 20px; opacity: 0.6;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
}
.ph.dark::before { background-image: var(--dots-cream); opacity: 0.5; }
.ph-label {
  position: absolute; bottom: 16px; left: 16px;
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ash); padding: 6px 10px; border: 1.5px solid rgba(21,24,32,0.4); border-radius: 4px;
  background: rgba(244,234,210,0.8);
}
.ph.dark .ph-label { color: var(--ash-light); border-color: rgba(217,161,63,0.4); background: rgba(11,14,21,0.75); }
.media-frame { border-radius: 12px; overflow: hidden; border: var(--line-w) solid var(--ink); position: relative; box-shadow: 6px 6px 0 rgba(21,24,32,0.9); }
.media-frame.r-43 { aspect-ratio: 4 / 3; }
.media-frame.r-169 { aspect-ratio: 16 / 9; }
.media-frame.r-11 { aspect-ratio: 1 / 1; }
.media-frame.r-45 { aspect-ratio: 4 / 5; }
.media-frame > video, .media-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-frame.gui { background: #000; border-color: rgba(244,234,210,0.12); box-shadow: 0 40px 80px -40px rgba(0,0,0,0.7); }
.media-frame.gui > img { object-fit: contain; }
.gui-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
@media (max-width: 820px) { .gui-grid { grid-template-columns: 1fr; } }
/* topic / interface contract table */
.tt { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 13px; }
.tt th { text-align: left; color: var(--ash); font-weight: 600; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; padding: 0 12px 12px 0; border-bottom: 1px solid rgba(21,24,32,0.12); }
.tt td { padding: 12px 12px 12px 0; border-bottom: 1px solid rgba(21,24,32,0.07); color: var(--ink-soft); vertical-align: top; }
.tt td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.tt .pub { color: var(--green); font-weight: 700; } .tt .sub { color: var(--blue); font-weight: 700; }
.dark-sec .tt th { color: var(--ash-light); border-color: rgba(244,234,210,0.16); }
.dark-sec .tt td { color: var(--bone); border-color: rgba(244,234,210,0.10); }
.dark-sec .tt td:first-child { color: var(--bone); }
.dark-sec .tt .pub { color: #43c463; } .dark-sec .tt .sub { color: #6aa6ff; }
.dark-sec .bib { background: rgba(8,7,6,0.5); border-color: rgba(244,234,210,0.12); color: var(--bone); box-shadow: none; }
.dark-sec .bib-copy { background: rgba(244,234,210,0.14); color: var(--bone); }
.dark-sec .bib-copy:hover { background: var(--rust); }

/* anchor targets clear the fixed nav */
section[id], .sub-block[id] { scroll-margin-top: 92px; }
/* hardware subsystem blocks */
.sub-block { display: grid; grid-template-columns: 230px 1fr; gap: 34px; padding: 34px 0; border-top: 1px solid rgba(21,24,32,0.10); }
.sub-block:first-of-type { border-top: none; }
.sb-name { font-family: var(--font-display); font-size: 26px; line-height: 1.05; color: var(--ink); letter-spacing: 0.01em; }
.sb-stat { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ash); margin-top: 10px; }
.sb-body p { font-size: 15.5px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 16px; max-width: 64ch; }
@media (max-width: 760px) { .sub-block { grid-template-columns: 1fr; gap: 14px; padding: 26px 0; } }
/* iPhone app mockups */
.phone-media { display: flex; justify-content: center; align-items: center; }
.phone-shot { display: block; width: 100%; max-width: 290px; border-radius: 38px; filter: drop-shadow(0 50px 70px rgba(21,24,32,0.38)); }
.phone-row { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.phone-row .phone-shot { max-width: 208px; }
/* real device screen captures (no bezel) */
.app-shot { display: block; width: 100%; max-width: 270px; border-radius: 26px; border: 1px solid rgba(21,24,32,0.10); filter: drop-shadow(0 44px 64px rgba(21,24,32,0.34)); }
.app-row { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; align-items: flex-start; margin-top: 8px; }
.app-row .app-shot { max-width: 230px; }
/* on-brand figure (its own bg/border baked into the SVG) */
.device-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.device-card { display: flex; flex-direction: column; }
@media (max-width: 820px) { .device-grid { grid-template-columns: 1fr; } }
.arch-fig { display: block; width: 100%; border-radius: 12px; box-shadow: 0 34px 64px -40px rgba(21,24,32,0.30); }
.arch-d, .arch-m { border-radius: 12px; overflow: hidden; box-shadow: 0 34px 64px -40px rgba(21,24,32,0.30); }
.arch-d svg, .arch-m svg { width: 100%; height: auto; display: block; }
.arch-m { display: none; }
@media (max-width: 760px) { .arch-d { display: none; } .arch-m { display: block; } }
.media-frame.sim-dark { background: #0A0D14; border-color: rgba(244,234,210,0.10); }
/* caption chip over a sim clip */
.sim-cap { position: absolute; left: 14px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 7px;
  font: 500 11.5px/1 var(--mono, 'Space Mono', monospace); letter-spacing: 0.02em; color: var(--bone, #F4EAD2);
  padding: 7px 11px; border-radius: 999px; background: rgba(8,7,6,0.52); border: 1px solid rgba(244,234,210,0.16);
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); }
.sim-cap .dot { width: 6px; height: 6px; border-radius: 50%; background: #43c463; box-shadow: 0 0 0 3px rgba(67,196,99,0.22); }

/* ─── Spec pills ──────────────────────────────────────────────────── */
.spec { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.spec span {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft);
  padding: 6px 12px; border: 1px solid rgba(255,255,255,0.55); border-radius: 999px;
  background: rgba(255,255,255,0.42);
  -webkit-backdrop-filter: saturate(160%) blur(8px); backdrop-filter: saturate(160%) blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 1px 2px rgba(21,24,32,0.04);
}
.dark-sec .spec span, .page-hero .spec span {
  color: var(--ash-light); border-color: rgba(244,234,210,0.16);
  background: rgba(244,234,210,0.06); box-shadow: inset 0 1px 0 rgba(244,234,210,0.10);
}

/* ─── Feature rows (alternating media + copy) ─────────────────────── */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin-bottom: clamp(40px, 6vh, 72px); }
.feature:last-child { margin-bottom: 0; }
.feature.flip .feature-media { order: 2; }
@media (max-width: 880px) { .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; } .feature.flip .feature-media { order: 0; } }
.feature-copy .eyebrow { color: var(--rust); display: block; margin-bottom: 16px; }
.dark-sec .feature-copy .eyebrow { color: var(--gold); }
.feature-copy h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 3vw, 42px); line-height: 1.08; letter-spacing: 0.01em; margin-bottom: 18px; }
.feature-copy p { font-size: clamp(15px, 1.2vw, 17px); line-height: 1.65; color: var(--ink-soft); }
.dark-sec .feature-copy p { color: var(--ash-light); }

/* ─── Card grid (generic) ─────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 880px) { .card-grid { grid-template-columns: 1fr; } }
.dark-sec .card-grid { background: transparent; border: 0; }
.card {
  background: var(--glass-bg);
  border: var(--line-w) solid var(--ink); border-radius: 12px; padding: 24px 22px; min-height: 0;
  display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--glass-sh);
  transition: background 0.4s var(--ease-out), transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.card:hover { background: var(--glass-bg-2); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(21,24,32,0.9); }
.dark-sec .card { background: var(--glass-bg-d); border-color: var(--glass-border-d); box-shadow: var(--glass-sh-d); }
.dark-sec .card:hover { background: var(--glass-bg-d-2); box-shadow: 8px 8px 0 rgba(0,0,0,0.6); }
.card-num { font-family: var(--font-comic); font-size: 14px; color: var(--orange); letter-spacing: 0.12em; }
.dark-sec .card-num { color: var(--gold); }
.card h4 { font-family: var(--font-head); font-weight: 700; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.12; letter-spacing: -0.02em; margin: 22px 0 10px; }
.card p { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.dark-sec .card p { color: var(--ash-light); }

/* ─── Stack visualization (software) ──────────────────────────────── */
.stack-vis { border: var(--line-w) solid var(--glass-border-d); border-radius: 12px; overflow: hidden; background: var(--glass-bg-d); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-hi-d), var(--glass-sh-d); }
.stack-row { display: grid; grid-template-columns: 200px 1fr auto; align-items: center; padding: 20px 26px; border-bottom: 1px solid rgba(244,234,210,0.08); gap: 22px; transition: background 0.3s ease; }
.stack-row:last-child { border-bottom: 0; }
.stack-row:hover { background: rgba(244,234,210,0.03); }
.stack-layer { font-family: var(--font-comic); font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); }
.stack-name { font-family: var(--font-head); font-weight: 700; font-size: clamp(17px, 1.8vw, 22px); letter-spacing: -0.015em; line-height: 1.15; color: var(--bone); }
.stack-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.stack-tags span { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ash-light); padding: 5px 9px; border: 1px solid rgba(244,234,210,0.18); border-radius: 999px; }
@media (max-width: 720px) { .stack-row { grid-template-columns: 1fr; gap: 8px; } .stack-tags { justify-content: flex-start; } }

.compute-card { margin-top: 36px; border: var(--line-w) solid var(--glass-border-d); border-radius: 12px; padding: 30px; display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; background: var(--glass-bg-d); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-hi-d), var(--glass-sh-d); }
@media (max-width: 720px) { .compute-card { grid-template-columns: 1fr; } }
.compute-chip { width: 86px; height: 86px; border-radius: 14px; background: linear-gradient(135deg, #2E3448 0%, #191E2C 100%); position: relative; border: 1px solid rgba(244,234,210,0.15); display: flex; align-items: center; justify-content: center; }
.compute-chip-core { font-family: var(--font-mono); font-size: 9px; color: var(--ash-light); letter-spacing: 0.16em; transform: rotate(-90deg); white-space: nowrap; }
.compute-title { font-family: var(--font-display); font-size: clamp(24px, 2.8vw, 34px); letter-spacing: 0.01em; line-height: 1.08; color: var(--gold); }
.compute-sub { color: var(--ash-light); margin-top: 6px; font-size: 14px; }
.compute-stat { font-family: var(--font-mono); color: var(--ash-light); font-size: 12px; text-align: right; line-height: 1.7; }
.compute-stat b { color: var(--gold); font-family: var(--font-display); font-size: 24px; display: block; font-weight: 400; }

/* ─── Numbered points list ────────────────────────────────────────── */
.points { border-top: 1px solid rgba(21,24,32,0.12); }
.dark-sec .points { border-top-color: rgba(244,234,210,0.14); }
.point { display: grid; grid-template-columns: 46px 1fr; gap: 13px; padding: 14px 0; border-bottom: 1px solid rgba(21,24,32,0.12); }
.dark-sec .point { border-bottom-color: rgba(244,234,210,0.10); }
.point .num { font-family: var(--font-comic); font-size: 15px; color: var(--orange); letter-spacing: 0.1em; padding-top: 2px; }
.dark-sec .point .num { color: var(--gold); }
.point h5 { font-family: var(--font-head); font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; letter-spacing: -0.015em; margin-bottom: 6px; }
.point p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.dark-sec .point p { color: var(--ash-light); }

/* ─── App screen galleries: horizontal scroll-snap of device screens ─── */
.appgal-wrap { position: relative; }
.appgal-hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--ash); letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.dark-sec .appgal-hint { color: var(--ash-light); }
.appgal-hint svg { width: 26px; height: 12px; opacity: 0.7; }
.appgal {
  display: flex; gap: clamp(14px, 1.8vw, 22px); align-items: flex-start;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  /* bounded to the .wrap content column — cards align with the captions
     below and never bleed past the section boundary */
  padding: 2px 1px 16px; scroll-padding-left: 1px;
}
.appgal::-webkit-scrollbar { display: none; }
.appgal figure { scroll-snap-align: start; flex: 0 0 auto; margin: 0; }
.appgal img { display: block; width: 100%; height: auto; }
.appgal figcaption { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.appgal figcaption b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 2px; }
.appgal figcaption b .ix { font-family: var(--font-mono); font-size: 11px; color: var(--rust); margin-right: 8px; font-weight: 500; }
.dark-sec .appgal figcaption { color: var(--ash-light); }
.dark-sec .appgal figcaption b { color: var(--bone); }
/* iPhone — portrait phones */
.appgal.ios figure { width: clamp(186px, 23vw, 242px); }
.appgal.ios img { border-radius: 30px; filter: drop-shadow(0 34px 54px rgba(21,24,32,0.30)); }
.dark-sec .appgal.ios img { filter: drop-shadow(0 34px 58px rgba(0,0,0,0.6)); }
/* Vision Pro — landscape glass windows */
.appgal.vp figure { width: clamp(440px, 66vw, 720px); }
.appgal.vp img { border-radius: 12px; border: 1px solid rgba(244,234,210,0.10); background: #060505; box-shadow: 0 44px 84px -36px rgba(0,0,0,0.72); }
/* right edge fade hints there's more to scroll (sits at the content boundary) */
.appgal-wrap::after { content: ""; position: absolute; top: 2px; bottom: 70px; right: 0; width: clamp(16px, 2.4vw, 38px); z-index: 3; pointer-events: none; background: linear-gradient(270deg, var(--bone), transparent); }
.soft-sec .appgal-wrap::after { background: linear-gradient(270deg, var(--paper), transparent); }
.dark-sec .appgal-wrap::after { background: linear-gradient(270deg, var(--ink), transparent); }

/* ─── Five-tab explainer cards ─────────────────────────────────────── */
.tabcards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 960px) { .tabcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tabcards { grid-template-columns: 1fr; } }
.tabcard { padding: 20px 18px; border-radius: 12px; background: var(--glass-bg); border: var(--line-w) solid var(--glass-border); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-out); }
.tabcard:hover { transform: translateY(-3px); background: var(--glass-bg-2); }
.tabcard .tc-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(198,48,26,0.12); color: var(--rust); margin-bottom: 14px; }
.tabcard .tc-ic svg { width: 19px; height: 19px; }
.tabcard h4 { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 7px; }
.tabcard p { font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.tabcard .tc-n { font-family: var(--font-mono); font-size: 10.5px; color: var(--ash); letter-spacing: 0.1em; float: right; }

/* ─── First-principles "control knobs" ─────────────────────────────── */
.knobs { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 22px); }
@media (max-width: 860px) { .knobs { grid-template-columns: 1fr; } }
.knob { padding: clamp(22px, 2.4vw, 30px); border-radius: 12px; background: var(--glass-bg); border: var(--line-w) solid var(--glass-border); }
.knob .knob-k { font-family: var(--font-comic); font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--rust); display: block; margin-bottom: 10px; }
.knob h4 { font-family: var(--font-head); font-weight: 700; font-size: clamp(19px, 2vw, 25px); letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 12px; }
.knob > p { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 16px; }
.knob .chips { display: flex; flex-wrap: wrap; gap: 7px; }
.knob .chips span { font-size: 12.5px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: rgba(21,24,32,0.05); border: 1px solid rgba(21,24,32,0.1); color: var(--ink); }
.knob .chips span.hl { background: rgba(198,48,26,0.12); border-color: rgba(198,48,26,0.3); color: var(--rust); }

/* ─── BOM / spec table ────────────────────────────────────────────── */
.spec-table { border-top: 1px solid rgba(21,24,32,0.20); }
.spec-table .row { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; padding: 20px 0; border-bottom: 1px solid rgba(21,24,32,0.12); align-items: baseline; transition: padding-left 0.4s var(--ease-out); }
.spec-table .row:hover { padding-left: 8px; }
.spec-table .num { font-family: var(--font-comic); font-size: 14px; color: var(--rust); }
.spec-table .name { font-family: var(--font-head); font-weight: 700; font-size: clamp(17px, 1.5vw, 21px); letter-spacing: -0.015em; line-height: 1.15; }
.spec-table .sub { font-size: 13px; color: var(--ash); margin-top: 4px; }
.spec-table .val { font-family: var(--font-mono); font-size: 13px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.spec-total { margin-top: 32px; display: flex; align-items: baseline; justify-content: space-between; border-top: 3px solid var(--ink); padding-top: 22px; }
.spec-total .label { font-family: var(--font-comic); font-size: 16px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }
.spec-total .big { font-family: var(--font-display); font-size: clamp(36px, 5vw, 60px); letter-spacing: 0.01em; line-height: 1; color: var(--orange); }

/* ─── Data table ──────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: center; padding: 12px 14px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--ash); border-bottom: 1px solid rgba(21,24,32,0.2); letter-spacing: 0.1em; text-transform: uppercase; }
.data-table th:first-child { text-align: left; }
.data-table td { padding: 14px 14px; border-bottom: 1px solid rgba(21,24,32,0.10); text-align: center; color: var(--ink); }
.data-table td:first-child { text-align: left; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.best td { background: rgba(198,48,26,0.06); }
.data-table tr.best td:first-child { color: var(--rust); font-weight: 600; }
.data-table .hi { color: var(--rust); font-weight: 600; }
.table-note { font-family: var(--font-mono); font-size: 11px; color: var(--ash); margin-top: 12px; letter-spacing: 0.02em; }

/* ─── Build / steps list ──────────────────────────────────────────── */
.steps { counter-reset: step; }
.step { display: grid; grid-template-columns: 56px 1fr 1.2fr; gap: clamp(16px, 2.5vw, 30px); padding: clamp(16px, 2.5vh, 26px) 0; border-bottom: 1px solid rgba(21,24,32,0.14); counter-increment: step; align-items: start; }
.step::before { content: counter(step, decimal-leading-zero); font-family: var(--font-comic); font-size: 20px; color: var(--orange); letter-spacing: 0.08em; padding-top: 2px; }
.step h4 { font-family: var(--font-head); font-weight: 700; font-size: clamp(19px, 1.9vw, 26px); letter-spacing: -0.02em; line-height: 1.12; }
.step .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ash); margin-top: 6px; letter-spacing: 0.06em; }
.step p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
@media (max-width: 720px) { .step { grid-template-columns: 1fr; gap: 12px; } .step::before { padding-top: 0; } }

/* ─── BibTeX ──────────────────────────────────────────────────────── */
.bib { background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: var(--line-w) solid var(--glass-border); border-radius: 12px; padding: 24px 26px; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; color: var(--ink-soft); position: relative; box-shadow: var(--glass-hi), var(--glass-sh); }
.bib pre { white-space: pre-wrap; margin: 0; }
@media (max-width: 700px) {
  .bib { padding: 14px; font-size: 10.5px; line-height: 1.6; }
  .bib pre { white-space: pre; overflow-x: auto; }
  .bib-copy { top: 8px; right: 8px; }
}
.bib-copy { position: absolute; top: 14px; right: 14px; padding: 6px 14px; border-radius: 8px; background: var(--ink); color: var(--bone); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; border: none; cursor: pointer; }
.bib-copy:hover { background: var(--rust); }

/* ─── 3D model viewer (hardware) ──────────────────────────────────── */
.viewer-3d {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(21,24,32,0.08);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(198,48,26,0.08), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  box-shadow: 0 30px 70px -36px rgba(21,24,32,0.32);
}
.viewer-3d model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.viewer-3d .ph { position: absolute; inset: 0; }
.viewer-hint {
  position: absolute; left: 18px; bottom: 16px; z-index: 3;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash);
  display: flex; align-items: center; gap: 10px;
  background: rgba(244,234,210,0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 999px; padding: 8px 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.viewer-hint .dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--rust); box-shadow: 0 0 0 3px rgba(198,48,26,0.18); }
.viewer-fs {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(244,234,210,0.55); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid rgba(255,255,255,0.5); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 6px 18px -8px rgba(21,24,32,0.3);
  transition: transform 0.3s var(--ease-out), background 0.3s ease;
}
.viewer-fs:hover { transform: scale(1.06); background: rgba(244,234,210,0.78); }
.viewer-fs svg { width: 17px; height: 17px; }
.viewer-3d:fullscreen { border-radius: 0; aspect-ratio: auto; }
.viewer-3d:fullscreen model-viewer { background: var(--bone); }
#robotCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.viewer-loading { transition: opacity 0.6s var(--ease-out); }
.viewer-3d.loaded .viewer-loading { opacity: 0; pointer-events: none; }

/* wrapper that lets the joint panel overlay on desktop, stack on mobile */
.viewer-wrap { position: relative; }

/* ── joint control panel ── */
.jp {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  width: clamp(230px, 24vw, 290px);
  max-height: calc(100% - 28px); display: flex; flex-direction: column;
  background: rgba(244,234,210,0.62);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 12px;
  box-shadow: var(--glass-hi), 0 18px 44px -22px rgba(21,24,32,0.4);
  opacity: 0; transform: translateY(-6px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  overflow: hidden;
}
.jp.ready { opacity: 1; transform: none; }
.jp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid rgba(21,24,32,0.10); }
.jp-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.jp-head-actions { display: flex; align-items: center; gap: 6px; }
.jp-reset { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: rgba(21,24,32,0.06); border: 1px solid rgba(21,24,32,0.12); border-radius: 999px; padding: 5px 11px; cursor: pointer; transition: background 0.2s ease; }
.jp-reset:hover { background: var(--rust); color: var(--bone); border-color: var(--rust); }
.jp-toggle { width: 24px; height: 24px; border: none; background: none; cursor: pointer; color: var(--ash); font-size: 12px; transition: transform 0.3s var(--ease-out); }
.jp.collapsed .jp-toggle { transform: rotate(-90deg); }
.jp.collapsed .jp-tabs, .jp.collapsed .jp-list { display: none; }
.jp-tabs { display: flex; gap: 4px; padding: 10px 12px 8px; flex-wrap: wrap; }
.jp-tab { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ash); background: rgba(21,24,32,0.05); border: 1px solid transparent; border-radius: 999px; padding: 6px 4px; cursor: pointer; transition: color 0.2s ease, background 0.2s ease; }
.jp-tab:hover { color: var(--ink); }
.jp-tab.on { color: var(--bone); background: var(--ink); }
.jp-list { overflow-y: auto; padding: 4px 14px 14px; }
.jp-list::-webkit-scrollbar { width: 7px; }
.jp-list::-webkit-scrollbar-thumb { background: rgba(21,24,32,0.18); border-radius: 4px; }
.jp-pane { display: none; }
.jp-pane.on { display: block; }
.jp-row { padding: 9px 0; border-bottom: 1px solid rgba(21,24,32,0.07); }
.jp-row:last-child { border-bottom: none; }
.jp-row-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.jp-name { font-size: 11.5px; color: var(--ink-soft); letter-spacing: -0.01em; }
.jp-val { font-family: var(--font-mono); font-size: 10.5px; color: var(--rust); }
.jp-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; border-radius: 3px; background: rgba(21,24,32,0.16); outline: none; cursor: pointer; }
.jp-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--rust); border: 2px solid var(--bone); box-shadow: 0 1px 4px rgba(21,24,32,0.3); cursor: pointer; }
.jp-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--rust); border: 2px solid var(--bone); cursor: pointer; }
/* phones: tall full-width 3D view, joint panel drops BELOW it (no overlay) */
@media (max-width: 760px) {
  .viewer-wrap { display: flex; flex-direction: column; gap: 12px; }
  #robot3d { aspect-ratio: auto; height: 60vh; min-height: 360px; }
  .jp {
    position: static; top: auto; right: auto; left: auto; bottom: auto; z-index: auto;
    width: auto; max-height: none;
  }
  .jp-list { max-height: 44vh; }
  .jp-tabs { padding: 12px 12px 8px; }
  .jp-tab { padding: 11px 4px; font-size: 11px; }
  .jp-row { padding: 12px 0; }
  .jp-name { font-size: 13px; }
  .jp-slider { height: 5px; }
  .jp-slider::-webkit-slider-thumb { width: 24px; height: 24px; }
  .jp-slider::-moz-range-thumb { width: 24px; height: 24px; }
  .jp-reset { padding: 9px 15px; font-size: 11px; }
}

/* ── WBC interactive viewers (compliance + operating modes) ── */
.wbc-block { position: relative; }
.wbc-stage { aspect-ratio: 16 / 10; cursor: grab; }
.wbc-stage.grabbing { cursor: grabbing; }
.wbc-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.wbc-stage .viewer-loading { position: absolute; inset: 0; }
.wbc-stage.loaded .viewer-loading { opacity: 0; pointer-events: none; }

.wbc-ctl {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  width: clamp(214px, 23vw, 268px);
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px;
  background: rgba(244,234,210,0.64);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 12px;
  box-shadow: var(--glass-hi), 0 18px 44px -22px rgba(21,24,32,0.4);
}
.wbc-ctl-head { display: flex; align-items: center; justify-content: space-between; }
.wbc-ctl-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

.wbc-seg { display: flex; gap: 4px; }
.wbc-seg button {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ash); background: rgba(21,24,32,0.05);
  border: 1px solid transparent; border-radius: 999px; padding: 7px 4px; cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.wbc-seg button:hover { color: var(--ink); }
.wbc-seg button.on { color: var(--bone); background: var(--ink); }

.wbc-row { padding: 2px 0; }
.wbc-row-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.wbc-row-top .lab { font-size: 11.5px; color: var(--ink-soft); letter-spacing: -0.01em; }
.wbc-row-top .out { font-family: var(--font-mono); font-size: 10.5px; color: var(--rust); }
.wbc-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; border-radius: 3px; background: rgba(21,24,32,0.16); outline: none; cursor: pointer; }
.wbc-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--rust); border: 2px solid var(--bone); box-shadow: 0 1px 4px rgba(21,24,32,0.3); cursor: pointer; }
.wbc-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--rust); border: 2px solid var(--bone); cursor: pointer; }

.wbc-pad-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.wbc-pad {
  position: relative; width: 132px; height: 132px; border-radius: 12px;
  background: radial-gradient(circle at 50% 50%, rgba(63,181,107,0.14), transparent 70%), rgba(21,24,32,0.06);
  border: 1px solid rgba(21,24,32,0.14); touch-action: none; cursor: grab;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.wbc-pad::before, .wbc-pad::after { content: ""; position: absolute; background: rgba(21,24,32,0.1); }
.wbc-pad::before { left: 50%; top: 8px; bottom: 8px; width: 1px; transform: translateX(-0.5px); }
.wbc-pad::after { top: 50%; left: 8px; right: 8px; height: 1px; transform: translateY(-0.5px); }
.wbc-pad:active { cursor: grabbing; }
.wbc-knob {
  position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; border-radius: 50%;
  transform: translate(-50%, -50%); background: #3FB56B; border: 2px solid var(--bone);
  box-shadow: 0 2px 10px rgba(21,24,32,0.4), 0 0 0 4px rgba(63,181,107,0.18); pointer-events: none;
}
.wbc-pad-axes { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 9.5px; color: var(--ash); }
.wbc-pad-axes b { color: #2e9457; font-weight: 500; }

.wbc-note { font-size: 11px; line-height: 1.5; color: var(--ash); }
.wbc-note .green { color: #2e9457; font-weight: 500; }
.wbc-reset { align-self: flex-start; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: rgba(21,24,32,0.06); border: 1px solid rgba(21,24,32,0.12); border-radius: 999px; padding: 5px 11px; cursor: pointer; transition: background 0.2s ease; }
.wbc-reset:hover { background: var(--rust); color: var(--bone); border-color: var(--rust); }

/* phones / narrow: give the 3D view a tall full-width stage and drop the
   controls BELOW it in normal flow — no overlay, big tappable targets. */
@media (max-width: 760px) {
  .wbc-block { display: flex; flex-direction: column; gap: 12px; }
  .wbc-stage { aspect-ratio: auto; height: 60vh; min-height: 360px; }
  .wbc-ctl {
    position: static; top: auto; right: auto; z-index: auto;
    width: auto; max-width: none; padding: 16px; gap: 14px;
  }
  .wbc-seg { gap: 6px; }
  .wbc-seg button { padding: 12px 6px; font-size: 11px; }
  .wbc-row-top .lab { font-size: 13px; }
  .wbc-row-top .out { font-size: 11.5px; }
  .wbc-slider { height: 5px; }
  .wbc-slider::-webkit-slider-thumb { width: 24px; height: 24px; }
  .wbc-slider::-moz-range-thumb { width: 24px; height: 24px; }
  .wbc-pad { width: 168px; height: 168px; }
  .wbc-knob { width: 42px; height: 42px; }
  .wbc-reset { padding: 9px 16px; font-size: 11px; }
  .wbc-note { font-size: 12.5px; }
  /* keep the fullscreen + hint chips clear of the rounded corners */
  .wbc-stage .viewer-hint { left: 12px; bottom: 12px; }
}

/* ── exploded view (scroll-driven) ── */
.explode-scroll { position: relative; height: 320vh; }
.explode-stick { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.explode-grid { display: grid; grid-template-columns: 2.4fr 0.95fr; gap: clamp(16px, 3vw, 44px); align-items: center; width: 100%; }
.explode-stage { aspect-ratio: auto; height: 82vh; }
#explodeCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.xp-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.xp-label {
  position: absolute; top: 0; left: 0; pointer-events: auto; opacity: 0;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.02em; color: var(--ink);
  background: rgba(244,234,210,0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.6); border-radius: 999px; padding: 5px 11px 5px 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 6px 16px -8px rgba(21,24,32,0.35);
  transition: opacity 0.25s var(--ease-out), background 0.2s ease, color 0.2s ease;
}
.xp-label .xp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rust); box-shadow: 0 0 0 3px rgba(198,48,26,0.18); flex: none; }
.xp-label:hover, .xp-label.on { background: var(--ink); color: var(--bone); }
.xp-label.on .xp-dot, .xp-label:hover .xp-dot { background: var(--bone); box-shadow: 0 0 0 3px rgba(244,234,210,0.18); }
.xp-progress {
  position: absolute; left: 18px; bottom: 16px; z-index: 4;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash);
  display: flex; align-items: center; gap: 9px;
  background: rgba(244,234,210,0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 999px; padding: 7px 12px;
}
.xp-progress b { color: var(--rust); font-weight: 500; }
.explode-copy .eyebrow { color: var(--rust); display: block; margin-bottom: 14px; }
.explode-copy h3 { margin-bottom: 14px; transition: opacity 0.3s var(--ease-out); }
.explode-copy p { font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; color: var(--ink-soft); min-height: 5.5em; }
@media (max-width: 860px) {
  .explode-grid { grid-template-columns: 1fr; gap: 16px; }
  .explode-stage { height: 60vh; }
  .explode-scroll { height: 300vh; }
  .explode-copy { order: -1; }
  .explode-copy p { min-height: 0; }
}

/* ── AR · view in your room (model-viewer) ── */
.ar-stage model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.ar-btn { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; }
.ar-stage .viewer-hint { z-index: 2; }
@media (max-width: 640px) { .ar-stage { aspect-ratio: 4 / 5; } }

/* ── interactive BOM cost donut ── */
.bom-donut { position: relative; width: min(280px, 78%); margin: 0 auto 30px; }
.bom-donut-svg { width: 100%; height: auto; display: block; }
.bom-seg { transition: opacity 0.25s ease, stroke-width 0.2s ease; }
.bom-seg.dim { opacity: 0.26; }
.bom-seg.hot { stroke-width: 17; }
.bom-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.bom-c-val { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; line-height: 1; color: var(--ink); transition: color 0.2s ease; }
.bom-c-key { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash); margin-top: 6px; text-align: center; max-width: 76%; line-height: 1.4; }
.spec-table .row.bom-row-hot { padding-left: 8px; background: linear-gradient(90deg, rgba(198,48,26,0.07), transparent 70%); }

/* ── swerve velocity playground ── */
.swerve-wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.swerve-stage {
  position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; cursor: grab; touch-action: none;
  background: radial-gradient(ellipse at 50% 42%, rgba(198,48,26,0.06), transparent 60%), linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border: 1px solid rgba(21,24,32,0.08); box-shadow: 0 30px 60px -36px rgba(21,24,32,0.28);
}
.swerve-stage:active { cursor: grabbing; }
#swerveCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.swerve-hint {
  position: absolute; left: 16px; bottom: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash);
  display: flex; align-items: center; gap: 9px;
  background: rgba(244,234,210,0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 999px; padding: 7px 12px;
}
.swerve-panel { display: flex; flex-direction: column; gap: 16px; }
.swerve-readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.sw-cell { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid rgba(21,24,32,0.10); }
.sw-cell .k { font-size: 12px; color: var(--ink-soft); }
.sw-cell .v { font-family: var(--font-mono); font-size: 15px; color: var(--rust); }
.swerve-steers { display: flex; gap: 8px; }
.sw-mod { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border-radius: 12px; background: rgba(21,24,32,0.05); }
.sw-mod span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ash); }
.sw-mod b { font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: var(--ink); }
@media (max-width: 760px) {
  .swerve-wrap { grid-template-columns: 1fr; }
}

/* ─── Connect / links hub ─────────────────────────────────────────── */
.links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px) { .links-grid { grid-template-columns: 1fr; } }
.link-col {
  border: var(--line-w) solid var(--glass-border); border-radius: 12px; padding: 30px 28px 12px;
  background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hi), var(--glass-sh);
  transition: box-shadow 0.4s var(--ease-out), border-color 0.4s ease, background 0.4s ease, transform 0.4s var(--ease-out);
}
.link-col:hover { background: var(--glass-bg-2); border-color: rgba(255,255,255,0.85); transform: translateY(-3px); }
.link-col h3 { font-family: var(--font-head); font-weight: 700; font-size: clamp(19px, 1.7vw, 24px); letter-spacing: -0.02em; margin-bottom: 6px; }
.link-col .col-sub { font-size: 13px; color: var(--ash); margin-bottom: 14px; }
.link-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px;
  padding: 16px 0; border-top: 1px solid rgba(21,24,32,0.10); text-decoration: none; color: var(--ink);
  transition: padding-left 0.35s var(--ease-out);
}
.link-row:hover { padding-left: 6px; }
.link-row .lr-title { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.link-row .lr-meta { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--ash); margin-top: 3px; }
.link-row .lr-arrow { font-family: var(--font-sans); font-size: 16px; color: var(--ash); opacity: 0.6; transition: transform 0.35s var(--ease-out), color 0.3s ease, opacity 0.3s ease; }
.link-row:hover .lr-arrow { transform: translate(3px,-3px); color: var(--rust); opacity: 1; }

/* ─── Callout / note box — comic narration strip ──────────────────── */
.callout { border-left: 4px solid var(--rust); background: rgba(217,161,63,0.10); padding: 12px 18px 12px 22px; margin: 8px 0; border-radius: 0 8px 8px 0; }
.callout p { color: var(--ink-soft); }
.dark-sec .callout { background: rgba(217,161,63,0.08); }
.dark-sec .callout p { color: var(--ash-light); }

/* ─── Footer — the city at night ──────────────────────────────────── */
/* A deco skyline (stepped setbacks + a Chrysler-style spire) is baked in
   as an inline-SVG border band, so every page gets the skyline with zero
   HTML changes. */
/* body > footer, NOT a bare `footer`. The bare selector claimed EVERY <footer>
   element on the page, so the first widget to use one semantically — the
   harness command cards — got a 150 px Art Deco skyline baked into the bottom
   of each card. Same failure as the class-name collisions in CLAUDE.md, but
   with an element name, which no amount of prefixing protects you from. */
body > footer { background: var(--ink); color: var(--ash-light); padding: 0 0 24px; position: relative; }
body > footer::before {
  content: ''; display: block; height: clamp(84px, 11vw, 150px); margin-bottom: clamp(36px, 5vh, 60px);
  background-color: var(--bone);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%201600%20190'%20preserveAspectRatio%3D'none'%3E%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M%200%20190%20L%200%20150%20L%2020%20150%20L%2020%20128%20L%2048%20128%20L%2052%20128%20L%2056%20128%20L%2056%20112%20L%2054%20112%20L%2054%20106%20L%2061%2098%20L%2068%20106%20L%2068%20112%20L%2066%20112%20L%2066%20128%20L%2070%20128%20L%2076%20128%20L%2076%20150%20L%2092%20150%20L%2092%20108%20L%20100%20108%20L%20100%2096%20L%20122%2096%20L%20122%20108%20L%20130%20108%20L%20130%20150%20L%20146%20150%20L%20146%20132%20L%20178%20132%20L%20182%20132%20L%20186%20132%20L%20186%20116%20L%20184%20116%20L%20184%20110%20L%20191%20102%20L%20198%20110%20L%20198%20116%20L%20196%20116%20L%20196%20132%20L%20200%20132%20L%20206%20132%20L%20206%20150%20L%20220%20150%20L%20220%20122%20L%20232%20122%20L%20232%2076%20L%20235%2076%20L%20235%2064%20L%20238%2064%20L%20238%2076%20L%20246%2076%20L%20249%2052%20L%20252%2076%20L%20260%2076%20L%20260%2064%20L%20263%2064%20L%20263%2076%20L%20266%2076%20L%20266%20122%20L%20280%20122%20L%20280%20150%20L%20294%20150%20L%20294%20118%20L%20306%20118%20L%20306%20104%20L%20326%20104%20L%20326%20118%20L%20336%20118%20L%20336%20150%20L%20350%20150%20L%20350%20128%20L%20362%20128%20L%20362%2096%20L%20362%2096%20Q%20364%2077%20387.5%2074%20L%20368%2084%20Q%20370%2067%20387.5%2064%20L%20374%2074%20Q%20376%2058%20387.5%2055%20L%20379%2064%20Q%20381%2050%20387.5%2047%20L%20383%2055%20Q%20385%2043%20387.5%2040%20L%20386%2047%20Q%20388%2037%20387.5%2034%20L%20388%2026%20L%20388%206%20L%20392%206%20L%20392%2026%20L%20392.5%2034%20Q%20392%2037%20394%2047%20L%20392.5%2040%20Q%20395%2043%20397%2055%20L%20392.5%2047%20Q%20399%2050%20401%2064%20L%20392.5%2055%20Q%20404%2058%20406%2074%20L%20392.5%2064%20Q%20410%2067%20412%2084%20L%20392.5%2074%20Q%20416%2077%20418%2096%20L%20418%2096%20L%20418%20128%20L%20432%20128%20L%20432%20150%20L%20446%20150%20L%20446%20126%20L%20476%20126%20L%20480%20126%20L%20484%20126%20L%20484%20110%20L%20482%20110%20L%20482%20104%20L%20489%2096%20L%20496%20104%20L%20496%20110%20L%20494%20110%20L%20494%20126%20L%20498%20126%20L%20504%20126%20L%20504%20150%20L%20520%20150%20L%20520%20100%20L%20528%20100%20L%20528%2088%20L%20552%2088%20L%20552%20100%20L%20560%20100%20L%20560%20150%20L%20576%20150%20L%20576%20132%20L%20592%20132%20L%20592%20112%20L%20604%20112%20L%20604%2094%20L%20614%2094%20L%20614%2042%20L%20622%2042%20L%20622%2032%20L%20628%2032%20L%20628%2024%20L%20633%2024%20L%20633%2012%20L%20630%2012%20L%20630%200%20L%20636%200%20L%20636%2012%20L%20633%2012%20L%20633%2024%20L%20638%2024%20L%20638%2032%20L%20644%2032%20L%20644%2042%20L%20652%2042%20L%20652%2094%20L%20662%2094%20L%20662%20112%20L%20674%20112%20L%20674%20132%20L%20690%20132%20L%20690%20150%20L%20704%20150%20L%20704%20130%20L%20734%20130%20L%20738%20130%20L%20742%20130%20L%20742%20114%20L%20740%20114%20L%20740%20108%20L%20747%20100%20L%20754%20108%20L%20754%20114%20L%20752%20114%20L%20752%20130%20L%20756%20130%20L%20762%20130%20L%20762%20150%20L%20776%20150%20L%20776%20134%20L%20790%20134%20L%20790%2092%20Q%20785%2082%20793%2076%20Q%20799%2070%20802%2064%20L%20804%2064%20L%20804%2052%20L%20808%2052%20L%20808%2064%20L%20810%2064%20Q%20813%2070%20819%2076%20Q%20827%2082%20822%2092%20L%20822%20134%20L%20836%20134%20L%20836%20150%20L%20850%20150%20L%20850%20134%20L%20880%20134%20L%20880%20118%20L%20906%20118%20L%20906%20150%20L%20920%20150%20L%20920%20138%20L%20996%20138%20L%20996%2074%20L%201002%2074%20L%201002%2066%20L%201034%2066%20L%201034%2074%20L%201040%2074%20L%201040%20138%20L%201246%20138%20L%201246%2074%20L%201252%2074%20L%201252%2066%20L%201284%2066%20L%201284%2074%20L%201290%2074%20L%201290%20138%20L%201364%20138%20L%201364%20150%20L%201378%20150%20L%201378%20128%20L%201406%20128%20L%201410%20128%20L%201414%20128%20L%201414%20112%20L%201412%20112%20L%201412%20106%20L%201419%2098%20L%201426%20106%20L%201426%20112%20L%201424%20112%20L%201424%20128%20L%201428%20128%20L%201434%20128%20L%201434%20150%20L%201450%20150%20L%201450%20106%20L%201458%20106%20L%201458%2094%20L%201480%2094%20L%201480%20106%20L%201488%20106%20L%201488%20150%20L%201504%20150%20L%201504%20134%20L%201536%20134%20L%201536%20150%20L%201600%20150%20L%201600%20190%20Z%20M%201003.0%20132%20L%201003.0%2096%20Q%201009.5%2082%201016.0%2096%20L%201016.0%20132%20ZM%201020.0%20132%20L%201020.0%2096%20Q%201026.5%2082%201033.0%2096%20L%201033.0%20132%20ZM%201253.0%20132%20L%201253.0%2096%20Q%201259.5%2082%201266.0%2096%20L%201266.0%20132%20ZM%201270.0%20132%20L%201270.0%2096%20Q%201276.5%2082%201283.0%2096%20L%201283.0%20132%20Z%22%20fill%3D%22%23151820%22%2F%3E%3Cpath%20d%3D%22M%20920%20138%20Q%20962%20132%201018%2068%20M%201018%2068%20Q%201143%20128%201268%2068%20M%201268%2068%20Q%201326%20132%201364%20138%22%20fill%3D%22none%22%20stroke%3D%22%23151820%22%20stroke-width%3D%224%22%2F%3E%3Cpath%20d%3D%22M%201043%2079%20L%201043%20138%20M%201068%2087%20L%201068%20138%20M%201093%2093%20L%201093%20138%20M%201118%2097%20L%201118%20138%20M%201143%2098%20L%201143%20138%20M%201168%2097%20L%201168%20138%20M%201193%2093%20L%201193%20138%20M%201218%2087%20L%201218%20138%20M%201243%2079%20L%201243%20138%20%22%20fill%3D%22none%22%20stroke%3D%22%23151820%22%20stroke-width%3D%221.8%22%2F%3E%3C%2Fsvg%3E");
  background-size: 100% 100%; background-repeat: no-repeat;
}
.foot-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.foot-brand { font-family: var(--font-display); font-size: 34px; color: var(--gold); letter-spacing: 0.03em; margin-bottom: 10px; }
.foot-brand-sub { font-size: 13px; color: var(--ash-light); max-width: 36ch; line-height: 1.5; }
.foot-mini { margin-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.foot-mini a { font-family: var(--font-comic); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; padding: 8px 14px 7px; border-radius: 8px; text-decoration: none; color: var(--bone); border: 1.5px solid rgba(217,161,63,0.5); transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease; }
.foot-mini a:hover { background: rgba(217,161,63,0.12); border-color: var(--gold); color: var(--gold); }
.foot-col h6 { font-family: var(--font-comic); font-size: 14px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 16px; font-weight: 400; }
.foot-col a { display: block; color: var(--ash-light); text-decoration: none; font-size: 13px; margin-bottom: 9px; transition: color 0.2s ease; }
.foot-col a:hover { color: var(--bone); }
.foot-bottom { border-top: 1px solid rgba(217,161,63,0.3); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-family: var(--font-mono); font-size: 11px; color: var(--ash-light); letter-spacing: 0.05em; }

/* ─── Fade-in primitive ───────────────────────────────────────────── */
/* Hidden state is gated behind html.js so content is always visible if
   JavaScript is disabled, blocked, or still loading (no invisible page). */
.fade-up { transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
html.js .fade-up { opacity: 0; transform: translateY(34px); }
html.js .fade-up.in { opacity: 1; transform: translateY(0); }
.fade-up.d1 { transition-delay: 0.08s; }
.fade-up.d2 { transition-delay: 0.16s; }
.fade-up.d3 { transition-delay: 0.24s; }
.fade-up.d4 { transition-delay: 0.32s; }

/* ─── Carousel rail (in the wild / NYC) — auto-floating, edge-masked ── */
.marquee {
  overflow: hidden;
  /* Apple-style soft edge fade so cards melt in/out at the rail edges */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: clamp(18px, 2vw, 28px);
  width: max-content;
  animation: marquee-rtl 60s linear infinite;
  will-change: transform;
}
/* direction variants — base drifts content right-to-left; .ltr floats left-to-right */
.marquee-track.ltr { animation-name: marquee-ltr; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-rtl { from { transform: translate3d(0,0,0); }            to { transform: translate3d(calc(-50% - clamp(9px,1vw,14px)),0,0); } }
@keyframes marquee-ltr { from { transform: translate3d(calc(-50% - clamp(9px,1vw,14px)),0,0); } to { transform: translate3d(0,0,0); } }

.wild-card {
  flex: 0 0 clamp(256px, 28vw, 392px);
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: var(--line-w) solid rgba(217,161,63,0.55);
  background: #10131C;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.55);
  transition: transform 0.5s var(--ease-out), border-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
/* comic-strip tilt: alternate panels lean a touch */
.wild-card:nth-child(odd) { transform: rotate(-0.6deg); }
.wild-card:nth-child(even) { transform: rotate(0.5deg); }
.wild-card .ph { height: 100%; }
/* legibility gradient bottom→top so the place name always reads */
.wild-card::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,7,6,0) 38%, rgba(8,7,6,0.72) 100%);
}
.wild-card:hover {
  transform: translateY(-6px) rotate(0deg);
  border-color: var(--gold);
  box-shadow: 8px 10px 0 rgba(0,0,0,0.55);
}
.wild-card-top {
  position: absolute; top: 18px; left: 20px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash-light);
  display: flex; align-items: center; gap: 8px;
}
.wild-card-top::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--rust); box-shadow: 0 0 0 3px rgba(198,48,26,0.22);
}
.wild-card-meta { position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.wild-card h5 { font-family: var(--font-comic); font-weight: 400; font-size: clamp(20px, 2vw, 27px); letter-spacing: 0.05em; line-height: 1.05; color: var(--bone); text-shadow: 2px 2px 0 rgba(0,0,0,0.7); }
.wild-card .coord { font-family: var(--font-mono); font-size: 10px; color: var(--ash-light); letter-spacing: 0.12em; text-transform: uppercase; text-align: right; line-height: 1.5; white-space: nowrap; }

/* ─── Timeline (long-horizon task) ────────────────────────────────── */
.timeline { position: relative; padding-left: clamp(28px, 4vw, 64px); }
.timeline::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: rgba(21,24,32,0.18); }
.dark-sec .timeline::before { background: rgba(244,234,210,0.18); }
.tl-step { position: relative; padding-bottom: clamp(40px, 6vh, 76px); display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 4vw, 60px); align-items: start; }
.tl-step:last-child { padding-bottom: 0; }
@media (max-width: 880px) { .tl-step { grid-template-columns: 1fr; gap: 18px; } }
.tl-step::before { content: ''; position: absolute; left: calc(clamp(28px, 4vw, 64px) * -1); top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--rust); border: 1px solid var(--rust); transform: translateX(calc(-50% + 0.5px)); }
.tl-meta { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ash); margin-bottom: 10px; }
.dark-sec .tl-meta { color: var(--ash-light); }
.tl-step h4 { font-family: var(--font-head); font-weight: 700; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 12px; }
.tl-step p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); max-width: 46ch; }
.dark-sec .tl-step p { color: var(--ash-light); }
.tl-shot { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid rgba(21,24,32,0.08); position: relative; }
.dark-sec .tl-shot { border-color: rgba(244,234,210,0.10); }

/* ─── Hero entrance choreography (pure CSS, fires on load) ─────────── */
@keyframes enterUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }
html.js .hero-home-inner > *,
html.js .page-hero-inner > * { opacity: 0; animation: enterUp 1.05s var(--ease-out) both; }
html.js .hero-home-inner > *:nth-child(1), html.js .page-hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
html.js .hero-home-inner > *:nth-child(2), html.js .page-hero-inner > *:nth-child(2) { animation-delay: 0.14s; }
html.js .hero-home-inner > *:nth-child(3), html.js .page-hero-inner > *:nth-child(3) { animation-delay: 0.23s; }
html.js .hero-home-inner > *:nth-child(4), html.js .page-hero-inner > *:nth-child(4) { animation-delay: 0.32s; }
html.js .hero-home-inner > *:nth-child(5), html.js .page-hero-inner > *:nth-child(5) { animation-delay: 0.41s; }
html.js .hero-home-inner > *:nth-child(6), html.js .page-hero-inner > *:nth-child(6) { animation-delay: 0.50s; }
html.js .hero-coord-row { opacity: 0; animation: fadeOnly 1.3s var(--ease-out) 0.7s both; }

/* ─── Animated wordmark: per-letter entrance + traveling sheen + hover ─ */
.hero-title .ch { display: inline-block; }
/* Under JS the whole h1 stays put (no block-level enterUp); letters animate instead. */
html.js .hero-title { opacity: 1; transform: none; animation: none; }
html.js .hero-title .ch {
  opacity: 0; transform: translateY(0.5em); filter: blur(8px);
  transition: opacity 0.9s var(--ease-out), transform 0.55s var(--ease-out), filter 0.9s var(--ease-out);
  animation: chSheen 6s linear infinite; animation-play-state: paused;
}
html.js .hero-title.in .ch { opacity: 1; transform: none; filter: none; animation-play-state: running; }
html.js .hero-title.in .ch:hover { transform: translateY(-0.08em); }
/* Traveling rust highlight — staggered so it sweeps left→right, then rests. */
html.js .hero-title .ch:nth-child(1) { animation-delay: 0s; }
html.js .hero-title .ch:nth-child(2) { animation-delay: 0.5s; }
html.js .hero-title .ch:nth-child(3) { animation-delay: 1.0s; }
html.js .hero-title .ch:nth-child(4) { animation-delay: 1.5s; }
html.js .hero-title .ch:nth-child(5) { animation-delay: 2.0s; }
@keyframes chSheen {
  0%, 18%, 100% { color: var(--ink); text-shadow: none; }
  9%           { color: var(--rust); text-shadow: 0 0 26px rgba(198,48,26,0.35); }
}

/* ─── Rotating hero subtitle (per-letter assemble swap) ───────────── */
.hero-sub { min-height: 1.05em; }
.hero-sub .rot { display: inline-block; }
.hero-sub .rw { display: inline-block; white-space: nowrap; }  /* keep words whole; wrap only between words */
.hero-sub .rl {
  display: inline-block; transform-origin: 50% 100%;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out),
              filter 0.5s var(--ease-out), color 0.5s var(--ease-out);
}
/* incoming letters rise + unblur + untwist, flashing rust as they land */
.hero-sub .rl.hid-in  { opacity: 0; transform: translateY(0.55em) rotate(6deg);  filter: blur(6px); color: var(--rust); }
/* outgoing letters lift away, fading back to rust */
.hero-sub .rl.hid-out { opacity: 0; transform: translateY(-0.45em) rotate(-5deg); filter: blur(6px); color: var(--rust); }

/* ─── Pointer-follow glow inside heroes ───────────────────────────── */
.hero-glow {
  position: absolute; top: 0; left: 0; width: 480px; height: 480px; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity 0.7s var(--ease-out); will-change: left, top, opacity;
}
.hero-home .hero-glow { background: radial-gradient(circle at center, rgba(198,48,26,0.20), transparent 66%); mix-blend-mode: multiply; }
.page-hero .hero-glow { background: radial-gradient(circle at center, rgba(198,48,26,0.42), transparent 64%); mix-blend-mode: screen; filter: blur(6px); }
.hero-glow.show { opacity: 1; }

/* ─── Scroll-linked reveal: media scales in ───────────────────────── */
html.js .reveal-media { opacity: 0; transform: scale(0.955) translateY(22px); transition: opacity 1s var(--ease-out), transform 1.15s var(--ease-out); will-change: opacity, transform; }
html.js .reveal-media.is-visible { opacity: 1; transform: none; }

/* parallax targets get GPU hint */
[data-speed] { will-change: transform; }
.hero-home-inner { will-change: transform, opacity; }

/* ─── Scroll cue ──────────────────────────────────────────────────── */
.scroll-cue {
  position: absolute; right: var(--gutter); bottom: clamp(26px, 5vh, 46px); z-index: 3;
  display: inline-flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ash);
  transition: color 0.3s ease;
}
.scroll-cue:hover { color: var(--ink); }
.page-hero .scroll-cue { color: var(--ash-light); }
.page-hero .scroll-cue:hover { color: var(--bone); }
.scroll-cue .cue-line { width: 1px; height: 40px; background: rgba(107,102,96,0.35); position: relative; overflow: hidden; border-radius: 1px; }
.page-hero .scroll-cue .cue-line { background: rgba(244,234,210,0.22); }
.scroll-cue .cue-line::after { content: ''; position: absolute; inset: 0; transform: translateY(-100%); background: var(--rust); animation: cueRun 2.4s var(--ease-in-out) infinite; }
@keyframes cueRun { 0% { transform: translateY(-100%); } 55%, 100% { transform: translateY(100%); } }
@media (max-width: 600px) { .scroll-cue { display: none; } }

/* ─── Apple-style polish (global) ─────────────────────────────────── */
/* Precise anchor landing under the fixed nav */
section[id] { scroll-margin-top: 76px; }
/* Accessible focus rings — visible on keyboard, quiet on mouse */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 6px;
}
/* Gentle press feedback on pill buttons (Apple-like) */
.btn:active { transform: translateY(0) scale(0.98); }
/* Demo media lifts subtly on hover */
.demo-media { transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
.demo-media:hover { transform: translateY(-4px); box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6); }

/* ─── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .fade-up { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none !important; }
  .hero-home-inner > *, .page-hero-inner > *, .hero-coord-row,
  .reveal-media { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero-glow { display: none !important; }
  [data-speed] { transform: none !important; }
  .scroll-cue .cue-line::after { animation: none !important; }
  .hero-title .ch, .hero-sub .rl {
    opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important;
    color: inherit !important; text-shadow: none !important;
  }
}

/* ── ROS graph: hoverable nodes + glass popup ── */
#rosGraph { position: relative; }
#rosGraph svg { width: 100%; height: auto; display: block; }
.rg-node { cursor: pointer; }
.rg-node rect:first-of-type { transition: filter .15s ease; }
.rg-node:hover rect:first-of-type { filter: brightness(1.4); }
.rg-pop {
  position: absolute; z-index: 30; max-width: 286px; padding: 12px 14px;
  border-radius: 14px; background: rgba(18,16,14,0.88);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  color: var(--bone); opacity: 0; transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease; pointer-events: none;
}
.rg-pop.on { opacity: 1; transform: none; }
.rg-pop-t {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
  color: #fff; margin-bottom: 6px; display: flex; align-items: center; gap: 8px;
}
.rg-pop-t::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--rg-accent, var(--rust)); flex: 0 0 auto;
}
.rg-pop-d { font-size: 12.5px; line-height: 1.5; color: rgba(244,234,210,0.82); }
.fig-hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--ash); text-align: center; }

/* ── browser teleop (teleop-web.html) ── */
.tw-connect {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px;
  background: rgba(244,234,210,0.64);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 12px;
  box-shadow: var(--glass-hi), 0 18px 44px -22px rgba(21,24,32,0.4);
}
.tw-pill {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; font-weight: 500;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  color: var(--ink-soft); background: rgba(21,24,32,0.07); border: 1px solid rgba(21,24,32,0.12);
}
.tw-pill.connecting { color: #8a5a00; background: rgba(255,184,0,0.16); border-color: rgba(255,184,0,0.4); }
.tw-pill.online { color: #1d6b3c; background: rgba(63,181,107,0.16); border-color: rgba(63,181,107,0.45); }
.tw-pill.err { color: #8c2f1b; background: rgba(198,48,26,0.16); border-color: rgba(198,48,26,0.45); }
.tw-url {
  flex: 1 1 220px; min-width: 0;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink);
  padding: 10px 14px; border-radius: 999px;
  background: rgba(21,24,32,0.05); border: 1px solid rgba(21,24,32,0.14); outline: none;
}
.tw-url:focus { border-color: var(--rust); }
.tw-btn { padding: 10px 22px; }
.tw-rtt { font-family: var(--font-mono); font-size: 11px; color: var(--ash); white-space: nowrap; }
.tw-rtt b { color: var(--rust); font-weight: 500; }

/* ── cockpit (iOS CockpitView): full-bleed dark stage, corner joysticks ── */
.ck-stage {
  aspect-ratio: 16 / 9; cursor: grab;
  border: 1px solid rgba(21,24,32,0.35);
  background:
    radial-gradient(ellipse at 50% 18%, rgba(198,48,26,0.14), transparent 58%),
    linear-gradient(180deg, #232838 0%, #131722 100%);
}
.ck-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.ck-stage.grabbing { cursor: grabbing; }

.ck-top {
  position: absolute; top: 12px; left: 14px; right: 14px; z-index: 6;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.ck-top > * { pointer-events: auto; }
.ck-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ck-chips .tw-pill { background: rgba(0,0,0,0.45); border-color: rgba(255,255,255,0.16); color: rgba(244,234,210,0.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ck-chips .tw-pill.online { color: #6fe39a; border-color: rgba(63,181,107,0.55); }
.ck-chips .tw-pill.connecting { color: #ffd479; border-color: rgba(255,184,0,0.5); }
.ck-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(244,234,210,0.6);
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.13); border-radius: 999px;
  padding: 6px 11px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.ck-chip b { color: #fff; font-weight: 500; }
.ck-seg {
  display: flex; padding: 3px; border-radius: 999px;
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.ck-seg button {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.65); background: none; border: none; border-radius: 999px;
  padding: 7px 16px; cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
}
.ck-seg button.on { background: var(--bone); color: var(--ink); }

.ck-bottom {
  position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 6;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.ck-bottom > * { pointer-events: auto; }
.ck-corner { display: flex; align-items: flex-end; gap: 10px; }
.ck-cluster { display: flex; align-items: flex-end; gap: 10px; }

.ck-joy {
  position: relative; width: 118px; height: 118px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(255,255,255,0.10), transparent 65%), rgba(0,0,0,0.42);
  border: 1px solid rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  touch-action: none; cursor: grab;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 28px -14px rgba(0,0,0,0.8);
}
.ck-joy.live { border-color: rgba(255,255,255,0.45); }
.ck-joy:active { cursor: grabbing; }
.ck-knob {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 3px 12px rgba(0,0,0,0.55); pointer-events: none;
  transition: box-shadow 0.2s ease;
}
.ck-knob.live-tint { background: #3FB56B; box-shadow: 0 3px 12px rgba(0,0,0,0.55), 0 0 0 5px rgba(63,181,107,0.18); }
.ck-knob.clay-tint { background: #C6301A; box-shadow: 0 3px 12px rgba(0,0,0,0.55), 0 0 0 5px rgba(198,48,26,0.18); }
.ck-joy-lab {
  position: absolute; bottom: 9px; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.6); pointer-events: none;
}

.ck-holds { display: flex; flex-direction: column; gap: 8px; }
.ck-hold {
  width: 46px; height: 36px; border-radius: 10px;
  background: rgba(0,0,0,0.42); border: 1px solid rgba(255,255,255,0.16);
  color: #fff; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  touch-action: none; transition: background 0.15s ease;
}
.ck-hold.live { background: var(--rust); border-color: var(--rust); }

.ck-grip { display: flex; flex-direction: column; align-items: center; gap: 4px; touch-action: none; cursor: grab; }
.ck-grip-val { font-family: var(--font-mono); font-size: 10px; color: #fff; }
.ck-grip-track {
  position: relative; width: 42px; height: 102px; border-radius: 999px; overflow: hidden;
  background: rgba(0,0,0,0.42); border: 1px solid rgba(255,255,255,0.16);
  display: flex; align-items: flex-end;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.ck-grip-fill { width: 100%; height: 10%; border-radius: 999px; background: linear-gradient(180deg, #4fce82, #2e9457); transition: height 0.05s linear; }
.ck-grip-lab { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 0.16em; color: rgba(255,255,255,0.65); }

.ck-stop {
  align-self: flex-end;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; font-weight: 500;
  color: #fff; background: #b3261e; border: 1px solid rgba(255,255,255,0.2); border-radius: 999px;
  padding: 11px 26px; cursor: pointer; transition: transform 0.15s ease, background 0.2s ease;
  box-shadow: 0 10px 26px -12px rgba(179,38,30,0.9);
}
.ck-stop:hover { background: #d33a30; transform: scale(1.05); }

/* ── manipulation console (iOS WholeBodyView): stage + ink side panel ── */
.rc {
  display: grid; grid-template-columns: 1fr 300px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 30px 70px -36px rgba(0,0,0,0.6);
}
.rc-stage {
  aspect-ratio: auto; border-radius: 0; border: none; box-shadow: none;
  min-height: 480px; cursor: grab;
  background:
    radial-gradient(ellipse at 50% 25%, rgba(198,48,26,0.10), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.rc-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.rc-stage.grabbing { cursor: grabbing; }

.rc-float { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; }
.rc-feel {
  display: flex; padding: 4px; border-radius: 999px;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.rc-feel button {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  color: rgba(255,255,255,0.6); background: none; border: none; border-radius: 999px;
  padding: 8px 20px; cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.rc-feel button.on { background: var(--bone); color: var(--ink); }

.rc-panel {
  background: #1A1E2A; color: var(--bone);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 16px;
  border-left: 1px solid rgba(255,255,255,0.08);
}
.rc-head { display: flex; align-items: center; justify-content: space-between; }
.rc-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244,234,210,0.55); }
.rc-home {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bone); background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: background 0.2s ease;
}
.rc-home:hover { background: var(--rust); border-color: var(--rust); }
.rc-axis { display: flex; flex-direction: column; gap: 7px; }
.rc-axis-lab { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244,234,210,0.42); }
.rc-axis-row { display: flex; justify-content: space-between; align-items: baseline; }
.rc-out { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: #e9a679; }
.rc-seg { display: flex; gap: 3px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.06); }
.rc-seg button {
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(244,234,210,0.55); background: none; border: none; border-radius: 999px;
  padding: 8px 4px; cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
}
.rc-seg button.on { background: var(--bone); color: var(--ink); }
.rc-note { font-size: 11.5px; line-height: 1.55; color: rgba(244,234,210,0.55); }
.rc-panel .wbc-slider { background: rgba(255,255,255,0.18); }

/* joint sliders inside the dark panel */
.rc-jtabs { padding: 0 0 8px; }
.rc-jlist { max-height: 300px; overflow-y: auto; padding: 0 4px 0 0; }
.rc-jlist::-webkit-scrollbar { width: 7px; }
.rc-jlist::-webkit-scrollbar-thumb { background: rgba(244,234,210,0.2); border-radius: 4px; }
.rc-panel .jp-tab { color: rgba(244,234,210,0.5); background: rgba(255,255,255,0.07); }
.rc-panel .jp-tab.on { background: var(--bone); color: var(--ink); }
.rc-panel .jp-row { border-bottom-color: rgba(255,255,255,0.07); }
.rc-panel .jp-name { color: rgba(244,234,210,0.72); }
.rc-panel .jp-val { color: #e9a679; }
.rc-panel .jp-slider { background: rgba(255,255,255,0.18); }

/* ── status console ── */
.tw-console {
  border: 1px solid rgba(21,24,32,0.12); border-radius: 12px; overflow: hidden;
  background: rgba(244,234,210,0.6);
  box-shadow: 0 18px 44px -26px rgba(21,24,32,0.35);
}
.tw-tele {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 1px;
  background: rgba(21,24,32,0.08); border-bottom: 1px solid rgba(21,24,32,0.1);
}
.tw-tele > div { background: var(--bone, #F4EAD2); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tw-tele .k { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
.tw-tele b { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-log {
  height: 280px; overflow-y: auto; padding: 14px 16px;
  background: #171B26; font-family: var(--font-mono); font-size: 11px; line-height: 1.7;
}
.tw-log::-webkit-scrollbar { width: 8px; }
.tw-log::-webkit-scrollbar-thumb { background: rgba(244,234,210,0.18); border-radius: 4px; }
.tw-line { display: flex; gap: 10px; color: rgba(244,234,210,0.78); }
.tw-line .t { color: rgba(244,234,210,0.34); flex: 0 0 auto; }
.tw-line .lv { flex: 0 0 44px; font-weight: 500; }
.tw-line .m { min-width: 0; overflow-wrap: anywhere; }
.tw-line.sys .lv { color: #9aa7ff; }
.tw-line.ok .lv { color: #3FB56B; }
.tw-line.sim .lv { color: #e9a679; }
.tw-line.tx .lv { color: #6fc2ff; }
.tw-line.rx .lv { color: #57d8c2; }
.tw-line.warn .lv { color: #ffb800; }
.tw-line.err .lv { color: #ff6b57; }
.tw-line.err .m { color: #ffb4a8; }
.tw-log-actions { display: flex; gap: 8px; padding: 12px 16px; background: var(--bone, #F4EAD2); border-top: 1px solid rgba(21,24,32,0.1); }

/* ── phones: the cockpit goes tall, the console panel drops below ── */
@media (max-width: 760px) {
  .ck-stage { aspect-ratio: auto; height: 72vh; min-height: 420px; }
  .ck-joy { width: 132px; height: 132px; }
  .ck-knob { width: 52px; height: 52px; }
  .ck-stop { padding: 13px 24px; }
  .ck-top { flex-wrap: wrap; }
  .rc { grid-template-columns: 1fr; }
  .rc-stage { min-height: 56vh; }
  .rc-panel { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); }
  .rc-seg button { padding: 11px 4px; font-size: 10.5px; }
  .rc-feel button { padding: 10px 22px; }
  .rc-jlist { max-height: 38vh; }
  .tw-log { height: 220px; font-size: 12px; }
}

/* ─── Navigation · SLAM lab (dual backend) ───────────────────────── */
.slam-seg { display: inline-flex; padding: 4px; border-radius: 999px; gap: 2px;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); margin-bottom: 30px; }
.slam-seg button { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: rgba(244,234,210,0.62); background: none; border: none; border-radius: 999px;
  padding: 9px 20px; cursor: pointer; transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
  display: inline-flex; align-items: center; gap: 7px; }
.slam-seg button .sd { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.slam-seg button.on { background: var(--bone); color: var(--ink); box-shadow: 0 2px 10px -2px rgba(0,0,0,0.5); }

.slam-lab { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(20px, 4vw, 52px); align-items: stretch; }
@media (max-width: 880px) { .slam-lab { grid-template-columns: 1fr; } }
.slam-stage { position: relative; aspect-ratio: 16 / 11; border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, rgba(198,48,26,0.12), transparent 64%), linear-gradient(180deg, #171C29 0%, #0A0D14 100%);
  border: 1px solid rgba(244,234,210,0.12); box-shadow: 0 40px 80px -44px rgba(0,0,0,0.7); }
.slam-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.slam-chips { position: absolute; left: 14px; bottom: 13px; display: flex; gap: 8px; flex-wrap: wrap; }
.slam-chip { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--bone);
  background: rgba(8,7,6,0.55); border: 1px solid rgba(244,234,210,0.14); border-radius: 999px; padding: 5px 11px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.slam-chip b { color: var(--rust); font-weight: 500; }
.slam-tag { position: absolute; top: 13px; left: 14px; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash-light);
  background: rgba(8,7,6,0.5); border: 1px solid rgba(244,234,210,0.12); border-radius: 999px; padding: 5px 11px; }

.slam-panel { display: flex; flex-direction: column; gap: 18px; }
.slam-panel .lead { font-family: var(--font-head); font-weight: 700; font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.12; letter-spacing: -0.02em; color: var(--bone); }
.slam-flow { list-style: none; display: flex; flex-direction: column; gap: 0; }
.slam-flow li { display: grid; grid-template-columns: 30px 1fr; gap: 13px; padding: 14px 0;
  border-bottom: 1px solid rgba(244,234,210,0.10); }
.slam-flow li:first-child { border-top: 1px solid rgba(244,234,210,0.10); }
.slam-flow .sn { font-family: var(--font-mono); font-size: 11px; color: var(--rust); padding-top: 2px; }
.slam-flow h6 { font-size: 14px; font-weight: 600; color: var(--bone); margin: 0 0 3px; letter-spacing: -0.01em; }
.slam-flow p { font-size: 13px; line-height: 1.55; color: var(--ash-light); margin: 0; }
.slam-flow code, .slam-panel code { font-family: var(--font-mono); font-size: 0.86em; color: var(--rust);
  background: rgba(198,48,26,0.12); padding: 1px 5px; border-radius: 5px; }
.slam-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.slam-meta .mc { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-top: 1px solid rgba(244,234,210,0.10); }
.slam-meta .mc .k { font-size: 11px; color: var(--ash-light); }
.slam-meta .mc .v { font-family: var(--font-mono); font-size: 13.5px; color: var(--bone); }
/* show only the active backend's panel */
.slam-pane { display: none; }
.slam-pane.on { display: flex; flex-direction: column; gap: 18px; animation: slamFade 0.5s var(--ease-out); }
@keyframes slamFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ─── Navigation · localization output (drift) ───────────────────── */
.drift-wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(20px, 4vw, 52px); align-items: center; }
@media (max-width: 880px) { .drift-wrap { grid-template-columns: 1fr; } }
.drift-stage { position: relative; aspect-ratio: 7 / 5; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border: 1px solid rgba(21,24,32,0.08); box-shadow: 0 30px 60px -36px rgba(21,24,32,0.28); }
.drift-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.drift-legend { position: absolute; top: 12px; left: 14px; display: flex; flex-direction: column; gap: 6px; }
.drift-legend span { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; }
.drift-legend i { width: 16px; height: 2px; border-radius: 2px; display: inline-block; }
.drift-out .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid rgba(21,24,32,0.10); }
.drift-out .row .lab { font-size: 13px; color: var(--ink-soft); }
.drift-out .row .pair { display: flex; gap: 18px; font-family: var(--font-mono); font-size: 15px; }
.drift-out .row .pair .w { color: var(--rust); } .drift-out .row .pair .v { color: #2e9457; }
.drift-note { font-size: 11.5px; line-height: 1.55; color: var(--ash); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════════
   ISSUE Nº 01 — comic & deco component library
   Bursts, narration boxes, stamps, speech bubbles, sticker tilts,
   plus print-frame overrides for the interactive stages.
═══════════════════════════════════════════════════════════════════ */

/* remaining stages get the comic-panel frame */
.viewer-3d, .swerve-stage, .drift-stage, .tw-console {
  border: var(--line-w) solid var(--ink); box-shadow: 6px 6px 0 rgba(21,24,32,0.9);
}
.slam-stage, .ck-stage { border: var(--line-w) solid rgba(217,161,63,0.55); box-shadow: 6px 6px 0 rgba(0,0,0,0.6); }
.arch-d, .arch-m { border: var(--line-w) solid var(--ink); box-shadow: 6px 6px 0 rgba(21,24,32,0.9); border-radius: 12px; }
.arch-fig { border: var(--line-w) solid var(--ink); box-shadow: 6px 6px 0 rgba(21,24,32,0.9); border-radius: 12px; }
.viewer-hint { border: 1.5px solid rgba(21,24,32,0.5); background: rgba(253,246,226,0.9); box-shadow: none; }
.spec span { border: 1.5px solid rgba(21,24,32,0.5); background: rgba(253,246,226,0.75); box-shadow: none; font-weight: 700; }
.dark-sec .spec span, .page-hero .spec span { border-color: rgba(217,161,63,0.5); background: rgba(253,246,226,0.06); color: var(--ash-light); box-shadow: none; font-weight: 400; }

/* ─── Action burst — a 16-point starburst with Bangers lettering.
   Use for subsystem onomatopoeia: SLAM! GRIP! WHIRR! ZAP!
   <span class="burst"><b>SLAM!</b></span>  (sm/lg variants) ─────────── */
.burst {
  position: relative; display: inline-grid; place-items: center;
  width: 150px; aspect-ratio: 1; padding: 26px;
  font-family: var(--font-comic); font-size: 27px; letter-spacing: 0.04em;
  color: #FFF6E4; text-transform: uppercase; text-align: center; line-height: 0.95;
  transform: rotate(-7deg);
  filter: drop-shadow(4px 4px 0 rgba(21,24,32,0.9));
  z-index: 3; pointer-events: none;
}
.burst::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--rust);
  clip-path: polygon(100% 50%, 85.31% 57.02%, 96.19% 69.13%, 79.93% 70%, 85.36% 85.36%, 70% 79.93%, 69.13% 96.19%, 57.02% 85.31%, 50% 100%, 42.98% 85.31%, 30.87% 96.19%, 30% 79.93%, 14.64% 85.36%, 20.07% 70%, 3.81% 69.13%, 14.69% 57.02%, 0% 50%, 14.69% 42.98%, 3.81% 30.87%, 20.07% 30%, 14.64% 14.64%, 30% 20.07%, 30.87% 3.81%, 42.98% 14.69%, 50% 0%, 57.02% 14.69%, 69.13% 3.81%, 70% 20.07%, 85.36% 14.64%, 79.93% 30%, 96.19% 30.87%, 85.31% 42.98%);
}
.burst.gold { color: var(--ink); } .burst.gold::before { background: var(--gold); }
.burst.night { color: var(--gold); } .burst.night::before { background: var(--ink); }
.burst.sm { width: 104px; font-size: 19px; padding: 20px; }
.burst.lg { width: 200px; font-size: 36px; padding: 36px; }
.burst.tilt-r { transform: rotate(6deg); }
/* pinned to a corner of a media panel */
.burst.pin { position: absolute; top: -34px; right: -22px; }
.burst.pin-l { position: absolute; top: -34px; left: -22px; transform: rotate(6deg); }
@media (max-width: 700px) { .burst.pin, .burst.pin-l { transform: scale(0.72) rotate(-7deg); top: -30px; right: -16px; } }
/* a pinned burst hangs past its panel's edge on purpose; on a phone that edge is the screen's, so tuck it in */
@media (max-width: 520px) { .burst.pin { right: -4px; } .burst.pin-l { left: -4px; } }

/* ─── Narration caption box — "MEANWHILE, IN THE WORKSHOP…" ───────────── */
.caption-box {
  display: inline-block; background: #F2C94C; color: var(--ink);
  border: var(--line-w) solid var(--ink); border-radius: 3px;
  box-shadow: 4px 4px 0 rgba(21,24,32,0.9);
  padding: 10px 16px; transform: rotate(-0.8deg);
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.5;
}
.caption-box.straight { transform: none; }

/* ─── Cover stamp — the issue chip ────────────────────────────────── */
.issue-chip {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 9px 13px 7px; background: var(--panel); color: var(--ink);
  border: var(--line-w) solid var(--ink); border-radius: 4px;
  box-shadow: 3px 3px 0 rgba(21,24,32,0.9);
  font-family: var(--font-comic); font-size: 15px; line-height: 1.1;
  letter-spacing: 0.08em; text-transform: uppercase; text-align: center;
}
.issue-chip small { font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; letter-spacing: 0.14em; color: var(--ash); }

/* ─── Price burst — a rough circle seal ───────────────────────────── */
.price-seal {
  display: inline-grid; place-items: center; text-align: center;
  width: 132px; aspect-ratio: 1; border-radius: 50%; padding: 10px;
  background: var(--rust); color: #FFF6E4; border: var(--line-w) solid var(--ink);
  box-shadow: 4px 4px 0 rgba(21,24,32,0.9); transform: rotate(6deg);
  font-family: var(--font-comic); line-height: 1;
}
.price-seal b { font-size: 24px; display: block; letter-spacing: 0.02em; }
.price-seal span { font-family: var(--font-mono); font-weight: 700; font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-top: 4px; opacity: 0.9; }
/* the second seal sells: ink, tilted the other way, and a link */
.price-seal-buy { background: var(--ink); color: var(--bone); transform: rotate(-5deg); text-decoration: none; cursor: pointer;
  transition: background 0.18s ease, transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out); }
.price-seal-buy:hover { background: var(--hi); color: #FFF6E4; transform: rotate(-5deg) translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(21,24,32,0.9); }

/* ─── Speech bubble ───────────────────────────────────────────────── */
.speech {
  position: relative; display: inline-block;
  background: var(--panel); color: var(--ink);
  border: var(--line-w) solid var(--ink); border-radius: 16px;
  box-shadow: 4px 4px 0 rgba(21,24,32,0.9);
  padding: 14px 20px; font-family: var(--font-comic); font-size: 19px; letter-spacing: 0.04em;
}
.speech::before, .speech::after { content: ''; position: absolute; left: 34px; }
.speech::before { bottom: -16px; border: 8px solid transparent; border-top: 16px solid var(--ink); border-left-width: 4px; border-right-width: 12px; }
.speech::after { bottom: -10.5px; left: 36.5px; border: 6px solid transparent; border-top: 13px solid var(--panel); border-left-width: 3px; border-right-width: 9px; }

/* ─── Deco chevron band (marquee edge) ────────────────────────────── */
.deco-band { height: 12px; background:
  repeating-linear-gradient(45deg, var(--gold) 0 8px, var(--ink) 8px 16px);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

/* ─── Sticker tilts ───────────────────────────────────────────────── */
.tilt-1 { transform: rotate(-1.2deg); }
.tilt-2 { transform: rotate(0.9deg); }
.tilt-3 { transform: rotate(-0.5deg); }

/* ─── Comic panel utility (framed figure w/ halftone corner) ──────── */
.panel-frame {
  position: relative; background: var(--panel);
  border: var(--line-w) solid var(--ink); border-radius: 12px;
  box-shadow: 6px 6px 0 rgba(21,24,32,0.9); overflow: hidden;
}
.panel-frame::after {
  content: ''; position: absolute; right: 0; bottom: 0; width: 42%; height: 46%;
  background-image: var(--dots-red); background-size: 14px 14px; opacity: 0.5; pointer-events: none;
  mask-image: radial-gradient(ellipse at 100% 100%, black 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 100%, black 15%, transparent 72%);
}

/* ─── Figure label — academic caption in comic clothes ────────────── */
.fig-label {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ash); letter-spacing: 0.02em;
}
.fig-label b { font-family: var(--font-comic); font-weight: 400; font-size: 13px; letter-spacing: 0.1em; color: var(--orange); text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  .burst, .caption-box, .price-seal { transform: none !important; }
}

/* ─── Cover badges (home hero, right rail) ────────────────────────── */
.cover-badges {
  position: absolute; right: var(--gutter); top: 22%; z-index: 4;
  display: flex; flex-direction: column; align-items: flex-end; gap: 18px;
}
@media (max-width: 980px) { .cover-badges { display: none; } }
html.js .cover-badges { opacity: 0; animation: fadeOnly 1.2s var(--ease-out) 0.9s both; }
.tab-panel { position: relative; }

/* ─── Field-notes wall — masonry of framed panels with comic overlays ── */
.wall { columns: 3; column-gap: 18px; }
@media (max-width: 1020px) { .wall { columns: 2; } }
@media (max-width: 620px)  { .wall { columns: 1; } }
.wall-item {
  position: relative; break-inside: avoid; margin: 0 0 18px;
  background: var(--panel); border: var(--line-w) solid var(--ink);
  border-radius: 12px; overflow: hidden; box-shadow: 6px 6px 0 rgba(21,24,32,0.9);
  transform: rotate(-0.4deg);
}
.wall-item.t2 { transform: rotate(0.4deg); }
.wall-item img, .wall-item video { display: block; width: 100%; height: auto; }
.wall-item .burst {
  position: absolute; top: 10px; right: 10px;
  width: 88px; font-size: 17px; padding: 16px; transform: rotate(8deg);
  filter: drop-shadow(3px 3px 0 rgba(21,24,32,0.9));
}
.wall-cap {
  position: absolute; left: 12px; bottom: 12px; margin: 0;
  max-width: calc(100% - 24px);
  background: #F2C94C; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 3px;
  box-shadow: 3px 3px 0 rgba(21,24,32,0.9);
  padding: 6px 10px; transform: rotate(-0.6deg);
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.4;
}
.wall-item.t2 .wall-cap { transform: rotate(0.5deg); }

/* ─── Wild marquee cards now carry real photographs ───────────────── */
.wild-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ─── Embedded simulator (home) ───────────────────────────────────── */
.sim-embed { position: relative; }
.sim-stage {
  position: relative; aspect-ratio: 16 / 9;
  border: var(--line-w) solid var(--ink); border-radius: 12px; overflow: hidden;
  box-shadow: 6px 6px 0 rgba(21,24,32,0.9); background: #0B0E15;
}
@media (max-width: 700px) { .sim-stage { aspect-ratio: 3 / 4; } }
.sim-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.sim-boot-veil {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 45%, rgba(21,24,32,0.18), rgba(21,24,32,0.6));
}
.sim-boot-note {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #FFF6E4; background: rgba(21,24,32,0.6); padding: 6px 11px; border-radius: 6px;
}
.sim-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ─── Cover robot — the hero rig that follows your cursor ─────────── */
.hero-rig {
  position: absolute; inset: 4% 0 2% 0;
  z-index: 3; pointer-events: none;
  opacity: 0; transition: opacity 1.4s var(--ease-out);
}
.cover-badges { z-index: 4; }
.hero-rig.on { opacity: 1; }
.hero-rig canvas { width: 100%; height: 100%; display: block; }
@media (max-width: 979px) { .hero-rig { display: none; } }

/* ─── Interactive architecture map (Figure 1, HTML edition) ───────── */
.arch-map { position: relative; background: var(--panel); border: var(--line-w) solid var(--ink);
  border-radius: 12px; box-shadow: 6px 6px 0 rgba(21,24,32,0.9); padding: clamp(18px, 3vw, 40px); }
.arch-toggle { display: inline-flex; gap: 2px; margin-bottom: 20px; border: var(--line-w) solid var(--ink);
  border-radius: 10px; overflow: hidden; background: var(--bone); box-shadow: 3px 3px 0 rgba(21,24,32,0.9); }
.arch-toggle button { font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 9px 16px 7px; border: 0; background: none; color: var(--ash);
  cursor: pointer; }
.arch-toggle button.on { background: var(--ink); color: var(--gold); }
.arch-layer { border: var(--line-w) solid var(--ink); border-radius: 10px; background: var(--bone);
  padding: 14px 16px 15px; transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out); }
.arch-layer:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(21,24,32,0.9); }
.arch-layer.twin { border-style: dashed; }
.arch-name { font-family: var(--font-comic); font-size: 15px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.arch-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.arch-chips a { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft);
  text-decoration: none; padding: 6px 11px; border: 1.5px solid rgba(21,24,32,0.55);
  border-radius: 7px; background: var(--panel); transition: background 0.15s, color 0.15s, transform 0.15s var(--ease-out); }
.arch-chips a:hover { background: var(--rust); border-color: var(--ink); color: #FFF6E4; transform: translateY(-1px); }
.arch-flow { display: flex; justify-content: center; gap: 26px; padding: 8px 0;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.arch-flow .dn { color: var(--rust); font-weight: 700; }
.arch-flow .up { color: var(--green); font-weight: 700; }
.arch-fork { margin-top: 4px; }
.arch-fork-label { text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--ash);
  padding: 10px 0 14px; }
.arch-branches { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 880px) { .arch-branches { grid-template-columns: 1fr; } }
.arch-branch { display: flex; flex-direction: column; gap: 0; border-radius: 10px;
  transition: opacity 0.35s var(--ease-out), filter 0.35s var(--ease-out); }
.arch-branch-tag { font-family: var(--font-comic); font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-deep); padding: 0 2px 8px; }
.arch-map.pick-hw  .arch-branch[data-branch="sim"],
.arch-map.pick-sim .arch-branch[data-branch="hw"] { opacity: 0.62; filter: saturate(0.55); }
.arch-flow.solo { padding: 6px 0; }
/* shared hover tip */
.arch-tip { position: absolute; z-index: 30; max-width: 300px; padding: 10px 13px;
  background: #F2C94C; color: var(--ink); border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(21,24,32,0.9);
  font-family: var(--font-sans); font-size: 12.5px; line-height: 1.5; font-weight: 500;
  opacity: 0; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s; pointer-events: none; }
.arch-tip.on { opacity: 1; transform: none; }

/* marquee: manual rail */
.marquee { overflow-x: auto; scrollbar-width: none; cursor: grab; scroll-snap-type: x proximity; }
.marquee::-webkit-scrollbar { display: none; }
.marquee.dragging { cursor: grabbing; scroll-snap-type: none; }
.marquee-track { animation: none !important; width: max-content; padding: 6px 4px 14px; }
.wild-card { scroll-snap-align: center; }
.wild-card > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.marquee-hint { font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); text-align: center; margin: 0 0 12px; }

/* ─── Paper figures & tables ──────────────────────────────────────── */
.paper-fig { background: var(--panel); border: var(--line-w) solid var(--ink); border-radius: 12px;
  box-shadow: 6px 6px 0 rgba(21,24,32,0.9); padding: clamp(10px, 1.6vw, 20px); }
.paper-fig img { display: block; width: 100%; height: auto; }
.paper-fig + .fig-label, .paper-fig-cap { display: block; margin-top: 12px; }
.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.5vw, 30px); align-items: start; }
@media (max-width: 880px) { .paper-grid { grid-template-columns: 1fr; } }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .data-table { min-width: 640px; }
/* .fit — the whole table always visible, no horizontal scroll at any width:
   the cells compress instead (used by the platform survey). */
.table-scroll.fit { overflow: visible; }
.table-scroll.fit .data-table { min-width: 0; width: 100%; }
@media (max-width: 1100px) {
  .table-scroll.fit .data-table th { font-size: 11px; padding: 10px 8px; }
  .table-scroll.fit .data-table td { font-size: 13px; padding: 10px 8px; }
}
@media (max-width: 760px) {
  .table-scroll.fit .data-table th { font-size: 9px;  padding: 8px 4px; letter-spacing: 0.02em; }
  .table-scroll.fit .data-table td { font-size: 11px; padding: 8px 4px; }
}
.data-table td .ok { color: var(--green); font-weight: 700; }
.data-table td .no { color: var(--ash); }
.poster-wrap { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
@media (max-width: 760px) { .poster-wrap { grid-template-columns: 1fr; } }
.kr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 28px); margin: clamp(20px,3vh,32px) 0; }
@media (max-width: 820px) { .kr-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; } }

/* ─── Anatomy explorer (anatomy.html + the home section) ─────────── */
  /* COMPACT, and the robot right beside the buttons. The stage used to be
     `1fr` of the full page width and `100vh - 220px` tall, so on a large screen
     it became an 880 x 700 box with a small robot floating in the middle of it
     and a screenful of empty page underneath.
     Capping the HEIGHT is what fixed that; capping the WIDTH at 620 px as well
     was the overcorrection — it left the stage ending mid-page with a column
     of dead paper to its right. The stage takes the rest of the row again, and
     the robot is kept large by fitting the camera to the rig's bounding BOX
     rather than its bounding sphere (assets/anatomy.js). */
  .anat-wrap { display: grid; grid-template-columns: 272px minmax(0, 1fr);
    gap: clamp(16px, 2.2vw, 28px); align-items: start; }
  @media (max-width: 880px) { .anat-wrap { grid-template-columns: 1fr; } }
  .anat-rail { display: flex; flex-direction: column; gap: 8px; }
  .anat-rail button {
    text-align: left; padding: 12px 14px; cursor: pointer;
    background: var(--panel); border: var(--line-w) solid var(--ink); border-radius: 10px;
    box-shadow: 3px 3px 0 rgba(21,24,32,0.9);
    transition: transform 0.2s var(--ease-out), background 0.2s ease, box-shadow 0.2s var(--ease-out);
    font: inherit; color: inherit;
  }
  .anat-rail button:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(21,24,32,0.9); }
  .anat-rail button.on { background: var(--orange); color: #FFF9F0; }
  .anat-rail button b { display: block; font-family: var(--font-comic); font-weight: 400; font-size: 17px; letter-spacing: 0.06em; }
  .anat-rail button span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; opacity: 0.75; }
  .anat-copy { margin-top: 14px; }
  .anat-copy p { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
  .anat-stage { min-height: 430px; height: min(62vh, 560px); }
  @media (max-width: 880px) { .anat-stage { height: 60vh; min-height: 420px; } .anat-rail { flex-direction: row; flex-wrap: wrap; } .anat-rail button { flex: 1 1 40%; } }

/* ─── Anatomy stage, unframed: the robot lives ON the page ────────── */
.anat-free { position: relative; border: 0 !important; background: transparent !important;
  box-shadow: none !important; border-radius: 0 !important; overflow: visible; }
.anat-free canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.anat-free:active canvas { cursor: grabbing; }
.anat-free .viewer-loading { position: absolute; inset: 0; background: none; }
.anat-free .viewer-loading::before { display: none; }
.anat-free .ph-label { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.anat-free .viewer-hint { position: absolute; }
.anat-free.loaded .viewer-loading { opacity: 0; pointer-events: none; }
/* faint halftone ground behind the floating robot */
#anatomy, .anat-section { position: relative; }
.anat-ground { position: absolute; inset: 0; pointer-events: none;
  background-image: var(--dots-ink); background-size: 26px 26px; opacity: 0.35;
  mask-image: radial-gradient(ellipse at 62% 55%, black 0%, transparent 66%);
  -webkit-mask-image: radial-gradient(ellipse at 62% 55%, black 0%, transparent 66%); }

/* ─── Tables, comic edition — chunky ink, Bangers headers, gold "ours" row ── */
.data-table { border: var(--line-w) solid var(--ink); border-radius: 10px; overflow: hidden;
  box-shadow: 5px 5px 0 rgba(21,24,32,0.9); background: var(--panel); border-collapse: separate; border-spacing: 0; }
.data-table th { background: var(--ink); color: var(--gold);
  font-family: var(--font-comic); font-weight: 400; font-size: 14px; letter-spacing: 0.1em;
  padding: 12px 14px; border-bottom: none; }
.data-table td { border-bottom: 1.5px solid rgba(21,24,32,0.18); font-weight: 500; }
.data-table tbody tr:nth-child(even) td { background: rgba(244,234,210,0.55); }
.data-table tbody tr:hover td { background: rgba(217,161,63,0.14); }
.data-table tr.best td { background: #F7E3AE; border-top: 3px solid var(--ink); font-weight: 700; }
.data-table tr.best td:first-child { color: var(--rust); font-family: var(--font-comic); font-weight: 400; font-size: 16px; letter-spacing: 0.05em; }
.dark-sec .data-table { background: rgba(253,246,226,0.04); border-color: rgba(217,161,63,0.55); box-shadow: 5px 5px 0 rgba(0,0,0,0.6); }
.dark-sec .data-table td { color: var(--bone); border-bottom-color: rgba(244,234,210,0.12); }
.dark-sec .data-table tbody tr:nth-child(even) td { background: rgba(253,246,226,0.05); }
/* topic/contract tables pick up the voice too */
.tt th { font-family: var(--font-comic); font-weight: 400; font-size: 13px; letter-spacing: 0.1em; color: var(--rust); border-bottom: 2px solid var(--ink); }
.dark-sec .tt th { color: var(--gold); border-color: rgba(217,161,63,0.55); }

/* ─── Abstract spread: copy beside the as-built photograph ────────── */
.abstract-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(28px, 4vw, 64px); }
@media (max-width: 880px) { .abstract-grid { grid-template-columns: 1fr; gap: 26px; } }


/* ─── Shout type — the microduck "TEACH IT NEW TRICKS" treatment ──── */
.shout { font-family: 'Archivo', var(--font-head); font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 0.92; font-size: clamp(40px, 6vw, 92px); }
.shout .solid { display: block; color: var(--ink);
  text-shadow: 4px 4px 0 var(--orange); }
.dark-sec .shout .solid { color: var(--bone); text-shadow: 4px 4px 0 var(--orange); }
.shout .hollow { display: block; color: transparent;
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke; }
.dark-sec .shout .hollow { -webkit-text-stroke: 2.5px var(--bone); }
@supports not (-webkit-text-stroke: 2px black) {
  .shout .hollow { color: var(--ink); }
  .dark-sec .shout .hollow { color: var(--bone); }
}

/* ─── Step cards — tilted panels with per-card colored offset shadows ── */
.contrib-grid { counter-reset: pillar; }
.contrib-cell { counter-increment: pillar; position: relative; }
.contrib-cell::before { content: "0" counter(pillar);
  display: block; font-family: var(--font-comic); font-size: 30px; letter-spacing: 0.06em;
  margin-bottom: 10px; }
.contrib-cell:nth-child(1) { transform: rotate(-0.8deg); box-shadow: 7px 7px 0 var(--orange); }
.contrib-cell:nth-child(2) { transform: rotate(0.6deg);  box-shadow: 7px 7px 0 var(--yellow); }
.contrib-cell:nth-child(3) { transform: rotate(0.5deg);  box-shadow: 7px 7px 0 var(--blue); }
.contrib-cell:nth-child(4) { transform: rotate(-0.6deg); box-shadow: 7px 7px 0 var(--rust); }
.contrib-cell:nth-child(1)::before { color: var(--orange); }
.contrib-cell:nth-child(2)::before { color: var(--gold-deep); }
.contrib-cell:nth-child(3)::before { color: var(--blue); }
.contrib-cell:nth-child(4)::before { color: var(--rust); }
.contrib-cell:hover { transform: rotate(0deg) translate(-2px, -2px); }

/* ─── NYC die-cut stickers + nav head ─────────────────────────────── */
.sticker { position: absolute; z-index: 3; pointer-events: none;
  filter: drop-shadow(3px 4px 0 rgba(21,24,32,0.35)); }
@media (max-width: 880px) { .sticker { width: 68px !important; } .sticker[style*="position:static"] { width: 56px !important; } }
.nav-head { height: 26px; width: auto; display: inline-block; }

/* price seal: text properly centred in the circle */
.price-seal { place-content: center; gap: 3px; padding: 0 !important; }
.price-seal b { font-size: 26px; }
.price-seal span { margin-top: 0 !important; }

/* ─── Retro-game ROS graph — paper edition (matches the arch map) ── */
.ros-game { background: var(--panel); border: var(--line-w) solid var(--ink); border-radius: 12px;
  box-shadow: 6px 6px 0 rgba(21,24,32,0.9); padding: clamp(14px, 2.4vw, 28px);
  position: relative; overflow: hidden; }
.ros-game::after { content: ''; position: absolute; right: 0; bottom: 0; width: 40%; height: 45%;
  background-image: var(--dots-red); background-size: 14px 14px; opacity: 0.4; pointer-events: none;
  mask-image: radial-gradient(ellipse at 100% 100%, black 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 100%, black 15%, transparent 72%); }
.ros-game > * { position: relative; z-index: 1; }
.rg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  flex-wrap: wrap; margin-bottom: 14px; }
.rg-title { font-family: var(--font-comic); font-size: 16px; letter-spacing: 0.12em; color: var(--orange); }
.rg-coin { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--ash); }
.rg-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 10px 0; }
.rg-tile { min-width: 118px; text-align: center; padding: 9px 10px 8px;
  background: var(--bone); border: 2px solid var(--ink); border-radius: 7px;
  box-shadow: 3px 3px 0 rgba(21,24,32,0.85);
  transition: transform 0.12s ease, box-shadow 0.12s var(--ease-out); }
.rg-tile b { display: block; font-family: var(--font-mono); font-weight: 700; font-size: 12.5px;
  color: var(--ink); letter-spacing: 0.02em; }
.rg-tile span { font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-soft); opacity: 0.75; letter-spacing: 0.04em; }
.rg-tile:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(21,24,32,0.85); }
.rg-tile.blue { background: #A8CBE4; }
.rg-tile.orange { background: #F8C89E; }
.rg-tile.green { background: #9AD8B2; }
.rg-tile.yellow { background: var(--yellow); }
.rg-bus { margin: 8px 0; padding: 9px 14px 8px; border-radius: 7px;
  font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.1em; color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(21,24,32,0.85); }
.rg-bus code { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0; margin-left: 8px; }
.rg-bus.blue { background: #A8CBE4; }
.rg-bus.green { background: #9AD8B2; }
.rg-blink { display: inline-block; animation: rgBlink 1.1s steps(2) infinite; margin-right: 6px; color: var(--rust); }
@keyframes rgBlink { 50% { opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) { .rg-blink { animation: none; } }

/* ─── Nav CTA — the inviting right-side button ────────────────────── */
.nav-cta { font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.06em;
  text-transform: uppercase; color: #FFF9F0 !important; background: var(--hi);
  border: 2px solid var(--ink); border-radius: 9px; padding: 6px 13px 5px !important;
  box-shadow: 3px 3px 0 rgba(21,24,32,0.9); opacity: 1 !important; white-space: nowrap;
  transition: transform 0.15s var(--ease-out), background 0.15s ease, box-shadow 0.15s var(--ease-out); }
.nav-cta:hover { background: var(--hi-deep) !important; transform: translate(-1px,-1px);
  box-shadow: 4px 4px 0 rgba(21,24,32,0.9); }

/* mobile: contract tables scroll inside themselves, never widen the page */
@media (max-width: 700px) {
  .tt { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sub-block { grid-template-columns: 1fr; }
}
/* grids never inherit a child table's min-width */
.bom-grid > div, .paper-grid > div, .abstract-grid > div, .anat-wrap > * { min-width: 0; }
@media (max-width: 700px) { .table-scroll .data-table { min-width: 560px; } }
@media (max-width: 700px) {
  .appgal.vp figure { width: 86vw; }
  .appgal.ios figure { width: 62vw; }
  .feature > * { min-width: 0; max-width: 100%; }
}

/* ─── Tabs are context-aware: readable on paper by default, cream on night ── */
.tab-bar { border-bottom-color: rgba(21,24,32,0.35); }
.tab-btn { color: var(--ash); }
.tab-btn.on { color: var(--orange); border-bottom-color: var(--orange); }
.dark-sec .tab-bar, .page-hero .tab-bar { border-bottom-color: rgba(217,161,63,0.5); }
.dark-sec .tab-btn, .page-hero .tab-btn { color: rgba(244,234,210,0.5); }
.dark-sec .tab-btn.on, .page-hero .tab-btn.on { color: var(--gold); border-bottom-color: var(--gold); }

/* ─── Scroll cue, comic edition ───────────────────────────────────── */
.scroll-cue { gap: 10px; }
.scroll-cue > span:first-child {
  font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.12em;
  color: var(--ink); background: var(--yellow);
  border: 2px solid var(--ink); border-radius: 3px; padding: 6px 11px 5px;
  box-shadow: 3px 3px 0 rgba(21,24,32,0.9); transform: rotate(-3deg);
}
.scroll-cue .cue-line { display: none; }
.scroll-cue::after { content: '▼'; font-size: 19px; color: var(--ink);
  animation: cueBounce 1.4s var(--ease-in-out) infinite; }
.page-hero .scroll-cue::after { color: var(--gold); }
@keyframes cueBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }

/* ─── Mobile: the cover robot lives in the hero's empty top half ──── */
@media (max-width: 979px) {
  .hero-rig { display: block; inset: 84px 0 auto 0; height: 44vh; min-height: 300px; }
}
/* phones: the robot stands where the eyebrow would be; the tag line below says the same */
@media (max-width: 700px) { .hero-eyebrow { display: none; } }

/* ─── Mobile anatomy: chips left · living model right ─────────────── */
@media (max-width: 880px) {
  .anat-wrap { display: grid !important; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; align-items: start; }
  .anat-wrap > aside { display: contents; }
  /* explicit placement — auto-flow was dropping the stage into the
     118px column on its own row (tiny robot, chips above) */
  .anat-rail { grid-column: 1; grid-row: 1; }
  .anat-wrap .anat-stage { grid-column: 2; grid-row: 1; }
  .anat-copy { grid-column: 1 / -1; grid-row: 2; }
  .anat-rail { flex-direction: column !important; gap: 6px; }
  .anat-rail button { flex: none !important; padding: 8px 9px 7px; border-radius: 8px;
    box-shadow: 2px 2px 0 rgba(21,24,32,0.9); }
  .anat-rail button b { font-size: 12.5px; letter-spacing: 0.04em; }
  .anat-rail button span { font-size: 8.5px; display: block; }
  .anat-stage { height: 64vh !important; min-height: 380px !important; }
  .anat-copy { grid-column: 1 / -1; margin-top: 2px; }
  .anat-copy p { font-size: 13px; }
}

/* ─── Mobile compaction: buttons, tabs, cards, rhythm ─────────────── */
@media (max-width: 700px) {
  .pad-y { padding: clamp(52px, 8vh, 80px) 0; }
  .btn { font-size: 13.5px; padding: 9px 16px 8px; gap: 6px; box-shadow: 3px 3px 0 rgba(21,24,32,0.9); }
  .hero-actions { gap: 8px; }
  .tab-btn { font-size: 13px; padding: 9px 12px 7px; }
  .contrib-cell { padding: 20px 18px; }
  .contrib-cell::before { font-size: 22px; margin-bottom: 6px; }
  .contrib-grid { gap: 12px; }
  .sec-head { margin-bottom: clamp(34px, 5vh, 52px); }
  .rg-tile { min-width: 88px; padding: 7px 7px 6px; }
  .rg-tile b { font-size: 11px; }
  .rg-bus { font-size: 12px; }
  .rg-bus code { font-size: 9px; }
  .kr-grid { gap: 18px 12px; }
  .caption-box { font-size: 11px; padding: 7px 11px; }
  .stat-num { font-size: clamp(38px, 11vw, 56px); }
  .spec span { font-size: 10px; padding: 5px 9px; }
}

/* ─── Mobile: Figure 1 fits a phone screen ────────────────────────── */
@media (max-width: 700px) {
  .arch-map { padding: 12px; }
  .arch-toggle button { font-size: 12px; padding: 7px 11px 5px; }
  .arch-layer { padding: 9px 10px; border-radius: 8px; }
  .arch-name { font-size: 12px; margin-bottom: 6px; letter-spacing: 0.06em; }
  .arch-chips { gap: 4px; }
  .arch-chips a { font-size: 9.5px; padding: 3px 7px; border-width: 1px; border-radius: 5px; }
  .arch-flow { font-size: 8.5px; padding: 4px 0; gap: 14px; }
  .arch-fork-label { font-size: 9px; padding: 6px 0 8px; }
  .arch-branch-tag { font-size: 11px; padding-bottom: 4px; }
  .arch-branches { gap: 10px; }
  /* pillars: one swipeable row — 2×2 left 11 px type in 150 px columns */
  .contrib-grid { display: grid; grid-template-columns: none !important; grid-auto-flow: column;
    grid-auto-columns: 80%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 12px; scroll-padding: 0 16px; }
  .contrib-grid::-webkit-scrollbar { display: none; }
  .contrib-cell { padding: 14px 14px; scroll-snap-align: start; }
  .contrib-cell::before { font-size: 18px; margin-bottom: 4px; }
  .contrib-cell h3 { font-size: 14.5px; margin-bottom: 6px; }
  .contrib-cell p { font-size: 13px; line-height: 1.5; }
  .contrib-cell:hover { transform: none; }
}
/* mobile: title stickers pin to the header corner — no wasted line */
/* title stickers pin to the section header's top-right at EVERY size —
   inline placement was pushing them onto their own line */
.sec-head, .sec-head-center { position: relative; }
.sec-head .sticker, .sec-head-center .sticker {
  position: absolute !important; top: -18px; right: 0;
  width: 84px !important; margin: 0 !important;
}
.sec-head .sticker + .sticker, .sec-head-center .sticker + .sticker { right: 88px; }
@media (max-width: 700px) {
  .sec-head .sticker, .sec-head-center .sticker { top: -34px; width: 58px !important; }
  .sec-head .sticker + .sticker, .sec-head-center .sticker + .sticker { right: 62px; }
}

/* ─── Comic-page devices (Batman/Spidey/TMNT references) ──────────── */
/* pink narration box — the Batman night-caption voice */
.caption-box.pink { background: #F2C4D0; }
/* narration tucked INTO a panel's top corner */
.panel-note { position: absolute; top: 10px; left: 10px; z-index: 3; max-width: 72%;
  background: #F2C4D0; color: var(--ink); border: 2px solid var(--ink); border-radius: 2px;
  box-shadow: 2px 3px 0 rgba(21,24,32,0.85); padding: 5px 9px 4px; transform: rotate(-1deg);
  font-family: var(--font-mono); font-weight: 700; font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.45; }
.panel-note.yellow { background: var(--yellow); transform: rotate(0.8deg); }
/* speech bubble pinned onto a panel — classic oval balloon */
.panel-speech { position: absolute; z-index: 3; max-width: 64%;
  background: #FFF9F0; color: var(--ink); border: 3px solid var(--ink);
  border-radius: 50%; padding: 13px 22px; text-align: center;
  font-family: var(--font-comic); font-size: 15px;
  letter-spacing: 0.05em; line-height: 1.15;
  filter: drop-shadow(2px 3px 0 rgba(21,24,32,0.45)); }
/* tail: bottom-left by default */
.panel-speech::before { content: ''; position: absolute; bottom: -15px; left: 22%;
  border: 8px solid transparent; border-top: 16px solid var(--ink);
  border-left-width: 2px; border-right-width: 12px; transform: rotate(8deg); }
.panel-speech::after { content: ''; position: absolute; bottom: -9px; left: calc(22% + 3px);
  border: 6px solid transparent; border-top: 12px solid #FFF9F0;
  border-left-width: 1px; border-right-width: 9px; transform: rotate(8deg); }
.panel-speech.tail-br::before { left: auto; right: 22%; transform: rotate(-8deg) scaleX(-1); }
.panel-speech.tail-br::after { left: auto; right: calc(22% + 3px); transform: rotate(-8deg) scaleX(-1); }
/* thought bubble variant */
.panel-speech.thought { border-radius: 50%; }
.panel-speech.thought::before, .panel-speech.thought::after { display: none; }
.panel-speech.thought .tb { position: absolute; background: #FFF9F0; border: 2.5px solid var(--ink); border-radius: 50%; }
/* TMNT-style centre title burst.
   It sits OUTSIDE the horizontally-scrolling rail now. As a child of .marquee
   it scrolled away with the cards, which is the one place a title must not go
   — and on the dark section its ink body read as a hole. NYC-cab yellow with
   ink lettering makes it the loudest thing in the panel, which is the job. */
.marquee-wrap { position: relative; padding-top: 62px; }
/* the sfx sit in this band, above the scroller that used to clip them */
.marquee-wrap > .ambient { z-index: 4; }
.adv-burst { position: absolute; z-index: 6; top: 0; left: 50%;
  width: min(340px, 74vw); text-align: center;
  transform: translateX(-50%) rotate(-2deg); pointer-events: none;
  filter: drop-shadow(5px 6px 0 rgba(0,0,0,0.6)); }
.adv-burst .ab-in { background: var(--pop); border: 3px solid var(--ink);
  clip-path: polygon(2% 18%, 10% 12%, 8% 2%, 20% 8%, 30% 0%, 36% 9%, 50% 2%, 60% 10%, 72% 1%, 76% 11%, 90% 5%, 90% 15%, 100% 20%, 94% 34%, 100% 48%, 93% 60%, 99% 76%, 88% 80%, 92% 94%, 76% 90%, 68% 100%, 58% 91%, 44% 99%, 38% 89%, 24% 97%, 22% 86%, 8% 91%, 12% 76%, 0% 68%, 7% 52%, 1% 36%, 8% 28%);
  padding: 26px 30px 30px; }
.adv-burst .ab-mabel { font-family: var(--font-comic); font-size: 38px; color: var(--ink);
  letter-spacing: 0.06em; line-height: 0.9; display: block;
  text-shadow: 2px 2px 0 rgba(255,255,255,0.45); }
.adv-burst .ab-sub { font-family: var(--font-comic); font-size: 15px; color: var(--rust);
  letter-spacing: 0.12em; display: block; margin-top: 4px; }
/* panel-in-panel inset — the Spidey close-up */
.panel-inset { position: absolute; right: 12px; bottom: 12px; z-index: 3;
  width: 34%; border: 4px solid var(--yellow); outline: 2.5px solid var(--ink);
  box-shadow: 3px 4px 0 rgba(21,24,32,0.8); transform: rotate(1.5deg); display: block; }
@media (max-width: 700px) {
  .panel-speech { font-size: 11px; padding: 6px 9px 5px; }
  .adv-burst .ab-mabel { font-size: 26px; } .adv-burst .ab-sub { font-size: 12px; }
}

/* ─── Exaggerated comic lettering (Crime Alley / K-RAWSH refs) ────── */
/* jumpy baseline: letters wobble off the line */
.jumpy span { display: inline-block; }
.jumpy span:nth-child(4n+1) { transform: rotate(-3deg) translateY(1px); }
.jumpy span:nth-child(4n+2) { transform: rotate(2deg) translateY(-2px); }
.jumpy span:nth-child(4n+3) { transform: rotate(-1.5deg) translateY(2px); }
.jumpy span:nth-child(4n)   { transform: rotate(3deg) translateY(-1px); }
.hero-sub .rl:nth-child(3n+1) { transform: rotate(-2.5deg) translateY(1px); }
.hero-sub .rl:nth-child(3n+2) { transform: rotate(2deg) translateY(-1.5px); }
/* K-RAWSH! floating sound-effect lettering — no box, just outlined type */
.sfx {
  position: absolute; z-index: 6; pointer-events: none;
  font-family: var(--font-comic); font-size: clamp(34px, 4.5vw, 64px);
  letter-spacing: 0.04em; color: var(--yellow);
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke;
  text-shadow: 3px 4px 0 rgba(21,24,32,0.55);
  transform: rotate(-8deg);
}
.sfx.red { color: var(--rust); } .sfx.orange { color: var(--orange); } .sfx.green { color: #7ED957; }
.sfx.pop { animation: sfxPop 1.4s var(--spring) both; }
@keyframes sfxPop {
  0% { opacity: 0; transform: rotate(-8deg) scale(0.3); }
  18% { opacity: 1; transform: rotate(-8deg) scale(1.15); }
  30% { transform: rotate(-8deg) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: rotate(-8deg) scale(1.05) translateY(-14px); }
}
/* ambient scene lettering — the "Caw Caw" voice */
.ambient {
  position: absolute; z-index: 2; pointer-events: none;
  font-family: var(--font-comic); font-size: clamp(16px, 1.8vw, 24px);
  letter-spacing: 0.08em; color: var(--gold); opacity: 0.85;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.6);
}
@media (prefers-reduced-motion: reduce) { .sfx.pop { animation: none; opacity: 0; } }
/* mobile: wall media never taller than 4:3 — portrait clips crop to fit */
@media (max-width: 700px) {
  .wall-item img, .wall-item video { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; }
}

/* ─── The build comic strip — read it like a page ─────────────────── */
.comic-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  background: var(--panel); border: var(--line-w) solid var(--ink); border-radius: 12px;
  box-shadow: 6px 6px 0 rgba(21,24,32,0.9); padding: clamp(12px, 1.8vw, 20px);
  margin: 8px 0 clamp(24px, 4vh, 40px); }
@media (max-width: 880px) { .comic-strip { grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; } }
.strip-panel { position: relative; display: block; text-decoration: none; color: inherit;
  border: 2.5px solid var(--ink); border-radius: 6px; overflow: hidden;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out); }
.strip-panel:hover { transform: translate(-2px,-2px) rotate(-0.5deg); box-shadow: 5px 5px 0 rgba(21,24,32,0.9); z-index: 2; }
.strip-panel .panel-note { max-width: 88%; }
.strip-cap { display: block; background: var(--ink); color: var(--bone);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em;
  line-height: 1.45; padding: 8px 10px; }

/* A `.tight` table is a two-column key/value list, so it never needs the
   640 px floor `.table-scroll` puts under a wide data table. That floor used
   to apply on DESKTOP too, and the two SLAM tables sit in a half-width grid
   cell — so both of them scrolled sideways and ate their own row labels
   ("...ution", "...range used"). This is unconditional now; the media query
   below only tunes the type. */
.table-scroll.tight { overflow: visible; }
.table-scroll.tight .data-table { min-width: 0; width: 100%; table-layout: fixed; }
.table-scroll.tight .data-table td { word-break: break-word; }
.table-scroll.tight .data-table td:first-child { width: 44%; }
.table-scroll.tight .data-table td:last-child { text-align: right; }
@media (max-width: 700px) {
  .table-scroll.tight .data-table td { font-size: 12px; padding: 9px 10px; }
}
@media (max-width: 760px) {
  .wbc-block { display: block !important; position: relative; }
  .wbc-stage { height: 74vh !important; min-height: 480px !important; }
  .wbc-ctl {
    position: absolute !important; left: 8px; right: 8px; bottom: 8px; top: auto !important;
    width: auto !important; max-width: none; padding: 10px 12px !important; gap: 8px !important;
    background: rgba(253,246,226,0.94);
  }
  .wbc-note { display: none; }
  .wbc-seg button { padding: 8px 4px !important; font-size: 10px !important; }
  .wbc-row-top .lab { font-size: 11.5px !important; }
  .wbc-slider { height: 4px !important; }
  .wbc-slider::-webkit-slider-thumb { width: 20px !important; height: 20px !important; }
  .wbc-slider::-moz-range-thumb { width: 20px !important; height: 20px !important; }
}

/* mobile: contract tables stack into cards — everything visible, no scroll */
@media (max-width: 700px) {
  .tt, .tt tbody, .tt tr, .tt td { display: block; width: 100%; }
  .tt thead { display: none; }
  .tt tr { border: 2px solid var(--ink); border-radius: 8px; background: var(--panel);
    margin-bottom: 8px; padding: 8px 10px; box-shadow: 2px 2px 0 rgba(21,24,32,0.8); }
  .tt td { border: 0 !important; padding: 2px 0 !important; white-space: normal !important; font-size: 12px; }
  .tt td:first-child { font-family: var(--font-mono); font-weight: 700; color: var(--orange) !important; font-size: 12.5px; }
  /* the policy-graph explorer needs a big screen */
  .av-stage { height: 380px !important; }
}

/* ─── Equation cards — terminal plate, monospace math ─────────────── */
.eq-card { background: #12151C; border: var(--line-w) solid var(--ink); border-radius: 10px;
  box-shadow: 5px 5px 0 rgba(21,24,32,0.9); padding: 0; margin-top: clamp(20px, 3vh, 32px);
  overflow: hidden; max-width: 860px; }
.eq-card .eq-k { display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--gold);
  font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.14em;
  padding: 8px 14px 6px; border-bottom: 2px solid rgba(217,161,63,0.45); }
.eq-card .eq-k::before { content: '▸'; color: var(--orange); }
.eq-card .eq { display: block; font-family: var(--font-mono); font-weight: 400;
  font-size: clamp(12.5px, 1.15vw, 15px); color: #E9E2D0; letter-spacing: 0;
  line-height: 1.85; white-space: pre; overflow-x: auto; padding: 16px 18px 6px; }
.eq-card .eq b { color: var(--orange); font-weight: 700; }
.eq-card .eq i { color: #8FC7A8; font-style: normal; }   /* constraint comments */
.eq-card .eq-gloss { display: block; font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ash-light); padding: 0 18px 15px; letter-spacing: 0.02em; line-height: 1.65; }
.eq-card .eq-gloss b { color: var(--gold); font-weight: 700; }
.dark-sec .eq-card { background: #0E1119; border-color: rgba(217,161,63,0.6);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.6); }

/* ─── Mobile companion: past the hero, the robot docks in the corner ── */
@media (min-width: 701px) and (max-width: 979px) {
  .hero-rig.mini {
    position: fixed !important; inset: auto 8px 74px auto !important;
    width: 128px !important; height: 168px !important; min-height: 0 !important;
    z-index: 90; filter: drop-shadow(3px 4px 0 rgba(21,24,32,0.35));
  }
}
/* jumpy letters must not break mid-word */
.jumpy { display: inline-block; white-space: nowrap; }
/* headers: tighter, and never reserve a row for the stickers */
.sec-head { margin-bottom: clamp(22px, 3vh, 38px); }
.sec-head-center { position: relative; }
.sec-head .title, .sec-head-center h2 { margin-bottom: 0; }
.sec-head .sticker, .sec-head-center .sticker { top: 0; }
@media (min-width: 701px) {
  .sec-head .sticker, .sec-head-center .sticker { width: 76px !important; }
  .sec-head .sticker + .sticker, .sec-head-center .sticker + .sticker { right: 80px; }
}
/* balloons stay small enough to clear faces at any width */
.panel-speech { font-size: clamp(11px, 1.05vw, 15px); padding: clamp(7px,0.8vw,13px) clamp(12px,1.4vw,22px); }

/* ═══ Every 3-D stage floats on the page (the anatomy treatment) ═══ */
.viewer-3d, .wbc-stage, .explode-stage, .swerve-stage, .drift-stage {
  border: 0 !important; background: transparent !important;
  box-shadow: none !important; border-radius: 0 !important;
}
.viewer-3d .ph, .wbc-stage .ph { background: none !important; }
.viewer-3d .ph::before, .wbc-stage .ph::before { display: none !important; }
.viewer-3d .ph-label, .wbc-stage .ph-label {
  left: 50%; top: 50%; bottom: auto; transform: translate(-50%,-50%);
  background: var(--panel); border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(21,24,32,0.85);
}
/* the hint chip, comic edition */
.viewer-hint {
  font-family: var(--font-comic) !important; font-size: 13px !important; letter-spacing: 0.08em;
  color: var(--ink) !important; background: var(--yellow) !important;
  border: 2px solid var(--ink) !important; border-radius: 6px !important;
  box-shadow: 3px 3px 0 rgba(21,24,32,0.85) !important; padding: 6px 11px 5px !important;
  text-transform: uppercase;
}
.dark-sec .viewer-hint { background: var(--gold) !important; }
.viewer-fs {
  background: var(--panel) !important; border: 2px solid var(--ink) !important;
  border-radius: 8px !important; box-shadow: 3px 3px 0 rgba(21,24,32,0.85) !important;
  color: var(--ink) !important;
}
.viewer-fs:hover { background: var(--yellow) !important; transform: translate(-1px,-1px); }

/* ═══ Control panels: comic panels, not frosted glass ═══ */
.jp, .wbc-ctl {
  background: var(--panel) !important; border: var(--line-w) solid var(--ink) !important;
  border-radius: 12px !important; box-shadow: 5px 5px 0 rgba(21,24,32,0.9) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.jp-head { border-bottom: 2px solid var(--ink); }
.jp-title, .wbc-ctl-title {
  font-family: var(--font-comic) !important; font-size: 15px !important;
  letter-spacing: 0.12em; color: var(--orange) !important;
}
.jp-reset, .wbc-reset {
  font-family: var(--font-comic) !important; font-size: 13px !important; letter-spacing: 0.08em;
  background: var(--orange) !important; color: #FFF9F0 !important;
  border: 2px solid var(--ink) !important; border-radius: 7px !important;
  box-shadow: 2px 2px 0 rgba(21,24,32,0.85) !important; padding: 5px 12px 4px !important;
}
.jp-reset:hover, .wbc-reset:hover { background: var(--rust) !important; transform: translate(-1px,-1px); }
/* segmented tabs → comic chips */
.jp-tab, .wbc-seg button {
  font-family: var(--font-comic) !important; font-size: 13px !important; letter-spacing: 0.06em;
  color: var(--ink) !important; background: var(--bone) !important;
  border: 2px solid var(--ink) !important; border-radius: 7px !important;
  box-shadow: 2px 2px 0 rgba(21,24,32,0.85);
  transition: transform 0.12s var(--ease-out), background 0.15s ease;
}
.jp-tab:hover, .wbc-seg button:hover { transform: translate(-1px,-1px); }
.jp-tab.on, .wbc-seg button.on { background: var(--ink) !important; color: var(--gold) !important; }
.jp-name, .wbc-row-top .lab { font-family: var(--font-sans); font-weight: 600; color: var(--ink-soft) !important; }
.jp-val, .wbc-row-top .out {
  font-family: var(--font-mono) !important; font-weight: 700; color: var(--orange) !important;
}
/* sliders: thick ink track, chunky knob */
.jp-slider, .wbc-slider {
  height: 8px !important; border-radius: 5px !important;
  background: var(--bone) !important; border: 2px solid var(--ink);
}
.jp-slider::-webkit-slider-thumb, .wbc-slider::-webkit-slider-thumb {
  width: 22px !important; height: 22px !important; border-radius: 6px !important;
  background: var(--orange) !important; border: 2.5px solid var(--ink) !important;
  box-shadow: 2px 2px 0 rgba(21,24,32,0.85) !important;
}
.jp-slider::-moz-range-thumb, .wbc-slider::-moz-range-thumb {
  width: 22px !important; height: 22px !important; border-radius: 6px !important;
  background: var(--orange) !important; border: 2.5px solid var(--ink) !important;
}
.jp-row { border-bottom-color: rgba(21,24,32,0.14) !important; }
/* the drive pad */
.wbc-pad { border: 2px solid var(--ink) !important; border-radius: 10px !important;
  background: var(--bone) !important; box-shadow: inset 0 0 0 2px var(--panel); }
.wbc-knob { border-radius: 7px !important; background: var(--orange) !important;
  border: 2.5px solid var(--ink) !important; box-shadow: 2px 2px 0 rgba(21,24,32,0.7) !important; }

/* stickers inside a bare section heading (no .sec-head wrapper) pin to the
   section's top-right instead of landing on the copy */
section { position: relative; }
section > .wrap > h2 > .sticker, section > .wrap > h2 + .sticker {
  position: absolute !important; top: 12px; right: var(--gutter);
  width: 76px !important; margin: 0 !important; vertical-align: baseline !important;
}
@media (max-width: 700px) {
  section > .wrap > h2 > .sticker { width: 54px !important; top: 6px; }
}

/* ─── "What you need" prep cards, comic edition ───────────────────── */
.asm-prep { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: prep; }
@media (max-width: 900px) { .asm-prep { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .asm-prep { grid-template-columns: 1fr; } }
.asm-prep > div {
  counter-increment: prep; position: relative;
  background: var(--panel); border: var(--line-w) solid var(--ink);
  border-radius: 12px; padding: 18px 16px 16px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.asm-prep > div::before {
  content: "0" counter(prep); display: block;
  font-family: var(--font-comic); font-size: 26px; line-height: 1; margin-bottom: 6px;
}
.asm-prep > div:nth-child(1) { transform: rotate(-0.7deg); box-shadow: 6px 6px 0 var(--orange); }
.asm-prep > div:nth-child(2) { transform: rotate(0.5deg);  box-shadow: 6px 6px 0 var(--yellow); }
.asm-prep > div:nth-child(3) { transform: rotate(-0.4deg); box-shadow: 6px 6px 0 var(--blue); }
.asm-prep > div:nth-child(4) { transform: rotate(0.6deg);  box-shadow: 6px 6px 0 var(--rust); }
.asm-prep > div:nth-child(1)::before { color: var(--orange); }
.asm-prep > div:nth-child(2)::before { color: var(--gold-deep); }
.asm-prep > div:nth-child(3)::before { color: var(--blue); }
.asm-prep > div:nth-child(4)::before { color: var(--rust); }
.asm-prep > div:hover { transform: rotate(0deg) translate(-2px,-2px); }
.asm-prep h6 {
  font-family: var(--font-comic); font-weight: 400; font-size: 17px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-bottom: 8px;
}
.asm-prep p { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }

/* ─── Figures: one consistent, compact size across the site ───────── */
.paper-fig { max-width: 780px; margin-inline: auto; }
.paper-fig svg, .paper-fig img { max-height: 420px; width: 100%; height: auto; object-fit: contain; }
.paper-grid .paper-fig { max-width: none; }
.bg-fig img { max-height: 340px; width: 100%; object-fit: contain; }

/* ═══ Card variations — the comic page never repeats one panel shape ═══
   Four looks cycle through every card grid: (1) narration bar across the
   top like a caption box, (2) art-deco stepped corner, (3) halftone
   sunburst ground, (4) a night panel. All keep the ink line + hard
   shadow, so the page reads as one book with varied panels. */

/* 1 · NARRATION BAR — the yellow "MEANWHILE…" strip */
.card-grid > *:nth-child(4n+1), .res-grid > *:nth-child(4n+1) { position: relative; overflow: hidden; }
.card-grid > *:nth-child(4n+1)::before, .res-grid > *:nth-child(4n+1)::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 8px;
  background: var(--yellow); border-bottom: 2px solid var(--ink);
}
.card-grid > *:nth-child(4n+1), .res-grid > *:nth-child(4n+1) { padding-top: 26px; }

/* 2 · DECO CORNER ORNAMENT — stepped brass bars in the top-right */
.card-grid > *:nth-child(4n+2), .res-grid > *:nth-child(4n+2) { position: relative; }
.card-grid > *:nth-child(4n+2)::after, .res-grid > *:nth-child(4n+2)::after {
  content: ''; position: absolute; top: 12px; right: 12px;
  width: 30px; height: 16px; pointer-events: none;
  background:
    linear-gradient(var(--orange), var(--orange)) 100% 0   / 30px 3px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 100% 6px / 21px 3px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 100% 12px/ 12px 3px no-repeat;
}

/* 3 · SUNBURST GROUND — radiating deco rays behind the copy */
.card-grid > *:nth-child(4n+3), .res-grid > *:nth-child(4n+3) { position: relative; overflow: hidden; }
.card-grid > *:nth-child(4n+3)::after, .res-grid > *:nth-child(4n+3)::after {
  content: ''; position: absolute; inset: -40% -10% auto -10%; height: 150%;
  background: repeating-conic-gradient(from 200deg at 88% 6%,
    rgba(240,118,46,0.16) 0deg 4deg, transparent 4deg 11deg);
  pointer-events: none; z-index: 0;
}
.card-grid > *:nth-child(4n+3) > *, .res-grid > *:nth-child(4n+3) > * { position: relative; z-index: 1; }

/* 4 · NIGHT PANEL — the Gotham inversion, brass rules */
.card-grid > *:nth-child(4n), .res-grid > *:nth-child(4n) {
  background: var(--ink) !important; border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--gold);
}
.card-grid > *:nth-child(4n) h3, .card-grid > *:nth-child(4n) h4,
.res-grid > *:nth-child(4n) h3, .res-grid > *:nth-child(4n) h4 { color: var(--bone); }
.card-grid > *:nth-child(4n) p, .res-grid > *:nth-child(4n) p { color: var(--ash-light); }
.card-grid > *:nth-child(4n) .card-num, .res-grid > *:nth-child(4n) .res-tag { color: var(--gold); }
.card-grid > *:nth-child(4n) .res-arrow, .res-grid > *:nth-child(4n) .res-arrow { color: var(--yellow); }
.card-grid > *:nth-child(4n):hover, .res-grid > *:nth-child(4n):hover { box-shadow: 8px 8px 0 var(--gold); }

/* dark sections invert the inversion so the night card still stands out */
.dark-sec .card-grid > *:nth-child(4n) {
  background: var(--panel) !important; box-shadow: 6px 6px 0 var(--orange);
}
.dark-sec .card-grid > *:nth-child(4n) h4 { color: var(--ink); }
.dark-sec .card-grid > *:nth-child(4n) p { color: var(--ink-soft); }
.dark-sec .card-grid > *:nth-child(4n) .card-num { color: var(--rust); }

/* drop cap for the first paragraph of a lede block — old-comic opener */
.sec-head .lede::first-letter { font-family: var(--font-display); font-size: 2.2em;
  line-height: 0.8; float: left; margin: 4px 8px 0 0; color: var(--orange); }
.dark-sec .sec-head .lede::first-letter { color: var(--gold); }


/* ═══ BOM — the donut and the table sit on ONE line ═══
   These rules used to live in hardware.html's inline <style> while the
   markup lives on build.html, so the grid never applied and the chart
   stacked above the table. Shared stylesheet = both pages get it. */
.bom-grid { display: grid; grid-template-columns: minmax(0, 380px) 1fr;
  gap: clamp(20px, 3vw, 44px); align-items: center; }
@media (max-width: 900px) { .bom-grid { grid-template-columns: 1fr; } }
.bom-grid > * { min-width: 0; }
.bom-pie-wrap { position: relative; width: min(320px, 100%); margin: 0 auto; }
#bomPie svg { width: 100%; height: auto; display: block; }
.bom-centre { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none; text-align: center; }
#bomPieVal { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px);
  color: var(--rust); line-height: 1; }
#bomPieKey { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ash); margin-top: 7px; max-width: 66%; line-height: 1.5; }
.bom-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  border: 1.5px solid var(--ink); margin-right: 9px; vertical-align: -1px; }
#bomRows td:first-child { font-weight: 600; }
#bomRows { font-size: 13px; }
#bomRows th, #bomRows td { padding: 7px 10px; }
tr.bom-row-hot td { background: rgba(198,48,26,0.08); }

/* ═══ Comic pop-ups — a card opens like a panel reveal ═══ */
.is-poppable { cursor: pointer; position: relative; }
.is-poppable:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.pop-cue { display: inline-block; margin-top: 14px; font-family: var(--font-comic);
  font-size: 15px; letter-spacing: 0.08em; color: var(--rust);
  border-bottom: 2px solid var(--rust); padding-bottom: 1px;
  transition: transform 0.18s ease; }
.is-poppable:hover .pop-cue { transform: translateX(5px) rotate(-1.5deg); }
.card-grid > *:nth-child(4n) .pop-cue { color: var(--yellow); border-color: var(--yellow); }

body.pop-locked { overflow: hidden; }

.pop-overlay { position: fixed; inset: 0; z-index: 3000; display: none;
  align-items: center; justify-content: center; padding: 5vh 20px;
  background: rgba(21, 24, 32, 0.82); }
.pop-overlay.open { display: flex; animation: popFade 0.18s ease both; }
@keyframes popFade { from { opacity: 0; } to { opacity: 1; } }

.pop-panel { position: relative; width: min(680px, 100%); max-height: 88vh; overflow: auto;
  background: var(--panel); border: 3px solid var(--ink); border-radius: 6px;
  box-shadow: 12px 12px 0 var(--orange), 0 0 0 3px var(--ink);
  padding: clamp(20px, 3vw, 32px);
  animation: popIn 0.42s cubic-bezier(0.22, 1.4, 0.36, 1) both; }
@keyframes popIn {
  from { transform: translate(var(--from-x, 0), var(--from-y, 0)) scale(0.16) rotate(-7deg); opacity: 0; }
  62%  { transform: translate(0, 0) scale(1.05) rotate(1.2deg); opacity: 1; }
  to   { transform: translate(0, 0) scale(1) rotate(0); opacity: 1; }
}
.pop-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--yellow);
  font-family: var(--font-comic); font-size: 18px; color: var(--ink); cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); transition: transform 0.15s ease; z-index: 2; }
.pop-close:hover { transform: rotate(90deg) scale(1.08); }

.pop-art { margin: -6px 0 18px; }
.pop-art-svg { width: 100%; height: auto; display: block;
  border-radius: 4px; }
.pop-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--rust); display: block; margin-bottom: 6px; }
.pop-title { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.05; color: var(--ink); margin: 0 0 14px; }
.pop-body { font-size: 15px; line-height: 1.72; color: var(--ink-soft); }
.pop-body p { margin: 0 0 12px; }
.pop-body p:first-of-type::first-letter { font-family: var(--font-display);
  font-size: 2.1em; line-height: 0.8; float: left; margin: 4px 8px 0 0; color: var(--orange); }
.pop-body ul { margin: 0 0 14px; padding-left: 20px; }
.pop-body li { margin-bottom: 6px; }
.pop-body .pop-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin: 16px 0; }
.pop-body .pop-stat > div { border: 2px solid var(--ink); border-radius: 5px;
  background: var(--bone); padding: 10px 12px; box-shadow: 3px 3px 0 var(--ink); }
.pop-body .pop-stat b { display: block; font-family: var(--font-display);
  font-size: 21px; color: var(--rust); line-height: 1; }
.pop-body .pop-stat span { font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); }

/* the onomatopoeia flung out behind the panel */
.pop-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.pop-panel { z-index: 1; }
.pop-fx { position: absolute; font-family: var(--font-comic); color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--rust); white-space: nowrap; }
.pop-fx-main { top: 9%; left: 50%; font-size: clamp(48px, 9vw, 104px);
  animation: fxMain 0.85s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
@keyframes fxMain {
  from { transform: translate(-50%, 40px) scale(0.2) rotate(-16deg); opacity: 0; }
  40%  { transform: translate(-50%, 0) scale(1.15) rotate(-6deg); opacity: 1; }
  75%  { opacity: 1; }
  to   { transform: translate(-50%, -26px) scale(1) rotate(-4deg); opacity: 0; }
}
.pop-fx-mini { font-size: clamp(22px, 3.4vw, 40px); color: var(--orange);
  text-shadow: 3px 3px 0 var(--ink); animation: fxMini 0.95s ease-out both; }
.pop-fx-0 { top: 24%; left: 9%;  animation-delay: 0.06s; }
.pop-fx-1 { top: 68%; right: 11%; left: auto; animation-delay: 0.13s; }
.pop-fx-2 { bottom: 15%; left: 16%; animation-delay: 0.2s; }
@keyframes fxMini {
  from { transform: scale(0.2) rotate(12deg); opacity: 0; }
  45%  { transform: scale(1.1) rotate(-8deg); opacity: 1; }
  to   { transform: scale(0.9) rotate(-5deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pop-panel { animation: popFade 0.2s ease both; }
  .pop-fx { display: none; }
}
@media (max-width: 600px) {
  .pop-panel { box-shadow: 7px 7px 0 var(--orange), 0 0 0 3px var(--ink); }
  .pop-body { font-size: 14px; }
}

/* ═══ Buttons — ONE look everywhere ═══
   Previously .btn-primary and .btn-ghost diverged (and diverged AGAIN inside
   dark sections: gold fill vs transparent outline), so two links sitting side
   by side read as different kinds of thing and nothing looked important.
   Now every button is the same yellow comic plate and turns red on hover;
   only a genuinely special call to action (.btn-special) breaks rank. */
.btn, .btn-primary, .btn-ghost,
.dark-sec .btn, .dark-sec .btn-primary, .dark-sec .btn-ghost,
.page-hero .btn, .page-hero .btn-primary, .page-hero .btn-ghost {
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn:hover, .btn-primary:hover, .btn-ghost:hover,
.dark-sec .btn:hover, .dark-sec .btn-primary:hover, .dark-sec .btn-ghost:hover,
.page-hero .btn:hover, .page-hero .btn-primary:hover, .page-hero .btn-ghost:hover {
  background: var(--rust);
  color: #FFF6E4;
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  transform: translate(-2px, -2px) rotate(-0.6deg);
}
/* on ink grounds the shadow needs to read against the dark, not vanish */
.dark-sec .btn, .page-hero .btn { box-shadow: 4px 4px 0 rgba(0,0,0,0.9); }
.dark-sec .btn:hover, .page-hero .btn:hover { box-shadow: 6px 6px 0 rgba(0,0,0,0.9); }

/* the one exception: the nav's control-centre CTA stays orange */
.btn-special, .nav-cta {
  background: var(--hi) !important; color: #FFF9F0 !important;
  border-color: var(--ink) !important;
}
.btn-special:hover, .nav-cta:hover {
  background: var(--hi-deep) !important; color: #FFF9F0 !important;
}

/* ═══ Task clip grid — 4 × 3 of the twin actually working ═══ */
.task-grid-head { display: grid; grid-template-columns: minmax(0,220px) 1fr;
  gap: clamp(14px,3vw,32px); align-items: baseline; margin-bottom: 18px; }
.task-grid-head p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
@media (max-width: 720px) { .task-grid-head { grid-template-columns: 1fr; gap: 8px; } }

.task-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1080px) { .task-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 780px)  { .task-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; } }

.task-cell { margin: 0; border: 2px solid var(--ink); border-radius: 6px;
  overflow: hidden; background: var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease; }
.task-cell:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--orange); }
.task-cell video { width: 100%; display: block; aspect-ratio: 4 / 3;
  object-fit: cover; background: #0E1016; }
.task-cell figcaption { padding: 9px 11px 11px; background: var(--ink); }
.task-fam { display: block; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--orange); margin-bottom: 3px; }
.task-cell b { display: block; font-family: var(--font-comic); font-size: 17px;
  letter-spacing: 0.03em; color: var(--bone); line-height: 1.1; }
.task-cap { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.45;
  color: var(--ash-light); }
/* every 4th cell wears the accent, so the grid reads as a comic page */
.task-grid > *:nth-child(4n) { box-shadow: 4px 4px 0 var(--orange); }
.task-grid > *:nth-child(4n+2) { box-shadow: 4px 4px 0 var(--gold); }

/* app download links sitting right under a section title */
.app-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.app-links .btn { margin-top: 0; }

/* side-by-side teleop clips: the operator and the robot, same row */
.tele-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.tele-clip { margin: 0; position: relative; border: 2px solid var(--ink);
  border-radius: 6px; overflow: hidden; background: #0B0E15; box-shadow: 5px 5px 0 var(--ink); }
.dark-sec .tele-clip { box-shadow: 5px 5px 0 rgba(0,0,0,0.85); border-color: var(--gold); }
.tele-clip video { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.tele-clip figcaption { padding: 9px 12px 11px; font-size: 12px; line-height: 1.5;
  color: var(--ash-light); background: var(--ink); font-family: var(--font-mono); }
.tele-clip .burst.sm { position: absolute; top: 8px; right: 8px; }
/* invisible aliases so links written against the old teleop section ids still land */
.anchor-alias { display: block; height: 0; scroll-margin-top: 90px; }

/* ═══ The tip-over lab ═══ */
.tl-wrap { display: grid; grid-template-columns: 1fr minmax(240px, 300px);
  gap: 16px; align-items: stretch; }
@media (max-width: 860px) { .tl-wrap { grid-template-columns: 1fr; } }
.tl-wrap > * { min-width: 0; }

.tl-stage { position: relative; border: 3px solid var(--ink); border-radius: 8px;
  overflow: hidden; background: #EBD9AE; box-shadow: 6px 6px 0 var(--ink);
  aspect-ratio: 16 / 9; }
.tl-canvas { display: block; width: 100%; height: 100%; }
.tl-hud { position: absolute; top: 10px; left: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.tl-read { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  background: var(--ink); color: var(--bone); border: 2px solid var(--ink);
  border-radius: 4px; padding: 4px 8px; }
.tl-read b { color: var(--yellow); font-weight: 400; }
.tl-trim { color: var(--yellow); font-style: normal; }
.tl-off { color: #FF8A73; font-style: normal; }

.tl-fx { position: absolute; top: 14%; left: 50%; transform: translateX(-50%) scale(0.3);
  font-family: var(--font-comic); font-size: clamp(34px, 6vw, 66px); color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink); text-shadow: 5px 5px 0 var(--rust);
  opacity: 0; pointer-events: none; }
.tl-fx.show { animation: tlFx 0.9s cubic-bezier(0.2,1.5,0.4,1) both; }
.tl-fx.bad { color: #FF8A73; }
@keyframes tlFx {
  from { transform: translateX(-50%) scale(0.3) rotate(-14deg); opacity: 0; }
  35%  { transform: translateX(-50%) scale(1.12) rotate(-5deg); opacity: 1; }
  to   { transform: translateX(-50%) scale(1) rotate(-3deg); opacity: 0; }
}

.tl-panel { border: 3px solid var(--ink); border-radius: 8px; background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink); padding: 16px 16px 14px;
  display: flex; flex-direction: column; gap: 14px; }
.tl-row label { display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ash); margin-bottom: 7px; }
.tl-row label b { font-family: var(--font-display); font-size: 15px; color: var(--rust); }
.tl-slider { width: 100%; -webkit-appearance: none; appearance: none; height: 8px;
  background: var(--bone); border: 2px solid var(--ink); border-radius: 5px; outline: none; }
.tl-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px;
  border-radius: 5px; background: var(--orange); border: 2px solid var(--ink); cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink); }
.tl-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 5px;
  background: var(--orange); border: 2px solid var(--ink); cursor: pointer; }
.tl-btns { display: grid; gap: 8px; }
.tl-toggle, .tl-stop { font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 8px;
  cursor: pointer; box-shadow: 3px 3px 0 var(--ink); background: var(--bone); color: var(--ink);
  transition: transform 0.14s ease, background 0.2s ease; }
.tl-toggle.on { background: var(--green); color: #FFF6E4; }
.tl-toggle:not(.on) { background: var(--rust); color: #FFF6E4; }
.tl-stop { background: var(--yellow); }
.tl-toggle:hover, .tl-stop:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.tl-note { margin: 0; font-size: 12px; line-height: 1.6; color: var(--ink-soft); }
.tl-note b { color: var(--rust); }

/* ═══ Films ═══ */
.film-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.film-card { margin: 0; border: 2px solid var(--ink); border-radius: 7px; overflow: hidden;
  background: var(--ink); box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease; }
.film-card:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--orange); }
.film-card video { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; background: #0B0E15; }
.film-soon { aspect-ratio: 4/3; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #1B1F2B 0 14px, #171A24 14px 28px); }
.film-soon .burst { transform: rotate(-8deg); }
.film-card figcaption { padding: 11px 13px 13px; }
.film-tag { display: block; font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--orange); margin-bottom: 4px; }
.film-card b { display: block; font-family: var(--font-comic); font-size: 19px;
  letter-spacing: 0.03em; color: var(--bone); line-height: 1.1; margin-bottom: 5px; }
.film-card figcaption span:not(.film-tag) { display: block; font-size: 12px;
  line-height: 1.5; color: var(--ash-light); }
.film-card figcaption a { color: var(--yellow); }

/* ═══ Stickers: one authoritative placement ═══
   Four earlier rules fought over `top`, and heading stickers that were not
   inside a .sec-head stayed inline in the text flow — which is how a taco
   landed on a "0°" data label and a subway tile on "Data Curation.".
   Every sticker that lives inside a heading is now lifted OUT of the flow
   and pinned to the top-right of its content column, in the section's own
   padding. Verified by scripts/stickers.py, which intersects each sticker
   box with the rectangle of every rendered line of text on the page. */
.sec-head, .sec-head-center, .wrap, .wrap-narrow { position: relative; }
h1 > .sticker, h2 > .sticker, h3 > .sticker {
  position: absolute !important;
  top: -46px !important; right: 0 !important; bottom: auto !important; left: auto !important;
  width: 74px !important; height: auto !important; margin: 0 !important;
  vertical-align: baseline !important;
  transform: rotate(-5deg); pointer-events: none; z-index: 2;
}
/* inside a .sec-head the sticker must clear the right-hand lede as well,
   so it sits higher — the head box starts below the section's padding. */
.sec-head .sticker, .sec-head-center .sticker { top: -74px !important; }
h1 > .sticker + .sticker, h2 > .sticker + .sticker, h3 > .sticker + .sticker,
.sec-head .sticker + .sticker, .sec-head-center .sticker + .sticker {
  right: 80px !important; transform: rotate(6deg); }
@media (max-width: 760px) {
  h1 > .sticker, h2 > .sticker, h3 > .sticker { top: -36px !important; width: 54px !important; }
  .sec-head .sticker, .sec-head-center .sticker { top: -54px !important; width: 54px !important; }
  h1 > .sticker + .sticker, h2 > .sticker + .sticker, h3 > .sticker + .sticker,
  .sec-head .sticker + .sticker, .sec-head-center .sticker + .sticker { right: 58px !important; }
}
/* one heading sits directly above a figure axis label; lift its sticker clear */
/* this heading sits directly under a joint-limit readout in the section
   above; the sticker moves inboard rather than up, into clear space. */
h1 > .sticker.sticker-hi, h2 > .sticker.sticker-hi, h3 > .sticker.sticker-hi {
  top: -34px !important; right: 132px !important; }
@media (max-width: 760px) {
  h2 > .sticker.sticker-hi { top: -30px !important; right: 0 !important; } }

/* ═══ Reach — drive it from anywhere ═══ */
.rg-wrap > #reachGlobe { display: grid; grid-template-columns: 1fr minmax(260px, 330px);
  gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .rg-wrap > #reachGlobe { grid-template-columns: 1fr; } }
.rg-wrap > #reachGlobe > * { min-width: 0; }
.rg-stage { position: relative; border: 3px solid var(--ink); border-radius: 8px;
  overflow: hidden; background: var(--bone); box-shadow: 6px 6px 0 var(--ink);
  /* A fixed height, not an aspect ratio: at a wide viewport 5/4 of a 760 px
     column is a 600 px-tall globe that pushes the panel off the fold. */
  height: clamp(300px, 42vh, 420px); touch-action: none; }
.rg-hint { position: absolute; left: 10px; bottom: 10px; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash);
  background: rgba(253,246,226,0.85); border: 2px solid var(--ink); border-radius: 4px;
  padding: 4px 8px; pointer-events: none; }
.rg-canvas { display: block; width: 100%; height: 100%; }
.rg-fx { position: absolute; top: 8%; left: 50%; transform: translateX(-50%) scale(0.3);
  font-family: var(--font-comic); font-size: clamp(30px, 5vw, 54px); color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink); text-shadow: 4px 4px 0 var(--rust);
  opacity: 0; pointer-events: none; }
.rg-fx.show { animation: tlFx 0.9s cubic-bezier(0.2,1.5,0.4,1) both; }

.rg-panel { border: 3px solid var(--ink); border-radius: 8px; background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink); padding: 15px; display: flex; flex-direction: column; gap: 12px; }
.rg-eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ash); }
.rg-cities { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rg-cities button { font-family: var(--font-comic); font-size: 13px; letter-spacing: 0.04em;
  padding: 7px 8px; border: 2px solid var(--ink); border-radius: 6px; cursor: pointer;
  background: var(--bone); color: var(--ink); box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.14s ease, background 0.2s ease; }
.rg-cities button:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.rg-cities button.on { background: var(--yellow); }
.rg-budget { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.rg-budget > div { border: 2px solid var(--ink); border-radius: 5px; padding: 8px 9px;
  background: var(--bone); }
.rg-budget > div.hi { background: var(--yellow); grid-column: 1 / -1; }
.rg-budget b { display: block; font-family: var(--font-display); font-size: 19px;
  color: var(--rust); line-height: 1.05; }
.rg-budget span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ash); }
.rg-note { margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--ink-soft); }
.rg-note b { color: var(--rust); }

/* ═══ Full BOM table with hover previews ═══ */
.bt-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 12px; }
.bt-search { font-family: var(--font-mono); font-size: 12.5px; padding: 8px 12px;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--panel);
  color: var(--ink); min-width: 210px; flex: 1 1 210px; }
.bt-search:focus { outline: 3px solid var(--orange); outline-offset: 1px; }
.bt-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.bt-filters button { font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.04em; padding: 6px 10px; border: 2px solid var(--ink);
  border-radius: 5px; background: var(--bone); color: var(--ink); cursor: pointer; }
.bt-filters button.on { background: var(--yellow); }
.bt-filters button:hover { transform: translateY(-1px); }

.bt-scroll { overflow-x: auto; border: 2px solid var(--ink); border-radius: 7px;
  box-shadow: 5px 5px 0 var(--ink); background: var(--panel); }
.bt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bt-table thead th { position: sticky; top: 0; background: var(--ink); color: var(--yellow);
  font-family: var(--font-comic); font-size: 12px; letter-spacing: 0.07em;
  text-transform: uppercase; text-align: left; padding: 8px 10px; white-space: nowrap; }
.bt-table th.num, .bt-table td.num { text-align: right; }
.bt-table td { padding: 7px 10px; border-top: 1px solid rgba(21,24,32,0.12);
  vertical-align: top; }
.bt-table tbody tr:hover { background: rgba(240,118,46,0.13); cursor: help; }
.bt-ref { font-family: var(--font-mono); font-size: 11px; color: var(--ash); }
.bt-item { font-weight: 600; color: var(--ink); }
.bt-spec { font-family: var(--font-mono); font-size: 11px; color: var(--ash); }
.bt-ext { font-weight: 700; color: var(--rust); }
.bt-vendor a { color: var(--blue); text-decoration: none; }
.bt-vendor a:hover { text-decoration: underline; }
.bt-count { margin-top: 9px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.05em; color: var(--ash); }
.bt-count b { color: var(--rust); }

.bt-preview { position: fixed; z-index: 2500; width: 230px; height: 218px;
  pointer-events: none;
  border: 3px solid var(--ink); border-radius: 8px; background: var(--panel);
  box-shadow: 7px 7px 0 var(--ink); overflow: hidden; }
.bt-pv-art { background: #F1E6C6; border-bottom: 2px solid var(--ink);
  height: 112px; overflow: hidden; }
.bt-pv-art svg, .bt-pv-art img { display: block; width: 100%; height: 112px;
  object-fit: cover; }
.bt-pv-body { padding: 8px 11px 10px; height: 102px; overflow: hidden; }
.bt-pv-name { display: block; font-family: var(--font-comic); font-size: 16px;
  letter-spacing: 0.03em; color: var(--ink); line-height: 1.15; }
.bt-pv-spec { display: block; margin-top: 3px; font-family: var(--font-mono);
  font-size: 10px; color: var(--ash); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.bt-pv-price { display: block; margin-top: 5px; font-family: var(--font-mono);
  font-size: 11.5px; color: var(--ink-soft); }
.bt-pv-price b { font-family: var(--font-display); font-size: 15px; color: var(--rust); }
@media (max-width: 560px) { .bt-preview { display: none; } }

/* ═══ Tables on phones: stack, never scroll sideways ═══
   Measured with scripts/tablescroll.py at 390 px: the BOM summary needed
   556 px and the 49-line table 494 px in a 350 px column. Both become one
   card per row, with the column header carried by each cell's data-l. */
@media (max-width: 620px) {
  .bt-scroll, #bom .table-scroll { overflow-x: visible; }

  .bt-table thead, #bomRows thead { display: none; }
  .bt-table, .bt-table tbody, .bt-table tr, .bt-table td,
  #bomRows, #bomRows tbody, #bomRows tr, #bomRows td { display: block; width: auto; }

  .bt-table tr, #bomRows tr {
    border: 2px solid var(--ink); border-radius: 6px; background: var(--bone);
    margin: 0 0 8px; padding: 9px 11px; }
  .bt-table td, #bomRows td {
    border: none; padding: 2px 0; text-align: left !important;
    display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: baseline; }
  .bt-table td::before, #bomRows td::before {
    content: attr(data-l); font-family: var(--font-mono); font-size: 9.5px;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash); }
  .bt-table td:not([data-l]), #bomRows td:not([data-l]) { display: block; }
  /* the part name leads the card */
  .bt-table td.bt-item { font-size: 14px; margin-bottom: 3px; }
  .bt-table td.bt-item::before { color: var(--orange); }
  .bt-ext { color: var(--rust); }
  #bomRows tr.best { background: var(--yellow); }
  .bt-table tbody tr:hover, #bomRows tbody tr:hover { background: var(--bone); }
  .bt-bar { gap: 8px; }
  .bt-filters button { font-size: 10px; padding: 5px 8px; }
}
.bt-item a { color: var(--ink); text-decoration: none;
  border-bottom: 1.5px solid rgba(240,118,46,0.55); }
.bt-item a:hover { color: var(--rust); border-bottom-color: var(--rust); }

/* Balloons and bursts sit over playing video: give them their own layer so a
   repaint underneath (a source swap, a decode hiccup) cannot flicker them. */
.panel-speech, .wall-item .burst, .tele-clip .burst {
  will-change: transform;
  transform: translateZ(0) rotate(-2deg);
  backface-visibility: hidden;
}
.panel-speech.tail-br { transform: translateZ(0) rotate(-2deg); }

/* the docked mobile robot is small — its comic lettering scales with it */
.sfx.mini {
  font-size: clamp(15px, 5vw, 26px) !important;
  text-shadow: 2px 2px 0 var(--ink);
  -webkit-text-stroke-width: 2px;
  z-index: 95;
}
/* the clip-upgrade wrapper: keeps the incoming copy over the video only,
   never over the caption beneath it */
.vid-swap { position: relative; display: block; line-height: 0; }
.vid-swap > video { display: block; width: 100%; }

/* ═══ Equations — academic setting on a comic plate ═══
   One centred display line per result, constraints beneath it, set in a
   proper math face (italic serif for symbols) rather than monospace ASCII. */
.eq-card .eq { display: block; padding: 20px 22px 6px; text-align: center; }
.eq-main {
  display: block; overflow-x: auto; overflow-y: hidden; white-space: nowrap;
  font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia,
               'Times New Roman', serif;
  font-style: italic; font-size: clamp(15px, 1.5vw, 21px); line-height: 1.7;
  color: #F4EAD2; letter-spacing: 0.005em;
  padding-bottom: 4px;
}
.eq-main b { color: var(--orange); font-weight: 700; font-style: italic; }
.eq-main sub, .eq-main sup { font-size: 0.66em; font-style: normal; letter-spacing: 0; }
.eq-sub { display: block; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(217,161,63,0.28); }
.eq-line {
  display: block; overflow-x: auto; white-space: nowrap;
  font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  font-style: italic; font-size: clamp(12.5px, 1.15vw, 15.5px); line-height: 2;
  color: #CFC6AE;
}
.eq-line b { color: var(--yellow); font-weight: 700; }
.eq-line.hot { color: #F4EAD2; }
.eq-line i {
  display: inline-block; margin-left: 14px; font-style: normal;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #8FC7A8; vertical-align: 2px;
}
.eq-line sub, .eq-line sup { font-size: 0.7em; font-style: normal; }
/* the plate itself: deeper, with a brass rule under the title */
.eq-card { background: linear-gradient(180deg, #151A24 0%, #10131B 100%) !important;
  border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.dark-sec .eq-card { box-shadow: 6px 6px 0 rgba(0,0,0,0.75); border-color: rgba(217,161,63,0.5); }
.eq-card .eq-gloss { text-align: left; padding: 4px 22px 18px;
  font-family: var(--font-sans); font-size: 12.5px; line-height: 1.65; }
@media (max-width: 620px) {
  .eq-card .eq { padding: 15px 14px 4px; }
  .eq-line i { display: block; margin: 2px 0 6px; }
}

/* ═══ Assembly modules — an illustrated instruction grid ═══
   Modelled on a technical-illustration reference sheet: uniform tiles, the
   drawing dominant and consistent, a numbered caption underneath, and the
   detail in small type below that. Uniform beats varied here — the reader is
   following a procedure, and equal tiles make the sequence legible at a
   glance. (An earlier Kirby-style span rhythm looked livelier but made the
   drawings different sizes, which is exactly wrong for instructions.) */
.asm-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 250px);
  gap: clamp(14px, 2vw, 22px); align-items: start; }
@media (max-width: 900px) { .asm-body { grid-template-columns: 1fr; } }

ol.asm-steps {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px; list-style: none; margin: 0; padding: 0; counter-reset: asmstep;
}
ol.asm-steps li {
  counter-increment: asmstep; position: relative; display: flex; flex-direction: column;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--panel);
  box-shadow: 4px 4px 0 var(--ink); padding: 0; margin: 0; overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
ol.asm-steps li:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--orange); }

/* the drawing leads and is the same size in every tile */
.asm-art { margin: 0; border-bottom: 2px solid var(--ink); background: #F3E7C7; line-height: 0; }
.asm-art svg { display: block; width: 100%; height: auto; aspect-ratio: 240 / 150; }

/* caption: number + imperative, the way a plate is labelled */
ol.asm-steps li > strong {
  display: block; padding: 11px 12px 0 34px; position: relative;
  font-family: var(--font-comic); font-weight: 400; font-size: 15.5px;
  letter-spacing: 0.02em; line-height: 1.18; color: var(--ink);
}
ol.asm-steps li > strong::before {
  content: counter(asmstep, decimal-leading-zero);
  position: absolute; left: 12px; top: 11px;
  font-family: var(--font-comic); font-size: 15px; color: var(--rust);
}
.asm-say { display: block; padding: 5px 12px 12px; font-size: 12.5px;
  line-height: 1.55; color: var(--ink-soft); }
ol.asm-steps li .tip {
  display: block; margin: auto 12px 12px; padding: 7px 10px;
  border: 2px solid var(--ink); border-radius: 11px; background: #FFF9F0;
  font-family: var(--font-mono); font-size: 10px; line-height: 1.5;
  color: var(--ash); position: relative;
}
ol.asm-steps li .tip::after {
  content: ''; position: absolute; left: 16px; bottom: -9px;
  border: 6px solid transparent; border-top: 10px solid var(--ink); border-left-width: 2px;
}
/* accent the tiles in a quiet four-beat so the grid is not monotone */
ol.asm-steps li:nth-child(4n+2) { box-shadow: 4px 4px 0 var(--yellow); }
ol.asm-steps li:nth-child(4n+3) { box-shadow: 4px 4px 0 var(--blue); }
ol.asm-steps li:nth-child(4n)   { box-shadow: 4px 4px 0 var(--rust); }
@media (max-width: 520px) {
  ol.asm-steps { grid-template-columns: 1fr 1fr; gap: 10px; }
  ol.asm-steps li > strong { font-size: 13.5px; padding-left: 30px; }
  .asm-say { font-size: 11.5px; }
}

/* the spec plate reads as the page's data panel */
.asm-side { border: 2px solid var(--ink); border-radius: 6px; background: var(--ink);
  box-shadow: 5px 5px 0 var(--gold); padding: 14px 15px 16px; }
.asm-side h6 { font-family: var(--font-comic); font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--yellow); margin: 0 0 10px; }
.asm-side dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.asm-side dt { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--ash-light); }
.asm-side dd { margin: 2px 0 0; font-size: 13px; color: var(--bone); line-height: 1.4; }
.asm-side a { color: var(--yellow); }

/* Stacked-table cells must be allowed to shrink: a grid track defaults to
   min-content, so a wide cell kept the "stacked" table 556 px wide inside a
   350 px column and it still scrolled sideways. */
@media (max-width: 620px) {
  .bt-table, #bomRows { width: 100% !important; max-width: 100% !important; table-layout: fixed; }
  .bt-table tr, #bomRows tr { width: auto !important; max-width: 100% !important; }
  .bt-table td, #bomRows td {
    grid-template-columns: 74px minmax(0, 1fr) !important;
    width: auto !important; max-width: 100% !important;
    overflow-wrap: anywhere; word-break: break-word;
  }
  .bt-table td::before, #bomRows td::before { min-width: 0; }
  #bom .table-scroll, .bt-scroll { max-width: 100%; }
}

/* The BOM summary is only three short columns — on a phone it does not need
   stacking at all, just a fixed layout that cannot exceed its container.
   (Stacking it left a grid cell sized by the old table layout, so it kept
   overflowing; a fixed 3-column table fits 350 px with room to spare.) */
@media (max-width: 620px) {
  #bomRows, #bomRows thead, #bomRows tbody, #bomRows tr, #bomRows td, #bomRows th {
    display: revert;
  }
  #bomRows { display: table !important; width: 100% !important; max-width: 100% !important;
    table-layout: fixed; font-size: 11.5px; }
  #bomRows thead { display: table-header-group !important; }
  #bomRows tr { display: table-row !important; }
  #bomRows th, #bomRows td { display: table-cell !important; padding: 6px 5px !important;
    overflow-wrap: anywhere; }
  #bomRows td::before, #bomRows th::before { content: none !important; }
  #bomRows th:nth-child(1), #bomRows td:nth-child(1) { width: 54%; }
  #bomRows th:nth-child(2), #bomRows td:nth-child(2) { width: 18%; }
  #bomRows th:nth-child(3), #bomRows td:nth-child(3) { width: 28%; }
  #bomRows .bom-dot { width: 7px; height: 7px; margin-right: 5px; }
}

/* `.table-scroll .data-table { min-width: 560px }` is what actually forced
   the BOM summary to 556 px inside a 350 px column — the stacking rules were
   applying fine, the table just had a floor. Below 620 px there is no floor. */
@media (max-width: 620px) {
  .table-scroll .data-table,
  .table-scroll.tight .data-table,
  .table-scroll.fit .data-table { min-width: 0 !important; width: 100% !important; }
  .table-scroll { overflow-x: visible; }
}

/* A dangling selector list used to sit here — three selectors, a trailing
   comma, and then `}`. CSS recovers by swallowing whatever follows until the
   next `{`, so the rule immediately below was consumed as part of the broken
   selector and `b-blast` silently lost its shape. Deleted rather than
   completed: the rule it was reaching for (a last odd row spanning the grid)
   is already handled by `ol.asm-steps` own auto-fit. */

.burst.b-blast::before {
  clip-path: polygon(50% 0%, 58% 24%, 79% 9%, 76% 34%, 100% 33%, 82% 50%,
                     100% 67%, 76% 66%, 79% 91%, 58% 76%, 50% 100%, 42% 76%,
                     21% 91%, 24% 66%, 0% 67%, 18% 50%, 0% 33%, 24% 34%, 21% 9%, 42% 24%);
}
.burst.b-blob::before {
  clip-path: polygon(50% 2%, 66% 10%, 80% 4%, 86% 20%, 99% 32%, 90% 47%,
                     98% 63%, 84% 72%, 82% 90%, 65% 86%, 50% 98%, 35% 87%,
                     18% 92%, 16% 74%, 2% 63%, 11% 47%, 1% 31%, 15% 21%, 20% 5%, 35% 11%);
}
.burst.b-zag::before {
  clip-path: polygon(50% 0%, 63% 18%, 84% 6%, 80% 30%, 100% 26%, 88% 46%,
                     100% 62%, 80% 66%, 88% 88%, 64% 80%, 50% 100%, 36% 80%,
                     12% 88%, 20% 66%, 0% 62%, 12% 46%, 0% 26%, 20% 30%, 16% 6%, 37% 18%);
}
.burst.b-flag::before {
  clip-path: polygon(6% 16%, 94% 6%, 88% 40%, 99% 52%, 86% 66%, 92% 92%,
                     50% 80%, 10% 94%, 16% 62%, 2% 48%, 14% 34%);
}
/* rhythm: shape, size, tilt and voice all rotate together */
.burst:nth-of-type(5n+1) { transform: rotate(-9deg); }
.burst:nth-of-type(5n+2) { transform: rotate(7deg) scale(0.88); }
.burst:nth-of-type(5n+3) { transform: rotate(-4deg) scale(1.1); }
.burst:nth-of-type(5n+4) { transform: rotate(11deg) scale(0.82); }
.burst:nth-of-type(5n)   { transform: rotate(-13deg) scale(1.02); }
.burst.v-yellow { color: var(--ink); }
.burst.v-yellow::before { background: var(--yellow); }
.burst.v-orange::before { background: var(--orange); }
.burst.v-blue { color: #FFF6E4; }
.burst.v-blue::before { background: var(--blue); }
.burst.v-green { color: #FFF6E4; }
.burst.v-green::before { background: var(--green); }
/* lettering varies too — weight, tracking, skew */
.burst.f-tight { letter-spacing: -0.01em; font-size: 0.92em; }
.burst.f-wide { letter-spacing: 0.14em; font-size: 0.84em; }
.burst.f-tall { transform-origin: center; font-size: 1.14em; }
.burst.f-slant span, .burst.f-slant { font-style: italic; }


/* ═══ The wild rail scrolls forever ═══
   It was a drag-only strip that just stopped at the last card. Now the track
   creeps along on its own and wraps seamlessly (the JS clones the run once,
   so translating by exactly half the track is invisible). Dragging still
   works and pauses the drift; hover pauses it too. */
.marquee-track.auto { animation: railDrift var(--rail-dur, 90s) linear infinite; }
.marquee-track.auto:hover, .marquee-track.auto.paused { animation-play-state: paused; }
@keyframes railDrift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track.auto { animation: none; } }

/* one line of links instead of three big studio cards */
.more-line { text-align: center; margin: clamp(20px,3vh,32px) auto 0; max-width: 900px;
  font-family: var(--font-head); font-size: clamp(15px, 1.7vw, 20px); line-height: 2.1;
  color: var(--ash-light); }
.more-line > span { font-family: var(--font-comic); color: var(--yellow);
  letter-spacing: 0.06em; margin-right: 10px; }
.more-line a { color: var(--bone); text-decoration: none;
  border-bottom: 2px solid var(--orange); padding-bottom: 1px; white-space: nowrap; }
.more-line a:hover { color: var(--yellow); border-bottom-color: var(--yellow); }
.more-line i { color: var(--ash); font-style: normal; margin: 0 10px; }
/* the paper block sits centred rather than in a half-empty two-column wrap */
.paper-centre { max-width: 760px; margin-left: auto; margin-right: auto; text-align: left; }
.paper-centre .eyebrow, .paper-centre h3 { text-align: left; }

/* the four tenets: a compact 2×2 instead of a full-width stack */
.tenets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .tenets { grid-template-columns: 1fr; } }
/* The label sits ABOVE the title, not absolutely positioned beside it. It
   used to be pinned at left:13px inside a 44 px left pad, which fits "WHAT"
   and "SIZE" and collides with the heading the moment the word is longer —
   "LABEL" and "RAW" both ran straight into their titles. A block cannot
   overlap the thing after it, whatever the word is. */
.tenet { position: relative; border: 2px solid var(--ink); border-radius: 6px;
  background: var(--panel); box-shadow: 4px 4px 0 var(--ink);
  padding: 13px 15px 14px; }
.tenet b { display: inline-block; margin-bottom: 5px; font-family: var(--font-comic);
  font-size: 11px; color: #FFF6E4; background: var(--rust); letter-spacing: 0.09em;
  padding: 2px 8px; border-radius: 4px; border: 2px solid var(--ink); }
.tenet h5 { font-family: var(--font-comic); font-weight: 400; font-size: 16px;
  letter-spacing: 0.02em; color: var(--ink); margin: 0 0 4px; line-height: 1.15; }
.tenet p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); }
.tenet:nth-child(2) { box-shadow: 4px 4px 0 var(--yellow); }
.tenet:nth-child(3) { box-shadow: 4px 4px 0 var(--blue); }
.tenet:nth-child(4) { box-shadow: 4px 4px 0 var(--orange); }


/* the lab and the equation plates sit centred in the column */
.tl-wrap { max-width: 1120px; margin-left: auto; margin-right: auto; }
.eq-card { max-width: 900px; margin-left: auto; margin-right: auto; }

/* ═══ Film lightbox ═══ */
.film-card.is-playable { cursor: pointer; position: relative; }
.film-card.is-playable::after {
  content: '▶'; position: absolute; top: 12px; left: 12px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow);
  color: var(--ink); font-size: 13px; box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.16s ease;
}
.film-card.is-playable:hover::after { transform: scale(1.12); }
.film-card.is-playable:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.film-lightbox { position: fixed; inset: 0; z-index: 3200; display: flex;
  align-items: center; justify-content: center; padding: 4vh 20px;
  background: rgba(21,24,32,0.9); }
.film-lightbox[hidden] { display: none; }
.film-stage { margin: 0; width: min(1100px, 100%); border: 3px solid var(--ink);
  border-radius: 8px; overflow: hidden; background: #0B0E15;
  box-shadow: 12px 12px 0 var(--orange); animation: popIn 0.34s cubic-bezier(0.22,1.4,0.36,1) both; }
.film-stage video { display: block; width: 100%; max-height: 76vh; background: #000; }
.film-stage figcaption { padding: 11px 15px 13px; font-family: var(--font-comic);
  font-size: 17px; letter-spacing: 0.03em; color: var(--bone); background: var(--ink); }
.film-close { position: absolute; top: 18px; right: 18px; width: 42px; height: 42px;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--yellow);
  font-family: var(--font-comic); font-size: 19px; color: var(--ink); cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); z-index: 2; }
.film-close:hover { transform: rotate(90deg) scale(1.08); }


/* ═══ Figure scale ═══
   Inline SVG figures scale with their container, so on a wide screen the
   type inside them grew far past the page's own type scale. Capping the
   figure width keeps the lettering consistent with the rest of the site;
   below that cap the SVG scales down and, because it carries a viewBox, the
   whole chart always stays visible rather than clipping. */
.panel-frame { max-width: 860px; margin-left: auto; margin-right: auto; }
.panel-frame > svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .panel-frame { max-width: 100%; } }
.paper-fig { max-width: 820px; margin-left: auto; margin-right: auto; }
.paper-fig svg, .paper-fig img { width: 100%; height: auto; display: block; }

/* the mobile menu lists pages, not sections — the sub-links are gone from
   the markup, and the former group headers are now the page links */
.mob-top { display: block; font-family: var(--font-head); font-weight: 700;
  font-size: 17px; color: var(--ink); text-decoration: none;
  padding: 13px 0; border-bottom: 2px solid rgba(21,24,32,0.12); }
.mob-top:last-of-type { border-bottom: none; }
.mob-top:hover, .mob-top:focus-visible { color: var(--rust); }

/* by module / by type — the same 49 lines, grouped two ways */
.bom-toggle { display: inline-flex; gap: 0; margin-bottom: 16px;
  border: 2px solid var(--ink); border-radius: 7px; overflow: hidden;
  box-shadow: 3px 3px 0 var(--ink); }
.bom-toggle button { font-family: var(--font-comic); font-size: 13px;
  letter-spacing: 0.05em; padding: 8px 16px; border: none; cursor: pointer;
  background: var(--bone); color: var(--ink); transition: background 0.18s ease; }
.bom-toggle button + button { border-left: 2px solid var(--ink); }
.bom-toggle button.on { background: var(--yellow); }
.bom-toggle button:hover:not(.on) { background: #FFF3D0; }

/* ═══ Architecture explorer — same book as everything else ═══
   It shipped with hairline borders, 18 px radii and white tabs, which read as
   a different product bolted onto the page. Ink lines, a hard shadow, comic
   tabs on a paper ground. */
.av-shell { border: 3px solid var(--ink); border-radius: 8px; background: var(--panel);
  overflow: hidden; box-shadow: 6px 6px 0 var(--ink); }
.dark-sec .av-shell { box-shadow: 6px 6px 0 rgba(0,0,0,0.75); border-color: var(--gold); }

.av-tabs { display: flex; gap: 0; padding: 0; flex-wrap: wrap;
  background: var(--ink); border-bottom: 3px solid var(--ink); }
.av-tab { font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.06em;
  padding: 10px 18px; border: none; border-right: 2px solid rgba(253,246,226,0.18);
  background: transparent; color: var(--ash-light); cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease; }
.av-tab:hover { color: var(--bone); background: rgba(253,246,226,0.08); }
.av-tab.on { background: var(--yellow); color: var(--ink); }

.av-desc { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6;
  color: var(--ash); padding: 11px 16px; background: var(--bone);
  border-bottom: 2px solid var(--ink); }
.av-desc strong { color: var(--ink); }
.av-decode { color: var(--rust); }
.av-paper { color: var(--ash); }

.av-stage { position: relative; height: clamp(420px, 58vh, 620px);
  background: var(--panel); }
.av-hint { position: absolute; bottom: 10px; left: 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ash);
  background: rgba(253,246,226,0.9); border: 2px solid var(--ink);
  border-radius: 4px; padding: 4px 8px; pointer-events: none; }
.arch-toolbar button, .arch-legend { font-family: var(--font-mono) !important; }
.arch-legend { border: 2px solid var(--ink) !important; border-radius: 5px !important;
  background: var(--bone) !important; }
.arch-tip { border: 2px solid var(--ink) !important; border-radius: 5px !important;
  background: var(--panel) !important; font-family: var(--font-mono) !important;
  box-shadow: 3px 3px 0 var(--ink) !important; }
.tl-reset { font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 9px 12px; border: 2px solid var(--ink);
  border-radius: 8px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  background: var(--bone); color: var(--ink); transition: transform 0.14s ease; }
.tl-reset:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }

/* the three interactive blocks sit centred in their column */
.tl-wrap, .wt-grid, .eq-card { margin-left: auto; margin-right: auto; }
.tl-wrap { max-width: 1120px; }
.eq-card { max-width: 900px; }
#retargetCam, [data-retarget-cam] { max-width: 1120px;
  margin-left: auto; margin-right: auto; }
/* the rig layer sits over the hand-drawn city, both inside the stage */
.tl-stage { position: relative; }
.tl-canvas { position: absolute; inset: 0; }
.tl-rig { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }


/* the networking widget sits in a bounded, centred column */
.rg-wrap { max-width: 1000px; margin-left: auto; margin-right: auto; }
.rg-wrap > #reachGlobe { grid-template-columns: minmax(0, 1fr) minmax(230px, 300px); }
@media (max-width: 900px) { .rg-wrap > #reachGlobe { grid-template-columns: 1fr; } }
/* four-column tables need a touch more room on a phone */
@media (max-width: 620px) {
  .data-table { font-size: 11px; }
  .data-table th, .data-table td { padding: 6px 4px !important; }
  .data-table td:first-child, .data-table th:first-child { max-width: 46%; }
}
/* the graph's buses carry real topic names, so they need to wrap and breathe */
.rg-bus code { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 5px;
  border-radius: 3px; background: rgba(21,24,32,0.16); font-size: 10.5px; }
.rg-bus { line-height: 1.9; }
.rg-tile.gold { background: var(--yellow); }
.rg-tile.green { background: #DDEBDF; }

/* ═══ Scene gallery ═══ */
.scene-bar { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.scene-count { font-family: var(--font-comic); font-size: 15px; letter-spacing: 0.05em;
  color: var(--rust); }
.scene-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.scene-filters button { font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.05em; padding: 6px 11px; border: 2px solid var(--ink);
  border-radius: 5px; background: var(--bone); color: var(--ink); cursor: pointer; }
.scene-filters button.on { background: var(--yellow); }
.scene-filters button i { font-style: normal; color: var(--ash); margin-left: 5px; }
.scene-filters button.on i { color: var(--ink-soft); }

.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px; }
@media (max-width: 560px) { .scene-grid { grid-template-columns: 1fr 1fr; gap: 9px; } }
.scene-cell { margin: 0; border: 2px solid var(--ink); border-radius: 6px;
  overflow: hidden; background: var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease; }
.scene-cell[hidden] { display: none; }
.scene-cell:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--orange); }
.scene-cell video { width: 100%; display: block; aspect-ratio: 4 / 3;
  object-fit: cover; background: #0E1016; }
.scene-cell figcaption { padding: 8px 10px 10px; }
.scene-cell b { display: block; font-family: var(--font-comic); font-size: 15px;
  letter-spacing: 0.03em; color: var(--bone); line-height: 1.15; }
.scene-cell span { display: block; margin-top: 2px; font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--orange); }
.scene-grid > *:nth-child(4n+2) { box-shadow: 4px 4px 0 var(--yellow); }
.scene-grid > *:nth-child(4n+3) { box-shadow: 4px 4px 0 var(--blue); }
.scene-grid > *:nth-child(4n)   { box-shadow: 4px 4px 0 var(--rust); }

/* ── glass-to-glass latency breakdown (teleop) ──────────────────────────────
   One stacked bar per transport, each block a real measured stage. The bar is
   a row of buttons rather than an SVG so it is hoverable, tappable AND
   tab-reachable without a second implementation. */
.lat-bars{position:relative;background:var(--panel);border:3px solid var(--ink);
  border-radius:18px;box-shadow:8px 8px 0 rgba(21,24,32,.9);
  padding:clamp(18px,2.6vw,30px);}
.lb-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;
  margin-bottom:clamp(14px,2vw,22px);}
.lb-title{font-family:Bangers,cursive;font-size:clamp(20px,2.4vw,27px);
  letter-spacing:1px;color:var(--orange);line-height:1;}
.lb-sub{font-family:'Space Mono',monospace;font-size:12px;color:var(--muted);}
.lb-rows{display:grid;gap:clamp(12px,1.8vw,18px);}
.lb-row{display:grid;grid-template-columns:minmax(120px,150px) 1fr auto;
  gap:clamp(10px,1.4vw,16px);align-items:center;}
.lb-label b{display:block;font-family:Jost,sans-serif;font-weight:700;
  font-size:14px;color:var(--ink);line-height:1.2;}
.lb-label i{display:block;font-family:'Space Mono',monospace;font-style:normal;
  font-size:10.5px;color:var(--muted);line-height:1.35;margin-top:3px;}
.lb-track{display:flex;height:38px;border:3px solid var(--ink);border-radius:7px;
  overflow:hidden;background:var(--bone);}
.lb-seg{flex:0 0 auto;border:0;border-right:2px solid rgba(21,24,32,.55);
  padding:0;cursor:pointer;position:relative;min-width:3px;
  transition:opacity .14s ease,filter .14s ease;}
.lb-seg:last-child{border-right:0;}
.lb-seg span{display:block;font-family:'Space Mono',monospace;font-size:10px;
  font-weight:700;color:#FFF9F0;text-shadow:0 1px 0 rgba(21,24,32,.7);
  letter-spacing:.4px;overflow:hidden;white-space:nowrap;}
.lb-seg:hover,.lb-seg:focus-visible{filter:brightness(1.15);outline:0;}
.lb-seg:focus-visible{box-shadow:inset 0 0 0 3px var(--yellow);}
.lb-seg.dim{opacity:.34;}
.lb-total{font-family:'Space Mono',monospace;font-weight:700;font-size:15px;
  color:var(--rust);white-space:nowrap;}
.lb-key{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:clamp(14px,2vw,20px);}
.lb-k{display:inline-flex;align-items:center;gap:6px;
  font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);}
.lb-k i{width:12px;height:12px;border:2px solid var(--ink);border-radius:3px;}
.lb-foot{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);
  margin:10px 0 0;}
.lb-foot code{font-size:10.5px;background:rgba(21,24,32,.06);padding:1px 5px;
  border-radius:4px;}
.lb-tip{position:absolute;z-index:6;width:min(320px,74vw);pointer-events:none;
  background:var(--ink);color:#FFF9F0;border:3px solid var(--ink);
  border-radius:12px;padding:12px 14px;box-shadow:6px 6px 0 rgba(21,24,32,.35);}
.lb-tip span{display:block;}
.lb-tip-path{font-family:'Space Mono',monospace;font-size:10px;letter-spacing:1px;
  text-transform:uppercase;color:rgba(255,249,240,.6);}
.lb-tip-stage{font-family:Bangers,cursive;font-size:19px;letter-spacing:1px;
  line-height:1.1;margin-top:2px;}
.lb-tip-ms{font-family:'Space Mono',monospace;font-weight:700;font-size:22px;
  color:var(--yellow);line-height:1.2;}
.lb-tip-share{font-family:'Space Mono',monospace;font-size:10.5px;
  color:rgba(255,249,240,.65);margin-bottom:7px;}
.lb-tip-what{font-family:Jost,sans-serif;font-size:12.5px;line-height:1.45;}
.lb-tip-note{font-family:Jost,sans-serif;font-size:12px;line-height:1.45;
  margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,249,240,.22);
  color:var(--yellow);}
@media (max-width:620px){
  .lb-row{grid-template-columns:1fr auto;grid-template-areas:"l t" "b b";}
  .lb-label{grid-area:l;} .lb-total{grid-area:t;} .lb-track{grid-area:b;height:32px;}
  .lb-seg span{display:none;}
}

/* ═══ Webcam retargeting demo ═══
   Prefixed `wt-` on purpose. The first version used `rc-`, which an older
   dark control panel higher up this file already owns; `.rc-seg button` there
   sets a pale bone text colour, so it won over `.rc-btn` on specificity and
   the OFF/ON labels rendered invisible on a light panel. Renaming ends the
   collision rather than out-specifying it. */
.wt-grid { display: grid; grid-template-columns: 1fr minmax(250px, 330px);
  gap: 14px; align-items: stretch; }
@media (max-width: 900px) { .wt-grid { grid-template-columns: 1fr; } }
.wt-grid > * { min-width: 0; }

/* The rig fills the row rather than holding a 4:3 box: the readouts, camera
   and gesture card together are taller than 4:3, and pinning the aspect left
   a third of the panel as empty background. */
.wt-rig { position: relative; border: 3px solid var(--ink); border-radius: 8px;
  overflow: hidden; background: var(--bone); box-shadow: 6px 6px 0 var(--ink);
  min-height: 460px; touch-action: none; cursor: grab; }
@media (max-width: 900px) { .wt-rig { aspect-ratio: 4 / 3; min-height: 0; } }
.wt-rig:active { cursor: grabbing; }
.dark-sec .wt-rig { box-shadow: 6px 6px 0 rgba(0,0,0,0.8); border-color: var(--gold);
  background: #171A24; }
.wt-3d { width: 100%; height: 100%; display: block; }
.wt-hint { position: absolute; right: 10px; top: 10px; font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.04em; color: var(--ash);
  background: rgba(253,246,226,0.82); border: 2px solid var(--ink);
  border-radius: 5px; padding: 3px 8px; pointer-events: none; }
.dark-sec .wt-hint { background: rgba(23,26,36,0.85); color: var(--ash-light);
  border-color: var(--gold); }
.wt-view { position: absolute; right: 10px; bottom: 10px; font-family: var(--font-comic);
  font-size: 11px; letter-spacing: 0.05em; padding: 5px 11px; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 5px; background: var(--bone);
  color: var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform .14s ease; }
.wt-view:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }

.wt-side { display: flex; flex-direction: column; gap: 12px; }
.wt-panel { border: 3px solid var(--ink); border-radius: 8px; background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink); padding: 14px; }
.dark-sec .wt-panel { box-shadow: 6px 6px 0 rgba(0,0,0,0.8); }
.wt-panel-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 10px; }
.wt-panel-title { font-family: var(--font-comic); font-size: 15px;
  letter-spacing: 0.05em; color: var(--ink); }
.wt-state { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em;
  color: var(--ash); text-align: right; max-width: 62%; }
.wt-state.bad { color: var(--rust); }

/* A two-state switch that says which state it is in from across the room.
   The version before this used a pale pill for both halves, so the inactive
   label was near-invisible and you could not tell the camera was off. Now the
   ACTIVE half is a solid colour with light text — red for off, green for on —
   and the inactive half is plain ink on bone, always readable. */
.wt-seg { display: grid; grid-template-columns: 1fr 1fr; border: 3px solid var(--ink);
  border-radius: 8px; overflow: hidden; box-shadow: 4px 4px 0 var(--ink); }
.wt-btn { display: flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.06em;
  padding: 11px 10px; border: none; cursor: pointer; background: var(--bone);
  color: var(--ink); transition: background .18s ease, color .18s ease; }
.wt-btn::before { content: ""; width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid currentColor; background: transparent; }
.wt-btn + .wt-btn { border-left: 3px solid var(--ink); }
.wt-btn[data-cam="off"].on { background: var(--rust); color: #FFF6E4; }
.wt-btn[data-cam="on"].on { background: var(--green); color: #FFF6E4; }
.wt-btn.on::before { background: currentColor; }
.wt-btn:hover:not(.on) { background: var(--pop); }
.wt-state { font-weight: 700; }
.wt-panel-head .wt-state::before { content: "● "; color: var(--rust); }
.wt-panel-head .wt-state.live::before { color: var(--green); }
.wt-recal { width: 100%; margin-top: 9px; font-family: var(--font-comic);
  font-size: 12px; letter-spacing: 0.05em; padding: 8px 10px; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 7px; background: var(--bone);
  color: var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .14s ease, opacity .14s ease; }
.wt-recal:hover:not(:disabled) { transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 var(--ink); }
.wt-recal:disabled { opacity: 0.4; cursor: default; box-shadow: 2px 2px 0 var(--ink); }
.wt-priv { margin: 10px 0 0; font-size: 11px; line-height: 1.55; color: var(--ash); }

.wt-hud { display: flex; flex-direction: column; gap: 4px; margin-top: 11px; }
.wt-hud span { display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em;
  color: var(--ash); border-top: 1px solid rgba(21,24,32,0.14); padding-top: 4px; }
.wt-hud b { font-family: var(--font-display); font-size: 14px; color: var(--rust);
  white-space: nowrap; }

.wt-cam { position: relative; border: 3px solid var(--ink); border-radius: 8px;
  overflow: hidden; background: #0B0E15; box-shadow: 6px 6px 0 var(--ink);
  aspect-ratio: 4 / 3; }
.dark-sec .wt-cam { box-shadow: 6px 6px 0 rgba(0,0,0,0.8); border-color: var(--gold); }
.wt-video { width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scaleX(-1); background: #0B0E15; }
.wt-overlay { position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; }
.wt-idle { position: absolute; inset: 0; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg,#1B1F2B 0 14px,#171A24 14px 28px); }
.wt-idle[hidden] { display: none; }
.wt-idle-word { font-family: var(--font-comic); font-size: clamp(15px, 2.4vw, 22px);
  color: var(--yellow); -webkit-text-stroke: 2px var(--ink); letter-spacing: 0.05em; }

.wt-badge { position: absolute; top: 9px; left: 9px; font-family: var(--font-comic);
  font-size: 12px; letter-spacing: 0.1em; padding: 3px 9px; color: var(--ink);
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 4px; }
.wt-badge.alt { background: var(--orange); color: #FFF9F0; }
.wt-verdict { position: absolute; left: 9px; bottom: 9px; }
.wt-mode { font-family: var(--font-comic); font-size: 13px; letter-spacing: 0.05em;
  padding: 5px 11px; border: 2px solid var(--ink); border-radius: 4px;
  background: var(--bone); color: var(--ink); }
.wt-mode.look { background: var(--green); color: #FFF6E4; }
.wt-mode.drive { background: var(--blue); color: #FFF6E4; }

.wt-ges { border: 2px dashed var(--ink); border-radius: 8px; padding: 9px 11px;
  display: flex; flex-direction: column; gap: 3px; }
.dark-sec .wt-ges { border-color: rgba(217,161,63,0.55); }
.wt-ges-lab { font-family: var(--font-comic); font-size: 12px; letter-spacing: 0.06em;
  color: var(--orange); }
.wt-ges-list { font-family: var(--font-mono); font-size: 11px; color: var(--ash);
  line-height: 1.5; }
.dark-sec .wt-ges-list { color: var(--ash-light); }

.wt-note { margin: 12px 0 0; font-family: var(--font-mono); font-size: 11px;
  line-height: 1.6; color: var(--ash); }
.dark-sec .wt-note { color: var(--ash-light); }
.wt-note code { font-size: 10.5px; background: rgba(21,24,32,0.07);
  padding: 1px 5px; border-radius: 4px; }
.dark-sec .wt-note code { background: rgba(255,255,255,0.09); }

/* ═══ BUILD ONE NOW! — the comic starburst in the nav ═══
   A 22-point star cut straight out of the button box. The ink outline is a
   second, slightly larger star sitting behind it, because clip-path crops the
   border away — you cannot stroke a clipped edge. */
.nav-build { position: relative; display: inline-grid; place-items: center;
  width: 186px; height: 66px; margin: -10px 2px -10px 8px; flex: 0 0 auto;
  text-decoration: none; isolation: isolate;
  /* NOT 0.72. `.nav-links a` dims every link in the bar so the active one
     reads as active, and the starburst is an <a> in that bar — so the one
     thing on the page allowed to shout was rendering its cab yellow at 72%
     over cream, which lands on a faded #FED946. .nav-cta two rules over
     already carries this exact override; this one was missed. */
  opacity: 1 !important; }
.nav-build::before, .nav-build::after { content: ""; position: absolute;
  inset: 0; clip-path: polygon(50.0% 0.0%, 60.4% 14.5%, 77.0% 7.9%, 78.0% 25.8%,
    95.5% 29.2%, 86.6% 44.7%, 99.5% 57.1%, 83.7% 65.4%, 87.8% 82.7%, 70.0% 81.1%,
    64.1% 98.0%, 50.0% 87.0%, 35.9% 98.0%, 30.0% 81.1%, 12.2% 82.7%, 16.3% 65.4%,
    0.5% 57.1%, 13.4% 44.7%, 4.5% 29.2%, 22.0% 25.8%, 23.0% 7.9%, 39.6% 14.5%); }
.nav-build::before { background: var(--ink); transform: scale(1.06) translate(1px,2px); }
.nav-build::after { background: var(--pop); z-index: 1; }
/* NYC-cab yellow, ink lettering — the star is the loudest thing in the bar
   on purpose, and it is now the ONLY way into the build (the Build dropdown
   beside it said the same thing twice). */
.nav-build span { position: relative; z-index: 2; font-family: var(--font-comic);
  font-size: 15px; line-height: 1.02; letter-spacing: 0.03em; color: var(--ink);
  text-align: center; transform: rotate(-4deg); pointer-events: none;
  text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.nav-build:hover::after { background: #FFDD33; }
/* The bar's generic link hover paints a rounded box behind whatever it wraps; the
   starburst is its own shape, so its hover stays inside the burst. */
.nav-links a.nav-build:hover, .mob a.nav-build:hover { background: transparent; }
.nav-build:hover::before { transform: scale(1.06) translate(2px, 3px); }
.nav-build:hover { animation: buildPop 0.5s ease; }
.nav-build:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px;
  border-radius: 6px; }
@keyframes buildPop {
  0% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(-5deg) scale(1.09); }
  70% { transform: rotate(4deg) scale(1.04); }
  100% { transform: rotate(0deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .nav-build:hover { animation: none; } }
/* it lives at the very end of the bar, after the Build menu */
.nav-links .nav-build { order: 99; }
/* On the phone sheet the star cannot stretch: clip-path scales the polygon
   with the box, so a 100%-wide, 66px-tall star becomes a flat smear with the
   lettering hanging off its left edge. Give it its own honest proportions and
   centre it in the sheet. */
.mob .nav-build { width: 214px; height: 78px; margin: 14px auto 4px;
  display: grid; place-items: center; }
.mob .nav-build span { font-size: 17px; }

/* the star's spikes reach past the pill, so the bar needs room on the right */
.nav:has(.nav-build) { padding-right: 12px; }
@media (max-width: 1120px) { .nav-build { display: none; } }

/* ═══ Hardware subsystem slider ═══
   Cards side by side, scroll-snapped. Each is a portrait of the real part
   with what it is, why, its specs and what it costs; opening one shows the
   BOM lines behind it. */
.hw-slider { position: relative; }
.hs-head { display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px; }
.hs-count { font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.06em;
  color: var(--rust); text-transform: uppercase; }
.hs-nav { display: flex; gap: 8px; }
.hs-arrow { width: 40px; height: 40px; font-size: 22px; line-height: 1; cursor: pointer;
  font-family: var(--font-display); border: 3px solid var(--ink); border-radius: 8px;
  background: var(--yellow); color: var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .14s ease, opacity .14s ease; }
.hs-arrow:hover:not(:disabled) { transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 var(--ink); background: var(--hi); }
.hs-arrow:disabled { opacity: 0.35; cursor: default; box-shadow: 2px 2px 0 var(--ink); }

.hs-rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 18px; scrollbar-width: thin; }
.hs-rail:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px;
  border-radius: 10px; }
.hs-card { flex: 0 0 min(330px, 78vw); scroll-snap-align: center;
  display: flex; flex-direction: column; background: var(--panel);
  border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 7px 7px 0 var(--ink); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease; }
.hs-card:hover { transform: translate(-3px,-3px); box-shadow: 10px 10px 0 var(--ink); }
.hs-shot { position: relative; background: var(--bone);
  border-bottom: 3px solid var(--ink); aspect-ratio: 4/3; }
.hs-shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hs-kicker { position: absolute; left: 9px; bottom: 9px;
  font-family: var(--font-comic); font-size: 11px; letter-spacing: 0.06em;
  padding: 3px 9px; background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 4px; }
.hs-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.hs-name { font-family: var(--font-display); font-size: 24px; line-height: 1.05;
  margin: 0 0 7px; color: var(--ink); }
.hs-blurb { font-size: 13px; line-height: 1.55; color: var(--ash); margin: 0 0 12px; }
.hs-design { margin:3px 0 12px;font:13px var(--font-head); }
.hs-design summary { cursor:pointer; }
.hs-design .hs-blurb { margin:10px 0 0; }
.hs-specs { margin: 0 0 12px; display: grid; gap: 0; }
.hs-specs > div { display: flex; justify-content: space-between; gap: 12px;
  align-items: baseline; padding: 5px 0;
  border-top: 1px solid rgba(21,24,32,0.12); }
.hs-specs dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ash); margin: 0; flex: 0 0 auto; }
.hs-specs dd { margin: 0; font-size: 12px; text-align: right; color: var(--ink);
  font-weight: 600; }
.hs-specs.wide { grid-template-columns: 1fr 1fr; gap: 0 22px; margin-bottom: 18px; }
@media (max-width: 620px) { .hs-specs.wide { grid-template-columns: 1fr; } }
.hs-foot { margin-top: auto; display: flex; align-items: center; gap: 10px;
  justify-content: space-between; padding-top: 10px;
  border-top: 2px solid var(--ink); }
.hs-price { display: flex; flex-direction: column; line-height: 1.1;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.05em;
  color: var(--ash); text-transform: uppercase; }
.hs-price b { font-family: var(--font-display); font-size: 21px; color: var(--rust);
  letter-spacing: 0; }
.hs-more { font-family: var(--font-comic); font-size: 12px; letter-spacing: 0.04em;
  padding: 8px 12px; cursor: pointer; border: 2px solid var(--ink);
  border-radius: 7px; background: var(--yellow); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink); transition: transform .14s ease; }
.hs-more:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink);
  background: var(--hi); color: #FFF9F0; }

.hs-dots { display: flex; gap: 7px; justify-content: center; margin-top: 4px; }
.hs-dot { width: 10px; height: 10px; padding: 0; cursor: pointer; border-radius: 50%;
  border: 2px solid var(--ink); background: transparent; transition: background .15s; }
.hs-dot.on { background: var(--rust); }

/* the detail sheet */
.hs-sheet { position: fixed; inset: 0; z-index: 400; background: rgba(21,24,32,0.78);
  display: grid; place-items: start center; padding: clamp(10px,3vw,40px);
  overflow-y: auto; -webkit-overflow-scrolling: touch; }
.hs-sheet[hidden] { display: none; }
.hs-sheet-in { position: relative; width: min(820px, 100%); margin: auto;
  background: var(--panel); border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 10px 10px 0 rgba(21,24,32,0.55); padding: clamp(16px,3vw,30px);
  max-height: none; }
@media (min-width: 700px) {
  .hs-sheet { place-items: center; }
  .hs-sheet-in { max-height: 90vh; overflow-y: auto; }
}
@media (max-width: 700px) {
  /* on a phone the sheet IS the page: let it scroll with the document rather
     than trapping a long parts table in a short inner scroller */
  .hs-sheet-in { padding: 16px 14px 22px; border-radius: 12px; }
  .hs-sheet-head img { max-width: 200px; }
  .hs-close { position: sticky; top: 0; float: right; }
  .hs-table { font-size: 12px; }
  .hs-files b { flex-basis: 84px; }
}
.hs-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  cursor: pointer; font-size: 15px; border: 2px solid var(--ink); border-radius: 7px;
  background: var(--bone); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.hs-close:hover { background: var(--rust); color: #FFF9F0; }
.hs-sheet-head { display: grid; grid-template-columns: 190px 1fr; gap: 18px;
  align-items: start; margin-bottom: 16px; }
@media (max-width: 620px) { .hs-sheet-head { grid-template-columns: 1fr; } }
.hs-sheet-head img { width: 100%; background: var(--bone); border: 3px solid var(--ink);
  border-radius: 10px; display: block; }
.hs-sheet-kick { font-family: var(--font-comic); font-size: 12px;
  letter-spacing: 0.07em; color: var(--orange); text-transform: uppercase; }
.hs-sheet-head h3 { font-family: var(--font-display); font-size: clamp(26px,4vw,36px);
  line-height: 1; margin: 3px 0 8px; color: var(--ink); }
.hs-sheet-head p { font-size: 14px; line-height: 1.6; color: var(--ash); margin: 0; }
.hs-gotcha { font-size: 13px; line-height: 1.6; margin: 0 0 16px; padding: 11px 14px;
  background: rgba(240,118,46,0.12); border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0; color: var(--ink); }
.hs-sub { font-family: var(--font-comic); font-size: 15px; letter-spacing: 0.05em;
  color: var(--rust); margin: 20px 0 9px; text-transform: uppercase; }
.hs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hs-table th { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ash); text-align: left; padding: 0 8px 6px 0;
  border-bottom: 2px solid var(--ink); }
.hs-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid rgba(21,24,32,0.11);
  vertical-align: top; }
.hs-table i { font-style: normal; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ash); }
.hs-ref { font-family: var(--font-mono); font-size: 10.5px; color: var(--ash);
  white-space: nowrap; }
.hs-qty { font-family: var(--font-mono); white-space: nowrap; color: var(--ash); }
.hs-cost { font-family: var(--font-mono); font-weight: 700; text-align: right;
  white-space: nowrap; color: var(--rust); }
.hs-note { display: block; font-size: 10.5px; line-height: 1.45; color: var(--ash);
  margin-top: 3px; }
.hs-tier { display: inline-block; margin-left: 7px; font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 4px; border: 1px solid var(--ink); }
.hs-tier.t-essential { background: var(--green); color: #FFF6E4; border-color: var(--green); }
.hs-tier.t-recommended { background: var(--yellow); }
.hs-tier.t-maximum { background: var(--rust); color: #FFF6E4; border-color: var(--rust); }
.hs-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hs-files li { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; }
.hs-files b { flex: 0 0 110px; color: var(--ink); }
.hs-files code { font-family: var(--font-mono); font-size: 11px; color: var(--ash);
  background: rgba(21,24,32,0.06); padding: 2px 6px; border-radius: 4px;
  word-break: break-all; }
.hs-src { font-size: 11.5px; color: var(--ash); margin: 18px 0 0;
  padding-top: 12px; border-top: 1px solid rgba(21,24,32,0.13); }
.hs-src code { font-family: var(--font-mono); font-size: 10.5px; }
.hs-err { font-family: var(--font-mono); font-size: 12px; color: var(--rust); }
.hs-table a em { font-style: normal; font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ash);
  padding: 1px 5px; border: 1px solid rgba(21,24,32,0.3); border-radius: 4px;
  margin-left: 5px; }

/* the scene gallery's second filter axis + the moving badge */
.scene-filters.cats { margin: 10px 0 14px; flex-wrap: wrap; }
.sg-live { position: absolute; top: 8px; right: 8px; z-index: 2;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 4px; border: 2px solid var(--ink);
  background: var(--green); color: #FFF6E4; }
.scene-cell { position: relative; }
.sg-desc { display: none; }
.sg-err { font-family: var(--font-mono); font-size: 12px; color: var(--rust); }

/* ═══ In-browser curation studio (autonomy) ═══
   A viewer, a quality panel, a bin, and a real EDL timeline underneath. */
.cur-lab { border: 3px solid var(--ink); border-radius: 14px; background: var(--panel);
  box-shadow: 8px 8px 0 var(--ink); padding: clamp(14px,2vw,20px); }
.dark-sec .cur-lab { box-shadow: 8px 8px 0 rgba(0,0,0,.8); border-color: var(--gold); }
.cl-top { display: grid; grid-template-columns: 1fr minmax(220px, 300px); gap: 14px; }
@media (max-width: 860px) { .cl-top { grid-template-columns: 1fr; } }
.cl-view { position: relative; border: 3px solid var(--ink); border-radius: 9px;
  overflow: hidden; background: #0B0E15; aspect-ratio: 16/10;
  max-height: 46vh; }
/* Three stacked elements, one per episode — see curation-lab.js. They must
   OVERLAP, so they are absolutely positioned; and [hidden] must beat the
   display:block that made them visible in the first place. */
.cl-video { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; }
.cl-video[hidden] { display: none !important; }
.cl-hud { position: absolute; left: 0; right: 0; top: 0; display: flex;
  justify-content: space-between; gap: 8px; padding: 8px 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em;
  color: #FFF6E4; text-shadow: 0 1px 3px rgba(0,0,0,.9); pointer-events: none; }
.cl-clipname { font-family: var(--font-comic); font-size: 12px; letter-spacing: 0.05em;
  color: var(--yellow); }
.cl-flag { position: absolute; left: 10px; bottom: 10px; right: 10px;
  font-family: var(--font-comic); font-size: 12px; letter-spacing: 0.04em;
  padding: 6px 10px; border-radius: 6px; border: 2px solid var(--ink);
  background: var(--rust); color: #FFF6E4; }
.cl-flag[hidden] { display: none; }

.cl-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cl-panel { border: 2px solid var(--ink); border-radius: 9px; background: var(--bone);
  padding: 11px 12px; }
.cl-panel h4 { font-family: var(--font-comic); font-size: 13px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--rust); margin: 0 0 8px; }
.cl-score { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.cl-scorev { font-family: var(--font-display); font-size: 30px; line-height: 1;
  color: var(--green); }
.cl-scorev.bad { color: var(--rust); }
.cl-score span { font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ash); }
.cl-defects { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.cl-defects li { font-size: 11.5px; line-height: 1.45; color: var(--ink-soft);
  padding-left: 9px; border-left: 3px solid var(--ash); }
.cl-defects li b { display: block; font-family: var(--font-comic); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.cl-defects li i { display: block; font-family: var(--font-mono); font-style: normal;
  font-size: 9.5px; color: var(--ash); margin-top: 2px; }
.cl-defects li.d-frozen { border-left-color: var(--rust); }
.cl-defects li.d-gap { border-left-color: var(--orange); }
.cl-defects li.d-rate, .cl-defects li.d-low_rate { border-left-color: var(--gold); }
.cl-defects li.clean { border-left-color: var(--green); color: var(--green); }
.cl-bin { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cl-bin button { width: 100%; text-align: left; cursor: pointer; padding: 7px 9px;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--panel);
  transition: transform .12s ease; }
.cl-bin button:hover { transform: translate(-2px,-2px); box-shadow: 3px 3px 0 var(--ink);
  background: var(--yellow); }
.cl-bin b { display: block; font-size: 12px; color: var(--ink); }
.cl-bin span { font-family: var(--font-mono); font-size: 9.5px; color: var(--ash); }
.cl-bin i { font-style: normal; font-weight: 700; }
.cl-bin i.ok { color: var(--green); } .cl-bin i.bad { color: var(--rust); }

.cl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin: 13px 0 9px; }
.cl-btn { font-family: var(--font-comic); font-size: 12px; letter-spacing: 0.04em;
  padding: 7px 11px; cursor: pointer; border: 2px solid var(--ink); border-radius: 6px;
  background: var(--bone); color: var(--ink); box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s ease; }
.cl-btn:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink);
  background: var(--yellow); }
.cl-btn.cl-play { background: var(--green); color: #FFF6E4; }
.cl-btn kbd { font-family: var(--font-mono); font-size: 9px; margin-left: 5px;
  padding: 1px 4px; border: 1px solid currentColor; border-radius: 3px; opacity: .7; }
.cl-len { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ash); }
.dark-sec .cl-len { color: var(--ash-light); }

/* A timeline with a VIEWPORT: the strip inside can be wider than the panel and
   scrolls, which is what zooming means. Lane labels sit outside the scroller so
   they stay put. */
/* NOT .cl-view — that name already belongs to the video panel above, and
   reusing it handed the timeline a 16:10 aspect ratio and a black background.
   The wrapper's height is the sum of its lanes, so the scroller cannot stretch
   to fill whatever row it lands in. */
.cl-tlwrap { display: grid; grid-template-columns: 40px 1fr; gap: 6px;
  align-items: start; }
.cl-lanes { display: grid; grid-template-rows: 20px 56px 56px 18px 30px;
  gap: 0; height: 186px; box-sizing: border-box; padding: 3px 0; }
.cl-lane-lab { display: flex; align-items: center; justify-content: flex-end;
  padding-right: 5px; font-family: var(--font-mono); font-size: 8.5px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ash); }
.cl-lanes .cl-lane-lab:nth-child(1) { grid-row: 2; }
.cl-lanes .cl-lane-lab:nth-child(2) { grid-row: 3; }
.cl-lanes .cl-lane-lab:nth-child(3) { grid-row: 4; }
.cl-lanes .cl-lane-lab:nth-child(4) { grid-row: 5; }
.cl-scroll { overflow-x: auto; overflow-y: hidden; border: 3px solid var(--ink);
  border-radius: 9px; background: var(--bone); height: 186px; }
.cl-timeline { position: relative; padding: 20px 0 0; cursor: crosshair;
  user-select: none; touch-action: pan-x; height: 180px; }
.cl-ruler { position: absolute; top: 0; left: 0; right: 0; height: 18px;
  border-bottom: 1px solid rgba(21,24,32,.18); }
.cl-ruler span { position: absolute; top: 3px; font-family: var(--font-mono);
  font-size: 8.5px; color: var(--ash); transform: translateX(-50%); }
.cl-track { position: relative; height: 56px; }
.cl-track.alt { border-top: 1px dashed rgba(21,24,32,.22);
  background: rgba(21,24,32,.035); }
.cl-clip { position: absolute; top: 4px; bottom: 4px; border: 2px solid var(--ink);
  border-radius: 6px; background: var(--yellow); overflow: hidden; cursor: grab;
  display: flex; flex-direction: column; justify-content: center; padding: 0 12px; }
.cl-clip.on { background: var(--hi); color: #FFF9F0; box-shadow: inset 0 0 0 2px var(--ink); }
.cl-lab { font-family: var(--font-comic); font-size: 11.5px; letter-spacing: 0.03em;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-meta { font-family: var(--font-mono); font-size: 9px; color: rgba(21,24,32,.65);
  white-space: nowrap; overflow: hidden; }
.cl-grip { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize;
  background: rgba(21,24,32,.22); }
.cl-grip.in { left: 0; } .cl-grip.out { right: 0; }
.cl-grip:hover { background: var(--ink); }
.cl-defrow { position: relative; height: 18px; border-top: 1px solid rgba(21,24,32,.18);
  background: rgba(21,24,32,.05); }
.cl-def { position: absolute; top: 4px; height: 10px; min-width: 3px; border-radius: 2px;
  border: 1px solid var(--ink); }
.cl-def.d-frozen { background: var(--rust); }
.cl-def.d-gap { background: var(--orange); }
.cl-def.d-rate, .cl-def.d-low_rate { background: var(--gold); }
.cl-notes { position: relative; height: 30px; border-top: 1px solid rgba(21,24,32,.18); }
.cl-note-chip { position: absolute; top: 4px; height: 22px; display: flex;
  align-items: center; gap: 5px; padding: 0 8px; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 5px; background: var(--blue);
  color: #FFF6E4; font-size: 10.5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.cl-note-chip i { font-style: normal; font-family: var(--font-mono); font-size: 8px;
  letter-spacing: .06em; text-transform: uppercase; padding: 1px 4px;
  border-radius: 3px; background: rgba(255,255,255,.25); }
.cl-note-chip:hover { background: var(--rust); }
.cl-clean { position: absolute; left: 9px; top: 3px; font-family: var(--font-mono);
  font-size: 9px; color: var(--green); }
.cl-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--rust);
  pointer-events: none; box-shadow: 0 0 0 1px rgba(253,246,226,.6); z-index: 3; }
.cl-head::before { content: ""; position: absolute; top: 0; left: -5px;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 8px solid var(--rust); }
.cl-zoom { display: inline-flex; align-items: center; gap: 4px; }
.cl-btn.sq { padding: 6px 0; font-size: 15px; line-height: 1; width: 30px;
  text-align: center; font-family: var(--font-mono); font-weight: 700; }
.cl-btn.sq.wide { width: auto; padding: 6px 10px; font-size: 11px;
  font-family: var(--font-comic); letter-spacing: .05em; }
.cl-zv { font-family: var(--font-mono); font-size: 10px; color: var(--ash);
  min-width: 30px; text-align: center; }
.dark-sec .cl-zv { color: var(--ash-light); }

/* the label / caption dialog, in the site's hand rather than the browser's */
.cl-ask { position: fixed; inset: 0; z-index: 500; background: rgba(21,24,32,.7);
  display: grid; place-items: center; padding: 20px; }
.cl-ask-in { width: min(430px, 100%); background: var(--panel);
  border: 3px solid var(--ink); border-radius: 14px; padding: 20px;
  box-shadow: 9px 9px 0 rgba(21,24,32,.5); }
.cl-ask-in h5 { font-family: var(--font-comic); font-size: 17px;
  letter-spacing: .04em; color: var(--rust); margin: 0 0 12px; }
.cl-ask-langs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.cl-lang { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  padding: 4px 9px; cursor: pointer; border: 2px solid var(--ink);
  border-radius: 5px; background: var(--bone); color: var(--ink); }
.cl-lang.on { background: var(--blue); color: #FFF6E4; }
.cl-ask-text { width: 100%; box-sizing: border-box; font-family: var(--font-body);
  font-size: 15px; padding: 10px 12px; border: 3px solid var(--ink);
  border-radius: 8px; background: var(--bone); color: var(--ink); }
.cl-ask-text:focus { outline: 3px solid var(--yellow); outline-offset: 2px; }
.cl-ask-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.cl-btn.cl-ok { background: var(--green); color: #FFF6E4; }

.cl-note { font-size: 11.5px; line-height: 1.6; color: var(--ash); margin: 12px 0 0; }
.dark-sec .cl-note { color: var(--ash-light); }
.cl-err { font-family: var(--font-mono); font-size: 12px; color: var(--rust); }

/* ═══ Figures on the autonomy page ═══ */
.map-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .map-row { grid-template-columns: 1fr; } }
.map-fig { margin: 0; border: 3px solid var(--ink); border-radius: 10px;
  overflow: hidden; background: var(--panel); box-shadow: 6px 6px 0 var(--ink); }
.map-fig img { width: 100%; display: block; image-rendering: pixelated;
  border-bottom: 3px solid var(--ink); background: #CDC2A5; }
.map-fig figcaption { padding: 9px 12px; }
.map-fig b { display: block; font-family: var(--font-comic); font-size: 14px;
  letter-spacing: 0.04em; color: var(--ink); }
.map-fig span { font-family: var(--font-mono); font-size: 10px; color: var(--ash); }
.fig-note { font-size: 12px; line-height: 1.65; color: var(--ash); margin: 12px 0 0; }
.fig-note code { font-family: var(--font-mono); font-size: 10.5px;
  background: rgba(21,24,32,0.06); padding: 1px 5px; border-radius: 4px; }

.studio-shot { margin: 0; border: 3px solid var(--ink); border-radius: 12px;
  overflow: hidden; background: #0B0E15; box-shadow: 8px 8px 0 var(--ink); }
.dark-sec .studio-shot { box-shadow: 8px 8px 0 rgba(0,0,0,.8); border-color: var(--gold); }
.studio-shot img { width: 100%; display: block; }
.studio-shot figcaption { padding: 11px 14px; font-size: 12.5px; line-height: 1.6;
  color: var(--ash); background: var(--panel); border-top: 3px solid var(--ink); }
.dark-sec .studio-shot figcaption { background: #171A24; color: var(--ash-light);
  border-top-color: var(--gold); }
.studio-shot code { font-family: var(--font-mono); font-size: 11px;
  background: rgba(21,24,32,0.08); padding: 1px 5px; border-radius: 4px; }
.dark-sec .studio-shot code { background: rgba(255,255,255,0.1); }

/* sim ↔ real pairs */
.ab-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1000px) { .ab-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ab-row { grid-template-columns: 1fr; } }
.ab-cell { position: relative; margin: 0; border: 3px solid var(--ink);
  border-radius: 10px; overflow: hidden; background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink); }
.ab-cell video { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  background: #171A24; border-bottom: 3px solid var(--ink); }
.ab-cell figcaption { padding: 9px 11px; font-size: 11.5px; line-height: 1.5;
  color: var(--ash); }
.ab-tag { position: absolute; top: 9px; left: 9px; z-index: 2;
  font-family: var(--font-comic); font-size: 10.5px; letter-spacing: 0.07em;
  padding: 3px 8px; border-radius: 4px; border: 2px solid var(--ink); }
.ab-tag.sim { background: var(--blue); color: #FFF6E4; }
.ab-tag.real { background: var(--rust); color: #FFF6E4; }
.hs-art { margin: 0 0 18px; border: 2px solid var(--ink); border-radius: 9px;
  overflow: hidden; background: var(--bone); }
.hs-art img { width: 100%; display: block; }
.hs-art figcaption { padding: 7px 11px; font-family: var(--font-mono);
  font-size: 10px; color: var(--ash); border-top: 2px solid var(--ink);
  background: var(--panel); }

/* ── the webcam demo on a phone: compact ──────────────────────────────────
   A 4:3 rig, a seven-row readout, a 4:3 camera, a gesture card and a
   paragraph of notes is four screens of scrolling for one widget. On a phone
   the two views are what matter; the numbers and the footnote are not. */
@media (max-width: 700px) {
  .wt-grid { gap: 10px; }
  .wt-rig { aspect-ratio: 3 / 2; }
  .wt-cam { aspect-ratio: 3 / 2; }
  .wt-side { gap: 10px; }
  .wt-panel { padding: 11px 12px; }
  .wt-hud { display: none; }
  .wt-priv { font-size: 10.5px; margin-top: 8px; }
  .wt-ges { padding: 7px 10px; }
  .wt-ges-list { font-size: 10px; }
  .wt-note { display: none; }
  .wt-hint { display: none; }
  .wt-recal { font-size: 11px; padding: 7px 8px; }
  .wt-panel-title { font-size: 13px; }
}

/* ═══ Retargeting comparison — seven maps on one bench ═══ */
.rc2 { border: 3px solid var(--ink); border-radius: 14px; background: var(--panel);
  box-shadow: 8px 8px 0 var(--ink); padding: clamp(16px,2.4vw,26px);
  position: relative; }
.dark-sec .rc2 { box-shadow: 8px 8px 0 rgba(0,0,0,.8); border-color: var(--gold); }
.rc2-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr);
  gap: 16px; align-items: end; margin-bottom: 14px; }
@media (max-width: 820px) { .rc2-head { grid-template-columns: 1fr; } }
.rc2-kicker { font-family: var(--font-comic); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--hi); }
.rc2-title { font-family: var(--font-display); font-size: clamp(24px,3.4vw,34px);
  line-height: 1; margin: 4px 0 0; color: var(--ink); }
.rc2-lede { font-size: 12.5px; line-height: 1.6; color: var(--ash); margin: 0; }

.rc2-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rc2-chip { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .03em;
  padding: 5px 10px; cursor: pointer; border: 2px solid var(--ink);
  border-radius: 6px; background: var(--bone); color: var(--ink);
  transition: background .14s ease, transform .12s ease; }
.rc2-chip i { font-style: normal; opacity: .55; margin-left: 4px; }
.rc2-chip:hover { transform: translateY(-1px); background: var(--yellow); }
.rc2-chip.on { background: var(--hi); color: #FFF9F0; border-color: var(--ink); }
.rc2-chip.on i { opacity: .8; }

.rc2-scroll { overflow-x: auto; }
.rc2-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.rc2-table th, .rc2-table td { padding: 8px 6px; }
.rc2-m { vertical-align: bottom; text-align: center; cursor: help;
  border-bottom: 3px solid var(--ink); }
.rc2-m b { display: block; font-family: var(--font-comic); font-size: 13px;
  letter-spacing: .03em; color: var(--ink); line-height: 1.1; }
.rc2-m i { display: block; font-family: var(--font-mono); font-size: 8.5px;
  font-style: normal; color: var(--ash); line-height: 1.3; margin-top: 2px; }
.rc2-m em { display: block; font-family: var(--font-mono); font-size: 8px;
  font-style: normal; color: var(--ash-light); letter-spacing: .04em; }
.rc2-m.ours { background: rgba(255,206,10,.22); border-radius: 8px 8px 0 0; }
.rc2-m.ours b { color: var(--hi); }
.rc2-axis-h { text-align: left; border-bottom: 3px solid var(--ink);
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ash); }
.rc2-axis { text-align: left; cursor: help; border-bottom: 1px solid rgba(21,24,32,.12); }
.rc2-axis b { display: block; font-family: var(--font-head); font-weight: 700;
  font-size: 13px; color: var(--ink); }
.rc2-axis i { display: block; font-family: var(--font-mono); font-size: 9px;
  font-style: normal; color: var(--ash); }
.rc2-v { text-align: center; font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-soft); border-bottom: 1px solid rgba(21,24,32,.12); }
.rc2-v.ours { background: rgba(255,206,10,.14); }
.rc2-v.best { font-weight: 700; color: var(--ink); position: relative; }
.rc2-v.best::after { content: ""; position: absolute; left: 12%; right: 12%;
  bottom: 4px; height: 3px; background: var(--hi); border-radius: 2px; }
.rc2-table tr:hover .rc2-v { background: rgba(242,201,76,.16); }
.rc2-table tr:hover .rc2-v.ours { background: rgba(255,206,10,.3); }

.rc2-note { position: absolute; left: clamp(16px,2.4vw,26px);
  right: clamp(16px,2.4vw,26px); bottom: 8px; z-index: 4; pointer-events: none;
  background: var(--ink); color: #FFF9F0; border-radius: 10px; padding: 10px 14px;
  font-size: 12.5px; line-height: 1.5; box-shadow: 5px 5px 0 rgba(21,24,32,.35); }
.rc2-note[hidden] { display: none; }
.rc2-note b { display: block; font-family: var(--font-comic); font-size: 14px;
  letter-spacing: .04em; color: var(--pop); margin-bottom: 3px; }
.rc2-src { font-size: 11px; line-height: 1.6; color: var(--ash); margin: 14px 0 0; }
.rc2-src code { font-family: var(--font-mono); font-size: 10px;
  background: rgba(21,24,32,.06); padding: 1px 5px; border-radius: 4px;
  word-break: break-all; }
.rc2-err { font-family: var(--font-mono); font-size: 12px; color: var(--rust); }

/* ═══ Platform landscape — filterable survey ═══ */
.pt { border: 3px solid var(--ink); border-radius: 14px; background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink); padding: clamp(12px,1.6vw,18px); }
.dark-sec .pt { box-shadow: 8px 8px 0 rgba(0,0,0,.8); border-color: var(--gold); }
.pt-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pt-kicker { font-family: var(--font-comic); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--hi); }
.pt-title { font-family: var(--font-display); font-size: clamp(20px,2.2vw,26px);
  line-height: 1; margin: 0; color: var(--ink); order: -1; }
.pt-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.pt-chip, .pt-clear { font-family: var(--font-comic); font-size: 12px;
  letter-spacing: .04em; padding: 3px 9px; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--bone);
  color: var(--ink); transition: background .14s ease, transform .12s ease; }
.pt-chip:hover, .pt-clear:hover { transform: translateY(-1px); background: var(--pop); }
.pt-chip.on { background: var(--hi); color: #FFF9F0; }
.pt-clear { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  border-style: dashed; }
.pt-verdict { font-size: 12.5px; line-height: 1.45; color: var(--ink-soft);
  margin: 0 0 8px; padding: 5px 10px; border-radius: 8px;
  background: rgba(255,206,10,.2); border-left: 4px solid var(--pop); }
.pt-verdict b { color: var(--hi); }
.pt-scroll { overflow-x: auto; }
.pt-scroll.capped { overflow-y: auto; overscroll-behavior: contain; border-bottom: 3px solid var(--ink); }
.pt-scroll.capped thead th { position: sticky; top: 0; z-index: 2; background: var(--panel); }
.pt-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 12px; }
.pt-table th { font-family: var(--font-mono); font-size: 9px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ash); text-align: left;
  padding: 0 8px 5px 0; border-bottom: 2.5px solid var(--ink); cursor: pointer;
  white-space: nowrap; }
.pt-table th:hover { color: var(--hi); }
.pt-table th.sorted { color: var(--hi); }
.pt-table th.sorted::after { content: " ▲"; font-size: 7px; }
.pt-table th.sorted[data-dir="down"]::after { content: " ▼"; }
.pt-table td { padding: 4px 8px 4px 0; vertical-align: middle; white-space: nowrap;
  border-bottom: 1px solid rgba(21,24,32,.11); }
.pt-name b { display: block; font-family: var(--font-head); font-weight: 700;
  font-size: 13px; color: var(--ink); }
.pt-name .pt-sub { display: none; }
.pt-name i { display: block; font-style: normal; font-family: var(--font-mono);
  font-size: 9.5px; color: var(--ash); line-height: 1.35; }
.pt-name em { display: block; font-style: normal; font-family: var(--font-mono);
  font-size: 9px; color: var(--ash-light); }
.pt-n { font-family: var(--font-mono); white-space: nowrap; }
.pt-n.hi { color: var(--hi); font-weight: 700; }
.pt-y { font-family: var(--font-mono); font-size: 8.5px; text-transform: uppercase;
  padding: 1px 5px; border-radius: 4px; background: var(--green); color: #FFF6E4; }
.pt-open { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; border: 2px solid var(--ink);
  background: var(--green); color: #FFF6E4; }
.pt-closed { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; border: 2px solid rgba(21,24,32,.3);
  color: var(--ash); }
.pt-table tr.ours td { background: rgba(255,206,10,.2); border-bottom: 2.5px solid var(--ink); }
.pt-table tr.ours .pt-name b { color: var(--hi); font-size: 14px; }
.pt-table tbody tr:hover td { background: rgba(242,201,76,.16); }
.pt-src { font-size: 10px; line-height: 1.5; color: var(--ash); margin: 8px 0 0; }
.pt-src code { font-family: var(--font-mono); font-size: 9.5px;
  background: rgba(21,24,32,.06); padding: 1px 5px; border-radius: 4px;
  word-break: break-all; }
.pt-err { font-family: var(--font-mono); font-size: 12px; color: var(--rust); }

/* ═══ Spec grid — the marketing cut of the paper's Table I ═══ */
.sg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .sg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
  .sg-grid { gap: 9px; }
  .sg-tile { padding: 10px 11px 11px; box-shadow: 3px 3px 0 var(--ink); border-width: 2.5px; }
  .sg-tile b { font-size: 27px; }
  .sg-lab { font-size: 11.5px; }
  .sg-sub { font-size: 10.5px; line-height: 1.35; }
}
.sg-tile { border: 3px solid var(--ink); border-radius: 12px; background: var(--panel);
  box-shadow: 5px 5px 0 var(--ink); padding: 14px 15px 15px;
  transition: transform .16s ease, box-shadow .16s ease; }
.sg-tile:hover { transform: translate(-3px,-3px); box-shadow: 8px 8px 0 var(--ink); }
.sg-tile:nth-child(4n+1) { box-shadow: 5px 5px 0 var(--hi); }
.sg-tile:nth-child(4n+2) { box-shadow: 5px 5px 0 var(--pop); }
.sg-tile:nth-child(4n+3) { box-shadow: 5px 5px 0 var(--blue); }
.sg-tile:nth-child(4n+4) { box-shadow: 5px 5px 0 var(--green); }
.sg-tile b { display: block; font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 44px); line-height: 0.95; color: var(--ink);
  letter-spacing: -0.01em; }
.sg-tile b i { font-style: normal; font-family: var(--font-comic);
  font-size: 0.44em; color: var(--hi); margin-left: 3px; letter-spacing: .02em; }
.sg-lab { display: block; font-family: var(--font-comic); font-size: 13px;
  letter-spacing: .05em; color: var(--hi); margin-top: 5px; }
.sg-sub { display: block; font-size: 11.5px; line-height: 1.45; color: var(--ash);
  margin-top: 5px; }
.sg-more { margin-top: 14px; font-family: var(--font-comic); font-size: 13px;
  letter-spacing: .05em; padding: 9px 15px; cursor: pointer;
  border: 3px solid var(--ink); border-radius: 9px; background: var(--pop);
  color: var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transition: transform .14s ease; }
.sg-more:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.sg-full { margin-top: 14px; border: 3px solid var(--ink); border-radius: 12px;
  background: var(--panel); padding: 14px 16px; }
.sg-full[hidden] { display: none; }
.sg-table { width: 100%; border-collapse: collapse; }
.sg-table th { text-align: left; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ash);
  padding: 7px 14px 7px 0; white-space: nowrap; vertical-align: top;
  border-bottom: 1px solid rgba(21,24,32,.11); font-weight: 400; }
.sg-table td { font-size: 13px; color: var(--ink); padding: 7px 0;
  border-bottom: 1px solid rgba(21,24,32,.11); }
.sg-src { font-size: 11px; line-height: 1.6; color: var(--ash); margin: 12px 0 0; }
@media (max-width: 620px) {
  .sg-table th, .sg-table td { display: block; border-bottom: 0; padding: 2px 0; }
  .sg-table tr { display: block; padding: 7px 0;
    border-bottom: 1px solid rgba(21,24,32,.11); }
}

/* the reach bar and the measured envelope, side by side */
.reach-row { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(14px,2vw,26px);
  align-items: start; }
@media (max-width: 900px) { .reach-row { grid-template-columns: 1fr; } }
.reach-env img { width: 100%; display: block; border-radius: 6px; }
.reach-env figcaption { font-size: 11px; line-height: 1.55; color: var(--ash);
  margin-top: 10px; }

/* the operator → robot frame figure */
.frames-fig { margin: 0 0 clamp(24px,3.5vh,40px); border: 3px solid var(--ink);
  border-radius: 14px; overflow: hidden; background: var(--panel);
  box-shadow: 8px 8px 0 var(--ink); }
.dark-sec .frames-fig { box-shadow: 8px 8px 0 rgba(0,0,0,.8); border-color: var(--gold); }
.frames-fig img { width: 100%; display: block; }
.frames-fig figcaption { padding: 12px 16px; font-size: 12.5px; line-height: 1.6;
  color: var(--ash); border-top: 3px solid var(--ink); }
.dark-sec .frames-fig figcaption { border-top-color: var(--gold); color: var(--ash-light); }
.frames-fig code { font-family: var(--font-mono); font-size: 11px;
  background: rgba(21,24,32,.07); padding: 1px 5px; border-radius: 4px; }
.dark-sec .frames-fig code { background: rgba(255,255,255,.1); }

/* A three-row comparison does not need 60 px rows. The autonomy estimator and
   SLAM tables are read at a glance, so they get the tighter rhythm the data
   tables elsewhere use. */
.data-table.compact th, .data-table.compact td { padding: 9px 12px; font-size: 13px; }
.data-table.compact th { font-size: 10px; }

/* ═══ The stack, as a graph you can trace ═══
   NAMED .smap, NOT .sm. `.sm` is also the burst's SIZE modifier
   (<span class="burst sm pin">), so a bare `.sm` card rule painted a cream
   rounded box with a 3 px border and an 8 px shadow behind every small
   starburst on the site — the "weird border" around CLACK!, SYNC! and DING!.
   Third time this class of bug has bitten (see .rc- and .cl-view): a
   single-word container class WILL collide with a utility class. */
.smap { border: 3px solid var(--ink); border-radius: 14px; background: var(--panel);
  box-shadow: 8px 8px 0 var(--ink); padding: clamp(16px,2.4vw,26px); }
.dark-sec .smap { box-shadow: 8px 8px 0 rgba(0,0,0,.8); border-color: var(--gold); }
.sm-head { margin-bottom: 12px; }
.sm-kicker { font-family: var(--font-comic); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--hi); }
.sm-title { font-family: var(--font-display); font-size: clamp(22px,3.2vw,32px);
  line-height: 1; margin: 4px 0 0; color: var(--ink); }
.sm-paths { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sm-chip { font-family: var(--font-comic); font-size: 12px; letter-spacing: .04em;
  padding: 7px 12px; cursor: pointer; border: 2px solid var(--ink);
  border-radius: 999px; background: var(--bone); color: var(--ink);
  transition: background .14s ease, transform .12s ease; }
.sm-chip:hover { transform: translateY(-1px); background: var(--pop); }
.sm-chip.on { background: var(--c, var(--hi)); color: #FFF9F0; }
.sm-chip.sm-clear { font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; border-style: dashed; }
.sm-say { font-size: 12.5px; line-height: 1.6; color: var(--ash); margin: 0 0 12px; }
.sm-say b { color: var(--ink); }
.sm-stage { overflow-x: auto; }
.sm-svg { width: 100%; min-width: 900px; height: auto; display: block; }
.sm-col { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  fill: var(--ash); text-anchor: middle; }
.sm-edge { fill: none; stroke: rgba(21,24,32,.26); stroke-width: 2;
  transition: stroke .2s ease, stroke-width .2s ease, opacity .2s ease; }
.sm-node rect { fill: var(--panel); stroke: var(--ink); stroke-width: 2.5;
  transition: fill .2s ease, opacity .2s ease; }
.sm-lab { font-family: var(--font-head); font-weight: 700; font-size: 14px;
  fill: var(--ink); text-anchor: middle; }
.sm-sub { font-family: var(--font-mono); font-size: 9px; fill: var(--ash);
  text-anchor: middle; }
.sm-node.k-hal rect { fill: #FFF0CC; stroke-width: 3.5; }
.sm-node.k-ctl rect { fill: #FBE9E4; }
.sm-node.k-ros rect { fill: #E7EEF4; }
.sm-node.k-net rect { fill: #EAF3EC; }
.sm-node.k-bot rect { fill: var(--ink); }
.sm-node.k-bot .sm-lab { fill: #FFF9F0; }
.sm-node.k-bot .sm-sub { fill: rgba(255,249,240,.6); }
/* when a path is lit, everything not on it recedes */
.sm-stage.lit .sm-node { opacity: .28; }
.sm-stage.lit .sm-edge { opacity: .16; }
.sm-stage.lit .sm-node.on { opacity: 1; }
.sm-stage.lit .sm-node.on rect { stroke-width: 4; }
.sm-stage.lit .sm-edge.on { opacity: 1; stroke-width: 5; }
.sm-note { font-size: 13px; line-height: 1.6; color: var(--ink-soft);
  margin: 12px 0 0; padding: 11px 14px; border-radius: 9px;
  background: rgba(255,206,10,.16); border-left: 4px solid var(--pop); }
.sm-note[hidden] { display: none; }
.sm-note b { display: block; font-family: var(--font-comic); font-size: 14px;
  letter-spacing: .04em; margin-bottom: 3px; }
.pt { position: relative; }
.pt-name a { text-decoration: none; display: inline-flex; align-items: baseline; gap: 4px; }
.pt-name a:hover b { color: var(--hi); }
.pt-go { font-family: var(--font-mono); font-size: 9px; color: var(--ash); }
.pt-card { position: absolute; z-index: 8; width: 260px; pointer-events: none;
  background: var(--ink); color: #FFF9F0; border-radius: 11px; padding: 13px 15px;
  box-shadow: 6px 6px 0 rgba(21,24,32,.4); }
.pt-card[hidden] { display: none; }
.pt-card b { font-family: var(--font-comic); font-size: 16px; letter-spacing: .04em;
  color: var(--pop); }
.pt-card-y { font-family: var(--font-mono); font-size: 10px; margin-left: 7px;
  color: rgba(255,249,240,.55); }
.pt-card p { font-size: 12px; line-height: 1.45; margin: 5px 0 9px;
  color: rgba(255,249,240,.8); }
.pt-card dl { margin: 0; display: grid; gap: 2px; }
.pt-card dl div { display: flex; justify-content: space-between; gap: 10px;
  font-family: var(--font-mono); font-size: 10.5px;
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 3px; }
.pt-card dt { color: rgba(255,249,240,.5); margin: 0; }
.pt-card dd { margin: 0; text-align: right; }
.pt-card em { display: block; font-style: normal; font-family: var(--font-mono);
  font-size: 9.5px; color: var(--pop); margin-top: 8px; }
.pt-card-link { display: block; font-family: var(--font-mono); font-size: 9.5px;
  color: rgba(255,249,240,.55); margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 6px; }
.callout-fig { margin: 0; }
.callout-fig img { display: block; width: 100%; max-width: 900px; margin: 0 auto;
  border: 3px solid var(--ink); border-radius: 14px; background: var(--panel);
  box-shadow: 8px 8px 0 rgba(21,24,32,.13); }
.callout-fig figcaption { max-width: 900px; margin: 14px auto 0; text-align: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--ash); line-height: 1.6; }
.callout-fig figcaption code { font-size: 10.5px; color: var(--ink); }

/* ── accuracy lab (hardware.html) ───────────────────────────────────────── */
.al-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.al-panel { background: var(--panel); border: 3px solid var(--ink); border-radius: 16px;
  padding: 20px 22px 22px; box-shadow: 6px 6px 0 rgba(21,24,32,.12); }
.al-kick { font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--hi); }
.al-h { font-family: var(--font-comic); font-size: 25px; letter-spacing: .03em;
  margin: 5px 0 6px; color: var(--ink); }
.al-say { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft);
  margin: 0 0 13px; min-height: 42px; }
/* BOTH PANELS' CLIPS START AT THE SAME LINE. The station picker wraps to two
   rows and the path picker does not, so the left clip sat lower than the right
   one — a difference that means nothing and reads as a layout bug. The two
   reserved heights are what makes the pair line up. */
.al-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px;
  align-content: flex-start; min-height: 66px; }
.al-chip { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 20px; border: 2px solid var(--ink);
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background .13s, color .13s; }
.al-chip:hover { background: rgba(21,24,32,.07); }
.al-chip.on { background: var(--ink); color: var(--pop); }
.al-plot { background: var(--bone); border: 2px solid var(--ink); border-radius: 11px;
  padding: 8px; }
.al-svg { display: block; width: 100%; height: auto; }
.al-ring { fill: none; stroke: rgba(21,24,32,.13); stroke-width: 1; }
.al-ring-x { stroke: rgba(21,24,32,.28); }
.al-ax { fill: none; stroke: rgba(21,24,32,.42); stroke-width: 1.2; }
.al-gl { fill: none; stroke: rgba(21,24,32,.12); stroke-width: 1; }
.al-tick { font-family: var(--font-mono); font-size: 9.5px; fill: var(--ash); }
.al-rp { fill: none; stroke-width: 2; stroke-dasharray: 5 4; opacity: .85; }
.al-rmax { fill: none; stroke-width: 2; opacity: .5; }
.al-line { fill: none; stroke-width: 2.2; stroke-linecap: round;
  stroke-linejoin: round; transition: opacity .13s, stroke-width .13s; }
.al-line.dim { opacity: .17; }
.al-line.up { stroke-width: 3.4; }
.al-read { margin-top: 13px; }
.al-stat { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px; padding: 5px 0;
  border-top: 1.5px solid rgba(21,24,32,.14); }
.al-stat b { font-family: var(--font-body); font-weight: 600; font-size: 12.5px;
  min-width: 82px; }
.al-stat span { color: var(--ink); }
.al-stat i { font-style: normal; color: var(--ash); margin-right: 5px; }
.al-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink);
  display: inline-block; }
.al-fine { font-size: 11.5px; line-height: 1.6; color: var(--ash); margin: 11px 0 0; }
.al-fine b { color: var(--ink); }
.al-legend { margin-top: 13px; display: grid; gap: 5px; }
.al-cond { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
  text-align: left; border: 0; border-left: 4px solid var(--c);
  background: rgba(21,24,32,.035); border-radius: 0 8px 8px 0; padding: 7px 11px;
  cursor: pointer; transition: background .13s; }
.al-cond:hover { background: rgba(21,24,32,.09); }
.al-cond b { font-family: var(--font-body); font-weight: 600; font-size: 12.5px;
  color: var(--ink); }
.al-cond span { font-family: var(--font-mono); font-size: 11px; color: var(--c);
  font-weight: 700; }
.al-cond em { grid-column: 1 / -1; font-style: normal; font-size: 11px;
  color: var(--ash); }
.al-src { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.65;
  color: var(--ash); margin: 18px 0 0; max-width: 900px; }
.al-src code { color: var(--ink); font-size: 10px; }
.al-err { font-family: var(--font-mono); font-size: 12px; color: var(--ash); }
@media (max-width: 900px) {
  .al-grid { grid-template-columns: 1fr; }
  .al-panel { padding: 16px 15px 18px; }
  .al-h { font-size: 22px; }
}

/* ── stack map: sim/real split, hover cards, clickable blocks ───────────── */
.sm-stage { position: relative; }
.sm-node { cursor: pointer; }
.sm-node:focus { outline: none; }
.sm-node:focus rect { stroke: var(--hi); stroke-width: 4; }
.sm-node:hover rect { stroke-width: 4; }
.sm-seam { fill: none; stroke: rgba(122,62,143,.55); stroke-width: 2.5;
  stroke-dasharray: 9 7; }
.sm-seamlab { font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: .11em; fill: rgba(122,62,143,.85); }
.sm-seam-l { text-anchor: end; }
.sm-node.k-sim rect { fill: #F0E6F5; stroke-width: 3.5; }
.sm-node.k-simbot rect { fill: #4A2E58; }
.sm-node.k-simbot .sm-lab { fill: #FFF9F0; }
.sm-node.k-simbot .sm-sub { fill: rgba(255,249,240,.65); }
.sm-only { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .1em;
  text-anchor: end; fill: var(--ash); }
.sm-node.k-simbot .sm-only { fill: rgba(255,249,240,.55); }
.sm-node.w-sim .sm-only { fill: #7A3E8F; }
.sm-node.w-real .sm-only { fill: var(--rust); }
.sm-key { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 0;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ash); }
.sm-k { display: inline-flex; align-items: center; gap: 6px; }
.sm-k i, .sm-tip-w i { width: 11px; height: 11px; border-radius: 3px;
  border: 2px solid var(--ink); display: inline-block; flex: none; }
.sm-k.w-both i, .sm-tip-w.w-both i { background: var(--panel); }
.sm-k.w-real i, .sm-tip-w.w-real i { background: #FFF0CC; }
.sm-k.w-sim i, .sm-tip-w.w-sim i { background: #F0E6F5; border-color: #7A3E8F; }
.sm-tip { position: absolute; z-index: 9; width: 278px; pointer-events: none;
  background: var(--ink); color: #FFF9F0; border-radius: 11px; padding: 13px 15px;
  box-shadow: 6px 6px 0 rgba(21,24,32,.35); }
.sm-tip[hidden] { display: none; }
.sm-tip b { font-family: var(--font-comic); font-size: 15px; letter-spacing: .04em;
  color: var(--pop); }
.sm-tip-sub { display: block; font-family: var(--font-mono); font-size: 9.5px;
  color: rgba(255,249,240,.5); margin-top: 2px; }
.sm-tip p { font-size: 12px; line-height: 1.5; margin: 7px 0 9px;
  color: rgba(255,249,240,.85); }
.sm-tip-w { display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 9.5px; color: rgba(255,249,240,.7);
  border-top: 1px solid rgba(255,255,255,.14); padding-top: 8px; }
.sm-tip-r { display: block; font-family: var(--font-mono); font-size: 9px;
  color: rgba(255,249,240,.45); margin-top: 6px; }

/* ── retargeting clips: seven maps, one motion ──────────────────────────── */
.rk { border: 3px solid var(--ink); border-radius: 14px; background: var(--panel);
  box-shadow: 8px 8px 0 var(--ink); padding: clamp(16px,2.4vw,26px); }
.dark-sec .rk { box-shadow: 8px 8px 0 rgba(0,0,0,.8); border-color: var(--gold); }
.rk-kick { font-family: var(--font-comic); font-size: 12px; letter-spacing: .08em;
  color: var(--hi); text-transform: uppercase; }
.rk-title { font-family: var(--font-display); font-size: clamp(22px,3.2vw,32px);
  margin: 4px 0 6px; color: var(--ink); }
.rk-say { font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 14px;
  max-width: 78ch; }
.rk-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
  justify-content: space-between; margin-bottom: 14px; }
.rk-tasks { display: flex; flex-wrap: wrap; gap: 5px; flex: 1 1 60%; }
.rk-chip { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  padding: 5px 9px; border-radius: 18px; border: 2px solid var(--ink);
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background .13s, color .13s; }
.rk-chip:hover { background: rgba(21,24,32,.07); }
.rk-chip.on { background: var(--ink); color: var(--pop); }
.rk-axis { font-family: var(--font-mono); font-size: 10.5px; color: var(--ash);
  display: inline-flex; align-items: center; gap: 7px; }
.rk-sel { font-family: var(--font-mono); font-size: 11px; padding: 5px 8px;
  border: 2px solid var(--ink); border-radius: 8px; background: var(--bone);
  color: var(--ink); }
.rk-grid { display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); }
.rk-tile { margin: 0; border: 2.5px solid var(--ink); border-radius: 11px;
  overflow: hidden; background: var(--bone); display: flex; flex-direction: column; }
.rk-tile.ours { border-color: var(--hi); border-width: 3.5px;
  box-shadow: 4px 4px 0 rgba(228,68,42,.28); }
.rk-vwrap { position: relative; background: #0B0E15; line-height: 0; }
.rk-vwrap video { width: 100%; display: block; aspect-ratio: 8/5;
  object-fit: cover; }
.rk-rank { position: absolute; top: 7px; left: 7px; font-family: var(--font-comic);
  font-size: 13px; width: 23px; height: 23px; display: grid; place-items: center;
  border-radius: 50%; background: var(--pop); color: var(--ink);
  border: 2px solid var(--ink); }
.rk-tile.ours .rk-rank { background: var(--hi); color: #FFF9F0; }
.rk-tile figcaption { padding: 9px 11px 11px; display: grid; gap: 3px; }
.rk-tile figcaption b { font-family: var(--font-body); font-weight: 700;
  font-size: 13px; color: var(--ink); }
.rk-num { font-family: var(--font-mono); font-size: 19px; color: var(--hi);
  line-height: 1; }
.rk-num i { font-style: normal; font-size: 9.5px; color: var(--ash);
  margin-left: 5px; }
.rk-tile figcaption em { font-style: normal; font-size: 10.5px; line-height: 1.5;
  color: var(--ash); }
.rk-src { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.65;
  color: var(--ash); margin: 16px 0 0; max-width: 92ch; }
.rk-src code { color: var(--ink); font-size: 10px; }
.rk-err { font-family: var(--font-mono); font-size: 12px; color: var(--ash); }
@media (max-width: 700px) {
  .rk-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .rk-tile figcaption em { display: none; }
}
/* the envelope ceiling, drawn on the speed slider */
.tl-track { position: relative; padding-bottom: 17px; }
.tl-ceil { position: absolute; top: -3px; transform: translateX(-50%);
  pointer-events: none; display: grid; justify-items: center; }
.tl-ceil[hidden] { display: none; }
.tl-ceil i { display: block; width: 3px; height: 21px; background: var(--hi);
  border-radius: 2px; box-shadow: 0 0 0 1.5px var(--panel); }
.tl-ceil b { font-family: var(--font-mono); font-size: 8.5px; white-space: nowrap;
  color: var(--ash); margin-top: 2px; letter-spacing: .02em; }
.tl-ceil.hit i { background: var(--pop); box-shadow: 0 0 0 1.5px var(--ink);
  animation: ceilPulse .6s ease-in-out infinite alternate; }
.tl-ceil.hit b { color: var(--hi); font-weight: 700; }
@keyframes ceilPulse { from { transform: scaleY(1); } to { transform: scaleY(1.25); } }
@media (prefers-reduced-motion: reduce) { .tl-ceil.hit i { animation: none; } }
/* inline-svg slots: sized before the figure arrives, so nothing jumps */
.callout-svg, .frames-svg, .env-svg { display: block; width: 100%; }
.callout-svg { aspect-ratio: 2360 / 1900; }
.frames-svg  { aspect-ratio: 1180 / 520; }
.env-svg     { aspect-ratio: 760 / 400; }
.callout-svg > svg, .frames-svg > svg, .env-svg > svg { width: 100%; height: auto; }
/* the exploded CAD drawing: a cutout, so it sits on the page's own ground */
/* THE EXPLODED DRAWING KEEPS ITS ASPECT AND FITS THE SCREEN. `width: 100%`
   from the rule above plus a stamped height attribute stretched it; and at
   1054x1427 it is taller than most viewports, so it needs a HEIGHT cap as well
   as a width one. `object-fit: contain` guarantees the ratio whatever the box
   does. */
.callout-fig img { border: 0; background: transparent; box-shadow: none;
  width: auto; max-width: min(100%, 640px); height: auto;
  max-height: 78vh; object-fit: contain; margin: 0 auto; }
/* the experiment replay beside the plot of what it measured */
.al-clip { margin: 0 0 11px; border: 2px solid var(--ink); border-radius: 10px;
  overflow: hidden; background: var(--panel); }
/* the submission renders are 900×720; contain, never crop the robot */
.al-clip video { display: block; width: 100%; height: auto; aspect-ratio: 5/4;
  object-fit: contain; }
.al-clip figcaption { padding: 6px 10px 7px; font-family: var(--font-mono);
  font-size: 10px; color: var(--ash-light, #B9AF98); background: var(--ink); }
/* the scatter is 230 px of drawing; do not let it stretch to the panel */
.al-plot { max-width: 100%; }
.al-panel .al-plot:has(svg[viewBox^="0 0 260"]) { max-width: 320px; margin: 0 auto; }
/* live + interactive: tooltips, toggling legends, the playhead (accuracy-lab.js) */
.al-plotwrap { position: relative; touch-action: manipulation; }
.al-tip { position: absolute; z-index: 3; pointer-events: none; max-width: 240px;
  background: var(--ink); color: var(--bone); border-radius: 8px; padding: 7px 9px;
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.5; box-shadow: 3px 3px 0 rgba(21,24,32,.25); }
.al-tip[hidden] { display: none; }
.al-tip i { font-style: normal; color: var(--ash-light); }
.al-pt { stroke: var(--ink); stroke-width: 1.1; transition: r .2s; }
.al-pt.is-new { stroke-width: 2; }
.al-band { opacity: .13; }
.al-cell { fill: transparent; stroke: rgba(21,24,32,.14); stroke-width: 1; cursor: pointer; transition: fill .15s, stroke .15s; }
.al-cell:hover { fill: rgba(21,24,32,.04); }
.al-cell.is-now { stroke: var(--hi); stroke-width: 1.8; }
.al-cell-t { pointer-events: none; }
.al-line.is-contour { stroke-dasharray: 6 4; }
.al-ph { stroke: var(--hi); stroke-width: 1.6; }
.al-ph.is-hover { stroke: var(--ink); stroke-dasharray: 3 3; opacity: .55; }
.al-follow { border-style: dashed; }
.al-follow.on { border-style: solid; }
.al-lg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.al-lg-b { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 11px;
  border-radius: 20px; border: 2px solid var(--c); background: transparent; color: var(--ink);
  font-family: var(--font-mono); font-size: 10.5px; cursor: pointer; transition: opacity .13s, background .13s; }
.al-lg-b[aria-pressed="false"] { opacity: .4; text-decoration: line-through; }
.al-lg-b em { font-style: normal; color: var(--ash); }
.al-lg-sw { width: 16px; height: 0; border-top: 3px solid var(--c); }
.al-lg-b.is-contour .al-lg-sw { border-top-style: dashed; }
.al-live { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.55; color: var(--ink-soft);
  margin: 9px 0 0; min-height: 2.2em; }
.al-stat.is-off { opacity: .4; }
.al-tbl { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 10.5px; }
.al-tbl th, .al-tbl td { padding: 5px 4px; text-align: right; border-top: 1.5px solid rgba(21,24,32,.14); white-space: nowrap; }
.al-tbl thead th { color: var(--ash); font-weight: 400; border-top: 0; white-space: normal; }
.al-tbl tbody th { text-align: left; font-family: var(--font-body); font-weight: 600; font-size: 12px; }
@media (max-width: 520px) { .al-tbl { font-size: 9.5px; } .al-tbl th, .al-tbl td { padding: 5px 2px; } }

/* ── the retargeting table on a phone ───────────────────────────────────
   Eight columns want 720 px and a phone has 312. Scrolling it sideways is
   what tablescroll.py exists to catch, so below 720 px it TRANSPOSES: each
   method becomes a card, each axis a labelled row inside it. Same numbers,
   read down a column instead of across one. */
@media (max-width: 720px) {
  .rc2-scroll { overflow: visible; }
  /* min-width:720px is what actually forces the scroll; the display change
     alone leaves it in place and the check still measures 720 in 312. */
  .rc2-table { min-width: 0 !important; width: 100% !important; }
  .rc2-table, .rc2-table tbody, .rc2-table tr, .rc2-table td, .rc2-table th {
    display: block; width: auto; }
  .rc2-table thead { display: none; }
  .rc2-table tbody { display: grid; gap: 10px; }
  .rc2-table tr { border: 2.5px solid var(--ink); border-radius: 11px;
    background: var(--panel); padding: 9px 11px 10px; }
  .rc2-table .rc2-axis { border: 0; padding: 0 0 6px;
    border-bottom: 1.5px solid rgba(21,24,32,.16); margin-bottom: 5px; }
  .rc2-table .rc2-axis b { font-size: 14px; }
  .rc2-table .rc2-v { display: flex; justify-content: space-between;
    align-items: baseline; padding: 3px 0; border: 0;
    font-family: var(--font-mono); font-size: 12.5px; text-align: right; }
  /* the method name comes from the column header, carried by JS into
     data-label — a CSS-only transpose has no way to know it */
  .rc2-table .rc2-v::before { content: attr(data-label); text-align: left;
    font-family: var(--font-body); font-size: 12px; color: var(--ash);
    font-weight: 500; }
  .rc2-table .rc2-v.ours { background: rgba(255,206,10,.16);
    border-radius: 6px; padding-inline: 6px; }
  .rc2-table .rc2-v.ours::before { color: var(--ink); font-weight: 700; }
}

/* ── the platform survey on a phone ─────────────────────────────────────
   Still a table, just narrower: Base, Arms and Lift drop out (base + arms
   ride under the name as a sub-line) and Platform · Hand · Neck · Cost ·
   Open fit 358 px with no sideways scroll. Two short lines per platform. */
@media (max-width: 720px) {
  .pt { padding: 10px; box-shadow: 4px 4px 0 var(--ink); border-width: 2.5px; }
  .pt-head { margin-bottom: 6px; }
  .pt-kicker { font-size: 10px; }
  .pt-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -10px 6px; padding: 0 10px 2px; }
  .pt-filters::-webkit-scrollbar { display: none; }
  .pt-chip, .pt-clear { flex: none; font-size: 11.5px; padding: 4px 9px; }
  .pt-verdict { font-size: 11.5px; padding: 4px 8px; }
  .pt-table { min-width: 0; table-layout: fixed; font-size: 11.5px; }
  .pt-table th:nth-child(2), .pt-table td:nth-child(2),
  .pt-table th:nth-child(3), .pt-table td:nth-child(3),
  .pt-table th:nth-child(6), .pt-table td:nth-child(6) { display: none; }
  .pt-table th { font-size: 8.5px; letter-spacing: .05em; padding-right: 4px; }
  .pt-table th:nth-child(1) { width: 46%; }
  .pt-table th:nth-child(4), .pt-table th:nth-child(5) { width: 13%; }
  .pt-table th:nth-child(7) { width: 14%; }
  .pt-table td { padding: 5px 4px 5px 0; }
  .pt-name { white-space: normal; }
  .pt-name b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pt-name .pt-sub { display: block; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pt-name a { display: flex; min-width: 0; }
  .pt-go { display: none; }
  .pt-open, .pt-closed { font-size: 8px; padding: 1px 4px; }
  .pt-src { font-size: 9.5px; }
}
/* the webcam widget's host reserves its space before the module fills it —
   otherwise the page jumps, and an empty box is also a box the
   IntersectionObserver can see */
[data-retarget-cam], #retargetCam { display: block; min-height: 320px; }

/* ── operator → robot frames: the real photo, three tight steps ─────────
   This replaced a drawn diagram whose three cards carried nine lines of
   small captions. The photograph is the paper's own annotated frame figure —
   it shows the six triads on the actual robot and operator, which no stick
   figure can — and the steps beside it are one line each. */
.fr2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(14px,2vw,26px);
  align-items: start; padding: clamp(14px,2vw,22px); }
@media (max-width: 820px) { .fr2 { grid-template-columns: 1fr; } }
.fr2-photo img { display: block; width: 100%; height: auto; border-radius: 10px;
  border: 2.5px solid var(--ink); }
.fr2-photo figcaption { font-family: var(--font-mono); font-size: 10.5px;
  line-height: 1.55; color: var(--ash); margin-top: 8px; }
.fr2-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px;
  counter-reset: fr; }
.fr2-steps li { counter-increment: fr; position: relative;
  padding: 9px 12px 10px 38px; border: 2.5px solid var(--ink);
  border-radius: 10px; background: var(--bone); font-size: 13px; line-height: 1.45; }
.fr2-steps li::before { content: counter(fr); position: absolute; left: 10px;
  top: 9px; width: 19px; height: 19px; border-radius: 50%; background: var(--pop);
  border: 2px solid var(--ink); display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; }
.fr2-steps b { display: inline; font-family: var(--font-body); font-weight: 700;
  color: var(--ink); }
.fr2-steps i { display: block; font-style: normal; font-size: 11px;
  color: var(--ash); margin-top: 3px; }
.fr2-steps code { display: block; font-size: 11px; margin-top: 4px;
  color: var(--rust); }
.fr2-bite { margin: 0 clamp(14px,2vw,22px) clamp(14px,2vw,20px);
  padding: 10px 13px; border-radius: 9px; background: #FFF0CC;
  border: 2.5px solid var(--ink); font-size: 12.5px; line-height: 1.5; }
.fr2-bite b { color: var(--hi); font-family: var(--font-comic); font-size: 14px;
  letter-spacing: .03em; }

/* ── the live SLAM lab ──────────────────────────────────────────────────── */
.sl { border: 3px solid var(--ink); border-radius: 14px; background: var(--panel);
  box-shadow: 8px 8px 0 var(--ink); padding: clamp(16px,2.4vw,26px); }
.dark-sec .sl { box-shadow: 8px 8px 0 rgba(0,0,0,.8); border-color: var(--gold); }
.sl-kick { font-family: var(--font-comic); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--hi); }
.sl-title { font-family: var(--font-display); font-size: clamp(22px,3.2vw,32px);
  margin: 4px 0 6px; color: var(--ink); }
.sl-say { font-size: 13px; line-height: 1.6; color: var(--ink-soft);
  margin: 0 0 14px; max-width: 76ch; }
.sl-say em { font-style: italic; color: var(--ink); }
.sl-stage { position: relative; border: 2.5px solid var(--ink); border-radius: 11px;
  overflow: hidden; background: #0B0E15; }
.sl-canvas { display: block; width: 100%; height: auto; }
.sl-hud { position: absolute; top: 9px; right: 10px; display: flex; gap: 12px;
  font-family: var(--font-mono); font-size: 10.5px; color: rgba(255,249,240,.6);
  background: rgba(11,14,21,.72); padding: 5px 10px; border-radius: 7px; }
.sl-hud b { color: var(--pop); font-size: 12px; }
.sl-keys { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 5px;
  align-items: center; }
.sl-k { width: 24px; height: 24px; display: grid; place-items: center;
  border: 2px solid rgba(255,249,240,.4); border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px; color: rgba(255,249,240,.6); }
.sl-k.on { background: var(--pop); color: var(--ink); border-color: var(--pop); }
.sl-keys i { font-style: normal; font-family: var(--font-mono); font-size: 10px;
  color: rgba(255,249,240,.45); margin-left: 6px; }
.sl-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 12px; }
.sl-btn { font-family: var(--font-comic); font-size: 12px; letter-spacing: .04em;
  padding: 7px 14px; border-radius: 20px; border: 2.5px solid var(--ink);
  background: var(--pop); color: var(--ink); cursor: pointer; }
.sl-btn:hover { transform: translateY(-1px); }
.sl-tog { font-family: var(--font-mono); font-size: 11px; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; }
.sl-note { font-size: 11.5px; color: var(--ash); flex: 1 1 260px; }
@media (max-width: 700px) { .sl-keys { display: none; } }

/* ── a stage's "open the studio" pair: screenshot + button ─────────────── */
.stg-open { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(14px,2vw,26px);
  align-items: center; margin-top: clamp(18px,2.6vh,28px);
  border: 3px solid var(--ink); border-radius: 14px; background: var(--panel);
  box-shadow: 8px 8px 0 var(--ink); padding: clamp(14px,2vw,20px); }
.dark-sec .stg-open { box-shadow: 8px 8px 0 rgba(0,0,0,.8); border-color: var(--gold);
  background: rgba(255,249,240,.05); }
@media (max-width: 760px) { .stg-open { grid-template-columns: 1fr; } }
.stg-open img { display: block; width: 100%; height: auto; border-radius: 9px;
  border: 2.5px solid var(--ink); }
.stg-open h4 { font-family: var(--font-comic); font-size: clamp(19px,2.4vw,25px);
  letter-spacing: .03em; margin: 0 0 7px; color: var(--ink); }
.dark-sec .stg-open h4 { color: var(--bone); }
.stg-open p { font-size: 13px; line-height: 1.6; color: var(--ink-soft);
  margin: 0 0 13px; }
.dark-sec .stg-open p { color: var(--ash-light, #B9AF98); }
.stg-open .btn { margin: 0; }
/* the motion-model lab sits centred in its column like every other widget */
.tl-wrap { max-width: 1180px; margin-left: auto; margin-right: auto; }
/* THE FRAMES PHOTOGRAPH. The paper's annotated panel is 1123 px and there is
   no larger original in the repo, so at 650 CSS px it was 0.86 of what a 2x
   screen wants and duly looked soft. Resampled 1.45x with Lanczos and lightly
   unsharped before shipping: that adds no detail the camera did not capture,
   but it stops the browser doing a worse job of the same upscale, and the
   baked-in vector overlays sharpen genuinely because they were clean edges
   before JPEG got to them. 1628 px is 1.25x what a 2x display asks for. */
.fr2-key { display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 9px; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ash); }
.fr2-key b { font-family: var(--font-body); font-weight: 700; font-size: 12px;
  color: var(--ink); margin-left: 6px; }
.fr2-ax { font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  width: 17px; height: 17px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 5px; color: #FFF9F0; }
.fr2-ax.x { background: #E4442A; } .fr2-ax.y { background: #2E7D4F; }
.fr2-ax.z { background: #23577E; }

/* ── the boot readout: a loading state that is worth watching ────────────
   Borrowed from the docs hub, which borrowed it from every machine that has
   ever had to tell you it was thinking. A spinner says "wait"; a power-on
   self-test says what is being loaded and roughly how much of it there is,
   which for a 1.87 MB rig is the more honest answer. */
.ph-label.boot-label {
  font-family: var(--font-mono); font-size: 11px; line-height: 1.85;
  letter-spacing: 0.02em; white-space: pre; text-align: left;
  color: #C9C2B0; background: rgba(11,14,21,0.9);
  border: 2px solid rgba(217,161,63,0.55); border-radius: 9px;
  padding: 12px 15px; text-transform: none;
}
.ph-label.boot-label b { color: var(--pop); font-weight: 400; }
.ph-label.boot-label i { font-style: normal; color: var(--gold); }
.ph-label.boot-label u { text-decoration: none; color: var(--hi); }
.ph-label.boot-label .cur { animation: bootBlink 1.05s steps(1) infinite;
  color: var(--pop); }
@keyframes bootBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .boot-label .cur { animation: none; } }

/* ═══ The AI harness surface (harness.html) ══════════════════════════════════
   A browser for 25 commands. The cards are built from assets/data/harness.json,
   which is generated from the repo's own command registry — see
   assets/harness-surface.js for why the list is not typed here. */
.ahx-bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px; }
.ahx-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.ahx-filters button {
  font-family: var(--font-comic); font-size: 14px; letter-spacing: 0.05em;
  padding: 8px 14px 7px; border-radius: 9px; cursor: pointer; font-weight: 400;
  background: var(--panel); color: var(--ink); border: var(--line-w) solid var(--ink);
  box-shadow: 3px 3px 0 rgba(21,24,32,0.9);
  transition: transform 0.18s var(--ease-out), background 0.2s ease, box-shadow 0.18s var(--ease-out);
}
.ahx-filters button:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(21,24,32,0.9); }
.ahx-filters button.on { background: var(--orange); color: #FFF9F0; }
.ahx-n { font-family: var(--font-mono); font-size: 10.5px; opacity: 0.7; }
.ahx-search { flex: 1 1 200px; min-width: 180px; display: block; }
.ahx-search input {
  width: 100%; font: inherit; font-size: 14px; padding: 9px 13px;
  background: var(--panel); color: var(--ink);
  border: var(--line-w) solid var(--ink); border-radius: 9px;
  box-shadow: 3px 3px 0 rgba(21,24,32,0.9);
}
.ahx-search input:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
.ahx-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ahx-blurb { font-size: 14px; color: var(--ink-soft); margin: 0 0 18px; min-height: 1.5em; }

.ahx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px; }
@media (max-width: 560px) { .ahx-grid { grid-template-columns: 1fr; } }
.ahx-card {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--panel); color: var(--ink);
  border: var(--line-w) solid var(--ink); border-radius: 12px; padding: 16px 17px 13px;
  box-shadow: 5px 5px 0 rgba(21,24,32,0.85);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.ahx-card:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 rgba(21,24,32,0.9); }
.ahx-card header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ahx-card h3 { font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  margin: 0; letter-spacing: -0.01em; flex: 1 1 auto; }
.ahx-slash { color: var(--orange); }
.ahx-args { font-weight: 400; font-size: 12.5px; color: var(--ash); }
.ahx-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.ahx-card code { font-size: 0.87em; }
.ahx-note { border-left: 3px solid var(--gold); padding-left: 10px;
  font-size: 13px !important; color: var(--ash) !important; }
.ahx-card footer { margin-top: auto; padding-top: 8px; font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.04em; color: var(--ash); }
.ahx-reads { text-transform: uppercase; opacity: 0.65; }

.ahx-badge { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 7px 2px; border-radius: 5px;
  border: 1.5px solid var(--ink); white-space: nowrap; flex: 0 0 auto; }
.ahx-badge.read  { background: rgba(35,87,126,0.13); color: var(--blue); }
.ahx-badge.probe { background: rgba(46,125,79,0.14); color: var(--green); }
.ahx-badge.write { background: rgba(217,161,63,0.22); color: var(--gold-deep); }
.ahx-badge.act   { background: var(--orange); color: #FFF9F0; }
.ahx-badge.st    { background: var(--yellow); color: var(--ink); }

.ahx-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin-top: 22px; }
.ahx-legend > div { display: flex; gap: 10px; align-items: flex-start; }
.ahx-legend p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.ahx-none, .ahx-err { font-size: 14px; color: var(--ash); margin: 18px 0 0; }
.ahx-stamp { font-family: var(--font-mono); font-size: 10.5px; color: var(--ash);
  letter-spacing: 0.04em; margin-top: 16px; }

/* the gate table — two columns, and the second is the point */
.ahx-gates td:first-child { font-family: var(--font-mono); font-size: 12.5px; }

/* ═══ Store dock — account + cart, a small pill of its own at the top right ═══
   Separate from the nav on purpose: the bar sells the site, this holds the
   shopper's things. On phones it tucks in beside the burger, inside the bar's
   footprint, so the top edge stays one row. assets/store-nav.js paints it. */
.store-dock { position: fixed; top: var(--dock-top, 14px); right: 14px; z-index: 101; display: flex; align-items: center; gap: 6px; padding: 4px 8px; box-sizing: border-box;
  background: var(--panel); border: var(--line-w) solid var(--ink); border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(21,24,32,0.9); transition: top 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out); }
/* --dock-top is set by assets/store-nav.js: the dock sits 10 px beside the bar, centred on its height */
.store-dock.scrolled { top: calc(var(--dock-top, 14px) - 4px); box-shadow: 4px 4px 0 rgba(21,24,32,0.9); }
.store-dock-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center;
  color: var(--ink); text-decoration: none; background: transparent; border: 0; cursor: pointer; padding: 0; transition: background 0.15s ease; }
.store-dock-btn:hover { background: rgba(21,24,32,0.08); }
.store-dock-btn svg { width: 19px; height: 19px; display: block; }
.store-dock-btn.is-in::after { content: ''; position: absolute; right: 5px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); border: 1.5px solid var(--panel); }
.store-dock-n { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--pop); color: var(--ink);
  border: 1.5px solid var(--ink); font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; line-height: 14px; text-align: center; }
.store-dock-n[hidden] { display: none; }
@media (max-width: 1260px) {
  .store-dock { top: 24px; right: 70px !important; left: auto !important; height: auto !important; padding: 0; gap: 2px; background: transparent; border: 0; box-shadow: none; }
  .store-dock.scrolled { top: 20px; box-shadow: none; }
}

/* ─── Speed tag on the sped-up home clips (top-left of a results-grid cell) ─── */
.speed-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--ink); color: var(--bone);
  border-radius: 3px; padding: 3px 7px;
  font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: 0.08em;
}
.rg-cell .speed-tag { z-index: 2; }

/* ─── Shop, home, street — justified photo rows (index.html #home) ──────────
   Every picture keeps its own aspect ratio (no cropped heads): a cell's flex
   grow AND basis are both proportional to its --ar, so every cell in a row
   comes out the same height, and the row fills the page width exactly. Each
   chapter opens with a title tile in the row. As a chapter scrolls in, its
   tiles wipe open one after another and the footage settles from a slight
   zoom. */
.rg-book { --rg-gap: 8px; --rh: 160px; display: grid; gap: clamp(22px, 3.4vh, 36px); margin-top: 6px; }
.rg-chap { display: grid; gap: var(--rg-gap); }
.rg-line { display: flex; gap: var(--rg-gap); align-items: flex-start; }
.rg-cell { position: relative; margin: 0; min-width: 0; overflow: hidden; border-radius: 8px; background: var(--ink);
  flex: var(--ar) 1 calc(var(--ar) * var(--rh)); aspect-ratio: var(--ar); }
.rg-cell::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--ink); border-radius: inherit; z-index: 3; pointer-events: none; }
.rg-cell > img, .rg-cell > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.rg-cell:hover > img, .rg-cell:hover > video { transform: scale(1.04); }
/* chapter title tile */
.rg-lead { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: clamp(12px, 1.4vw, 20px);
  background: var(--yellow); color: var(--ink); contain: size; }   /* its size comes from the row, never its text */
.rg-lead[data-chap-tone="red"] { background: var(--hi); color: #FFF9F0; }
.rg-lead[data-chap-tone="blue"] { background: var(--blue); color: #FFF9F0; }
.rg-no { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.rg-lead h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 3.9vw, 60px); line-height: .92; letter-spacing: .01em; }
/* captions: a small pill inset bottom-left; speed in mono top-left */
.rg-tag { position: absolute; left: 8px; bottom: 8px; z-index: 2; margin: 0; max-width: calc(100% - 16px);
  padding: 4px 9px; border-radius: 999px; border: 1.5px solid var(--ink);
  font-family: var(--font-sans); font-weight: 600; font-size: 12px; line-height: 1.25; color: var(--ink); background: var(--panel);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .25s ease; }
.rg-cell:hover .rg-tag { transform: translateY(-2px); }
.rg-cell[data-tone="red"] .rg-tag    { background: var(--hi); color: #FFF9F0; }
.rg-cell[data-tone="yellow"] .rg-tag { background: var(--yellow); }
.rg-cell[data-tone="blue"] .rg-tag   { background: var(--blue); color: #FFF9F0; }
.rg-cell[data-tone="green"] .rg-tag  { background: var(--green); color: #FFF9F0; }
.rg-cell[data-tone="paper"] .rg-tag  { background: var(--ink); color: var(--panel); }
.rg-cell .speed-tag { top: 8px; left: 8px; z-index: 2; border-radius: 999px; padding: 3px 8px; }
/* the reveal: each tile wipes open in turn, the footage settles from 1.12x */
html.js .rg-chap .rg-cell { clip-path: inset(0 0 100% 0 round 8px); transition: clip-path .9s cubic-bezier(.75,0,.2,1) calc(var(--i, 0) * 75ms); }
html.js .rg-chap .rg-cell > img, html.js .rg-chap .rg-cell > video { transform: scale(1.12); }
html.js .rg-chap .rg-lead > * { opacity: 0; transform: translateY(14px); transition: opacity .6s ease .35s, transform .6s cubic-bezier(.2,.8,.2,1) .35s; }
html.js .rg-chap.in .rg-cell { clip-path: inset(0 0 0 0 round 8px); }
html.js .rg-chap.in .rg-cell > img, html.js .rg-chap.in .rg-cell > video { transform: none; transition-delay: calc(var(--i, 0) * 75ms); }
html.js .rg-chap.in .rg-cell:hover > img, html.js .rg-chap.in .rg-cell:hover > video { transform: scale(1.04); transition-delay: 0s; }
html.js .rg-chap.in .rg-lead > * { opacity: 1; transform: none; }
html.js .rg-chap.in .rg-lead > :nth-child(2) { transition-delay: .45s; }
/* the chapter itself must not slide (fade-up), its tiles do the moving */
html.js .rg-chap.fade-up { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .rg-chap .rg-cell { clip-path: none; transition: none; }
  html.js .rg-chap .rg-cell > img, html.js .rg-chap .rg-cell > video { transform: none; transition: none; }
  html.js .rg-chap .rg-lead > * { opacity: 1; transform: none; transition: none; }
}
/* phones: two-column masonry. Justified rows wrap badly at 358 px (a lone
   tile grows to the full width), so each chapter becomes two columns of
   full-aspect tiles under a slim title strip. The rows dissolve
   (display: contents) into a 1 px-row grid, and mabel.js drops each tile
   into whichever column is shorter, so the two columns end level. */
@media (max-width: 760px) {
  .rg-book { --rg-gap: 6px; gap: 18px; }
  .rg-chap { grid-template-columns: 1fr 1fr; grid-auto-rows: 1px; gap: 0 var(--rg-gap); }
  .rg-line { display: contents; }
  .rg-cell { align-self: start; }
  .rg-lead { grid-column: 1 / -1; aspect-ratio: auto; contain: none; display: flex; flex-direction: row-reverse;
    justify-content: space-between; align-items: baseline; padding: 10px 12px 9px; }
  .rg-lead h3 { font-size: 30px; }
  .rg-tag { font-size: 11px; padding: 3px 8px; left: 6px; bottom: 6px; max-width: calc(100% - 12px); white-space: normal; border-radius: 10px; }
}


/* Portrait pilot clips (PICO, a second pilot): a 3:4 frame, centred, so a phone shows them full width
   instead of a sliver letterboxed inside 16:9. */
.media-frame.r-34 { aspect-ratio: 3 / 4; }
.demo-media.portrait { max-width: 440px; margin: 0 auto; }
.demo-media.portrait video { max-height: none; }

/* ─── Fly it today — the numbered ways in (index.html #play) ─── */
.try-step { display: flex; align-items: flex-start; gap: clamp(12px, 2vw, 20px); margin: 0 0 clamp(16px, 2.6vh, 24px); max-width: 760px; }
.try-num { flex: 0 0 auto; font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 56px); line-height: .9;
  color: var(--hi); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.try-step h3 { margin: 2px 0 6px; font-family: var(--font-head); font-weight: 800; font-size: clamp(20px, 2.2vw, 28px); letter-spacing: -0.02em; color: var(--ink); }
.try-step p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; }

/* ─── Open-hardware strip under the X-ray (index.html #anatomy) ─── */
.oh-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: clamp(26px, 4vh, 40px); }
.oh-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; border: 3px solid var(--ink); border-radius: 12px;
  background: var(--panel); box-shadow: 5px 5px 0 var(--ink); color: var(--ink); text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease; }
.oh-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.oh-card b { font-family: var(--font-head); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.oh-card span { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); flex: 1; }
.oh-card i { font-style: normal; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--hi); }
@media (max-width: 900px) { .oh-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .oh-strip { grid-template-columns: 1fr; } }
/* four pilot tabs don't fit a phone's width — a 2×2 grid instead of a hidden sideways scroll */
@media (max-width: 560px) {
  #demo .tab-bar { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  #demo .tab-btn { text-align: center; padding-left: 4px; padding-right: 4px; }
}

/* ─── Tab reels — one sliding row of annotated app screens per app (teleop.html, assets/tabreel.js) ───
   The next card always peeks in from the right so the row reads as "there's more"; the
   chips above name every tab and jump to it. Each card is a real app screenshot with
   numbered pins (scripts/build_app_shots.py). */
.tabreel { position: relative; }
.trl-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.trl-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.trl-chip { font-family: var(--font-comic); font-size: 13px; letter-spacing: .04em; padding: 6px 12px; min-height: 36px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--bone); color: var(--ink); cursor: pointer;
  transition: background .14s ease, transform .12s ease; }
.trl-chip:hover { transform: translateY(-1px); }
.trl-chip.on { background: var(--hi); color: #FFF9F0; }
.trl-arrow { flex: 0 0 auto; width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 8px; background: var(--bone);
  color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease; }
.trl-arrow:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.trl-arrow:disabled { opacity: .35; cursor: default; }
.dark-sec .trl-chip, .dark-sec .trl-arrow { border-color: var(--gold); }
.dark-sec .trl-chip { background: transparent; color: var(--bone); }
.dark-sec .trl-chip.on { background: var(--pop); color: var(--ink); border-color: var(--pop); }
.dark-sec .trl-arrow { background: transparent; color: var(--bone); box-shadow: 3px 3px 0 rgba(0,0,0,.7); }
.trl-track { display: flex; gap: clamp(14px, 2vw, 22px); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 2px 14px; outline: none; }
.trl-track::-webkit-scrollbar { display: none; }
.trl-track:focus-visible { outline: 3px solid var(--hi); outline-offset: 4px; }
.trl-card { flex: 0 0 min(86%, 980px); scroll-snap-align: start; margin: 0; display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(14px, 2vw, 26px); align-items: center;
  border: 3px solid var(--ink); border-radius: 14px; background: var(--panel); box-shadow: 6px 6px 0 var(--ink);
  padding: clamp(14px, 2vw, 22px); opacity: .55; transition: opacity .3s ease; }
.trl-card.on { opacity: 1; }
.dark-sec .trl-card { border-color: var(--gold); box-shadow: 6px 6px 0 rgba(0,0,0,.75); }
.trl-card figcaption { min-width: 0; color: var(--ink); }
.trl-card .trl-ix { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--rust); }
.trl-card h4 { margin: 4px 0 6px; font-family: var(--font-head); font-weight: 800; font-size: clamp(22px, 2.3vw, 30px); letter-spacing: -0.02em; line-height: 1.05; }
.trl-card .trl-one { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.trl-card ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.trl-card li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.trl-card li b { font-weight: 700; }
.trl-card li::before { counter-increment: trl; content: counter(trl); width: 20px; height: 20px; border-radius: 50%;
  background: var(--pop); border: 2px solid var(--ink); font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; box-sizing: border-box; margin-top: 1px; }
.trl-card ol { counter-reset: trl; }
@media (max-width: 760px) {
  .trl-card { flex-basis: 88%; grid-template-columns: 1fr; align-items: start; }
  .trl-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .trl-chips::-webkit-scrollbar { display: none; }
  .trl-chip { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .trl-card { transition: none; } }

/* ─── Annotated screenshots inside the tab reels (teleop.html, scripts/build_app_shots.py) ───
   A real app screenshot with numbered pins placed on the controls; the list beside it
   carries the same numbers. Hovering or tapping either one lights up its partner. */
.trl-track:has(.trl-card.shot) { align-items: flex-start; }
/* wide screens (studio, Vision Pro): the shot takes the full card, the legend sits below it */
.trl-card.shot { grid-template-columns: minmax(0, 1fr); align-items: start; }
.trl-card.shot:not(.side) figcaption { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 6px clamp(16px, 2.4vw, 32px); }
.trl-card.shot:not(.side) figcaption ol { grid-column: 2; grid-row: 1 / span 3; grid-template-columns: 1fr 1fr; gap: 8px 22px; align-content: start; }
.trl-card.shot:not(.side) figcaption .trl-one { margin-bottom: 0; }
.trl-card.shot.side { grid-template-columns: minmax(0, calc(64vh * var(--ar, .5))) minmax(240px, 1fr); align-items: center; }
.trl-card.shot:not(.side) .shot-frame { max-width: calc(66vh * var(--ar, 1.6)); }
.shot-frame { position: relative; margin: 0 auto; width: 100%; border-radius: 12px; overflow: visible; }
.shot-frame img { display: block; width: 100%; height: auto; border-radius: inherit;
  border: 2px solid var(--ink); background: #0d0f14; }
.dark-sec .shot-frame img { border-color: rgba(255,255,255,.18); }
/* phone: a dark bezel; tall shots never grow taller than the viewport */
.shot-frame.phone img { border: 6px solid #111318; border-radius: 30px; box-shadow: 0 0 0 2px var(--ink); }
.shot-frame.phone.land img { border-radius: 26px; }
/* browser: a slim chrome strip above the page */
.shot-frame.browser { border: 2px solid var(--ink); border-radius: 12px; background: #1b1e26; padding-top: 22px; }
.shot-frame.browser::before { content: ''; position: absolute; top: 8px; left: 10px; width: 7px; height: 7px; border-radius: 50%;
  background: #ff5f57; box-shadow: 12px 0 0 #febc2e, 24px 0 0 #28c840; }
.shot-frame.browser img { border: 0; border-radius: 0 0 10px 10px; }
.shot-frame.browser .shot-pins { top: 22px; }
.shot-pins { position: absolute; inset: 0; pointer-events: none; }
.shot-frame.phone .shot-pins { inset: 6px; }
.shot-pin { position: absolute; transform: translate(-50%, -50%) scale(0); pointer-events: auto;
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink); background: var(--pop); color: var(--ink);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255,255,255,.85), 2px 3px 0 3px rgba(0,0,0,.35);
  transition: transform .35s cubic-bezier(.3,1.6,.5,1), background .15s ease; }
.trl-card.on .shot-pin, .trl-card.no-js .shot-pin { transform: translate(-50%, -50%) scale(1); }
.trl-card.on .shot-pin:nth-child(2) { transition-delay: .06s; } .trl-card.on .shot-pin:nth-child(3) { transition-delay: .12s; }
.trl-card.on .shot-pin:nth-child(4) { transition-delay: .18s; } .trl-card.on .shot-pin:nth-child(5) { transition-delay: .24s; }
.trl-card.on .shot-pin:nth-child(6) { transition-delay: .30s; }
.shot-pin::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--pop); opacity: 0; }
.shot-pin.lit { background: var(--hi); color: #FFF9F0; transform: translate(-50%, -50%) scale(1.18) !important; transition-delay: 0s !important; z-index: 2; }
.shot-pin.lit::after { animation: pin-ring 1.1s ease-out infinite; }
@keyframes pin-ring { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(1.5); } }
.trl-card.shot ol li { cursor: default; border-radius: 8px; padding: 3px 4px; margin: -3px -4px; transition: background .15s ease; }
.trl-card.shot ol li.lit { background: rgba(242, 201, 76, .32); }
.trl-card.shot ol li.lit::before { background: var(--hi); color: #FFF9F0; }
.trl-card.shot li::before { width: 22px; height: 22px; font-size: 11px; }
.trl-card.shot li { grid-template-columns: 24px 1fr; }
@media (max-width: 760px) {
  .trl-card.shot, .trl-card.shot.side { grid-template-columns: 1fr; }
  .trl-card.shot:not(.side) figcaption { grid-template-columns: 1fr; }
  .trl-card.shot:not(.side) figcaption ol { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; }
  .trl-card.shot .shot-frame { max-width: min(100%, calc(60vh * var(--ar, .46))); }
  .shot-pin { width: 20px; height: 20px; font-size: 10px; border-width: 1.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .shot-pin { transition: none; } .shot-pin.lit::after { animation: none; }
}
.shot-frame.glass img { border-radius: 18px; }
/* a portrait phone beside its legend needs less than a full-width card */
.trl-card.shot.side:has(.shot-frame.phone) { flex-basis: min(86%, 760px); }

/* the hardware reel above the X-ray viewer (index.html #anatomy): the render's own
   white ground IS the frame, so no border, no caption bar */
.xr-reel { margin: clamp(18px, 2.6vh, 30px) 0 clamp(26px, 3.4vh, 40px); }
.xr-reel video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 0; border-radius: 14px; background: transparent; }
.xr-reel figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--ash); }

/* Robot comparison: clips load only when a visitor opens a preview. */
.pt-hint { margin: 0 0 10px; color: var(--ash); font-size: 12px; }
.pt-preview-trigger { display: inline-flex; align-items: center; gap: 7px;
  max-width: 100%; padding: 4px 0; border: 0; border-radius: 3px;
  background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.pt-preview-trigger:hover b, .pt-previewing .pt-preview-trigger b { color: var(--hi); }
.pt-preview-trigger:focus-visible { outline: 2px solid var(--hi); outline-offset: 3px; }
.pt-play { flex: none; font-size: 9px; color: var(--hi); }
.pt-preview-card { position: fixed; z-index: 1200; width: 380px;
  max-width: calc(100vw - 24px); max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
  pointer-events: auto; border: 2px solid var(--gold); padding: 12px; }
.pt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px; }
.pt-card-head > div { min-width: 0; }
.pt-card-close { flex: none; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--gold); border-radius: 6px; background: var(--ink);
  color: var(--bone); font-size: 24px; line-height: 1; cursor: pointer; }
.pt-card-close:hover, .pt-card-close:focus-visible { background: var(--ink-soft); }
.pt-preview-video { display: block; width: 100%; aspect-ratio: 16 / 9;
  object-fit: contain; background: var(--ink); border-radius: 5px; }
.pt-video-credit { display: block; margin: 7px 0 10px; font-family: var(--font-mono);
  color: var(--gold); font-size: 10px; line-height: 1.5; text-decoration: underline; }
.pt-preview-card .pt-card-link { color: var(--gold); }
.pt-preview-card dd { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .pt-preview-trigger { display: flex; width: 100%; min-height: 44px; }
  .pt-preview-trigger b { min-width: 0; }
  .pt-card-close { width: 44px; height: 44px; }
}

/* a clip that is still fetching: a small ring over its poster (assets/mabel.js start/begin) */
.vid-spin { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; z-index: 4;
  border-radius: 50%; border: 3px solid rgba(253,246,226,.45); border-top-color: var(--panel);
  box-shadow: 0 0 0 1px rgba(21,24,32,.25); pointer-events: none; animation: vid-spin .8s linear infinite; }
@keyframes vid-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vid-spin { animation-duration: 2.4s; } }

/* Accuracy panels share their row tracks, so clips and plots align at every desktop width. */
@supports (grid-template-rows:subgrid) {
 @media(min-width:881px) {
  .al-grid { grid-template-rows:repeat(9,auto);column-gap:22px;row-gap:0; }
  .al-panel { display:grid;grid-row:span 9;grid-template-rows:subgrid;row-gap:0;min-width:0; }
  .al-panel .al-clip { align-self:start; }
 }
}
/* Paper-aligned formulations: keep notation readable at every viewport width. */
.paper-equations .eq { white-space:normal; }
.paper-equations .eq-main { display:block;white-space:normal;overflow-wrap:anywhere;font-size:clamp(14px,1.35vw,18px);line-height:1.8;margin:10px 0; }
.paper-equations .eq-line { white-space:normal;overflow-wrap:anywhere;font-size:clamp(14px,1.2vw,17px); }
.paper-equations .eq-gloss { margin-top:14px; }
.paper-equation-source { display:inline-block;margin-top:12px;font:13px var(--font-head); }
.paper-math-details { margin-top:16px;border-top:1px solid var(--ash-light);padding-top:12px; }
.paper-math-details summary { cursor:pointer;font:20px var(--font-comic); }
.paper-math-details p { font-size:13px;line-height:1.6;color:var(--ash-light);padding:0 18px 12px; }
.paper-lab-note { font-size:13px;line-height:1.6;color:var(--ash); }
/* Sony demonstrations retain the camera frame and the site's comic panels. */
.dg-collection { margin-top:32px; }
.dg-collection > h3 { font-family:var(--font-comic);font-size:30px; }
.dg-collection > p { max-width:800px;margin:10px 0 18px; }
.dg-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:22px; }
.dg-card { min-width:0;margin:0;overflow:hidden;background:var(--panel);color:var(--ink);border:2px solid var(--ink);border-radius:12px;box-shadow:4px 4px 0 var(--ink); }
.dg-card video { display:block;width:100%;aspect-ratio:16/9;object-fit:contain;background:var(--ink); }
.dg-frame { position:relative; }
.dg-toggle { position:absolute;right:7px;bottom:7px;min-width:36px;min-height:32px;border:2px solid var(--ink);border-radius:6px;background:var(--panel);color:var(--ink);font:18px var(--font-head);cursor:pointer; }
.dg-card figcaption { display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;line-height:1.3; }
.dg-card figcaption a { font-size:17px;font-weight:600;color:var(--ink);text-decoration:none; }
.dg-card figcaption a:hover { text-decoration:underline; }
.dg-card figcaption span { font:12px var(--font-mono);white-space:nowrap; }
.dark-sec .dg-card { border-color:var(--gold); }
/* Recorded CLI output and synchronized explanatory notes. */
.hw-walk { display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:24px;align-items:start;margin-top:26px; }
.hw-screen,.hw-explanation { min-width:0; }
.hw-screen video { width:100%;aspect-ratio:16/9;display:block;background:var(--ink);border:3px solid var(--ink);border-radius:12px; }
.hw-caption,.hw-status,.hw-scope { font-size:14px;line-height:1.6;margin-top:12px; }
.hw-transport { display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-top:18px; }
.hw-transport label { flex:1;min-width:170px;font:12px var(--font-mono); }
.hw-transport select { display:block;width:100%;margin-top:6px;min-height:44px;padding:8px;background:var(--panel);color:var(--ink);border:2px solid var(--ink);border-radius:8px;font:14px var(--font-mono); }
.hw-transport button { min-height:44px;padding:8px 12px;border:2px solid var(--ink);border-radius:8px;background:var(--bone);font:18px var(--font-comic);box-shadow:3px 3px 0 var(--ink); }
.hw-transport button:disabled { opacity:.4;box-shadow:none; }
.hw-explanation { padding:22px;border:3px solid var(--ink);border-radius:12px;background:var(--panel);box-shadow:6px 6px 0 var(--ink); }
.hw-kicker { display:flex;justify-content:space-between;gap:12px;font:11px var(--font-mono);color:var(--ash); }
.hw-explanation h3 { font:clamp(23px,2.4vw,34px) var(--font-mono);color:var(--hi);overflow-wrap:anywhere;margin:18px 0 12px; }
.hw-explanation h4 { font:24px var(--font-comic);margin:24px 0 8px; }
.hw-explanation p { font-size:16px;line-height:1.65; }
.hw-inspection { font-family:var(--font-mono);font-size:12px!important;overflow-wrap:anywhere; }
.hw-inspection.hw-finding { font-family:var(--font-sans);font-size:16px!important; }
.hw-explanation details { margin:20px 0; }
.hw-explanation summary { font-family:var(--font-comic);font-size:20px;cursor:pointer; }
.hw-explanation pre { white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.7 var(--font-mono);max-height:420px;overflow:auto;margin-top:12px; }
.hw-scope { max-width:980px;margin-top:24px; }
.hw-downloads { display:flex;flex-wrap:wrap;gap:16px;margin-top:12px;font-size:15px; }
.hw-downloads a { text-decoration:underline;text-underline-offset:4px; }
.hw-install { margin-top:24px;padding:20px;border:2px solid var(--ink);border-radius:10px;background:var(--panel);font:14px/1.8 var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere; }
@media(max-width:980px) { .hw-walk { grid-template-columns:1fr; } }
@media(max-width:650px) { .dg-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; } .dg-card figcaption { padding:9px;align-items:start; } .dg-card figcaption a { font-size:14px; } .dg-card figcaption span { font-size:10px; } .hw-explanation { padding:16px; } }
@media(max-width:480px) { .hw-transport { display:grid;grid-template-columns:1fr 1fr; } .hw-transport label { grid-column:1/-1;grid-row:1; } }

/* Current hand-grasping dataset: one summary shared by the overview and learning page. */
.lp-paper { padding:18px;border:2px solid var(--ink);border-radius:10px;background:var(--panel);box-shadow:4px 4px 0 var(--ink);color:var(--ink); }
.lp-paper-head { display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap; }
.lp-paper-head h3 { margin:0;font:400 23px/1.3 var(--font-comic); }
.lp-success { font:12px var(--font-mono);color:var(--ash); }
.lp-metrics { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 18px;margin-top:20px; }
.lp-metrics b { display:block;font:clamp(20px,2vw,26px) var(--font-mono); }
.lp-metrics span,.lp-split-stats span { display:block;font:12px/1.4 var(--font-head);color:var(--ash);margin-top:5px; }
.lp-dataset-meta { margin:16px 0 0;font:13px/1.6 var(--font-head);color:var(--ash); }
.lp-dataset-meta > span { margin:0 7px; }
.lp-split-heading { display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border-top:1px solid var(--ash-light);margin-top:18px;padding-top:16px; }
.lp-split-heading h4 { margin:0;font:400 18px var(--font-comic); }
.lp-split-heading > span { font:11px var(--font-mono);color:var(--ash); }
.lp-split-tabs { display:inline-flex;gap:3px;margin-top:10px;padding:3px;border:1px solid var(--ash-light);border-radius:8px;background:var(--bone); }
.lp-split-tabs button { border:0;border-radius:5px;padding:7px 13px;font:500 13px var(--font-head);background:transparent;color:var(--ink);cursor:pointer; }
.lp-split-tabs button[aria-pressed=true] { background:var(--ink);color:var(--bone); }
.lp-split-tabs button:focus-visible { outline:2px solid var(--hi);outline-offset:2px; }
.lp-split-stats { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:14px; }
.lp-split-stats b { font:18px var(--font-mono); }
.lp-paper .lp-mini { font:12px/1.6 var(--font-head);color:var(--ash);margin:13px 0 0; }
.lp-dataset-details { margin-top:15px;font:13px/1.65 var(--font-head);border-top:1px solid var(--ash-light);padding-top:12px; }
.lp-dataset-details summary { cursor:pointer;font-weight:600; }
.lp-dataset-details p { margin:12px 0; }
.lp-dataset-details dl { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px;margin:12px 0; }
.lp-dataset-details dl > div { display:flex;justify-content:space-between;gap:12px; }
.lp-dataset-details dd { margin:0;font-family:var(--font-mono); }
.lp-dataset-links { display:flex;gap:18px;flex-wrap:wrap;margin-top:15px;font:12px var(--font-head); }
.lp-dataset-links a { text-decoration:underline;text-underline-offset:3px; }
@media(max-width:600px) { .lp-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.lp-split-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }.lp-split-stats b { font-size:16px; }.lp-dataset-details dl { grid-template-columns:1fr; }.lp-paper { padding:14px; }.lp-split-tabs button { min-height:40px; } }
