/* Capital Committee — one navy ground, seven department colours, starlight for
   the Company Brain. Numbers are IBM Plex Mono with tabular figures; department
   names are Cinzel caps (from the reference map); everything else is Plex Sans. */

:root {
  --ground-0: #04050A;
  --ground-1: #07080F;
  --ground-2: #0D1018;
  --surface: #0B0D15;
  --surface-2: #11141E;
  --surface-3: #191D2A;
  --hair: #1E2330;
  --hair-2: #2E3546;
  --ink: #ECEAF6;
  --ink-2: #AEB2CE;
  --ink-3: #8D92B5;
  --star: #F4EFE3;
  --paper: #F5F4FA;
  --paper-ink: #1F2339;
  --input: #93B6F7;          /* financial-model convention: inputs in blue */

  --good: #62C295; --warn: #DDA946; --bad: #E8705F;

  --finance: #B08A1A; --strategy: #5A8BE8; --legal: #E0634C; --operations: #2A9DAD;
  --marketing: #A274E6; --esg: #389F62; --hr: #D8649F;
  --t-low: #2A9DAD; --t-high: #D4704F;

  /* Portfolio type system (shared with TENDRA-H1): Sora display, Manrope body,
     JetBrains Mono figures. Cinzel survives only as the boardroom "engraving"
     on department labels and the Brain's ruling. */
  --display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --engrave: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', Georgia, serif;
  --sans: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Named palette */
  --void: #050506;
  --boardroom: #0E0E11;
  --paper: #F3F3F4;
  --ledger-gold: #D9A93A;
  --signal-blue: #4F7BFF;
  --brain-violet: #8A5CFF;
  --brain-pink: #FF4FD8;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* minor-third scale on a 15px base */
  --fs-xs: 12px; --fs-s: 13.5px; --fs-m: 15px; --fs-l: 18px; --fs-xl: 21.6px; --fs-2xl: 26px; --fs-3xl: 31px; --fs-4xl: 37px;
  --r-s: 3px; --r-m: 8px; --r-l: 14px;
  --gutter: clamp(16px, 3vw, 36px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
/* The full-bleed hero uses 100vw, which is wider than the content box when a
   scrollbar is present; clip keeps that from creating a sideways scroll. */
html, body { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 var(--fs-m)/1.55 var(--sans);
  color: var(--ink);
  background: #000 radial-gradient(ellipse 70% 55% at 50% 12%, #10131f 0%, #06070d 55%, #000 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--hair-2); }
a:hover { text-decoration-color: var(--ink-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--star); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--paper-ink); padding: 8px 12px; border-radius: var(--r-s); z-index: 50; }
.skip:focus { left: 8px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-family: var(--mono); font-size: .92em; color: var(--ink-2); }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; }

/* ---------------------------------------------------------------- top bar */
/* Floating glass nav: sits over the rounded hero panel, stays with you on scroll */
.topbar {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 40;
  width: min(1400px, calc(100% - 24px));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 9px 14px 9px 18px; border-radius: 999px;
  background: rgba(8, 8, 11, .62);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 40px -20px rgba(0, 0, 0, .85);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark { width: 30px; height: 30px; flex: none; fill: var(--ink); stroke: var(--ink); stroke-width: .9; }
.brand-mark path { fill: none; opacity: .55; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: .08em; white-space: nowrap; }
.brand-sub { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modes {
  display: flex; gap: 2px; padding: 3px; border-radius: 9px;
  background: color-mix(in srgb, var(--ground-0) 80%, transparent); border: 1px solid var(--hair);
}
.modes a {
  padding: 6px 14px; border-radius: 6px; text-decoration: none;
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}
.modes a:hover { color: var(--ink); }
.modes a[aria-current="page"] { background: #D8D5E6; color: var(--ground-1); }
.status { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.live-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.live-badge[data-state="live"] .dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.live-badge[data-state="demo"] .dot { background: var(--warn); }
.tier select {
  appearance: none; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23AEB2CE' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid var(--hair); border-radius: 6px; padding: 5px 28px 5px 10px; font-size: var(--fs-xs); color: var(--ink);
}
.session-cost { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }

main { padding: 0; }
.app-view { padding: calc(var(--topbar-h, 80px) + 18px) var(--gutter) 40px; max-width: 1480px; margin: 0 auto; }
.view { animation: none; }

/* ------------------------------------------------------------- ask bar */
.ask {
  display: flex; align-items: flex-end; gap: 8px; max-width: 980px; margin: 0 auto;
  background: var(--paper); color: var(--paper-ink); border-radius: var(--r-l); padding: 8px 8px 8px 20px;
  box-shadow: 0 10px 40px -18px rgba(8, 10, 24, .7);
}
.ask textarea {
  flex: 1; border: 0; background: transparent; resize: none; color: var(--paper-ink);
  font-size: var(--fs-l); line-height: 1.45; padding: 9px 0; min-height: 44px; max-height: 180px; outline: none;
  overflow-y: auto; scrollbar-width: thin;
}
.ask textarea:placeholder-shown { overflow: hidden; }
.bc-hinge-quick { display: none; margin: 10px 0 0; color: var(--ink-2); font-size: var(--fs-s); }
.bc-hinge-quick b { color: var(--ink); font-weight: 600; }
.brain-card.quick .bc-hinge-quick { display: block; }
.ask textarea::placeholder { color: #6A6F8C; }
.ask:focus-within { box-shadow: 0 0 0 2px var(--star), 0 10px 40px -18px rgba(8, 10, 24, .7); }
.ask-ghost, .ask-go { border: 0; border-radius: 9px; padding: 11px 16px; font-weight: 500; white-space: nowrap; }
.ask-ghost { background: transparent; color: #4A4F6C; }
.ask-ghost:hover { background: #E7E5F0; }
.ask-go { background: var(--ground-1); color: var(--ink); }
.ask-go:hover { background: var(--surface-3); }
.ask-go:disabled { opacity: .55; cursor: progress; }
.context-panel { max-width: 980px; margin: 10px auto 0; display: grid; gap: 6px; }
.context-panel label { font-size: var(--fs-s); color: var(--ink-2); }
.context-panel textarea, .field {
  width: 100%; background: var(--surface-2); border: 1px solid var(--hair); border-radius: var(--r-m);
  padding: 10px 12px; color: var(--ink); resize: vertical; line-height: 1.5;
}
.pack-chip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-s); color: var(--ink-2);
  border: 1px solid var(--hair); border-left: 3px solid var(--input); border-radius: var(--r-s); padding: 8px 12px; background: var(--surface);
}
.pack-chip strong { color: var(--ink); font-weight: 500; }
.samples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 1080px; margin: 14px auto 0; }
.sample-chip {
  border: 1px solid var(--hair); background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink-2);
  border-radius: 999px; padding: 6px 13px; font-size: var(--fs-s);
}
.sample-chip:hover { color: var(--ink); border-color: var(--hair-2); }
.sample-chip .rec { color: var(--warn); margin-left: 6px; font-size: 11px; }

/* ------------------------------------------------------------- stage */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; margin-top: 10px; }
.map-wrap { position: relative; }
#constellation { display: block; width: 100%; height: auto; max-width: 100%; aspect-ratio: 1200 / 1040; overflow: visible; }
.map-caption { text-align: center; margin: -6px 0 0; min-height: 1.5em; color: var(--ink-2); font-size: var(--fs-s); }
.map-tip {
  position: absolute; z-index: 5; max-width: 300px; pointer-events: none;
  background: var(--surface-2); border: 1px solid var(--hair-2); border-radius: var(--r-m); padding: 10px 12px;
  font-size: var(--fs-s); line-height: 1.45; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .6);
}
.map-tip b { display: block; font-weight: 600; margin-bottom: 2px; }
.map-tip .tip-stance { color: var(--ink-2); font-size: var(--fs-xs); }

/* constellation marks */
.c-link { stroke-width: 1.3; stroke-dasharray: 1.5 7; stroke-linecap: round; opacity: .5; }
.c-link[data-state="pending"] { opacity: .9; animation: flow 1.1s linear infinite; }
.c-link[data-state="done"] { opacity: .85; stroke-dasharray: none; stroke-width: 1.2; }
.c-link[data-state="done"][data-stance="oppose"] { stroke-dasharray: 10 8; opacity: .6; }
.c-link[data-state="off"], .c-link[data-state="error"] { opacity: .12; }
@keyframes flow { to { stroke-dashoffset: -17; } }

.br-line { stroke: #C9CCE2; stroke-width: 1.35; opacity: .42; transition: opacity .6s; }
.br-star { fill: #F1EFF8; }
.br-small { fill: #D9DAEA; }
.br-hollow { fill: var(--surface); stroke: #C9CCE2; stroke-width: 1.4; }
.c-branch .br-dot { opacity: .7; transition: opacity .6s; }
.c-branch.lit .br-line { opacity: .95; }
.c-branch.lit .br-dot { opacity: 1; }
.c-branch-set[data-state="off"] { opacity: .16; }
.c-branch-set[data-state="pending"] .br-dot { animation: twinkle 1.6s ease-in-out infinite; }

.c-hub { cursor: pointer; outline: none; }
.hub-hit { fill: transparent; }
.hub-halo { fill: none; stroke-width: 1.2; opacity: .35; }
.hub-ring { fill: var(--surface); stroke-width: 2; }
.c-hub:hover .hub-halo, .c-hub:focus-visible .hub-halo { opacity: .9; stroke-width: 2; }
.c-hub:focus-visible .hub-ring { stroke: var(--star); }
.c-hub[data-state="pending"] .hub-halo { animation: pulse 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.c-hub[data-state="off"] { opacity: .3; }
.c-hub[data-state="error"] .hub-ring { stroke-dasharray: 4 4; }
.hub-badge { display: none; }
.c-hub[data-state="done"] .hub-badge { display: inline; }
.hub-badge circle { fill: var(--ground-0); stroke: var(--ink); stroke-width: 1.3; }
.hub-badge path { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-hub[data-stance="conditional"] .hub-badge path { fill: var(--ink); stroke: none; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(1); } 50% { opacity: .95; transform: scale(1.12); } }
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.lab-name { font-family: var(--display); font-weight: 600; font-size: 31px; letter-spacing: .16em; fill: var(--ink); text-anchor: middle; }
.lab-sub { font-family: var(--sans); font-size: 18px; fill: var(--ink-2); text-anchor: middle; letter-spacing: .02em; }
.c-label[data-state="off"] { opacity: .35; }
.c-label[data-state="done"] .lab-sub { fill: var(--ink); }

.brain-ray { stroke: var(--star); stroke-width: .6; opacity: .26; }
.brain-core { transform-origin: 600px 500px; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.brain-core .twinkle { animation: twinkle 3.2s ease-in-out infinite; }
.c-brain[data-state="thinking"] .brain-core { transform: scale(.84); }
.c-brain[data-state="thinking"] .brain-core .twinkle { animation-duration: .9s; }
.brain-ring { fill: none; stroke: var(--star); stroke-width: 1.2; opacity: 0; transition: opacity .8s; }
.c-brain[data-state="thinking"] .brain-ring { opacity: .35; stroke-dasharray: 3 9; animation: flow 2s linear infinite; }
.brain-ring[data-tone="good"] { stroke: var(--good); opacity: .8; }
.brain-ring[data-tone="warn"] { stroke: var(--warn); opacity: .8; }
.brain-ring[data-tone="bad"] { stroke: var(--bad); opacity: .8; }
.c-stamp[data-state="off"] { display: none; }
.stamp-bg { fill: rgba(29, 33, 54, .9); stroke: var(--star); stroke-width: 1.2; }
.stamp-text { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: .12em; fill: var(--star); text-anchor: middle; }
.conf-arc { fill: none; stroke: var(--star); stroke-width: 1.8; opacity: .85; }
.conf-mid { fill: var(--ground-0); stroke: var(--star); stroke-width: 1.5; }
.dim { opacity: .18 !important; transition: opacity .4s; }

/* ------------------------------------------------------------- rail */
.rail { display: grid; gap: 14px; position: sticky; top: 84px; }
.rail-block { background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--hair); border-radius: var(--r-m); padding: 14px 14px 12px; }
.rail-block h2 { font-size: var(--fs-s); font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.rail-head { display: flex; justify-content: space-between; align-items: baseline; }
.link-btn { background: none; border: 0; color: var(--ink-3); font-size: var(--fs-xs); padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }
.culture { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.culture button {
  border: 1px solid var(--hair); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 4px 10px; font-size: var(--fs-xs);
}
.culture button[aria-checked="true"] { background: var(--ink); color: var(--ground-1); border-color: var(--ink); }
.weights { display: grid; gap: 7px; }
.w-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) 84px 36px; align-items: center; gap: 8px; font-size: var(--fs-s); }
.w-row input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--dc); }
.w-name { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-name .dept-icon { flex: none; }
.w-row.off .w-name, .w-row.off output { opacity: .4; }
.w-row output { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--dc, var(--ink)); height: 18px; margin: 0; }

.gauge { position: relative; height: 50px; }
.g-track { position: absolute; left: 0; right: 0; top: 14px; height: 8px; border-radius: 4px; display: flex; overflow: hidden; gap: 2px; }
.g-zone { height: 100%; }
.g-zero { position: absolute; left: 50%; top: 8px; width: 1px; height: 20px; background: var(--ink-2); }
.g-marker { position: absolute; top: 4px; width: 0; height: 0; transform: translateX(-6px); border: 6px solid transparent; border-top: 8px solid var(--star); transition: left .35s cubic-bezier(.2, .7, .2, 1); }
.g-ticks { position: absolute; left: 0; right: 0; top: 30px; display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.gauge[data-empty="true"] .g-marker { display: none; }
.gauge[data-empty="true"] .g-track { opacity: .35; }
.lean-text { margin: 6px 0 0; font-size: var(--fs-s); color: var(--ink-2); }
.lean-text strong { color: var(--ink); font-weight: 600; }
.run-estimate { margin: 0; font-size: var(--fs-s); color: var(--ink-2); }
.run-estimate .num { color: var(--ink); }

/* ------------------------------------------------------------- board */
.board-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 26px 0 16px; padding-top: 18px; border-top: 1px solid var(--hair); }
.bar-spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--hair); border-radius: 8px; padding: 2px; background: var(--ground-0); }
.seg button { background: transparent; border: 0; color: var(--ink-2); padding: 6px 12px; border-radius: 6px; font-size: var(--fs-s); }
.seg button[aria-checked="true"] { background: var(--surface-3); color: var(--ink); }
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: var(--fs-s); color: var(--ink-2); cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 34px; height: 20px; margin: 0; cursor: pointer; }
.switch-track { width: 34px; height: 20px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--hair-2); position: relative; transition: background .2s; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-2); transition: transform .2s; }
.switch input:checked + .switch-track { background: var(--star); }
.switch input:checked + .switch-track::after { transform: translateX(14px); background: var(--ground-1); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--star); outline-offset: 2px; }
.btn { border-radius: 7px; padding: 8px 14px; font-size: var(--fs-s); font-weight: 500; border: 1px solid var(--hair-2); background: var(--surface-2); color: var(--ink); }
.btn:hover { background: var(--surface-3); }
.btn-primary { background: var(--ink); color: var(--ground-1); border-color: var(--ink); }
.btn-primary:hover { background: var(--star); }
.btn-quiet { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.stale-note {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--hair)); border-radius: var(--r-m); padding: 10px 14px; font-size: var(--fs-s); color: var(--ink-2);
}
.stale-note strong { color: var(--ink); }

