:root {
  color-scheme: light;
  --page: #f6f6f3;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --line: rgba(11, 11, 11, 0.10);
  --hover: rgba(11, 11, 11, 0.04);
  --win: #006300;
  --win-bg: rgba(12, 163, 12, 0.12);
  --loss: #b42c2c;
  --loss-bg: rgba(208, 59, 59, 0.12);
  --pos: #2a78d6;
  --neg: #e34948;
  --made: #2a78d6;
  --miss: #898781;
  --c-aba: #2a78d6;
  --c-el: #eb6834;
  --c-ec: #1baf7a;
  --c-sc: #eda100;
  --c-kls: #e87ba4;
  --c-kup: #008300;
  --hero-bg: #0b0b0b;
  --hero-ink: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232321;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --line: rgba(255, 255, 255, 0.10);
    --hover: rgba(255, 255, 255, 0.05);
    --win: #0ca30c;
    --win-bg: rgba(12, 163, 12, 0.18);
    --loss: #e66767;
    --loss-bg: rgba(208, 59, 59, 0.2);
    --pos: #3987e5;
    --neg: #e66767;
    --made: #3987e5;
    --c-aba: #3987e5;
    --c-el: #d95926;
    --c-ec: #199e70;
    --c-sc: #c98500;
    --c-kls: #d55181;
    --c-kup: #008300;
    --hero-bg: #000000;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232321;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --line: rgba(255, 255, 255, 0.10);
  --hover: rgba(255, 255, 255, 0.05);
  --win: #0ca30c;
  --win-bg: rgba(12, 163, 12, 0.18);
  --loss: #e66767;
  --loss-bg: rgba(208, 59, 59, 0.2);
  --pos: #3987e5;
  --neg: #e66767;
  --made: #3987e5;
  --c-aba: #3987e5;
  --c-el: #d95926;
  --c-ec: #199e70;
  --c-sc: #c98500;
  --c-kls: #d55181;
  --c-kup: #008300;
  --hero-bg: #000000;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: "Barlow Condensed", "Inter", system-ui, sans-serif; letter-spacing: 0.01em; margin: 0; }
h2 { font-size: 26px; font-weight: 700; text-transform: uppercase; }
h3 { font-size: 18px; font-weight: 600; text-transform: uppercase; color: var(--ink-2); }
.num, table td.n, table th.n { font-variant-numeric: tabular-nums; }

/* ---------- top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--hero-bg); color: var(--hero-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-in { max-width: 1200px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.brand-mark { width: 22px; height: 28px; border-radius: 3px; background: repeating-linear-gradient(90deg, #fff 0 4px, #000 4px 8px); border: 1px solid #fff; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 12px; border-radius: 999px; color: rgba(255, 255, 255, 0.7); font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, 0.08); }
.nav a.on { color: #000; background: #fff; }
.menu-btn { display: none; background: none; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; padding: 0; flex: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 1px; transition: transform 0.15s, opacity 0.15s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.theme-btn { background: none; border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 18px; line-height: 1; flex: none; }

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sub { color: var(--ink-2); font-size: 14px; }
.muted { color: var(--muted); }

/* ---------- hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg); color: #fff;
  border-radius: 16px; padding: 40px 32px;
}
.hero::after {
  content: ""; position: absolute; inset: 0 0 0 auto; width: 46%;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 28px, transparent 28px 56px);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  pointer-events: none;
}
.hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 0.95; text-transform: uppercase; font-weight: 800; }
.hero .kicker { text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.hero .lede { color: rgba(255,255,255,0.75); max-width: 560px; margin-top: 14px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 32px; position: relative; z-index: 1; }
.hero-stat .v { font-size: 44px; font-weight: 700; line-height: 1; }
.hero-stat .l { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.6); margin-top: 6px; }

/* ---------- cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.pad { padding: 18px 20px; }
.grid { display: grid; gap: 14px; }
.g5 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.season-card { display: block; padding: 18px; transition: transform 0.15s ease; }
.season-card:hover { text-decoration: none; transform: translateY(-2px); }
.season-card .yr { font-family: "Barlow Condensed", sans-serif; font-size: 32px; font-weight: 700; }
.season-card .rec { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.comp-line { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 10px; }
.comp-line .nm { flex: 1; color: var(--ink-2); }
.comp-line .finish { font-size: 11px; color: var(--muted); display: block; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.bar-track { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar-fill { height: 100%; border-radius: 3px; }

.tile { padding: 16px 18px; }
.tile .l { font-size: 13px; color: var(--ink-2); }
.tile .v { font-size: 28px; font-weight: 650; margin-top: 2px; }
.tile .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- chips / filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 16px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { background: var(--hover); }
.chip.on { background: var(--ink); color: var(--page); border-color: var(--ink); }
select.chip { padding-right: 28px; }
input.search { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; min-width: 220px; }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

/* ---------- W/L badge */
.wl { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 700; flex: none; }
.wl.w { background: var(--win-bg); color: var(--win); }
.wl.l { background: var(--loss-bg); color: var(--loss); }
.form { display: flex; gap: 3px; flex-wrap: wrap; }
.form .wl { width: 18px; height: 18px; font-size: 10px; border-radius: 4px; }

/* ---------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 8px 10px; text-align: left; white-space: nowrap; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sorted { color: var(--ink); }
th.sorted::after { content: " ↓"; }
th.sorted.asc::after { content: " ↑"; }
td { border-bottom: 1px solid var(--line); }
tbody tr:hover { background: var(--hover); }
tbody tr:last-child td { border-bottom: none; }
td.n, th.n { text-align: right; }
td.strong { font-weight: 600; }
tr.total td { font-weight: 600; background: var(--surface-2); }
tr.dnp td { color: var(--muted); }
tr.clickable { cursor: pointer; }
.sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 1; }
tbody tr:hover .sticky-col { background: var(--surface); }

.team-cell { display: flex; align-items: center; gap: 8px; }
.logo { width: 22px; height: 22px; object-fit: contain; flex: none; }
.logo-lg { width: 64px; height: 64px; object-fit: contain; }

/* ---------- game list */
.games { display: flex; flex-direction: column; }
.game-row {
  display: grid; grid-template-columns: 74px 1fr auto 26px; gap: 12px; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
}
.game-row:last-child { border-bottom: none; }
.game-row:hover { background: var(--hover); text-decoration: none; }
.game-row .date { font-size: 12px; color: var(--muted); line-height: 1.3; }
.game-row .opp { display: flex; align-items: center; gap: 10px; min-width: 0; }
.game-row .opp-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-row .meta { font-size: 12px; color: var(--muted); }
.game-row .score { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.month-head { padding: 14px 16px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); border-bottom: 1px solid var(--line); }

/* ---------- scoreboard */
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 28px 20px; text-align: center; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sb-team .nm { font-family: "Barlow Condensed", sans-serif; font-size: 24px; font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.sb-score { font-size: 56px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1; }
.sb-score .win { color: var(--ink); }
.sb-score .lose { color: var(--muted); }
.sb-meta { font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--ink-2); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px; font-size: 13.5px; }
.info-grid .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* compare bars */
.cmp { display: grid; grid-template-columns: 52px 1fr 110px 1fr 52px; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; }
.cmp .lbl { text-align: center; color: var(--ink-2); font-size: 12px; }
.cmp .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.cmp .v.r { text-align: right; }
.cmp .track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: flex; }
.cmp .track.l { justify-content: flex-end; }
.cmp .fill { height: 100%; border-radius: 4px; }

