/* ProofOdds Live — "data terminal".
   One accent (blue) belongs to the model. The market is always neutral grey.
   Green and red are only for results, and never alone: a word or an icon
   always says the same thing. Dark by default; light on request. */

@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 400; font-display: optional;
  src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 400; font-display: optional;
  src: url("fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 500; font-display: optional;
  src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 500; font-display: optional;
  src: url("fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 600; font-display: optional;
  src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 600; font-display: optional;
  src: url("fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 700; font-display: optional;
  src: url("fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 700; font-display: optional;
  src: url("fonts/ibm-plex-sans-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 400; font-display: optional;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 400; font-display: optional;
  src: url("fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 500; font-display: optional;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 600; font-display: optional;
  src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---- tokens: dark by default ------------------------------------------------ */
:root {
  color-scheme: dark;
  --ground: #0A0E14; --surface: #10161F; --surface-2: #161E29; --surface-3: #1D2633;
  --rule: #222C39; --rule-2: #2F3B4B;
  --ink: #E7EBF0; --ink-2: #AAB4C1; --ink-3: #8994A3;
  --model: #5AA2FF; --model-dim: #1C3556; --model-ink: #9CC7FF;
  --market: #8D97A6; --market-dim: #2A3340;
  --good: #46C286; --good-bg: #0F2A1E; --bad: #FF7D6E; --bad-bg: #331512;
  --focus: #9CC7FF;
  --radius: 10px; --radius-s: 6px;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --head-h: 52px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #F4F6F9; --surface: #FFFFFF; --surface-2: #F0F3F7; --surface-3: #E6EBF1;
  --rule: #DCE2EA; --rule-2: #C5CEDA;
  --ink: #0D1520; --ink-2: #445063; --ink-3: #5A6676;
  --model: #1B5FCF; --model-dim: #D9E6FB; --model-ink: #164FAE;
  --market: #6A7585; --market-dim: #E1E6ED;
  --good: #11744A; --good-bg: #DDF1E6; --bad: #B3362A; --bad-bg: #FADFDB;
  --focus: #1B5FCF;
}

/* ---- base -------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.55 var(--sans);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--model-ink); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.num, .mono, td.num, .score, .clock { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; background: var(--surface); color: var(--ink); padding: 6px 10px; z-index: 30; }
.shell { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- header ------------------------------------------------------------------- */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.head-inner { display: flex; align-items: center; gap: 14px; height: var(--head-h); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 24px; height: 24px; }
.live-pill { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--mono); letter-spacing: .06em;
  color: var(--model-ink); border: 1px solid var(--model-dim); background: color-mix(in srgb, var(--model-dim) 45%, transparent);
  border-radius: 999px; padding: 4px 8px 4px 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--model); flex: none; }
.live-pill.is-live .dot, .clock-pill .dot { animation: pulse 1.6s ease-in-out infinite; }
.live-pill:not(.is-live) .dot { background: var(--ink-3); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 7px 10px; border-radius: var(--radius-s); font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); font-weight: 600; }
.theme-toggle { flex: none; display: grid; place-items: center; width: 34px; height: 34px; background: none; border: 1px solid var(--rule);
  border-radius: var(--radius-s); color: var(--ink-2); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); border-color: var(--rule-2); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
@media (max-width: 640px) {
  .head-inner { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 0; gap: 8px; }
  .nav { order: 3; width: 100%; margin: 0 -10px; }
  .theme-toggle { margin-left: auto; }
  :root { --head-h: 92px; }
}

/* ---- page frame --------------------------------------------------------------- */
main { padding: 30px 0 48px; min-height: calc(100vh - var(--head-h)); }
#live, #results, #alerts, #charts { min-height: 50vh; display: flow-root; }
#charts { display: grid; }
.meta-line span { min-height: 1.4em; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 6px; }
h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.015em; margin: 0; font-weight: 700; }
h2 { font-size: 18px; letter-spacing: -.01em; margin: 34px 0 10px; font-weight: 600; }
h3 { font-size: 15px; margin: 22px 0 8px; font-weight: 600; }
.lead { color: var(--ink-2); margin: 6px 0 14px; max-width: 70ch; }
.meta-line { font-size: 12.5px; color: var(--ink-3); margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--rule);
  border-left: 3px solid var(--model); border-radius: var(--radius-s); padding: 10px 12px; font-size: 14px; color: var(--ink-2); margin: 0 0 18px; max-width: 900px; }
.notice strong { color: var(--ink); }

/* ---- league groups & cards ---------------------------------------------------- */
.league-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; font: 600 12px/1 var(--sans);
  color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.league-head::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 14px 10px; min-width: 0; }
