/*
 * DAPPER — editorial dark.
 *
 * Warm near-black, a large display headline, letterspaced eyebrows, soft
 * rounded surfaces and one terracotta accent. Data keeps four distinguishable
 * hues, warmed to sit in this palette, and a colour always means the same
 * placement decision:
 *   local-fast  teal     edge-accurate  violet
 *   hybrid      ochre    degraded-safe  terracotta
 */
:root {
  --bg: #0b0a09;
  --bg-soft: #100e0d;
  --surface: #151211;
  --surface-2: #1c1817;
  --line: #262220;
  --line-2: #332d29;

  --text: #f3efec;
  --text-2: #a49a93;
  --text-3: #6f6762;

  --accent: #d97757;
  --accent-ink: #f0a98f;
  --accent-soft: rgba(217, 119, 87, 0.13);
  --accent-line: rgba(217, 119, 87, 0.42);

  --local: #5fb3a1;
  --edge: #9a86e0;
  --hybrid: #d9a441;
  --degraded: #d9634f;
  --ok: #6ec49b;

  --radius: 18px;
  --radius-sm: 12px;
  --display: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 620px at 78% -8%, rgba(217, 119, 87, 0.10), transparent 62%),
    radial-gradient(900px 520px at 4% 12%, rgba(154, 134, 224, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.mono { font-family: var(--mono); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--text); }
h1, h2, h3 { margin: 0; font-family: var(--display); letter-spacing: -0.025em; }
figure { margin: 0; }

/* ---------- shared atoms ---------- */
.eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-3); margin: 0;
}
.pill {
  display: inline-flex; align-items: center; gap: 9px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(28, 24, 23, 0.7);
  padding: 9px 18px; font: 500 14px var(--sans); color: var(--text); cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.pill:hover { border-color: var(--accent-line); background: var(--surface-2); color: var(--text); }
.pill.solid { background: var(--text); color: #0b0a09; border-color: var(--text); font-weight: 600; }
.pill.solid:hover { background: #fff; border-color: #fff; color: #0b0a09; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pill[disabled] { opacity: 0.45; cursor: not-allowed; }
.pill.small { padding: 5px 13px; font-size: 12.5px; }
.pill.on { border-color: var(--accent-line); color: var(--accent-ink); }

button, select, input { font: inherit; color: inherit; }
button { font-family: var(--sans); }
select {
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 7px 10px; color: var(--text); font-size: 13px;
}
input[type="range"] { accent-color: var(--accent); width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.tag {
  display: inline-flex; align-items: center; gap: 7px; font: 500 11px var(--mono);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 11px;
}
.tag.accent { color: var(--accent-ink); border-color: var(--accent-line); }
.tag.ok { color: var(--ok); border-color: rgba(110, 196, 155, 0.36); }
.tag.bad { color: var(--degraded); border-color: rgba(217, 99, 79, 0.42); }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  min-width: 0;
}
.card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.card-head h2 { font-size: 19px; font-weight: 600; }
.lede { color: var(--text-2); margin: 0 0 16px; max-width: 74ch; }
.fine { color: var(--text-3); font-size: 12.5px; margin: 10px 0 0; }
.fine code, code { font: 12px var(--mono); color: var(--text-2); }

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: radial-gradient(760px 420px at 50% 42%, rgba(217, 119, 87, 0.08), transparent 70%), var(--bg);
  transition: opacity 0.55s ease, visibility 0.55s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-card { width: min(540px, calc(100vw - 36px)); }
.boot-logo { filter: drop-shadow(0 0 30px rgba(217, 119, 87, 0.25)); }
.boot h1 { font-size: 34px; font-weight: 600; letter-spacing: 0.22em; margin: 16px 0 4px; }
.boot-sub { color: var(--text-3); margin: 0 0 26px; letter-spacing: 0.18em; text-transform: uppercase; font-size: 10.5px; }
.boot-bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.boot-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--hybrid)); transition: width 0.3s; }
.boot-log { list-style: none; padding: 0; margin: 20px 0 0; font: 12px var(--mono); color: var(--text-3); min-height: 164px; }
.boot-log li { padding: 3px 0; }
.boot-log li.ok::before { content: "\2713  "; color: var(--ok); }
.boot-log li.run::before { content: "\203A  "; color: var(--accent); }
.boot-log li.bad::before { content: "\2717  "; color: var(--degraded); }
.boot-log li.bad { color: var(--degraded); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px;
  padding: 18px 40px; background: rgba(11, 10, 9, 0.78); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-name { font-family: var(--display); font-weight: 600; letter-spacing: 0.24em; font-size: 16px; }
.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-2); font-size: 14px; font-weight: 450; }
.nav a:hover { color: var(--text); }
.status { display: flex; align-items: center; gap: 9px; font: 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.status .sep { width: 1px; height: 11px; background: var(--line-2); }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--hybrid); }
.dot-live.online { background: var(--ok); animation: breathe 2.4s infinite; }
.dot-live.paused { background: var(--text-3); animation: none; }
@keyframes breathe { 50% { opacity: 0.35; } }

