/* Osverse site styles.
   Colours are tokens on :root, redefined for dark mode. Dark mode is greys,
   never black. Each accent has a light and a dark shade (--a-l / --a-d) and
   the theme picks one. The red / yellow / green rating colours (--good,
   --mid, --bad) are fixed and no accent ever uses them. */

:root {
  --bg: #eef0f4; --surface: #ffffff; --surface-2: #e7eaf0; --line: #d6dbe3; --line-soft: #e9ecf1;
  --fg: #161a22; --muted: #5a6375; --faint: #8a93a4;
  --good: #1b7a47; --mid: #a87a00; --bad: #b52f2f; --live: #d93a3a;
  --shadow: 0 1px 2px rgba(20, 25, 35, .06), 0 4px 14px rgba(20, 25, 35, .05);
  --font-display: "Big Shoulders Display", "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --r: 12px;
  --tabbar-h: 64px;
  --accent: var(--a-l); --accent-soft: var(--as-l); --accent-ink: #ffffff;
  color-scheme: light;
}

/* Accent presets: light-mode shade, dark-mode shade, and their soft tints. */
html[data-accent="purple"] { --a-l: #7656e3; --a-d: #b9a6ff; --as-l: #efeafe; --as-d: #3a3452; }
html[data-accent="indigo"] { --a-l: #4f58d1; --a-d: #a3abff; --as-l: #e9ebfd; --as-d: #33364f; }
html[data-accent="blue"]   { --a-l: #1f6fd1; --a-d: #82b6ff; --as-l: #e3eefc; --as-d: #2c3a4f; }
html[data-accent="teal"]   { --a-l: #0e7c79; --a-d: #62d3c8; --as-l: #def3f1; --as-d: #29403f; }
html[data-accent="orange"] { --a-l: #c2561b; --a-d: #ff9f61; --as-l: #fbe8dc; --as-d: #4a3527; }
html[data-accent="pink"]   { --a-l: #c2307a; --a-d: #ff92c6; --as-l: #fbe3ef; --as-d: #4a2c3c; }
html[data-accent="slate"]  { --a-l: #4b5668; --a-d: #b0bacb; --as-l: #e6e9ee; --as-d: #383d47; }

html[data-theme="dark"] {
  --bg: #1d1f24; --surface: #26292f; --surface-2: #30343b; --line: #3c414a; --line-soft: #32363e;
  --fg: #eceef2; --muted: #a8aebb; --faint: #7d8593;
  --good: #4cc283; --mid: #e3b341; --bad: #ef6b6b; --live: #ff6b6b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25);
  --accent: var(--a-d); --accent-soft: var(--as-d); --accent-ink: #17151f;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #1d1f24; --surface: #26292f; --surface-2: #30343b; --line: #3c414a; --line-soft: #32363e;
    --fg: #eceef2; --muted: #a8aebb; --faint: #7d8593;
    --good: #4cc283; --mid: #e3b341; --bad: #ef6b6b; --live: #ff6b6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25);
    --accent: var(--a-d); --accent-soft: var(--as-d); --accent-ink: #17151f;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.45 var(--font-body); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.center { text-align: center; }
.pad { padding: 14px 16px; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 2px 0; }

.wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.brand {
  display: flex; align-items: center; gap: 9px; color: var(--fg); text-decoration: none;
  font-family: var(--font-display); font-weight: 800; font-size: 25px; letter-spacing: .03em;
  text-transform: uppercase; line-height: 1;
}
.brand:hover { text-decoration: none; }
.brand svg { color: var(--accent); flex: none; }
.topnav { display: flex; gap: 2px; }
.topnav a {
  padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none;
  font-family: var(--font-label); font-weight: 600; font-size: 16px; letter-spacing: .06em; text-transform: uppercase;
}
.topnav a:hover { color: var(--fg); background: var(--surface-2); }
.topnav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 8px 8px 0 0; }
.searchbox {
  flex: 1; max-width: 360px; margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border-radius: 999px; padding: 0 14px; color: var(--muted);
}
.searchbox input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 0; outline: none; color: var(--fg); }
.topbar-act { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-flex; padding: 6px; border-radius: 8px; color: var(--fg); }
.search-icon { display: none; }
.pill-link {
  font-family: var(--font-label); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-size: 14px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg); text-decoration: none;
}
.pill-link:hover { border-color: var(--faint); text-decoration: none; }
.pill-link.signin { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.install-btn { font: inherit; cursor: pointer; background: none; }
.install-btn[hidden] { display: none !important; }
.install-help p { margin: 0 0 8px; }
.offline-page { max-width: 440px; padding-top: 18vh; text-align: center; display: grid; justify-items: center; gap: 10px; }
.offline-page img { border-radius: 16px; }
.me {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none;
}
.me:hover { text-decoration: none; filter: brightness(1.05); }

/* ---------- Bottom tab bar (phones) ---------- */
.tabbar { display: none; }

@media (max-width: 760px) {
  .topnav, .searchbox { display: none; }
  .search-icon { display: inline-flex; }
  .topbar-act { margin-left: auto; }
  .topbar-act .pill-link:not(.signin):not(.install-btn) { display: none; }
  .wrap { padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: color-mix(in oklab, var(--surface) 94%, transparent);
    backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--faint); text-decoration: none;
    font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { color: var(--accent); }
}

/* ---------- Page furniture ---------- */
.flash { background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); border-radius: var(--r); padding: 10px 14px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(30px, 5vw, 44px); line-height: .95; letter-spacing: .01em;
}
.eyebrow {
  font-family: var(--font-label); font-size: 13px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow a { color: inherit; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; overflow: hidden; }
.panel.narrow { max-width: 440px; width: 100%; margin: 12px auto; display: flex; flex-direction: column; gap: 14px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
}
.panel-head h2 {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-label); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase;
}
.small-link { font-size: 13px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  text-decoration: none;
}
.btn:hover { border-color: var(--faint); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.is-on { background: var(--accent-soft); border-color: color-mix(in oklab, var(--accent) 45%, transparent); color: var(--fg); }
.btn.wide { width: 100%; padding: 10px; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg a {
  padding: 6px 14px; border-radius: 999px; color: var(--muted); text-decoration: none;
  font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: .04em;
}
.seg a[aria-current="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.seg button {
  border: 0; background: none; cursor: pointer; padding: 6px 14px; border-radius: 999px; color: var(--muted);
  font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: .04em;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }

/* The season menu (league_tags.season_pick), once there is more than one. */
.season-pick select { font: 600 14px var(--font-label); letter-spacing: .04em; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); }

/* A player's page's tabs. */
.tabs { display: flex; gap: 4px; margin: 4px 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px 9px; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent;
  margin-bottom: -1px; font-family: var(--font-label); font-weight: 700; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.tabs a:hover { color: var(--fg); }

/* The Scouting tab (_scouting.html). */
.scout .panel-head .seg { margin-left: auto; }
.scout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px 28px; padding: 6px 16px 4px; }
.scout-cat h3 { margin: 10px 0 6px; font-family: var(--font-label); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pbar { display: grid; grid-template-columns: minmax(0, 1fr) 3.4em 34% 2.2em; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.pbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.pbar-track { height: 9px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pbar-track i { display: block; height: 100%; border-radius: 99px; }
.pbar-rank { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.scout .v-group { display: none; }
.scout.show-group .v-all { display: none; }
.scout.show-group .pbar-track .v-group { display: block; }
.scout.show-group .pbar-rank .v-group { display: inline; }
.scout-note, .radar-note { padding: 0 16px 12px; margin: 8px 0 0; }
.zone-court { display: block; width: 100%; max-width: 520px; margin: 6px auto 0; padding: 0 12px; }
.zone-court .zones path { stroke: var(--surface); stroke-width: .25; }
.zone-court .lines { stroke: color-mix(in oklab, var(--fg) 35%, transparent); stroke-width: .15; pointer-events: none; }
.zone-court .zone-labels text { font: 700 2.1px var(--font-body); text-anchor: middle; pointer-events: none; }
.zone-court .zone-labels .zl-n { font-weight: 500; font-size: 1.5px; }
.zone-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px 14px; font-size: 12px; }
.zone-legend i { width: 90px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, hsl(2 72% 50%), hsl(46 90% 52%), hsl(140 55% 38%)); }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; padding: 12px 16px 16px; }
.donut { width: 190px; height: 190px; transform: rotate(0deg); }
.donut-hole { fill: none; stroke: var(--surface-2); stroke-width: 6; }
.donut-slice { fill: none; stroke-width: 6; }
.s1 { --c: var(--accent); } .s2 { --c: color-mix(in oklab, var(--accent) 55%, var(--surface)); }
.s3 { --c: hsl(46 85% 50%); } .s4 { --c: hsl(190 60% 45%); } .s5 { --c: hsl(210 45% 62%); }
.donut-slice { stroke: var(--c); }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 210px; }
.donut-legend li { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 8px; font-size: 14px; }
.donut-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.donut-legend b { font-variant-numeric: tabular-nums; }
.radar { display: block; width: 100%; max-width: 420px; margin: 4px auto 0; padding: 0 8px; overflow: visible; }
.radar-grid polygon, .radar-grid line { fill: none; stroke: var(--line); stroke-width: .3; }
.radar-his { fill: color-mix(in oklab, var(--accent) 28%, transparent); stroke: var(--accent); stroke-width: .7; stroke-linejoin: round; }
.radar-league { fill: none; stroke: var(--muted); stroke-width: .45; stroke-dasharray: 1.4 1.1; }
.radar text { font: 600 3.6px var(--font-label); letter-spacing: .03em; fill: var(--fg); }
.radar .radar-v { fill: var(--muted); font-weight: 500; }

/* A player's career (_career.html): his real NBA seasons, then Osverse's. */
.career .panel-head .seg { margin-left: auto; }
.career .v-tot { display: none; }
.career.show-tot .v-avg { display: none; }
.career.show-tot .v-tot { display: inline; }
.career-table tbody tr.is-osv td { background: color-mix(in oklab, var(--accent) 6%, transparent); }
.career-table tbody tr.is-osv td.sticky { background: color-mix(in oklab, var(--accent) 6%, var(--surface)); }
.career-table tr.is-split td { color: var(--muted); font-size: 13px; }
.career-table tr.is-split td:nth-child(2) { padding-left: 22px; }
.career-table tfoot th, .career-table tfoot td { font-weight: 700; border-top: 1px solid var(--line); padding: 8px 10px; text-align: right; }
.career-table tfoot th.l, .career-table tfoot td.l { text-align: left; }
.career-table tfoot .sticky { position: sticky; left: 0; background: var(--surface); }
.lg-tag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; font: 700 10px var(--font-label);
  letter-spacing: .06em; vertical-align: 1px; border: 1px solid var(--line); color: var(--muted); }
.lg-tag.is-osv { border-color: color-mix(in oklab, var(--accent) 50%, transparent); color: var(--accent); }
.career-note { padding: 0 16px 12px; margin: 8px 0 0; }

.tag {
  display: inline-block; font-family: var(--font-label); font-weight: 700; font-size: 12px; letter-spacing: .06em;
  padding: 1px 7px; border-radius: 5px; background: var(--surface-2); color: var(--muted);
}
.tag-nsl, .tag-vgp { background: var(--accent-soft); color: var(--fg); }

/* Team badge and player avatar: a colour and letters until there are logos. */
.badge, .avatar {
  display: inline-grid; place-items: center; flex: none;
  font-family: var(--font-label); font-weight: 700; letter-spacing: .03em; line-height: 1;
}
.badge { border-radius: 8px; }
.avatar { border-radius: 50%; }
.badge-sm { width: 30px; height: 22px; font-size: 11.5px; border-radius: 5px; }
.avatar-sm { width: 30px; height: 30px; font-size: 12.5px; }
.badge-lg { width: 64px; height: 46px; font-size: 22px; border-radius: 10px; }
.badge-xl, .avatar-xl { width: 84px; height: 84px; font-size: 30px; }
.badge-xl { border-radius: 16px; }

/* ---------- Home: date strip and score boxes ---------- */
.datebar { display: flex; align-items: center; gap: 6px; }
.datebar-arrow {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  font-size: 22px; color: var(--fg); text-decoration: none;
}
a.datebar-arrow:hover { background: var(--surface-2); text-decoration: none; }
.datestrip { flex: 1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.datestrip::-webkit-scrollbar { display: none; }
.dateitem {
  flex: 1 0 64px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center;
  padding: 6px 4px; border-radius: 10px; color: var(--fg); text-decoration: none;
}
.dateitem:hover { background: var(--surface-2); text-decoration: none; }
.dateitem .dow { font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dateitem .dom { font-weight: 600; font-size: 14px; white-space: nowrap; }
.dateitem.is-empty .dom { color: var(--faint); font-weight: 500; }
.dateitem.is-today .dow { color: var(--accent); }
.dateitem.is-on { background: var(--accent); color: var(--accent-ink); }
.dateitem.is-on .dow { color: inherit; opacity: .85; }
.datepick input { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; }
.head-act { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .dateitem { flex: 0 0 58px; } }

.scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.scores-tight { padding: 12px; }
.gamebox {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--fg); text-decoration: none;
}
.gamebox:hover { border-color: var(--accent); text-decoration: none; }
.gamebox.is-live { border-color: color-mix(in oklab, var(--live) 50%, var(--line)); }
.gb-status {
  font-family: var(--font-label); font-weight: 700; font-size: 13px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px;
}
.gb-row { display: grid; grid-template-columns: auto 1fr auto 2.2em; align-items: center; gap: 9px; }
.gb-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-rec { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.gb-score { font-family: var(--font-display); font-weight: 800; font-size: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.gb-row.lose .gb-name, .gb-row.lose .gb-score { color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 760px) {
  /* A day's games swipe sideways, as on the NBA app. */
  .wrap > .scores { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .wrap > .scores::-webkit-scrollbar { display: none; }
  .wrap > .scores .gamebox { flex: 0 0 76%; max-width: 280px; scroll-snap-align: start; }
}

/* ---------- Lists of rows ---------- */
.rowlist { list-style: none; margin: 0; padding: 4px 6px; }
.rowlist li + li { border-top: 1px solid var(--line-soft); }
.rowlink {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px;
  color: var(--fg); text-decoration: none; min-width: 0; flex: 1;
}
.rowlink:hover { background: var(--surface-2); text-decoration: none; }
.rowmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rowmain b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowmain small { color: var(--muted); font-size: 13px; }
.rowside { color: var(--muted); font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; gap: 6px; align-items: center; }
.rowdate { display: flex; flex-direction: column; width: 46px; flex: none; font-family: var(--font-label); line-height: 1.1; }
.rowdate b { font-weight: 700; }
.rowdate small { color: var(--faint); font-size: 12px; }
.rowflex { display: flex; align-items: center; gap: 8px; padding-right: 8px; }
.rowflex .btn { padding: 5px 12px; font-size: 13px; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.dt { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.dt th {
  font-family: var(--font-label); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--surface);
}
.dt th a { color: inherit; text-decoration: none; }
.dt th.sorted, .dt th.sorted a { color: var(--accent); }
.dt td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody tr:hover td { background: var(--surface-2); }
.dt .l { text-align: left; }
.dt .sep { border-left: 1px solid var(--line); }
.dt .sticky { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.dt tbody tr:hover td.sticky { background: var(--surface-2); }
.dt .num-col { width: 1%; color: var(--faint); }
.teamcell, .playercell { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 600; }
.teamcell:hover, .playercell:hover { text-decoration: none; color: var(--accent); }
.teamcell .rank { width: 1.4em; color: var(--faint); font-weight: 500; text-align: right; }
.teamlink { font-weight: 600; }

.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.fl { display: flex; align-items: center; gap: 7px; }
.fl > span { font-family: var(--font-label); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.filters select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.pg {
  min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  color: var(--fg); font-weight: 600; text-decoration: none;
}
.pg:hover { background: var(--surface-2); text-decoration: none; }
.pg.is-on { background: var(--accent); color: var(--accent-ink); }

/* ---------- Team and player headers ---------- */
.hero {
  background: linear-gradient(120deg, color-mix(in oklab, var(--team) 22%, var(--surface)) 0%, var(--surface) 70%);
  border: 1px solid var(--line); border-radius: var(--r); border-top: 4px solid var(--team);
}
.hero-in { display: flex; align-items: center; gap: 18px; padding: 18px; flex-wrap: wrap; }
.hero-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 5px; }
.hero-sub { color: var(--muted); }
.hero-sub b { color: var(--fg); font-variant-numeric: tabular-nums; }
.hero-act { display: flex; gap: 8px; align-items: center; }

/* A player's vitals, in the header beside his name. */
.hero-vitals {
  margin: 0; padding: 12px 18px 16px; border-top: 1px solid color-mix(in oklab, var(--team) 25%, var(--line-soft));
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 18px;
}
.hero-vitals dt { font-family: var(--font-label); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hero-vitals dd { margin: 1px 0 0; font-family: var(--font-label); font-weight: 600; font-size: 18px; letter-spacing: .02em; }
.hero-vitals dd small { color: var(--muted); font-size: 13px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 1px; background: var(--line-soft); }
.tile { background: var(--surface); padding: 12px 14px; }
.tile .tl { font-family: var(--font-label); font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tile .tv { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }

/* ---------- Game page ---------- */
.board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 20px 16px; }
.board .side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--fg); text-decoration: none; min-width: 0; }
.board .side.r { align-items: flex-end; text-align: right; }
.board .side:hover { text-decoration: none; }
.board .side:hover .tn { color: var(--accent); }
.board .tn { font-family: var(--font-label); font-weight: 700; font-size: clamp(18px, 3vw, 26px); letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; overflow-wrap: anywhere; }
.board .rec { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.board .lose .tn { color: var(--muted); }
.board .mid { text-align: center; }
.board .sc { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 8vw, 72px); line-height: .9; font-variant-numeric: tabular-nums; }
.board .sc .dash { color: var(--faint); margin: 0 .15em; }
.board .tip { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 5vw, 38px); line-height: 1; }
.board .st { margin-top: 6px; font-family: var(--font-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; justify-content: center; }

/* ---------- Search ---------- */
.bigsearch { display: flex; gap: 8px; }
.bigsearch input {
  flex: 1; min-width: 0; font-size: 17px; padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
}

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span, .choice legend { font-family: var(--font-label); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 16px; }
.field .helptext, .field ul { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; padding-left: 18px; }
.form-error { color: var(--bad); font-weight: 600; font-size: 13.5px; }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choice legend { margin-bottom: 8px; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px;
  border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: 14px;
}
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.chip input { accent-color: var(--accent); margin: 0; }
.swatch i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.swatch[data-swatch="purple"] i { background: #8f74ec; }
.swatch[data-swatch="indigo"] i { background: #6a72e0; }
.swatch[data-swatch="blue"] i { background: #3d86e0; }
.swatch[data-swatch="teal"] i { background: #1f9a95; }
.swatch[data-swatch="orange"] i { background: #e07130; }
.swatch[data-swatch="pink"] i { background: #e04b97; }
.swatch[data-swatch="slate"] i { background: #6b7688; }

/* ---------- Scores (red / yellow / green, the number always printed) ---------- */
.score {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.6em; height: 1.7em;
  padding: 0 6px; border-radius: 999px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums;
}
.score.none { background: transparent; color: var(--faint); font-weight: 500; }
.score.xs { min-width: 2.2em; height: 1.45em; font-size: 11.5px; }
.score.lg { font-family: var(--font-display); font-weight: 800; font-size: 24px; min-width: 2.4em; height: 1.45em; letter-spacing: .01em; }

/* ---------- Box scores ---------- */
.dt.box tr.grp th { font-size: 11px; letter-spacing: .1em; color: var(--faint); border-bottom: 0; padding-bottom: 0; text-align: left; }
.dt .shoot { background: color-mix(in oklab, var(--accent) 8%, var(--surface)); }
.dt thead th.shoot { color: var(--fg); }
.dt tr.divider td {
  background: var(--surface-2); color: var(--muted); font-family: var(--font-label); font-weight: 700;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px;
}
.dt tfoot th, .dt tfoot td { border-top: 1px solid var(--line); font-weight: 700; background: var(--surface); }
.dt tfoot th { font-family: var(--font-label); letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.dt .playercell small { font-weight: 500; }
.dt tr.unq td { color: var(--faint); }
.linescore td, .linescore th { min-width: 2.6em; }
@media (max-width: 760px) { .dt.box .avatar { display: none; } }
a.plain { color: inherit; }

/* ---------- Player in a game ---------- */
.strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.strip::-webkit-scrollbar { display: none; }
.strip-item {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--fg); font-weight: 600; font-size: 13px; text-decoration: none;
}
.strip-item:hover { border-color: var(--faint); text-decoration: none; }
.strip-item.is-on { border-color: var(--accent); background: var(--accent-soft); }
.statline .tile { text-align: center; }
.subline { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px; border-top: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.subline b { font-family: var(--font-label); letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-right: 3px; }
.subline small { color: var(--muted); }

.chart-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
.seg button {
  border: 0; background: none; padding: 6px 14px; border-radius: 999px; color: var(--muted); cursor: pointer;
  font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: .04em;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.seg-sm button { padding: 4px 10px; font-size: 13px; }
.court { display: block; width: 100%; max-width: 520px; margin: 8px auto 0; padding: 0 12px; }
.court .lines { stroke: var(--line); stroke-width: .18; }
.court .shot.made { fill: var(--accent); stroke: var(--surface); stroke-width: .15; }
.court .shot.made.assisted { fill: color-mix(in oklab, var(--accent) 55%, var(--surface)); stroke: var(--accent); stroke-width: .2; }
.court .shot.miss path { stroke: var(--muted); stroke-width: .28; fill: none; }
.court .shot[hidden] { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 8px 12px 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot.made { background: var(--accent); }
.dot.made.assisted { background: color-mix(in oklab, var(--accent) 55%, var(--surface)); border: 1.5px solid var(--accent); }
.dot.miss { border: 1.5px solid var(--muted); border-radius: 2px; transform: rotate(45deg); width: 9px; height: 9px; }

/* Recent games: one bar a game, tallest at the best night. */
.bars { display: flex; align-items: flex-end; gap: 6px; padding: 14px 14px 10px; overflow-x: auto; }
.bar-col { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--fg); text-decoration: none; }
.bar-col:hover { text-decoration: none; }
.bar-col:hover i { filter: brightness(1.1); }
.bar-v { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-track { height: 110px; width: 100%; max-width: 30px; display: flex; align-items: flex-end; }
.bar-track i { display: block; width: 100%; height: var(--h); background: var(--accent); border-radius: 5px 5px 2px 2px; }
.bar-track i.neg { background: var(--faint); }
.bar-l { font-family: var(--font-label); font-size: 11px; letter-spacing: .05em; color: var(--muted); text-align: center; line-height: 1.15; }

/* Matchups: the man, what he did, and the defender's hands on him. */
.matchups .rowmain small { white-space: normal; }
.mu-side { flex-direction: column; align-items: flex-end; gap: 1px; }
.mu-hands b { color: var(--fg); }
.mu-side small { color: var(--faint); font-size: 12px; }

/* Team page: the league rank under each number, and the margins chart. */
.rank-under { display: inline-block; font-family: var(--font-label); font-weight: 700; font-size: 13px; color: var(--accent); letter-spacing: .04em; }
a.rank-under:hover, a.rank-inline:hover { text-decoration: underline; }
.rank-under.none { color: var(--faint); }
.rank-inline { font-family: var(--font-label); font-weight: 700; font-size: 12.5px; color: var(--accent); margin-left: 2px; }
.tile .rank-under { margin-top: 2px; }
/* The row a rank was opened for. */
.dt tr.is-focus td, .dt tr.is-focus td.sticky { background: var(--accent-soft); }
.dt tr.is-focus td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.dt tr[id] { scroll-margin-top: 80px; }
.bars.diffs { align-items: stretch; }
.diffs .bar-col { justify-content: flex-start; }
.bar-up, .bar-down { height: 70px; width: 100%; max-width: 30px; display: flex; flex-direction: column; align-items: center; }
.bar-up { justify-content: flex-end; border-bottom: 1px solid var(--line); }
.bar-down { justify-content: flex-start; }
.bar-up i, .bar-down i { display: block; width: 100%; height: var(--h); }
.bar-up i.win { background: var(--accent); border-radius: 5px 5px 0 0; }
.bar-down i.loss { background: var(--faint); border-radius: 0 0 5px 5px; }
.diffs .bar-v { padding: 2px 0; }

/* ---------- Stat menus ---------- */
.menubar {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line);
}
.menubar::-webkit-scrollbar { display: none; }
.menubar a {
  flex: none; padding: 9px 14px; color: var(--muted); text-decoration: none; white-space: nowrap;
  font-family: var(--font-label); font-weight: 600; font-size: 15px; letter-spacing: .05em; text-transform: uppercase;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.menubar a:hover { color: var(--fg); }
.menubar a[aria-current="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.sections { align-self: flex-start; flex-wrap: wrap; }
.sections a { padding: 4px 12px; font-size: 13px; }
.sections-pick select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.toggle { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; cursor: pointer;
  font-family: var(--font-label); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.pctl {
  display: inline-block; margin-left: 4px; min-width: 1.9em; padding: 1px 3px; border-radius: 5px;
  font-size: 10.5px; font-weight: 700; line-height: 1.25; text-align: center; vertical-align: 2px;
  font-variant-numeric: tabular-nums;
}
.dt.with-pct td { padding-left: 6px; padding-right: 6px; }

/* ---------- Manage ---------- */
.flash.warn { background: color-mix(in oklab, var(--mid) 16%, var(--surface)); border-color: color-mix(in oklab, var(--mid) 45%, transparent); }
.slate-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.slate-tools input { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.slate-tools input[type=number] { width: 64px; }
.tool-sep { width: 1px; align-self: stretch; background: var(--line); }
.dt.slate input { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.dt.slate input:disabled { opacity: .55; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.upload p { flex-basis: 100%; margin: 0; }
.small-head { font-family: var(--font-label); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Live games ---------- */
.board.is-live { border-color: color-mix(in oklab, var(--live) 45%, var(--line)); }
.board .clock, .gb-status .clock { font-variant-numeric: tabular-nums; color: var(--fg); }
.live-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--live); font-family: var(--font-label); letter-spacing: .06em; text-transform: uppercase; }
.tabs { align-self: flex-start; }

/* The play-by-play: when, what, and the score after it. */
.feed { list-style: none; margin: 0; padding: 4px 8px; }
.feed-line {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 9px 8px; border-bottom: 1px solid var(--line-soft); border-left: 3px solid transparent;
}
.feed-line:last-child { border-bottom: 0; }
.feed-line.t-home { border-left-color: var(--home, transparent); }
.feed-line.t-away { border-left-color: var(--away, transparent); }
.feed-when { font-family: var(--font-label); font-size: 12px; letter-spacing: .05em; color: var(--muted); line-height: 1.2; }
.feed-when b { color: var(--fg); font-size: 14px; font-variant-numeric: tabular-nums; }
.feed-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feed-text { font-weight: 500; }
.feed-cap { color: var(--muted); font-size: 13px; }
.feed-score { font-family: var(--font-label); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.k-made .feed-text { font-weight: 700; }
.k-made .feed-score { color: var(--fg); }
.k-sub .feed-text, .k-sub .feed-when { color: var(--faint); font-weight: 400; font-size: 13px; }
.k-period { background: var(--surface-2); border-left-color: transparent !important; }
.k-period .feed-text { font-family: var(--font-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.feed-line.is-new { animation: arrive 1.2s ease-out; }
@keyframes arrive { from { background: var(--accent-soft); } }
.feed-line[hidden] { display: none; }

/* Manage: a team's rotation, 2K-style - a slider and a box a man, a lock. */
.hero-mini { display: flex; align-items: center; gap: 14px; }
.rot-total { font-family: var(--font-label); letter-spacing: .04em; color: var(--muted); }
.rot-total b { font-size: 18px; font-variant-numeric: tabular-nums; }
.rot-head, .rot-row { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(0, 2fr) 44px 52px; gap: 6px 14px; align-items: center; padding: 8px 16px; }
.rot-head { font-family: var(--font-label); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.rot-row + .rot-row { border-top: 1px solid var(--line-soft); }
.rot-row.is-out { background: color-mix(in oklab, var(--bad) 6%, var(--surface)); }
.rot-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rot-who a { color: var(--fg); }
.rot-pos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.pos-chip { font-family: var(--font-label); font-size: 11.5px; letter-spacing: .06em; font-weight: 600; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); }
.pos-chip.primary { background: var(--accent-soft); border-color: color-mix(in oklab, var(--accent) 45%, transparent); color: var(--fg); }
.out-tag { font-family: var(--font-label); font-size: 11.5px; letter-spacing: .06em; font-weight: 700; text-transform: uppercase; color: var(--bad); padding: 1px 6px; border-radius: 5px; border: 1px solid color-mix(in oklab, var(--bad) 45%, transparent); }
.rot-min { display: flex; align-items: center; gap: 10px; }
.rot-min input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.rot-min input[type=number], .dt.slate input[type=number], .add-row input, .add-row select, .setting input, .wide-input {
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: inherit;
}
.rot-min input[type=number] { width: 68px; font-variant-numeric: tabular-nums; }
.dt.slate input[type=number] { width: 76px; }
.wide-input { width: 100%; min-width: 180px; }
.rot-lock { display: flex; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.rot-lock input { accent-color: var(--accent); }
.rot-sugg { text-align: center; font-variant-numeric: tabular-nums; }
.rot-sugg small { color: var(--accent); margin-left: 1px; }
.rot-cover { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.cover-chip { font-family: var(--font-label); font-size: 12.5px; letter-spacing: .04em; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.cover-chip b { color: var(--muted); margin-right: 2px; }
.cover-chip.short { background: color-mix(in oklab, var(--mid) 14%, var(--surface)); color: var(--mid); }
.ovr-chip { font-family: var(--font-label); font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--fg); color: var(--bg); font-variant-numeric: tabular-nums; }
.ovr-chip small { font-weight: 600; opacity: .8; margin-left: 2px; }
.ovr-badge { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1; padding: 3px 9px 4px; border-radius: 8px; background: var(--fg); color: var(--bg); vertical-align: middle; }
.archetype { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; font-family: var(--font-label); letter-spacing: .03em; font-size: 15px; }
.archetype b { color: var(--fg); }
.arch-chip { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.arch-chip.is-d { border-color: color-mix(in oklab, var(--accent) 40%, transparent); color: var(--accent); }
/* Badges: an emblem each - a hexagon in its tier's colours with its
   category's glyph, wings from Silver, a crown from Gold, ribbons on
   Amethyst (league/_badge.html). The colours are their own, fixed in both
   themes; a faded emblem is preseason, read from ratings. */
.tier-1 { --d: #6b3d1e; --b: #a8642f; --l: #ecb985; }
.tier-2 { --d: #55606e; --b: #8d98a6; --l: #e6ebf1; }
.tier-3 { --d: #7a5a08; --b: #c99a1c; --l: #ffe69a; }
.tier-4 { --d: #47268a; --b: #7b4ed8; --l: #d3bcff; }
.bdg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.bdg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 6px; padding: 10px 16px 4px; }
.bdg-grid.flush { padding: 4px 0 0; }
.bdg { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; cursor: default; border-radius: 10px; }
.bdg-svg { display: block; width: 88px; height: 73px; transition: transform .15s ease; }
.bdg:hover .bdg-svg, .bdg:focus-visible .bdg-svg { transform: translateY(-2px) scale(1.05); }
.bdg.tier-4 .bdg-svg { filter: drop-shadow(0 0 6px color-mix(in oklab, var(--b) 55%, transparent)); }
.bdg-name { font-family: var(--font-label); font-weight: 600; font-size: 14px; line-height: 1.15; letter-spacing: .02em; color: var(--fg); max-width: 96px; }
.bdg.is-pre .bdg-svg { filter: saturate(.75); opacity: .72; }
.bdg.is-pre .bdg-name { color: var(--muted); }
.bdg.sm { flex-direction: row; gap: 8px; text-align: left; }
.bdg.sm .bdg-svg { width: 46px; height: 38px; }
.bdg.sm .bdg-name { max-width: none; }
.bdg-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.bdg-cell .inline-form { display: inline; margin: 0; }
.bdg-removed { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; }
.bdg-gone { font-family: var(--font-label); font-weight: 600; color: var(--muted); text-decoration: line-through; }
.chip-x { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 0 0 4px; cursor: pointer; }
.chip-x:hover { color: var(--bad); }
.medal-count { margin-left: 10px; font-weight: 600; white-space: nowrap; }
.medal-count::before { content: ""; display: inline-block; width: 9px; height: 10px; margin-right: 4px; vertical-align: -1px; background: var(--b); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.badge-note { padding: 0 16px 12px; margin: 8px 0 0; }
.give-badge { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
@media (max-width: 560px) { .bdg-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); } .bdg-svg { width: 78px; height: 65px; } }
.arch-small { font-family: var(--font-label); letter-spacing: .03em; font-size: 12px; }
.ovr-badge small { font-family: var(--font-label); font-size: 11px; letter-spacing: .08em; font-weight: 700; opacity: .75; }
.dtd-tag { font-family: var(--font-label); font-size: 11.5px; letter-spacing: .06em; font-weight: 700; text-transform: uppercase; color: var(--mid); padding: 1px 6px; border-radius: 5px; border: 1px solid color-mix(in oklab, var(--mid) 50%, transparent); }
.start-tag { font-family: var(--font-label); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.rot-row.is-dtd { background: color-mix(in oklab, var(--mid) 6%, var(--surface)); }
.rot-group { padding: 8px 16px 4px; font-family: var(--font-label); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--bad); font-weight: 700; border-top: 1px solid var(--line); }
.rot-note { margin: 0; padding-top: 0; }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border-top: 1px solid var(--line-soft); }
.preset { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 10px; }
.preset.is-default { border-color: color-mix(in oklab, var(--accent) 45%, transparent); background: var(--accent-soft); }
.preset small { font-family: var(--font-label); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.preset-new { display: inline-flex; align-items: center; gap: 6px; }
.preset-new input { background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: inherit; width: 140px; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.ready { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--accent-soft); border-bottom: 1px solid var(--line-soft); }
.rot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; border-top: 1px solid var(--line-soft); }
.add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line-soft); }
.add-row input[type=number] { width: 96px; }
.add-row input[type=text] { min-width: 180px; flex: 1; }
.dim { opacity: .55; }
ul.plain { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.against { border-top: 1px solid var(--line-soft); }
.settings-list { display: flex; flex-direction: column; gap: 14px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setting-label { display: flex; flex-direction: column; gap: 2px; }
.setting input { width: 90px; }
@media (max-width: 640px) {
  .rot-head { display: none; }
  .rot-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .rot-who { grid-column: 1 / -1; }
  .rot-sugg { display: none; }
}

/* Rivalries, chemistry and injuries on the public pages. */
.rival-tag { font-family: var(--font-label); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.gb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note-list { list-style: none; margin: 0; padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.note-list li { display: flex; align-items: center; gap: 10px; }
.note-list .note-main { flex: 1; min-width: 0; }
.note-list .note-side { font-family: var(--font-label); font-weight: 700; font-variant-numeric: tabular-nums; }

/* News: lists, the home page's headline, an article. */
.newslist { list-style: none; margin: 0; padding: 4px 6px; }
.newslist li + li { border-top: 1px solid var(--line-soft); }
.newsrow { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 10px 10px; color: var(--fg); text-decoration: none; border-radius: 8px; }
.newsrow:hover { background: var(--surface-2); text-decoration: none; }
.newsmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.newsmain small { color: var(--muted); font-size: 13.5px; }
.kicker { font-family: var(--font-label); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.kicker.is-recap { color: var(--muted); }
.when { font-family: var(--font-label); font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.hero-story { display: flex; flex-direction: column; gap: 6px; margin: 6px 12px 4px; padding: 16px; border-radius: var(--r); background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); color: var(--fg); text-decoration: none; }
.hero-story:hover { text-decoration: none; filter: brightness(1.02); }
.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 4vw, 32px); line-height: 1.05; letter-spacing: .01em; }
.hero-dek { color: var(--muted); }
.story { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.story-head { display: flex; flex-direction: column; gap: 6px; }
.story-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 6vw, 46px); line-height: 1.02; margin: 0; }
.story-dek { font-size: 18px; color: var(--muted); margin: 0; }
.byline { margin: 0; font-family: var(--font-label); letter-spacing: .04em; color: var(--muted); font-size: 13.5px; }
.story-score { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); text-decoration: none; }
.story-score:hover { border-color: var(--accent); text-decoration: none; }
.story-score .small-link { margin-left: auto; }
.prose { font-size: 17px; line-height: 1.62; }
.prose p, .prose ul, .prose blockquote { margin: 0 0 14px; }
.prose h2 { font-family: var(--font-display); font-weight: 800; font-size: 26px; margin: 22px 0 8px; }
.prose h3 { font-size: 19px; margin: 18px 0 6px; }
.prose blockquote { border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; color: var(--muted); font-style: italic; }
.prose a { color: var(--accent); }
.recap .prose { font-size: 16px; }
.recap-title { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin: 0 0 8px; }
.story-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.tagchip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 14px; }
.tagchip:hover { border-color: var(--accent); text-decoration: none; }

/* Manage: the article editor. */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.editor-main, .editor-side { display: flex; flex-direction: column; gap: 14px; }
.editor .field { display: flex; flex-direction: column; gap: 6px; }
.editor .field > span { font-family: var(--font-label); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.editor input[type=text], .editor input[type=datetime-local], .editor textarea {
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%;
}
.editor input[name=title] { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.editor textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.5; resize: vertical; min-height: 320px; }
.editor-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.preview { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 14px; min-height: 320px; max-height: 640px; overflow: auto; font-size: 15.5px; }
.format-help { color: var(--muted); font-size: 13.5px; }
.format-help code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.editor .check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 900px) {
  .editor, .editor-cols { grid-template-columns: 1fr; }
  .preview, .editor textarea { min-height: 200px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
