/* ════════════════════════════════════════════════════════════════════════
   HEFYR design system v3 — "QUIET AUTHORITY"
   The true brand: forge, kiln, heat, earth. Two first-class themes —
   dark ("night in the forge", default identity) and daylight (the deck on
   paper). Rust is scarce. Numbers are mono. Confidence colors are data-only.
   Nothing moves, exists, or speaks without earning it.
   Every color on this site lives between TOKENS-BEGIN and TOKENS-END —
   the color auditor (_harness/audit-color.cjs) fails the build otherwise.
   ════════════════════════════════════════════════════════════════════════ */

/* ── 0 · Fonts — self-hosted, subset (§C5). Zero third-party font requests.
      System: Switzer (display) · Inter (text/UI) · IBM Plex Mono (instrument)
      — adopted from the §C1 bake-off (see shots/v3/type-*). Fallbacks carry
      size-adjust + metric overrides so the swap is invisible and CLS stays 0. */
@font-face { font-family: 'Switzer'; src: url('fonts/Switzer-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('fonts/Switzer-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('fonts/Switzer-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/InstrumentSerif-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/InstrumentSerif-400i.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
/* metric-matched local fallbacks — invisible swap, zero CLS */
@font-face { font-family: 'Switzer Fallback'; src: local('Arial'); size-adjust: 126.2%; ascent-override: 77.7%; descent-override: 19.8%; line-gap-override: 7.1%; }
@font-face { font-family: 'Instrument Serif Fallback'; src: local('Georgia'); size-adjust: 103%; ascent-override: 88%; descent-override: 24%; line-gap-override: 0%; }
@font-face { font-family: 'Inter Fallback'; src: local('Arial'); size-adjust: 107.6%; ascent-override: 90.1%; descent-override: 22.4%; line-gap-override: 0%; }
@font-face { font-family: 'Plex Mono Fallback'; src: local('Courier New'); size-adjust: 100%; ascent-override: 102.5%; descent-override: 27.5%; line-gap-override: 0%; }

/* ── 1 · Tokens ────────────────────────────────────────────────────────── */
/* TOKENS-BEGIN */
:root {
  /* brand primitives — extracted from hefyrlogo.png + the decks, confirmed
     against slide-XML frequency; theme-invariant */
  --c-rust: #B85530;
  --c-rust-deep: #9C4520;
  --c-rust-bright: #D8703F;
  --c-rust-ember: #E07B4A;
  --c-sand: #C9A86A;
  --c-sand-lite: #D4BA88;  /* the mark's left peak */
  --c-sand-ink: #7E6534;
  --logo-hex: #C7BDB3;     /* hexagon stroke — adapted per theme */
  --c-espresso: #1A1511;
  --c-umber: #3A3228;
  --c-taupe: #5A4C40;
  --c-warm-grey: #9A8B7C;
  --c-hex-grey: #C7BDB3;
  --c-paper: #FCFAF4;
  --c-ivory: #F4EFE4;
  --c-bone: #E2D9CB;
  --c-blush: #FBEEE6;

  /* dark theme (default) — "night in the forge" */
  --bg: #14100D;
  --bg-deep: #0E0B09;
  --surface: #1C1712;
  --surface-2: #241D17;
  --surface-3: #2C241C;
  --line: #342B22;
  --line-strong: #40352A;
  --line-soft: rgba(52, 43, 34, .55);
  --text: #F2EDE6;
  --text-muted: #BFB3A4;
  --text-dim: #9C9081;
  --accent: #B85530;
  --accent-bright: #E07B4A;
  --accent-deep: #9C4520;
  --accent-btn: #D8703F;
  --accent-btn-hover: #E07B4A;
  --accent-ink: #1A1210;
  --sand: #C9A86A;
  --good: #4CBA7C; --warn: #E3A43B; --bad: #E56A57; --info: #7AA5DC; --unknown: #9C9081;
  --good-12: rgba(76, 186, 124, .12); --good-35: rgba(76, 186, 124, .35); --good-55: rgba(76, 186, 124, .55);
  --warn-12: rgba(227, 164, 59, .12); --warn-35: rgba(227, 164, 59, .35); --warn-55: rgba(227, 164, 59, .55);
  --bad-12: rgba(229, 106, 87, .12);  --bad-35: rgba(229, 106, 87, .35);  --bad-55: rgba(229, 106, 87, .55);
  --info-12: rgba(122, 165, 220, .12); --info-35: rgba(122, 165, 220, .35); --info-55: rgba(122, 165, 220, .55);
  --unknown-12: rgba(156, 144, 129, .12);
  --accent-05: rgba(184, 85, 48, .05); --accent-08: rgba(184, 85, 48, .08);
  --accent-12: rgba(184, 85, 48, .12); --accent-16: rgba(184, 85, 48, .16);
  --accent-30: rgba(184, 85, 48, .30);
  --glow-accent-40: rgba(224, 123, 74, .40); --glow-accent-70: rgba(224, 123, 74, .70);
  --sand-06: rgba(201, 168, 106, .06); --sand-25: rgba(201, 168, 106, .25);
  --sand-40: rgba(201, 168, 106, .40); --sand-55: rgba(201, 168, 106, .55);
  --veil-30: rgba(16, 12, 9, .30); --veil-55: rgba(16, 12, 9, .55);
  --veil-65: rgba(16, 12, 9, .65); --veil-75: rgba(16, 12, 9, .75);
  --veil-85: rgba(14, 11, 9, .85); --veil-92: rgba(14, 11, 9, .92);
  --veil-97: rgba(14, 11, 9, .97);
  --rail-bg: rgba(16, 12, 9, .65); /* translucent ink over dark scenes reads clean */
  --wash-02: rgba(242, 237, 230, .02); --wash-03: rgba(242, 237, 230, .03); --wash-04: rgba(242, 237, 230, .045);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, .45);
  --shadow-pop: 0 32px 80px rgba(0, 0, 0, .5);
  --shadow-tip: 0 14px 40px rgba(0, 0, 0, .5);
  --page-wash: radial-gradient(1200px 640px at 78% -8%, rgba(216, 112, 63, .05), transparent 62%),
               linear-gradient(180deg, #120E0B 0%, #14100D 22%);
  --hero-wash: radial-gradient(1100px 520px at 62% 30%, #1D1610 0%, #0E0B09 68%);
  color-scheme: dark;

  /* structure */
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --pad-x: clamp(20px, 4vw, 32px);
  --sec-y: clamp(96px, 11vw, 168px);
  --header-h: 64px;
  --rail-h: 34px;

  /* z-layers (§F1) */
  --z-scene: 0;
  --z-hud: 10;
  --z-copy: 20;
  --z-rail: 90;
  --z-header: 100;
  --z-drawer: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* type — adopted system (§C1 bake-off, System A) + v4 editorial voice */
  --font-ui: 'Inter', 'Inter Fallback', system-ui, sans-serif;
  --font-display: 'Switzer', 'Switzer Fallback', 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Plex Mono Fallback', ui-monospace, monospace;
  --font-editorial: 'Instrument Serif', 'Instrument Serif Fallback', Georgia, serif;

  /* motion constitution (§D1): micro 140 · ui 240 · reveal 700 · scene 1200+ ·
     camera 6s+ · stagger 55ms max 6 · nothing bounces, springs or overshoots */
  --m-micro: 140ms;
  --m-ui: 240ms;
  --m-reveal: 700ms;
  --m-scene: 1200ms;
  --stagger: 55ms;
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-scrub: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 140ms;
  --t-med: 240ms;
  --t-slow: 700ms;

  /* scene tokens — cinematic surfaces stay night-graded in BOTH themes
     (forge-town haze, not moonlight); canvases read these via HEFYR.palette */
  --scene-sky-top: #0A0706; --scene-sky-mid: #171009; --scene-sky-hor: #241812; --scene-sky-warm: #2E1C12;
  --scene-fog: #120D08;
  --scene-ground: #14100C; --scene-ground-line: #0A0705; --scene-under: #070503;
  --scene-steel: #3A3128; --scene-steel-mid: #4A3E31; --scene-steel-dark: #2A231B;
  --scene-concrete: #3E3529; --scene-concrete-dark: #2C251D; --scene-dark: #221C15;
  --scene-paint-pale: #B3A791; --scene-paint-red: #8E3B44; --scene-paint-red-emissive: #5A1418;
  --scene-reflect: #4A3E31; --scene-albedo-pale: #C2B49E;
  --scene-hemi-sky: #4A3626; --scene-hemi-ground: #050302;
  --scene-key: #C9A67E;
  --scene-sodium: #FF9A3D; --scene-sodium-soft: #FFAB63; --scene-sodium-deep: #FFB169;
  --scene-window: #FFB25E; --scene-window-dim: #453729;
  --scene-flood-pale: #D8C8A8;
  --scene-headlight: #FFD9A8;
  --scene-fire: #FF6A2A; --scene-kiln-hot: #C23E16; --scene-kiln-shell: #4A2E24; --scene-kiln-cold: #33281F;
  --scene-strobe: #FF3B30;
  --scene-plume: #A89681; --scene-plume-pale: #BFAE97;
  --scene-sensor-idle: #2E251C; --scene-belt: #201810; --scene-belt-dot: #A8823C;
  --scene-core-hot: #8A4E28; --scene-copper: #B85530;
  --scene-tex-white: #FFFFFF; --scene-tex-pale: #E9E2D4; --scene-tex-pale-2: #E4DCCC;
  --scene-tex-grey: #808080; --scene-tex-grey-lite: #D8D8D8; --scene-tex-grey-dark: #2E2E2E; --scene-tex-grey-mid: #3A3A3A;
  --scene-void: #0E0B09; --scene-label: #BFB3A4; --scene-label-dim: #9C9081;
  --scene-stain: #787E96;

  /* data/categorical tokens — canvas instruments (night-invariant, AA on void) */
  --data-good: #4CBA7C; --data-warn: #E3A43B; --data-bad: #E56A57;
  --data-info: #7AA5DC; --data-unknown: #9C9081;
  --data-sand: #C9A86A; --data-ember: #E07B4A; --data-grey: #9A8B7C;
  --data-pale: #B7AB9C; --data-steel: #8E9BB3; --data-deep: #857A6C;
  --data-neutral: #6B6154; --data-rose: #C77E9E;
}

/* daylight — the brand on paper: what a minister's office prints */
[data-theme="daylight"] {
  --logo-hex: #A99B8C;
  --bg: #FCFAF4;
  --bg-deep: #F4EFE4;
  --surface: #F7F2E8;
  --surface-2: #F1EADC;
  --surface-3: #EAE1D0;
  --line: #E2D9CB;
  --line-strong: #CFC3B1;
  --line-soft: rgba(226, 217, 203, .7);
  --text: #1A1511;
  --text-muted: #5A4C40;
  --text-dim: #75675A;
  --accent: #B85530;
  --accent-bright: #A34A26;
  --accent-deep: #9C4520;
  --accent-btn: #9C4520;
  --accent-btn-hover: #8A3D1D;
  --accent-ink: #FCFAF4;
  --sand: #7E6534;
  --good: #1A6E43; --warn: #8A5A0C; --bad: #B0372C; --info: #2A5AAA; --unknown: #675B4E;
  --good-12: rgba(26, 110, 67, .12); --good-35: rgba(26, 110, 67, .35); --good-55: rgba(26, 110, 67, .55);
  --warn-12: rgba(138, 90, 12, .12); --warn-35: rgba(138, 90, 12, .35); --warn-55: rgba(138, 90, 12, .55);
  --bad-12: rgba(176, 55, 44, .12);  --bad-35: rgba(176, 55, 44, .35);  --bad-55: rgba(176, 55, 44, .55);
  --info-12: rgba(42, 90, 170, .12); --info-35: rgba(42, 90, 170, .35); --info-55: rgba(42, 90, 170, .55);
  --unknown-12: rgba(103, 91, 78, .12);
  --accent-05: rgba(184, 85, 48, .06); --accent-08: rgba(184, 85, 48, .09);
  --accent-12: rgba(184, 85, 48, .13); --accent-16: rgba(184, 85, 48, .17);
  --accent-30: rgba(184, 85, 48, .30);
  --glow-accent-40: rgba(163, 74, 38, .35); --glow-accent-70: rgba(163, 74, 38, .55);
  --sand-06: rgba(126, 101, 52, .07); --sand-25: rgba(126, 101, 52, .28);
  --sand-40: rgba(126, 101, 52, .42); --sand-55: rgba(126, 101, 52, .55);
  --veil-30: rgba(252, 250, 244, .30); --veil-55: rgba(252, 250, 244, .58);
  --veil-65: rgba(252, 250, 244, .68); --veil-75: rgba(250, 247, 239, .78);
  --veil-85: rgba(250, 247, 239, .88); --veil-92: rgba(250, 247, 239, .94);
  --veil-97: rgba(250, 247, 239, .98);
  --rail-bg: #F5F1E7; /* opaque paper — a translucent paper veil over the dark scene muddies to grey */
  --wash-02: rgba(26, 21, 17, .025); --wash-03: rgba(26, 21, 17, .04); --wash-04: rgba(26, 21, 17, .055);
  --shadow-card: 0 10px 34px rgba(58, 50, 40, .12);
  --shadow-pop: 0 28px 70px rgba(58, 50, 40, .20);
  --shadow-tip: 0 12px 34px rgba(58, 50, 40, .16);
  --page-wash: radial-gradient(1200px 640px at 78% -8%, rgba(251, 238, 230, .8), transparent 62%),
               linear-gradient(180deg, #FCFAF4 0%, #FCFAF4 22%);
  --hero-wash: radial-gradient(1100px 520px at 62% 30%, #1D1610 0%, #0E0B09 68%);
  color-scheme: light;
}

/* the instrument surfaces stay night-graded in daylight — screens in a bright
   room; the semantic tokens re-scope to forge-dark inside them */
[data-theme="daylight"] :is(.ask, .feed, .bench, .audit-ledger, .twin-shell, .hero-frame, .night-surface) {
  --bg: #14100D; --bg-deep: #0E0B09;
  --surface: #1C1712; --surface-2: #241D17; --surface-3: #2C241C;
  --line: #342B22; --line-strong: #40352A; --line-soft: rgba(52, 43, 34, .55);
  --text: #F2EDE6; --text-muted: #BFB3A4; --text-dim: #9C9081;
  --accent-bright: #E07B4A; --accent-btn: #D8703F; --accent-btn-hover: #E07B4A; --accent-ink: #1A1210;
  --sand: #C9A86A;
  --good: #4CBA7C; --warn: #E3A43B; --bad: #E56A57; --info: #7AA5DC; --unknown: #9C9081;
  --good-12: rgba(76, 186, 124, .12); --good-35: rgba(76, 186, 124, .35); --good-55: rgba(76, 186, 124, .55);
  --warn-12: rgba(227, 164, 59, .12); --warn-35: rgba(227, 164, 59, .35); --warn-55: rgba(227, 164, 59, .55);
  --bad-12: rgba(229, 106, 87, .12); --bad-35: rgba(229, 106, 87, .35); --bad-55: rgba(229, 106, 87, .55);
  --info-12: rgba(122, 165, 220, .12); --info-35: rgba(122, 165, 220, .35); --info-55: rgba(122, 165, 220, .55);
  --unknown-12: rgba(156, 144, 129, .12);
  --glow-accent-40: rgba(224, 123, 74, .40); --glow-accent-70: rgba(224, 123, 74, .70);
  --sand-06: rgba(201, 168, 106, .06); --sand-25: rgba(201, 168, 106, .25);
  --sand-40: rgba(201, 168, 106, .40); --sand-55: rgba(201, 168, 106, .55);
  --veil-30: rgba(16, 12, 9, .30); --veil-55: rgba(16, 12, 9, .55);
  --veil-65: rgba(16, 12, 9, .65); --veil-75: rgba(16, 12, 9, .75);
  --veil-85: rgba(14, 11, 9, .85); --veil-92: rgba(14, 11, 9, .92);
  --veil-97: rgba(14, 11, 9, .97);
  --wash-02: rgba(242, 237, 230, .02); --wash-03: rgba(242, 237, 230, .03); --wash-04: rgba(242, 237, 230, .045);
  color-scheme: dark;
}
/* TOKENS-END */

/* ── 2 · Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
p { text-wrap: pretty; }
.figcap, .sec-num, .rail, .demo-chip, .pill, .stage-chip, .hop-layer, .kpi .k-label { font-feature-settings: 'case'; }
body::before { /* faint vertical wash — the only global gradient */
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: var(--page-wash);
}

img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--text-muted); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--text); }

::selection { background: var(--accent-30); color: var(--text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; border: 2px solid var(--bg-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: var(--z-modal);
  background: var(--surface-3); color: var(--text); padding: 10px 18px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 12px; transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ── 3 · Typography ───────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.022em; color: var(--text); text-wrap: balance; }

.d1 { font-size: clamp(46px, 7vw, 108px); line-height: 0.96; font-weight: 600; letter-spacing: -0.04em; word-spacing: 0.024em; }
.d2 { font-size: clamp(38px, 5.2vw, 74px); line-height: 1.0; font-weight: 600; letter-spacing: -0.033em; }
.h2 { font-size: clamp(32px, 4.1vw, 56px); line-height: 1.03; letter-spacing: -0.028em; font-weight: 600; } /* v6.1 — landing-grade section heads: display weight, a step up in scale */
.h3 { font-size: clamp(20px, 2vw, 27px); line-height: 1.25; letter-spacing: -0.014em; font-weight: 500; }
.h4 { font-size: 18px; line-height: 1.35; font-weight: 500; }

/* the editorial voice — one serif accent per display heading, never in body.
   Optical: the serif runs ~4% larger inside a grotesk line to match x-height. */
.serif-a { font-family: var(--font-editorial); font-weight: 400; font-style: italic;
  font-size: 1.045em; letter-spacing: -0.012em; line-height: 0; }

.lead  { font-size: clamp(17px, 1.55vw, 22px); line-height: 1.5; color: var(--text-muted); max-width: 58ch; }
.body-m { font-size: 16.5px; color: var(--text-muted); }
.small { font-size: 14px; line-height: 1.55; letter-spacing: 0.005em; color: var(--text-muted); }

.micro, .eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); font-weight: 500;
  font-feature-settings: 'case'; /* centred hyphens/· in all-caps runs */
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; }

.wordmark {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--text); font-size: 13.5px; line-height: 1;
  padding-left: 0.32em; /* optical: trailing tracking compensation */
}

.accent { color: var(--accent-bright); }
.dim { color: var(--text-dim); }
.muted { color: var(--text-muted); }

/* ── 4 · Layout ───────────────────────────────────────────────────────── */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }
.container-wide { max-width: 1360px; margin-inline: auto; padding-inline: var(--pad-x); }