.card.has-alert { border-color: var(--model); box-shadow: 0 0 0 1px var(--model) inset; }
.card-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.team { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; min-width: 0; }
.team-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team .goals { font: 600 24px/1.1 var(--mono); }
.teams-link { color: inherit; text-decoration: none; display: grid; gap: 2px; min-width: 0; }
.teams-link:hover .team-name { text-decoration: underline; text-underline-offset: 3px; }
.red-card { display: inline-block; width: 9px; height: 12px; background: var(--bad); border-radius: 2px; margin-left: 6px; vertical-align: -1px; }
.card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: start; }
.clock-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--mono); color: var(--ink);
  background: var(--surface-3); border-radius: 999px; padding: 5px 9px; white-space: nowrap; }
.clock-pill.is-break .dot { background: var(--ink-3); animation: none; }
.alert-badge { font: 600 11px/1 var(--mono); letter-spacing: .04em; color: var(--model-ink); border: 1px solid var(--model);
  border-radius: 999px; padding: 4px 8px; white-space: nowrap; }
.alert-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.alert-list li { font-size: 13px; color: var(--ink); background: color-mix(in srgb, var(--model-dim) 55%, transparent); border-radius: var(--radius-s); padding: 5px 8px; }
.alert-list .lvl { font: 600 11px var(--mono); color: var(--model-ink); margin-right: 6px; }

.section-label { font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 14px 0 6px; display: flex; justify-content: space-between; }
.cmp { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) 2.6em; align-items: center; gap: 2px 8px; font-size: 12.5px; }
.cmp .lbl { grid-column: 1 / -1; color: var(--ink-3); font-size: 11.5px; margin-top: 3px; }
.cmp .v { font-family: var(--mono); color: var(--ink-2); }
.cmp .v.r { text-align: right; }
.cmp .v.lead-side { color: var(--ink); font-weight: 600; }
.cmp svg, .pbar svg, .betbar svg { display: block; width: 100%; height: 6px; }
.bar-home { fill: var(--ink-2); }
.bar-away { fill: var(--rule-2); }
.bar-track { fill: var(--surface-3); }
.pbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font: 500 12px var(--mono); }
.pbar svg { height: 8px; }
.pbar .side { color: var(--ink-2); }
.pbar .side b { color: var(--ink); }

.bets { margin-top: 4px; }
.bet { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.bet:first-child { border-top: 0; }
.bet.is-alert { margin: 0 -8px; padding: 8px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--model-dim) 50%, transparent); border-top-color: transparent; }
.bet-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bet-odds { font: 500 12.5px var(--mono); text-align: right; white-space: nowrap; color: var(--ink-2); }
.bet-odds b { color: var(--ink); font-weight: 600; }
.betbar { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px 8px; align-items: center; font: 400 11.5px var(--mono); }
.betbar .k { color: var(--ink-3); white-space: nowrap; }
.betbar .k b { color: var(--ink-2); font-weight: 500; display: inline-block; min-width: 3ch; text-align: right; }
.betbar .k.model, .betbar .k.model b { color: var(--model-ink); }
.fill-model { fill: var(--model); }
.fill-market { fill: var(--market); }
.bets-toggle { display: block; width: 100%; margin: 6px 0 0; background: none; border: 1px dashed var(--rule-2); border-radius: var(--radius-s);
  color: var(--ink-2); font: 500 12.5px var(--sans); padding: 6px; cursor: pointer; }
.bets-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-3); }
.card-foot a { color: var(--ink-2); }
.more-btn { display: block; margin: 10px auto 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-s);
  color: var(--ink-2); font: 500 13px var(--sans); padding: 7px 14px; cursor: pointer; }
.more-btn:hover { color: var(--ink); border-color: var(--rule-2); }
.empty { background: var(--surface); border: 1px dashed var(--rule-2); border-radius: var(--radius); padding: 22px 16px; color: var(--ink-2); text-align: center; }

