@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@700,800&f[]=general-sans@400,500,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --paper: oklch(98.2% 0.004 80);
  --paper-2: oklch(95.8% 0.006 80);
  --paper-3: oklch(92.5% 0.008 80);
  --ink: oklch(22% 0.045 250);
  --ink-2: oklch(38% 0.035 250);
  --ink-3: oklch(55% 0.025 250);
  --line: oklch(22% 0.045 250 / 0.12);
  --line-2: oklch(22% 0.045 250 / 0.22);
  --blue: oklch(44% 0.13 240);
  --blue-deep: oklch(34% 0.11 243);
  --blue-ink: oklch(28% 0.09 245);
  --gold: oklch(82% 0.15 85);
  --gold-ink: oklch(55% 0.12 75);
  --rust: oklch(52% 0.16 35);
  --teal: oklch(62% 0.1 195);
  --ok: oklch(55% 0.13 155);
  --font-display: 'Cabinet Grotesk', 'Avenir Next', system-ui, sans-serif;
  --font-body: 'General Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --r-sm: 4px; --r-md: 8px; --r-lg: 14px;
  --shadow: 0 1px 2px oklch(22% 0.045 250 / 0.06), 0 8px 24px -12px oklch(22% 0.045 250 / 0.25);
  --max: 1280px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
