/* STATICUE design tokens */
:root {
  --bg: #080D14;
  --panel: #121C29;
  --panel-2: #0D1520;
  --panel-hover: #172334;
  --line: #1F2C3C;
  --line-2: #2B3B4F;
  --fg: #F4F7FA;
  --muted: #9AA9BA;
  --faint: #6F8094;
  --lime: #C8FF40;
  --lime-ink: #0B1205;
  --lime-dim: rgba(200, 255, 64, .14);
  --cyan: #45D3F5;
  --bad: #FF6E5E;
  --warn: #FFC53D;
  --track: #223143;
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 20px;
  --pad: 22px;
  --page: 1440px;
  --gutter: clamp(16px, 4vw, 64px);
  --font-display: "Archivo", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hero-image: url("assets/hero-stadium.svg"); /* swap for a licensed photo, e.g. url("assets/hero-stadium.jpg") */
  --header-h: 64px;
  --tabbar-h: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.5 var(--font-body);
  padding-bottom: var(--tabbar-h); overflow-x: clip;
}
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.display { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; letter-spacing: -.005em; line-height: .95; text-transform: none; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(8, 13, 20, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 48px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand svg { width: 30px; height: 26px; }
.brand span { font-weight: 700; letter-spacing: .32em; font-size: 19px; }
.sport { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; margin-left: -24px; }
.sport a { min-width: 52px; min-height: 34px; display: grid; place-items: center; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.sport a[aria-pressed="true"] { background: var(--lime); color: var(--lime-ink); }
.sport a:hover:not([aria-pressed="true"]) { color: var(--fg); }
.nav { display: flex; gap: 6px; height: 100%; }
.nav a { display: flex; align-items: center; padding: 0 14px; text-decoration: none; color: var(--muted); font-weight: 500; position: relative; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--lime); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--lime); border-radius: 3px 3px 0 0; }
.header-cta { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: var(--fg); margin: 5px 0; border-radius: 2px; }
.mobile-menu { display: none; }

.crumbs { border-bottom: 1px solid var(--line); }
.crumbs .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; font-size: 14px; }
.crumbs ol { display: flex; white-space: nowrap; min-width: 0; overflow: hidden; gap: 12px; list-style: none; margin: 0; padding: 0; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.crumbs li + li::before { content: "/"; margin-right: 12px; color: var(--faint); }
.crumbs li:last-child { color: var(--fg); }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 12px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 22px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { border-color: var(--fg); }
.btn-primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.btn-primary:hover { background: #d6ff6b; border-color: #d6ff6b; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.link-btn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 8px 4px; cursor: pointer; font-weight: 500; text-decoration: none; }
.link-btn .ring { width: 26px; height: 26px; border: 2px solid var(--lime); border-radius: 50%; display: grid; place-items: center; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; }
.icon-btn:hover:not(:disabled) { border-color: var(--fg); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- Hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; background: var(--bg); }
.hero-media { position: absolute; inset: 0 0 0 36%; background: var(--hero-image) center 40% / cover no-repeat; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(8,13,20,.55) 22%, rgba(8,13,20,.1) 55%, rgba(8,13,20,.35) 100%), linear-gradient(0deg, rgba(8,13,20,.55), transparent 40%); }
.hero .wrap { position: relative; padding-top: 40px; padding-bottom: 40px; min-height: 300px; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { margin: 0; font-size: clamp(48px, 6.6vw, 96px); text-transform: uppercase; }
.hero h1 .accent { color: var(--lime); display: block; }
.hero p { margin: 14px 0 26px; font-size: clamp(16px, 1.5vw, 21px); color: #DCE3EA; max-width: 34ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
.hero-tag { position: absolute; right: var(--gutter); bottom: 44px; text-align: left; font-size: 12px; letter-spacing: .3em; line-height: 1.6; text-transform: uppercase; color: #DCE3EA; }
.hero-tag::after { content: ""; display: block; width: 30px; height: 3px; background: var(--lime); margin-top: 12px; }

/* ---------- Week bar ---------- */
.weekbar { border-bottom: 1px solid var(--line); }
.weekbar .wrap { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.weeks { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 520px; }
.weeks-scroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 3px; min-width: 0; }
.weeks-scroll::-webkit-scrollbar { display: none; }
.week { scroll-snap-align: center; flex: 0 0 auto; min-width: 104px; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); cursor: pointer; font-weight: 500; }
.week:hover { border-color: var(--line-2); background: var(--panel-hover); }
.week[aria-pressed="true"] { border: 2px solid var(--lime); font-weight: 700; }
.week small { display: block; color: var(--faint); font-size: 11px; font-weight: 500; margin-top: -2px; }
.season-select { height: 44px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); padding: 0 12px; }
.segmented { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); margin-left: auto; }
.segmented button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 7px; border: 0; background: none; color: var(--muted); cursor: pointer; font-weight: 500; font-size: 14px; }
.segmented button:hover { color: var(--fg); }
.segmented button[aria-pressed="true"] { background: #1E2B3C; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- Layout ---------- */
main { min-height: 50vh; }
.show-sm { display: none; }
.section { padding-top: 28px; padding-bottom: 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.h2 { font-family: var(--font-display); font-weight: 900; font-stretch: 80%; font-size: clamp(28px, 2.6vw, 36px); margin: 0; letter-spacing: -.005em; line-height: 1.05; }
.h3 { font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 23px; margin: 0; line-height: 1.15; }
.lede { color: var(--muted); margin: 6px 0 0; max-width: 70ch; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: var(--pad); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px var(--pad); border-bottom: 1px solid var(--line); }
.row2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--gap); margin-top: var(--gap); }