.upcoming { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.upcoming li { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 2px 12px; padding: 9px 14px; border-top: 1px solid var(--rule); font-size: 14px; }
.upcoming li:first-child { border-top: 0; }
.upcoming .when { font: 500 13px var(--mono); color: var(--ink-2); }
.upcoming .lg { grid-column: 2; font-size: 12px; color: var(--ink-3); }
@media (min-width: 760px) { .upcoming li { grid-template-columns: 5.2em minmax(0, 1fr) 16em; } .upcoming .lg { grid-column: 3; text-align: right; } }

/* ---- tables ------------------------------------------------------------------ */
.table-wrap { overflow: auto; max-height: 70vh; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; vertical-align: top; }
th:first-child, td:first-child { text-align: left; }
td.wrap { white-space: normal; min-width: 14em; text-align: left; }
thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--ink-3); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.ci { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font: 600 11.5px/1.4 var(--mono); white-space: nowrap; border: 1px solid transparent; }
.chip-won, .chip-half-won { background: var(--good-bg); color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.chip-lost, .chip-half-lost { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.chip-push, .chip-void, .chip-open { background: var(--surface-3); color: var(--ink-2); }
.lvl-tag { font: 600 11px var(--mono); color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.lvl-tag.value { color: var(--model-ink); border-color: var(--model); }

/* ---- alerts as cards on phones -------------------------------------------------- */
.alert-cards { display: none; gap: 10px; }
@media (max-width: 760px) { .alert-cards { display: grid; } .alerts-table { display: none; } }
.acard { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; display: grid; gap: 6px; }
.acard .row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.acard .match { font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
.acard .bet-line { font-size: 14px; }
.acard .kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: var(--surface-2); border-radius: var(--radius-s); padding: 8px; }
.acard .kv div { display: grid; gap: 1px; }
.acard .kv span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.acard .kv b { font: 600 13px var(--mono); }
.filters { display: inline-flex; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 3px; margin: 0 0 14px; }
.filters button { background: none; border: 0; border-radius: 4px; padding: 6px 12px; color: var(--ink-2); cursor: pointer; font: 500 13px var(--sans); }
.filters button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }

/* ---- results ---------------------------------------------------------------- */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 6px 0 8px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.tile .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.tile .v { font: 600 26px/1.25 var(--mono); margin-top: 4px; }
.tile .sub { font: 400 12px var(--mono); color: var(--ink-3); margin-top: 2px; }
.split { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.panel h3 { margin-top: 0; }
.ivl svg { width: 100%; height: auto; display: block; }
.ivl-zero { stroke: var(--ink-2); stroke-width: 1.4; }
.ivl-grid { stroke: var(--rule); stroke-width: 1; }
.ivl-bar { stroke: var(--model); stroke-width: 2.5; stroke-linecap: round; opacity: .55; }
.ivl-pt { fill: var(--model); stroke: var(--surface); stroke-width: 1.5; }
.ivl-lbl { fill: var(--ink-2); font: 12px var(--sans); }
.ivl-ax { fill: var(--ink-3); font: 11px var(--mono); }
.section-rule { border: 0; border-top: 1px solid var(--rule); margin: 40px 0 0; }
.tag-backtest { font: 600 11px var(--mono); letter-spacing: .06em; color: var(--ink-2); border: 1px dashed var(--rule-2); border-radius: 4px; padding: 2px 6px; vertical-align: 3px; margin-left: 8px; }

/* ---- match page charts ------------------------------------------------------------ */
.summary { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; margin: 6px 0 16px; }
.summary .sb { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.summary .tn { font-weight: 600; font-size: 17px; }
.summary .tn.away { text-align: right; }
.summary .big { font: 600 34px/1 var(--mono); text-align: center; white-space: nowrap; }
.summary .facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-3); justify-content: center; }
.summary .events { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ev { display: inline-flex; align-items: center; gap: 5px; font: 500 12px var(--mono); background: var(--surface-2); border-radius: 999px; padding: 3px 9px; color: var(--ink-2); }
.ev svg { width: 11px; height: 11px; }
.charts { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 12px 6px; min-width: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.chart-head h3 { margin: 0; font-size: 14px; }
.chart-head .now { font: 500 12px var(--mono); color: var(--ink-2); white-space: nowrap; }
.chart-head .now b { color: var(--model-ink); }
.chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.c-grid { stroke: var(--rule); stroke-width: 1; }
.c-ax { fill: var(--ink-3); font: 10.5px var(--mono); }
.c-model { stroke: var(--model); stroke-width: 1.8; fill: none; stroke-linejoin: round; }
.c-market { stroke: var(--market); stroke-width: 1.4; fill: none; stroke-dasharray: 4 3; }
.c-goal { stroke: var(--good); stroke-width: 1; stroke-dasharray: 2 2; }
.c-red { stroke: var(--bad); stroke-width: 1; stroke-dasharray: 2 2; }
.c-cursor { stroke: var(--ink-2); stroke-width: 1; }
.c-dot-model { fill: var(--model); }
.c-dot-market { fill: var(--market); }
.ico-goal { fill: var(--surface); stroke: var(--good); stroke-width: 1.6; }
.ico-red { fill: var(--bad); }
.c-hit { fill: transparent; cursor: crosshair; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface-3); border: 1px solid var(--rule-2); border-radius: var(--radius-s);
  padding: 6px 8px; font: 500 12px/1.45 var(--mono); color: var(--ink); white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.tip .m { color: var(--model-ink); }
.tip .k { color: var(--ink-3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: 0 0 12px; align-items: center; }
.legend svg { width: 22px; height: 8px; vertical-align: middle; margin-right: 5px; }
.legend .ico { width: 11px; height: 11px; }

/* ---- prose -------------------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { margin-top: 36px; padding-top: 4px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose .callout { border-left: 3px solid var(--model); background: var(--surface); padding: 10px 14px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }

/* ---- footer ------------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--rule); padding: 22px 0 34px; color: var(--ink-3); font-size: 13px; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center; }
.age { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--ink-3); border-radius: 50%; font: 700 11px var(--mono); color: var(--ink-2); margin-right: 10px; vertical-align: middle; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---- motion ------------------------------------------------------------------- */
.flash { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { background-color: color-mix(in srgb, var(--model) 30%, transparent); } 100% { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* late overrides */
@media (max-width: 640px) { .meta-line { display: grid; gap: 0; } }

/* results tables on phones: sticky first column, short names, ROI always visible */
.results-table .short { display: none; }
.results-table th.key, .results-table td.key { text-align: left; font-weight: 400; }
tbody th.key { color: var(--ink); background: var(--surface); }
@media (max-width: 640px) {
  .results-table .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .results-table .short { display: inline; }
  .results-table .opt { display: none; }
  .results-table th, .results-table td { padding: 7px 6px; }
  .results-table th.key { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--rule); }
  .results-table thead th.key { background: var(--surface-2); z-index: 3; }
  .results-table .ci { display: block; font-size: 11px; }
  .results-table { max-height: none; }
}
.short-note { display: none; margin: -4px 0 8px; }
@media (max-width: 640px) { .short-note { display: block; } }
.totals { margin: 0 0 4px; }
.totals + p { margin: 4px 0 14px; }
.lag-note { margin: 12px 0 4px; padding: 10px 12px; border: 1px dashed var(--rule-2); border-radius: var(--radius-s);
  color: var(--ink-2); font-size: 13px; text-align: center; }
.when-fired { font: 500 11.5px var(--mono); color: var(--ink-2); }

/* "Not sent": recorded, never sent as a signal. Neutral, dashed: not a result colour */
.ns-tag { font: 600 10.5px/1.3 var(--mono); letter-spacing: .03em; color: var(--ink-3); border: 1px dashed var(--rule-2);
  border-radius: 4px; padding: 1px 5px; white-space: nowrap; vertical-align: 1px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.filter-bar .filters { margin: 0; }
.sent-toggle { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-s); padding: 6px 11px; color: var(--ink-2); cursor: pointer; font: 500 13px var(--sans); }
.sent-toggle::before { content: ""; width: 12px; height: 12px; border: 1.5px solid var(--ink-3); border-radius: 3px; flex: none; }
.sent-toggle[aria-pressed="true"] { color: var(--ink); border-color: var(--rule-2); }
.sent-toggle[aria-pressed="true"]::before { background: var(--model); border-color: var(--model);
  box-shadow: inset 0 0 0 2px var(--surface); }
.sent-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.sent-note { margin: -4px 0 14px; max-width: 70ch; }
.do-tag { font: 500 10.5px/1.3 var(--mono); color: var(--ink-3); border: 1px solid var(--rule); border-radius: 4px;
  padding: 0 4px; margin-left: 4px; white-space: nowrap; }.hidden-note { margin: 8px 0 0; }

/* emblems: our own copies; a neutral circle with initials when there is none */
.crest { flex: none; display: inline-block; width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }
img.crest { border-radius: 3px; }
.crest-x { display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--ink-2);
  font: 600 9px/1 var(--mono); letter-spacing: -.02em; border: 1px solid var(--rule-2); }
.crest.s20, img.crest[width="20"] { width: 20px; height: 20px; }
.crest.s24, img.crest[width="24"] { width: 24px; height: 24px; }
.team { justify-content: flex-start; gap: 8px; }
.team .team-name { flex: 1; min-width: 0; }
.fx { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx .crest { margin: 0; }
.league-logo { width: 20px; height: 20px; object-fit: contain; flex: none; margin-right: -2px; }
.summary .tn { display: inline-flex; align-items: center; gap: 8px; }
.summary .tn.away { justify-content: flex-end; }

/* match head: a long team name wraps, smaller on phones, and never reaches the score */
.summary .tn { min-width: 0; }
.summary .tn-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
@media (max-width: 520px) {
  .summary .sb { gap: 10px; }
  .summary .tn { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 14px; }
  .summary .tn.away { align-items: flex-end; text-align: right; }
  .summary .tn.away .crest { order: -1; }
  .summary .big { font-size: 28px; }
}
