/* ==========================================================================
   PredictedSports — shared design system
   Editorial sports-data look: warm paper, ink text, one confident blue.
   Fonts: Bricolage Grotesque (display) + Inter (text, tabular numerals).
   ========================================================================== */

:root {
  color-scheme: light;
  /* surfaces: warm paper, white cards */
  --bg: #f7f5f0;
  --bg-2: #efebe3;
  --surface: #ffffff;
  --surface-2: #f6f4ee;
  --surface-3: #ece8df;
  --border: #e5e0d5;
  --border-strong: #d2cbbc;
  /* text */
  --text: #121419;
  --text-2: #42464f;
  --muted: #676a72;
  --grid: #eeeae2;
  /* brand + data */
  --accent: #1f5fd1;
  --accent-hover: #1a52b8;
  --accent-ink: #ffffff;
  --accent-soft: #e8effc;
  --brand-2: #f5b83d;
  --brand-2-soft: #fdf1d6;
  --series-1: #2a6fdb;
  --series-2: #e8692a;
  --series-3: #16a07a;
  --prob-other: #dcd7cb;
  --ink-panel: #14171d;
  --ink-panel-text: #f3f1ea;
  --logo-plate: #f4f1ea;
  --good: #16a34a;
  --good-text: #147a37;
  --good-soft: #e3f4e7;
  --critical: #c8383b;
  --critical-soft: #fbe7e6;
  /* heat-map cells (table.css .t-heat-* / .t-cold-*): a blue-to-orange diverging scale, colorblind-safe */
  --heat-good: #2a6fdb;
  --heat-bad: #e8692a;
  /* interaction */
  --row-hover: #f8f6f1;
  --header-bg: color-mix(in oklab, var(--bg) 84%, transparent);
  /* shape */
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(30, 26, 16, .05);
  --shadow: 0 1px 2px rgba(30, 26, 16, .04), 0 4px 16px -8px rgba(30, 26, 16, .10);
  --shadow-lg: 0 2px 6px rgba(30, 26, 16, .05), 0 18px 40px -16px rgba(30, 26, 16, .22);
  --ring: 0 0 0 3px color-mix(in oklab, var(--accent) 35%, transparent);
  /* type */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --header-h: 64px;
  --sportbar-h: 46px;
}
@media (max-width: 640px) { :root { --header-h: 58px; --sportbar-h: 44px; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1015; --bg-2: #12161d; --surface: #151a21; --surface-2: #1b2129; --surface-3: #242b35;
    --border: #262d37; --border-strong: #38414e;
    --text: #eef0f3; --text-2: #bcc2cc; --muted: #8f96a3; --grid: #20262f;
    --accent: #6ea2ff; --accent-hover: #8db6ff; --accent-ink: #0b1220; --accent-soft: #1a2740;
    --brand-2: #f5b83d; --brand-2-soft: #2e2614;
    --series-1: #4f8ff0; --series-2: #f07f45; --series-3: #2bb98a; --prob-other: #343c48;
    --ink-panel: #1a2230; --ink-panel-text: #eef0f3; --logo-plate: #e9ecf1;
    --good: #34c46a; --good-text: #4fd27e; --good-soft: #15301f;
    --critical: #f06a6a; --critical-soft: #3a1c1e;
    --heat-good: #4f8ff0; --heat-bad: #f07f45;
    --row-hover: #1a2028;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 44px -16px rgba(0, 0, 0, .65);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1015; --bg-2: #12161d; --surface: #151a21; --surface-2: #1b2129; --surface-3: #242b35;
  --border: #262d37; --border-strong: #38414e;
  --text: #eef0f3; --text-2: #bcc2cc; --muted: #8f96a3; --grid: #20262f;
  --accent: #6ea2ff; --accent-hover: #8db6ff; --accent-ink: #0b1220; --accent-soft: #1a2740;
  --brand-2: #f5b83d; --brand-2-soft: #2e2614;
  --series-1: #4f8ff0; --series-2: #f07f45; --series-3: #2bb98a; --prob-other: #343c48;
  --ink-panel: #1a2230; --ink-panel-text: #eef0f3; --logo-plate: #e9ecf1;
  --good: #34c46a; --good-text: #4fd27e; --good-soft: #15301f;
  --critical: #f06a6a; --critical-soft: #3a1c1e;
  --heat-good: #4f8ff0; --heat-bad: #f07f45;
  --row-hover: #1a2028;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 44px -16px rgba(0, 0, 0, .65);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--sportbar-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-text);
  font-feature-settings: "cv11", "ss01";
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: clip;
}
main { flex: 1 0 auto; width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.hint { color: var(--muted); font-size: 13px; }
code, pre { font-family: var(--font-mono); font-size: 13px; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 4px; }
::selection { background: color-mix(in oklab, var(--accent) 25%, transparent); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* loading + empty states */
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 88px 0; text-align: center; font-size: 14px; color: var(--muted); }
.loading::before {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%) 0 0 / 300% 100%; border-radius: 8px; animation: shimmer 1.4s ease-in-out infinite; color: transparent; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); }
/* the frosted backdrop sits on a pseudo-element: backdrop-filter on .top itself would trap the fixed mobile menu inside the header */
.top::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--header-bg);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
}
body.menu-open .top::before { background: var(--bg); }
.top-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.025em; color: var(--text); text-decoration: none; white-space: nowrap; flex: none; }
.brand:hover { color: var(--text); }
.brand b { font-weight: 800; }
.brand b span { color: var(--accent); }
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M8 22 L14 15 L18 18 L24 10' stroke='white' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='24' cy='10' r='2.6' fill='%23f5b83d'/%3E%3C/svg%3E") center/100% no-repeat;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.14), 0 1px 2px rgba(20, 40, 90, .18);
}

.nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; height: 100%; }
.nav-primary { display: flex; gap: 2px; height: 100%; align-items: center; }
.nav a, .nav-more {
  position: relative; display: inline-flex; align-items: center; height: 34px; padding: 0 11px; border-radius: 8px;
  color: var(--text-2); text-decoration: none;
  font: 560 14px/1 var(--font-text); white-space: nowrap; border: 0; background: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-primary a:hover, .nav-more:hover { background: var(--surface-3); color: var(--text); }
/* the current section: ink text with an accent bar sitting on the header's bottom edge */
.nav-primary a[aria-current] { color: var(--text); font-weight: 650; }
.nav-primary a[aria-current]::after, .nav-more.on::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent);
  bottom: calc((var(--header-h) - 34px) / -2 - 1px);
}
.nav-group { position: relative; margin-left: 6px; padding-left: 8px; }
.nav-group::before { content: ""; position: absolute; left: 0; top: 50%; height: 18px; margin-top: -9px; width: 1px; background: var(--border-strong); }
.nav-more { gap: 5px; }
.nav-more svg { width: 12px; height: 12px; opacity: .7; transition: transform .2s; }
.nav-more[aria-expanded="true"] { background: var(--surface-3); color: var(--text); }
.nav-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-more.on { color: var(--text); font-weight: 650; }
.nav-menu {
  position: absolute; top: calc(100% + 12px); left: -8px; z-index: 40; width: 340px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; display: none;
}
.nav-more[aria-expanded="true"] + .nav-menu { display: grid; gap: 1px; animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.nav-menu a { display: grid; gap: 2px; height: auto; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); white-space: normal; line-height: 1.3; }
.nav-menu a b { font-weight: 650; font-size: 14px; }
.nav-menu a small { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.nav-menu a:hover { background: var(--surface-2); color: var(--text); }
.nav-menu a[aria-current] { background: var(--accent-soft); }
.nav-menu a[aria-current] b { color: var(--accent); }

.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; padding: 0;
  box-shadow: var(--shadow-sm); transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
.theme-toggle.is-dark .i-sun { display: block; }
.theme-toggle.is-dark .i-moon { display: none; }
.nav-toggle { display: none; }
.nav-toggle path { stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; transition: transform .2s, opacity .2s; transform-origin: 12px 12px; }
body.menu-open .nav-toggle .l1 { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav-toggle .l2 { opacity: 0; }
body.menu-open .nav-toggle .l3 { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1040px) { .top-inner { gap: 16px; } .nav a, .nav-more { padding: 0 9px; } .nav-primary a[aria-current]::after, .nav-more.on::after { left: 9px; right: 9px; } }
@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0; z-index: 29; height: auto;
    display: none; flex-direction: column; align-items: stretch; gap: 22px;
    background: var(--bg); padding: 20px 16px 40px; overflow-y: auto; border-top: 1px solid var(--border);
  }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { display: flex; animation: pop .16s ease-out; }
  .nav-primary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; height: auto; }
  .nav-primary a { justify-content: center; height: 48px; padding: 0 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; }
  .nav-primary a:first-child { grid-column: 1 / -1; }
  .nav-primary a[aria-current] { background: var(--text); color: var(--bg); border-color: var(--text); }
  .nav-primary a[aria-current]::after, .nav-more.on::after { display: none; }
  .nav-group { margin: 0; padding: 0; }
  .nav-group::before { display: none; }
  .nav-more { display: block; height: auto; padding: 0 4px 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) !important; pointer-events: none; background: none !important; }
  .nav-more svg { display: none; }
  .nav-menu { position: static; display: grid !important; width: auto; box-shadow: none; animation: none !important; padding: 4px; }
  .nav-menu a { padding: 11px 12px; }
}
@media (max-width: 380px) { .brand { font-size: 17px; } .brand .mark { width: 26px; height: 26px; } .top-actions { gap: 6px; } }

