/* ============================================================
   scoreonline.net
   Two-tier tokens: base (raw values) then semantic (named uses).
   Components only ever reference semantic tokens, so the light
   theme redefines semantics and nothing else has to change.
   ============================================================ */

/* ---------- Tier 1: base ---------- */

:root {
  /* Neutrals — cool slate, dark-first */
  --slate-950: #0e1116;
  --slate-900: #161b22;
  --slate-850: #1c2230;
  --slate-800: #262d38;
  --slate-500: #848d9b;
  --slate-300: #b4bcc8;
  --slate-050: #f3f5f7;
  --white:     #ffffff;

  /* Accent — hardwood amber */
  --amber-400: #f0a33c;
  --amber-700: #8a5200;
  --amber-050: #fdf3e3;

  /* Status */
  --red-400:   #ff5c5c;
  --red-700:   #c42525;
  --green-400: #4ade80;
  --green-700: #15803d;

  /* Type */
  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
             Helvetica, Arial, sans-serif;
  --font-num: ui-monospace, "SF Mono", SFMono-Regular, "Roboto Mono",
              Menlo, Consolas, monospace;

  /* Spacing — 4px base */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;

  --radius:    6px;
  --radius-lg: 10px;

  --wrap: 72rem;
  --wrap-narrow: 42rem;
}

/* ---------- Tier 2: semantic (dark is the default) ---------- */

:root {
  --bg:          var(--slate-950);
  --bg-sunken:   #0a0d11;
  --surface:     var(--slate-900);
  --surface-alt: var(--slate-850);
  --rule:        var(--slate-800);
  --rule-strong: #333c4a;

  --text:        var(--slate-050);
  --text-soft:   var(--slate-300);
  --text-mute:   var(--slate-500);
  --text-invert: var(--slate-950);

  --link:        var(--amber-400);
  --accent:      var(--amber-400);
  --accent-bg:   #2a1f0d;

  --live:        var(--red-400);
  --live-bg:     #2a1414;
  --win:         var(--green-400);
  --loss:        var(--slate-500);

  --focus:       var(--amber-400);
  --shadow:      0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -14px rgb(0 0 0 / .7);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:          var(--white);
    --bg-sunken:   #f4f6f8;
    --surface:     var(--white);
    --surface-alt: #f7f8fa;
    --rule:        #e3e7ec;
    --rule-strong: #c9d0d9;

    --text:        #11151b;
    --text-soft:   #434d5a;
    --text-mute:   #5f6a79;
    --text-invert: var(--white);

    --link:        var(--amber-700);
    --accent:      var(--amber-700);
    --accent-bg:   var(--amber-050);

    --live:        var(--red-700);
    --live-bg:     #fdeaea;
    --win:         var(--green-700);
    --loss:        #5f6a79;

    --focus:       var(--amber-700);
    --shadow:      0 1px 2px rgb(17 21 27 / .06), 0 8px 24px -14px rgb(17 21 27 / .18);
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* No smooth scroll: it fights the date pagination on the scoreboard. */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.25rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Every number on this site is tabular so columns of digits line up. */
.num, td, th, time, .score {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
@media (min-width: 40rem) { .wrap { padding-inline: var(--sp-5); } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--sp-4); top: -3rem;
  z-index: 10;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent); color: var(--text-invert);
  border-radius: var(--radius); font-weight: 600;
  text-decoration: none;
  transition: top .15s;
}
.skip:focus { top: var(--sp-2); }

/* ---------- Site header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.header-inner {
  display: flex; align-items: center; gap: var(--sp-5);
  min-height: 3.5rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-weight: 700; font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.brand-mark {
  width: 1.125rem; height: 1.125rem; flex: none;
  border-radius: 50%;
  background: var(--accent);
  /* the two seams of a basketball, drawn not downloaded */
  background-image:
    linear-gradient(to right, transparent 46%, var(--bg) 46%, var(--bg) 54%, transparent 54%),
    linear-gradient(to bottom, transparent 46%, var(--bg) 46%, var(--bg) 54%, transparent 54%);
}
.brand span span { color: var(--accent); }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex; gap: var(--sp-1);
  margin: 0; padding: 0; list-style: none;
  flex-wrap: wrap;
}
.site-nav a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-size: .9375rem; font-weight: 550;
  color: var(--text-soft); text-decoration: none;
  border-radius: var(--radius);
}
.site-nav a:hover { background: var(--surface-alt); color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-bg);
}

