:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101916;
  --panel: #18231f;
  --panel-2: #1f302a;
  --line: #2b3e36;
  --line-2: #385046;
  --text: #f3f1e8;
  --muted: #a8b9af;
  --faint: #8a9d93;
  --accent: #70cfb2;
  --on-accent: #0d1f19;
  --good: #0aac23;
  --bad: #eb6263;
  --gold: #d28e05;
  --live: #ff4d4f;
  --fav: #d28e05;
  --good-text: #5fd46f;
  --bad-text: #ff8f90;
  --warn-text: #f0b43c;
  --tooltip: #0b0d11;
  --shadow: rgba(0,0,0,.5);
  --hover: rgba(255,255,255,.03);
  --radius: 10px;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }
.loading, .empty { padding: 48px; text-align: center; color: var(--muted); }
.error { padding: 24px; color: var(--bad); }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 10px 20px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 6px 12px; border-radius: 999px; color: var(--muted); font-weight: 550; }
.tabs a:hover { color: var(--text); background: var(--panel-2); }
.tabs a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search { position: relative; }
.search input { width: 220px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search-results { position: absolute; right: 0; top: 40px; width: 320px; max-height: 420px; overflow: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.search-results a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a.sel { background: var(--panel-2); color: var(--text); }
.fav-btn { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); cursor: pointer; font-size: 13px; color: var(--muted); }
.fav-btn img { width: 22px; height: 22px; }
.fav-btn:hover { border-color: var(--fav); }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.sync-dot.ok { background: var(--good); }
.sync-dot.busy { background: var(--gold); animation: pulse 1.2s infinite; }
.sync-dot.err { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }

main { max-width: 1480px; margin: 0 auto; padding: 20px; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.025em; }
.spacer { flex: 1; }

/* generic */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; }
.panel-body { padding: 12px 16px; }
.btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .4; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button, .seg a { padding: 6px 12px; background: var(--panel); border: 0; border-right: 1px solid var(--line-2); cursor: pointer; color: var(--muted); }
.seg > :last-child { border-right: 0; }
.seg .on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--muted); cursor: pointer; font-size: 13px; }
.chip.on { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.logo.sm { width: 20px; height: 20px; }
.logo.lg { width: 56px; height: 56px; }
.logo.xl { width: 88px; height: 88px; }
.head-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--panel-2); flex: none; }
.tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .03em;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); }
.tag.score { background: rgba(10,172,35,.15); color: var(--good-text); border-color: rgba(10,172,35,.4); }
.tag.to { background: rgba(235,98,99,.15); color: var(--bad-text); border-color: rgba(235,98,99,.4); }
.tag.pen { background: rgba(210,142,5,.15); color: var(--warn-text); border-color: rgba(210,142,5,.4); }
.tag.live { background: var(--live); color: #fff; border-color: var(--live); }
.tag.fav { background: rgba(210,142,5,.18); color: var(--warn-text); border-color: rgba(210,142,5,.5); }
.pos { color: var(--good); }
.neg { color: var(--bad); }

/* week strip */
.weeks { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.weeks a { flex: none; padding: 6px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); text-align: center; }
.weeks a small { display: block; font-size: 11px; color: var(--faint); }
.weeks a.on { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.weeks a.cur:not(.on) { border-color: var(--line-2); color: var(--text); }

/* game cards */
.day-label { margin: 22px 0 10px; font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gcard { display: block; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
.gcard:hover { border-color: var(--line-2); transform: translateY(-1px); color: inherit; }
.gcard.fav { border-color: rgba(210,142,5,.6); box-shadow: 0 0 0 1px rgba(210,142,5,.25); }
.gcard.live { border-color: rgba(255,77,79,.55); }
.gcard .row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.gcard .tname { flex: 1; font-weight: 600; }
.gcard .tname small { color: var(--faint); font-weight: 400; margin-left: 6px; }
.gcard .sc { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.gcard .loser { color: var(--muted); }
.gcard .loser .sc { color: var(--faint); }
.gcard .poss::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--gold); vertical-align: middle; }
.gcard .meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.gcard .meta .status { font-weight: 650; color: var(--text); }
.gcard .situ { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 14px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }

/* game page */
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 20px 24px; }
.sb-team { display: flex; align-items: center; gap: 16px; }
.sb-team.home { flex-direction: row-reverse; text-align: right; }
.sb-team .nm { font-size: 20px; font-weight: 700; }
.sb-team .rec { color: var(--muted); font-size: 13px; }
.sb-team .big { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 0 8px; }
.sb-team.lost .big { color: var(--faint); }
.sb-mid { text-align: center; }
.sb-mid .st { font-size: 15px; font-weight: 700; }
.sb-mid .sub { font-size: 12px; color: var(--muted); }
.linescore { border-collapse: collapse; margin: 6px auto 0; font-size: 13px; }
.linescore th, .linescore td { padding: 2px 8px; text-align: center; font-variant-numeric: tabular-nums; }
.linescore th { color: var(--faint); font-weight: 500; }
.linescore td.t { font-weight: 700; }
.game-info { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 8px 16px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.subtabs { display: flex; gap: 4px; margin: 16px 0 12px; border-bottom: 1px solid var(--line); }
.subtabs a { padding: 8px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs a.active { color: var(--text); border-bottom-color: var(--accent); }

.pbp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 16px; align-items: start; }
.pbp-left { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 12px; }
.field-wrap { padding: 10px; }
.field { width: 100%; height: auto; display: block; border-radius: 6px; }
.field text { font-family: system-ui, sans-serif; }
.play-card { padding: 14px 16px; }
.play-card .when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.play-card .when b { color: var(--text); }
.play-card .txt { margin: 8px 0 10px; font-size: 15px; line-height: 1.5; }
.play-card .facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { padding: 6px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); min-width: 74px; }
.fact small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.fact b { font-size: 15px; font-variant-numeric: tabular-nums; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
.controls .btn { min-width: 40px; }
.controls input[type=range] { flex: 1 1 140px; min-width: 0; accent-color: var(--accent); }
.controls .pos-label { font-size: 12px; color: var(--muted); min-width: 80px; text-align: right; font-variant-numeric: tabular-nums; }
.controls select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px; }
.kbd { font-size: 11px; color: var(--faint); padding: 0 12px 10px; }
.controls .say-btn { white-space: nowrap; }
.controls .say-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.say-line { margin: 0 12px 10px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--panel-2); border-radius: 6px; font-size: 13px; line-height: 1.45; }

.feed { max-height: calc(100vh - 150px); overflow: auto; }
.feed-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.qtr { padding: 8px 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.drive-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--hover); cursor: pointer; }
.drive-head .res { font-weight: 650; font-size: inherit; padding: 0; border-radius: 0; background: none; letter-spacing: normal; white-space: nowrap; }
.drive-head .res.score { color: var(--good-text); }
.drive-head .res.to { color: var(--bad-text); }
.drive-head .dsum { font-size: 12px; color: var(--muted); }
.drive-head .chev { margin-left: auto; color: var(--faint); transition: transform .15s; }
.drive.collapsed .chev { transform: rotate(-90deg); }
.drive.collapsed .play { display: none; }
.play { display: grid; grid-template-columns: 62px 18px 1fr auto; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); cursor: pointer; border-left: 3px solid transparent; }
.play:hover { background: var(--panel-2); }
.play.sel { background: color-mix(in srgb, var(--accent) 14%, transparent); border-left-color: var(--accent); }
.play .clk { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.play .clk b { display: block; color: var(--text); font-weight: 600; }
.play .dd { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.play .t { font-size: 13px; }
.play .side { text-align: right; font-size: 12px; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.play.minor .t { color: var(--muted); font-style: italic; }
.play.scoring { background: rgba(10,172,35,.07); }
.play.scoring.sel { background: rgba(51,140,237,.16); }
.epa { font-variant-numeric: tabular-nums; font-weight: 650; }

.wp-chart { padding: 10px 12px 6px; }
.wp-chart svg { width: 100%; height: 170px; display: block; cursor: crosshair; }
.wp-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 0 4px 4px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.stats { width: 100%; border-collapse: collapse; font-size: 13px; }
table.stats th, table.stats td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.stats th { color: var(--faint); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; background: var(--panel); }
table.stats th.sortable { cursor: pointer; }
table.stats th.sortable:hover, table.stats th.sorted { color: var(--text); }
table.stats th.sorted::after { content: " ▾"; }
table.stats th.sorted.asc::after { content: " ▴"; }
table.stats td.l, table.stats th.l { text-align: left; }
table.stats tr:hover td { background: var(--hover); }
table.stats tr.fav td { background: rgba(210,142,5,.08); }
table.stats .who { display: flex; align-items: center; gap: 10px; }
table.stats .who small { color: var(--faint); }
table.stats td.rank { color: var(--faint); width: 30px; }
.box-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.box-team h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 4px 0 8px; }
.box-cat { margin-bottom: 14px; }
.box-cat h4 { margin: 0; padding: 8px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.compare { width: 100%; border-collapse: collapse; }
.compare td { padding: 8px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.compare td.lbl { text-align: center; color: var(--muted); font-size: 13px; }
.compare td.a { text-align: right; width: 35%; }
.compare td.h { text-align: left; width: 35%; }
.compare td.better { font-weight: 700; }
.cbar { height: 4px; border-radius: 2px; background: var(--line-2); margin-top: 4px; overflow: hidden; }
.cbar span { display: block; height: 100%; border-radius: 2px; }
.compare td.a .cbar span { margin-left: auto; }

/* standings / teams */
.div-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 16px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tcard:hover { border-color: var(--line-2); color: inherit; }
.tcard.fav { border-color: rgba(210,142,5,.6); }
.tcard .nm { font-weight: 650; }
.tcard .rec { color: var(--muted); font-size: 13px; }
.section-title { margin: 22px 0 10px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.team-hero { position: relative; display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.team-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, var(--tc, #333) 0%, transparent 70%); opacity: .35; }
.team-hero > * { position: relative; }
.team-hero h1 { font-size: 28px; }
.team-hero .sub { color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.tile { padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tile small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.tile b { font-size: 22px; font-variant-numeric: tabular-nums; }
.tile span { font-size: 12px; color: var(--muted); margin-left: 4px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.sched-row { display: grid; grid-template-columns: 70px 28px 1fr auto; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.sched-row:hover { background: var(--panel-2); color: inherit; }
.sched-row .wk { font-size: 12px; color: var(--muted); }
.sched-row .res { font-weight: 700; font-variant-numeric: tabular-nums; }
.res.W { color: var(--good); } .res.L { color: var(--bad); } .res.T { color: var(--gold); }
.leader-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.leader { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.leader small { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.leader b { font-size: 15px; }
.roster-group { margin-bottom: 14px; }
.player-hero { display: flex; align-items: center; gap: 20px; padding: 20px 24px; }
.player-hero img.hs { width: 110px; height: 80px; object-fit: cover; object-position: top; border-radius: 8px; background: var(--panel-2); }
.player-hero h1 { font-size: 26px; }
.bio { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; margin-top: 6px; }

.tooltip { position: fixed; z-index: 50; pointer-events: none; padding: 8px 10px; border-radius: 8px; background: var(--tooltip); border: 1px solid var(--line-2);
  box-shadow: 0 8px 24px rgba(0,0,0,.5); font-size: 12px; max-width: 320px; }
.tooltip b { font-size: 14px; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 20px; max-width: 760px; width: 92vw; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { font-size: 18px; margin-bottom: 4px; }
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 14px 0; max-height: 60vh; overflow: auto; }
.fav-grid button { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; text-align: left; font-size: 13px; }
.fav-grid button:hover, .fav-grid button.on { border-color: var(--fav); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.foot { margin: 30px 0 10px; text-align: center; font-size: 12px; color: var(--faint); }

@media (max-width: 1100px) {
  .pbp, .box-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .pbp-left { position: static; }
  .feed { max-height: none; }
  .div-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: 10px; }
  .search input { width: 150px; }
  .scoreboard { grid-template-columns: minmax(0, 1fr); }
  .sb-team.home { flex-direction: row; text-align: left; }
  .sb-team .big { font-size: 32px; }
  /* player header: photo and name on one row, bio and fantasy tile below */
  .player-hero { flex-wrap: wrap; gap: 12px 16px; padding: 16px; }
  .player-hero img.hs { width: 84px; height: 62px; }
  .player-hero h1 { font-size: 22px; }
  .player-hero > div:nth-child(2) { flex: 1 1 180px; min-width: 0; }
  .player-hero .spacer { display: none; }
  .player-hero > .tile { flex: 1 1 100%; }
}

.field-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 2px 4px 10px; font-size: 14px; }
.field-bar span { display: inline-flex; align-items: center; gap: 8px; }
table.stats.compact { width: auto; min-width: 420px; }
table.stats.compact td, table.stats.compact th { padding-left: 18px; }
.tiles.wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* graphics pass */
.brand img { width: 34px; height: 34px; }
.wordmark { display: flex; flex-direction: column; line-height: .93; color: var(--text);
  font-size: 17px; font-weight: 900; letter-spacing: -.025em; text-transform: uppercase; }
.wordmark small { color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .24em; margin-bottom: 3px; }
.game-head { position: relative; overflow: hidden; }
.game-head::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--ac) 0%, transparent 38%, transparent 62%, var(--hc) 100%); opacity: .28; }
.game-head > * { position: relative; }
.pico { padding-top: 2px; color: var(--faint); }
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
.ico-score { color: var(--good-text); fill: rgba(95,212,111,.25); }
.ico-turnover, .ico-sack { color: var(--bad-text); }
.ico-flag { color: var(--warn-text); fill: rgba(240,180,60,.25); }
.ico-pass { color: #6fb2ff; }
.ico-run { color: #b7c3d0; }
.ico-kick { color: #c9a27a; }
.drive-chart .drow:hover rect:first-child { fill: var(--hover); }
.drive-chart a:hover text { text-decoration: underline; }
.team-hero .watermark { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: 280px; height: 280px; object-fit: contain; opacity: .12; }
.player-hero { position: relative; overflow: hidden; }
.player-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, var(--tc) 0%, transparent 60%); opacity: .3; pointer-events: none; }
.player-hero > * { position: relative; }

/* light theme */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6ef;
  --panel: #ffffff;
  --panel-2: #eaf0e7;
  --line: #dce5db;
  --line-2: #c6d5ca;
  --text: #16251f;
  --muted: #465d52;
  --faint: #5c7266;
  --accent: #186751;
  --on-accent: #ffffff;
  --good: #0a8a1f;
  --bad: #d23c3d;
  --gold: #b77900;
  --good-text: #087a1b;
  --bad-text: #c0302f;
  --warn-text: #8f6100;
  --tooltip: #ffffff;
  --shadow: rgba(20,30,50,.15);
  --hover: rgba(0,0,0,.025);
}
:root[data-theme="light"] .tag.score { background: rgba(10,138,31,.1); }
:root[data-theme="light"] .tag.to { background: rgba(210,60,61,.1); }
:root[data-theme="light"] .tag.pen { background: rgba(183,121,0,.12); }
:root[data-theme="light"] .ico-pass { color: #1f6fd1; }
:root[data-theme="light"] .ico-run { color: #5b6878; }
:root[data-theme="light"] .ico-kick { color: #8a5a2b; }
:root[data-theme="light"] .game-head::before, :root[data-theme="light"] .team-hero::before, :root[data-theme="light"] .player-hero::before { opacity: .16; }
:root[data-theme="light"] .search-results, :root[data-theme="light"] .tooltip { box-shadow: 0 10px 30px var(--shadow); }
.theme-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.theme-btn:hover { color: var(--text); border-color: var(--accent); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* keyboard hints mean nothing on touch screens */
@media (hover: none) and (pointer: coarse) { .kbd { display: none; } }

/* ---- phone navigation: slim top bar + bottom tab bar ---- */
.icon-btn { display: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); cursor: pointer; align-items: center; justify-content: center; }
.icon-btn svg, .bnav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bnav, .more-sheet { display: none; }
@media (max-width: 760px) {
  .top { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .top .tabs, .top .sync-dot { display: none; }
  .brand img { width: 30px; height: 30px; }
  .top-right { gap: 8px; }
  .icon-btn { display: inline-flex; }
  .top .search { display: none; }
  .top.searching .search { display: block; position: absolute; left: 0; right: 0; top: 100%; padding: 8px 12px;
    background: var(--bg); border-bottom: 1px solid var(--line); }
  .top.searching .search input { width: 100%; font-size: 16px; } /* 16px stops iOS zooming in */
  .top.searching .search-results { left: 12px; right: 12px; top: 52px; width: auto; max-height: 60vh; }
  .top.searching #search-btn { color: var(--accent); border-color: var(--accent); }
  .top .fav-btn { display: none; } /* in the More sheet instead */
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .bnav { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; min-height: 56px; justify-content: center;
    color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer; }
  .bnav .active { color: var(--accent); }
  .bnav .tab-book.active { color: var(--gold-ink, var(--gold)); }
  .more-sheet:not([hidden]) { display: flex; flex-direction: column; position: fixed; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 41; min-width: 200px;
    background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.45); overflow: hidden; }
  .more-sheet a, .more-sheet button { display: flex; align-items: center; gap: 12px; padding: 13px 18px; font: inherit; font-weight: 600; color: var(--text); text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
  .more-sheet .active { color: var(--accent); }
  .more-sheet > :last-child { border-bottom: 0; }
}

/* Scores */
.score-page { --score-light: #6ee0ff; }
.score-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 390px); align-items: center; gap: 24px;
  position: relative; isolation: isolate; overflow: hidden; padding: clamp(20px, 4vw, 48px);
  margin-bottom: 16px; border: 1px solid #22486a; border-radius: 16px; color: #f4f8ff;
  background: radial-gradient(ellipse at 77% 0%, #224e76 0%, transparent 63%), linear-gradient(115deg, #081526 22%, #122e4c);
}
.score-hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -75% -26% -55% 29%;
  transform: rotate(-24deg);
  background: repeating-linear-gradient(90deg, #7ddfff32 0 2px, transparent 2px 86px),
    repeating-linear-gradient(0deg, #7ddfff20 0 1px, transparent 1px 43px);
  mask-image: linear-gradient(90deg, transparent 8%, #000 75%);
}
.score-season, .score-feature h2 {
  margin: 0 0 8px; color: var(--score-light); text-transform: uppercase;
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
}
.score-hero h1 { font-size: clamp(36px, 5.2vw, 72px); font-weight: 900; letter-spacing: -.055em; line-height: 1; }
.score-dates { margin: 10px 0 0; color: #c2d6eb; }
.score-pin, .score-bye { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0; }
.score-pin { padding: 7px 12px; color: #f4f8ff; background: #214566; border: 1px solid #4c769a; border-radius: 7px; cursor: pointer; }
.score-pin:hover { border-color: var(--score-light); }
.score-feature { min-width: 0; }
.score-feature .gcard { color: var(--text); } /* the hero forces white text; the card is a normal panel */
.score-page .weeks a { font-weight: 650; }
.score-page .day-label { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.score-page .day-label::before { content: ""; width: 16px; height: 3px; background: var(--accent); transform: skewX(-25deg); }
.score-page .games { grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr)); }
.score-page .gcard { padding: 6px; border-radius: 11px; }
.score-page .gcard:hover { border-color: var(--accent); }
.score-page .gcard .row {
  min-height: 50px; padding: 5px 10px; gap: 10px; border-inline-start: 3px solid var(--team-ink);
  background: linear-gradient(103deg, color-mix(in srgb, var(--team-ink) 18%, var(--panel-2)), var(--panel-2) 84%);
}
.score-page .gcard .row:first-child { border-radius: 5px 5px 0 0; }
.score-page .gcard .row + .row { margin-top: 2px; border-radius: 0 0 5px 5px; }
.score-logo { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 8px; background: #edf4fc; }
.score-logo .logo { width: 30px; height: 30px; object-fit: contain; }
.score-page .gcard .tname { min-width: 0; font-weight: 750; }
.score-page .gcard .tname small { color: var(--muted); white-space: nowrap; }
.score-page .gcard .sc { font-size: 26px; font-weight: 850; }
.score-page .gcard .loser .sc { color: var(--muted); }
.score-page .gcard .meta { margin: 0; padding: 9px 8px 3px; border-top: 0; }
.score-page .gcard .meta > :last-child { text-align: right; }
.score-page .gcard .situ { padding-inline: 8px; }
@media (max-width: 760px) {
  .score-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .score-page .games { grid-template-columns: minmax(0, 1fr); }
}

/* Week carousel */
.week-carousel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch; gap: 6px; }
.week-carousel .weeks { position: relative; padding: 2px; scrollbar-width: none; overscroll-behavior-inline: contain; }
.week-carousel .weeks::-webkit-scrollbar { display: none; }
.week-arrow { min-width: 36px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px;
  background: var(--panel); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.week-arrow:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.week-arrow:disabled { opacity: .38; cursor: default; }
.week-carousel .weeks a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* NFL standings */
.standings-grid { grid-template-columns: minmax(0, 1fr); }
.standings-table { table-layout: auto; }
.standings-table .who { white-space: normal; }
table.stats .standings-cutoff { padding: 0; border-bottom: 2px dashed var(--line-2); }
.standings-compact { display: none; }
.standings-grid .panel-head { flex-wrap: wrap; }
.standing-team + .standing-team { border-top: 1px solid var(--line); }
.standing-team.cutoff { border-bottom: 2px dashed var(--line-2); }
.standing-team.fav { background: color-mix(in srgb, var(--fav) 9%, var(--panel)); }
.standing-team { padding: 10px 12px; }
.standing-summary, .standing-cols { display: grid; grid-template-columns: minmax(0, 1fr) 46px 40px 30px 16px; gap: 6px; align-items: center; text-align: right; font-variant-numeric: tabular-nums; }
.standing-summary { cursor: pointer; list-style: none; }
.standing-summary::-webkit-details-marker { display: none; }
.standing-cols { padding: 6px 12px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); border-bottom: 1px solid var(--line); }
.standing-summary .pos { color: var(--good-text); } .standing-summary .neg { color: var(--bad-text); }
.standing-more::after { content: ''; display: inline-block; width: 7px; height: 7px; border: solid var(--faint); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-bottom: 3px; transition: transform .15s; }
.standing-team[open] .standing-more::after { transform: rotate(-135deg); margin-bottom: -3px; }
.standing-summary .who { text-align: left; min-width: 0; display: flex; gap: 8px; align-items: center; font-weight: 700; }
.standing-summary .logo { flex: none; }
.standing-summary b, .standing-seed { font-variant-numeric: tabular-nums; }
.standing-seed { color: var(--muted); min-width: 1.2em; }
.standing-team dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 6px; margin: 10px 0 2px; }
.standing-team dl div { padding: 6px 8px; border-radius: 6px; background: var(--panel-2); }
.standing-team dt { color: var(--muted); font-size: 11px; }
.standing-team dd { margin: 1px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.standing-team .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1000px) {
  .standings-table { display: none; }
  .standings-compact { display: block; }
}
@media (761px <= width <= 1280px) {
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
  .top .top-right { grid-column: 2; grid-row: 1; }
  .top .tabs { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; }
}

/* Shared site identity */
.top { border-top: 3px solid var(--accent); background: var(--panel); }
.tabs a.active { color: var(--accent); box-shadow: inset 0 -2px var(--accent), inset 0 0 0 1px var(--line); }
.btn { font-weight: 600; }
:where(a, button, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-footer { max-width: 1440px; margin: 24px auto 0; padding: 20px;
  border-top: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer nav > * { white-space: nowrap; }
.site-footer nav a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer p { margin: 0 0 0 auto; color: var(--muted); }
.site-info { max-width: 640px; margin: 24px auto; padding: clamp(18px, 4vw, 32px);
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); }
.site-info h1 { font-size: clamp(25px, 4vw, 34px); }
.site-info h2 { font-size: 18px; }
.site-info p { color: var(--muted); line-height: 1.65; }
.site-info p a, .site-info li a { text-decoration: underline; }
.site-footer p a { text-decoration: underline; }
.site-info-actions { display: flex; gap: 8px; }
.about .lead { font-size: 16px; color: var(--text); }
.about h2 { margin-top: 26px; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.about-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel-2); color: var(--text); text-decoration: none; }
.about-card:hover { border-color: var(--accent); }
.site-info .about-card, .site-info .about-card * { text-decoration: none; color: inherit; font-weight: inherit; }
.site-info .about-card b { font-weight: 700; }
.site-info .about-card span { color: var(--muted); }
.about-card b { font-size: 15px; }
.about-card span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.about-sources section { padding: 2px 0; }
.about-sources h3 { font-size: 15px; margin: 14px 0 0; }
.about-sources p { margin: 4px 0 0; }
.about-foot { margin-top: 22px; font-size: 14px; }
@media (min-width: 1000px) {
  .site-info.about { max-width: 1100px; padding: 36px 44px; }
  .about .lead { font-size: 18px; max-width: 760px; }
  .about-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .about-card { padding: 18px 20px; }
  .about-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .about-sources section { border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 20px 16px; }
}
@media (min-width: 640px) and (max-width: 999px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .site-footer p { flex-basis: 100%; margin-left: 0; }
}

/* Install as an app */
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.install-banner { display: none; }
@media (max-width: 760px) {
  .install-banner:not([hidden]) { display: flex; align-items: center; gap: 10px; position: fixed; left: 8px; right: 8px; z-index: 39;
    bottom: calc(64px + env(safe-area-inset-bottom)); padding: 10px 8px 10px 12px; border-radius: 12px;
    background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 6px 24px rgb(0 0 0 / .25); }
  .install-banner img { border-radius: 9px; flex: none; }
  .install-banner p { margin: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
  .install-banner span { color: var(--muted); font-size: 13px; }
  .install-banner .btn { flex: none; padding: 8px 14px; }
  .install-x { flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
  body.has-install-banner { padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
  body.has-install-banner .toasts { bottom: calc(146px + env(safe-area-inset-bottom)); }
}
.install-steps { padding-left: 20px; line-height: 1.6; }
.install-steps svg { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* New version available */
.update-bar:not([hidden]) { display: flex; align-items: center; gap: 10px; position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  top: calc(10px + env(safe-area-inset-top)); width: max-content; max-width: calc(100vw - 16px); padding: 8px 8px 8px 16px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--accent); box-shadow: 0 6px 24px rgb(0 0 0 / .3); }
.update-bar span { font-weight: 600; }
.update-bar .install-x { flex: none; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.team-colors-opt { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-weight: 600; cursor: pointer; }

/* Favorite team colors (app.js applyTeamColors) */
.team-theme .top { border-top: 0; box-shadow: inset 0 4px 0 var(--team-1);
  background: linear-gradient(100deg, color-mix(in srgb, var(--team-1) 26%, var(--panel)) 0%, color-mix(in srgb, var(--team-2) 12%, var(--panel)) 55%, var(--panel) 85%); }
.team-theme .top::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--team-1) 0 62%, var(--team-2) 62% 100%); pointer-events: none; }
.team-theme .tabs a.active { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.team-theme .site-footer { border-top-color: var(--team-1); }

/* ---- header, a size up (2026-12-05) ---- */
.top { padding-top: 14px; padding-bottom: 14px; }
.top .brand { gap: 12px; }
.top .brand :is(img, canvas) { width: 42px; height: 42px; }
.top .wordmark { font-size: 21px; }
.top .wordmark small { font-size: 10px; margin-bottom: 4px; }
.tabs a { padding: 7px 14px; font-size: 15.5px; }
@media (max-width: 760px) {
  .top { padding-top: max(11px, env(safe-area-inset-top)); padding-bottom: 11px; }
  .top .brand :is(img, canvas) { width: 36px; height: 36px; }
  .top .wordmark { font-size: 19px; }
  .top .wordmark small { font-size: 9px; }
  .icon-btn { width: 40px; height: 40px; }
}

/* Season pickers */
.season-pick { font-size: 13px; padding: 5px 10px; width: auto; }
.score-season-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.score-season-row .score-season { margin: 0; }
.team-hero .season-pick { margin-top: 8px; }
.player-season-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.player-season-head .season-pick { text-transform: none; letter-spacing: 0; font-weight: 500; }
.lbl-short { display: none; }
@media (max-width: 480px) { .lbl-long { display: none; } .lbl-short { display: inline; } }
/* Player season tables sit side by side when there's room. */
.season-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 12px; align-items: start; }
.season-tables > .panel { margin: 0; }
.season-tables table { width: 100%; }
/* Twelve team numbers: two even rows of six on desktop, pairs on phones. */
@media (min-width: 900px) { .team-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* Six team leaders: one row of six on wide screens, three by two below. */
@media (min-width: 1100px) { .leader-list { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 700px) and (max-width: 1099px) { .leader-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Small stat tables keep every column on a phone. */
@media (max-width: 600px) { table.stats.compact { min-width: 0; width: 100%; } table.stats.compact th, table.stats.compact td { padding: 7px 5px; } table.stats.compact td.l, table.stats.compact th.l { padding-left: 10px; } }
.standing-summary .who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-sheet svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.more-sheet .active svg { color: var(--accent); }
.more-sheet hr { margin: 0; border: 0; border-top: 6px solid var(--panel-2); }
.more-sheet[hidden], .more-sheet [hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
/* Touch screens: small header links get a thumb-sized hit area without moving anything. */
@media (pointer: coarse) {
  :root :is(.news-head a, .panel-head a, .bgame-head a, .rules-link, .props-toggle) {
    display: inline-block; padding-block: 11px; margin-block: -11px; }
}
/* Something to do this week: a dot on the tab. */
[data-tab].todo-dot { position: relative; }
.tabs [data-tab].todo-dot::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.bnav [data-tab].todo-dot::after { content: ""; position: absolute; top: 7px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 2px var(--panel); }
/* Phone play-by-play: clock and EPA on top, the play across the full width below. */
@media (max-width: 600px) {
  .play { grid-template-columns: 18px minmax(0, 1fr) auto; gap: 3px 8px; padding: 9px 12px; }
  .play > div:nth-child(3) { display: contents; }
  .play .pico { grid-column: 1; grid-row: 1; }
  .play .clk { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
  .play .clk b { display: inline; }
  .play .side { grid-column: 3; grid-row: 1; flex-direction: row; align-items: center; gap: 6px; }
  .play .dd { grid-column: 2 / -1; grid-row: 2; margin: 0; }
  .play .t { grid-column: 2 / -1; grid-row: 3; line-height: 1.4; }
}
/* Phones: team stat tiles three across and leaders two across, so the roster comes sooner. */
@media (max-width: 640px) {
  .team-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .team-tiles .tile { padding: 8px 10px; }
  .team-tiles .tile small { font-size: 9.5px; letter-spacing: .04em; line-height: 1.25; min-height: 2.5em; }
  .team-tiles .tile b { font-size: 18px; }
  .leader-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .leader { padding: 8px 10px; gap: 8px; min-width: 0; }
  .leader > div { min-width: 0; }
  .leader img { width: 36px; height: 36px; flex: none; }
  .leader small { font-size: 9.5px; letter-spacing: .04em; }
  .leader b { font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Phones: the opponent keeps one line; an upcoming kickoff time wraps on the right instead. */
@media (max-width: 480px) {
  .sched-row { grid-template-columns: 44px 24px minmax(0, 1fr) auto; gap: 8px; padding: 8px 12px; }
  .sched-row > span:nth-child(3) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sched-row > span:last-child { text-align: right; font-size: 12.5px; max-width: 112px; line-height: 1.3; }
  .sched-row .res { font-size: 14px; white-space: nowrap; }
}
/* Game page before kickoff: the line, quick actions and Sydney's preview. */
.pregame { display: grid; gap: 16px; margin-top: 14px; }
.pregame .pg-line { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; }
.pregame .pg-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.pregame .pg-acts .btn { padding: 10px 18px; }
.pregame .news-head { margin-bottom: 10px; }
.pregame .pg-note { margin: 0; font-size: 13.5px; }
/* After kickoff: a slim link to Sydney's story on the game. */
.game-stories { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 10px 0 0; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.game-stories .gs-label { font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.game-stories a { font-weight: 650; color: var(--text); }
.game-stories a:hover { color: var(--accent); }
/* Page loading: a thin bar across the top after a short delay. */
body.route-busy::before { content: ''; position: fixed; inset: 0 0 auto; height: 3px; z-index: 1000; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat; background-size: 40% 100%;
  animation: route-busy 1.1s ease-in-out infinite; }
@keyframes route-busy { from { background-position: -60% 0; } to { background-position: 160% 0; } }
@media (prefers-reduced-motion: reduce) { body.route-busy::before { animation: none; background: var(--accent); opacity: .6; } }
.load-error { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; text-align: center; color: var(--text); }
.load-error span { color: var(--muted); max-width: 40ch; }
.load-error .btn { margin-top: 8px; }
.search-results .team-hit { object-fit: contain; background: none; padding: 3px; }
/* Phones: a tighter scores header and shorter game cards, so more of the week fits on screen. */
@media (max-width: 760px) {
  .score-hero { padding: 18px 16px; gap: 12px; border-radius: 14px; margin-bottom: 12px; }
  .score-hero h1 { font-size: 34px; }
  .score-dates { margin-top: 6px; }
  .score-page .gcard .row { min-height: 40px; padding: 4px 10px; }
  .score-page .gcard .row .logo { width: 28px; height: 28px; }
  .score-page .gcard .sc { font-size: 22px; }
  .score-page .gcard .meta { padding: 7px 8px 2px; }
  .score-page .day-label { margin-top: 18px; }
}
/* Phones: box-score tables fit the screen; long names wrap with the position underneath. */
@media (max-width: 600px) {
  .box-cat table.stats th, .box-cat table.stats td { padding: 6px 4px; font-size: 12.5px; }
  .box-cat table.stats th:first-child, .box-cat table.stats td:first-child { padding-left: 10px; }
  .box-cat table.stats th:last-child, .box-cat table.stats td:last-child { padding-right: 10px; }
  .box-cat table.stats td.l { white-space: normal; line-height: 1.25; min-width: 92px; }
  .box-cat table.stats td.l small { display: block; font-size: 10.5px; }
}
/* Narrow phones drop box-score columns that follow from the others (or matter least). */
@media (max-width: 480px) {
  .box-cat[data-cat="passing"] :is(.k-pct, .k-ypa), .box-cat[data-cat="kicking"] .k-fgPct,
  .box-cat[data-cat="defensive"] :is(.k-soloTackles, .k-QBHits) { display: none; }
}
@media (max-width: 380px) { .box-cat[data-cat="passing"] .k-sacks { display: none; } }
@media (max-width: 480px) { .hide-sm { display: none !important; } }
/* Win probability: labels are page text over the stretched chart, so they never squash. */
.wp-plot { position: relative; }
.wp-plot .wp-y { position: absolute; left: 4px; transform: translateY(-100%); margin-top: -1px; font-size: 10.5px; line-height: 1.2; color: var(--muted); pointer-events: none; }
.wp-plot .wp-q { position: absolute; bottom: 1px; margin-left: 4px; font-size: 10.5px; color: var(--faint); pointer-events: none; }
.wp-plot .wp-y { background: color-mix(in srgb, var(--panel) 82%, transparent); padding: 0 3px; border-radius: 3px; }
/* Phones: teams two across, logo over the name, so a division fits on one screen. */
@media (max-width: 560px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .team-grid .tcard { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; }
  .team-grid .tcard .logo.lg { width: 40px; height: 40px; }
  .team-grid .tcard .nm { font-size: 14.5px; line-height: 1.25; }
}
/* Wide tables that scroll sideways keep the name column in view. */
table.pin-name tr > :nth-child(2) { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
table.pin-name tr.fav > :nth-child(2) { background: linear-gradient(rgba(210,142,5,.08), rgba(210,142,5,.08)), var(--panel); }
table.pin-first tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
table:is(.pin-name, .pin-first) tr > th:is(:first-child, :nth-child(2)) { z-index: 2; }
/* Touch feedback: no grey tap flash; buttons, tabs and cards press in slightly instead. */
html { -webkit-tap-highlight-color: transparent; }
@media (pointer: coarse) {
  :is(.btn, .icon-btn, .bnav a, .bnav button, .subtabs a, .seg a, .week-arrow, .price, .add-btn, .team-pick) { transition: transform .08s ease-out; }
  :is(.btn, .icon-btn, .bnav a, .bnav button, .subtabs a, .seg a, .week-arrow, .price, .add-btn, .team-pick):active:not(:disabled) { transform: scale(.95); }
  :is(.gcard, .tcard, .news-card, .news-lead, .group-list > a, .sched-row, .note, .search-results a) { transition: transform .1s ease-out, filter .1s; }
  :is(.gcard, .tcard, .news-card, .news-lead, .group-list > a, .sched-row, .note, .search-results a):active { transform: scale(.985); filter: brightness(.97); }
}
@media (prefers-reduced-motion: reduce) { :is(.btn, .gcard, .tcard, .news-card):active { transform: none !important; } }
/* Phones: drives as a list with a small field bar, in place of the full chart. */
.drive-list { display: none; }
@media (max-width: 640px) {
  .drive-chart svg { display: none !important; }
  .drive-list { display: block; }
  .drive-chart .panel-head { flex-wrap: wrap; gap: 2px 10px; }
  .dl-q { padding: 12px 14px 4px; font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .dl-row { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--text); }
  .dl-row:hover { background: var(--panel-2); color: var(--text); }
  .dl-row .logo { width: 22px; height: 22px; }
  .dl-clock { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .dl-res { font-size: 13px; text-align: right; }
  .dl-field { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 3px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--hc) 45%, transparent) 0 8%, color-mix(in srgb, #2a7034 30%, transparent) 8% 92%, color-mix(in srgb, var(--ac) 45%, transparent) 92%); }
  .dl-bar { position: absolute; top: 2px; height: 6px; border-radius: 3px; background: var(--c); box-shadow: 0 0 0 1px rgb(255 255 255 / .5); }
  .dl-desc { grid-column: 1 / -1; font-size: 12px; color: var(--faint); }
}
[data-theme="dark"] .dl-bar { background: color-mix(in srgb, var(--c) 62%, #fff); }
/* Phones: give the stat names in Team stats more room than the numbers. */
@media (max-width: 600px) {
  .compare td { padding: 8px 8px; }
  .compare td.a, .compare td.h { width: 27%; }
  .compare td.lbl { font-size: 12.5px; line-height: 1.25; }
}
/* Phones: card-table rows become small cards (admin lists). */
@media (max-width: 640px) {
  table.card-table, table.card-table tbody { display: block; width: 100%; min-width: 0; }
  table.card-table tr:first-child:has(> th) { display: none; }
  table.card-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 12px 14px; border-top: 1px solid var(--line); }
  table.card-table tr:nth-child(2) { border-top: 0; }
  table.card-table td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
  table.card-table td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  table.card-table td:first-child { grid-column: 1 / -1; font-weight: 650; }
  table.card-table td:first-child::before, table.card-table td[data-label=""]::before { display: none; }
  table.card-table td[data-label=""] { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
  table.card-table td[data-label=""]:empty, table.card-table td:not([colspan]):empty { display: none; }
  table.card-table td[colspan] { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  /* A lone action button sits at the end of the card's first row instead of taking a row. */
  table.card-table tr:has(> td[data-label=""] > .btn:only-child) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  table.card-table tr:has(> td[data-label=""] > .btn:only-child) > td:first-child { grid-column: 1 / 3; }
  table.card-table td[data-label=""]:has(> .btn:only-child) { grid-column: 3; grid-row: 1; align-self: start; }
}
/* Phones: backtest tables are all numbers, so tighten them to fit. */
@media (max-width: 640px) {
  table.bt-table th, table.bt-table td { padding: 7px 6px; font-size: 12.5px; }
  table.bt-table th { white-space: normal; font-size: 10.5px; line-height: 1.2; vertical-align: bottom; }
  table.bt-table td.l, table.bt-table td:first-child { white-space: normal; }
}
@media (max-width: 640px) {
  .bt-section .panel-body > .tbl-wrap:has(> .bt-table) { margin-left: -16px; margin-right: -16px; }
  table.bt-table th:first-child, table.bt-table td:first-child { padding-left: 14px; }
  table.bt-table th:last-child, table.bt-table td:last-child { padding-right: 14px; }
}