h1,h2,h3 { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(28px, 3.5vw, 42px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50; background: oklch(98.2% 0.004 80 / 0.86);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand small { font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-top: -2px; }
nav.views { display: flex; gap: 2px; margin-left: 6px; overflow-x: auto; }
nav.views button {
  background: none; border: 0; padding: 8px 12px; border-radius: 6px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
nav.views button[aria-current="page"] { background: var(--ink); color: var(--paper); }
nav.views button:hover:not([aria-current="page"]) { background: var(--paper-3); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--paper-3); display: inline-block; }
.status.on i { background: var(--ok); box-shadow: 0 0 0 3px oklch(55% 0.13 155 / 0.18); }
.status.off i { background: var(--rust); }

/* ---------- views ---------- */
.view { display: none; padding-block: 28px 80px; }
.view.active { display: block; }

/* ---------- hero / stats ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; padding-block: 18px 26px; }
.hero p.lede { font-size: 17px; color: var(--ink-2); max-width: 56ch; margin: 14px 0 0; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.kpi { padding: 14px 16px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1; }
.kpi span { font-size: 12px; color: var(--ink-3); }
.outcome-bar { grid-column: 1 / -1; display: flex; height: 34px; border-top: 1px solid var(--line); }
.outcome-bar div { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; color: #fff; overflow: hidden; white-space: nowrap; }
.outcome-bar .E { background: var(--blue-deep); }
.outcome-bar .M { background: oklch(48% 0.09 195); }
.outcome-bar .N { background: oklch(52% 0.02 250); }
.outcome-bar .B { background: var(--rust); }

/* ---------- panel ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-h h2 { font-size: 20px; margin-right: auto; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; background: var(--paper-2); }
.seg button { background: none; border: 0; padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-right: 6px; }

.grid-wrap { display: grid; grid-template-columns: 1fr 330px; min-height: 520px; }
.grid-stage { padding: 20px 10px 10px 20px; position: relative; }
.grid-stage svg { width: 100%; height: auto; display: block; }
.cell-side { border-left: 1px solid var(--line); padding: 18px 20px; background: var(--paper); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.cell-side .empty { color: var(--ink-3); font-size: 14px; padding-top: 10px; }
.cell-side h3 { font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); }
.chip.x { border-color: var(--blue); color: var(--blue-ink); }
.chip.o-E { background: var(--blue-deep); color: #fff; border-color: transparent; }
.chip.o-M { background: oklch(48% 0.09 195); color: #fff; border-color: transparent; }
.chip.o-N { background: oklch(52% 0.02 250); color: #fff; border-color: transparent; }
.chip.o-B { background: var(--rust); color: #fff; border-color: transparent; }
.chip.rg { background: var(--paper-3); }
.chip.ai { background: var(--gold); border-color: transparent; color: var(--ink); }
.stack { display: flex; height: 12px; border-radius: 3px; overflow: hidden; margin: 10px 0 6px; background: var(--paper-3); }
.stack .E { background: var(--blue-deep); } .stack .M { background: var(--teal); } .stack .N { background: oklch(70% 0.02 250); } .stack .B { background: var(--rust); }
.legend-row { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.mini-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.mini-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; cursor: pointer; }
.mini-list li:hover { border-color: var(--line-2); }
.mini-list b { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); padding: 9px 14px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.btn:hover { background: var(--blue-ink); border-color: var(--blue-ink); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-3); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: oklch(78% 0.15 85); border-color: oklch(78% 0.15 85); }
.btn:disabled { opacity: 0.5; cursor: progress; }

.cells-legend { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.ramp { display: inline-block; width: 140px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, oklch(60% 0.14 35), oklch(92% 0.02 240) 45%, oklch(34% 0.11 243)); }
.hatch-demo { display: inline-block; width: 18px; height: 10px; border: 1px solid var(--line-2); background: repeating-linear-gradient(135deg, transparent 0 3px, var(--line-2) 3px 4px); }

/* grid svg */
.tile { cursor: pointer; transition: transform .15s ease; }
.tile rect.face { stroke: oklch(22% 0.045 250 / 0.18); stroke-width: 0.8; }
.tile.empty rect.face { fill: var(--paper-3); stroke-dasharray: 3 3; }
.tile:hover rect.face, .tile.sel rect.face { stroke: var(--ink); stroke-width: 2; }
.tile text { font-family: var(--font-mono); font-size: 13px; pointer-events: none; }
.tile text.n { font-weight: 500; }
.axis { font-family: var(--font-body); font-size: 12.5px; fill: var(--ink-2); font-weight: 500; }
.axis.z { font-weight: 600; fill: var(--ink); }
.axis.y { font-size: 11px; fill: var(--ink-2); }

/* realms */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.card h3 { margin-bottom: 10px; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.rank li:last-child { border-bottom: 0; }
.rank .num { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink-3); }
.rank .lbl b { display: block; font-weight: 600; }
.rank .pct { font-family: var(--font-mono); font-size: 12px; }

/* ---------- explore ---------- */
.explore { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; }
.rail { position: sticky; top: 76px; display: grid; gap: 14px; max-height: calc(100vh - 92px); overflow: auto; padding-right: 4px; }
.search { position: relative; }
.search input { width: 100%; padding: 11px 12px 11px 36px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; }
.search svg { position: absolute; left: 11px; top: 12px; width: 16px; height: 16px; color: var(--ink-3); }
.fgroup { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; padding: 10px 12px; }
.fgroup h4 { margin: 0 0 8px; font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 500; display: flex; justify-content: space-between; }
.fgroup h4 button { background: none; border: 0; color: var(--blue); font-size: 11px; padding: 0; }
.opt { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; cursor: pointer; }
.opt input { accent-color: var(--ink); }
.opt .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range input { width: 100%; }
.range output { font-family: var(--font-mono); font-size: 12px; }
.results-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.results-h .count { font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.results-h select { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: #fff; margin-left: auto; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.active-filters .chip button { background: none; border: 0; padding: 0 0 0 2px; color: var(--ink-3); line-height: 1; }
.results { display: grid; gap: 10px; }
.study {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; cursor: pointer;
  transition: border-color .12s ease, transform .12s ease;
}
.study:hover { border-color: var(--line-2); transform: translateY(-1px); }
.study h3 { font-size: 16px; font-weight: 700; font-family: var(--font-body); line-height: 1.3; }
.study .cite { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.study p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); grid-column: 1 / -1; }
.study .meta { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; margin-top: 6px; }
.study .year { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); text-align: right; }
.study .stat { font-size: 12.5px; color: var(--blue-ink); background: oklch(44% 0.13 240 / 0.07); padding: 6px 10px; border-radius: 6px; grid-column: 1 / -1; margin-top: 6px; }
.results .none { padding: 40px; text-align: center; color: var(--ink-3); background: #fff; border: 1px dashed var(--line-2); border-radius: var(--r-md); }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: oklch(22% 0.045 250 / 0.35); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(680px, 100vw); background: var(--paper); z-index: 100; transform: translateX(104%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1); overflow: auto; box-shadow: -20px 0 60px -30px oklch(22% 0.045 250 / 0.5);
}
.drawer.open { transform: translateX(0); }
.drawer .inner { padding: 22px 28px 60px; }
.drawer .close { position: sticky; top: 10px; float: right; background: #fff; border: 1px solid var(--line-2); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; }
.drawer h2 { font-size: 24px; margin: 6px 0 8px; padding-right: 50px; }
.drawer .ref { font-size: 13px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--r-md); margin: 12px 0; }
.drawer .qa h4 { font-family: var(--font-display); font-size: 15px; margin: 18px 0 6px; color: var(--ink); }
.drawer .qa p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); white-space: pre-line; }
.ai-box { border: 1px solid oklch(82% 0.15 85 / 0.7); background: oklch(97% 0.03 90); border-radius: var(--r-md); padding: 14px 16px; margin-top: 16px; }
.ai-box .hd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.ai-box .hd span.t { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-ink); margin-right: auto; }
.ai-box .out { font-size: 14px; color: var(--ink-2); white-space: pre-line; min-height: 20px; }
.ai-box .out h4 { margin: 0 0 6px; font-size: 15px; }
.ai-box .note { font-size: 11.5px; color: var(--ink-3); margin-top: 10px; }
.linklist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 13.5px; }