.section { padding-block: var(--sec-y); position: relative; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-tight { padding-block: clamp(64px, 8vw, 112px); }

/* section header: numeral rail + content */
.sec-head { display: grid; grid-template-columns: 88px 1fr; gap: 24px; margin-bottom: clamp(40px, 5vw, 72px); }
.sec-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent-bright);
  letter-spacing: 0.08em; padding-top: 6px; white-space: nowrap;
}
.sec-num::after { content: ''; display: block; width: 40px; height: 1px; background: var(--line-strong); margin-top: 10px; }
.sec-head .eyebrow { margin-bottom: 14px; }
.sec-head h2 { max-width: 17ch; }
.sec-head .sub { margin-top: 18px; max-width: 58ch; }

.grid { display: grid; gap: 24px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.split > * { min-width: 0; }
.split.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

/* figure: blueprint corner ticks + caption */
.fig { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.fig::before, .fig::after {
  content: ''; position: absolute; width: 14px; height: 14px; z-index: 2; pointer-events: none;
  border-color: var(--line-strong); border-style: solid;
}
.fig::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; border-top-left-radius: 2px; }
.fig::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; border-bottom-right-radius: 2px; }
.figcap {
  display: flex; gap: 12px; align-items: baseline; margin-top: 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
}
.figcap b { color: var(--text-muted); font-weight: 500; }

hr.rule { border: 0; border-top: 1px solid var(--line); margin-block: 32px; }

/* ── 5 · Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 24px; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: 14.5px; font-weight: 500; letter-spacing: 0.01em;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-btn); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-btn-hover); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); background: var(--accent-08); }
.btn-subtle { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-subtle:hover { background: var(--surface-3); border-color: var(--line-strong); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: 7px; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 15.5px; }
.btn .arr { transition: transform var(--t-fast) var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; color: var(--text);
  font-weight: 500; font-size: 15px;
}
.link-arrow::after { content: '→'; color: var(--accent-bright); transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ── 6 · Trust primitives ─────────────────────────────────────────────── */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot.good { background: var(--good); box-shadow: 0 0 8px var(--good-55); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn-55); }
.dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad-55); }
.dot.info { background: var(--info); box-shadow: 0 0 8px var(--info-55); }
.dot.unknown { background: var(--unknown); box-shadow: none; }
.dot.live { animation: pulse-dot 2.4s var(--ease) infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 10px;
  border-radius: 20px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
  border: 1px solid var(--line); color: var(--text-muted); background: transparent;
}
.pill.good { color: var(--good); border-color: var(--good-35); background: var(--good-12); }
.pill.warn { color: var(--warn); border-color: var(--warn-35); background: var(--warn-12); }
.pill.bad { color: var(--bad); border-color: var(--bad-35); background: var(--bad-12); }
.pill.info { color: var(--info); border-color: var(--info-35); background: var(--info-12); }
.pill.unknown { color: var(--unknown); border-color: var(--line); background: var(--unknown-12); }

.src {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  letter-spacing: 0.03em; white-space: nowrap;
}
.src b { color: var(--text-muted); font-weight: 500; }

/* KPI atom — every number on the site */
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi .k-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.kpi .k-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; font-size: clamp(20px, 2vw, 26px); line-height: 1.1; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.kpi .k-unit { font-size: 12px; color: var(--text-dim); font-weight: 400; }
.kpi .k-meta { display: flex; align-items: center; gap: 10px; }

[data-kpi] { cursor: pointer; position: relative; }
[data-kpi] .k-value { border-bottom: 1px dashed transparent; transition: border-color var(--t-fast) var(--ease); width: fit-content; }
[data-kpi]:hover .k-value { border-bottom-color: var(--line-strong); }
[data-kpi]::after {
  content: 'TRACE ▸'; position: absolute; top: 2px; right: 0;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; color: var(--accent-bright);
  opacity: 0; transition: opacity var(--t-fast) var(--ease);
}
[data-kpi]:hover::after, [data-kpi]:focus-visible::after { opacity: 1; }

.delta { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 500; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.delta.warn { color: var(--warn); } .delta.flat { color: var(--text-dim); }

/* the demo chip — mandatory on every interactive surface */
.demo-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px;
  border-radius: 20px; border: 1px solid var(--sand-25); background: var(--bg);
  backdrop-filter: blur(8px); font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); cursor: help;
  position: relative; z-index: 5; white-space: nowrap;
}
.demo-chip::before { content: '◖'; font-size: 11px; color: var(--accent-bright); }
.demo-chip[title] { text-decoration: none; }
.fig .demo-chip, .demo-chip.abs { position: absolute; right: 14px; bottom: 14px; background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.twin-canvas .demo-chip.abs { bottom: auto; top: 14px; }

.tag-illustrative {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
  white-space: nowrap;
}
/* one quiet honesty line per section — replaces per-figure chip clutter */
.sec-note {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-dim); margin-top: 22px;
}

/* ── 7 · Cards ────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 30px); position: relative; min-width: 0;
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.card-hover:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card .eyebrow { margin-bottom: 12px; }
.card h3, .card .h4 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 15px; }
.card-deep { background: var(--bg-deep); }

.stat-card { text-align: left; padding: clamp(24px, 3vw, 36px) clamp(22px, 2.6vw, 30px); }
.stat-card .stat-v {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500;
  font-size: clamp(44px, 5.4vw, 92px); line-height: 1; letter-spacing: -0.015em; color: var(--text);
  display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px;
}
.stat-card .stat-v .u, .stat-card .stat-v .q { font-size: .46em; color: var(--sand); } /* one affix voice: qualifier + unit share scale and baseline — sand, the second voice */
.stat-card p { font-size: 14.5px; }

/* ── 8 · Tables / ledger ─────────────────────────────────────────────── */
.ledger { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ledger th {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 500; text-align: left; padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--line-strong);
}
.ledger td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); color: var(--text-muted); vertical-align: top; }
.ledger td:first-child { color: var(--text); font-weight: 500; }
.ledger .mono, .ledger td.n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ledger tr:last-child td { border-bottom: 0; }

/* ── 9 · Forms ───────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.input, select.input, textarea.input {
  background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius-sm);
  height: 48px; padding: 0 16px; color: var(--text); font-size: 15px; width: 100%;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
textarea.input { height: auto; min-height: 110px; padding: 14px 16px; resize: vertical; }
.input:hover { border-color: var(--line-strong); }
.input:focus-visible { outline: none; border-color: var(--accent); background: var(--surface); }
.input::placeholder { color: var(--text-dim); }
select.input {
  appearance: none;
  /* chevron drawn with the theme's dim ink (encoded hex mirrors --text-dim per theme) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239C9081' stroke-width='1.5'/%3E%3C/svg%3E"); /* color-audit-exempt: encoded --text-dim dark */
  background-repeat: no-repeat; background-position: right 16px center;
}
[data-theme="daylight"] select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2375675A' stroke-width='1.5'/%3E%3C/svg%3E"); /* color-audit-exempt: encoded --text-dim daylight */
}
.field .hint { font-size: 12.5px; color: var(--text-dim); }
.field.err .input { border-color: var(--bad); }
.field .err-msg { font-family: var(--font-mono); font-size: 11px; color: var(--bad); display: none; }
.field.err .err-msg { display: block; }

/* ── 10 · Sliders (levers) ───────────────────────────────────────────── */
.lever { padding: 18px 0; border-bottom: 1px solid var(--line); }
.lever:last-child { border-bottom: 0; }
.lever-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; gap: 12px; }
.lever-head .name { font-size: 13.5px; font-weight: 500; color: var(--text); }
.lever-head .val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--sand); white-space: nowrap; }
.lever-track { position: relative; height: 28px; display: flex; align-items: center; }
.lever-base {
  position: absolute; top: 4px; width: 1px; height: 8px; background: var(--text-dim);
}
.lever-base::after {
  content: 'base'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; color: var(--text-dim); text-transform: uppercase;
}
input[type='range'] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px;
  background: transparent; cursor: pointer; margin: 0;
}
input[type='range']::-webkit-slider-runnable-track { height: 2px; background: var(--line-strong); border-radius: 1px; }
input[type='range']::-moz-range-track { height: 2px; background: var(--line-strong); border-radius: 1px; }
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg-deep); margin-top: -7px;
  box-shadow: 0 0 0 1px var(--accent); transition: box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
input[type='range']::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  border: 3px solid var(--bg-deep); box-shadow: 0 0 0 1px var(--accent);
}
input[type='range']:hover::-webkit-slider-thumb, input[type='range']:focus-visible::-webkit-slider-thumb { background: var(--accent-bright); box-shadow: 0 0 0 5px var(--accent-16), 0 0 0 1px var(--accent-bright); }
input[type='range']:focus-visible { outline: none; }