/* ---------- Team badge ---------- */
.badge { --c: #333; --r: #888; --t: #fff; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--t);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--r); font-family: var(--font-display); font-weight: 900; font-stretch: 80%; font-size: 19px; letter-spacing: .01em; }
.badge.lg { width: 64px; height: 64px; flex-basis: 64px; font-size: 23px; }
.badge.sm { width: 34px; height: 34px; flex-basis: 34px; font-size: 13px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--r); }
.team { display: flex; align-items: center; gap: 14px; min-width: 0; }
.team-name { line-height: 1.2; min-width: 0; }
.team-name .city { display: block; color: #D5DDE5; font-size: 14px; }
.team-name .nick { display: block; font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game .team { gap: 10px; }
.game .badge { width: 42px; height: 42px; flex-basis: 42px; font-size: 15.5px; }
.game { container-type: inline-size; }
.game .team-name .nick { font-size: clamp(13px, 3.9cqi, 16px); letter-spacing: -.01em; }
.game .team-name .city { font-size: clamp(12px, 3.4cqi, 13.5px); }
.game .matchup-row { gap: 6px; }
.game .team-name .city { font-size: 13px; }

/* ---------- Game card ---------- */
.game { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 16px; transition: border-color .15s, background .15s, transform .15s; }
.game:hover { border-color: var(--line-2); background: var(--panel-hover); }
.game-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.status.final { color: var(--fg); }
.status.hit { color: var(--lime); border-color: rgba(200,255,64,.4); }
.status.miss { color: var(--bad); border-color: rgba(255,110,94,.4); }
.matchup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.matchup-row .vs { color: var(--muted); font-size: 13px; }
.matchup-row .team:last-child { justify-content: flex-start; }
.figure { text-align: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.figure .k { color: var(--muted); font-size: 13px; }
.figure .v { font-family: var(--font-display); font-weight: 900; font-stretch: 80%; font-size: 30px; line-height: 1.1; }
.figure .v .dash { color: var(--muted); margin: 0 14px; font-weight: 500; }
.prob { padding-top: 12px; }
.prob .k { font-size: 13px; color: #D5DDE5; }
.prob .v { font-family: var(--font-display); font-weight: 900; font-stretch: 80%; font-size: 30px; line-height: 1.15; }
.bar { position: relative; height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--lime); transition: width .5s ease; }
.split { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.game-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.game-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; text-decoration: none; padding: 8px 0; }
.game-link:hover { color: var(--lime); }
.game .game-link::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* whole card clickable */

/* ---------- Side panel (inside the model) ---------- */
.factor { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.factor:last-of-type { border-bottom: 0; }
.factor .ico { width: 52px; height: 52px; border-radius: 10px; background: #1A2636; display: grid; place-items: center; }
.factor h4 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.factor p { margin: 0; color: var(--muted); font-size: 14px; }
.note { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; font-size: 14px; color: var(--muted); }
.note b { color: #D5DDE5; font-weight: 600; display: block; margin-bottom: 4px; }

/* ---------- Compare bars ---------- */
.compare { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2.4fr) minmax(120px, 1fr); gap: 18px; align-items: center; }
.compare .side { display: grid; gap: 10px; justify-items: start; }
.compare .side.right { justify-items: end; text-align: right; }
.compare .meta { color: var(--muted); font-size: 13px; }
.cbars { display: grid; gap: 4px; }
.cbar { display: grid; grid-template-columns: 34px minmax(0,1fr) minmax(0,1fr) 34px; align-items: center; gap: 8px; font-size: 14px; }
.cbar .lbl { grid-column: 2 / 4; text-align: center; font-size: 12px; color: var(--muted); margin-bottom: -2px; }
.cbar .l, .cbar .r { height: 8px; border-radius: 999px; background: var(--track); position: relative; overflow: hidden; }
.cbar .l > i { position: absolute; right: 0; top: 0; bottom: 0; background: var(--lime); border-radius: 999px; }
.cbar .r > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--cyan); border-radius: 999px; }
.cbar .nl { text-align: right; }

/* ---------- Charts ---------- */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.tip { position: fixed; z-index: 60; pointer-events: none; background: #1B2838; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; font-size: 13px; box-shadow: 0 8px 28px rgba(0,0,0,.45); max-width: 240px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; position: sticky; top: 0; background: var(--panel); }
th button { all: unset; cursor: pointer; display: inline-block; padding: 12px 0; margin: -12px 0; }
th button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
th[aria-sort] { color: var(--fg); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--panel-hover); }
tbody tr[aria-selected="true"] td { background: #1A2A1A; }
.tag { font-size: 12px; font-weight: 600; }
.tag.out { color: var(--bad); }
.tag.q { color: var(--warn); }
.tag.old { color: var(--faint); font-weight: 500; }

/* ---------- Matchup detail ---------- */
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; padding: 8px 0; }
.back:hover { color: var(--fg); }
.detail-hero { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 20px; align-items: center; }
.detail-hero .team:last-child { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.detail-hero .nick { font-size: 24px; }
.big-prob { font-family: var(--font-display); font-weight: 900; font-stretch: 78%; font-size: clamp(36px, 4vw, 54px); line-height: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-family: var(--font-display); font-weight: 900; font-stretch: 80%; font-size: 30px; line-height: 1.15; }
.stat .s { color: var(--muted); font-size: 12.5px; }
.kv { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; }
.kv > div { padding: 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.kv .c { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 14px; }
.kv .r { text-align: right; }
.calc { display: grid; gap: 10px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.calc li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.calc li::before { counter-increment: step; content: counter(step); width: 24px; height: 24px; border-radius: 50%; background: var(--lime-dim); color: var(--lime); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.calc b { font-variant-numeric: tabular-nums; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.results li { display: grid; grid-template-columns: 34px 54px 1fr auto; gap: 10px; align-items: center; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.wl { font-weight: 700; } .wl.w { color: var(--lime); } .wl.l { color: var(--bad); }

/* ---------- Controls ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin-bottom: 14px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.field select, .field input { height: 44px; min-width: 140px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2); padding: 0 12px; color: var(--fg); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); font-weight: 700; }

/* ---------- Rankings ---------- */
.rank { display: grid; grid-template-columns: 28px 34px minmax(0, 1fr) minmax(60px, 2fr) 54px 64px; gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; border-radius: 6px; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.rank:hover { background: var(--panel-hover); }
.rank .elo-bar { height: 8px; background: var(--track); border-radius: 999px; position: relative; overflow: hidden; }
.rank .elo-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--lime); border-radius: 999px; }
.delta.up { color: var(--lime); } .delta.down { color: var(--bad); }

/* ---------- States ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
.sk-line { height: 12px; border-radius: 6px; background: #1B2738; margin: 10px 0; }
.sk-circle { width: 52px; height: 52px; border-radius: 50%; background: #1B2738; }
@keyframes shimmer { to { transform: translateX(100%); } }
.state { text-align: center; padding: 48px 24px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.state h3 { color: var(--fg); margin: 0 0 6px; font-size: 18px; }
.state.error { border-color: rgba(255,110,94,.5); }
.state .btn { margin-top: 16px; }

/* ---------- Help ---------- */
.help-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.help-toc { position: sticky; top: calc(var(--header-h) + 16px); }
.help-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }
.help-toc a { color: #D5DDE5; text-decoration: none; }
.help-toc a:hover { color: var(--lime); }
.help-body { display: grid; gap: var(--gap); min-width: 0; }
.help-sec { scroll-margin-top: calc(var(--header-h) + 16px); }
.help-sec p, .help-list { color: #C9D2DC; max-width: 78ch; }
.help-sec b { color: var(--fg); }
.help-list { padding-left: 20px; display: grid; gap: 8px; }
.formula { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 14px; line-height: 1.9; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--lime); border-radius: 8px; padding: 12px 16px; margin: 12px 0; overflow-x: auto; color: var(--fg); }
.example { margin-top: 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 16px; }
.ex-h { font-weight: 600; margin-bottom: 4px; color: var(--cyan); }

/* ---------- Footer & tab bar ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; padding-top: 18px; padding-bottom: 18px; font-size: 13.5px; }
.site-footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-footer nav a { text-decoration: none; color: #D5DDE5; }
.site-footer .fine { margin-left: auto; color: var(--muted); font-size: 12.5px; max-width: 60ch; }
.tabbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .model-side { display: grid; grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --tabbar-h: 72px; --pad: 18px; --header-h: 60px; }
  .nav, .header-cta { display: none; }
  .menu-btn { display: block; margin-left: 0; }
  .sport { margin-left: auto; }
  .brand span { font-size: 16px; letter-spacing: .26em; }
  .mobile-menu[data-open="true"] { display: block; position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 39; padding: 8px var(--gutter) 16px; }
  .mobile-menu a { display: block; padding: 14px 4px; font-size: 18px; text-decoration: none; border-bottom: 1px solid var(--line); }
  .mobile-menu a[aria-current="page"] { color: var(--lime); }
  .hero-media { inset: 0; }
  .hero-media::after { background: linear-gradient(90deg, rgba(8,13,20,.92) 0%, rgba(8,13,20,.6) 55%, rgba(8,13,20,.25) 100%), linear-gradient(0deg, rgba(8,13,20,.7), transparent 50%); }
  .hero .wrap { min-height: 0; padding-top: 30px; padding-bottom: 30px; }
  .hero-tag, .hero .link-btn { display: none; }
  .segmented { margin-left: 0; width: 100%; }
  .segmented button { flex: 1; justify-content: center; }
  .weeks { flex-basis: 100%; }
  .week { min-width: 0; flex: 0 0 calc((100% - 20px) / 3); }
  .compare { grid-template-columns: 1fr 1fr; }
  .compare .cbars { grid-column: 1 / -1; grid-row: 2; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-hero .team:last-child { flex-direction: row; text-align: left; justify-content: flex-start; }
  .detail-hero .vs { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar-h); background: rgba(8,13,20,.97); border-top: 1px solid var(--line); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; place-items: center; align-content: center; gap: 4px; text-decoration: none; color: var(--muted); font-size: 12.5px; position: relative; }
  .tabbar a[aria-current="page"] { color: var(--lime); }
  .tabbar a[aria-current="page"]::after { content: ""; position: absolute; bottom: 6px; width: 40px; height: 3px; border-radius: 2px; background: var(--lime); }
  .site-footer .fine { margin-left: 0; }
  .hide-sm { display: none; }
  .help-grid { grid-template-columns: minmax(0, 1fr); }
  .help-toc { position: static; }
  .subnav { display: none; }
  .show-sm { display: inline; }
  .crumbs .wrap { font-size: 12.5px; }
  .crumbs .pill { font-size: 11.5px; padding: 2px 8px; }
  .weeks { order: 1; }
  .season-select { order: 2; flex: 0 0 auto; }
  .segmented { order: 3; flex: 1; width: auto; }
  .segmented button { padding: 0 8px; }
  .rank { grid-template-columns: 24px 34px minmax(0, 1fr) 48px 56px; }
  .rank .elo-bar { display: none; }
  th, td { padding: 9px 8px; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .game { padding: 16px; }
  .badge { width: 46px; height: 46px; flex-basis: 46px; font-size: 17px; }
  .team { gap: 10px; }
  .team-name .nick { font-size: 15.5px; }
  .matchup-row { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
