:root {
  color-scheme: dark;
  --bg: #090b0d;
  --surface: #101316;
  --surface-2: #15191d;
  --surface-3: #1a1f24;
  --line: #272d33;
  --line-strong: #3a424a;
  --text: #f4f1e9;
  --muted: #969da4;
  --muted-strong: #b8bec3;
  --orange: #ff7136;
  --orange-soft: #2a1710;
  --green: #70e1a1;
  --red: #ff7676;
  --radius: 10px;
  font-family: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--bg); }
button, input { font: inherit; }
a { color: inherit; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 68px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 13, .94);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .13em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #0a0c0e; background: var(--orange); border-radius: 5px; font: 800 12px/1 "IBM Plex Mono", monospace; }
.topnav { display: flex; align-items: center; gap: 24px; }
.topnav a { color: var(--muted); font: 500 10px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.topnav a:hover, .topnav a:focus-visible { color: var(--text); outline: 0; }
.phase-pill { justify-self: end; display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 500 10px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.phase-pill span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(112, 225, 161, .1); }

main { padding: 44px clamp(20px, 4vw, 64px) 72px; }
.workspace { width: min(1440px, 100%); margin: 0 auto; }
.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 30px; }
.eyebrow, .panel-kicker { margin: 0 0 10px; color: var(--orange); font: 600 11px/1.2 "IBM Plex Mono", monospace; letter-spacing: .13em; }
h1 { max-width: 850px; margin: 0; font-size: clamp(38px, 5vw, 66px); line-height: .98; letter-spacing: -.055em; }
.lede { max-width: 760px; margin: 20px 0 0; color: var(--muted-strong); font-size: 15px; line-height: 1.65; }