/* ── 11 · Header / nav ───────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header);
  height: var(--header-h);
  display: flex; align-items: center;
  background: var(--veil-55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: height var(--t-med) var(--ease), background var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.site-header.scrolled { height: 54px; background: var(--veil-85); border-bottom-color: var(--line); }
.header-in { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--pad-x); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand svg { width: 25px; height: 28px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav-links a {
  padding: 8px 13px; border-radius: 7px; font-size: 13.5px; font-weight: 480; color: var(--text);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  border: 1px solid transparent;
}
.nav-links a:hover { color: var(--text); background: var(--wash-04); border-color: var(--line); }
.nav-links a[aria-current='page'] { color: var(--text); background: var(--surface-2); position: relative; }
.nav-links a[aria-current='page']::after { /* the quiet rust tick (§D3.4) */
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 1px;
  background: var(--accent); opacity: .85;
}
.header-cta { display: flex; align-items: center; gap: 14px; }
.header-cta .ghost-link { font-size: 13.5px; color: var(--text-dim); }
.header-cta .ghost-link:hover { color: var(--text); }
.kbd-hint {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--wash-02);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); cursor: pointer;
  letter-spacing: .05em; transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.kbd-hint:hover { border-color: var(--line-strong); color: var(--text-muted); }
@media (pointer: coarse) { .kbd-hint { display: none; } } /* a ⌘K keycap is a desktop affordance */
.theme-mini { /* v6.4 — theme switch beside ⌘K (feedback #2); ◐ is the house glyph */
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 7px;
  background: none; color: var(--text-muted); font-family: var(--font-mono); font-size: 13px;
  cursor: pointer; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.theme-mini:hover { border-color: var(--line-strong); color: var(--text); }
.theme-mini[aria-pressed='false'] { transform: rotate(180deg); } /* night: the glyph flips */
.kbd-hint .k { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; font-size: 9.5px; color: var(--text-muted); background: var(--surface); }

.nav-burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; position: relative; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content: ''; position: absolute; left: 11px; width: 16px; height: 1.5px; background: var(--text); transition: all var(--t-fast) var(--ease);
}
.nav-burger span { top: 19px; } .nav-burger span::before { left: 0; top: -5px; } .nav-burger span::after { left: 0; top: 5px; }
.nav-burger[aria-expanded='true'] span { background: transparent; }
.nav-burger[aria-expanded='true'] span::before { transform: rotate(45deg); top: 0; }
.nav-burger[aria-expanded='true'] span::after { transform: rotate(-45deg); top: 0; }

.mobile-nav {
  position: fixed; inset: 0; z-index: calc(var(--z-header) - 5); background: var(--veil-97);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  display: none; flex-direction: column; padding: 110px var(--pad-x) 32px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-family: var(--font-display); font-size: 30px; font-weight: 560; color: var(--text); padding: 14px 0; border-bottom: 1px solid var(--line); letter-spacing: -0.02em; }
.mobile-nav a.sub-link { font-family: var(--font-ui); font-size: 16px; font-weight: 450; color: var(--text-muted); }
.mobile-nav .m-cta { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 28px; }

/* ── 12 · Telemetry rail ─────────────────────────────────────────────── */
.rail {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: var(--z-rail);
  height: var(--rail-h); display: flex; align-items: center;
  background: var(--rail-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; color: var(--text-dim);
  transition: top var(--t-med) var(--ease);
}
.site-header.scrolled + .rail { top: 54px; }
.rail-in { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--pad-x); display: flex; align-items: center; gap: 18px; overflow: hidden; white-space: nowrap; }
.rail .sep { color: var(--line-strong); }
.rail .r-item { display: inline-flex; align-items: center; gap: 7px; }
.rail .r-item b { color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.rail .r-clock { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rail .demo-chip { height: 21px; font-size: 9.5px; padding: 0 9px; margin-left: auto; flex: none; }
@media (max-width: 470px) { /* the honesty badge must never clip on phones */
  .rail-in { gap: 10px; }
  .rail .r-clock, .rail .sep { display: none; }
}
main { padding-top: calc(var(--header-h) + var(--rail-h)); }
[id] { scroll-margin-top: calc(var(--header-h) + var(--rail-h) + 14px); }

/* ── 13 · Footer ─────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); margin-top: var(--sec-y); }
.footer-in { max-width: var(--maxw); margin-inline: auto; padding: 72px var(--pad-x) 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.footer-tag { max-width: 34ch; }
.footer-tag .wordmark { margin-bottom: 18px; display: inline-block; }
.footer-tag p { color: var(--text-dim); font-size: 14px; }
.f-col h4, .f-col .f-h { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; margin-bottom: 16px; }
.f-col a { display: block; padding: 5px 0; font-size: 14px; color: var(--text-muted); }
.f-col a:hover { color: var(--text); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding-top: 28px; }
.footer-meta .stage { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: .04em; }
.footer-meta .legal { display: flex; gap: 20px; font-size: 13px; color: var(--text-dim); }

/* ── 14 · CTA band ───────────────────────────────────────────────────── */
.cta-band { padding-block: clamp(80px, 9vw, 130px); position: relative; border-top: 1px solid var(--line);
  min-height: calc(100svh - 100px); display: flex; align-items: center; justify-content: center; } /* v6.4 — anchor arrivals centre the band (feedback #4) */
.cta-band .cta-in { width: 100%; }
section[id], #cta-band { scroll-margin-top: 100px; }
[data-sim-teaser]:empty { min-height: 560px; } /* v6.4 - reserve the workbench mount so late loads never shift anchored arrivals */
.cta-band::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(720px 320px at 50% 118%, var(--accent-12), transparent 70%); }
.cta-in { max-width: 780px; margin-inline: auto; text-align: center; padding-inline: var(--pad-x); position: relative; }
.cta-in .eyebrow { margin-bottom: 18px; color: var(--accent-bright); }
.cta-in h2 { margin-bottom: 18px; }
.cta-in .lead { margin-bottom: 36px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* v6.4 — industry sheet (hex click → how HEFYR helps + the process chain) */
.ind-pain { color: var(--text-muted); margin-bottom: 18px; }
.ind-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sand); margin: 22px 0 10px; }
.ind-help { display: flex; flex-direction: column; gap: 10px; }
.ind-help p { margin: 0; }
.ind-chain { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ind-chain .ic-node { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--text-muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: var(--bg-deep); }
.ind-chain .ic-arrow { color: var(--text-dim); font-size: 12px; }
.ind-foot { margin-top: 26px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* v6.2 — walkthrough request form in the band (first cut: contact page gated) */
.cta-form { margin: 0 auto; max-width: 660px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.cta-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cta-form textarea.input { min-height: 62px; }
.cta-form .cta-actions { margin-top: 8px; }
.cta-form-err { font-size: 11px; letter-spacing: 0.04em; color: var(--bad); margin: 0; }
.cta-form-done { max-width: 660px; margin: 0 auto; padding: 24px 26px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-deep); }
.cta-doors { color: var(--text-muted); margin-top: 14px; }
@media (max-width: 720px) { .cta-form-grid { grid-template-columns: 1fr; } }

/* ── 15 · Command palette ────────────────────────────────────────────── */
.palette-veil {
  position: fixed; inset: 0; z-index: var(--z-modal); background: var(--veil-65);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center; padding: 14vh var(--pad-x) 0;
}
.palette-veil.open { display: flex; }
.palette {
  width: 600px; max-width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-pop);
  animation: pal-in 220ms var(--ease);
}
@keyframes pal-in { from { opacity: 0; transform: translateY(-10px) scale(.985); } }
.palette input {
  width: 100%; height: 56px; background: transparent; border: 0; padding: 0 20px;
  font-family: var(--font-mono); font-size: 14.5px; color: var(--text);
  border-bottom: 1px solid var(--line);
}
.palette input:focus-visible { outline: none; }
.palette-list { max-height: 340px; overflow-y: auto; padding: 8px; }
.palette-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--text-muted);
}
.palette-item .pi-type { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; flex: none; }
.palette-item.sel, .palette-item:hover { background: var(--surface-3); color: var(--text); }
.palette-item.sel .pi-type { color: var(--accent-bright); border-color: var(--accent-30); }
.palette-item .pi-hint { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: .06em; }

/* ── 16 · Lineage drawer — provenance inspector ──────────────────────── */
.drawer-veil { position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 5); background: var(--veil-55); display: none; }
.drawer-veil.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-drawer); width: min(520px, 94vw);
  background: var(--bg-deep); border-left: 1px solid var(--line-strong);
  transform: translateX(102%); transition: transform var(--m-ui) var(--ease-exit);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); transition-timing-function: var(--ease-enter); }
.drawer-head { padding: 20px 24px 0; border-bottom: 1px solid var(--line); }
.drawer-head .dh-top { display: flex; align-items: flex-start; gap: 14px; }
.drawer-head .eyebrow { margin-bottom: 7px; color: var(--accent-bright); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.drawer-head .eyebrow .rec-id { color: var(--text-dim); letter-spacing: .08em; }
.drawer-head h3 { font-size: 17px; line-height: 1.35; padding-right: 8px; }
.drawer-close { margin-left: auto; width: 34px; height: 34px; flex: none; border: 1px solid var(--line); background: transparent; border-radius: 8px; color: var(--text-dim); cursor: pointer; font-size: 16px; line-height: 1; }
.drawer-close:hover { color: var(--text); border-color: var(--line-strong); }
.value-strip { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 14px 0 16px; }
.value-strip .vs-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 500; line-height: 1; color: var(--text); }
.value-strip .vs-unit { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }
.value-strip .vs-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.drawer-tabs { display: flex; gap: 2px; margin: 0 -2px; }
.drawer-tab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim); padding: 9px 14px 11px; border-bottom: 2px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.drawer-tab:hover { color: var(--text-muted); }
.drawer-tab.on { color: var(--sand); border-bottom-color: var(--accent); }
.drawer-body { padding: 20px 24px 22px; overflow-y: auto; flex: 1; }

.hops { position: relative; display: flex; flex-direction: column; gap: 0; }
.hop { position: relative; padding: 0 0 20px 34px; }
.hop::before { /* connector */
  content: ''; position: absolute; left: 10px; top: 22px; bottom: -2px; width: 1px;
  background: linear-gradient(180deg, var(--line-strong), var(--line));
}
.hop:last-child::before { display: none; }
.hop-dot {
  position: absolute; left: 4px; top: 6px; width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--bg-deep); z-index: 1;
}
.hop.lit .hop-dot { border-color: var(--accent-bright); box-shadow: 0 0 10px var(--glow-accent-40); }
.hop-layer { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 5px; display: flex; gap: 10px; align-items: center; }
.hop-layer b { color: var(--sand); font-weight: 500; }
.hop-layer .hop-hash { margin-left: auto; letter-spacing: .04em; text-transform: none; color: var(--text-dim); opacity: .75; font-size: 9.5px; }
.hop-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; }
.hop.lit .hop-card { border-color: var(--line); }
.hop-card .h-detail { font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.hop-card .h-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 12px; margin-top: 11px;
  padding-top: 10px; border-top: 1px solid var(--line);
}
.hop-card .h-cell { min-width: 0; }
.hop-card .h-k { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 3px; }
.hop-card .h-v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 10.5px; color: var(--text-muted); line-height: 1.45; overflow-wrap: break-word; }
.hop-card .h-meta { display: flex; gap: 12px; margin-top: 10px; align-items: center; flex-wrap: wrap; }

/* calibration certificate — the last hop carries paper */
.cal-cert {
  margin-top: 12px; border: 1px solid var(--sand-25); border-radius: 8px;
  background: var(--sand-06); padding: 11px 13px 12px; position: relative;
}
.cal-cert::before {
  content: 'CALIBRATION CERTIFICATE'; display: block;
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .18em; color: var(--sand);
  margin-bottom: 8px; padding-bottom: 7px; border-bottom: 1px dashed var(--sand-25);
}
.cal-cert .cc-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-family: var(--font-mono); font-size: 11px; }
.cal-cert dt { color: var(--text-dim); letter-spacing: .04em; }
.cal-cert dd { color: var(--text-muted); margin: 0; }
.cal-cert dd.flag { color: var(--warn); }
.cal-cert .cc-stamp {
  position: absolute; top: 9px; right: 11px; font-family: var(--font-mono); font-size: 8.5px;
  letter-spacing: .1em; padding: 2px 8px; border-radius: 10px;
}
.cal-cert .cc-stamp.ok { color: var(--good); border: 1px solid var(--good-35); background: var(--good-12); }
.cal-cert .cc-stamp.flag { color: var(--warn); border: 1px solid var(--warn-35); background: var(--warn-12); }