main { max-width: 1320px; margin: 0 auto; padding: 0 40px 24px; display: grid; gap: 56px; }
section { scroll-margin-top: 84px; min-width: 0; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 64px; align-items: center; padding: 72px 0 24px;
}
.hero-eyebrow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 34px; }
.hero h1 {
  font-size: clamp(42px, 5.6vw, 80px); font-weight: 600; line-height: 0.99;
  letter-spacing: -0.038em; margin: 0 0 26px;
}
.hero h1 .fade {
  background: linear-gradient(100deg, var(--text) 8%, #8f8781 62%, #5b5450 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { color: var(--text-2); font-size: 17px; line-height: 1.62; margin: 0 0 34px; max-width: 54ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-foot { display: flex; align-items: flex-start; gap: 10px; color: var(--text-3); font-size: 12.5px; max-width: 60ch; }
.hero-foot svg { flex: 0 0 auto; margin-top: 3px; opacity: 0.7; }

/* the live decision card */
.decision-card {
  background: linear-gradient(180deg, rgba(28, 24, 23, 0.92), rgba(16, 14, 13, 0.92));
  border: 1px solid var(--line); border-radius: 22px; padding: 26px 26px 20px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
  position: relative; overflow: hidden;
}
.decision-card::before {
  content: ""; position: absolute; inset: -1px -1px auto; height: 140px;
  background: radial-gradient(420px 130px at 70% 0, rgba(217, 119, 87, 0.11), transparent 70%);
  pointer-events: none;
}
.dc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; position: relative; }
.dc-src { font: 11px var(--mono); color: var(--text-3); letter-spacing: 0.05em; }
.dc-mode { font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 8px; position: relative; }
.dc-why { color: var(--text-2); font-size: 14.5px; margin: 0 0 18px; position: relative; }
.dc-tests { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; position: relative; }
.dc-tests li { display: flex; gap: 11px; font-size: 13.5px; color: var(--text-2); align-items: baseline; }
.dc-tests li::before { content: "\2022"; color: var(--text-3); }
.dc-tests li .expr { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.dc-critical {
  border: 1px dashed var(--accent-line); background: var(--accent-soft);
  border-radius: var(--radius-sm); padding: 14px 15px 12px; margin: 17px 0 4px; position: relative;
}
.dc-critical .label {
  position: absolute; top: -7px; left: 12px; background: #1a1615; padding: 0 7px;
  font: 500 9.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.dc-critical p { margin: 0; font-size: 14px; color: var(--text); }
.dc-critical .expr { font-family: var(--mono); font-size: 11.5px; color: var(--accent-ink); margin-top: 6px; display: block; }
.dc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(11, 10, 9, 0.5);
  padding: 13px 15px; margin-top: 18px; font-size: 13.5px; position: relative;
}
.dc-foot .val { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.dc-caption {
  text-align: center; margin: 15px 0 0; font: 10.5px var(--mono); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3);
}

/* ---------- section headers ---------- */
.sec-head { margin: 0 0 28px; }
.sec-head h2 {
  font-size: clamp(27px, 3.1vw, 38px); font-weight: 600; letter-spacing: -0.032em;
  line-height: 1.08; margin: 13px 0 14px; max-width: 26ch;
}
.sec-head p { color: var(--text-2); margin: 0; max-width: 70ch; font-size: 16px; }

/* ---------- stage ---------- */
.stage-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 20px; }
.stage {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #080706;
}
.stage canvas { display: block; width: 100%; aspect-ratio: 16 / 9; }
.stage-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between;
  gap: 10px; padding: 11px 16px; font: 11px var(--mono); color: var(--text-3);
  background: linear-gradient(0deg, rgba(8, 7, 6, 0.95), rgba(8, 7, 6, 0));
  pointer-events: none; flex-wrap: wrap;
}
.stage-bar b { color: var(--text); font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 11.5px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend b {
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.14em; font-size: 10px;
  font-weight: 500; min-width: 92px;
}

.rail { display: grid; gap: 20px; align-content: start; min-width: 0; }

/* KPIs */
.kpis {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.kpi { background: var(--surface); padding: 13px 15px; min-width: 0; }
.kpi label { display: block; font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.13em; }
.kpi b { display: block; font: 500 22px var(--display); letter-spacing: -0.02em; margin-top: 5px; }
.kpi small { color: var(--text-3); font-size: 10.5px; }
.kpi.good b { color: var(--ok); }
.kpi.bad b { color: var(--degraded); }

/* audit log */
.audit-list {
  list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 8px;
  align-content: start; max-height: 336px; overscroll-behavior: contain; overflow-anchor: none;
}
.audit-list li {
  border: 1px solid var(--line); border-left: 2px solid var(--c, var(--local));
  border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2);
}
.audit-list li.local_fast { --c: var(--local); }
.audit-list li.edge_accurate { --c: var(--edge); }
.audit-list li.hybrid { --c: var(--hybrid); }
.audit-list li.degraded_safe { --c: var(--degraded); }
.audit-top { display: flex; justify-content: space-between; gap: 8px; font: 10.5px var(--mono); color: var(--text-3); }
.audit-mode { font-weight: 500; color: var(--c); letter-spacing: 0.03em; }
.audit-why { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.audit-nums { font: 10.5px var(--mono); color: var(--text-3); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 3px 12px; }
.audit-nums .miss { color: var(--degraded); }
.audit-nums .acc { color: var(--ok); }
.empty { color: var(--text-3); font-size: 13px; margin: 10px 0 0; }

/* ---------- decision path + risk ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.pathwrap { overflow-x: auto; }
.pathwrap svg { display: block; width: 100%; min-width: 560px; height: auto; }
.node rect { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1; }
.node text { fill: var(--text-3); font: 500 11px var(--sans); }
.node.lit rect { stroke-width: 1.6; }
.node.lit text { fill: var(--text); }
.node.lit.local rect { stroke: var(--local); fill: rgba(95, 179, 161, 0.12); }
.node.lit.edge rect { stroke: var(--edge); fill: rgba(154, 134, 224, 0.13); }
.node.lit.hybrid rect { stroke: var(--hybrid); fill: rgba(217, 164, 65, 0.12); }
.node.lit.degraded rect { stroke: var(--degraded); fill: rgba(217, 99, 79, 0.12); }
.node.lit.gate rect, .node.lit.in rect, .node.lit.out rect { stroke: var(--accent); fill: var(--accent-soft); }
.edge-line { stroke: var(--line-2); stroke-width: 1.3; fill: none; }
.edge-line.lit { stroke: var(--accent); stroke-width: 2.1; }
.edge-label {
  fill: var(--text-3); font: 500 10px var(--sans);
  paint-order: stroke; stroke: #151211; stroke-width: 4px; stroke-linejoin: round;
}
.edge-label.lit { fill: var(--accent-ink); }
.gate-tests { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 7px; font: 11.5px var(--mono); }
.gate-tests li {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text-3);
}
.gate-tests li.fired { border-color: var(--accent-line); color: var(--text); background: var(--accent-soft); }
.gate-tests .verdict.yes { color: var(--ok); }
.gate-tests .verdict.no { color: var(--text-3); }

.risk-total { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.risk-total b { font: 500 42px var(--display); letter-spacing: -0.035em; }
.risk-total span { font-size: 12.5px; color: var(--text-3); }
.risk-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; display: flex; }
.risk-bar i { display: block; height: 100%; }
.risk-bar .t-rtt { background: var(--local); }
.risk-bar .t-loss { background: var(--degraded); }
.risk-bar .t-load { background: var(--edge); }
.risk-bar .t-frame_age { background: #5a534f; }
.risk-bar .t-deadline { background: var(--hybrid); }
.risk-marks { position: relative; height: 18px; margin-top: 3px; font: 10px var(--mono); color: var(--text-3); }
.risk-marks i { position: absolute; top: 0; width: 1px; height: 5px; background: var(--line-2); }
.risk-marks span { position: absolute; top: 6px; transform: translateX(-50%); white-space: nowrap; }
.terms { width: 100%; border-collapse: collapse; font: 11.5px var(--mono); margin-top: 18px; }
.terms th, .terms td { padding: 7px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.terms th:first-child, .terms td:first-child { text-align: left; }
.terms thead th { color: var(--text-3); font-weight: 500; }
.terms .sw { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 8px; }
.terms tr.zero td { color: var(--text-3); }

/* ---------- charts ---------- */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.chart { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; min-width: 0; }
.chart figcaption { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.chart figcaption em { color: var(--text-3); font-style: normal; font-size: 11.5px; }
.chart canvas { display: block; width: 100%; }

/* ---------- controls ---------- */
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 20px 24px; }
.ctl { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ctl label { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.13em; display: flex; justify-content: space-between; gap: 8px; }
.ctl label b { font-family: var(--mono); color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 500; }
.ctl .sub { font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.ctl-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 8px 15px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--accent-soft); color: var(--accent-ink); }
.custom-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 24px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.custom-grid[hidden] { display: none; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.data, table.race { width: 100%; border-collapse: collapse; font: 12px var(--mono); }
table.data th, table.data td, table.race th, table.race td {
  padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data th:first-child, table.data td:first-child, table.data th.l, table.data td.l,
table.race th:first-child, table.race td:first-child { text-align: left; }
table.data thead th, table.race thead th {
  color: var(--text-3); font-weight: 500; background: var(--surface-2); position: sticky; top: 0;
  font-size: 11px; letter-spacing: 0.04em;
}
table.data tr:last-child td, table.race tr:last-child td { border-bottom: 0; }
table.data tr.ours td, table.race tr.ours td { background: var(--accent-soft); }
table.data tr.ours td:first-child, table.data tr.ours td.l, table.race tr.ours td:first-child { color: var(--accent-ink); font-weight: 500; }
table.data tr.group td { color: var(--text-3); font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: 0.13em; background: transparent; }
table.data td.best, table.race td.best { color: var(--ok); }
table.data .ci { color: var(--text-3); font-size: 10.5px; }
table.data td.dim { color: var(--text-3); }
table.data td.miss, table.race td.miss { color: var(--degraded); }
table.race tr.oracle td { color: var(--text-3); }
table.race tr.oracle td:first-child { color: var(--hybrid); }
table.race .badge { font-size: 9.5px; color: var(--hybrid); border: 1px solid rgba(217, 164, 65, 0.4); border-radius: 999px; padding: 1px 7px; margin-left: 8px; }
.race-bars { display: grid; gap: 10px; margin-top: 18px; }
.race-bar { display: grid; grid-template-columns: 128px minmax(0, 1fr) 70px; gap: 12px; align-items: center; font: 11px var(--mono); color: var(--text-3); }
.race-bar .track { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.race-bar .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--hybrid)); transition: width 0.25s; }
.race-bar .val { text-align: right; color: var(--text); }

/* ---------- research ---------- */
.research-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 24px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  padding: 6px 14px; font: 500 12.5px var(--sans); color: var(--text-2); cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.tab:hover { border-color: var(--accent-line); color: var(--text); }
.tab.on { border-color: var(--accent-line); color: var(--accent-ink); background: var(--accent-soft); }
.headline {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; margin-bottom: 22px;
}
.metric { background: var(--surface); padding: 16px 16px 15px; }
.metric b { display: block; font: 500 26px var(--display); letter-spacing: -0.03em; color: var(--text); }
.metric span { font-size: 11.5px; color: var(--text-3); line-height: 1.45; display: block; margin-top: 5px; }
.research-side { display: grid; gap: 18px; align-content: start; }
.research-side > * { min-width: 0; }
.paper-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.paper-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.paper-card p { color: var(--text-2); margin: 0 0 8px; font-size: 14px; }
.paper-card .authors { color: var(--text-3); font-size: 12.5px; margin: 0 0 16px; }
.paper-links { display: flex; gap: 9px; flex-wrap: wrap; }

.honest { display: grid; gap: 14px; min-width: 0; }
.honest-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--surface-2); min-width: 0; }
.honest-item h3 { color: var(--accent-ink); font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.honest-item p { color: var(--text-2); margin: 8px 0 14px; font-size: 13.5px; }
.honest-item .src { font: 10.5px var(--mono); color: var(--text-3); margin: 12px 0 0; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line); margin: 40px auto 0;
  padding: 36px 40px 56px; max-width: 1320px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 32px;
  color: var(--text-3); font-size: 12.5px;
}
.footer strong { color: var(--text-2); font-weight: 500; }
.footer .caveat { max-width: 76ch; }