/* ---------- ask ---------- */
.ask { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
.chat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 640px; }
.chat .log { flex: 1; padding: 22px 24px; display: grid; gap: 18px; align-content: start; }
.msg { max-width: 92%; }
.msg.user { justify-self: end; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 14px 14px 4px 14px; font-size: 14.5px; }
.msg.bot { background: var(--paper); border: 1px solid var(--line); padding: 16px 18px; border-radius: 4px 14px 14px 14px; font-size: 14.5px; }
.msg.bot .bl { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.3; margin-bottom: 8px; }
.msg.bot p { margin: 0 0 8px; }
.msg.bot ul { margin: 0 0 8px; padding-left: 18px; }
.msg.bot .cit { display: inline-block; font-family: var(--font-mono); font-size: 11px; background: var(--blue-deep); color: #fff; border-radius: 4px; padding: 0 5px; margin: 0 1px; cursor: pointer; vertical-align: 1px; }
.msg.bot .meta { display: flex; gap: 10px; align-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-top: 8px; }
.msg.bot .fups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg.bot .fups button { background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; color: var(--ink-2); }
.msg.bot .fups button:hover { border-color: var(--ink); color: var(--ink); }
.thinking { display: inline-flex; gap: 4px; align-items: center; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: pulse 1.1s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: .18s; } .thinking i:nth-child(3) { animation-delay: .36s; }
@keyframes pulse { 0%,80%,100% { transform: scale(.6); opacity: .4 } 40% { transform: scale(1); opacity: 1 } }
.composer { border-top: 1px solid var(--line); padding: 14px 16px; display: grid; gap: 10px; }
.composer form { display: flex; gap: 8px; }
.composer input, .composer textarea { flex: 1; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; font-size: 14.5px; background: var(--paper); }
.composer input:focus, .composer textarea:focus, .search input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest button { background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; color: var(--ink-2); }
.suggest button:hover { background: var(--paper-3); }
.evidence { position: sticky; top: 76px; display: grid; gap: 14px; }
.evidence .panel { padding: 14px 16px; }
.evidence h3 { font-size: 14px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 500; margin-bottom: 10px; }
.evidence .mini-list { margin-top: 0; }
.evidence .mini-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.evidence .mini-list .tag { font-family: var(--font-mono); font-size: 11px; background: var(--blue-deep); color: #fff; border-radius: 4px; height: 20px; display: grid; place-items: center; }
.minigrid svg { width: 100%; height: auto; }
.mode-tabs { display: flex; gap: 2px; background: var(--paper-2); padding: 3px; border-radius: 10px; width: max-content; margin-bottom: 14px; border: 1px solid var(--line); }
.mode-tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); }
.mode-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* map tactics */
.map-out { display: grid; gap: 10px; margin-top: 14px; }
.tac { display: grid; grid-template-columns: 1fr 240px; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.tac h4 { margin: 0 0 6px; font-size: 15px; }
.tac .why { font-size: 13px; color: var(--ink-2); }
.tac .conf { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.tac .ev { font-size: 12.5px; }
.tac .ev a { display: block; margin-top: 4px; cursor: pointer; }
.portfolio-note { background: var(--paper-2); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; }

/* ---------- workbench ---------- */
.wb { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.wb textarea { width: 100%; min-height: 260px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; font-size: 13.5px; line-height: 1.5; background: #fff; resize: vertical; }
.crit { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.crit li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.crit .st { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; font-weight: 500; align-self: start; padding: 2px 6px; border-radius: 4px; text-align: center; }
.st.pass { background: oklch(55% 0.13 155 / 0.16); color: oklch(40% 0.12 155); }
.st.fail { background: oklch(52% 0.16 35 / 0.14); color: var(--rust); }
.st.unclear { background: var(--gold); color: var(--ink); }
.crit b { display: block; }
.coding { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.coding .big { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.tabs { display: flex; gap: 14px; border-bottom: 1px solid var(--line); margin: 14px 0 10px; }
.tabs button { background: none; border: 0; padding: 6px 0; font-size: 13.5px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.draft { font-size: 14px; color: var(--ink-2); white-space: pre-line; }
.flags { margin: 12px 0 0; padding-left: 18px; font-size: 13px; color: var(--rust); }
.health { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 22px; }
.health .card h3 { font-size: 15px; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.bar i { display: block; height: 10px; background: var(--blue-deep); border-radius: 2px; }
.bar .v { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); text-align: right; }
.sparks { display: flex; align-items: flex-end; gap: 2px; height: 70px; }
.sparks i { flex: 1; background: var(--blue); border-radius: 2px 2px 0 0; min-height: 2px; }
.sparks i:hover { background: var(--gold); }
.crosstab { width: 100%; border-collapse: collapse; font-size: 13px; }
.crosstab th, .crosstab td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.crosstab th:first-child, .crosstab td:first-child { text-align: left; }
.crosstab td.hi { font-weight: 600; color: var(--blue-ink); }
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.pipeline div { background: var(--paper-2); border-radius: 8px; padding: 10px; font-size: 12.5px; }
.pipeline b { display: block; font-family: var(--font-display); font-size: 15px; margin-bottom: 2px; }
.pipeline .ai { background: oklch(97% 0.03 90); border: 1px solid oklch(82% 0.15 85 / 0.6); }
.table-view { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-view th, .table-view td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; font-family: var(--font-mono); font-size: 12px; }
.table-view th:first-child, .table-view td:first-child { text-align: left; font-family: var(--font-body); font-size: 13px; }
.table-view td.sw { width: 26px; }
.table-view i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; }

footer { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: 13px; color: var(--ink-3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }

@media (max-width: 1000px) {
  .hero, .two, .ask, .wb, .health { grid-template-columns: 1fr; }
  .grid-wrap { grid-template-columns: 1fr; }
  .cell-side { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .explore { grid-template-columns: 1fr; }
  .rail { position: static; max-height: none; }
  .evidence { position: static; }
  .tac { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(3) { border-top: 1px solid var(--line); grid-column: 1 / -1; border-right: 0; }
  .top .right .lbl { display: none; }
  .brand small { display: none; }
  .brand span { white-space: nowrap; }
  .top .right a { display: none; }
  .top .wrap { gap: 12px; }
  .study { grid-template-columns: 1fr; }
  .study .year { text-align: left; }
  .drawer .inner { padding: 16px 16px 60px; }
}

/* ---------- playbook ---------- */
.pb-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }
.pb-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.pb-legend i, .strength i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
i.strong { background: var(--blue-deep); } i.moderate { background: var(--teal); } i.thin { background: var(--gold); } i.outside { background: oklch(70% 0.02 250); }
.pb-group { font-size: 15px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 500; margin: 22px 0 12px; }
.plays { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.play { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; cursor: pointer; display: grid; gap: 8px; align-content: start; transition: border-color .12s, transform .12s; }
.play:hover { border-color: var(--line-2); transform: translateY(-1px); }
.play h4 { margin: 0; font-size: 16px; font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
.play .cond { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.strength { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.strength b { font-weight: 600; }
.play .stack { margin: 2px 0 0; }
.play .ev { font-size: 12px; color: var(--ink-3); }
.play-strip { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.play-strip h5 { margin: 0 0 8px; font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 500; }
.play-mini { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 9px 11px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; margin-bottom: 6px; }
.play-mini:hover { border-color: var(--line-2); }
.play-mini b { font-size: 13.5px; font-weight: 600; }
.play-mini span { font-size: 12px; color: var(--ink-3); grid-column: 1 / -1; }
.play-mini .pbtag { grid-column: 2; grid-row: 1; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-ink); }
.msg.bot .play-strip { border-top: 1px dashed var(--line-2); }
.steps { margin: 10px 0 0; padding-left: 22px; }
.steps li { margin-bottom: 8px; font-size: 14px; color: var(--ink-2); }
.draft-play { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 16px 18px; }
.draft-play h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 18px; }
.draft-play .cond { font-size: 14px; color: var(--ink-2); }
.draft-play .cit { display: inline-block; font-family: var(--font-mono); font-size: 11px; background: var(--blue-deep); color: #fff; border-radius: 4px; padding: 0 5px; margin: 0 1px; cursor: pointer; vertical-align: 1px; }
.draft-play .note { font-size: 13px; color: var(--rust); margin-top: 8px; }
.draft-play .evsum { font-size: 13px; color: var(--ink-2); margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.newflag { font-family: var(--font-mono); font-size: 10px; background: var(--gold); color: var(--ink); border-radius: 4px; padding: 1px 6px; }