/* chain integrity footer */
.integrity {
  margin-top: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 12px 14px; display: flex; align-items: center; gap: 11px;
  opacity: 0; transform: translateY(6px); transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
.integrity.lit { opacity: 1; transform: none; }
.integrity .ig-check {
  width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center;
  color: var(--good); border: 1px solid var(--good-35); background: var(--good-12); font-size: 11px;
}
.integrity .ig-text { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; color: var(--text-muted); line-height: 1.6; }
.integrity .ig-text b { color: var(--good); font-weight: 500; letter-spacing: .1em; }
.integrity .ig-text .dim2 { color: var(--text-dim); }
.drawer-foot-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* RECORD tab — raw provenance JSON */
.json-view {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; font-family: var(--font-mono); font-size: 11px; line-height: 1.75;
  color: var(--text-muted); overflow-x: auto; white-space: pre; tab-size: 2;
}
.json-view .jk { color: var(--sand); }
.json-view .js { color: var(--text-muted); }
.json-view .jn { color: var(--info); }
.json-view .jb { color: var(--accent-bright); }
.json-view .jp { color: var(--text-dim); }
.json-actions { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.copy-btn {
  appearance: none; border: 1px solid var(--line); background: transparent; border-radius: 7px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); padding: 5px 11px; cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.copy-btn:hover { color: var(--sand); border-color: var(--sand-40); }

/* ── 17 · Agent feed ─────────────────────────────────────────────────── */
.feed { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feed-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.feed-head .dot { margin-left: auto; }
.feed-body { height: 300px; overflow: hidden; position: relative; padding: 10px 0; }
.feed-body::before { content: ''; position: absolute; inset: 0 0 auto; height: 44px; z-index: 2; pointer-events: none; background: linear-gradient(180deg, var(--bg-deep), transparent); }
.feed-row { display: flex; gap: 14px; padding: 7px 18px; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; align-items: baseline; }
.feed-row.fresh { animation: feed-in 420ms var(--ease); }
@keyframes feed-in { from { opacity: 0; transform: translateY(-6px); } }
.feed-row .f-time { color: var(--text-dim); flex: none; font-size: 11px; }
.feed-row .f-agent { color: var(--sand); flex: none; }
.feed-row .f-msg { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ── 18 · Toast ──────────────────────────────────────────────────────── */
.toast-zone { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 10px;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  box-shadow: var(--shadow-card); animation: toast-in 260ms var(--ease); pointer-events: auto;
}
.toast a { color: var(--accent-bright); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.toast.out { opacity: 0; transform: translateY(6px); transition: all 240ms var(--ease); }

/* ── 19 · Boot line ──────────────────────────────────────────────────── */
.boot {
  position: fixed; inset: 0; z-index: calc(var(--z-toast) + 50); background: var(--bg); /* boot sits above all chrome */
  display: flex; align-items: center; justify-content: center; padding: 0 var(--pad-x);
  transition: opacity 380ms var(--ease); cursor: pointer;
}
.boot.done { opacity: 0; pointer-events: none; }
.boot-line { font-family: var(--font-mono); font-size: clamp(11px, 1.4vw, 13px); color: var(--text-dim); letter-spacing: .04em; white-space: pre-wrap; max-width: 720px; }
.boot-line .ok { color: var(--good); }
.boot-line .hl { color: var(--sand); }
.boot-line .caret { display: inline-block; width: 7px; height: 14px; background: var(--accent-bright); vertical-align: -2px; animation: caret 800ms steps(1) infinite; margin-left: 2px; }
@keyframes caret { 50% { opacity: 0; } }

/* ── 20 · HERO — Ignition v4 "THE INSTRUMENT PANEL" ───────────────────────
   The copy argues on the page ground (espresso on paper in daylight, ivory on
   charcoal at night); the living plant sits below it inside a framed night
   panel — an instrument in the room. On scroll the copy exits under the
   header and the frame expands to full bleed as the story ignites.
   All geometry is a pure function of pin progress p (reverse-symmetric). */
.hero { position: relative; min-height: calc(100vh - var(--header-h) - var(--rail-h)); }
.hero-stage { position: sticky; top: calc(var(--header-h) + var(--rail-h)); height: calc(100vh - var(--header-h) - var(--rail-h)); overflow: hidden; background: var(--bg); }
.hero-scroll { height: 300vh; position: relative; } /* scroll runway for the story */
.hero-frame { position: absolute; inset: 0; z-index: var(--z-scene); background: var(--hero-wash);
  clip-path: inset(var(--fi-t, 0px) var(--fi-r, 0px) var(--fi-b, 0px) var(--fi-l, 0px) round var(--fi-rad, 0px)); }
.hero-frame-edge { position: absolute; z-index: var(--z-hud); pointer-events: none;
  top: var(--fi-t, 0px); right: var(--fi-r, 0px); bottom: var(--fi-b, 0px); left: var(--fi-l, 0px);
  border: 1px solid var(--line-strong); border-radius: var(--fi-rad, 0px); opacity: var(--fi-edge, 1);
}
.hero-frame-edge::before, .hero-frame-edge::after { /* blueprint corner ticks — the fig grammar */
  content: ''; position: absolute; width: 14px; height: 14px; border-color: var(--line-strong); border-style: solid;
}
.hero-frame-edge::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.hero-frame-edge::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.hero-canvas, .hero-poster { position: absolute; inset: 0; }
.hero-poster { background: var(--hero-wash); }
.hero-poster svg { width: 100%; height: 100%; object-fit: cover; }
/* schematic mode: the poster composes inside the frame's VISIBLE box (the clip
   would otherwise crop the composition's top off — towers vanish, kiln blob remains) */
.hero-stage.static-mode .hero-poster svg {
  position: absolute; width: auto; height: auto;
  top: var(--fi-t, 0px); left: var(--fi-l, 0px); right: var(--fi-r, 0px); bottom: var(--fi-b, 0px);
}
.hero-canvas canvas { width: 100% !important; height: 100% !important; }
.hero-veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--veil-30) 0%, transparent 22%),
              linear-gradient(180deg, transparent 76%, var(--veil-85) 100%); }
.hero-copy { position: absolute; left: 0; right: 0; top: clamp(28px, 5.5vh, 64px); z-index: var(--z-copy); pointer-events: none; }
.hero-copy .container-wide > * { pointer-events: auto; }
.hero-copy .eyebrow { color: var(--sand); margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.hero-copy .eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--accent); }
.hero-copy h1 { margin-bottom: 0; font-size: clamp(36px, 4.9vw, 71px); line-height: 1.01; font-weight: 600; letter-spacing: -0.038em; word-spacing: 0.024em; }
.hero-sub { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-top: clamp(18px, 2.6vh, 30px); }
.hero-copy .lead { max-width: 47ch; margin-bottom: 0; font-size: clamp(18px, 1.7vw, 24px); } /* v6.1 — the defining sentence reads a step larger */
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-status {
  position: absolute; top: calc(var(--fi-t, 0px) + 18px); left: var(--fi-l, 0px); right: var(--fi-r, 0px);
  z-index: var(--z-hud);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: 22px; pointer-events: none;
}
.hero-status > * { pointer-events: auto; }
.scene-caption {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); display: flex; align-items: center; gap: 10px; transition: opacity var(--t-slow) var(--ease);
}
.scene-caption b { color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.power-toggle {
  display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 6px 0 14px;
  border: 1px solid var(--line-strong); border-radius: 20px; background: var(--veil-75);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--text-dim);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease);
}
.power-toggle:hover { border-color: var(--accent); }
.power-toggle .pt-pill { width: 40px; height: 20px; border-radius: 12px; border: 1px solid var(--line-strong); position: relative; background: var(--bg-deep); transition: background var(--t-med) var(--ease); }
.power-toggle .pt-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-dim); transition: all var(--t-med) var(--ease); }
.power-toggle[aria-pressed='true'] .pt-pill { background: var(--accent-16); border-color: var(--accent); }
.power-toggle[aria-pressed='true'] .pt-knob { left: 22px; background: var(--accent-bright); box-shadow: 0 0 10px var(--glow-accent-70); }
.power-toggle[aria-pressed='true'] { color: var(--sand); }
.scroll-cue { position: absolute; bottom: calc(var(--fi-b, 0px) + 18px); left: 50%; transform: translateX(-50%); z-index: var(--z-hud);
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .22em; color: var(--text-dim); text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-cue::after { content: ''; width: 1px; height: 30px; background: linear-gradient(180deg, var(--accent), transparent); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.hotspot-card {
  position: absolute; z-index: calc(var(--z-hud) + 1); width: 264px; background: var(--veil-92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px;
  box-shadow: var(--shadow-tip); animation: pal-in 200ms var(--ease);
}
.hotspot-card .hc-title { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 9px; }
.hotspot-card .hc-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.hotspot-card .hc-value .u { font-size: 12px; color: var(--text-dim); }
.hotspot-card .hc-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* designed pre-mount state — a slow connection must never show a void */
.night-surface:empty {
  display: grid; place-items: center; position: relative;
  background:
    radial-gradient(560px 300px at 50% 42%, var(--wash-03), transparent 70%),
    var(--bg-deep);
}
.night-surface:empty::before {
  content: 'RESOLVING 4,812 ENTITIES · 127 CROSS-SYSTEM RELATIONSHIPS';
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  color: var(--text-dim); animation: nsPulse 2.2s var(--ease) infinite;
}
@keyframes nsPulse { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .night-surface:empty::before { animation: none; } }

/* ── 21 · TWIN — SpiderGraph ─────────────────────────────────────────── */
.twin-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr) 316px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-deep); min-height: 620px; position: relative; }
.twin-rail { border-right: 1px solid var(--line); padding: 18px 16px; display: flex; flex-direction: column; gap: 22px; background: var(--veil-65); z-index: 3; }
.twin-rail h4, .twin-rail .tw-h { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; margin-bottom: 10px; }
.twin-crumb { display: flex; flex-direction: column; gap: 2px; }
.twin-crumb button {
  text-align: left; background: transparent; border: 0; padding: 7px 10px; border-radius: 7px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); cursor: pointer;
  display: flex; gap: 8px; align-items: center; transition: all var(--t-fast) var(--ease);
}
.twin-crumb button:hover { color: var(--text-muted); background: var(--wash-03); }
.twin-crumb button.on { color: var(--text); background: var(--surface-2); }
.twin-crumb button .lvl { color: var(--accent-bright); font-size: 9.5px; }
.flow-filters { display: flex; flex-direction: column; gap: 6px; }
.flow-chk { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); cursor: pointer; padding: 4px 2px; }
.flow-chk input { accent-color: var(--accent); width: 13px; height: 13px; }
.flow-chk .swatch { width: 14px; height: 2px; border-radius: 1px; }
.twin-stats { margin-top: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); line-height: 1.9; }
.twin-stats b { color: var(--text-muted); font-weight: 500; }

.twin-canvas { position: relative; min-height: 620px; }
.twin-canvas .graph-mount { position: absolute; inset: 0; }
.twin-canvas .resolving {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--text-dim);
  text-transform: uppercase; text-align: center; pointer-events: none; transition: opacity 400ms var(--ease);
}
.twin-canvas .resolving b { color: var(--sand); font-weight: 500; }
.twin-canvas:has(.resolving) .twin-legend { opacity: 0; transition: opacity var(--m-ui) var(--ease-enter); }

.inspector { border-left: 1px solid var(--line); background: var(--veil-75); display: flex; flex-direction: column; z-index: 3; }
.inspector-empty { padding: 26px 22px; color: var(--text-dim); font-size: 13px; line-height: 1.7; }
.inspector-empty .micro { margin-bottom: 12px; color: var(--accent-bright); }
.inspector-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.inspector-head .i-type { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 6px; }
.inspector-head h4 { font-size: 16px; font-weight: 560; }
.inspector-head .i-agent { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.inspector-body { padding: 14px 20px; overflow-y: auto; flex: 1; }
.i-kpis { display: flex; flex-direction: column; }
.i-kpi { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.i-kpi .n { font-size: 12.5px; color: var(--text-muted); flex: 1; }
.i-kpi .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--text); font-weight: 500; }
.i-kpi .u { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.i-spark { margin: 14px 0 4px; }
.i-spark svg { width: 100%; height: 44px; }
.override-box { border-top: 1px solid var(--line); padding: 16px 20px 18px; background: var(--veil-55); }
.override-box h5 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; margin-bottom: 12px; }
.override-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.override-row select { flex: 1; height: 36px; font-size: 12.5px; padding: 0 10px; }
.override-val { font-family: var(--font-mono); font-size: 12px; color: var(--sand); min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.impact-tally { margin-top: 12px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 12px 14px; }
.impact-tally .t-rs { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 21px; font-weight: 500; }
.impact-tally .t-rs.neg { color: var(--bad); } .impact-tally .t-rs.pos { color: var(--good); }
.impact-tally .t-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); margin-top: 4px; }
.impact-depts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.twin-legend { position: absolute; left: 232px; bottom: 12px; background: var(--veil-65); padding: 5px 10px; border-radius: 8px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 4; display: flex; gap: 14px; align-items: center; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); flex-wrap: wrap; }
.twin-legend .lg { display: inline-flex; gap: 7px; align-items: center; }
.twin-legend .lg i { width: 16px; height: 2px; border-radius: 1px; }

/* ── 22 · WORKBENCH — simulation ─────────────────────────────────────── */
.bench { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-deep); overflow: hidden; position: relative; }
.bench-top { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bench-top .bt-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); display: flex; gap: 10px; align-items: center; }
.preset-row { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.preset-btn {
  height: 30px; padding: 0 13px; border-radius: 16px; border: 1px solid var(--line); background: transparent;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: var(--text-muted); cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.preset-btn:hover { border-color: var(--line-strong); color: var(--text); }
.preset-btn.on { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-08); }
.bench-grid { display: grid; grid-template-columns: 296px minmax(0, 1fr) 352px; }
.bench-levers { border-right: 1px solid var(--line); padding: 10px 22px 18px; }
.bench-metrics { padding: 18px 22px; min-width: 0; }
.metric-group { margin-bottom: 18px; }
.metric-group > .mg-head { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.metric-group > .mg-head::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 10px; min-width: 0; transition: border-color var(--t-med) var(--ease); }
.m-card.changed { border-color: var(--line-strong); }
.m-card .m-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-card .m-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 500; color: var(--text); line-height: 1.2; white-space: nowrap; }
.m-card .m-unit { font-size: 9.5px; color: var(--text-dim); font-weight: 400; margin-left: 3px; }
.m-card .m-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 6px; }
.m-card .m-foot .delta { font-size: 10.5px; }
.m-card svg.spark { width: 56px; height: 16px; opacity: .8; }
.bench-right { border-left: 1px solid var(--line); background: var(--veil-30); position: relative; min-height: 480px; }
.rcpt-scroll { position: absolute; inset: 0; overflow-y: auto; padding: 0 20px 18px; display: flex; flex-direction: column; gap: 20px; }
.bench-right h5, .bench-right .bh5 { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.bench-right h5::after, .bench-right .bh5::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.bench-right h5 .h5-tail, .bench-right .bh5 .h5-tail { font-size: 9px; letter-spacing: .06em; color: var(--text-dim); text-transform: none; }

/* receipt identity */
.rcpt-head {
  margin: 0 -20px; padding: 14px 20px 12px; border-bottom: 1px dashed var(--line-strong);
  background: linear-gradient(180deg, var(--veil-92), var(--veil-85));
  position: sticky; top: 0; z-index: 3; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.rcpt-head .r-line1 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rcpt-head .r-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--sand); font-weight: 500; }