/* ---------- page hero ---------- */
.hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 32px; flex-wrap: wrap;
  padding: 36px 0 26px;
}
.hero > div:first-child { min-width: 0; flex: 1 1 420px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 11.5px/1.2 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 16px; height: 3px; border-radius: 2px; background: var(--brand-2); flex: none; }
.sub { margin: 12px 0 0; color: var(--text-2); font-size: 16.5px; line-height: 1.55; max-width: 66ch; text-wrap: pretty; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 12px 16px 13px; min-width: 128px; flex: 0 1 auto;
}
.stat b { display: block; font: 750 26px/1.1 var(--font-display); letter-spacing: -0.025em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 4px; max-width: 200px; }
.stat .vs { display: inline; font: 500 14px var(--font-text); color: var(--muted); }
.stat .info { vertical-align: -1px; }
@media (max-width: 640px) {
  .hero { padding: 24px 0 18px; }
  .sub { font-size: 15.5px; }
  .stats { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { min-width: 0; padding: 10px 12px; }
  .stat b { font-size: 21px; }
  h1 { overflow-wrap: anywhere; }
}

/* ---------- layout ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.grid > * { min-width: 0; }
.side { display: grid; gap: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm); min-width: 0;
}
.grid .card, .side .card { margin-bottom: 0; }
@media (max-width: 640px) { .card { padding: 16px; border-radius: var(--radius); margin-bottom: 16px; } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head > .hint { text-align: right; }
.card-head h2 { display: flex; align-items: center; gap: 6px; font-size: 18px; letter-spacing: -0.015em; }
.card-head h2 a { color: var(--text); text-decoration: none; }
.card-head h2 a:hover { color: var(--accent); }
.card > h2 { margin-bottom: 10px; }
@media (max-width: 640px) { .card-head > .hint { text-align: left; } }
/* section header: a hairline rule, then the title with its hint */
.section-title {
  font-size: 24px; letter-spacing: -0.02em; margin: 48px 0 18px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap;
}
.section-title .hint { font-family: var(--font-text); font-weight: 500; font-size: 13.5px; letter-spacing: 0; }
@media (max-width: 640px) { .section-title { font-size: 21px; margin-top: 36px; padding-top: 16px; } }
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.cards-3 > *, .cards-2 > * { min-width: 0; }
.cards-3 > .card, .cards-2 > .card { margin-bottom: 0; }
@media (max-width: 960px) { .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .cards-3, .cards-2 { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* ---------- form controls ---------- */
input[type="search"], input[type="email"], select {
  font: inherit; font-size: 14px; color: var(--text); background-color: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 12px; min-height: 40px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; max-width: 100%; font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
input[type="search"] {
  width: 220px; padding-left: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='%23888' stroke-width='2'/%3E%3Cpath d='m16 16 4 4' stroke='%23888' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; background-size: 15px;
}
input::placeholder { color: var(--muted); opacity: 1; }
input:hover, select:hover { border-color: color-mix(in oklab, var(--border-strong) 60%, var(--text)); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background-color: var(--surface); }
@media (max-width: 640px) {
  .card-head input[type="search"] { width: 100%; }
  input[type="search"], input[type="email"] { font-size: 16px; } /* 16px stops iOS zooming in */
}

/* ---------- buttons, chips, pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-left: auto; min-height: 36px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); border-radius: var(--radius-sm);
  padding: 7px 14px; cursor: pointer; font: 600 13.5px/1.2 var(--font-text); text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-2); border-color: color-mix(in oklab, var(--border-strong) 60%, var(--text)); color: var(--text); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.close { margin-left: 0; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius-sm); padding: 10px 18px;
  font: 650 14px/1.2 var(--font-text); cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm), inset 0 -1px 0 rgba(0,0,0,.12);
  transition: background .15s, box-shadow .15s;
}
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn-primary:focus-visible { outline: none; box-shadow: var(--ring); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 34px;
  font: 600 13px/1.2 var(--font-text); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }
.chip.on, .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips a.chip, a.chip { text-decoration: none; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); line-height: 1.5; }
.lg-tag {
  display: inline-block; font: 700 10px/1.6 var(--font-text); letter-spacing: .06em; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; margin-bottom: 2px;
}

/* segmented control: <div class="seg" role="group"><button aria-pressed="true">…</button>…</div> */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--border); }
.seg > button, .seg > a {
  border: 0; background: none; color: var(--text-2); font: 600 13px/1 var(--font-text); padding: 0 12px; min-height: 30px;
  border-radius: 7px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap;
}
.seg > button:hover, .seg > a:hover { color: var(--text); }
.seg > [aria-pressed="true"], .seg > [aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg > :focus-visible { outline: none; box-shadow: var(--ring); }

/* plain-language help button */
.info {
  display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; padding: 0; margin: 0 0 0 4px;
  border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted);
  font: 700 10px/1 var(--font-text); cursor: help; vertical-align: 1px; letter-spacing: 0; text-transform: none;
  transition: background .15s, color .15s, border-color .15s;
  position: relative;
}
.info::after { content: ""; position: absolute; inset: -8px; } /* bigger tap target without a bigger dot */
.info:hover, .info:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
th .info { width: 14px; height: 14px; font-size: 9px; margin-left: 3px; }

/* ---------- tables ---------- */
.table-scroll { max-height: 720px; overflow: auto; margin: 0 -22px -22px; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
@media (max-width: 640px) { .table-scroll { margin: 0 -16px -16px; border-radius: 0 0 var(--radius) var(--radius); } }
.ratings { width: 100%; border-collapse: collapse; font-size: 14px; }
.ratings th, table.data th {
  position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; vertical-align: bottom;
  font: 650 11px/1.3 var(--font-text); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 10px 10px 9px; border-bottom: 1px solid var(--border-strong); white-space: nowrap;
}
.ratings td { padding: 9px 10px; border-bottom: 1px solid var(--grid); }
.ratings th:first-child, .ratings td:first-child { padding-left: 22px; }
.ratings th:last-child, .ratings td:last-child { padding-right: 22px; }
@media (max-width: 640px) { .ratings th:first-child, .ratings td:first-child { padding-left: 14px; } .ratings th:last-child, .ratings td:last-child { padding-right: 14px; } .ratings td, .ratings th { padding-left: 7px; padding-right: 7px; } .ratings td { padding-top: 10px; padding-bottom: 10px; } }
.ratings tbody tr { cursor: pointer; transition: background .12s; }
.ratings tbody tr:hover { background: var(--row-hover); }
.ratings tbody tr.sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ratings tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.rank { color: var(--muted); width: 40px; font-weight: 600; }
.team-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ratings .team-cell span { font-weight: 600; }
.logo { width: 24px; height: 24px; object-fit: contain; flex: none; display: inline-block; }
span.logo { border-radius: 50%; background: var(--surface-3); }
.elo { font-weight: 750; font-family: var(--font-display); font-size: 1.05em; }
.bar-cell { position: relative; }
.up { color: var(--good-text); font-weight: 600; }
.down { color: var(--critical); font-weight: 600; }
.flat { color: var(--muted); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--grid); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--row-hover); }
table.data th:first-child, table.data td:first-child { padding-left: 4px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-wrap.tall { max-height: 460px; overflow: auto; }
.nowrap { white-space: nowrap; }
@media (max-width: 640px) { .hide-sm { display: none; } table.data td, table.data th { padding-left: 7px; padding-right: 7px; } }

/* ---------- games ---------- */
.games { display: grid; gap: 8px; max-height: 460px; overflow: auto; margin-right: -8px; padding-right: 8px; }
.day { font: 700 11px/1.3 var(--font-text); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 14px 0 2px; }
.day:first-child { margin-top: 0; }
.game {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid transparent;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.game:hover { border-color: var(--border-strong); }
.game[data-href] { cursor: pointer; }
.side-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 650; font-size: 14.5px; color: var(--text); text-decoration: none; }
.side-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-team.right { justify-content: flex-end; text-align: right; }
.side-team .pct { font-weight: 700; }
a.side-team:hover span { text-decoration: underline; text-underline-offset: 3px; }
.game .mid { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.45; font-variant-numeric: tabular-nums; }
.score { color: var(--text); font: 750 16px/1.2 var(--font-display); letter-spacing: -0.01em; }
.probbar { grid-column: 1 / -1; display: flex; height: 6px; gap: 3px; }
.probbar i { display: block; height: 100%; border-radius: 999px; }
.probbar .fav { background: var(--series-1); }
.probbar .dog { background: var(--prob-other); }
.result { font-size: 12.5px; color: var(--muted); grid-column: 1 / -1; display: flex; justify-content: space-between; }
.won { color: var(--good-text); font-weight: 650; }
.upset { color: var(--critical); font-weight: 650; }
.live { color: var(--critical); font-weight: 700; }
.linefoot { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-2); padding-top: 8px; border-top: 1px dashed var(--border); }
.linefoot b { color: var(--text); }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }
section.card.empty, .card > .empty:only-child { text-align: center; padding: 40px 16px; }
section.card.empty::before, .card > .empty:only-child::before {
  content: ""; display: block; width: 36px; height: 36px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23999' stroke-width='1.8'/%3E%3Cpath d='M8.5 12h7' stroke='%23999' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  border: 1px solid var(--border);
}

