/* Wolf Analytics. A sports-analytics terminal: dense tables, condensed display type,
   monospaced numbers, a north-woods brand rail. Color carries meaning only (brand rail,
   leans, model identity, gains/losses); everything else is ink on surface. */
:root {
  --midnight: #0c2340;     /* deep night blue: brand rail, headings */
  --lake: #236192;         /* lake blue: links, Wolf series */
  --aurora: #78be20;       /* aurora green: rail accent, active states */
  --moonlight: #a2aaad;    /* moonlight grey */
  --frost: #ffffff;

  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f7f9fa;
  --ink: #0c2340;
  --ink-soft: #4a5a6e;
  --ink-mute: #6b7480;
  --rule: #d9dee3;
  --rule-strong: #b9c2cb;
  --chip-bg: #e9f5dc;
  --chip-ink: #2f5a07;
  --market: #6b7480;
  --warn-bg: #fff6e0;
  --warn-ink: #6b4a00;
  --pos: #2f6f0a;
  --neg: #a8321e;
  --focus: #78be20;

  /* model identity, fixed order. Wolf/Kalman/Decay validated as a categorical set
     (dataviz validate_palette.js, light on #fff and dark on #0d2139: lightness band,
     chroma, CVD and normal-vision separation, contrast all PASS). Elo is the
     benchmark, drawn as a recessive dashed grey reference line, not a fourth hue. */
  --s-wolf: #236192;
  --s-kalman: #4a8a12;
  --s-decay: #a3479b;
  --s-elo: #8a939b;

  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07172b; --surface: #0d2139; --surface-2: #10283f; --ink: #eef3f8; --ink-soft: #a9b6c4; --ink-mute: #8d9aa8;
    --rule: #22395a; --rule-strong: #34507a; --chip-bg: #1f3a10; --chip-ink: #b8ec7a; --market: #a2aaad;
    --warn-bg: #3a2e0c; --warn-ink: #f3d68a; --lake: #6fb0e6; --pos: #8fd14f; --neg: #ff8a73;
    --s-wolf: #4f93cc; --s-kalman: #5f9e2a; --s-decay: #c26ab8; --s-elo: #8593a3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #07172b; --surface: #0d2139; --surface-2: #10283f; --ink: #eef3f8; --ink-soft: #a9b6c4; --ink-mute: #8d9aa8;
  --rule: #22395a; --rule-strong: #34507a; --chip-bg: #1f3a10; --chip-ink: #b8ec7a; --market: #a2aaad;
  --warn-bg: #3a2e0c; --warn-ink: #f3d68a; --lake: #6fb0e6; --pos: #8fd14f; --neg: #ff8a73;
  --s-wolf: #4f93cc; --s-kalman: #5f9e2a; --s-decay: #c26ab8; --s-elo: #8593a3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); overflow-x: hidden; }
a { color: var(--lake); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* brand rail */
.rail { background: var(--midnight); color: var(--frost); border-bottom: 3px solid var(--aurora); }
.rail-inner { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 10px 24px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--frost); text-decoration: none; }
.mark svg { width: 30px; height: 30px; flex: none; }
.mark b { font: 700 24px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.mark b span { color: var(--aurora); }
.nav { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.nav a { color: #cfd8e2; text-decoration: none; font: 600 15px/1 var(--display); letter-spacing: .08em;
  text-transform: uppercase; padding: 7px 0 5px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--frost); border-bottom-color: var(--aurora); }
@media (max-width: 640px) {
  .rail-inner { padding-bottom: 0; }
  .nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 8px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
}

/* freshness strip */
.statusbar { background: var(--surface); border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--ink-soft); }
.statusbar-inner { max-width: 1200px; margin: 0 auto; padding: 6px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 31px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-mute); flex: none; }
.status-dot[data-state="live"] { background: var(--aurora); }
.status-dot[data-state="stale"], .status-dot[data-state="error"] { background: #d9a400; }
.status-note { color: var(--warn-ink); background: var(--warn-bg); padding: 1px 6px; border-radius: var(--radius); }
.status-week { margin-left: auto; font: 600 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }

main { max-width: 1200px; margin: 0 auto; padding-inline: 16px; padding-block: 22px 56px; }
.page-head { margin-bottom: 14px; }
.eyebrow { font: 600 13px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }
.eyebrow a { color: inherit; }
h1 { font: 700 clamp(28px, 4.4vw, 42px)/1.05 var(--display); letter-spacing: .01em; margin: 6px 0 8px; text-wrap: balance; display: flex; align-items: center; gap: 10px; }
h2 { font: 700 22px/1.15 var(--display); letter-spacing: .02em; margin: 30px 0 10px; }
.lede { color: var(--ink-soft); max-width: 75ch; margin: 0 0 12px; }
.fine { color: var(--ink-mute); font-size: 13px; max-width: 90ch; margin: 8px 0; }
.fine.warn { color: var(--warn-ink); }
.notice { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius); padding: 9px 12px; font-size: 14px; max-width: 90ch; }
.empty-state { color: var(--ink-soft); background: var(--surface); border: 1px dashed var(--rule-strong); border-radius: var(--radius); padding: 18px; text-align: center; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 10px; }
.section-head h2 { margin: 0; }
.section-head a { font-size: 14px; text-decoration: none; white-space: nowrap; }
.button { display: inline-block; background: var(--lake); color: #fff; text-decoration: none; padding: 8px 14px; border-radius: var(--radius); font-weight: 600; font-size: 14px; }
.button.quiet { background: transparent; color: var(--lake); border: 1px solid var(--rule-strong); }
.linklike { background: none; border: 0; color: var(--lake); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin: 10px 0 6px; }
.kpis > div { background: var(--surface); padding: 10px 14px; }
.kpis dt { font: 600 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.kpis dd { margin: 6px 0 0; font-size: 26px; line-height: 1.1; font-weight: 600; }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis > div:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.kpis dd.small { font-size: 15px; font-family: var(--body); font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; }
.split > section, .model-cards > *, .games > * { min-width: 0; }


/* filters */
.filters { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { font: 600 13px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 7px 10px; cursor: pointer; }
.filter-chip .count { font: 500 11px/1 var(--mono); color: var(--ink-mute); margin-left: 4px; letter-spacing: 0; }
.filter-chip:hover { border-color: var(--lake); }
.filter-chip[aria-pressed="true"] { background: var(--midnight); border-color: var(--midnight); color: #fff; box-shadow: inset 0 -3px 0 var(--aurora); }
.filter-chip[aria-pressed="true"] .count { color: #cfd8e2; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.search input, .filter-grid select { font: 14px var(--body); color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule-strong);
  border-radius: var(--radius); padding: 6px 9px; min-width: 0; }
.search input { width: 200px; max-width: 100%; }
.result-count { margin: 0 0 0 auto; font-size: 14px; color: var(--ink-soft); }
.result-count b { color: var(--ink); font: 600 14px var(--display); letter-spacing: .08em; text-transform: uppercase; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; }
.filter-grid label { display: grid; gap: 4px; font: 600 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.history-filters .result-count { margin: 10px 0 0; }

/* game cards */
.day { margin-top: 20px; }
.day > h2 { margin: 0 0 8px; font-size: 17px; color: var(--ink-soft); letter-spacing: .1em; text-transform: uppercase; display: flex; gap: 10px; align-items: baseline; }
.day > h2 .count { font: 500 12px var(--mono); letter-spacing: 0; text-transform: none; color: var(--ink-mute); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 10px; }
.game { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 11px 13px;
  display: grid; gap: 8px; min-width: 0; align-content: start; }
.game-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-size: 12px; }
.teams { display: grid; gap: 2px; }
.team-row { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 10px; }
.team { font: 600 18px/1.2 var(--display); letter-spacing: .02em; min-width: 0; overflow-wrap: anywhere; }
.team small { font: 500 11px var(--body); color: var(--ink-mute); margin-left: 6px; letter-spacing: .02em; }
.score { font: 600 19px/1 var(--mono); }
.final { font: 600 13px/1 var(--mono); color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--rule); padding: 2px 5px; border-radius: 3px; }
.lines { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: space-between; gap: 6px 10px; border-top: 1px solid var(--rule); padding-top: 8px; margin: 0; }
.lines dt { font: 600 10px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.lines dd { margin: 4px 0 0; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.lines .market { color: var(--market); }
@media (max-width: 400px) { .lines { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.game-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.winprob { font: 500 12px var(--mono); color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { background: var(--chip-bg); color: var(--chip-ink); font: 600 12px/1 var(--body); padding: 5px 7px; border-radius: 3px; }
.chip.quiet { background: transparent; color: var(--ink-mute); border: 1px solid var(--rule); }
.game a.more { font-size: 13px; text-decoration: none; justify-self: start; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font: 600 11px/1.1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); background: var(--surface-2); }
tbody th { font-weight: 600; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.left, td:first-child, th:first-child { text-align: left; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
td .rk { color: var(--ink-mute); font-size: 11px; margin-left: 6px; }
td.market { color: var(--market); }
tr.benchmark td { color: var(--ink-soft); font-style: italic; }
tr.best td:first-child { box-shadow: inset 3px 0 0 var(--aurora); }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]::after { content: " ↕"; color: var(--ink-mute); }
th[aria-sort="ascending"]::after { content: " ↑"; color: var(--ink); }
th[aria-sort="descending"]::after { content: " ↓"; color: var(--ink); }
td.state { text-align: center; color: var(--ink-soft); padding: 24px; white-space: normal; }
.outcome { font: 600 11px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 3px; border: 1px solid currentColor; }
.outcome.W { color: var(--pos); }
.outcome.L { color: var(--neg); }
.outcome.P { color: var(--ink-mute); }
.history { font-size: 13px; }
.history th, .history td { padding: 6px 8px; }
.history td.game-cell { white-space: normal; min-width: 170px; }
.history td.game-cell small { display: block; color: var(--ink-mute); font-size: 12px; }
@media (max-width: 760px) {
  .history-wrap { background: none; border: 0; overflow: visible; }
  .history thead { display: none; }
  .history, .history tbody { display: block; }
  .history tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; background: var(--surface);
    border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
  .history td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; }
  .history td[data-label]::before { content: attr(data-label); display: block; font: 600 10px/1 var(--display); letter-spacing: .12em;
    text-transform: uppercase; color: var(--ink-soft); margin-bottom: 3px; }
  .history td.game-cell { grid-column: 1 / -1; font-weight: 600; }
  .history td.date-cell { grid-column: 1 / -1; color: var(--ink-mute); font-size: 12px; order: -1; }
  .history td.state { grid-column: 1 / -1; text-align: center; }
}
.history td.lean-cell { text-align: left; }
.history .assumed { color: var(--ink-mute); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0; font-size: 14px; }
.pager button { font: 600 14px var(--body); color: var(--lake); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; }
.pager button:disabled { color: var(--ink-mute); cursor: default; opacity: .6; }

.bar { height: 6px; background: var(--rule); border-radius: 3px; position: relative; min-width: 80px; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--lake); border-radius: 3px; }

/* model cards */
.model-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
@media (max-width: 600px) {
  .model-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .model-card { padding: 10px; gap: 6px; }
  .model-card header a { font-size: 14px; }
  .model-card .big { font-size: 22px; }
  .model-card-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.model-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.model-card header a { font: 700 17px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.model-card header a:hover { color: var(--lake); }
.model-card .big { font-size: 28px; font-weight: 600; line-height: 1; }
.model-card .sub { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.model-card-stats { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; border-top: 1px solid var(--rule); padding-top: 8px; }
.model-card-stats dt { font: 600 10px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.model-card-stats dd { margin: 4px 0 0; font-size: 13px; white-space: nowrap; }
.model-card .fine { margin: 0; font-size: 12px; }
.swatch { display: inline-block; width: 12px; height: 3px; border-radius: 2px; background: currentColor; vertical-align: middle; margin-right: 6px; flex: none; }
.swatch.lg { width: 22px; height: 5px; }
.swatch.s-wolf { background: var(--s-wolf); }
.swatch.s-kalman { background: var(--s-kalman); }
.swatch.s-decay_od_div { background: var(--s-decay); }
.swatch.s-elo { background: repeating-linear-gradient(90deg, var(--s-elo) 0 4px, transparent 4px 6px); }
.model-head { display: grid; grid-template-columns: minmax(230px, 300px) 1fr; gap: 12px; align-items: start; }
@media (max-width: 760px) { .model-head { grid-template-columns: 1fr; } }
.model-list { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.model-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 6px 18px; align-items: center; background: var(--surface); padding: 12px 14px; text-decoration: none; color: var(--ink); }
.model-row:hover { background: var(--surface-2); }
.model-row-name { font: 700 17px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; }
.model-row-text { color: var(--ink-soft); font-size: 14px; }
.model-row-stat { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 760px) { .model-row { grid-template-columns: 1fr; } .model-row-stat { white-space: normal; } }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule-strong); margin: 6px 0 4px; overflow-x: auto; }
.tabs button { font: 600 14px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; background: none; border: 0;
  border-bottom: 3px solid transparent; color: var(--ink-soft); padding: 10px 12px 8px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--aurora); }

/* charts */
.chart-figure { margin: 14px 0 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; }
.chart-figure figcaption { font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
.chart-figure figcaption b { color: var(--ink); font: 600 14px var(--display); letter-spacing: .06em; text-transform: uppercase; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; font-family: var(--mono); }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .grid.base { stroke: var(--rule-strong); stroke-dasharray: 3 3; }
.chart .tick { fill: var(--ink-mute); font-size: 11px; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .end-label { fill: var(--ink-soft); font: 600 12px var(--display); letter-spacing: .04em; }
.chart .end-value { fill: var(--ink); font: 500 11px var(--mono); }
.chart .crosshair { stroke: var(--ink-mute); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart .s-wolf { stroke: var(--s-wolf); fill: var(--s-wolf); }
.chart .s-kalman { stroke: var(--s-kalman); fill: var(--s-kalman); }
.chart .s-decay_od_div { stroke: var(--s-decay); fill: var(--s-decay); }
.chart .s-elo { stroke: var(--s-elo); fill: var(--s-elo); }
.chart path.s-wolf, .chart path.s-kalman, .chart path.s-decay_od_div, .chart path.s-elo { fill: none; }
.chart path.s-elo { stroke-dasharray: 5 3; }
.chart-tip { position: absolute; top: 6px; pointer-events: none; background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: var(--radius); padding: 6px 8px; font-size: 12px; box-shadow: 0 2px 8px rgba(12, 35, 64, .12); min-width: 150px; }
.chart-tip b { display: block; font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.chart-tip div { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; padding: 0; font-size: 13px; color: var(--ink-soft); }
.legend li { display: inline-flex; align-items: center; }

/* prose, research, details */
.research { display: grid; gap: 10px; }
.finding { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; }
.finding h3 { font: 700 18px/1.2 var(--display); margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status { font: 600 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; border: 1px solid currentColor; }
.status.SETTLED { color: var(--pos); }
.status.REJECTED { color: var(--market); }
.status.OPEN { color: var(--lake); }
.finding p { margin: 6px 0 0; max-width: 80ch; color: var(--ink-soft); font-size: 15px; }
.finding p b { color: var(--ink); }
.prose { max-width: 75ch; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.howto { margin: 18px 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 14px; }
.howto summary { cursor: pointer; font-weight: 600; color: var(--lake); }
.howto .prose { margin-top: 8px; font-size: 15px; }

footer { border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 13px; }
footer div { max-width: 1200px; margin: 0 auto; padding-inline: 16px; padding-block: 16px 28px; }

@media (prefers-reduced-motion: no-preference) {
  .game, .filter-chip, .model-row { transition: border-color .12s ease, background-color .12s ease; }
  .game:hover { border-color: var(--rule-strong); }
}

/* Model Lab */
.forward-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 10px; }
.forward-grid > * { min-width: 0; }
.forward-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.forward-card h3 { font: 700 17px/1.2 var(--display); letter-spacing: .03em; margin: 0; }
.forward-card .fine { margin: 0; }
.progress { height: 8px; background: var(--rule); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--lake); border-radius: 4px; }
.verdict, .lab-status, .outcome-tag { font: 600 11px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 3px; border: 1px solid currentColor; white-space: nowrap; }
.verdict.pass, .outcome-tag.validated { color: var(--pos); }
.verdict.fail, .outcome-tag.rejected { color: var(--ink-mute); }
.verdict.inconclusive, .outcome-tag.promising, .outcome-tag.tested { color: var(--lake); }
.lab-status { color: var(--ink-soft); border-color: var(--rule-strong); }
td.wrap { white-space: normal; min-width: 220px; }
.ci-col { min-width: 160px; width: 22%; }
.ci { position: relative; height: 14px; }
.ci .zero { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--rule-strong); }
.ci .range { position: absolute; top: 5px; height: 4px; background: var(--s-wolf); border-radius: 2px; opacity: .55; }
.ci .point { position: absolute; top: 2px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--s-wolf); box-shadow: 0 0 0 2px var(--surface); }

/* Kalshi research */
.stage-track { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 4px 0 14px; counter-reset: st; }
.stage-track li { counter-increment: st; font: 600 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 7px 9px; }
.stage-track li::before { content: counter(st) " · "; color: var(--ink-mute); }

/* blind-spot warnings */
.blindspot-chip { font: 600 12px/1 var(--body); color: var(--warn-ink); background: var(--warn-bg); padding: 5px 7px; border-radius: 3px; text-decoration: none; }
.blindspot-chip:hover { text-decoration: underline; }
.warn-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; max-width: 90ch; }
.warn-list li { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius); padding: 8px 10px; font-size: 14px; }
.warn-code { font: 600 11px/1 var(--mono); border: 1px solid currentColor; border-radius: 3px; padding: 2px 4px; margin-right: 4px; }
