/* Mobile-first; no framework. */
:root {
  --fg: #1b1f24;
  --muted: #5b6470;
  --bg: #ffffff;
  --panel: #f4f6f8;
  --line: #dde2e7;
  --accent: #0b5cad;
  --lead: #0b5cad;
  --wc: #6a7686;
  --up: #1a7f37;
  --down: #c2261d;
  --forced: #fff4d6;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e9ed;
    --muted: #9aa4b0;
    --bg: #14171b;
    --panel: #1d2127;
    --line: #2f353d;
    --accent: #6cb0ff;
    --lead: #3d8be0;
    --wc: #6f7b8a;
    --up: #4ac26b;
    --down: #ff7b72;
    --forced: #3a321c;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
a { color: var(--accent); }
header.site, main, .error { max-width: 980px; margin: 0 auto; padding: 0 12px; }
header.site h1 { margin: 12px 0 0; font-size: 1.4rem; }
.meta, .hint, .legend { color: var(--muted); font-size: 0.85rem; margin: 4px 0 8px; }
section { margin: 18px 0; }
h2 { font-size: 1.15rem; margin: 0; }
h3 { font-size: 1rem; margin: 12px 0 4px; }
.bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.label { color: var(--muted); font-size: 0.85rem; }
.busy { font-size: 0.85rem; color: var(--accent); }
.error { border: 1px solid var(--down); border-radius: 6px; padding: 8px 12px; margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Playoff Picture */
#picture-body[aria-busy="true"] { opacity: 0.6; transition: opacity 0.15s; }
.table-wrap { overflow-x: auto; }
table.picture { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.picture th, .picture td { padding: 4px 4px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.picture th.team, .picture .div-row th { text-align: left; }
.picture thead th { color: var(--muted); font-weight: 600; font-size: 0.75rem; }
.picture .div-row th { background: var(--panel); font-size: 0.75rem; color: var(--muted); padding-top: 6px; }
.picture abbr { text-decoration: none; font-weight: 600; }
.picture tr.in th.team abbr { color: var(--accent); }
.picture .strong { font-weight: 600; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.badge {
  display: inline-block; min-width: 1.3em; padding: 0 3px; border-radius: 3px;
  font-size: 0.7rem; font-weight: 700; text-align: center; color: #fff; vertical-align: 1px;
}
.badge.lead { background: var(--lead); }
.badge.wc { background: var(--wc); }
/* Narrow screens: Δ replaces the baseline column; in a scenario, expected record is dropped too. */
@media (max-width: 479px) {
  .col-base, .scenario .col-exp { display: none; }
}

/* Schedule */
.filter { display: inline-flex; gap: 6px; align-items: center; font-size: 0.9rem; margin-bottom: 6px; }
.filter select { font: inherit; max-width: 70vw; }
button { font: inherit; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; }
button:disabled { opacity: 0.5; cursor: default; }
details.week { border-top: 1px solid var(--line); }
details.week summary { padding: 8px 0; cursor: pointer; font-weight: 600; }
details.week .count { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
ul.games { list-style: none; margin: 0 0 8px; padding: 0; }
li.game { padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; background: var(--panel); }
li.game.forced { background: var(--forced); }
li.game .when { font-size: 0.75rem; color: var(--muted); }
li.game.done .final { font-variant-numeric: tabular-nums; }
li.game.done .won { font-weight: 700; }
li.game .status { color: var(--muted); font-size: 0.85rem; }
fieldset.pick { display: grid; grid-template-columns: 1fr auto 1fr; gap: 4px; border: 0; padding: 0; margin: 4px 0 0; }
.pick .opt { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick .opt span {
  display: block; text-align: center; padding: 6px 4px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); font-variant-numeric: tabular-nums; min-height: 2.4em;
}
.pick .opt.model span { color: var(--muted); padding-inline: 10px; }
.pick input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.pick input:disabled + span { opacity: 0.6; }
.pick small { color: var(--muted); }

#about ul { padding-left: 18px; }
#about li { margin-bottom: 4px; }

@media (min-width: 720px) {
  table.picture { font-size: 0.9rem; }
  .picture th, .picture td { padding: 4px 8px; }
}