/* ---------- charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.gridline { stroke: var(--grid); stroke-width: 1; }
.baseline { stroke: var(--axis); stroke-width: 1; }
.tip {
  position: absolute; pointer-events: none; z-index: 30;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12); border-radius: 10px;
  padding: 8px 12px; font-size: 12.5px; line-height: 1.45; min-width: 140px; max-width: 260px;
  opacity: 0; transition: opacity 0.08s; white-space: normal;
}
.tip.show { opacity: 1; }
.tip .tv { font-weight: 700; font-size: 15px; }
.tip .ts { color: var(--ink-2); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* shot chart */
.court-wrap { max-width: 520px; margin: 0 auto; }
.court-wrap svg { overflow: hidden; }
.court line, .court path, .court rect, .court circle.c { fill: none; stroke: var(--axis); stroke-width: 6; }
.shot-made { fill: var(--made); stroke: var(--surface); stroke-width: 6; }
.shot-miss { fill: none; stroke: var(--miss); stroke-width: 7; }

/* ---------- players */
.player-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.player-card:hover { text-decoration: none; background: var(--hover); }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ink-2); font-size: 16px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.avatar.lg { width: 120px; height: 120px; font-size: 36px; }
.player-card .pn { font-weight: 600; line-height: 1.25; }
.player-card .ps { font-size: 12px; color: var(--muted); }
.player-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.player-head h1 { font-size: clamp(34px, 6vw, 56px); text-transform: uppercase; line-height: 1; }
.bio { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; color: var(--ink-2); font-size: 14px; }
.bio b { color: var(--ink); font-weight: 600; }

.lead-list { list-style: none; margin: 0; padding: 0; }
.lead-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lead-list li:last-child { border-bottom: none; }
.lead-list .rk { color: var(--muted); font-size: 12px; text-align: right; }
.lead-list .val { font-weight: 650; font-variant-numeric: tabular-nums; }
.lead-list .ctx { font-size: 12px; color: var(--muted); display: block; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 0; overflow-x: auto; }
.tab { padding: 10px 14px; font-size: 14px; color: var(--muted); border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; font: inherit; white-space: nowrap; }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }

.empty { padding: 40px; text-align: center; color: var(--muted); }
footer { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
footer a { text-decoration: underline; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

@media (max-width: 640px) {
  .hero { padding: 28px 20px; }
  .hero-stat .v { font-size: 32px; }
  .scoreboard { padding: 20px 8px; gap: 8px; }
  .sb-score { font-size: 38px; }
  .sb-team .nm { font-size: 17px; }
  .logo-lg { width: 44px; height: 44px; }
  .game-row { grid-template-columns: 56px 1fr auto 24px; gap: 8px; padding: 10px 12px; }
  .brand span.full { display: none; }
  .top-in { gap: 10px; }
  .brand { flex: 1; }
  .menu-btn { display: flex; }
  .theme-btn { width: 40px; height: 40px; }
  .nav {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 8px 16px 16px;
    background: var(--hero-bg); border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; font-size: 16px; color: rgba(255, 255, 255, 0.85); }
  .cmp { grid-template-columns: 40px 1fr 80px 1fr 40px; gap: 6px; }
  input.search { min-width: 0; width: 100%; }
}