/* The Company Brain: the synthesising layer, not an eighth voice. */
.brain-card {
  position: relative; margin-bottom: 22px; padding: 26px clamp(18px, 3vw, 34px) 28px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--star) 7%, var(--surface)) 0%, var(--surface) 60%);
  border: 1px solid var(--star); border-radius: var(--r-l);
  box-shadow: inset 0 0 0 5px var(--surface), inset 0 0 0 6px color-mix(in srgb, var(--star) 45%, transparent), 0 24px 60px -30px rgba(0, 0, 0, .7);
}
.bc-top { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.bc-kicker { font-family: var(--display); font-size: 14px; letter-spacing: .2em; color: var(--ink-2); margin-bottom: 6px; }
.bc-decision { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 4vw, 40px); letter-spacing: .06em; line-height: 1.1; color: var(--star); }
.bc-decision[data-tone="good"] { text-shadow: 0 0 24px color-mix(in srgb, var(--good) 35%, transparent); }
.bc-decision[data-tone="bad"] { text-shadow: 0 0 24px color-mix(in srgb, var(--bad) 35%, transparent); }
.bc-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--hair-2); border-radius: 999px; padding: 3px 10px; font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.chip b { color: var(--ink); font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tone-good { color: var(--good); } .tone-warn { color: var(--warn); } .tone-bad { color: var(--bad); }
.bc-headline { font-size: var(--fs-xl); line-height: 1.4; margin: 14px 0 4px; max-width: 62ch; color: var(--ink); }
.bc-rationale { color: var(--ink-2); max-width: 75ch; margin: 6px 0 0; }
.bc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px 32px; margin-top: 24px; }
.bc-sec h3 { font-size: var(--fs-s); font-weight: 600; color: var(--ink); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); }
.bc-sec ul, .bc-sec ol { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: var(--fs-s); }
.bc-sec li { margin: 4px 0; }
.bc-sec p { margin: 0; color: var(--ink-2); font-size: var(--fs-s); }
.hinge { grid-column: 1 / -1; border: 1px solid var(--hair-2); border-radius: var(--r-m); padding: 16px 18px; background: color-mix(in srgb, var(--ground-0) 45%, transparent); }
.hinge-title { font-size: var(--fs-l); font-weight: 600; margin: 2px 0 12px; }
.hinge-label { font-size: var(--fs-xs); color: var(--ink-3); }
.hinge-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.hinge-side { border-left: 2px solid var(--hair-2); padding: 2px 0 2px 12px; font-size: var(--fs-s); color: var(--ink); }
.hinge-vs { align-self: center; font-family: var(--display); color: var(--ink-3); font-size: 14px; letter-spacing: .1em; }
.hinge-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; font-size: var(--fs-s); color: var(--ink-2); }
.hinge-foot b { color: var(--ink); font-weight: 600; display: block; font-size: var(--fs-xs); margin-bottom: 2px; }
.disagree { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.disagree li { border-left: 2px solid var(--star); padding: 2px 0 2px 10px; margin: 0 !important; }
.disagree .pair { display: flex; gap: 6px; align-items: center; color: var(--ink); font-weight: 500; }
.dept-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.cond-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.cond-table th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: var(--fs-xs); padding: 4px 8px 6px 0; border-bottom: 1px solid var(--hair); }
.cond-table td { padding: 7px 8px 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--hair) 55%, transparent); color: var(--ink-2); vertical-align: top; }
.cond-table td:first-child { color: var(--ink); }
.bc-foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: var(--fs-xs); color: var(--ink-3); font-family: var(--mono); }
.brain-card.pending .bc-decision { color: var(--ink-3); }
.brain-card.quick .bc-grid { display: none; }