.rcpt-head .r-id { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text); font-weight: 500; margin-left: auto; }
.rcpt-head .r-meta { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; color: var(--text-dim); margin-top: 5px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.rcpt-head .r-meta b { color: var(--text-muted); font-weight: 500; }

/* inputs vs baseline */
.io-rows { display: flex; flex-direction: column; }
.io-row {
  display: grid; grid-template-columns: minmax(78px, auto) 1fr auto; gap: 10px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px;
}
.io-row:last-child { border-bottom: 0; }
.io-row .io-name { color: var(--text-muted); font-size: 10.5px; letter-spacing: .02em; }
.io-row .io-move { color: var(--text-dim); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.io-row .io-move b { color: var(--text); font-weight: 500; }
.io-row .io-move .arr { color: var(--accent-bright); }
.io-row .io-tag { font-size: 8.5px; letter-spacing: .1em; color: var(--text-dim); }
.io-row.moved .io-tag { color: var(--accent-bright); }
.io-row.still .io-name, .io-row.still .io-move, .io-row.still .io-tag { color: var(--text-dim); } /* quiet, but AA — dimming by token step, not sub-AA opacity */

/* validated envelope */
.env-rows { display: flex; flex-direction: column; gap: 9px; }
.env-row { display: grid; grid-template-columns: 86px 1fr auto; gap: 10px; align-items: center; }
.env-row .e-name { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-track { position: relative; height: 12px; border-radius: 3px; background: var(--bad-12); overflow: hidden; }
.env-band { position: absolute; top: 0; bottom: 0; background: var(--good-12); border-inline: 1px solid var(--good-35); }
.env-mark { position: absolute; top: 1px; bottom: 1px; width: 2px; border-radius: 1px; background: var(--text-muted); transition: left 260ms var(--ease); }
.env-row.ok .env-mark { background: var(--good); box-shadow: 0 0 6px var(--good-55); }
.env-row.edge .env-mark { background: var(--warn); box-shadow: 0 0 6px var(--warn-55); }
.env-row.out .env-mark { background: var(--bad); box-shadow: 0 0 6px var(--bad-55); }
.env-row .e-state { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; }
.env-row.ok .e-state { color: var(--good); } .env-row.edge .e-state { color: var(--warn); } .env-row.out .e-state { color: var(--bad); }
.env-note { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); letter-spacing: .03em; margin-top: 7px; line-height: 1.7; }

.chart-box svg { width: 100%; height: auto; display: block; }
.chart-box .net-chip { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em; text-transform: none; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.chart-box .net-chip.pos { color: var(--good); border-color: var(--good-35); background: var(--good-12); }
.chart-box .net-chip.neg { color: var(--bad); border-color: var(--bad-35); background: var(--bad-12); }

.alerts { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.alert {
  display: flex; gap: 10px; padding: 9px 12px 9px 10px; border-radius: 9px; border: 1px solid var(--line);
  border-left-width: 2px; background: var(--surface); font-size: 12px; line-height: 1.5; color: var(--text-muted);
  animation: feed-in 320ms var(--ease);
}
.alert.warn { border-left-color: var(--warn); } .alert.bad { border-left-color: var(--bad); }
.alert.info { border-left-color: var(--info); } .alert.good { border-left-color: var(--good); }
.alert .a-dept { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; flex: none; padding-top: 3px; }
.alert.warn .a-dept { color: var(--warn); } .alert.bad .a-dept { color: var(--bad); }
.alert.info .a-dept { color: var(--info); } .alert.good .a-dept { color: var(--good); }
.alert .a-text .mono { font-size: 11.5px; }

/* assumptions ledger — stacked rows */
.assump-rows { display: flex; flex-direction: column; }
.assump-row { padding: 9px 0 10px; border-bottom: 1px solid var(--line); }
.assump-row:last-child { border-bottom: 0; }
.assump-row .as-top { display: flex; align-items: baseline; gap: 10px; }
.assump-row .as-lever { font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; }
.assump-row .as-fresh { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-dim); white-space: nowrap; }
.assump-row .as-coef { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 10.5px; color: var(--sand); margin-top: 3px; line-height: 1.6; }
.assump-row .as-note { font-size: 10.5px; color: var(--text-dim); line-height: 1.55; margin-top: 3px; }
.assump-row .as-note b { color: var(--text-muted); font-weight: 500; }

.unmodeled { display: flex; flex-direction: column; gap: 6px; }
.unmodeled li { list-style: none; display: flex; gap: 9px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.unmodeled li::before { content: '×'; color: var(--bad); font-family: var(--font-mono); flex: none; }
.honesty-plate {
  border: 1px dashed var(--bad-35); border-radius: 9px; padding: 10px 14px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bad); text-align: center; background: var(--bad-12);
}
.assump-note { font-size: 11.5px; color: var(--text-dim); line-height: 1.55; }

/* receipt footer */
.rcpt-foot { display: flex; flex-direction: column; gap: 10px; margin-top: -4px; }
.rcpt-sum {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; color: var(--text-dim);
  padding-top: 11px; border-top: 1px dashed var(--line-strong);
}
.rcpt-sum b { color: var(--text-muted); font-weight: 500; }
.rcpt-sum .copy-btn { margin-left: 4px; }

/* ── 23 · ASK — interrogation ────────────────────────────────────────── */
.ask { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-deep); overflow: hidden; }
.ask-head { display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.ask-body { padding: 22px; min-height: 380px; display: flex; flex-direction: column; gap: 18px; }
.ask-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.q-chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 7px 15px;
  font-size: 12.5px; color: var(--text-muted); cursor: pointer; transition: all var(--t-fast) var(--ease);
  text-align: left;
}
.q-chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-08); }
.ask-q { display: flex; gap: 12px; align-items: baseline; }
.ask-q .who { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--text-dim); text-transform: uppercase; flex: none; padding-top: 4px; }
.ask-q .q-text { font-family: var(--font-display); font-size: 19px; font-weight: 560; letter-spacing: -0.01em; }
.route-trace { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.route-trace .ok { color: var(--good); } .route-trace .fail { color: var(--bad); }
.route-trace::before { content: ''; width: 14px; height: 1px; background: var(--line-strong); }
.ask-a { font-size: 15.5px; line-height: 1.7; color: var(--text-muted); max-width: 68ch; }
.ask-a .stream-caret { display: inline-block; width: 7px; height: 15px; background: var(--accent-bright); vertical-align: -2px; animation: caret 700ms steps(1) infinite; }
.fact-rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.fact-row {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto; gap: 8px 18px; align-items: center;
  padding: 11px 2px; border-bottom: 1px solid var(--line); animation: feed-in 360ms var(--ease);
}
.fact-row .f-name { font-size: 13px; color: var(--text-muted); }
.fact-row .f-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text); font-weight: 500; }
.fact-row .f-tail { display: flex; align-items: center; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.trace-btn {
  border: 0; background: transparent; color: var(--accent-bright); font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .1em; cursor: pointer; padding: 4px 6px; border-radius: 5px;
  text-transform: uppercase; transition: background var(--t-fast) var(--ease);
}
.trace-btn:hover { background: var(--accent-08); }
.abstain-box {
  border: 1px solid var(--warn-35); background: var(--warn-12); border-radius: 12px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.abstain-box .ab-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--warn); }
.abstain-box p { font-size: 14px; color: var(--text-muted); }
.escalate { display: flex; flex-wrap: wrap; gap: 8px; }
.escalate button, .escalate .esc {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-muted);
  border-radius: 8px; padding: 8px 14px; font-size: 12.5px; cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.escalate button:hover { border-color: var(--accent); color: var(--text); }
.ask-input-row { display: flex; gap: 10px; margin-top: auto; }
.ask-input-row .input { flex: 1; font-family: var(--font-mono); font-size: 13.5px; }
.matched-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.matched-note b { color: var(--sand); font-weight: 500; }

/* ── 24 · Page modules ───────────────────────────────────────────────── */
/* inversion — them vs hefyr */
.inversion-viz { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.inv-side { background: var(--surface); padding: clamp(24px, 3vw, 40px); position: relative; min-height: 320px; }
.inv-side.hefyr { background: var(--bg-deep); }
.inv-side .micro { margin-bottom: 20px; }
.inv-side.hefyr .micro { color: var(--accent-bright); }
.inv-side svg { width: 100%; height: auto; }
.inv-side p { font-size: 13px; color: var(--text-dim); margin-top: 18px; max-width: 34ch; }

/* physics gate chips */
.gate-flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.gate-chip {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px;
  padding: 14px 20px; font-family: var(--font-mono); font-size: 12px; color: var(--text);
  display: flex; flex-direction: column; gap: 4px; min-width: 168px;
}
.gate-chip .g-sub { font-size: 10px; color: var(--text-dim); letter-spacing: .06em; }
.gate-arrow { padding: 0 14px; color: var(--accent-bright); font-family: var(--font-mono); }
.pullquote {
  border-left: 2px solid var(--accent); padding: 6px 0 6px 24px; margin-top: 36px;
  font-family: var(--font-editorial); font-style: italic; font-size: clamp(22px, 2.3vw, 29px);
  font-weight: 400; letter-spacing: -0.008em; color: var(--text); max-width: 26ch; line-height: 1.32;
  hanging-punctuation: first;
}
.pullquote .dim { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; margin-top: 12px; color: var(--text-dim); text-transform: uppercase; }

/* moats */
.moat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.moat-card { position: relative; overflow: hidden; }
.moat-card .m-num { font-family: var(--font-mono); font-size: 11px; color: var(--accent-bright); margin-bottom: 18px; display: block; }
.moat-card .kill { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--text-dim); font-style: italic; }
.flywheel-box { display: flex; justify-content: center; padding: 20px 0 8px; }
.flywheel-box svg { width: min(660px, 100%); height: auto; }

/* verticals hex */
.hex-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-start; }
.hex {
  --hs: 116px; width: var(--hs); aspect-ratio: 0.9; position: relative;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--surface); border: 0; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center;
  transition: background var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.hex::before { content: ''; position: absolute; inset: 1px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--bg-deep); z-index: 0; transition: background var(--t-med) var(--ease); }
.hex > * { position: relative; z-index: 1; }
.hex .hx-name { font-size: 12px; font-weight: 500; color: var(--text-muted); line-height: 1.25; }
.hex .hx-status { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; color: var(--text-dim); text-transform: uppercase; }
.hex { cursor: pointer; }
.hex:hover { transform: translateY(-2px); }
.hex:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hex:hover::before { background: var(--surface); }
.hex.flag { background: var(--accent); }
.hex.flag::before { background: linear-gradient(160deg, var(--surface-2), var(--bg-deep) 70%); }
.hex.flag .hx-name { color: var(--sand); }
.hex.flag .hx-status { color: var(--accent-bright); }
.hex.next { background: var(--line-strong); }
.hex.sel { background: var(--accent-bright); }
.hex .hx-cbam { font-family: var(--font-mono); font-size: 8px; color: var(--info); letter-spacing: .08em; }
.vertical-detail { margin-top: 26px; }

/* arc timeline */
.arc-line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; margin-top: 18px; }
.arc-line::before { content: ''; position: absolute; top: 7px; left: 4%; right: 4%; height: 1px; background: linear-gradient(90deg, var(--accent), var(--line-strong)); }
.arc-step { padding: 0 26px 0 0; position: relative; }
.arc-step::before { content: ''; position: absolute; top: 3px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.arc-step:nth-child(2)::before { border-color: var(--line-strong); }
.arc-step:nth-child(3)::before { border-color: var(--line-strong); }
.arc-step .a-when { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-bright); margin: 22px 0 8px; }
.arc-step:nth-child(n+2) .a-when { color: var(--text-dim); }
.arc-step h3 { font-size: 19px; margin-bottom: 8px; }
.arc-step p { font-size: 13.5px; color: var(--text-dim); max-width: 30ch; }

/* comparison table */
.compare { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 200px 1fr 1.2fr; gap: 0; border-bottom: 1px solid var(--line); }
.compare-row:last-child { border-bottom: 0; }
.compare-row > div { padding: 18px 22px; }
.compare-row .c-who { background: var(--surface); font-weight: 560; font-family: var(--font-display); font-size: 15.5px; display: flex; align-items: center; }
.compare-row .c-shape { font-size: 13.5px; color: var(--text-dim); border-right: 1px solid var(--line); display: flex; align-items: center; }
.compare-row .c-line { font-size: 14px; color: var(--text-muted); align-self: center; } /* not flex — flex eats the whitespace text nodes around <b> */
.compare-row.head > div { padding: 12px 22px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); background: var(--bg-deep); }
.compare-row .c-line b { color: var(--sand); font-weight: 500; }