.system-state { flex: 0 0 224px; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.system-state .state-light { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #6b7279; }
.system-state.online .state-light { background: var(--green); box-shadow: 0 0 0 5px rgba(112, 225, 161, .1); }
.system-state.offline .state-light { background: var(--red); }
.system-state strong, .system-state small { display: block; }
.system-state strong { font-size: 13px; }
.system-state small { margin-top: 4px; color: var(--muted); font: 400 10px/1.4 "IBM Plex Mono", monospace; }

.validation-band { display: grid; grid-template-columns: minmax(270px, 1.6fr) repeat(4, minmax(110px, .65fr)); margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.validation-copy, .validation-stat { min-height: 108px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.validation-stat:last-child { border-right: 0; }
.validation-copy { gap: 6px; background: linear-gradient(120deg, var(--orange-soft), var(--surface)); }
.validation-copy strong { font-size: 15px; }
.validation-copy small, .validation-stat small { color: var(--muted); font: 400 10px/1.4 "IBM Plex Mono", monospace; }
.validation-status { width: fit-content; margin-bottom: 4px; padding: 5px 7px; color: var(--green); border: 1px solid rgba(112, 225, 161, .28); border-radius: 4px; background: rgba(112, 225, 161, .06); font: 600 9px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.validation-stat { gap: 7px; }
.validation-stat span { color: var(--muted); font: 500 9px/1 "IBM Plex Mono", monospace; letter-spacing: .1em; }
.validation-stat strong { font: 600 22px/1 "IBM Plex Mono", monospace; letter-spacing: -.04em; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 48px; }
.metric { min-height: 102px; padding: 19px 20px; display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); font: 500 9px/1 "IBM Plex Mono", monospace; letter-spacing: .1em; }
.metric strong { font: 600 clamp(26px, 3vw, 38px)/1 "IBM Plex Mono", monospace; letter-spacing: -.04em; }
.metric.accent { background: var(--orange-soft); }
.metric.accent strong { color: var(--orange); }

.watchlist-panel { margin-bottom: 48px; scroll-margin-top: 88px; }
.watchlist-state { padding: 8px 10px; color: var(--orange); border: 1px solid rgba(255, 113, 54, .32); border-radius: 999px; background: rgba(255, 113, 54, .06); font: 600 9px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; white-space: nowrap; }
.prospective-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.prospective-metrics article { min-height: 112px; padding: 20px 22px; display: flex; flex-direction: column; justify-content: center; gap: 8px; border-right: 1px solid var(--line); }
.prospective-metrics article:last-child { border-right: 0; }
.prospective-metrics span { color: var(--muted); font: 500 10px/1 "IBM Plex Mono", monospace; letter-spacing: .1em; }
.prospective-metrics strong { font: 600 24px/1 "IBM Plex Mono", monospace; letter-spacing: -.04em; }
.prospective-metrics small { color: var(--muted); font: 400 12px/1.4 "IBM Plex Mono", monospace; }
.watchlist-table td { font-size: 14px; }
.watchlist-table td strong, .watchlist-table td small { display: block; }
.watchlist-table td small { margin-top: 4px; color: var(--muted); font: 400 12px/1.4 "IBM Plex Mono", monospace; }
.watchlist-game, .watchlist-captured { color: var(--muted-strong); font: 500 12px/1.45 "IBM Plex Mono", monospace; white-space: nowrap; }
.watchlist-probability { color: var(--orange); font: 600 14px "IBM Plex Mono", monospace; }
.watchlist-outcome { display: inline-flex; width: fit-content; padding: 5px 7px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); font: 600 9px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.watchlist-outcome.hit { color: var(--green); border-color: rgba(112, 225, 161, .3); background: rgba(112, 225, 161, .06); }
.watchlist-outcome.miss { color: var(--orange); border-color: rgba(255, 113, 54, .3); background: rgba(255, 113, 54, .06); }

.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin: 0 0 18px; scroll-margin-top: 88px; }
.section-intro h2, .method-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.04em; }
.section-intro p:last-child { max-width: 540px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.surface-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, .75fr); gap: 18px; }
.panel, .method-grid { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.panel-heading { min-height: 90px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.panel-heading.compact { min-height: 78px; }
.panel-heading h2 { margin: 0; font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }
.panel-heading .panel-kicker { margin-bottom: 7px; }
.date-range { display: block; margin-top: 6px; color: var(--muted); font: 400 9px/1.4 "IBM Plex Mono", monospace; }
.date-control input { height: 38px; padding: 0 10px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 6px; font: 500 11px "IBM Plex Mono", monospace; color-scheme: dark; }
.date-control input:hover, .date-control input:focus-visible { border-color: var(--orange); outline: 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 22px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font: 500 9px/1 "IBM Plex Mono", monospace; letter-spacing: .11em; white-space: nowrap; }
td { font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td, tbody tr.is-selected td { background: rgba(255, 113, 54, .035); }
tbody tr.is-selected td:first-child { box-shadow: inset 2px 0 0 var(--orange); }
.matchup { display: flex; align-items: center; gap: 9px; font-weight: 700; white-space: nowrap; }
.team-code { display: grid; place-items: center; width: 36px; height: 29px; border: 1px solid var(--line-strong); border-radius: 4px; font: 600 10px "IBM Plex Mono", monospace; }
.game-score { color: var(--muted-strong); font: 500 11px "IBM Plex Mono", monospace; white-space: nowrap; }
.data-state { color: var(--muted); font: 500 9px "IBM Plex Mono", monospace; text-transform: uppercase; }
.data-state.ready { color: var(--green); }
.inspect-button { min-width: 72px; padding: 8px 11px; color: var(--text); background: transparent; border: 1px solid var(--line-strong); border-radius: 5px; cursor: pointer; font: 600 9px "IBM Plex Mono", monospace; letter-spacing: .05em; }
.inspect-button:hover, .inspect-button:focus-visible, .inspect-button.active { color: #0a0c0e; background: var(--orange); border-color: var(--orange); outline: 0; }
.inspect-button:disabled { color: var(--muted); background: transparent; border-color: var(--line); cursor: not-allowed; }
.empty-cell { height: 182px; color: var(--muted); text-align: center; font: 400 11px/1.6 "IBM Plex Mono", monospace; }

.trace-id { color: var(--muted); font: 500 9px "IBM Plex Mono", monospace; }
.trace-empty, .prediction-empty { min-height: 302px; padding: 38px 28px; display: grid; place-content: center; text-align: center; color: var(--muted); font: 400 11px/1.7 "IBM Plex Mono", monospace; }
.trace-empty p { max-width: 290px; margin: 15px 0 0; font: 400 12px/1.6 "Manrope", sans-serif; }
.trace-symbol { margin: 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--orange); font: 600 11px "IBM Plex Mono", monospace; }
.trace-list { list-style: none; margin: 0; padding: 6px 22px 12px; }
.trace-list li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.trace-list li:last-child { border-bottom: 0; }
.trace-list li.model-selection { margin: 6px -10px 2px; padding: 14px 10px; border: 1px solid rgba(255, 113, 54, .3); border-radius: 6px; background: var(--orange-soft); }
.trace-list .step { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--orange); font: 600 9px "IBM Plex Mono", monospace; }
.trace-list .model-selection .step { color: #0a0c0e; border-color: var(--orange); background: var(--orange); }
.trace-list .model-selection strong { color: var(--orange); }
.trace-list strong, .trace-list small { display: block; }
.trace-list strong { font-size: 13px; }
.trace-list small { margin-top: 3px; color: var(--muted); font: 400 10px/1.5 "IBM Plex Mono", monospace; }
.trace-list .selection-details { display: grid; gap: 7px; margin-top: 7px; overflow-wrap: anywhere; }
.trace-list .selection-details small { margin: 0; }
.trace-list .selection-prediction { color: var(--text); }
.trace-list .selection-outcome { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.trace-list .selection-outcome .outcome-pill { display: inline-block; padding: 4px 8px; font-size: 10px; letter-spacing: .02em; }

.prediction-panel { margin-top: 18px; scroll-margin-top: 88px; }
.prediction-heading { min-height: 96px; gap: 16px; flex-wrap: wrap; }
.outcome-pill { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font: 600 9px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; white-space: nowrap; }
.outcome-pill.hit { color: var(--green); border-color: rgba(112, 225, 161, .32); background: rgba(112, 225, 161, .06); }
.outcome-pill.miss { color: var(--orange); border-color: rgba(255, 113, 54, .32); background: rgba(255, 113, 54, .06); }
.prediction-empty { min-height: 230px; }
.prediction-story { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.prediction-story article { min-height: 126px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.prediction-story article:last-child { border-right: 0; }
.prediction-story .leader-card { background: var(--orange-soft); }
.prediction-story span { color: var(--muted); font: 500 9px/1 "IBM Plex Mono", monospace; letter-spacing: .1em; }
.prediction-story strong { margin: 14px 0 6px; font-size: clamp(16px, 2vw, 22px); letter-spacing: -.025em; }
.prediction-story small { color: var(--muted); font: 400 10px/1.45 "IBM Plex Mono", monospace; }
.ranking-table td { padding-block: 13px; }
.ranking-table .starter-name { white-space: normal; overflow-wrap: anywhere; }
.ranking-table .starter-position { display: block; margin: 4px 0 0; }
.rank-number { color: var(--muted); font: 500 10px "IBM Plex Mono", monospace; }
.starter-name { font-weight: 700; white-space: nowrap; }
.starter-position { margin-left: 7px; color: var(--muted); font: 400 9px "IBM Plex Mono", monospace; }
.team-label, .input-rate { color: var(--muted-strong); font: 500 10px "IBM Plex Mono", monospace; white-space: nowrap; }
.actual-row td { background: rgba(112, 225, 161, .035); }
.actual-row .starter-name::after { content: "ACTUAL"; margin-left: 8px; padding: 3px 5px; color: var(--green); border: 1px solid rgba(112, 225, 161, .3); border-radius: 3px; font: 600 8px/1 "IBM Plex Mono", monospace; }
.probability-cell { min-width: 164px; }
.probability-line { display: flex; align-items: center; gap: 10px; }
.probability-line strong { min-width: 47px; font: 600 11px "IBM Plex Mono", monospace; }
.probability-track { flex: 1; height: 5px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.probability-fill { display: block; width: var(--probability-width, 0%); height: 100%; border-radius: inherit; background: var(--orange); }
.actual-row .probability-fill { background: var(--green); }
.model-note { margin: 0; padding: 14px 22px; color: var(--muted); border-top: 1px solid var(--line); font: 400 9px/1.6 "IBM Plex Mono", monospace; }

.research-panel { margin-bottom: 48px; }
#shadow-research { scroll-margin-top: 88px; }
.research-copy { margin: 0; padding: 20px 22px 10px; color: var(--muted-strong); font-size: 16px; line-height: 1.6; }
.research-coverage, .research-note { margin: 0; padding: 12px 22px; color: var(--muted-strong); font-size: 14px; line-height: 1.65; }
.research-coverage { border-bottom: 1px solid var(--line); }
.research-note { border-bottom: 1px solid var(--line); }
.research-table { min-width: 850px; }
.research-table td { font-size: 14px; font-variant-numeric: tabular-nums; }
.research-table th { font-size: 12px; white-space: nowrap; }
.research-table td small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.research-panel .empty-cell { font-size: 14px; height: 130px; }
.research-subheading { margin: 0; padding: 22px; font-size: 16px; border-bottom: 1px solid var(--line); }
.research-panel .table-wrap:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
@media (max-width: 820px) {
  .research-panel .panel-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
}

.method-grid { margin-top: 18px; display: grid; grid-template-columns: .8fr 1.7fr; scroll-margin-top: 88px; }
.method-heading { padding: 30px; border-right: 1px solid var(--line); }
.method-heading h2 { max-width: 390px; }
.method-heading > p:last-child { max-width: 410px; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.method-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); }
.method-steps li { min-height: 126px; padding: 22px; display: flex; gap: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.method-steps li:nth-child(even) { border-right: 0; }
.method-steps li:nth-last-child(-n+2) { border-bottom: 0; }
.method-steps li > span { color: var(--orange); font: 600 10px "IBM Plex Mono", monospace; }
.method-steps strong, .method-steps small { display: block; }
.method-steps strong { font-size: 14px; }
.method-steps small { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.5; }

footer { min-height: 74px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font: 400 10px "IBM Plex Mono", monospace; }
.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; }

@media (max-width: 1060px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topnav { display: none; }
  .validation-band { grid-template-columns: repeat(4, 1fr); }
  .validation-copy { grid-column: 1 / -1; min-height: 92px; border-right: 0; border-bottom: 1px solid var(--line); }
  .validation-stat { min-height: 92px; }
  .surface-grid { grid-template-columns: 1.25fr .75fr; }
  .method-grid { grid-template-columns: 1fr; }
  .method-heading { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .workspace-heading { align-items: flex-start; flex-direction: column; }
  .system-state { flex-basis: auto; width: 100%; }
  .section-intro { align-items: flex-start; flex-direction: column; gap: 12px; }
  .surface-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .prospective-metrics { grid-template-columns: repeat(2, 1fr); }
  .prospective-metrics article:nth-child(2) { border-right: 0; }
  .prospective-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .prediction-story { grid-template-columns: 1fr; }
  .prediction-story article { min-height: 106px; border-right: 0; border-bottom: 1px solid var(--line); }
  .prediction-story article:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .topbar { height: 60px; }
  .phase-pill { display: none; }
  main { padding-top: 32px; }
  h1 { font-size: clamp(36px, 12vw, 52px); }
  .validation-band { grid-template-columns: repeat(2, 1fr); }
  .watchlist-panel .panel-heading { align-items: flex-start; flex-direction: column; }
  .watchlist-table th:nth-child(4), .watchlist-table td:nth-child(4) { display: none; }
  .validation-stat:nth-child(odd) { border-right: 0; }
  .validation-stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .metric { min-height: 92px; padding: 16px; }
  .metric-grid { margin-bottom: 38px; }
  .panel-heading { align-items: flex-start; }
  th, td { padding: 13px 15px; }
  .schedule-panel th:nth-child(2), .schedule-panel td:nth-child(2) { display: none; }
  .prediction-heading { align-items: flex-start; flex-direction: column; }
  .ranking-table th:nth-child(3), .ranking-table td:nth-child(3) { display: none; }
  .ranking-table th, .ranking-table td { padding-inline: 10px; }
  .ranking-table th:first-child { width: 42px; }
  .ranking-table th:last-child { width: 100px; white-space: normal; }
  .ranking-table .probability-cell { min-width: 100px; }
  .ranking-table .probability-track { display: none; }
  .probability-cell { min-width: 132px; }
  .method-heading { padding: 24px 20px; }
  .method-steps { grid-template-columns: 1fr; }
  .method-steps li { border-right: 0; border-bottom: 1px solid var(--line); }
  .method-steps li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  footer { padding-block: 20px; align-items: flex-start; flex-direction: column; }
}
/* Extend the existing dashboard: three independent opening forecasts. */
.opening-forecast-panel { margin-top: 1.5rem; }
.opening-forecast-panel .panel-heading { gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.opening-forecast-panel .panel-heading > div { flex: 1 1 20rem; min-width: 0; }
.opening-forecast-panel .date-range { display: block; white-space: normal; overflow-wrap: anywhere; }
.opening-forecast-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: 0 1.5rem; }
.opening-forecast-grid article { display: flex; flex-direction: column; gap: .65rem; padding: 1rem; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius); min-width: 0; }
.opening-forecast-grid span { font-size: .875rem; font-weight: 700; }
.opening-forecast-grid strong { font-size: 1.25rem; overflow-wrap: anywhere; }
.opening-forecast-grid small { font-size: .875rem; line-height: 1.6; }
.opening-forecast-grid details { font-size: .875rem; line-height: 1.6; }
.opening-forecast-grid summary { cursor: pointer; color: var(--orange); }
.opening-forecast-grid summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.opening-forecast-grid ul { padding-left: 1.2rem; color: var(--muted-strong); }
.forecast-spinner { display: inline-block; width: 1em; height: 1em; margin-right: .55rem; border: 2px solid var(--line-strong); border-top-color: var(--orange); border-radius: 50%; vertical-align: -.1em; animation: forecast-spin .8s linear infinite; }
@keyframes forecast-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .forecast-spinner { animation: none; } }
@media (max-width: 760px) { .opening-forecast-grid { grid-template-columns: 1fr; padding: 0 1rem; } }

/* Saved pregame records are separate from recalculated research previews. */
.saved-forecast-panel { margin-bottom: 3rem; border-top: 3px solid var(--orange); scroll-margin-top: 88px; }
.saved-forecast-panel .panel-heading { gap: 1rem; flex-wrap: wrap; }
.saved-forecast-panel .panel-kicker { font-size: .75rem; line-height: 1.6; }
.saved-intro, .saved-method-comparison > p { margin: 0; padding: 1rem 1.5rem; font-size: 1rem; line-height: 1.65; color: var(--muted-strong); }
.saved-intro a, .saved-record-link { color: var(--orange); text-underline-offset: 3px; }
.saved-status, .saved-coverage { padding: .75rem 1.5rem; margin: 0; font-size: .875rem; line-height: 1.6; }
.saved-status { color: var(--muted-strong); border-bottom: 1px solid var(--line); }
.saved-coverage { color: var(--muted); }
.saved-refresh { border: 1px solid var(--line-strong); border-radius: 6px; padding: .7rem 1rem; min-height: 44px; background: var(--surface-2); color: var(--text); cursor: pointer; font-size: .875rem; }
.saved-refresh:hover { border-color: var(--orange); }
.saved-refresh:disabled { opacity: .6; cursor: wait; }
.saved-forecast-panel :is(button, a, summary, .table-wrap):focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.saved-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.saved-metrics article { padding: 1.25rem 1.5rem; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.saved-metrics article:last-child { border-right: 0; }
.saved-metrics span, .saved-metrics small { display: block; font-size: .875rem; line-height: 1.6; color: var(--muted-strong); }
.saved-metrics strong { display: block; margin: .6rem 0; font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.saved-table { min-width: 940px; width: 100%; table-layout: fixed; }
.saved-table caption { padding: .75rem 1.5rem; text-align: left; font-size: .875rem; color: var(--muted); }
.saved-table th { font-size: .875rem; line-height: 1.5; letter-spacing: 0; }
.saved-table td { vertical-align: top; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.saved-table td strong, .saved-table td small { display: block; }
.saved-table td small { color: var(--muted-strong); font-size: .875rem; line-height: 1.6; margin-top: .5rem; }
.saved-result { display: block; width: fit-content; margin-top: .75rem; padding: .25rem .5rem; border: 1px solid var(--line-strong); border-radius: 4px; font-size: .875rem; line-height: 1.5; color: var(--muted-strong); }
.saved-result.hit { color: var(--green); border-color: rgba(112,225,161,.4); }
.saved-result.miss { color: var(--orange); border-color: rgba(255,113,54,.4); }
.saved-record-link { display: inline-block; font-size: .875rem; margin-top: .75rem; padding-block: .4rem; }
.saved-forecast-panel .empty-cell { font-size: 1rem; height: 120px; line-height: 1.7; }
.saved-method-comparison { border-top: 1px solid var(--line); }
.saved-method-comparison > summary { cursor: pointer; padding: 1.25rem 1.5rem; font-size: 1rem; color: var(--orange); }
.saved-comparison-table { min-width: 900px; }
@media (max-width: 1000px) { .saved-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .saved-metrics { grid-template-columns: 1fr; }
  .saved-metrics article { border-right: 0; }
  .saved-table { min-width: 800px; }
}

/* First Basket Lab: a focused daily view, with research on its own page. */
.lab-site { font-size: 16px; line-height: 1.6; }
.lab-site .topbar { grid-template-columns: 1fr auto; }
.lab-site .topnav { display: flex; }
.lab-site .topnav a { font-size: 12px; line-height: 1.5; padding-block: 12px; }
.lab-site .topnav a[aria-current="page"] { color: var(--orange); }
.lab-site :is(a, button, input, summary, .table-wrap):focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.lab-site .workspace { max-width: 1280px; }
.lab-site .panel-heading h3 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.02em; }
.lab-site :is(.eyebrow, .panel-kicker, .date-range, .trace-id, .data-state, .team-code, .game-score, .model-note) { font-size: 12px; line-height: 1.6; }
.lab-site th { font-size: 12px; line-height: 1.5; letter-spacing: .04em; }
.lab-site td, .lab-site .inspect-button { font-size: 14px; }
.lab-site .inspect-button { min-height: 44px; white-space: nowrap; }
.lab-site .date-control input { min-height: 44px; font-size: 14px; }
.lab-site .trace-list strong { font-size: 15px; }
.lab-site .trace-list small { font-size: 13px; }
.lab-site :is(.empty-cell, .trace-empty, .section-intro p:last-child) { font-size: 14px; line-height: 1.7; }
.lab-site .opening-forecast-grid { margin-block: 24px; }
.lab-site .opening-forecast-grid small { color: var(--muted-strong); }
.lab-site .opening-forecast-grid article:nth-child(2) { border-color: rgba(255,113,54,.45); background: var(--orange-soft); }
.lab-site .table-wrap:focus-visible { outline-offset: -2px; }
.lab-site footer { font-size: 12px; line-height: 1.6; }
.daily-section { margin-bottom: 56px; scroll-margin-top: 100px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.home-page h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.15; letter-spacing: -.04em; }
.section-heading h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; letter-spacing: -.035em; }
.section-description { max-width: 820px; color: var(--muted-strong); margin: 18px 0; line-height: 1.7; }
.daily-status { margin: 20px 0; color: var(--muted-strong); font-size: 14px; line-height: 1.7; }
.daily-best-panel { margin-top: 20px; }
.daily-best-panel .panel-heading { min-height: 0; padding-block: 22px; }
.daily-best-panel h3 { margin: 0; font-size: 24px; }
.daily-context { margin: 6px 0 0; color: var(--muted-strong); font-size: 14px; }
.daily-tie { margin: 10px 0 0; font-size: 14px; color: var(--orange); }
.daily-best-panel .research-note { border-bottom: 0; border-top: 1px solid var(--line); }
.daily-empty { padding: 36px 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--muted-strong); line-height: 1.7; }
#today-games > .section-heading { padding: 26px; border-bottom: 1px solid var(--line); }
#today-games > .section-heading p:last-child { margin: 10px 0 0; font-size: 14px; color: var(--muted-strong); }
.today-mobile-label { display: none; }
.today-table { min-width: 770px; }
.today-table td { vertical-align: top; }
.today-table small { display: block; margin-top: 8px; color: var(--muted-strong); font-size: 12px; line-height: 1.6; }
.today-table .daily-leading td { background: rgba(255,113,54,.035); }
.today-table .daily-leading td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.today-table .daily-leading td:nth-child(3) small { color: var(--orange); }
#today-game-detail { padding: 0 24px 24px; }
.replay-intro { border-top: 1px solid var(--line-strong); padding-top: 40px; margin-top: 12px; }
.accuracy-panel { margin-bottom: 32px; }
.accuracy-panel .panel-heading { flex-wrap: wrap; gap: 16px; }
.accuracy-context, .accuracy-note { margin: 0; padding: 0 24px 16px; color: var(--muted-strong); font-size: 14px; line-height: 1.7; }
.accuracy-context { padding-top: 16px; }
.accuracy-grid strong { font-size: clamp(32px, 4vw, 44px); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.accuracy-grid .accuracy-count { font-weight: 700; color: var(--text); }
.accuracy-grid details { border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.accuracy-grid details p { margin: 8px 0 0; color: var(--muted-strong); overflow-wrap: anywhere; }

.accuracy-exclusions-button { padding: 5px 0; border: 0; background: transparent; color: var(--orange); text-align: left; text-decoration: underline; text-underline-offset: 4px; line-height: 1.6; cursor: pointer; }
.accuracy-exclusions-button:hover { color: var(--text); }
.accuracy-exclusions-button:focus-visible, .accuracy-dialog-close:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 3px; }
.accuracy-dialog { width: min(580px, calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: clamp(20px, 4vw, 28px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 24px 80px #0009; }
.accuracy-dialog::backdrop { background: rgba(0, 0, 0, .76); backdrop-filter: blur(4px); }
.accuracy-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.accuracy-dialog-heading .panel-kicker { margin: 0 0 8px; }
.accuracy-dialog h2 { margin: 0; font-size: clamp(22px, 5vw, 28px); line-height: 1.2; }
.accuracy-dialog-close { flex-shrink: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.accuracy-dialog-close:hover { border-color: var(--orange); }
.accuracy-dialog-total { margin: 24px 0 8px; font-weight: 600; line-height: 1.6; }
.accuracy-dialog-description, .accuracy-dialog-empty { color: var(--muted-strong); font-size: 14px; line-height: 1.6; }
.accuracy-dialog-description { margin: 0 0 20px; }
.accuracy-exclusion-list { margin: 0; padding: 0; list-style: none; }
.accuracy-exclusion-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.accuracy-exclusion-list li:last-child { padding-bottom: 0; }
.accuracy-exclusion-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.accuracy-exclusion-heading h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.accuracy-exclusion-count { flex-shrink: 0; color: var(--orange); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.accuracy-exclusion-list p { margin: 6px 0 0; color: var(--muted-strong); font-size: 14px; line-height: 1.6; }

.home-page .opening-forecast-panel { margin-bottom: 32px; }
.saved-archive { margin-top: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.saved-archive > summary { padding: 24px; cursor: pointer; font-weight: 700; font-size: 18px; }
.saved-archive > summary span { display: block; padding-left: 22px; margin-top: 8px; font-size: 14px; font-weight: 400; color: var(--muted-strong); }
.saved-archive .saved-forecast-panel { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; }
.research-link { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 0 0; }
.research-link h2 { margin: 0; font-size: 20px; }
.research-link p { margin: 8px 0 0; color: var(--muted-strong); font-size: 14px; }
.research-link a { color: var(--orange); text-underline-offset: 4px; white-space: nowrap; }
.research-page .workspace-heading { margin-bottom: 40px; }
.research-page .workspace-heading h1 { font-size: clamp(36px, 4.5vw, 58px); line-height: 1.15; }
.research-page :is(.validation-copy small, .validation-stat small, .validation-stat span, .metric span, .system-state small, .method-steps small) { font-size: 12px; line-height: 1.6; }
.research-page .watchlist-state { font-size: 11px; }
@media (max-width: 760px) {
  .lab-site .topbar { height: auto; min-height: 90px; padding-block: 12px; grid-template-columns: 1fr; gap: 6px; }
  .lab-site .topnav { gap: clamp(12px, 4vw, 24px); justify-content: flex-start; flex-wrap: wrap; }
  .lab-site .topnav a { font-size: 11px; padding-block: 6px; }
  .lab-site main { padding-top: 28px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .daily-section { margin-bottom: 36px; scroll-margin-top: 140px; }
  .lab-site :is(.replay-intro, .saved-forecast-panel) { scroll-margin-top: 140px; }
  .research-link { flex-direction: column; align-items: flex-start; }
  #today-games > .section-heading { padding: 20px; }
  #today-game-detail { padding: 0 12px 12px; }

  #today-games > .table-wrap { overflow: visible; }
  .today-table { display: block; position: relative; min-width: 0; }
  .today-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .today-table tbody { display: grid; gap: 14px; padding: 16px; }
  .today-table tbody tr { display: grid; min-width: 0; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
  .today-table tbody td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; background: transparent; }
  .today-table .today-matchup-cell { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .today-table .today-mobile-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
  .today-table small { margin-top: 6px; line-height: 1.6; }
  .today-table .daily-leading { border-color: rgba(255,113,54,.45); box-shadow: inset 3px 0 0 var(--orange); }
  .today-table .daily-leading td { background: transparent; }
  .today-table .daily-leading td:first-child { box-shadow: none; }
  .today-table .today-action-cell .inspect-button { width: 100%; }
  .today-table .today-action-empty { display: none; }
  .today-table .empty-cell { display: grid; align-items: center; height: auto; min-height: 100px; }

}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