/* schedule panel */
.daytabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; padding: 2px; }
.daytabs::-webkit-scrollbar { display: none; }
.daytabs .chip { white-space: nowrap; flex: none; }
.daytabs .cnt { opacity: .6; font-weight: 500; margin-left: 3px; }
.sched-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.schedule .game { background: var(--surface); border-color: var(--border); }
.schedule .game:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.schedule .more { margin: 16px auto 0; display: flex; }
@media (max-width: 640px) { .sched-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- team panel (league pages) ---------- */
.team-panel { border-color: color-mix(in oklab, var(--accent) 35%, var(--border)); }
.team-panel .tp-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.team-panel .tp-head > div { min-width: 0; }
.team-panel .tp-head img, .team-panel .tp-head > .logo { width: 56px; height: 56px; }
.team-panel .tp-head h2 { font-size: 26px; }
.team-panel .tp-head .btn:first-of-type { margin-left: auto; }
.tp-controls { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; margin: 18px 0 8px; font-size: 14px; color: var(--text-2); }
.tp-controls label { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; flex: 0 1 auto; }
.tp-controls select { min-width: 0; }
.tp-controls select { max-width: 240px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.legend i { display: inline-block; width: 16px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.matchup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.matchup div { background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; font-size: 13px; color: var(--text-2); }
.matchup b { display: block; font: 750 26px/1.15 var(--font-display); color: var(--text); }
@media (max-width: 560px) { .matchup { grid-template-columns: 1fr; } .team-panel .tp-head .btn:first-of-type { margin-left: 0; } }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font-text); }
.axis text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.gridline { stroke: var(--grid); stroke-width: 1; }
.refline { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.bar-label { fill: var(--text-2); font-size: 12px; }
.bar-value { fill: var(--text); font-size: 12px; font-weight: 650; }
.spark { display: block; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: center; }
@media (max-width: 760px) { .cal-wrap { grid-template-columns: minmax(0, 1fr); } }
.cal-notes p { margin: 0 0 12px; color: var(--text-2); }
.cal-notes b { color: var(--text); }

.tooltip {
  position: fixed; pointer-events: none; z-index: 60; background: var(--ink-panel); color: var(--ink-panel-text);
  font-size: 12.5px; line-height: 1.5; padding: 9px 12px; border-radius: 10px; max-width: 280px;
  box-shadow: var(--shadow-lg); border: 1px solid color-mix(in oklab, var(--ink-panel-text) 12%, transparent);
}
.tooltip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.tip-help { display: block; }

/* ---------- method / explainer cards ---------- */
.method { background: var(--surface); }
.method h2 { font-size: 22px; margin-bottom: 12px; }
.method p, .method ul { color: var(--text-2); max-width: 760px; }
.method ul { padding-left: 20px; }
.method li { margin: 4px 0; }
.method pre { background: var(--surface); border: 1px solid var(--border); padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; color: var(--text); line-height: 1.6; }
.sub-h { font: 650 14px/1.3 var(--font-text); margin: 20px 0 10px; color: var(--text-2); }
.lines-live { margin-bottom: 14px; }
.mk-grid { margin-bottom: 0; margin-top: 4px; }

/* ---------- newsletter ---------- */
.nl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .nl-layout { grid-template-columns: minmax(0, 1fr); } }
.issue { padding: 36px 40px; }
@media (max-width: 640px) { .issue { padding: 20px 16px; } }
.issue-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.issue-meta .btn { margin-left: 0; }
.issue-title { font-size: clamp(24px, 3.4vw, 34px); margin: 10px 0 16px; letter-spacing: -0.02em; }
.issue-body { max-width: 680px; color: var(--text-2); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.issue-body h2 { font-size: 21px; color: var(--text); margin: 32px 0 10px; }
.issue-body strong { color: var(--text); }
.issue-body li { margin: 6px 0; }
.issue-body table { border-collapse: collapse; font-size: 14px; margin: 10px 0; display: block; max-width: 100%; overflow-x: auto; }
.issue-body th, .issue-body td { padding: 6px 14px 6px 0; text-align: left; border-bottom: 1px solid var(--grid); }
.issue-body th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.archive { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.archive a { text-decoration: none; }
.archive a:hover { text-decoration: underline; }
.archive a[aria-current] { font-weight: 700; color: var(--text); }
.sub-form { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-form input { flex: 1; min-width: 160px; }
.nl-side .card { margin-bottom: 20px; }
.nl-side .card:first-child { background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); }

/* ---------- footer ---------- */
.foot { margin-top: 72px; border-top: 1px solid var(--border); background: var(--bg-2); color: var(--muted); font-size: 13.5px; }
.foot-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px 48px; padding-top: 44px; padding-bottom: 28px; }
.foot-brand p { margin: 12px 0 0; max-width: 38ch; color: var(--text-2); line-height: 1.55; }
.foot-brand .brand { font-size: 18px; }
.foot-brand .brand .mark { width: 26px; height: 26px; }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.foot-links h3 { font: 700 11px/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 4px 0 12px; }
.foot-links a { display: block; width: max-content; max-width: 100%; color: var(--text-2); text-decoration: none; padding: 4px 0; }
.foot-links a:hover { color: var(--accent); }
.foot-bottom {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px;
  margin: 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted);
}
.foot-credit { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12.5px; }
@media (max-width: 640px) {
  .foot { margin-top: 48px; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .foot-links a { padding: 8px 0; } /* comfortable tap targets */
}

/* logos read on dark surfaces */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.logo, :root:not([data-theme="light"]) img.fx-logo, :root:not([data-theme="light"]) img.h-logo { filter: drop-shadow(0 0 1px rgba(255,255,255,.35)); }
}
:root[data-theme="dark"] img.logo, :root[data-theme="dark"] img.fx-logo, :root[data-theme="dark"] img.h-logo { filter: drop-shadow(0 0 1px rgba(255,255,255,.35)); }

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

/* big team logos sit on a round badge (a light plate in dark mode, since logos are drawn for light backgrounds) */
.team-panel .tp-head .tp-logo { width: 46px; height: 46px; padding: 9px; box-sizing: content-box; border-radius: 50%; background: var(--logo-plate); border: 1px solid var(--border); }
table.data td, table.data th { white-space: nowrap; }

/* where to watch */
.tvline { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: var(--text-2); padding-top: 8px; border-top: 1px dashed var(--border); }
.tvline b { color: var(--text); font-weight: 650; }
.tvline + .linefoot { border-top: 0; padding-top: 2px; }
.tv-ic { width: 15px; height: 15px; flex: none; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='6.5' width='19' height='13' rx='2.5'/%3E%3Cpath d='m8 2.5 4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='6.5' width='19' height='13' rx='2.5'/%3E%3Cpath d='m8 2.5 4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tv-toggle { display: inline-flex; align-items: center; gap: 6px; }
.tv-toggle .tv-ic { background: currentColor; }

/* dark mode: small logos sit on a light plate so dark logos (e.g. navy) stay visible */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.logo { background: var(--logo-plate); border-radius: 50%; padding: 2px; box-sizing: border-box; filter: none; } }
:root[data-theme="dark"] img.logo { background: var(--logo-plate); border-radius: 50%; padding: 2px; box-sizing: border-box; filter: none; }
:is(.tm-logo-wrap, .gp-logo, .ct-fx-logo, .fx-logo-wrap, .mm-plate) img.logo { background: none; padding: 0; }