/* precision stack */
.pstack { display: flex; flex-direction: column; gap: 8px; }
.player {
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: all var(--t-med) var(--ease); overflow: hidden; cursor: pointer;
}
.player summary { list-style: none; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; padding: 15px 20px; }
.player summary::-webkit-details-marker { display: none; }
.player .pl-num { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.player .pl-name { font-size: 15px; font-weight: 550; font-family: var(--font-display); letter-spacing: -0.01em; }
.player .pl-hint { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: .08em; }
.player[open] { border-color: var(--line-strong); background: var(--surface-2); }
.player[open] .pl-num { color: var(--accent-bright); }
.player .pl-body { padding: 0 20px 18px 86px; color: var(--text-muted); font-size: 14px; max-width: 72ch; }
.player:hover { border-color: var(--line-strong); }

/* constellation */
.constellation { position: relative; }
.constellation canvas { width: 100%; height: 480px; display: block; }
.const-tip {
  position: absolute; z-index: 4; pointer-events: none; background: var(--veil-92);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 14px; max-width: 240px;
  font-size: 12px; color: var(--text-muted); box-shadow: var(--shadow-tip);
}
.const-tip .t-name { font-family: var(--font-mono); font-size: 11px; color: var(--sand); margin-bottom: 3px; }
.const-tip .t-fam { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.const-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.const-legend .lg { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.const-legend .lg i { width: 8px; height: 8px; border-radius: 50%; }

/* trust primitives strip (BI comparison) */
.bi-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bi-cell { background: var(--surface); padding: clamp(22px, 3vw, 34px); position: relative; }
.bi-cell.hefyr { background: var(--bg-deep); }
.bi-cell .micro { margin-bottom: 16px; }
.bi-cell.hefyr .micro { color: var(--accent-bright); }
.bi-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(38px, 4vw, 54px); font-weight: 500; }
.bi-cell .bi-meta { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }

/* decision ledger — signed audit events */
.audit-ledger { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-deep); overflow: hidden; }
.audit-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); flex-wrap: wrap;
}
.audit-head .ah-note { letter-spacing: .06em; text-transform: none; color: var(--text-dim); }
.audit-rows { display: flex; flex-direction: column; }
.audit-row {
  display: grid; grid-template-columns: 92px 108px minmax(150px, 200px) 1fr auto; gap: 8px 16px;
  padding: 11px 20px; border-bottom: 1px solid var(--line); align-items: baseline;
}
.audit-row:last-child { border-bottom: 0; }
.audit-row:hover { background: var(--wash-02); }
.audit-row .au-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.audit-row .au-act {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.audit-row .au-act::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.audit-row .au-act.good { color: var(--good); } .audit-row .au-act.bad { color: var(--bad); }
.audit-row .au-act.warn { color: var(--warn); } .audit-row .au-act.info { color: var(--info); }
.audit-row .au-actor { min-width: 0; }
.audit-row .au-actor .a-name { font-family: var(--font-mono); font-size: 11.5px; color: var(--sand); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audit-row .au-actor .a-role { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); letter-spacing: .04em; }
.audit-row .au-obj { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; min-width: 0; }
.audit-row .au-obj .o-note { display: block; font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.audit-row .au-sig { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-dim); white-space: nowrap; text-align: right; line-height: 1.7; }
.audit-row .au-sig .s-ok { color: var(--good); }
@media (max-width: 900px) {
  .audit-row { grid-template-columns: 92px 1fr auto; }
  .audit-row .au-actor { grid-column: 2; } .audit-row .au-act { grid-column: 3; justify-self: end; }
  .audit-row .au-obj { grid-column: 1 / -1; } .audit-row .au-sig { display: none; }
}

/* advisor bench */
.bench-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.advisor { display: flex; flex-direction: column; gap: 14px; }
.advisor .a-mono {
  width: 46px; height: 52px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--sand);
  background: linear-gradient(160deg, var(--accent-16), transparent); border: 1px solid var(--sand-25);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.advisor .a-role { font-size: 15.5px; font-weight: 560; font-family: var(--font-display); line-height: 1.4; }
.advisor .a-scope { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: .04em; }
.advisor .a-derisk { font-size: 13px; color: var(--text-muted); padding-top: 10px; border-top: 1px solid var(--line); }
.advisor .a-derisk b { color: var(--text-dim); font-weight: 500; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 4px; }

/* stage chips */
.stage-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stage-chip {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); border: 1px solid var(--line); border-radius: 16px; padding: 6px 13px;
  display: inline-flex; gap: 8px; align-items: center;
}
.stage-chip .dot { width: 5px; height: 5px; }

/* teaser shells on index */
.teaser { position: relative; }
.teaser .fig { min-height: 420px; }
.teaser-graph { height: 460px; position: relative; }
.teaser-bench .bench-grid { grid-template-columns: 250px minmax(0, 1fr); }
@media (max-width: 820px) { .teaser-bench .bench-grid { grid-template-columns: 1fr; } }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* ── 25 · Reveal utilities ───────────────────────────────────────────── */
.rv { opacity: 0.001; transform: translateY(22px); transition: opacity var(--m-reveal) var(--ease-enter), transform var(--m-reveal) var(--ease-enter); transition-delay: var(--rv-d, 0ms); }
.rv.in { opacity: 1; transform: none; }
.rv-fade { opacity: 0.001; transition: opacity var(--m-reveal) var(--ease-enter); }
.rv-fade.in { opacity: 1; }

/* ── 26 · Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .bench-grid { grid-template-columns: 260px minmax(0, 1fr); }
  .bench-right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); position: static; min-height: 0; }
  .rcpt-scroll { position: static; overflow: visible; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 24px; align-items: start; }
  .rcpt-scroll .rcpt-head, .rcpt-scroll .rcpt-foot { grid-column: 1 / -1; position: static; }
  .twin-shell { grid-template-columns: 190px minmax(0, 1fr) 290px; }
}
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .header-cta .btn { display: none; }
  .header-cta .ghost-link { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .split.rev { grid-template-columns: 1fr; }
  .bench-cards { grid-template-columns: repeat(2, 1fr); }
  .twin-shell { grid-template-columns: minmax(0, 1fr); }
  .twin-rail { flex-direction: row; align-items: flex-start; gap: 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .twin-stats { display: none; }
  .inspector { border-left: 0; border-top: 1px solid var(--line); max-height: 420px; }
  .twin-legend { left: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sec-head { grid-template-columns: 1fr; gap: 10px; }
  .sec-num { display: flex; align-items: center; gap: 12px; padding-top: 0; }
  .sec-num::after { margin-top: 0; }
}
@media (max-width: 820px) {
  .grid-3, .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .moat-grid { grid-template-columns: 1fr; }
  .bench-grid { grid-template-columns: 1fr; }
  .bench-levers { border-right: 0; border-bottom: 1px solid var(--line); }
  .rcpt-scroll { grid-template-columns: 1fr; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-row .c-shape { border-right: 0; border-top: 1px dashed var(--line); }
  .compare-row.head { display: none; }
  .inversion-viz, .bi-strip { grid-template-columns: 1fr; }
  .arc-line { grid-template-columns: 1fr; gap: 26px; }
  .arc-line::before { display: none; }
  .hero-copy h1 { max-width: 100%; }
  .rail .r-hide-m { display: none; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4, .metric-grid, .bench-cards, .mini-metrics { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-actions .btn { width: 100%; }
  .hero-actions .btn { flex: 1; min-width: 200px; }
  .stat-card .stat-v { font-size: 44px; }
  .hex { --hs: 96px; }
  .fact-row { grid-template-columns: 1fr; gap: 4px; }
  .fact-row .f-tail { justify-content: flex-start; }
  .drawer { width: 100vw; }
}

/* ── 27 · Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  html { scroll-behavior: auto; }
  .rv, .rv-fade { opacity: 1 !important; transform: none !important; }
  .scroll-cue::after { animation: none; }
  .hero-scroll { height: auto !important; }
  .hero-stage { position: relative; top: 0; }
}

/* ── 28 · Print (investors) ──────────────────────────────────────────── */
@media print { /* print = daylight, automatically (§B2/§F3) */
  /* TOKENS-BEGIN */
  :root {
    --bg: #FCFAF4; --bg-deep: #F4EFE4; --surface: #FCFAF4; --surface-2: #F4EFE4; --surface-3: #EAE1D0;
    --line: #E2D9CB; --line-strong: #CFC3B1; --line-soft: rgba(226, 217, 203, .7);
    --text: #1A1511; --text-muted: #5A4C40; --text-dim: #75675A;
    --accent: #B85530; --accent-bright: #A34A26; --accent-deep: #9C4520;
    --accent-btn: #9C4520; --accent-ink: #FCFAF4; --sand: #7E6534;
    --good: #1A6E43; --warn: #8A5A0C; --bad: #B0372C; --info: #2A5AAA; --unknown: #675B4E;
    --page-wash: none;
  }
  /* TOKENS-END */
  body { background: var(--bg); color: var(--text); }
  body::before, .site-header, .rail, .site-footer, .cta-band, .boot, .toast-zone, .scroll-cue,
  .hero-canvas, .hero-status, .hero-hud, .hero-labels, .demo-chip, .kbd-hint, .theme-toggle, .theme-mini { display: none !important; }
  main { padding-top: 0; }
  .section { padding-block: 28px; border: 0 !important; }
  .rv, .rv-fade { opacity: 1 !important; transform: none !important; } /* reveals render final on paper */
  .fig-draw svg { opacity: 1 !important; }
  /* v5 motion grammar renders final on paper too */
  .sec-head :is(.eyebrow, .sec-num, .sub), .sec-head :is(h1, h2, h3), .sec-head :is(h1, h2, h3) .serif-a,
  [data-cascade] > *, .hex, [data-typeon] {
    opacity: 1 !important; transform: none !important; clip-path: none !important; max-width: none !important;
  }
  .card, .fig { break-inside: avoid; box-shadow: none; }
  .hero-scroll { height: auto !important; }
  .hero-stage { position: static; height: auto; min-height: 0; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 11px; color: var(--text-dim); }
  a[href]:not([href^="http"])::after { content: ''; }
}

/* ── 29 · Hero poster (SVG schematic) + hotspot dots ─────────────────── */
.hero-poster { z-index: calc(var(--z-scene) + 1); }
.hero-canvas { z-index: calc(var(--z-scene) + 2); }
.hero-veil { z-index: calc(var(--z-scene) + 3); }
.hero-poster svg .st { fill: var(--scene-steel); }
.hero-poster svg .st2 { fill: var(--scene-steel-dark); }
.hero-poster svg .ln { stroke: var(--scene-steel-mid); stroke-width: 1; fill: none; }
.hero-poster svg .win { fill: var(--scene-window-dim); }
.hero-poster.lit svg .win.on { fill: var(--scene-window); }
.hero-poster svg .s { fill: var(--scene-sensor-idle); transition: fill 700ms var(--ease); transition-delay: var(--sd, 0ms); }
.hero-poster.lit svg .s.g { fill: var(--good); } .hero-poster.lit svg .s.w { fill: var(--warn); }
.hero-poster.lit svg .s.b { fill: var(--bad); } .hero-poster.lit svg .s.u { fill: var(--unknown); }
.hero-poster svg .core { opacity: 0; transition: opacity 900ms var(--ease); }
.hero-poster.conv svg .core { opacity: 1; }
.hero-poster svg .strobe { fill: var(--scene-strobe); animation: strobe 2.4s steps(1) infinite; }
@keyframes strobe { 0%, 88% { opacity: .2 } 92%, 96% { opacity: 1 } 100% { opacity: .2 } }

.hero-hotspots { position: absolute; inset: 0; z-index: var(--z-hud); pointer-events: none; }
.hero-hotspots > * { pointer-events: auto; }
.hs-dot {
  position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%;
  border: 1px solid var(--glow-accent-70); background: transparent; cursor: pointer; padding: 0;
}
.hs-dot::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 10px var(--glow-accent-70); }
.hs-dot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--glow-accent-40); animation: hs-ping 2.6s var(--ease) infinite; }
@keyframes hs-ping { 0% { transform: scale(.6); opacity: 1 } 70%, 100% { transform: scale(1.25); opacity: 0 } }
.hs-dot:hover::before { background: var(--text); }

/* boot caret fix on captions */
[data-scene-cap] b { color: var(--sand); font-weight: 500; }

/* ── 30 · Mobile hero + rail refinements ─────────────────────────────── */
@media (max-width: 760px) {
  .hs-dot { display: none !important; }
  .hero-status { gap: 10px; }
  .hero-status .scene-caption { font-size: 9.5px; max-width: 58%; }
  .rail .r-tags { display: none; }
  .rail-in { gap: 10px; }
  .hero-copy .lead { font-size: 17px; }
}