/* ---------- Page furniture ---------- */

main { padding-block: var(--sp-5) var(--sp-7); }

.page-head { margin-bottom: var(--sp-5); }
.eyebrow {
  margin: 0 0 var(--sp-1);
  font-size: .75rem; font-weight: 650;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-mute);
}
.lede { color: var(--text-soft); max-width: var(--wrap-narrow); }

.breadcrumbs { margin-bottom: var(--sp-4); font-size: .875rem; color: var(--text-mute); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--rule-strong); }

.section { margin-bottom: var(--sp-7); }
.section-head {
  display: flex; align-items: baseline; gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--rule);
}
.section-head h2 { margin-right: auto; }

/* ---------- Scoreboard ---------- */

.date-nav {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.date-nav a, .date-nav span {
  font-size: .875rem; font-weight: 550;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none; color: var(--text-soft);
}
.date-nav a:hover { border-color: var(--rule-strong); color: var(--text); }
.date-nav .current { background: var(--surface-alt); color: var(--text); border-color: var(--rule-strong); }

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: var(--sp-4);
  margin: 0; padding: 0; list-style: none;
}

.score-card {
  display: block;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
}
a.score-card:hover { border-color: var(--rule-strong); }
a.score-card:hover .score-card-teams { color: var(--accent); }

.score-card-status {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  font-size: .75rem; font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-mute);
}
.score-card-status .status-live { color: var(--live); }
.score-card-status .clock { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 550; }

.live-dot {
  width: .5rem; height: .5rem; flex: none;
  border-radius: 50%;
  background: var(--live);
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 2s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .35; } }
}

.score-row {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
}
.score-row + .score-row { border-top: 1px solid var(--rule); }

.team-abbr {
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-mute);
}
.score-card-teams { font-weight: 600; }
.team-record { font-size: .8125rem; font-weight: 450; color: var(--text-mute); margin-left: var(--sp-2); }

.score {
  font-family: var(--font-num);
  font-size: 1.375rem; font-weight: 600;
  letter-spacing: -0.02em;
}
.score-row[data-outcome="loss"] .score,
.score-row[data-outcome="loss"] .score-card-teams { color: var(--text-mute); }
.score-row[data-outcome="win"] .score { color: var(--text); }
.score-row[data-outcome="win"] .score-card-teams::after {
  content: "";
  display: inline-block; vertical-align: middle;
  width: 0; height: 0; margin-left: var(--sp-2);
  border-top: .25rem solid transparent;
  border-bottom: .25rem solid transparent;
  border-left: .3rem solid var(--accent);
}

.score-card-foot {
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
  font-size: .8125rem; color: var(--text-mute);
}

/* Provenance notices. Loud on purpose: a visitor must never mistake sample
   scores for real ones. */
.notice {
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  border: 1px dashed;
  font-size: .9375rem;
  text-align: center;
}
.notice-warn { color: var(--live); background: var(--live-bg); border-color: var(--live); }
.notice-live { color: var(--text-soft); background: var(--surface-alt); border-color: var(--rule-strong); }
.notice a { color: inherit; }

.empty {
  padding: var(--sp-6);
  text-align: center;
  color: var(--text-mute);
  background: var(--surface-alt);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-lg);
}

/* ---------- Game page ---------- */

.game-head {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
}
.game-head .score-row { grid-template-columns: 1fr auto; padding-block: var(--sp-3); }
.game-head .score { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); }
.game-head .score-card-teams { font-size: 1.125rem; }

