:root {
  --bg: #f6f7f9; --card: #fff; --text: #14171c; --muted: #646b76; --line: #e3e6eb;
  --accent: #0b6b3a; --accent-bg: #e6f3ec; --live: #16a34a; --blue: #1d4ed8; --blue-bg: #e3ecff; --divider: #cfd4db; --chip: #eef0f3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216; --card: #171b21; --text: #e8eaed; --muted: #9aa1ab; --line: #262c34;
    --accent: #5fd08f; --accent-bg: #15291e; --live: #4ade80; --blue: #8fb4ff; --blue-bg: #1a2744; --divider: #3a414b; --chip: #222831;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 0; position: sticky; top: 0; z-index: 2; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
h1 { margin: 0; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; color: var(--text); text-decoration: none; }
.link-pill { padding: 0 12px; color: var(--text); text-decoration: none; font-weight: 600; }
.link-pill:hover { background: var(--chip); }
/* Searchable market picker */
.combo { position: relative; }
.combo > button { border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; height: 100%; padding: 0 26px 0 2px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; border-radius: 999px; }
.combo-pop { position: fixed; z-index: 20; width: min(340px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 8px; }
.combo-pop input { width: 100%; font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.combo-pop input:focus { outline: 2px solid var(--blue); outline-offset: 0; }
.combo-pop ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 300px; overflow-y: auto; }
.combo-pop li { padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.combo-pop li .why { color: var(--muted); font-size: 12px; text-align: right; }
.combo-pop li[aria-selected="true"], .combo-pop li:hover { background: var(--chip); }
.combo-pop li.current { color: var(--blue); font-weight: 600; }
.combo-pop li.empty { color: var(--muted); cursor: default; background: none; }
/* Live situation */
.situation { font-size: 13px; font-weight: 600; margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.situation .poss { color: var(--live); }
.situation .rz { font-size: 11px; font-weight: 700; color: #ef4444; background: rgba(239, 68, 68, .14); border-radius: 4px; padding: 0 6px; }
.last-play { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 40ch; }
/* Logo strip */
.logo-strip { background: var(--card); border-bottom: 1px solid var(--line); }
.logo-track { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; padding: 6px 16px; max-width: 960px; margin: 0 auto; scroll-snap-type: x proximity; }
.logo-track a { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 52px; padding: 4px 0; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .03em; scroll-snap-align: start; }
.logo-track a:hover { background: var(--chip); color: var(--text); }
.logo-track a[aria-current] { background: var(--blue-bg); color: var(--blue); }
.logo-track a.local { background: var(--blue-bg); color: var(--blue); }
.logo-track img { width: 36px; height: 36px; object-fit: contain; overflow: hidden; }
.local-first h2 { color: var(--blue); }
.local-bye { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
/* Team pages */
.team-head { display: flex; gap: 14px; align-items: flex-start; margin: 20px 0 6px; padding-left: 12px; border-left: 4px solid var(--team, var(--blue)); }
.team-head img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.page-title { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 6px; }
.answer { margin: 0; font-size: 16px; max-width: 70ch; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 8px; }
.sched-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.sched { width: 100%; border-collapse: collapse; font-size: 14px; }
.sched th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sched td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sched tr:last-child td { border-bottom: 0; }
.sched tr.next td { background: var(--blue-bg); }
.sched tr.bye-row td { color: var(--muted); font-style: italic; }
.sched a { color: var(--text); font-weight: 600; text-decoration: none; }
.sched a:hover { text-decoration: underline; }
.res-W { color: var(--live); } .res-L { color: var(--muted); }
.teams-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.teams-nav a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--text); text-decoration: none; }
.teams-nav a:hover { background: var(--chip); }
.teams-nav a[aria-current] { background: var(--blue-bg); color: var(--blue); border-color: transparent; font-weight: 600; }
.team-link { color: inherit; text-decoration: none; display: contents; }
.team-link:hover .name, .team-link:hover .abbr { text-decoration: underline; }
.controls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pill { position: relative; display: inline-flex; align-items: center; height: 32px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 13px; }
.pill select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; height: 100%; padding: 0 26px 0 12px; border-radius: 999px; cursor: pointer; field-sizing: content; max-width: 190px; text-overflow: ellipsis; }
.pill.select::after { content: "▾"; position: absolute; right: 10px; pointer-events: none; color: var(--muted); font-size: 11px; }
.pill.market.combo { padding-left: 10px; }
.pill.market { padding-left: 10px; }
.pill.market select { padding-left: 4px; }
.pill.stepper select { padding: 0 6px; text-align: center; text-align-last: center; }
.pill.stepper button { border: 0; background: transparent; height: 100%; min-width: 30px; padding: 0 8px; border-radius: 999px; font-size: 16px; line-height: 1; color: var(--text); }
.pill.stepper button:hover:not(:disabled), .pill.select:hover { background: var(--chip); }
.pill:has(:focus-visible) { outline: 2px solid var(--blue); outline-offset: 1px; }
.pill select:focus { outline: none; }
button { cursor: pointer; font: inherit; }
button:disabled { opacity: .4; cursor: default; }
.section + .section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--divider); }
.label-sub { text-transform: none; letter-spacing: 0; font-size: 11px; opacity: .8; margin-left: 4px; }
.local { font-size: 13px; line-height: 1.9; }
.local-note { font-size: 12px; margin-top: 2px; }
.local-note .warn { color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; min-width: 0; }
.local b { font-weight: 700; }
.local .ch { display: inline-block; background: var(--blue-bg); color: var(--blue); font-weight: 700; border-radius: 6px; padding: 1px 7px; margin-right: 4px; }
.local .hint { color: var(--muted); }
.home { color: var(--accent); font-weight: 600; }
.status { color: var(--muted); font-size: 13px; margin: 14px 0; }
.day h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
.game { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px;
  display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(150px, 1fr) minmax(200px, 1.6fr); gap: 14px; align-items: center; }
.game.is-live { border-color: var(--live); box-shadow: 0 0 0 1px var(--live); }
.game.is-final { opacity: .8; }
.team { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.team img { width: 28px; height: 28px; object-fit: contain; }
.abbr { font-weight: 700; width: 38px; }
.name { color: var(--muted); }
.rec { color: var(--muted); font-size: 12px; }
.score { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 17px; }
.when { font-weight: 600; }
.live-clock { position: relative; display: inline-block; color: var(--live); padding-bottom: 5px; overflow: hidden; }
.live-clock::before, .live-clock::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; border-radius: 2px; }
.live-clock::before { right: 0; background: var(--live); opacity: .2; }
.live-clock::after { width: 40%; background: var(--live); animation: live-sweep 1.6s ease-in-out infinite; }
@keyframes live-sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .live-clock::after { animation: none; width: 100%; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nets { margin: 6px 0 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.net { background: var(--blue-bg); color: var(--blue); font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 5px; }
.net.tbd { background: var(--chip); color: var(--muted); }
.tag { font-size: 11px; color: var(--muted); border: 1px dashed var(--muted); border-radius: 5px; padding: 1px 6px; cursor: help; }
.venue { font-size: 12px; color: var(--muted); }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { text-decoration: none; color: var(--text); background: var(--chip); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.opt:hover { outline: 1px solid var(--muted); }
.opt.primary { background: var(--blue-bg); color: var(--blue); font-weight: 600; }
.opt.muted { color: var(--muted); }
.notes { font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend { font-size: 12px; color: var(--muted); margin: -6px 0 4px; }
.legend summary { cursor: pointer; width: max-content; list-style: none; text-decoration: underline dotted; text-underline-offset: 3px; }
.legend summary::-webkit-details-marker { display: none; }
.legend summary::before { content: "ⓘ "; }
.legend[open] summary { margin-bottom: 8px; }
.legend dl { margin: 0 0 4px; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; }
.legend dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; white-space: nowrap; }
.legend dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.legend dd > span { display: inline-flex; align-items: center; gap: 6px; }
.legend .opt { pointer-events: none; white-space: nowrap; font-size: 12px; padding: 2px 8px; }
.legend .ch { display: inline-block; background: var(--blue-bg); color: var(--blue); font-weight: 700; border-radius: 6px; padding: 1px 7px; }
@media (max-width: 720px) { .legend dl { grid-template-columns: 1fr; } .legend dd { margin-bottom: 4px; } }
.bye { color: var(--muted); font-size: 13px; }
.foot { color: var(--muted); font-size: 12px; padding-bottom: 40px; }
.watch { align-self: stretch; display: flex; flex-direction: column; justify-content: center;
  border-left: 1px solid var(--divider); padding-left: 16px; margin: -14px 0; padding-top: 14px; padding-bottom: 14px; }
@media (max-width: 720px) {
  .game { grid-template-columns: 1fr; gap: 10px; }
  .watch { border-left: 0; padding-left: 0; margin: 2px 0 0; padding: 12px 0 0; border-top: 1px solid var(--divider); }
  .top { position: static; }
  .page-title { font-size: 21px; }
  .team-head img { width: 40px; height: 40px; }
  .controls { flex-wrap: nowrap; gap: 4px; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .pill { font-size: 12.5px; flex: 0 0 auto; }
  .pill select { padding: 0 22px 0 10px; max-width: 150px; }
  .pill.select::after { right: 8px; }
  .pill.market { padding-left: 8px; }
  .combo > button { max-width: 118px; }
  .pill.stepper select { padding: 0 2px; }
  .pill.stepper button { min-width: 26px; padding: 0 6px; }
}