/* ── 30 · Hero v3 — HUD chrome + projected unit labels ────────────────── */
.hero-hud {
  position: absolute; inset: 0; z-index: var(--z-hud); pointer-events: none;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  color: var(--text-dim);
}
.hero-hud::before, .hero-hud::after {
  content: ''; position: absolute; width: 18px; height: 18px; opacity: .5;
}
.hero-hud::before { left: 22px; top: 52px; border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); }
.hero-hud::after { right: 22px; bottom: 64px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.hero-hud .hud-item {
  position: absolute; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .74;
}
.hero-hud [data-hud-cam] { left: 30px; top: 58px; }
.hero-hud [data-hud-net] { right: 30px; bottom: 70px; color: var(--sand); }
@media (max-width: 760px) { .hero-hud { display: none; } }

.hero-labels { position: absolute; inset: 0; z-index: calc(var(--z-scene) + 3); pointer-events: none; overflow: hidden; }
.unit-label {
  position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity;
  transition: opacity 300ms var(--ease);
  font-family: var(--font-mono); white-space: nowrap;
  transform: translate(-200px, -200px);
}
.unit-label::before {
  content: ''; position: absolute; left: -1px; top: 100%; width: 1px; height: 22px;
  background: linear-gradient(180deg, var(--sand-55), transparent);
}
.unit-label .ul-name {
  display: block; font-size: 10px; letter-spacing: .14em; color: var(--text-muted);
  padding-left: 8px; border-left: 1px solid var(--sand-55);
  text-shadow: 0 0 6px var(--scene-void), 0 1px 3px var(--scene-void), 0 0 14px var(--scene-void); /* legible over lit geometry */
}
.unit-label .ul-meta {
  display: block; font-size: 9px; letter-spacing: .1em; color: var(--text-dim);
  padding-left: 8px; border-left: 1px solid var(--sand-25);
  text-shadow: 0 0 6px var(--scene-void), 0 1px 3px var(--scene-void), 0 0 14px var(--scene-void);
}
.hero-hud .hud-item { text-shadow: 0 0 8px var(--scene-void), 0 1px 3px var(--scene-void); }
@media (max-width: 760px) { .hero-labels { display: none; } }

.hero-bar { position: absolute; left: 0; right: 0; height: 0; background: var(--scene-under); z-index: calc(var(--z-scene) + 3); pointer-events: none; }
.hero-bar.top { top: 0; } .hero-bar.bot { bottom: 0; }

/* ═══ Twin v3 — workstation chrome (spidergraph) ═══════════════════════ */
.tw-v3 .twin-rail { overflow-y: auto; max-height: 760px; scrollbar-width: thin; gap: 18px; }
.tw-v3 .twin-canvas { min-height: 680px; }
.tw-v3.twin-shell { min-height: 680px; }
.tw-emp { color: var(--sand); }
.tw-hint { display: block; font-size: 9px; letter-spacing: .08em; color: var(--text-dim); margin-top: 1px; }
.tw-kbd-hint { float: right; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; font-size: 9px; color: var(--text-dim); }

/* search */
.tw-searchwrap { position: relative; }
.tw-search { width: 100%; height: 34px; font-family: var(--font-mono); font-size: 11.5px; padding: 0 10px; }
.tw-search-drop { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-tip); }
.tw-search-drop button { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left;
  padding: 8px 10px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.tw-search-drop button:last-child { border-bottom: 0; }
.tw-search-drop button b { font-size: 12px; color: var(--text); font-weight: 500; }
.tw-search-drop button span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.tw-search-drop button:hover, .tw-search-drop button:focus-visible { background: var(--surface-3); outline: none; }
.tw-search-none { padding: 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }

/* lens segments */
.tw-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.tw-seg button { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; padding: 5px 9px;
  background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--text-dim); cursor: pointer;
  transition: all .18s var(--ease, ease); }
.tw-seg button:hover { color: var(--text-muted); border-color: var(--line-strong); }
.tw-seg button.on { color: var(--text); border-color: var(--accent); background: var(--accent-16); }

/* type filter chips + generic chips */
.tw-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.tw-chip { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; padding: 4px 8px;
  background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--text-dim); cursor: pointer;
  transition: all .18s ease; display: inline-flex; align-items: center; gap: 5px; }
.tw-chip.on { color: var(--text-muted); border-color: var(--line-strong); background: var(--surface-2); }
.tw-chip:hover { border-color: var(--accent); color: var(--text); }
.tw-chip button { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 9px; padding: 0; }
.tw-chip button:hover { color: var(--bad); }

/* incidents rail list */
.tw-incidents { display: flex; flex-direction: column; gap: 2px; }
.tw-inc { display: grid; grid-template-columns: 34px 12px 1fr; gap: 6px; align-items: baseline;
  background: none; border: 0; border-radius: 6px; padding: 5px 6px; text-align: left; cursor: pointer;
  transition: background .15s ease; }
.tw-inc:hover { background: var(--surface-2); }
.tw-inc-time { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-dim); }
.tw-inc-dot { font-size: 8px; line-height: 1; }
.tw-inc-title { font-size: 11px; color: var(--text-muted); line-height: 1.35; }

/* HUD toolbar */
.tw-hud { position: absolute; top: 14px; left: 14px; z-index: 8; display: flex; flex-direction: column; gap: 5px; }
.tw-hud-btn { display: flex; align-items: center; gap: 7px; min-width: 34px; height: 30px; padding: 0 9px;
  background: var(--veil-75); border: 1px solid var(--line); border-radius: 8px; color: var(--text-muted);
  font-family: var(--font-mono); font-size: 11px; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: all .18s ease; }
.tw-hud-btn span { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.tw-hud-btn:hover { border-color: var(--accent); color: var(--text); }
.tw-hud-btn:hover span { color: var(--text-muted); }
.tw-hud-btn.on { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-12); }
.tw-hud-btn.on span { color: var(--accent-bright); }

/* banners over canvas */
.tw-banners { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 8;
  display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.tw-banner { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); background: var(--veil-75); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 5px 12px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tw-banner.asof { color: var(--warn); border-color: var(--warn-55); }
.tw-banner.pick { color: var(--accent-bright); border-color: var(--accent); animation: tw-pulse 1.6s infinite; }
.tw-banner button { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 10px; padding: 0 0 0 2px; }
.tw-banner button:hover { color: var(--bad); }
@keyframes tw-pulse { 0%,100% { box-shadow: 0 0 0 0 var(--glow-accent-40);} 50% { box-shadow: 0 0 0 6px transparent;} }

/* settings + keymap popovers */
.tw-settings, .tw-keymap { position: absolute; top: 14px; left: 118px; z-index: 9; width: 230px;
  background: var(--veil-92); border: 1px solid var(--line-strong); border-radius: 10px; padding: 14px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow-tip); }
.tw-set-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; margin-top: 8px; }
.tw-set-row span { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.tw-km-row { display: grid; grid-template-columns: 86px 1fr; gap: 8px; align-items: center; padding: 3px 0; }
.tw-km-row kbd { font-family: var(--font-mono); font-size: 9.5px; color: var(--sand); background: var(--surface-2);
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; text-align: center; }
.tw-km-row span { font-size: 11px; color: var(--text-muted); }

/* tour card */
.tw-tourcard { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 10;
  width: min(560px, calc(100% - 40px)); background: var(--veil-92); border: 1px solid var(--line-strong);
  border-left: 2px solid var(--accent); border-radius: 12px; padding: 16px 18px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-pop); }
.tw-tour-n { font-size: 9.5px; letter-spacing: .16em; color: var(--accent-bright); margin-bottom: 7px; }
.tw-tour-cap { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.tw-tour-cap b { color: var(--text); font-weight: 560; }
.tw-tour-btns { display: flex; gap: 8px; margin-top: 12px; }
.tw-tour-btns button { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; padding: 6px 12px;
  background: none; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text-muted); cursor: pointer; }
.tw-tour-btns button:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.tw-tour-btns button:disabled { opacity: .35; cursor: default; }
.tw-tour-btns button.primary { border-color: var(--accent); color: var(--accent-bright); }
.tw-tour-btns button[data-tour-x] { margin-left: auto; border-color: transparent; color: var(--text-dim); }

/* timebar */
.tw-timebar { position: absolute; left: 14px; right: 14px; bottom: 44px; z-index: 8;
  display: grid; grid-template-columns: 34px 74px 1fr 64px; align-items: center; gap: 10px;
  background: var(--veil-85); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tw-tb-play { width: 30px; height: 30px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line-strong);
  color: var(--accent-bright); font-size: 12px; cursor: pointer; }
.tw-tb-play:hover { border-color: var(--accent); }
.tw-tb-time { font-size: 11px; color: var(--sand); text-align: center; letter-spacing: .06em; }
.tw-tb-track { position: relative; height: 30px; }
.tw-tb-spark { position: absolute; inset: 2px 0; opacity: .8; pointer-events: none; }
.tw-tb-spark svg { width: 100%; height: 100%; }
.tw-tb-track input[type='range'] { position: absolute; inset: 0; width: 100%; margin: 0; height: 100%; background: transparent; }
.tw-tb-mark { position: absolute; top: -7px; transform: translateX(-50%); background: none; border: 0;
  font-size: 10px; cursor: pointer; z-index: 2; text-shadow: 0 0 8px var(--veil-92); transition: transform .15s ease; }
.tw-tb-mark:hover { transform: translateX(-50%) scale(1.45); }
.tw-tb-live { background: none; border: 0; font-size: 9.5px; letter-spacing: .1em; color: var(--good); cursor: pointer; text-align: right; }
.tw-tb-live.off { color: var(--text-dim); }

/* inspector extras */
.tw-lensline { margin-top: 10px; font-size: 11px; color: var(--text-dim); }
.tw-lensline b { color: var(--text); font-weight: 500; }
.tw-actions { display: flex; gap: 5px; margin-top: 14px; }
.tw-act { flex: 1; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em; padding: 7px 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; color: var(--text-muted); cursor: pointer;
  transition: all .18s ease; white-space: nowrap; }
.tw-act:hover { border-color: var(--accent); color: var(--text); }
.tw-neighbors { display: flex; flex-wrap: wrap; gap: 4px; }
.tw-inc-card { border: 1px solid var(--line-strong); border-left-width: 2px; border-radius: 9px; padding: 10px 12px; margin-bottom: 12px; background: var(--veil-55); }
.tw-inc-t { font-size: 12px; font-weight: 560; color: var(--text); display: flex; gap: 6px; align-items: baseline; }
.tw-inc-when { margin-left: auto; font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); font-weight: 400; }
.tw-inc-d { font-size: 11.5px; line-height: 1.55; color: var(--text-muted); margin-top: 6px; }
.tw-inc-jump { margin-top: 8px; background: none; border: 0; padding: 0; font-family: var(--font-mono); font-size: 10px;
  color: var(--accent-bright); cursor: pointer; letter-spacing: .04em; }
.tw-inc-jump:hover { text-decoration: underline; }

/* compare table */
.tw-cmp-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.tw-cmp { width: 100%; border-collapse: collapse; }
.tw-cmp th { font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sand); text-align: left; padding: 6px 6px 6px 0; border-bottom: 1px solid var(--line-strong); }
.tw-cmp td { font-size: 11px; color: var(--text-muted); padding: 7px 6px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tw-cmp td .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); font-size: 12px; }
.tw-cmp td .u { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); }
.tw-cmp td.na { color: var(--text-dim); }

/* path panel */
.tw-hop { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tw-hop-n { font-family: var(--font-mono); font-size: 10px; color: var(--accent-bright); border: 1px solid var(--line-strong);
  border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.tw-hop b { display: block; font-size: 12.5px; color: var(--text); font-weight: 540; }
.tw-hop-sub { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin-top: 2px; }
.tw-hop-flow { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; }

/* lens ramp legend */
.tw-ramp { width: 44px; height: 4px; border-radius: 2px; display: inline-block;
  background: linear-gradient(90deg, var(--bad), var(--unknown), var(--good)); }
.tw-ramp.rev { background: linear-gradient(90deg, var(--good), var(--unknown), var(--bad)); }

/* responsive: keep the workstation sane on tablets/phones */
@media (max-width: 1100px) {
  .tw-v3 .twin-rail { max-height: none; }
}
@media (max-width: 960px) {
  .tw-incidents-wrap { display: none; }
  .tw-v3 .twin-rail { flex-direction: row; flex-wrap: wrap; }
  .tw-searchwrap { flex: 1 1 100%; }
  .tw-hud { flex-direction: row; }
  .tw-hud-btn span { display: none; }
  .tw-settings, .tw-keymap { left: 14px; top: 52px; }
  .tw-timebar { grid-template-columns: 34px 64px 1fr; }
  .tw-tb-live { display: none; }
  .tw-tourcard { bottom: 14px; }
}

/* twin v3 — corrections */
.tw-timebar[hidden], .tw-settings[hidden], .tw-keymap[hidden], .tw-tourcard[hidden], .tw-search-drop[hidden] { display: none !important; }
.tw-v3.twin-shell { height: clamp(640px, 82vh, 830px); }
.tw-v3 .twin-rail { max-height: 100%; }
.tw-v3 .inspector { max-height: 100%; overflow: hidden; }
.tw-v3 .twin-canvas { min-height: 0; height: 100%; }
.tw-v3 .twin-legend { left: 14px; right: auto; bottom: 12px; max-width: calc(100% - 28px); }
@media (max-width: 960px) {
  .tw-v3.twin-shell { height: auto; }
  .tw-v3 .twin-canvas { min-height: 480px; height: auto; }
  .tw-v3 .inspector { max-height: 460px; }
}
@media (max-width: 960px) {
  .tw-v3 .twin-canvas .demo-chip.abs { top: 54px; }
}

/* teaser: the graph mount must fill its box (v2 left it heightless — the lib
   fell back to window height and the canvas rendered clipped) */
.teaser-graph .graph-mount { position: absolute; inset: 0; }

/* twin v3.1 — engage chip + calibration cert */
.tw-engage { position: absolute; right: 14px; bottom: 12px; z-index: 9;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em;
  color: var(--text-dim); background: var(--veil-75); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 5px 11px; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: color .2s, border-color .2s; }
.tw-engage.on { color: var(--accent-bright); border-color: var(--accent); }
.tw-engage[hidden] { display: none !important; }
.twin-canvas.tw-on .graph-mount { outline: 1px solid var(--accent-30); outline-offset: -1px; }
.tw-cert { margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; background: var(--veil-55); }
.tw-cert-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 3.5px 0; font-size: 11px; }
.tw-cert-row span:first-child { font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); padding-top: 1px; }
.tw-cert-row b { color: var(--text); font-weight: 500; font-family: var(--font-mono); font-size: 10.5px; }
.tw-cert-row .dim { color: var(--text-dim); }
.tw-v3 .twin-legend { max-width: calc(100% - 262px); }