.your-call {
  margin: -8px 0 22px; border: 1px dashed color-mix(in srgb, var(--star) 55%, transparent); border-radius: var(--r-m);
  padding: 16px 18px; background: color-mix(in srgb, var(--star) 4%, transparent);
}
.your-call h3 { font-size: var(--fs-m); margin-bottom: 4px; }
.your-call > p { margin: 0 0 12px; color: var(--ink-2); font-size: var(--fs-s); }
.yc-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yc-opt {
  text-align: left; border: 1px solid var(--hair-2); background: var(--surface); border-radius: var(--r-m); padding: 12px 14px; color: var(--ink); font-size: var(--fs-s); line-height: 1.45;
}
.yc-opt:hover { border-color: var(--star); }
.yc-opt[aria-pressed="true"] { border-color: var(--star); box-shadow: inset 0 0 0 1px var(--star); }
.yc-opt small { display: block; color: var(--ink-3); margin-bottom: 4px; }
.yc-result { margin-top: 10px; font-size: var(--fs-s); color: var(--ink-2); }

.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.dept-card {
  --dc: var(--ink-3);
  background: var(--surface); border: 1px solid var(--hair); border-top: 3px solid var(--dc); border-radius: var(--r-m);
  padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 90px;
}
.dept-card.flash { box-shadow: 0 0 0 2px var(--dc); transition: box-shadow .3s; }
.dc-head { display: flex; align-items: center; gap: 8px; }
.dc-name { font-weight: 600; font-size: var(--fs-m); }
.stance {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600;
  border-radius: 999px; padding: 3px 10px 3px 8px; border: 1px solid var(--hair-2); text-transform: capitalize;
}
.stance svg { width: 12px; height: 12px; }
.stance[data-s="support"] { border-color: color-mix(in srgb, var(--good) 60%, transparent); }
.stance[data-s="oppose"] { border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.stance[data-s="conditional"] { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.conf { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: var(--fs-xs); color: var(--ink-3); }
.conf-bar { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.conf-bar i { display: block; height: 100%; background: var(--dc); border-radius: 0 2px 2px 0; }
.dc-headline { font-size: var(--fs-m); line-height: 1.45; color: var(--ink); margin: 0; }
.dc-reasons { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: var(--fs-s); }
.dc-reasons li { margin: 3px 0; }
.risk { border: 1px solid var(--hair); border-radius: var(--r-s); padding: 8px 10px; font-size: var(--fs-s); background: color-mix(in srgb, var(--ground-0) 35%, transparent); }
.risk-title { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.sev { font-size: 11px; font-weight: 600; border-radius: 3px; padding: 1px 6px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.sev-high { background: color-mix(in srgb, var(--bad) 22%, transparent); color: #FFB4A8; }
.sev-med { background: color-mix(in srgb, var(--warn) 20%, transparent); color: #F4D08A; }
.sev-low { background: var(--surface-3); color: var(--ink-2); }
.risk p { margin: 4px 0 0; color: var(--ink-2); }
.red-line { color: #FFB4A8; font-size: var(--fs-xs); font-weight: 600; }
.dc-conds { font-size: var(--fs-s); color: var(--ink-2); }
.dc-conds b { color: var(--ink); font-weight: 500; font-size: var(--fs-xs); }
.dc-conds ul { margin: 4px 0 0; padding-left: 18px; }
.dc-metric { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-top: 1px solid var(--hair); padding-top: 8px; font-size: var(--fs-s); }
.dc-metric span { color: var(--ink-3); }
.dc-metric b { font-family: var(--mono); font-weight: 500; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.dc-assume { font-size: var(--fs-xs); color: var(--ink-3); margin: 0; }
.dc-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.dc-clash { font-size: var(--fs-s); border-left: 2px solid var(--star); padding-left: 10px; color: var(--ink); }
.dept-card.pending { opacity: .85; }
.dept-card.pending .dc-headline { color: var(--ink-3); }
.pending-bar { height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--dc), transparent) 0 0 / 40% 100% no-repeat, var(--surface-3); animation: slide 1.3s linear infinite; }
@keyframes slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.aligned-note { grid-column: 1 / -1; font-size: var(--fs-s); color: var(--ink-3); border: 1px dashed var(--hair); border-radius: var(--r-m); padding: 10px 14px; }
.quick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; grid-column: 1 / -1; border: 1px solid var(--hair); border-radius: var(--r-m); background: var(--surface); }
.quick-list li { display: grid; grid-template-columns: 190px 110px 1fr; gap: 14px; align-items: baseline; padding: 11px 16px; border-bottom: 1px solid color-mix(in srgb, var(--hair) 60%, transparent); font-size: var(--fs-s); }
.quick-list li:last-child { border-bottom: 0; }
.quick-list .q-name { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.quick-list .q-stance { color: var(--ink-2); text-transform: capitalize; font-family: var(--mono); font-size: var(--fs-xs); }
.quick-list .q-line { color: var(--ink); }

.sim-history { margin-top: 38px; }
.sim-history h2 { font-size: var(--fs-s); color: var(--ink-2); font-weight: 600; margin-bottom: 8px; }
.sim-history-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.sim-history-list li { border-bottom: 1px solid var(--hair); }
.sim-history-list button { width: 100%; display: grid; grid-template-columns: 110px 1fr 150px 70px; gap: 14px; text-align: left; background: none; border: 0; padding: 9px 4px; font-size: var(--fs-s); color: var(--ink-2); }
.sim-history-list button:hover { background: var(--surface); color: var(--ink); }
.sim-history-list .h-dec { color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sim-history-list .empty { padding: 12px 4px; color: var(--ink-3); font-size: var(--fs-s); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: min(560px, calc(100vw - 32px));
  background: var(--paper); color: var(--paper-ink); padding: 10px 16px; border-radius: var(--r-m); font-size: var(--fs-s); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
}
.foot { padding: 20px var(--gutter) 34px; max-width: 1480px; margin: 0 auto; font-size: var(--fs-xs); color: var(--ink-3); border-top: 1px solid var(--hair); }
.foot p { margin: 0; max-width: 90ch; }

/* ------------------------------------------------------------- calculator */
.calc { display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); gap: 28px; align-items: start; }
.calc > *, .two-col > *, .prac > *, .stage > *, .exhibit { min-width: 0; }
.calc-top { grid-column: 1 / -1; display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.preset-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-tabs button { border: 1px solid var(--hair); background: transparent; color: var(--ink-2); border-radius: 7px; padding: 7px 12px; font-size: var(--fs-s); text-align: left; }
.preset-tabs button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); border-color: var(--hair-2); }
.calc-top .btn { margin-left: auto; }
.exhibit-head { grid-column: 1 / -1; border-bottom: 1px solid var(--hair); padding-bottom: 14px; }
.exhibit-no { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-3); }
.action-title { font-size: var(--fs-2xl); line-height: 1.3; font-weight: 500; margin: 4px 0 6px; max-width: 58ch; }
.exhibit-sub { color: var(--ink-2); font-size: var(--fs-s); margin: 0; }
.sheet { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-m); overflow: hidden; }
.sheet h2 { font-size: var(--fs-s); font-weight: 600; padding: 12px 14px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.sheet h2 small { color: var(--ink-3); font-weight: 400; font-size: var(--fs-xs); }
.sheet-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.sheet-table th { text-align: left; font-weight: 400; color: var(--ink-2); padding: 5px 8px 5px 14px; border-top: 1px solid color-mix(in srgb, var(--hair) 70%, transparent); }
.sheet-table td { border-top: 1px solid color-mix(in srgb, var(--hair) 70%, transparent); padding: 3px 8px; }
.sheet-table td.unit { color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; padding-right: 14px; }
.sheet-table .grp th { color: var(--ink-3); font-size: var(--fs-xs); padding-top: 10px; background: color-mix(in srgb, var(--ground-0) 35%, transparent); }
.cell-input {
  width: 100%; min-width: 0; text-align: right; background: transparent; border: 1px solid transparent; border-radius: 3px;
  padding: 4px 6px; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--input); font-size: var(--fs-s);
}
.cell-input:hover { border-color: var(--hair-2); }
.cell-input:focus { border-color: var(--input); outline: none; background: var(--ground-0); }
.sheet-note { font-size: var(--fs-xs); color: var(--ink-3); padding: 10px 14px 12px; margin: 0; border-top: 1px solid var(--hair); }
.sheet-note .blue { color: var(--input); font-family: var(--mono); }
.wacc { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-m); padding: 14px 16px; margin-bottom: 16px; }
.wacc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wacc-row h2 { font-size: var(--fs-s); font-weight: 600; }
.wacc-val { font-family: var(--mono); font-size: var(--fs-xl); color: var(--input); font-variant-numeric: tabular-nums; }
.wacc input[type="range"] { --dc: var(--input); margin-top: 8px; }
.wacc-bands { position: relative; height: 34px; margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.wacc-band { position: absolute; top: 0; height: 5px; border-radius: 3px; background: var(--hair-2); }
.wacc-band:hover { background: var(--ink-3); }
.wacc-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 12px; }
.wacc select { margin-top: 4px; width: 100%; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); border: 1px solid var(--hair); border-radius: var(--r-m); background: var(--surface); overflow: hidden; margin-bottom: 16px; }
.kpi { padding: 12px 14px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 0 -1px -1px 0; }
.kpi-label { font-size: var(--fs-xs); color: var(--ink-3); }
.kpi-value { font-size: var(--fs-2xl); font-weight: 500; line-height: 1.2; margin-top: 2px; }
.kpi-value.pos { color: var(--ink); }
.kpi-value.neg { color: #FFB4A8; }
.kpi-note { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.exhibit { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-m); padding: 16px 18px 12px; margin-bottom: 16px; }
.ex-no { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.ex-title { font-size: var(--fs-l); font-weight: 500; margin: 2px 0 2px; line-height: 1.35; }
.ex-sub { font-size: var(--fs-s); color: var(--ink-2); margin: 0 0 10px; }
.ex-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-2); margin-bottom: 6px; }
.ex-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -2px; margin-right: 6px; }
.ex-foot { border-top: 1px solid var(--hair); margin-top: 10px; padding-top: 8px; font-size: 11.5px; color: var(--ink-3); display: grid; gap: 2px; }
.chart-svg { display: block; width: 100%; height: auto; max-width: 100%; overflow: visible; }
.tn-label { font-family: var(--sans); font-size: 12.5px; fill: var(--ink); }
.tn-range { font-family: var(--mono); font-size: 10.5px; fill: var(--ink-3); }
.tn-val { font-family: var(--mono); font-size: 11px; fill: var(--ink-2); }
.tn-axis { font-family: var(--mono); font-size: 10.5px; fill: var(--ink-3); }
.tn-grid { stroke: var(--hair); stroke-width: 1; }
.tn-base { stroke: var(--star); stroke-width: 1.5; }
.tn-zero { stroke: var(--bad); stroke-width: 1; opacity: .8; }
.tn-zero-label { font-family: var(--mono); font-size: 10.5px; fill: #FFB4A8; }
.tn-row:hover .tn-hit { fill: color-mix(in srgb, var(--star) 6%, transparent); }
.tn-hit { fill: transparent; }
.tn-be { fill: var(--ground-0); stroke: #FFB4A8; stroke-width: 1.4; }
.chart-tip { position: fixed; z-index: 70; pointer-events: none; background: var(--surface-2); border: 1px solid var(--hair-2); border-radius: 6px; padding: 8px 10px; font-size: var(--fs-xs); line-height: 1.5; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); }
.chart-tip b { font-family: var(--mono); font-weight: 500; }
.be-table, .cf-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.be-table th, .cf-table th { text-align: left; font-weight: 500; font-size: var(--fs-xs); color: var(--ink-3); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--hair); }
.be-table td { padding: 6px 10px 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--hair) 55%, transparent); }
.be-table td.num, .be-table th.num { text-align: right; }
.scroll-x { overflow-x: auto; }
.cf-table { font-size: 12px; min-width: 760px; }
.cf-table th, .cf-table td { padding: 5px 8px; white-space: nowrap; }
.cf-table td { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; border-bottom: 1px solid color-mix(in srgb, var(--hair) 50%, transparent); color: var(--ink-2); }
.cf-table th[scope="row"] { position: sticky; left: 0; background: var(--surface); color: var(--ink-2); font-family: var(--sans); font-weight: 400; font-size: 12px; }
.cf-table tr.total td, .cf-table tr.total th { color: var(--ink); font-weight: 500; border-top: 1px solid var(--hair-2); }
.cf-table td.neg { color: #FFB4A8; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.warn-line { font-size: var(--fs-xs); color: var(--warn); margin: 6px 0 0; }

/* ------------------------------------------------------------- practice */
.prac { display: grid; grid-template-columns: 270px minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-m); padding: 14px; }
.panel + .panel { margin-top: 14px; }
.panel h2 { font-size: var(--fs-s); font-weight: 600; margin-bottom: 10px; }
.filters { display: grid; gap: 10px; }
.filters .seg { width: 100%; }
.filters .seg button { flex: 1; }
.filters select { width: 100%; }
.case-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; max-height: 62vh; overflow: auto; }
.case-item { width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: 8px 9px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; color: var(--ink-2); }
.case-item:hover { background: var(--surface-2); color: var(--ink); }
.case-item[aria-current="true"] { background: var(--surface-3); color: var(--ink); }
.case-item .ci-title { font-size: var(--fs-s); font-weight: 500; color: var(--ink); }
.case-item .ci-meta { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-3); }
.case-item .ci-done { font-family: var(--mono); font-size: 11px; color: var(--good); }
.case-main { min-width: 0; }
.case-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.case-head h2 { font-size: var(--fs-3xl); font-weight: 500; line-height: 1.2; }
.case-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.timer { margin-left: auto; font-family: var(--mono); font-size: var(--fs-xl); color: var(--ink); display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.timer.over { color: var(--warn); }
.prompt-card { margin: 18px 0; padding: 18px 20px; border-left: 3px solid var(--star); background: color-mix(in srgb, var(--star) 5%, var(--surface)); border-radius: 0 var(--r-m) var(--r-m) 0; font-size: var(--fs-l); line-height: 1.6; max-width: 72ch; }
.prompt-card .who { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 6px; }
.prompt-card p { margin: 0; }
.exhibits { display: grid; gap: 8px; margin-bottom: 18px; }
.exhibits-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.exhibits-head h3 { font-size: var(--fs-m); }
.exhibits-head small { color: var(--ink-3); font-size: var(--fs-xs); }
.ex-item { border: 1px solid var(--hair); border-radius: var(--r-m); background: var(--surface); }
.ex-item > button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 14px; color: var(--ink-2); font-size: var(--fs-s); display: flex; gap: 10px; }
.ex-item > button:hover { color: var(--ink); }
.ex-item .ex-body { padding: 4px 14px 12px; font-size: var(--fs-s); color: var(--ink); }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 4px 0 8px; padding-left: 20px; }
.md li { margin: 3px 0; }
.md-table { overflow-x: auto; margin: 4px 0 8px; }
.md table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.md th { text-align: left; color: var(--ink-3); font-weight: 500; padding: 5px 12px 5px 0; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.md td { padding: 5px 12px 5px 0; border-bottom: 1px solid color-mix(in srgb, var(--hair) 55%, transparent); }
.md td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.md strong { color: var(--ink); font-weight: 600; }
.work { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.work label { display: grid; gap: 6px; font-size: var(--fs-s); color: var(--ink-2); }
.work textarea { min-height: 230px; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.case-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.hint-box { border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--hair)); border-radius: var(--r-m); padding: 10px 14px; font-size: var(--fs-s); color: var(--ink); background: color-mix(in srgb, var(--warn) 6%, transparent); }
.hint-box b { color: var(--warn); font-weight: 600; }
.reveal { margin-top: 22px; display: grid; gap: 16px; }
.reveal h3 { font-size: var(--fs-m); margin-bottom: 8px; }
.tree ul { list-style: none; margin: 0; padding-left: 20px; position: relative; }
.tree > ul { padding-left: 0; }
.tree li { position: relative; padding: 4px 0 4px 16px; font-size: var(--fs-s); }
.tree ul ul li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--hair-2); }
.tree ul ul li:last-child::before { bottom: calc(100% - 15px); }
.tree ul ul li::after { content: ""; position: absolute; left: 0; top: 15px; width: 11px; border-top: 1px solid var(--hair-2); }
.tree > ul > li { padding-left: 0; font-weight: 600; }
.tree > ul > li li { font-weight: 400; color: var(--ink-2); }
.answer-line { font-size: var(--fs-l); border-left: 3px solid var(--good); padding-left: 12px; }
.synthesis { font-size: var(--fs-l); line-height: 1.55; font-style: italic; color: var(--ink); border-left: 3px solid var(--star); padding-left: 14px; margin: 0; }
.rubric { display: grid; gap: 8px; }
.rubric-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; font-size: var(--fs-s); }
.dots { display: flex; gap: 6px; }
.dots button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--hair-2); background: transparent; color: var(--ink-2); font-family: var(--mono); font-size: 12px; }
.dots button[aria-pressed="true"] { background: var(--ink); color: var(--ground-1); border-color: var(--ink); }
.coach { border: 1px solid var(--hair-2); border-radius: var(--r-m); padding: 14px 16px; background: var(--surface); }
.coach-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 12px; }
.coach-scores div { border: 1px solid var(--hair); border-radius: 6px; padding: 8px; text-align: center; font-size: var(--fs-xs); color: var(--ink-3); }
.coach-scores b { display: block; font-size: var(--fs-xl); color: var(--ink); font-weight: 500; }
.coach ul { margin: 4px 0 10px; padding-left: 18px; font-size: var(--fs-s); color: var(--ink-2); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { border: 1px solid var(--hair); border-radius: 6px; padding: 8px 10px; }
.stat-label { font-size: 11.5px; color: var(--ink-3); }
.stat-value { font-size: var(--fs-xl); font-weight: 500; }
.fw-bars { display: grid; gap: 6px; margin-top: 4px; }
.fw-bar { display: grid; grid-template-columns: 1fr 34px; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-2); }
.fw-bar .track { grid-column: 1 / -1; height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.fw-bar .track i { display: block; height: 100%; background: var(--strategy); border-radius: 0 3px 3px 0; }
.fw-bar .track i.tech { background: var(--operations); }
.fw-bar output { font-family: var(--mono); font-size: 11px; text-align: right; color: var(--ink-3); }
.dim-scores { display: grid; gap: 6px; font-size: 12px; }
.dim-scores div { display: grid; grid-template-columns: 90px 1fr 30px; gap: 8px; align-items: center; color: var(--ink-2); }
.dim-scores .track { height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.dim-scores .track i { display: block; height: 100%; background: var(--star); }
.dim-scores output { font-family: var(--mono); font-size: 11px; text-align: right; }
.attempts { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.attempts li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--hair) 60%, transparent); color: var(--ink-2); }
.attempts li span:first-child { color: var(--ink); }
.attempts .fw { grid-column: 1 / -1; font-size: 11px; color: var(--ink-3); }
.fw-ref details { border-top: 1px solid var(--hair); padding: 8px 0; }
.fw-ref summary { cursor: pointer; font-size: var(--fs-s); color: var(--ink); }
.fw-ref .md { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.empty-state { color: var(--ink-3); font-size: var(--fs-s); }

/* ------------------------------------------------------------- hero (3D) */
/* The live committee: a rounded "lab" panel inside the page */
.hero {
  position: relative;
  height: min(780px, 88svh);
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 22px;
  border: 1px solid #25252a;
  background: #000 radial-gradient(ellipse 60% 50% at 50% 45%, #0b0e1a 0%, #04050a 60%, #000 100%);
  box-shadow: 0 40px 120px -40px rgba(80, 90, 255, .35);
}
.scene { position: absolute; inset: 0; }
.scene canvas { display: block; width: 100%; height: 100%; }
.scene-svg { width: 100%; height: 100%; }
.scene-labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

/* labels drawn over the 3D scene */
.n3-label { text-align: center; transform: translate(-50%, -50%); pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.n3-label.dim { opacity: .2; }
.n3-name {
  display: block; font-family: var(--display); font-weight: 600; font-size: clamp(15px, 1.5vw, 22px); letter-spacing: .18em;
  color: #F2F4FF; text-shadow: 0 0 18px color-mix(in srgb, var(--dc) 75%, transparent), 0 2px 10px #000;
}
.n3-sub { display: block; font-size: 11.5px; letter-spacing: .04em; color: var(--ink-2); text-transform: lowercase; margin-top: 2px; text-shadow: 0 1px 6px #000; }
.n3-label[data-state="done"] .n3-sub { color: #fff; }
.n3-label[data-state="pending"] .n3-sub { color: var(--dc); }
.n3-agent {
  transform: translate(-50%, -100%); opacity: 0; transition: opacity .45s; pointer-events: none;
  background: linear-gradient(160deg, rgba(30,36,52,.92), rgba(8,10,16,.92));
  border: 1px solid var(--hair-2); border-radius: 6px; padding: 5px 9px; width: 146px; white-space: normal;
  box-shadow: 0 10px 26px -12px #000;
}
.n3-agent.on { opacity: 1; }
.n3-agent b { display: block; font-size: 12px; font-weight: 600; color: #fff; }
.n3-agent span { display: block; font-size: 10.5px; line-height: 1.35; color: var(--ink-3); }
.n3-brain { transform: translate(-50%, 0); text-align: center; pointer-events: none; }
.n3-brain-kicker { display: block; font-family: var(--display); font-size: 11px; letter-spacing: .34em; color: var(--ink-3); }
.n3-brain-state { display: block; font-family: var(--display); font-size: clamp(16px, 2vw, 26px); letter-spacing: .1em; color: var(--star); text-shadow: 0 0 26px rgba(255,220,190,.55); text-transform: uppercase; margin-top: 4px; }
.n3-brain[data-tone="good"] .n3-brain-state { color: #8FF0BE; text-shadow: 0 0 26px rgba(98,194,149,.6); }
.n3-brain[data-tone="warn"] .n3-brain-state { color: #F5CE86; text-shadow: 0 0 26px rgba(221,169,70,.55); }
.n3-brain[data-tone="bad"] .n3-brain-state { color: #FFA394; text-shadow: 0 0 26px rgba(232,112,95,.55); }

/* isolation: the scrims below sit at z-index -1 inside their own stacking
   context, so they cover the canvas instead of hiding behind it. */
.hero-lead { position: absolute; top: clamp(10px, 1.6vh, 20px); left: 50%; transform: translateX(-50%); width: min(620px, calc(100% - 32px)); text-align: center; pointer-events: none; z-index: 2; isolation: isolate; }
.hero-kicker { margin: 0; font-family: var(--display); font-size: clamp(11px, 1.2vw, 13px); letter-spacing: .34em; color: var(--ink-3); text-transform: uppercase; }
.hero .map-caption { margin: 5px 0 0; color: var(--ink-2); font-size: var(--fs-xs); text-shadow: 0 1px 8px #000; }
.hero-bottom { position: absolute; left: 0; right: 0; bottom: clamp(44px, 6vh, 70px); padding: 0 16px; display: grid; gap: 10px; justify-items: center; z-index: 2; isolation: isolate; }
/* scrim so the controls stay readable over the moving scene */
.hero-bottom::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -100px; top: -46px; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, #000 8%, rgba(0,0,0,.82) 42%, transparent 100%);
}
.hero-lead::before {
  content: ""; position: absolute; left: -50vw; right: -50vw; top: -70px; bottom: -22px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, #000 12%, rgba(0,0,0,.72) 55%, transparent 100%);
}
.hero-bottom .ask {
  width: min(680px, 100%);
  background: linear-gradient(160deg, rgba(28,33,48,.86), rgba(6,8,13,.92));
  color: var(--ink);
  border: 1px solid var(--hair-2);
  box-shadow: 0 24px 60px -30px #000, inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
}
/* keep the bar compact over the scene; long text scrolls inside it */
.hero-bottom .ask textarea { color: var(--ink); max-height: 84px; }
.hero-bottom .ask textarea::placeholder { color: var(--ink-3); }
.hero-bottom .ask-ghost { color: var(--ink-2); }
.hero-bottom .ask-ghost:hover { background: var(--surface-3); }
.hero-bottom .ask-go { background: linear-gradient(160deg, #E9ECF7, #AEB6D0); color: #06070D; font-weight: 600; }
.hero-bottom .ask-go:hover { background: linear-gradient(160deg, #fff, #C9CFE4); }
.hero-bottom .ask:focus-within { box-shadow: 0 0 0 1px var(--star), 0 24px 60px -30px #000; }
.hero-bottom .context-panel { width: min(680px, 100%); }
.hero-bottom .context-panel textarea { max-height: 92px; }
.hero-bottom .pack-chip { width: min(680px, 100%); }
.hero-bottom .samples { margin: 0; }
.hero-bottom .sample-chip { background: rgba(10,12,20,.72); backdrop-filter: blur(6px); }
.hero-bottom .samples { max-width: 760px; }
/* short screens: keep the chips to one row so they don't cover the tree */
@media (max-height: 860px) {
  .hero-bottom .sample-chip:nth-child(n+4) { display: none; }
  .hero .map-caption { font-size: var(--fs-xs); }
}
.hero-hint { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--ink-3); text-align: center; }
.hero-hint a { color: var(--ink-2); }
.hero-credit { position: absolute; right: 18px; bottom: 16px; margin: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.hero-credit a { color: var(--ink-2); }

.focus-panel {
  position: absolute; left: clamp(16px, 3vw, 34px); top: 50%; transform: translateY(-50%);
  width: min(330px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; z-index: 6;
  background: linear-gradient(160deg, rgba(26,31,45,.92), rgba(6,8,13,.94));
  border: 1px solid var(--hair-2); border-left: 3px solid var(--dc, var(--star)); border-radius: var(--r-m);
  padding: 16px 18px; box-shadow: 0 30px 70px -30px #000; backdrop-filter: blur(10px);
}
.focus-panel h3 { font-size: var(--fs-l); margin-bottom: 2px; }
.focus-panel .fp-sub { font-size: var(--fs-xs); color: var(--ink-3); margin: 0 0 10px; }
.focus-panel .fp-line { font-size: var(--fs-s); color: var(--ink); margin: 0 0 10px; }
.focus-panel ul { margin: 0 0 12px; padding-left: 16px; font-size: var(--fs-s); color: var(--ink-2); }
.focus-panel li { margin: 3px 0; }
.focus-panel .fp-agents { list-style: none; padding: 0; display: grid; gap: 6px; }
.focus-panel .fp-agents b { color: var(--ink); font-weight: 500; display: block; font-size: var(--fs-s); }
.focus-panel .fp-agents span { font-size: var(--fs-xs); color: var(--ink-3); }
.focus-panel .fp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.below { padding-top: 34px; }
.controls-strip { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.metal {
  background: linear-gradient(160deg, rgba(32,38,54,.55), rgba(9,11,18,.85));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 20px 40px -32px #000;
}
.brain-card { background: linear-gradient(180deg, rgba(244,239,227,.06) 0%, rgba(11,13,21,.96) 55%); }

/* =====================================================================
   PORTFOLIO SHELL
   Rhythm matches TENDRA-H1: rounded dark hero, alternating dark/light
   splits, an oversized grey headline overlapping a dark band, KPI strip,
   engineering notes, grainy iridescent CTA, builder credit.
   ===================================================================== */

/* boardroom engraving: Cinzel only where the committee "speaks" */
.lab-name, .stamp-text, .n3-name, .n3-brain-kicker, .n3-brain-state,
.bc-kicker, .bc-decision, .hinge-vs { font-family: var(--engrave); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 30px; height: 30px; }
.modes a { font-family: var(--sans); letter-spacing: .1em; }

/* film grain over everything, low opacity, never interactive */
body::after {
  content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 80;
  background-image: var(--noise); opacity: .06; mix-blend-mode: overlay;
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0) } 20% { transform: translate(-3%, 2%) } 40% { transform: translate(2%, -3%) }
  60% { transform: translate(-2%, -1%) } 80% { transform: translate(3%, 3%) } 100% { transform: translate(0, 0) } }

.wrap { padding-inline: clamp(16px, 5vw, 88px); max-width: 1440px; margin-inline: auto; }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 500 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #66666e; }
/* the two dots are Finance gold and Strategy blue: the committee's opening voices */
.eyebrow::before { content: ""; width: 14px; height: 5px; flex: none;
  background: radial-gradient(circle at 2.5px 2.5px, var(--ledger-gold) 2.4px, transparent 2.6px), radial-gradient(circle at 11.5px 2.5px, var(--signal-blue) 2.4px, transparent 2.6px); }
.caps { text-transform: uppercase; letter-spacing: -.01em; font-weight: 600; line-height: 1.05; }

.pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; min-height: 44px; border-radius: 999px; background: #36363a; color: #fff; justify-self: start;
  font: 600 13px/1 var(--sans); text-decoration: none; border: 0; cursor: pointer; transition: background .25s; }
.pill svg { width: 14px; transition: transform .25s; }
.pill:hover { background: #111; } .pill:hover svg { transform: translateX(4px); }
.pill-light { background: #ececf1; color: #0b0b0c; } .pill-light:hover { background: #fff; }
.pill.li { background: #0a66c2; } .pill.li:hover { background: #084d93; }
.pill svg.brand { width: 15px; }

@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --spin: 360deg; } }
.btn-glow { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; min-height: 48px; border-radius: 999px; color: #050506;
  font: 700 14px/1 var(--sans); text-decoration: none; border: 3px solid transparent; isolation: isolate;
  background: linear-gradient(#fff, #fff) padding-box, conic-gradient(from var(--spin), var(--ledger-gold), var(--brain-violet), var(--brain-pink), var(--signal-blue), var(--ledger-gold)) border-box;
  animation: spin 4s linear infinite; }
.btn-glow::after { content: ""; position: absolute; inset: -8px; border-radius: inherit; z-index: -1; filter: blur(16px); opacity: .55;
  background: conic-gradient(from var(--spin), var(--ledger-gold), var(--brain-violet), var(--brain-pink), var(--signal-blue), var(--ledger-gold)); animation: spin 4s linear infinite; }
.ghost-link { color: #fff; font: 600 14px var(--sans); text-decoration: none; opacity: .82; }
.ghost-link:hover { opacity: 1; }

/* concentric glowing rings: conic gradient masked to thin strokes */
.rings { position: absolute; pointer-events: none; aspect-ratio: 1; }
.rings i { position: absolute; inset: var(--in, 0); border-radius: 50%;
  background: conic-gradient(from var(--a, 0deg), #3d6bff, #8a5cff 25%, #e26bff 38%, transparent 52%, transparent 70%, #d9a93a 88%, #3d6bff);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--w, 3px)), #000 calc(100% - var(--w, 3px) + 1px));
          mask: radial-gradient(farthest-side, transparent calc(100% - var(--w, 3px)), #000 calc(100% - var(--w, 3px) + 1px));
  filter: drop-shadow(0 0 10px rgba(120, 100, 255, .8)); animation: orbit var(--t, 24s) linear infinite; }
.rings i:nth-child(2) { --in: 9%; --a: 70deg; --t: 31s; animation-direction: reverse; }
.rings i:nth-child(3) { --in: 18%; --a: 150deg; --t: 38s; --w: 2px; }
.rings.soft i { filter: drop-shadow(0 0 6px rgba(120, 100, 255, .45)); opacity: .75; }
@keyframes orbit { to { transform: rotate(360deg); } }

/* images: hover shine sweep + slow zoom */
.shot { position: relative; overflow: hidden; border-radius: 8px; background: #111; margin: 0; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .1, 1); }
.shot::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%); transform: translateX(-120%); transition: transform 1s ease; }
.shot:hover img { transform: scale(1.04); } .shot:hover::after { transform: translateX(120%); }
.ratio-43 { aspect-ratio: 4 / 3; } .ratio-1610 { aspect-ratio: 16 / 10; }
.ai-note { position: absolute; left: 10px; bottom: 10px; font: 500 10.5px/1 var(--mono); letter-spacing: .03em; color: rgba(255, 255, 255, .9);
  background: rgba(0, 0, 0, .62); padding: 7px 9px; border-radius: 4px; backdrop-filter: blur(4px); }

/* translate-only reveal: content is fully visible at rest */
[data-reveal] { transform: translateY(22px); transition: transform 1s cubic-bezier(.2, .7, .1, 1); }
[data-reveal].in { transform: none; }

/* ---------- marketing hero ---------- */
.hero-shell { padding: 12px clamp(8px, 1.4vw, 20px) 0; }
.mhero { position: relative; overflow: hidden; background: var(--void); color: #fff; border-radius: 28px; isolation: isolate;
  min-height: min(820px, 96svh); display: flex; flex-direction: column; padding-top: calc(var(--topbar-h, 64px) + 12px); }
/* cursor-following light */
.mhero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(480px circle at var(--mx, 72%) var(--my, 42%), rgba(110, 100, 255, .17), transparent 70%); }
.mhero-art { position: absolute; inset: 0 0 0 26%; z-index: 0; }
.mhero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 30%); mask: linear-gradient(90deg, transparent 0, #000 30%); }
.mhero-note { left: auto; right: 16px; bottom: 70px; z-index: 3; }
.mhero > .rings { width: 58vmin; left: 22%; bottom: -30vmin; z-index: 1; mix-blend-mode: screen; opacity: .5; }
.mhero-copy { position: relative; z-index: 3; padding: clamp(28px, 9vh, 110px) clamp(20px, 5vw, 72px) 48px; max-width: 780px; display: grid; gap: 22px; }
.mhero .eyebrow { color: #a2a2ad; }
.mhero h1 { font: 600 clamp(38px, 5.6vw, 78px)/1.02 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.mhero h1 em { font-style: normal; background: linear-gradient(90deg, #f6d68b 0%, #fff 34%, #c3b8ff 66%, #ff9bea 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mhero-sub { color: #b0b0ba; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6; max-width: 48ch; margin: 0; }
.mhero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 6px; }
.ticker { position: relative; z-index: 3; margin-top: auto; border-top: 1px solid #1c1c21; overflow: hidden; padding: 17px 0; background: rgba(5, 5, 6, .66);
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker div { display: flex; gap: 48px; width: max-content; animation: tick 42s linear infinite; font: 500 12.5px/1 var(--mono); letter-spacing: .12em; color: #8a8a94; white-space: nowrap; }
.ticker b { color: #fff; font-weight: 500; }
.ticker span::before { content: "◆"; color: var(--ledger-gold); margin-right: 14px; font-size: 9px; vertical-align: 2px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- dark sections ---------- */
.dark, .band { background-color: var(--boardroom); color: #ededf0;
  background-image: radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px); background-size: 24px 24px; }
.dark { margin-top: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: center; padding-block: clamp(64px, 9vw, 130px); position: relative; z-index: 1; }
.split .copy { display: grid; gap: 20px; max-width: 540px; }
.split h2 { font: 600 clamp(28px, 3.3vw, 46px)/1.08 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.split p { color: #4a4a50; font-size: 15.5px; line-height: 1.65; margin: 0; }
.dark .split p, .band .split p { color: #a1a1ab; }
.dark .eyebrow, .band .eyebrow, .notes-sec .eyebrow, .builder .eyebrow { color: #9a9aa5; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 6px; }
.stats b { display: block; font: 600 clamp(24px, 2.4vw, 32px)/1.1 var(--display); letter-spacing: -.02em; color: #0b0b0c; }
.stats span { font: 500 11px/1.45 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #5e5e66; }
.dark .stats b { color: #fff; } .dark .stats span { color: #9a9aa5; }

/* live committee */
#committee { padding-bottom: clamp(64px, 8vw, 110px); }
.lab-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; padding-block: 20px 34px; }
.lab-head h2 { font: 700 clamp(40px, 5.6vw, 76px)/.96 var(--display); letter-spacing: -.035em; text-transform: uppercase; }
.lab-head h2 span, .notes-head h2 span { color: transparent; -webkit-text-stroke: 1.2px #8a8a94; }
.lab-head p { color: #a1a1ab; max-width: 46ch; margin: 0; }
#committee .below { padding-top: 26px; }

/* ---------- light sections ---------- */
.light { position: relative; overflow: hidden; background: var(--paper); color: #0b0b0c; }
.light .split .copy { background: radial-gradient(closest-side, rgba(243, 243, 244, .94), rgba(243, 243, 244, 0)); }
.light .rings { width: 34vw; min-width: 260px; z-index: 0; }
.ring-a { left: 40%; top: 8%; } .ring-b { right: -12vw; top: 22%; }
.light .pill { background: #1c1c20; } .light .pill:hover { background: #000; }
.flip-sec .split { padding-bottom: clamp(40px, 6vw, 80px); }

/* oversized grey headline overlapping into the dark band. The wrapper keeps the
   paper background but lets the second line hang over the band below. */
/* flow-root stops the heading's negative margin collapsing into the wrapper,
   which would drag the paper background down over the band */
.band-title-wrap { position: relative; z-index: 2; display: flow-root; background: var(--paper); overflow: visible; padding-top: 8px; }
.band-title { position: relative; z-index: 2; font: 700 clamp(42px, 6.8vw, 100px)/.92 var(--display); letter-spacing: -.035em; text-transform: uppercase;
  color: #a3a3aa; max-width: 1440px; margin: 0 auto calc(-0.46em); padding-inline: clamp(16px, 5vw, 88px); }
.band { position: relative; }
.band .split { padding-top: clamp(96px, 11vw, 160px); }
.arch { margin: 0; border: 1px solid #25252c; border-radius: 16px; padding: clamp(14px, 2vw, 26px); background: #09090c;
  box-shadow: 0 30px 90px -40px rgba(138, 92, 255, .45); }
.arch svg { display: block; width: 100%; height: auto; }
.product-name { font: 600 clamp(24px, 2.6vw, 36px)/1.14 var(--display); letter-spacing: -.02em; margin: 0; }
.params { display: flex; flex-wrap: wrap; gap: 8px; }
.params code { font: 12px var(--mono); color: #dcd8ff; background: #1a1a22; border: 1px solid #2b2b36; padding: 7px 11px; border-radius: 999px; }
.kpi-strip { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1.5px solid #ededf0; padding-bottom: clamp(64px, 8vw, 110px); }
.kpi-strip div { padding: 20px 12px 0 0; }
.kpi-strip b { display: block; font: 600 clamp(28px, 3.2vw, 44px)/1 var(--display); letter-spacing: -.03em; color: #fff; }
.kpi-strip span { font: 500 11px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #9a9aa5; }

/* ---------- engineering notes ---------- */
.notes-sec { margin-top: 0; border-top: 1px solid #1c1c21; }
.notes-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; padding-block: clamp(70px, 9vw, 120px) 36px; }
.notes-title { display: grid; gap: 14px; }
.notes-head h2 { font: 700 clamp(36px, 4.8vw, 64px)/.96 var(--display); letter-spacing: -.035em; text-transform: uppercase; }
.notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-bottom: clamp(70px, 9vw, 120px); }
.note { position: relative; display: grid; align-content: start; gap: 14px; padding: 26px 22px 24px; border-radius: 16px; background: #131316; border: 1px solid #24242b; overflow: hidden; transition: border-color .3s, transform .3s; }
.note::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--ledger-gold), var(--brain-violet), var(--brain-pink)); opacity: .85; }
.note:hover { border-color: #3a3a48; transform: translateY(-3px); }
.note .k { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #9a9aa5; }
.note .metric { font: 700 clamp(26px, 2.4vw, 36px)/1.05 var(--display); letter-spacing: -.03em; color: #fff; }
.note .metric small { display: block; margin-top: 6px; font: 600 12px/1.3 var(--sans); color: #c3b8ff; letter-spacing: 0; }
.note h3 { font: 600 17px/1.3 var(--display); color: #fff; }
.note p { color: #a1a1ab; font-size: 14px; line-height: 1.6; margin: 0; }

/* ---------- iridescent CTA card ---------- */
.cta-shell { padding: clamp(40px, 6vw, 90px) clamp(8px, 1.4vw, 20px) 0; background: var(--boardroom); }
.cta { position: relative; overflow: hidden; border-radius: 28px; color: #fff; padding: clamp(40px, 7vw, 100px) clamp(24px, 6vw, 96px); isolation: isolate; display: grid; gap: 12px;
  background: radial-gradient(55% 90% at 8% 20%, #ff3fa4 0%, transparent 62%), radial-gradient(40% 70% at 38% 85%, #ffa23a 0%, transparent 62%),
    radial-gradient(45% 80% at 62% 30%, #1238ff 0%, transparent 66%), radial-gradient(40% 70% at 92% 90%, #9b3dff 0%, transparent 62%),
    radial-gradient(35% 60% at 88% 10%, #ff5ec4 0%, transparent 60%), #3a0f4d;
  background-size: 150% 150%; animation: drift 18s ease-in-out infinite alternate; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--noise); opacity: .55; mix-blend-mode: soft-light; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--noise); background-size: 160px; opacity: .25; mix-blend-mode: overlay; }
@keyframes drift { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
.cta h2 { font: 700 clamp(38px, 6vw, 86px)/1.02 var(--display); letter-spacing: -.035em; max-width: 14ch; color: #fff; text-shadow: 0 2px 30px rgba(40, 0, 60, .35); }
.cta .eyebrow { color: #fff; }
.cta-field { margin-top: clamp(24px, 4vw, 48px); max-width: 760px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1.5px solid rgba(255, 255, 255, .8); border-radius: 999px; padding: 8px 8px 8px 26px; text-decoration: none;
  font: 600 clamp(15px, 1.8vw, 22px) var(--sans); color: #fff; transition: background .3s; background: rgba(20, 0, 40, .18); }
.cta-field:hover { background: rgba(255, 255, 255, .12); }
.cta-field .go { width: 58px; height: 58px; border-radius: 999px; background: var(--void); display: grid; place-items: center; flex: none; }
.cta-field .go svg { width: 26px; color: #fff; transition: transform .3s; }
.cta-field:hover .go svg { transform: translateX(4px); }
.cta-sub { margin: 10px 0 0; font: 500 13px var(--mono); color: #fff; }

/* ---------- builder ---------- */
.builder { position: relative; overflow: hidden; background: var(--boardroom); color: #ededf0; }
.builder .rings { width: 30vw; min-width: 240px; right: -6vw; top: -8vw; z-index: 0; }
.builder-card { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(20px, 4vw, 56px); padding-block: clamp(56px, 8vw, 110px); }
.monogram { width: clamp(84px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font: 700 clamp(28px, 3vw, 40px)/1 var(--display); letter-spacing: -.02em; border: 3px solid transparent;
  background: linear-gradient(#0b0b0c, #0b0b0c) padding-box, conic-gradient(from var(--spin), var(--ledger-gold), var(--brain-violet), var(--brain-pink), var(--signal-blue), var(--ledger-gold)) border-box;
  box-shadow: 0 0 40px -8px rgba(138, 92, 255, .6); animation: spin 6s linear infinite; }
.builder-card h2 { font: 700 clamp(32px, 4.4vw, 60px)/1 var(--display); letter-spacing: -.03em; text-transform: uppercase; margin-top: 12px; }
.builder-card p { color: #a1a1ab; max-width: 56ch; margin: 12px 0 0; }
.builder-links { display: flex; flex-wrap: wrap; gap: 10px; }
.foot { max-width: none; border-top: 1px solid #1c1c21; background: var(--boardroom); padding-inline: clamp(16px, 5vw, 88px); }
.foot p { max-width: 100ch; }
.foot p + p { margin-top: 6px; }
.foot-credit { color: #ededf0; }
.foot a { color: #d6d6de; }

@media (max-width: 1320px) { .topbar { border-radius: 22px; } }
@media (max-width: 1100px) { .notes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
  .split.flip .copy { order: -1; }
  .mhero { min-height: 900px; }
  .mhero-art { inset: 46% 0 0 0; }
  .mhero-art img { -webkit-mask: linear-gradient(180deg, transparent 0, #000 35%); mask: linear-gradient(180deg, transparent 0, #000 35%); }
  .mhero > .rings { left: 30%; bottom: -20vmin; width: 70vmin; }
  .kpi-strip { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
  .builder-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar { width: calc(100% - 16px); top: 8px; padding: 8px 10px; gap: 8px; }
  .brand-name { font-size: 12px; letter-spacing: .05em; overflow: hidden; text-overflow: ellipsis; }
  .brand, .brand-text { min-width: 0; }
  .topbar .status { min-width: 0; }
  .brand-mark { width: 26px; height: 26px; }
  .live-text { display: none; }
  .tier select { max-width: 124px; font-size: 11px; padding-right: 22px; }
  .modes a { padding: 6px 10px; font-size: 10.5px; letter-spacing: .06em; }
  .notes { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stats b { font-size: 22px; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .mhero { min-height: 860px; border-radius: 22px; }
  .hero { border-radius: 16px; height: 780px; }
  .hero-bottom .sample-chip:nth-child(n+4) { display: none; }
  /* labels are fixed-size text, so on a phone-width panel keep them compact;
     the stance line still appears once a department has reported */
  .n3-name { font-size: 11.5px; letter-spacing: .1em; }
  .n3-label:not([data-state="done"]) .n3-sub { display: none; }
  .n3-sub { font-size: 10px; }
  .n3-brain-state { font-size: 15px; }
  .lab-head h2 { font-size: 40px; }
}
/* very narrow phones: the scene caption already states demo/live mode */
@media (max-width: 420px) { .live-badge { display: none; } }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transform: none; }
  body::after { animation: none; }
}

/* reference-render mode (?clean): the 3D scene only, no text in frame */
.clean .topbar, .clean .hero-lead, .clean .hero-bottom, .clean .hero-credit,
.clean .scene-labels, .clean .map-tip, .clean .below, .clean .foot { display: none !important; }
.clean .hero { margin-top: 0; height: 100svh; border: 0; }

/* ------------------------------------------------------------- memo (print) */
.memo { display: none; }
@media print {
  @page { margin: 16mm; }
  body { background: #fff !important; color: #111; }
  body > *:not(.memo) { display: none !important; }
  .memo { display: block !important; font: 10.5pt/1.5 var(--sans); color: #111; }
  .memo h1 { font-family: var(--display); font-size: 18pt; letter-spacing: .06em; margin: 0 0 4pt; }
  .memo h2 { font-size: 11pt; margin: 14pt 0 4pt; border-bottom: 1px solid #999; padding-bottom: 2pt; }
  .memo table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .memo td, .memo th { border-bottom: 1px solid #ccc; padding: 3pt 6pt 3pt 0; text-align: left; vertical-align: top; }
  .memo .meta { color: #555; font-size: 9pt; }
  .memo .verdict { font-family: var(--display); font-size: 16pt; margin: 8pt 0; }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1320px) {
  .topbar { grid-template-columns: 1fr auto; row-gap: 10px; }
  .modes { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
@media (max-width: 1180px) {
  .prac { grid-template-columns: 240px minmax(0, 1fr); }
  .prac-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
  .prac-side .panel + .panel { margin-top: 0; }
}
@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; }
  .modes { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .stage { grid-template-columns: 1fr; }
  .controls-strip { grid-template-columns: minmax(0, 1fr); }
  .focus-panel { left: 16px; right: 16px; width: auto; top: auto; bottom: 210px; transform: none; max-height: 42vh; }
  .rail { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .brand-sub, .session-cost { display: none; }
  .status { gap: 8px; }
  .tier select { max-width: 150px; }
  .ask { flex-wrap: wrap; padding: 8px 8px 8px 14px; }
  .ask textarea { flex-basis: 100%; }
  .ask-go { flex: 1; }
  .prac { grid-template-columns: minmax(0, 1fr); }
  .case-list { max-height: none; overflow: visible; }
  .work { grid-template-columns: 1fr; }
  .hinge-sides { grid-template-columns: 1fr; }
  .hinge-vs { justify-self: start; }
  .hinge-foot, .yc-sides { grid-template-columns: 1fr; }
  .quick-list li { grid-template-columns: 1fr auto; }
  .quick-list .q-line { grid-column: 1 / -1; }
  .sim-history-list button { grid-template-columns: 1fr auto; }
  .sim-history-list .h-date, .sim-history-list .h-cost { display: none; }
  .coach-scores { grid-template-columns: repeat(2, 1fr); }
  .lab-sub { font-size: 18px; }
  .lab-name { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