.linescore { overflow-x: auto; }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
}
caption {
  text-align: left;
  font-size: .875rem;
  color: var(--text-mute);
  padding-bottom: var(--sp-2);
}
th, td {
  padding: var(--sp-2) var(--sp-3);
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}
thead th {
  background: var(--bg);
  font-size: .75rem; font-weight: 650;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-mute);
  border-bottom-color: var(--rule-strong);
}
th[scope="row"], .col-name, td:first-child, th:first-child {
  text-align: left;
}
th[scope="row"] { white-space: nowrap; }
caption.visually-hidden { padding: 0; }
tbody tr:hover { background: var(--surface-alt); }
tbody th[scope="row"] { font-weight: 600; }
.rank { color: var(--text-mute); font-weight: 450; width: 2rem; }
.num-strong { font-weight: 650; }
.pos { color: var(--win); }
.neg { color: var(--text-mute); }

.table-note { margin-top: var(--sp-3); font-size: .8125rem; color: var(--text-mute); }

/* ---------- Odds row (informational only — no CTA) ---------- */

.odds {
  background: var(--surface-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}
.odds-head {
  display: flex; align-items: baseline; gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.odds-head h2 { font-size: 1rem; margin-right: auto; }
.odds-stamp { font-size: .75rem; color: var(--text-mute); }
.odds-book { font-size: .8125rem; font-weight: 600; color: var(--text-soft); }
.odds table { font-size: .875rem; }
.odds-disclaimer {
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
  font-size: .75rem; line-height: 1.5; color: var(--text-mute);
}

/* ---------- Stat strip ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--sp-1);
  margin: 0 0 var(--sp-6);
  padding: 0;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-strip > div {
  background: var(--surface);
  padding: var(--sp-3) var(--sp-4);
}
.stat-strip dt {
  font-size: .6875rem; font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-mute);
}
.stat-strip dd {
  margin: var(--sp-1) 0 0;
  font-family: var(--font-num);
  font-size: 1.25rem; font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- Form (W/L pills) ---------- */

.form-line { display: inline-flex; gap: 3px; vertical-align: middle; }
.form-line span {
  display: grid; place-items: center;
  width: 1.125rem; height: 1.125rem;
  border-radius: 3px;
  font-size: .625rem; font-weight: 700;
  color: var(--text-invert);
}
.form-line .w { background: var(--win); }
.form-line .l { background: var(--loss); }

/* ---------- Tabs ---------- */

.tabs {
  display: flex; gap: var(--sp-1);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
}
.tabs a {
  padding: var(--sp-2) var(--sp-4);
  font-size: .9375rem; font-weight: 550;
  color: var(--text-soft); text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Team / card lists ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: var(--sp-3);
  margin: 0; padding: 0; list-style: none;
}
.card {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
}
.card:hover { border-color: var(--rule-strong); }
.card:hover strong { color: var(--accent); }
.card strong { display: block; font-weight: 600; }
.card small { color: var(--text-mute); }

.prose { max-width: var(--wrap-narrow); color: var(--text-soft); }
.prose h2 { margin: var(--sp-6) 0 var(--sp-3); color: var(--text); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: var(--sp-2); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-sunken);
  padding-block: var(--sp-6);
  font-size: .875rem;
  color: var(--text-mute);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.footer-cols h2 {
  font-size: .75rem; font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: var(--sp-2);
}
.footer-cols ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: var(--sp-4); }
.footer-cols li { margin-bottom: var(--sp-1); break-inside: avoid; }
.footer-cols a { color: var(--text-mute); text-decoration: none; }
.footer-cols a:hover { color: var(--link); text-decoration: underline; }
.footer-bottom {
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
  display: flex; gap: var(--sp-4); flex-wrap: wrap;
}
.footer-bottom p { margin: 0; }
/* Reserved for age statements, jurisdiction notices and responsible-gambling
   links when the affiliate layer lands. Empty and invisible until then. */
.compliance-slot:empty { display: none; }