/* ── 31 · v3 theme mechanics — crossfade, toggle, live region ─────────── */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--m-ui); animation-timing-function: var(--ease-enter); }

/* v4 · THE CROSSING — same-document MPA transitions (§D3.5). The chrome
   persists visually; the page fades through the ground. Progressive:
   non-supporting browsers navigate instantly, nothing breaks. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: hefyr-header; }
.rail { view-transition-name: hefyr-rail; }
::view-transition-group(hefyr-header), ::view-transition-group(hefyr-rail) { animation-duration: 1ms; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
.sr-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; padding: 5px 0;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); transition: color var(--m-micro) var(--ease-enter);
}
.theme-toggle:hover { color: var(--text-muted); }
.theme-toggle .tt-track {
  width: 34px; height: 18px; border-radius: 10px; border: 1px solid var(--line-strong);
  position: relative; background: var(--bg-deep); transition: background var(--m-ui) var(--ease-enter);
}
.theme-toggle .tt-knob {
  position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--text-dim); transition: left var(--m-ui) var(--ease-enter), background var(--m-ui) var(--ease-enter);
}
.theme-toggle[aria-pressed='true'] .tt-track { background: var(--accent-16); border-color: var(--accent); }
.theme-toggle[aria-pressed='true'] .tt-knob { left: 18px; background: var(--accent-bright); }
.brand .mark { width: 24px; height: 27px; flex: none; }
.site-footer .brand { display: inline-flex; margin-bottom: 14px; }
.site-footer .brand .mark { width: 21px; height: 24px; }
.f-cred { font-size: 10px; letter-spacing: .08em; color: var(--text-dim); margin-top: 14px; text-transform: uppercase; }


/* ── 32 · IGNITION hero v3 — band choreography chrome (§D3.1) ─────────── */
.hero-copy h1 .hl-line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero-copy h1 .hl-inner { display: block; will-change: transform, opacity; }
.hero-copy .eyebrow, .hero-copy .lead, .hero-copy .hero-actions { will-change: transform, opacity; }
.hero-status, .hero-hud { opacity: 0; } /* HUD enters only after the copy exits (p ≥ 0.12) */
.hero-stage.static-mode .hero-status { opacity: 1; } /* schematic mode composes statically */
/* 4-corner safe-area grid: TL caption · TR toggle · BL camera · BR sensors */
.hero-hud [data-hud-cam] { left: 30px; top: auto; bottom: 64px; }
.hero-hud::before { left: 22px; top: auto; bottom: 52px; border: 0; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.scroll-cue::after { animation-iteration-count: 3; } /* motion constitution: no perpetual loops in copy zones */
@media (prefers-reduced-motion: reduce) {
  .hero-status, .hero-hud { opacity: 1; }
  .hero-copy h1 .hl-inner, .hero-copy .eyebrow, .hero-copy .lead, .hero-copy .hero-actions { transform: none !important; opacity: 1 !important; }
}


/* ── 33 · Figure language (§E2) — one hand draws everything ───────────── */
svg .figtext { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; }
/* exhibits arrive like plotter output: strokes march in document order, fills
   and labels develop after — HEFYR.ui drives the inline dash animation (§D1
   scene band); containers only gate visibility until the observer fires */
.fig-draw:not(.in) svg { opacity: 0; }
.fig-draw.in svg { opacity: 1; transition: opacity var(--m-ui) var(--ease-enter); }
@media (prefers-reduced-motion: reduce) { .fig-draw svg { opacity: 1 !important; } }


/* inline links inside prose are distinguishable without color (axe link-in-text-block) */
p a:not(.btn):not(.link-arrow), .body-m a, .small a, .lead a {
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--accent-30); text-decoration-thickness: 1px;
}
p a:not(.btn):not(.link-arrow):hover { text-decoration-color: var(--accent-bright); }

/* ═══ 34 · MOTION v5 — "THE INSTRUMENT WAKES" ═════════════════════════════
   One grammar, site-wide: section heads arrive as masked rises under the §D1
   constitution (numeral → eyebrow → headline → serif voice → sub), exhibits
   draw themselves like plotter output, rows cascade ≤6 × 55ms, hovers stay
   ≤2px, rust marks only what is live. Initial-hidden states live inside the
   no-preference guard — reduced-motion visitors always meet composed finals. */

/* header progress hairline — the chart-recorder needle for the page */
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; z-index: 2;
  background: var(--accent); opacity: .9; transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {

  /* ── section-head choreography (reveal observer adds .in) ── */
  .sec-head .eyebrow { opacity: 0; transform: translateY(10px); transition: opacity var(--m-reveal) var(--ease-enter), transform var(--m-reveal) var(--ease-enter); }
  .sec-head .sec-num { opacity: 0; transform: translateX(-10px); transition: opacity var(--m-ui) var(--ease-enter) 40ms, transform var(--m-ui) var(--ease-enter) 40ms; }
  .sec-head .sec-num::after { transform: scaleX(0); transform-origin: 0 50%; transition: transform 640ms var(--ease-enter) 340ms; }
  .sec-head :is(h1, h2, h3) {
    opacity: 0; clip-path: inset(-6% -6% 104% -6%); transform: translateY(clamp(18px, 2.4vw, 34px));
    transition: opacity 560ms var(--ease-enter) 60ms, clip-path 860ms var(--ease-enter) 60ms, transform 860ms var(--ease-enter) 60ms;
  }
  .sec-head :is(h1, h2, h3) .serif-a { opacity: 0; transition: opacity 460ms var(--ease-enter) 430ms; }
  .sec-head .sub { opacity: 0; transform: translateY(14px); transition: opacity var(--m-reveal) var(--ease-enter) 180ms, transform var(--m-reveal) var(--ease-enter) 180ms; }
  .sec-head.in .eyebrow, .sec-head.in .sub { opacity: 1; transform: none; }
  .sec-head.in .sec-num { opacity: 1; transform: none; }
  .sec-head.in .sec-num::after { transform: none; }
  .sec-head.in :is(h1, h2, h3) { opacity: 1; clip-path: inset(-10% -8% -20% -8%); transform: none; }
  .sec-head.in :is(h1, h2, h3) .serif-a { opacity: 1; }

  /* ── cascade groups — rows arrive in file order, ≤6 × 55ms (§D1) ── */
  [data-cascade] > * {
    opacity: 0; transform: translateY(16px);
    transition: opacity var(--m-reveal) var(--ease-enter), transform var(--m-reveal) var(--ease-enter);
    transition-delay: calc(min(var(--ci, 0), 5) * var(--stagger));
  }
  [data-cascade].in > * { opacity: 1; transform: none; }

  /* ── honeycomb — cells settle in; the flagship announces itself once.
        Reveal rides an animation (backwards fill) so hover transitions stay
        instant once the cell has landed. ── */
  .hex { opacity: 0; transition: transform var(--t-fast) var(--ease); }
  .hex-grid.in .hex { opacity: 1; animation: hex-in var(--m-reveal) var(--ease-enter) var(--hx-d, 0ms) backwards; }
  .hex-grid.in .hex.flag {
    animation: hex-in var(--m-reveal) var(--ease-enter) var(--hx-d, 0ms) backwards,
               hex-flag 1400ms var(--ease) calc(var(--hx-d, 0ms) + 620ms) both;
  }

  /* ── mono type-on — instrument lines print themselves (wide viewports) ── */
  @media (min-width: 760px) {
    [data-typeon] { display: block; overflow: hidden; white-space: nowrap; max-width: 0; }
    [data-typeon].in { max-width: 100%; transition: max-width 1150ms steps(36, end) 220ms; }
    [data-typeon].in::after { content: '▎'; color: var(--accent-bright); animation: caret 1.1s steps(1) 4; }
  }

  /* ── page crossings — the room stays, the argument changes (§D3.5+) ── */
  ::view-transition-old(root) { animation: vt-leave 200ms var(--ease-exit) both; }
  ::view-transition-new(root) { animation: vt-arrive 340ms var(--ease-enter) 50ms both; }
}
@keyframes hex-in { from { opacity: 0; transform: translateY(12px); } }
/* the flagship flare rides a composited filter — box-shadow dies under the
   hex clip-path, and filter animations stay off the main thread */
@keyframes hex-flag {
  0%, 100% { filter: brightness(1); }
  35% { filter: brightness(1.4); }
}
@keyframes vt-leave { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-arrive { from { opacity: 0; transform: translateY(16px); } }

/* ── card corner ticks — the figure grammar answers the hand (hover = live) ── */
.card-hover::before, .card-hover::after {
  content: ''; position: absolute; width: 11px; height: 11px; z-index: 2; pointer-events: none;
  border: 0 solid var(--accent); opacity: 0;
  transition: opacity var(--m-micro) var(--ease), transform var(--m-micro) var(--ease);
}
.card-hover::before { top: 7px; left: 7px; border-top-width: 1px; border-left-width: 1px; transform: translate(4px, 4px); }
.card-hover::after { bottom: 7px; right: 7px; border-bottom-width: 1px; border-right-width: 1px; transform: translate(-4px, -4px); }
.card-hover:hover::before, .card-hover:hover::after,
.card-hover:focus-within::before, .card-hover:focus-within::after { opacity: .9; transform: none; }

/* ── buttons — a quiet sheen crosses the primary on hover ── */
.btn-primary {
  background-image: linear-gradient(105deg, transparent 40%, color-mix(in srgb, var(--accent-ink) 13%, transparent) 50%, transparent 60%);
  background-size: 250% 100%; background-repeat: no-repeat; background-position: 108% 0;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
              background-position 700ms var(--ease);
}
.btn-primary:hover { background-position: -8% 0; }

/* ── link-arrow — the underline draws toward the arrow ── */
.link-arrow { position: relative; }
.link-arrow::before {
  content: ''; position: absolute; left: 0; right: 24px; bottom: -3px; height: 1px;
  background: var(--accent-bright); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform var(--m-ui) var(--ease-enter);
}
.link-arrow:hover::before, .link-arrow:focus-visible::before { transform: none; }

/* ── nav — hover earns an ink tick; only the current page keeps rust ── */
.nav-links a:not([aria-current='page']) { position: relative; }
.nav-links a:not([aria-current='page'])::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 1px;
  background: var(--text-dim); opacity: .35; transform: scaleX(.55); transform-origin: 0 50%;
  transition: transform var(--m-micro) var(--ease-enter), opacity var(--m-micro) var(--ease-enter);
}
.nav-links a:not([aria-current='page']):hover::after { transform: none; opacity: .8; }

/* ── forms — the label answers focus; the field underline confirms ── */
.field label { transition: color var(--m-micro) var(--ease); }
.field:focus-within label { color: var(--sand); }
.input:focus-visible { box-shadow: 0 1px 0 0 var(--accent); }

/* verticals — the detail card re-materialises on every selection */
.vertical-detail > .card { animation: feed-in 360ms var(--ease-enter); }

/* teaser twin: the whole surface is a doorway */
.teaser-graph .graph-mount, .teaser-graph .graph-mount canvas { cursor: pointer; }

/* ═══ 35 · SIGNATURE TIER — "RE-ROUTE / INSTRUMENT HANDS" ═══════════════
   Motion only HEFYR would ship: arrivals announce their route on the
   telemetry rail while a scanline arms under the header; the night surfaces
   answer the hand with a survey crosshair; KPIs roll once and their
   confidence dots tick like watched instruments; primary actions carry a
   ≤2px magnetic pull (§D1 hover ceiling). Everything transform/opacity. */

/* re-route arrival — scanline under the header, route-trace on the rail */
.route-scan {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; z-index: 3;
  background: linear-gradient(90deg, transparent 4%, var(--accent-bright) 38%, var(--accent) 60%, transparent 96%);
  transform: translateX(-100%); pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .route-scan.play { animation: route-scan 700ms var(--ease-scrub) both; }
}
@keyframes route-scan { to { transform: translateX(100%); } }
/* (.rail is fixed — absolute children anchor to it as-is) */
.rail .rail-in { transition: opacity var(--m-micro) var(--ease); }
.rail.routing .rail-in:not(.rail-route) { opacity: 0; }
.rail-route {
  position: absolute; inset: 0; display: flex; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--text-muted);
  transition: opacity var(--m-ui) var(--ease);
}
.rail-route .ok { color: var(--good); }
.rail-route .caret {
  display: inline-block; width: 7px; height: 11px; margin-left: 2px; vertical-align: -1px;
  background: var(--accent); animation: caret 900ms steps(1) infinite;
}
.rail-route.done { opacity: 0; }

/* instrument cursor — survey hairlines + reticle over the night surfaces */
.hero-frame, .twin-canvas .graph-mount { cursor: crosshair; }
.ix-wrap {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden;
  opacity: 0; transition: opacity var(--m-ui) var(--ease);
}
.ix-wrap.on { opacity: 1; }
.ix-wrap .ix-x { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: color-mix(in srgb, var(--data-sand) 20%, transparent); }
.ix-wrap .ix-y { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: color-mix(in srgb, var(--data-sand) 20%, transparent); }
.ix-wrap .ix-ring {
  position: absolute; top: 0; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 1px solid color-mix(in srgb, var(--data-sand) 60%, transparent); border-radius: 50%;
}

/* KPI life — the dot ticks when its agent looks (transform-only pulse) */
@media (prefers-reduced-motion: no-preference) {
  .dot.tick { animation: dot-tick 900ms var(--ease); }
}
@keyframes dot-tick { 40% { transform: scale(1.5); } }

/* magnetic primaries — the button leans toward the hand, never past 2px */
.btn.mag { transform: translate(var(--mx, 0px), var(--my, 0px)); }
.btn.mag:active { transform: translate(var(--mx, 0px), var(--my, 0px)) translateY(1px); }