/* ---------- responsive (screen only, so print is untouched) ---------- */
@media screen and (max-width: 1160px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 46px; padding: 52px 0 12px; }
  .stage-wrap, .two-col, .research-grid { grid-template-columns: minmax(0, 1fr); }
  .footer { grid-template-columns: minmax(0, 1fr); }
  main, .topbar, .footer { padding-left: 28px; padding-right: 28px; }
}
@media screen and (max-width: 760px) {
  body { font-size: 14.5px; }
  .topbar { padding: 14px 18px; gap: 10px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 18px; flex-wrap: wrap; }
  .status { order: 2; width: 100%; margin-left: 0; flex-wrap: wrap; gap: 7px; }
  main { padding: 0 18px 20px; gap: 40px; }
  .hero { padding: 30px 0 8px; }
  .hero h1 { font-size: clamp(34px, 10vw, 46px); }
  .hero p.sub { font-size: 15.5px; }
  .card { padding: 17px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts, .controls { grid-template-columns: minmax(0, 1fr); }
  .race-bar { grid-template-columns: 96px minmax(0, 1fr) 58px; }
  /* A 16:9 stage is only 219 px tall on a phone. 4:3 gives the diagram room. */
  .stage canvas { aspect-ratio: 4 / 3; }
  .decision-card { padding: 20px 18px 16px; }
  .dc-mode { font-size: 23px; }
  .footer { padding: 28px 18px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
