:root {
  color-scheme: dark;
  --bg: #101318;
  --surface: #191e25;
  --text: #f4f8ff;
  --muted: #aeb8c5;
  --line: #303941;
  --accent: #39d0ff;
  --mint: #75f7cf;
  --gold: #ffd166;
  --good: #79e8a3;
  --bad: #ff9f9f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 Manrope, "Segoe UI", sans-serif; letter-spacing: 0; }
button, select { font: inherit; color: inherit; letter-spacing: 0; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button, select { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .38; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: 26px; font-weight: 800; line-height: 1.25; }
h2 { font-size: 18px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 800; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.muted, .footnote { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; padding: 12px; z-index: 100; background: var(--surface); }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: #15191f; }
.header-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 48px; height: 48px; }
.brand strong { display: block; font-size: 22px; line-height: 1.25; font-weight: 800; }
.brand small { color: var(--muted); font-size: 12px; }
.brand-plus { color: var(--gold); }
.page-nav { display: flex; gap: 8px; align-items: center; }
.page-nav a { min-height: 44px; padding: 10px 16px; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.page-nav a:hover { background: #252d35; color: var(--accent); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 32px; }
.page-heading p { margin-top: 6px; }
.target-odds { color: var(--gold); font-variant-numeric: tabular-nums; }
.date-toolbar { display: grid; grid-template-columns: 44px minmax(155px, 1fr) 44px 44px; gap: 8px; width: 350px; flex: 0 0 350px; }
.icon-button { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 20px; position: relative; }
.icon-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.icon-button[data-tooltip]::after { content: attr(data-tooltip); position: absolute; top: calc(100% + 7px); right: 0; z-index: 5; width: max-content; max-width: 180px; padding: 5px 9px; background: #edf3f9; color: #15202b; border-radius: 4px; font: 12px/1.5 Manrope, sans-serif; pointer-events: none; opacity: 0; visibility: hidden; }
.icon-button:hover::after, .icon-button:focus-visible::after { opacity: 1; visibility: visible; }
.date-field { position: relative; min-width: 0; }
.date-field select { appearance: none; width: 100%; height: 44px; padding: 0 30px 0 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-weight: 800; font-variant-numeric: tabular-nums; }
.date-field > .fa { position: absolute; right: 12px; top: 15px; pointer-events: none; color: var(--muted); }
.refresh-button { color: var(--accent); }
.refresh-button.is-loading .fa { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sync-line { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; min-height: 47px; padding-block: 12px; color: var(--muted); font-size: 12px; }
.experiment-note { display: flex; align-items: baseline; gap: 10px; padding-top: 20px; color: var(--gold); font-size: 14px; line-height: 1.65; }
.experiment-note > .fa { flex-shrink: 0; }
.notice { padding: 12px 14px; border-left: 3px solid var(--gold); background: #29251c; color: #f7dda7; margin-block: 12px; overflow-wrap: anywhere; }
.notice-error { display: flex; align-items: baseline; gap: 10px; background: #301f24; color: #ffb1b1; border-color: var(--bad); }
.notice a { text-decoration: underline; text-underline-offset: 3px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px 16px; }
.coupon-section, .validation-section, .history-section { border-top: 1px solid var(--line); padding-bottom: 28px; }
.mode-label { color: var(--gold); font-size: 12px; font-weight: 700; }
.mode-label.is-prospective { color: var(--mint); }
.coupon-metrics { display: grid; grid-template-columns: 1fr 1fr 1.4fr; padding-block: 4px 24px; gap: 24px; }
.coupon-metrics > div { min-width: 0; }
.coupon-metrics > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
dt { color: var(--muted); font-size: 12px; }
.coupon-metrics dd { margin-top: 6px; font-size: 24px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.coupon-metrics dd.odds-number { color: var(--gold); font-size: 30px; }
.coupon-metrics dd .status { font-size: 15px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.status .fa { flex-shrink: 0; }
.status--won { color: var(--good); }
.status--lost { color: var(--bad); }
.status--live { color: var(--accent); }
.status--pending { color: var(--muted); }
.status--no_coupon, .status--insufficient_training { color: var(--gold); }
.legs-table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.legs-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; padding: 10px 12px; background: #181d24; }
.legs-table th:first-child { width: 37%; }
.legs-table th:nth-child(2) { width: 16%; }
.legs-table th:nth-child(3) { width: 9%; }
.legs-table th:nth-child(4), .legs-table th:nth-child(5) { width: 8%; }
.legs-table th:last-child { width: 22%; }
.legs-table td { padding: 18px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.legs-table tbody tr { background: #151a20; box-shadow: inset 3px 0 #526577; }
.legs-table tbody tr[data-tone="won"] { background: #142820; box-shadow: inset 3px 0 var(--good); }
.legs-table tbody tr[data-tone="lost"] { background: #2b1b22; box-shadow: inset 3px 0 var(--bad); }
.legs-table tbody tr[data-tone="live-won"] { background: #162b25; box-shadow: inset 3px 0 var(--mint); }
.legs-table tbody tr[data-tone="live-lost"] { background: #2f2023; box-shadow: inset 3px 0 var(--bad); }
.match-name { font-weight: 800; font-size: 14px; }
.match-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 11px; margin-top: 5px; }
.match-meta time { font-variant-numeric: tabular-nums; }
.source-support { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.source-support strong { color: #c8e5df; font-weight: 600; }
.pick-text { font-weight: 800; color: #e3edf6; }
.leg-odds, .score-text { font-weight: 800; font-variant-numeric: tabular-nums; }
.leg-odds { color: var(--gold); }
.live-outcome { display: block; font-size: 12px; margin-top: 4px; font-weight: 700; }
.live-outcome.is-won { color: var(--good); }
.live-outcome.is-lost { color: var(--bad); }
.empty-state { padding-block: 30px; color: var(--muted); text-align: center; }
.footnote { font-size: 12px; margin-top: 14px; line-height: 1.65; }
.footnote > .fa { margin-right: 5px; }
.archive-note { color: #d7c397; }
.coupon-provenance { display: flex; flex-wrap: wrap; gap: 5px 24px; margin-top: 14px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.validation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.validation-group { min-width: 0; }
.validation-group + .validation-group { border-left: 1px solid var(--line); padding-left: 28px; }
.baseline-group { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.validation-group h3 { margin-bottom: 4px; }
.holdout-group h3 { color: var(--mint); }
.validation-group > p { font-size: 12px; }
.validation-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; margin-top: 20px; }
.validation-metrics dd { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.validation-metrics .is-negative { color: var(--bad); }
.validation-metrics .is-positive { color: var(--good); }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-list li { border-bottom: 1px solid var(--line); }
.history-day { display: grid; grid-template-columns: 1fr 1.5fr .7fr .6fr 1.25fr 18px; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 12px 16px; background: transparent; border: 0; border-left: 3px solid transparent; text-align: left; }
.history-day:hover { background: #20272e; }
.history-day[aria-current="date"] { border-left-color: var(--accent); background: #202931; }
.history-date { font-weight: 800; font-variant-numeric: tabular-nums; }
.history-mode, .history-legs { color: var(--muted); font-size: 12px; }
.history-odds { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.history-day > .fa { color: var(--muted); }
.history-day > span { min-width: 0; overflow-wrap: anywhere; }
.page-footer { display: flex; gap: 12px 24px; align-items: center; flex-wrap: wrap; padding-block: 22px 30px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); }
.page-footer > span:first-child { color: var(--text); font-weight: 800; }
.page-footer #modelInfo { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.page-footer a:hover { color: var(--accent); }
@media (max-width: 800px) {
  .page-heading { align-items: stretch; flex-direction: column; gap: 18px; }
  .date-toolbar { width: 100%; flex-basis: auto; grid-template-columns: 44px minmax(0, 1fr) 44px 44px; }
  .validation-grid { grid-template-columns: 1fr; gap: 22px; }
  .validation-group + .validation-group { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .legs-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .legs-table, .legs-table tbody { display: block; width: 100%; }
  .legs-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px 12px 14px; gap: 14px 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
  .legs-table td { display: block; border: 0; padding: 0; min-width: 0; }
  .legs-table td:first-child { grid-column: 1 / -1; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .legs-table td:nth-child(2) { grid-column: span 2; }
  .legs-table td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
  .history-day { grid-template-columns: 1fr 1fr 1fr; gap: 6px 12px; padding-inline: 12px; }
  .history-date { grid-column: 1; grid-row: 1; }
  .history-mode { grid-column: 1 / span 2; grid-row: 2; }
  .history-odds { grid-column: 2; grid-row: 1; text-align: center; }
  .history-legs { grid-column: 3; grid-row: 2; text-align: right; }
  .history-day > .status { grid-column: 3; grid-row: 1; justify-self: end; }
  .history-day > .fa { display: none; }
}
@media (max-width: 540px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { flex-wrap: wrap; gap: 12px; padding-block: 14px; }
  .page-nav { width: 100%; justify-content: space-between; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
  .page-nav a { padding-inline: 12px; }
  .page-heading { padding-top: 24px; }
  h1 { font-size: 23px; }
  .coupon-metrics { gap: 12px; grid-template-columns: 1fr .85fr 1.4fr; }
  .coupon-metrics > div + div { padding-left: 12px; }
  .coupon-metrics dd { font-size: 22px; }
  .coupon-metrics dd.odds-number { font-size: 26px; }
  .coupon-metrics dd .status { font-size: 12px; }
  .section-heading { align-items: baseline; }
  .section-heading > .muted { font-size: 12px; }
  .validation-metrics { gap: 14px 10px; }
  .validation-metrics dd { font-size: 18px; }
  .validation-metrics dt { font-size: 11px; }
  .history-date { font-size: 12px; }
  .history-day { gap: 8px; padding-inline: 8px; }
  .page-footer #modelInfo { flex-basis: calc(100% - 100px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .refresh-button.is-loading .fa { animation: none; }
}
