/* D1 volleyball dashboard. Palette: validated reference data-viz palette (light + dark steps). */
:root {
  color-scheme: light;
  --page: #e4e3df; --surface: #eeede9; --surface-2: #e2e1db;   /* soft warm gray (was near-white) */
  --ink: #0b0b0b; --ink2: #52514e; --muted: #5f5d58;
  --grid: #d4d3cc; --axis: #b3b2a7; --border: rgba(11,11,11,0.12);
  --s1: #2a78d6; --s2: #d9592a; --s3: #1baf7a; --s4: #eda100; --mute-mark: #b3b2a7;
  --good: #0ca30c; --good-ink: #006300; --warn: #fab219; --crit: #d03b3b; --crit-ink: #b02e2e;
  --accent-wash: rgba(42,120,214,0.10); --link: #1d63b8; --on-s1: #fff;
  --lg-wash: rgba(42,120,214,0.12); --lg-ink: #1d63b8; --lg-ink-hover: #134a8c; --lg-on: #1d63b8; --lg-on-ink: #fff;   /* league switch: always blue (team colors don't touch it) */
  --mu-bg: transparent; --mu-bg-hover: rgba(26,86,160,0.08); --mu-ink: #1a56a0; --mu-ring: rgba(26,86,160,0.55);
  --ramp: #e6effa, #cde2fb, #9ec5f4, #6da7ec, #3987e5, #256abf, #184f95, #0d366b;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
    --ink: #ffffff; --ink2: #c3c2b7; --muted: #9a988f;
    --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,0.10);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --mute-mark: #4a4a46;
    --good-ink: #0ca30c; --crit-ink: #e66767;
    --accent-wash: rgba(57,135,229,0.14); --link: #5598e7;
    --lg-wash: rgba(57,135,229,0.16); --lg-ink: #86b6ef; --lg-ink-hover: #cde2fb; --lg-on: #256abf; --lg-on-ink: #fff;
    --mu-bg: transparent; --mu-bg-hover: rgba(134,182,239,0.12); --mu-ink: #86b6ef; --mu-ring: rgba(134,182,239,0.7);
    --ramp: #1d2a3a, #104281, #184f95, #256abf, #2a78d6, #5598e7, #86b6ef, #cde2fb;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
  --ink: #ffffff; --ink2: #c3c2b7; --muted: #9a988f;
  --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,0.10);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --mute-mark: #4a4a46;
  --good-ink: #0ca30c; --crit-ink: #e66767;
  --accent-wash: rgba(57,135,229,0.14); --link: #5598e7;
  --lg-wash: rgba(57,135,229,0.16); --lg-ink: #86b6ef; --lg-ink-hover: #cde2fb; --lg-on: #256abf; --lg-on-ink: #fff;
    --mu-bg: transparent; --mu-bg-hover: rgba(134,182,239,0.12); --mu-ink: #86b6ef; --mu-ring: rgba(134,182,239,0.7);
  --ramp: #1d2a3a, #104281, #184f95, #256abf, #2a78d6, #5598e7, #86b6ef, #cde2fb;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }   /* links keep the default blue when team colors take over --s1 */
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 15px; margin: 0; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--ink2); font-weight: 600; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--border); padding: 6px max(16px, 3vw) 0; }
.team-colored .top { border-bottom-color: transparent; background-image: linear-gradient(90deg, var(--s1), var(--team-2)); background-size: 100% 3px; background-position: bottom; background-repeat: no-repeat; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.top-row .myteam select { min-height: 28px; padding: 2px 8px; }
/* tabs on the left, the data line and theme switch on the same line at the right */
.nav-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; margin-top: 4px; }   /* not enough room: the data line wraps under the tabs */
.nav-row #nav { flex: 1 1 auto; min-width: 0; }
.meta-box { flex: none; margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 14px; height: 14px; flex: none; display: block; }   /* volleyball logo, same size as the old dot */
.myteam { color: var(--ink2); font-size: 13px; display: flex; gap: 6px; align-items: center; }
/* PA District 1 | Delaware switch (a full page load per league) */
.league-switch { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--lg-wash); margin-right: auto; flex: none; }
.league-switch a { padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--lg-ink); white-space: nowrap; }
.league-switch a:hover { text-decoration: none; color: var(--lg-ink-hover); }
.league-switch a.on { background: var(--lg-on); color: var(--lg-on-ink); }
/* the switch sits in its own full-width strip above the title row (layout C, owner 2026-10-04: room for more leagues) */
.league-row { display: flex; justify-content: flex-start; margin: -6px calc(-1 * max(16px, 3vw)) 6px; padding: 4px max(16px, 3vw); background: var(--lg-wash); }
.league-row .league-switch { background: none; padding: 0; margin: 0; flex-wrap: wrap; flex: 0 1 auto; min-width: 0; }
@media print { .league-row { display: none; } }
select, input, .btn { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; min-height: 34px; }
select:focus-visible, input:focus-visible, .btn:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--s1); outline-offset: 1px; }
#nav { display: flex; gap: 2px; overflow-x: auto; margin-top: 0; scrollbar-width: none; }
#nav a { padding: 6px 12px; color: var(--ink2); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
#nav a:hover { text-decoration: none; color: var(--ink); }
#nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--s1); }
.fresh { line-height: 1.25; }
.fresh { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
/* light/dark switch under the data line */
.theme-switch { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; cursor: pointer; font-size: 11px; line-height: 1; min-height: 0; }
.ts-track { position: relative; width: 30px; height: 16px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.ts-knob { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink2); transition: left 0.2s; }
.theme-switch[aria-checked="true"] .ts-knob { left: 16px; }
.theme-switch:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; border-radius: 999px; }
.hit { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.hit-bar { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.hit-bar > span { display: block; height: 100%; background: var(--s1); border-radius: 4px; }

main { padding: 16px max(16px, 3vw) 32px; max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.page-head .sub { flex-basis: 100%; margin: 0; }
.sub { color: var(--ink2); margin: 2px 0 0; font-size: 13px; }
.note { color: var(--ink2); font-size: 13px; margin: 6px 0; }
.note.busy::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--s1); border-right-color: transparent; animation: spin 0.8s linear infinite; vertical-align: -1px; }
.note.warn { color: var(--crit-ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* cards & layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.card > header { margin-bottom: 10px; }
.card-body { min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-top: 14px; }
.chart-box { min-width: 0; }
.mine-card { border-color: var(--s1); box-shadow: 0 0 0 1px var(--s1) inset; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.tile-label { font-size: 12px; color: var(--ink2); }
.tile-value { font-size: 22px; font-weight: 600; margin-top: 2px; }
.tile.hero .tile-value { font-size: 40px; line-height: 1.1; }
.tile-note { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* games */
.game { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 7px 6px; border-bottom: 1px solid var(--grid); }
.game:last-child { border-bottom: 0; }
.game.mine { background: var(--accent-wash); border-radius: 6px; }
.gteams { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.gdate { color: var(--muted); font-size: 12px; min-width: 70px; }
.gmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.score { font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 2px; }
.vs { color: var(--muted); font-size: 12px; }
.win .team { font-weight: 600; }
.tcell { display: inline-flex; align-items: baseline; gap: 5px; }
.cls { font-size: 11px; color: var(--muted); }
.team.mine { font-weight: 700; }
.team.other { color: var(--ink2); }
.pnum { font-variant-numeric: tabular-nums; color: var(--ink2); white-space: nowrap; }
.date-head { margin: 14px 0 4px; color: var(--ink); }
.date-head:first-child { margin-top: 0; }
.section-head { margin: 8px 0 -4px; }
.section-head h2 { font-size: 18px; }
.tbl-more { margin-top: 8px; }

/* probability bar */
.pbar { display: inline-flex; width: 100px; height: 18px; border-radius: 999px; overflow: hidden; gap: 2px; vertical-align: middle; flex: none;
        font-size: 11px; font-weight: 700; line-height: 18px; font-variant-numeric: tabular-nums; }
/* match lists: colors only (odds in the hover box); an 8px bar inside a 6px transparent border, so the tap target is 20px tall */
.gmeta .pbar.bare { height: 20px; border: 6px solid transparent; background-clip: padding-box; }
.pbar-a, .pbar-b { flex-basis: 0; min-width: 31px; text-align: center; white-space: nowrap; }
.pbar-a { background: var(--s1); color: var(--ink-on-s1, #fff); }
.pbar-b { background: var(--s2); color: var(--ink-on-s2, #fff); }

/* chips */
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink2); white-space: nowrap; }
.chip.good { background: rgba(12,163,12,0.14); color: var(--good-ink); }
.chip.crit { background: rgba(208,59,59,0.13); color: var(--crit-ink); }
.chip.warn { background: rgba(250,178,25,0.22); color: var(--ink); }
.chip.info { background: var(--accent-wash); color: var(--s1); }
.up { color: var(--good-ink); font-size: 12px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.page-head .chips, .mine-card .chips { margin: 2px 0 8px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.down { color: var(--crit-ink); font-size: 12px; }

/* tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th, .tbl td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.tbl th { font-size: 12px; font-weight: 600; color: var(--ink2); background: var(--surface); position: sticky; top: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.dense th, .tbl.dense td { padding: 4px 6px; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--ink); }
.tbl th[aria-sort="descending"]::after { content: " ↓"; }
.tbl th[aria-sort="ascending"]::after { content: " ↑"; }
.tbl tr.mine td { background: var(--accent-wash); }
.tbl tr.cut td { border-bottom: 2px solid var(--s2); }
.tbl tr.future td { color: var(--ink2); }
.tbl.heat td.cell { font-size: 11px; min-width: 26px; text-align: center; padding: 4px 2px; border: 1px solid var(--surface); }
.tbl.heat th.seedcol { text-align: center; padding: 4px 2px; }
.tbl.heat .cutcol { border-right: 2px solid var(--s2) !important; }

/* segmented controls */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg-btn { padding: 5px 12px; border-radius: 6px; color: var(--ink2); font-weight: 500; border: 0; background: none; font: inherit; cursor: pointer; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a.on, .seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--border); }
.seg.small .seg-btn { font-size: 12px; padding: 4px 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { cursor: pointer; }
.btn.primary { background: var(--s1); color: var(--on-s1); border-color: var(--s1); }
.btn:disabled { opacity: 0.55; cursor: default; }
.pick { max-width: 260px; }

/* overview race */
.race { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px 24px; }
.race-row { display: grid; grid-template-columns: 22px 1fr auto auto 48px; gap: 8px; align-items: center; padding: 3px 4px; font-size: 13px; }
.race-row.mine { background: var(--accent-wash); border-radius: 6px; }
.race-row .rk { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.race-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.race .gap { color: var(--muted); padding-left: 30px; line-height: 1; }
.race .cutline { font-size: 11px; color: var(--s2); border-top: 2px solid var(--s2); margin: 2px 0; padding-top: 1px; }

/* matchup */
.vs-hero { display: grid; grid-template-columns: 1fr minmax(120px, 2fr) 1fr; align-items: center; gap: 12px;
           padding-bottom: 20px; margin-bottom: 6px; border-bottom: 1px solid var(--grid); }   /* rule between the odds and the charts below */
.vs-hero .big { font-size: 44px; font-weight: 600; line-height: 1.1; }
.vs-hero .side.r { text-align: right; }
.vs-hero .mid { display: flex; justify-content: center; min-width: 0; }
.vs-hero .side:not(.fav) .big { color: var(--ink2); }
/* matchup odds: favorite's colors, a volleyball on the split */
.odds-hero { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.oh-verdict { font-size: 14px; text-align: center; }
.oh-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; }
.oh-bar { position: relative; width: 100%; height: 30px; }
.oh-track { position: absolute; inset: 0; display: flex; gap: 3px; border-radius: 999px; overflow: hidden; background: var(--surface-2);
            box-shadow: inset 0 0 0 1px var(--border); }
.oh-seg { flex: 1 1 0; min-width: 6px; background: var(--mute-mark); animation: oh-grow-a 2.33s cubic-bezier(.25,.8,.25,1); }
.oh-seg + .oh-seg { animation-name: oh-grow-b; }
.oh-seg.fav { box-shadow: inset 0 -3px 0 rgba(0,0,0,0.12); }
.oh-mid { position: absolute; left: 50%; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--axis); border-radius: 1px; }
.oh-ball { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 24px; line-height: 1;
           filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); animation: oh-slide 2.33s cubic-bezier(.25,.8,.25,1); }
/* one slow slide from the left end (0%) to the real odds, which are the element's own inline values (no "to" keyframe) */
@keyframes oh-grow-a { from { flex-grow: 0; } }
@keyframes oh-grow-b { from { flex-grow: 1; } }
@keyframes oh-slide { from { left: 0%; } }
@media (prefers-reduced-motion: reduce) { .oh-seg, .oh-ball { animation: none; } }
.pbar.bare > span { min-width: 4px; }

/* bracket */
.bracket-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 14px; align-items: start; }
.bcol h3 { white-space: nowrap; }
.bm { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; overflow: hidden; background: var(--surface); }
.bm-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 6px; align-items: center; padding: 5px 8px; font-size: 13px; }
.bm-row + .bm-row { border-top: 1px solid var(--grid); }
.bm-row.fav { background: var(--accent-wash); }
.bm-row.fav .team { font-weight: 600; }
.bm .seed { color: var(--muted); font-variant-numeric: tabular-nums; }
.bm-row.won .team { font-weight: 700; }
.bm-row.won .pnum { color: var(--ink); font-weight: 700; }
.bm-row.lost .team, .bm-row.lost .pnum { color: var(--muted); }
.bm-row.lost .team { text-decoration: line-through; text-decoration-color: var(--axis); }

/* charts */
.chart { display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .ref { stroke: var(--axis); stroke-width: 1.5; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .axis-title { fill: var(--ink2); font-size: 11px; }
.chart .value-label { fill: var(--ink2); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .point-label { fill: var(--ink2); font-size: 11px; }
.chart .series-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .hover-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.chart .bar:hover { opacity: 0.85; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink2); margin-top: 6px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.key-line { width: 14px; height: 2px; border-radius: 1px; }
.key-ref { background: var(--axis); }
.key-box { width: 10px; height: 10px; border-radius: 2px; }
.key-dot { width: 9px; height: 9px; border-radius: 50%; }
.tip { position: absolute; z-index: 20; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.16); padding: 7px 10px; font-size: 12px; pointer-events: none; max-width: 280px; }
.tip-title { color: var(--ink2); margin-bottom: 3px; }
.tip-head { color: var(--ink2); margin: 6px 0 2px; padding-top: 5px; border-top: 1px solid var(--grid); }
.tip-row { display: flex; align-items: center; gap: 6px; }
.tip-key { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.tip-label { color: var(--ink2); }

.prose p { margin: 0 0 10px; }
.empty { padding: 40px 0; text-align: center; }
.empty pre { text-align: left; white-space: pre-wrap; font-size: 12px; }
.foot { color: var(--muted); font-size: 12px; padding: 0 max(16px, 3vw) 24px; max-width: 1400px; margin: 0 auto; }
.no-ai-foot { margin: 6px 0 0; }
/* Model page: the "Where the model struggles" callout */
.callout { border: 2px solid var(--s1); background: var(--accent-wash); border-radius: 12px; padding: 14px 18px; margin: 16px 0; }
.callout h2 { margin: 0 0 6px; font-size: 18px; }
.callout p, .callout li { color: var(--ink); line-height: 1.5; }
.callout .points li { margin: 6px 0; }

@media (max-width: 640px) {
  .nav-row { flex-direction: column; align-items: stretch; gap: 2px; }   /* phone: data line + switch above the tabs */
  .meta-box { order: -1; white-space: normal; justify-content: space-between; }
  .nav-row #nav { width: 100%; }
  .fresh { justify-content: flex-start; }
  h1 { font-size: 19px; }
  .tile.hero .tile-value { font-size: 32px; }
  .vs-hero .big { font-size: 30px; }
  .vs-hero { grid-template-columns: 1fr 1fr; }
  .vs-hero .mid { grid-column: 1 / -1; order: 3; }
  .gdate { min-width: 0; }
}

/* history / matchup */
.small { font-size: 12px; }
.tbl td.mine-cell { background: var(--accent-wash); }
.points { margin: 0; padding-left: 20px; }
.points li { margin: 3px 0; }
/* match-length pills (Matchup) */
.len-pill { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; padding: 0 6px; border-radius: 999px; line-height: 1.6;
            background: var(--surface); color: var(--ink2); box-shadow: inset 0 0 0 1px var(--border); white-space: nowrap; }
.len-line { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; line-height: 1.9; }
.len-u { white-space: nowrap; }
.tape td.edge { font-weight: 600; color: var(--ink); }
.edge-mk { color: var(--good-ink); font-size: 10px; }
.tie-mk { color: var(--muted); font-size: 11px; font-weight: 700; }
.stake-split { margin-top: 0; }
.stake-split h3 { color: var(--ink); }
@media print {
  :root:root:root { color-scheme: light; --page: #fff; --surface: #fff; --surface-2: #f3f2ee; --ink: #0b0b0b; --ink2: #52514e; --muted: #6f6d68;
          --grid: #e1e0d9; --axis: #c3c2b7; --border: rgba(11,11,11,0.15); --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --good-ink: #006300; --crit-ink: #b02e2e; --accent-wash: rgba(42,120,214,0.08); }
  body { background: #fff; }
  .top, .foot, .no-print, .tip { display: none !important; }
  main { padding: 0; max-width: none; gap: 10px; }
  .card { break-inside: avoid; border-color: #ccc; }
  main, main * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }   /* keep team stripes and pills */
  .oh-seg, .oh-ball { animation: none !important; }
  .tbl th { position: static; }
  a { color: inherit; text-decoration: none; }
}

/* team picker call to action (pages that need a team) */
.cta { text-align: center; padding: 36px 20px 24px; max-width: 640px; width: 100%; margin: 20px auto; border-color: var(--s1); box-shadow: 0 0 0 1px var(--s1) inset; }
.cta h1 { font-size: 26px; margin: 8px 0 4px; }
.cta .sub { font-size: 14px; max-width: 480px; margin: 0 auto; }
.cta-icon { font-size: 40px; line-height: 1; }
.cta-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 20px 0 12px; }
.pick.big, .btn.big { font-size: 16px; min-height: 44px; padding: 8px 14px; }
.pick.big { width: min(100%, 320px); max-width: none; }
.btn.small { min-height: 28px; padding: 3px 10px; font-size: 12px; }

/* overview */
.strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 14px; border-radius: var(--radius);
         background: var(--accent-wash); border: 1px solid var(--border); font-size: 13px; }
.strip .cta-row { margin: 0; justify-content: flex-start; }
.strip-links { display: flex; gap: 14px; flex-wrap: wrap; }
.tile-value.team-val { font-size: 17px; line-height: 1.25; margin-top: 4px; }
.tile-value.team-val .team { color: var(--ink); }
.class-card { border-color: var(--s1); box-shadow: 0 0 0 1px var(--s1) inset; }
.class-head { margin-bottom: 12px; }
.class-head .sub { margin-top: 6px; }
.class-head h2 { font-size: 18px; }
.class-head .seg-btn { font-size: 14px; padding: 6px 16px; }
.box-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.box-head h3 { margin: 0; }
.chart-box > .sub { margin: -4px 0 8px; font-size: 12px; }
.bw-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto minmax(50px, 90px) 42px; gap: 8px; align-items: center; padding: 4px; font-size: 13px; }
.bw-row.mine { background: var(--accent-wash); border-radius: 6px; }
.bw-row .rk { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.bw-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.bw-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bw-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bw-bar > span { display: block; height: 100%; background: var(--s1); border-radius: 4px; }
.bw .cutline { font-size: 11px; color: var(--s2); border-top: 2px solid var(--s2); margin: 3px 0; padding-top: 1px; }
.head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
/* newspaper columns: fill the first column top to bottom, then the second (two only when each gets 500px) */
.result-cols { columns: 500px 2; column-gap: 28px; }
.result-cols .game { break-inside: avoid; }
.result-cols .game:last-child { border-bottom: 1px solid var(--grid); }
.stories { margin-top: 16px; border-top: 1px solid var(--grid); padding-top: 12px; }
.stories h3 { color: var(--ink); }
.ov-bracket > .sub { margin: -4px 0 10px; font-size: 12px; }
/* links next to the class pills (Overview class card) */
.jump-links { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.link-pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap;   /* same outline look as "Matchup ›" */
             background: var(--mu-bg); color: var(--mu-ink); box-shadow: inset 0 0 0 1px var(--mu-ring); }
.link-pill:hover { background: var(--mu-bg-hover); color: var(--mu-ink); text-decoration: none; }
.stories .points li { margin: 6px 0; }
.card-tool { margin-top: 8px; }
.tbl tr.sep td { border-top: 2px solid var(--grid); }

/* team page: jump pills, sections moved in from Tonight and History */
.jump-pills { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--s1);
        color: var(--ink); font-weight: 600; font-size: 14px; }
button.pill { font-family: inherit; cursor: pointer; }
.share-btn { display: none; }   /* hidden for now (owner, 2026-10-24) — js/share.js and the wiring stay in place */
.pill:hover { background: var(--accent-wash); text-decoration: none; }
.section-head[id] { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--grid); }

/* model page */
.steps { display: flex; flex-direction: column; gap: 18px; }
.step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--s1); color: var(--on-s1); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step h3 { font-size: 15px; color: var(--ink); margin: 4px 0 6px; }
.step p { margin: 0 0 8px; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--surface-2); border-left: 3px solid var(--s1);
           border-radius: 6px; padding: 8px 12px; margin: 4px 0 10px; white-space: pre-wrap; overflow-x: auto; max-width: 78ch; }
.eg { color: var(--ink2); }
.side-notes { margin-top: 20px; border-top: 1px solid var(--grid); padding-top: 12px; }
.side-notes h3 { color: var(--ink); margin-top: 10px; }
.gap-range { width: min(100%, 320px); }
.watch-why { margin: -4px 0 4px; padding: 0 6px 6px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--grid); }
.game:has(+ .watch-why) { border-bottom: 0; }
/* "Matchup ›" pill: blue outline and text, no fill; a light wash on hover */
.pill.small { padding: 1px 10px; font-size: 11px; font-weight: 600; line-height: 1.7; white-space: nowrap; border: 0; border-radius: 999px;
              background: var(--mu-bg); color: var(--mu-ink); box-shadow: inset 0 0 0 1px var(--mu-ring); transition: background 0.15s; }
.pill.small:hover { background: var(--mu-bg-hover); color: var(--mu-ink); text-decoration: none; }
@media print { .pill.small { display: none; } }
.has-tip { cursor: help; }
.hint { text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.has-tip:focus { outline: none; }
.has-tip:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }
/* ✅ / ❌: was the model's pick right? */
.call { display: inline-block; font-size: 12px; line-height: 1; }
/* toss-up marker: a balance scale that rocks on hover */
.toss { display: inline-block; font-size: 14px; line-height: 1; transform-origin: 50% 20%; }
.toss:hover, .toss:focus { animation: scale-rock 0.9s ease-in-out; }
@keyframes scale-rock { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .toss:hover, .toss:focus { animation: none; } }

/* ===================== Simulator (2026-10 redesign, "sports app" look) =====================
   Team colors arrive per element as --tc (fill), --tc2 (second color), --tcink (text on the fill), --tct (readable on the page). */
.sx { display: flex; flex-direction: column; gap: 18px; position: relative; color: var(--sx-ink); }
.sx h2 { font-size: 20px; margin: 0; }
.sx h3 { color: var(--sx-ink2); }
.sx-sec { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: var(--sx-r); padding: 18px; min-width: 0; }
.sx-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.sx-sec-head .sx-sub { flex: 1 1 240px; }
.sx-sub { color: var(--sx-ink2); font-size: 13px; margin: 0; }
.sx-nerd { font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; border-radius: 999px; padding: 5px 12px; border: 1px solid var(--sx-line); background: var(--sx-card2); color: var(--sx-ink); }
.sx-nerd.on { background: var(--sx-hl); color: var(--sx-hl-ink); border-color: transparent; }
.sx-nerd-box .tbl-wrap { margin-top: 4px; }
.sx-d { font-size: 11px; font-weight: 800; white-space: nowrap; }
.sx-d.up { color: var(--good-ink); } .sx-d.down { color: var(--crit-ink); }
.sx-cu.sx-up { animation: sx-up 1.4s; } .sx-cu.sx-down { animation: sx-down 1.4s; }
@keyframes sx-up { 0%, 50% { color: var(--good-ink); } }
@keyframes sx-down { 0%, 50% { color: var(--crit-ink); } }

/* hero */
.sx-hero { position: relative; border-radius: var(--sx-r); padding: 22px 20px; overflow: hidden; background: var(--sx-hero-bg); color: var(--sx-hero-ink); display: grid; gap: 10px; align-content: start; }
.sx-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.sx-title { font-size: clamp(34px, 6.5vw, 72px); line-height: 0.95; margin: 0; letter-spacing: -0.01em; }
.sx-hero .sx-sub { color: inherit; opacity: 0.8; }
.sx-hero .sx-how-link a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }   /* the blue link vanished over the blue stripe */
.sx-spot { display: grid; gap: 4px; padding: 14px 18px; border-radius: 14px; background: var(--tc); color: var(--tcink); align-self: start; }
.sx-spot a.team, .sx-spot .team { color: inherit; font-weight: 800; font-size: 24px; }
.sx-spot-lab { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.85; }
.sx-spot-stats { display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: flex-end; margin-top: 4px; }
.sx-spot-stat { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 6px; }
.sx-spot-stat .v { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sx-spot-stat.big .v { font-size: 60px; }
.sx-spot-stat .l { grid-column: 1 / -1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.sx-spot .sx-d { color: inherit; background: rgba(0,0,0,0.22); padding: 1px 6px; border-radius: 999px; }

/* play one season */
.sx-teaser { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.sx-teaser-art { font-size: 34px; }
.sx-play { font: inherit; font-weight: 800; border: 0; cursor: pointer; border-radius: 999px; padding: 10px 22px; background: var(--sx-hl); color: var(--sx-hl-ink); font-size: 15px; transition: transform 0.15s; justify-self: start; }
.sx-play:hover { transform: translateY(-2px); }
.sx-play:disabled { opacity: 0.5; cursor: default; transform: none; }
.sx-play.big { font-size: 20px; padding: 14px 30px; }
.sx-uni-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sx-uni-id { font-weight: 800; font-size: 18px; }
.sx-uni-block { margin: 4px 0 16px; }
.sx-seeds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sx-seeds li { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--sx-card2); border: 1px solid var(--sx-line); font-size: 13px; }
.sx-seeds b, .sx-ur b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: var(--tc); color: var(--tcink); font-size: 11px; }
.sx-seeds .rec { color: var(--sx-ink2); font-size: 11px; font-variant-numeric: tabular-nums; }
.sx-uni-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; align-items: start; padding-bottom: 4px; }
.sx-um { position: relative; border-radius: 10px; border: 1px solid var(--sx-line); margin-bottom: 8px; background: var(--sx-card2); overflow: hidden; }
.sx-ur { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; font-size: 13px; }
.sx-ur.w { background: var(--tc); color: var(--tcink); font-weight: 700; }
.sx-ur.w b { background: var(--tcink); color: var(--tc); }
.sx-ur.l { opacity: 0.55; }
.sx-ur.l .n { text-decoration: line-through; }
.sx-upset { position: absolute; right: 26px; top: calc(50% - 9px); font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: #ff3b30; color: #fff; transform: rotate(-4deg); box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.sx-champ { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 22px 16px; border-radius: 16px; margin: 6px 0 16px;
  background: repeating-linear-gradient(135deg, var(--tc) 0 18px, color-mix(in srgb, var(--tc2) 40%, var(--tc)) 18px 24px); color: var(--tcink); }
.sx-champ-lab { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; }
.sx-champ-name { font-size: clamp(28px, 5vw, 46px); font-weight: 900; line-height: 1.15; }
.sx-champ-rec { font-size: 13px; opacity: 0.9; }
.sx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-tchip { padding: 3px 10px; border-radius: 999px; background: var(--tc); color: var(--tcink); font-weight: 700; font-size: 12px; }
.sx-mine { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--tc) 16%, transparent); border-left: 4px solid var(--tc); margin: 0 0 14px; }
.sx-uni-foot { display: flex; }
.sx-rv { animation: sx-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.15) both; }
@keyframes sx-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.sx-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.sx-confetti i { position: absolute; top: -20px; border-radius: 2px; animation: sx-fall 3s cubic-bezier(0.25, 0.6, 0.4, 1) both; }
@keyframes sx-fall { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }

/* the field: team odds cards */
.sx-field { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.sx-team { position: relative; border-radius: 14px; padding: 12px 14px 12px 18px; background: var(--sx-card2); border: 1px solid var(--sx-line); display: grid; gap: 10px; overflow: hidden; align-content: start; }
.sx-team::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(var(--tc) 0 72%, var(--tc2) 72%); }
.sx-team.mine { box-shadow: 0 0 0 2px var(--tct); }
.sx-team-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sx-rank { font-weight: 800; color: var(--sx-ink2); font-variant-numeric: tabular-nums; flex: none; }
.sx-team-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-team-name .team { font-weight: 700; font-size: 16px; color: var(--sx-ink); }
.sx-tier { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--sx-chip); white-space: nowrap; }
.sx-team-mid { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: end; }
.sx-ml { display: grid; }
.sx-ml .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sx-ink2); font-weight: 700; }
.sx-ml .v { font-size: 36px; font-weight: 800; line-height: 1; color: var(--tct); }
.sx-ml .p { font-size: 11px; color: var(--sx-ink2); white-space: nowrap; }
.sx-strip { display: flex; align-items: flex-end; gap: 2px; height: 46px; }
.sx-sb { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; position: relative; min-width: 2px; cursor: default; }
.sx-sb i { display: block; width: 100%; background: var(--tct); opacity: 0.4; border-radius: 2px 2px 0 0; }
.sx-sb.ml i { opacity: 1; }
.sx-sb.cut::after { content: ""; position: absolute; right: -2px; top: -4px; bottom: 0; border-right: 2px dotted var(--sx-cut); }
.sx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; }
.sx-stat { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "l l" "v d" "b b"; align-items: baseline; column-gap: 4px; row-gap: 2px; }
.sx-stat .l { grid-area: l; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sx-ink2); font-weight: 700; }
.sx-stat .v { grid-area: v; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sx-stat .sx-d { grid-area: d; }
.sx-bar { grid-area: b; display: block; height: 4px; background: var(--sx-track); border-radius: 2px; overflow: hidden; }
.sx-bar i { display: block; height: 100%; background: var(--tct); }
.sx-shots { margin: 14px 0 0; font-size: 13px; color: var(--sx-ink2); }

/* pick'em */
.sx-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.sx-fchip { font: inherit; font-weight: 600; cursor: pointer; border-radius: 999px; padding: 6px 14px; border: 1px solid var(--sx-line); background: var(--sx-card2); color: var(--sx-ink); }
.sx-fchip.on { background: var(--sx-hl); color: var(--sx-hl-ink); border-color: transparent; }
.sx-tsel { border-radius: 999px; background: var(--sx-card2); color: var(--sx-ink); border-color: var(--sx-line); }
.sx-pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.sx-pk-day { grid-column: 1 / -1; margin: 10px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.sx-pk { border-radius: 14px; background: var(--sx-card2); border: 1px solid var(--sx-line); padding: 8px; display: grid; gap: 6px; align-content: start; }
.sx-pk.mine { box-shadow: 0 0 0 1px var(--s1) inset; }
.sx-pk-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sx-ink2); min-height: 22px; padding: 0 2px; }
.sx-pk-top .pill { margin-left: auto; }
.sx-pk-date { display: none; }
.sx-pk-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: stretch; }
.sx-at { align-self: center; color: var(--sx-ink2); font-weight: 700; font-size: 12px; }
.sx-side { position: relative; display: grid; align-content: start; gap: 2px; text-align: left; padding: 9px 12px 9px 14px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--sx-ink);
  background: var(--sx-card); border: 2px solid color-mix(in srgb, var(--tct) 40%, transparent); box-shadow: inset 4px 0 0 var(--tc); transition: transform 0.12s, opacity 0.2s, filter 0.2s; }
.sx-side:hover { transform: translateY(-1px); border-color: var(--tct); }
.sx-side:active { transform: scale(0.97); }
.sx-side .n { font-weight: 700; font-size: 14px; line-height: 1.2; }
.sx-side .cls { font-size: 10px; font-weight: 700; opacity: 0.7; margin-left: 5px; }
.sx-side .p { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sx-side.on { background: repeating-linear-gradient(135deg, var(--tc) 0 12px, color-mix(in srgb, var(--tc2) 35%, var(--tc)) 12px 15px); color: var(--tcink); border-color: var(--tc); box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.sx-side.off { opacity: 0.42; filter: grayscale(0.7); }
.sx-side.off .n { text-decoration: line-through; }
.sx-lock { position: absolute; top: 6px; right: 8px; display: none; font-size: 13px; }
.sx-side.on .sx-lock { display: block; animation: sx-pop 0.3s; }
.sx-sticker { position: absolute; bottom: -9px; right: 6px; transform: rotate(-4deg); background: #ff3b30; color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,0.3); z-index: 1; animation: sx-pop 0.3s; }
@keyframes sx-pop { from { transform: scale(0.4) rotate(-12deg); opacity: 0; } }

/* sticky tray: picks + the biggest swing */
.sx-tray { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 4; align-self: center; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; justify-content: center;
  padding: 9px 10px 9px 18px; border-radius: 999px; background: var(--sx-tray); color: var(--sx-tray-ink); box-shadow: 0 10px 30px rgba(0,0,0,0.4); max-width: min(100%, 760px); animation: sx-in 0.3s both; }
.sx-tray[hidden] { display: none; }
.sx-tray-n { font-weight: 800; }
.sx-tray-msg { font-size: 13px; }
.sx-tray-msg.busy::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; vertical-align: -1px; }
.sx-tray .sx-d { padding: 1px 6px; border-radius: 999px; background: rgba(0,0,0,0.45); }
.sx-tray .sx-d.up { color: #4ade80; } .sx-tray .sx-d.down { color: #ff8a8a; }
.sx-tray-clear { font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; border: 0; border-radius: 999px; padding: 6px 12px; background: rgba(255,255,255,0.16); color: inherit; }

.sx-bracket { background: var(--sx-card); border-color: var(--sx-line); border-radius: var(--sx-r); color: var(--sx-ink); }
.sx-bracket .sub, .sx-bracket .note { color: var(--sx-ink2); }
.sx .bm { background: var(--sx-card2); border-color: var(--sx-line); }

@media (max-width: 640px) {
  .sx-sec { padding: 14px; }
  .sx-hero { padding: 18px 16px; }
  .sx-spot-stat.big .v { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-rv, .sx-tray, .sx-sticker, .sx-side.on .sx-lock, .sx-cu.sx-up, .sx-cu.sx-down { animation: none !important; }
}
@media print { .sx-tray, .sx-play { display: none; } }

/* palette and type: follows the light/dark theme, volt accent, condensed italic headlines */
.sx { --sx-card: var(--surface); --sx-card2: var(--surface-2); --sx-line: var(--border); --sx-r: 16px; --sx-ink: var(--ink); --sx-ink2: var(--ink2);
  --sx-hl: #d7ff3a; --sx-hl-ink: #0b0b0b; --sx-chip: var(--page); --sx-track: var(--grid); --sx-cut: var(--ink2); --sx-tray: #0b0b0b; --sx-tray-ink: #fff;
  --sx-hero-ink: var(--ink); --sx-cond: "DIN Condensed", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --sx-hero-bg: linear-gradient(112deg, transparent 0 58%, var(--s1) 58% 66%, transparent 66% 69%, var(--team-2, var(--s2)) 69% 73%, transparent 73%), var(--surface); }
.sx .sx-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: 28px; border: 1px solid var(--border); }
.sx .sx-hero > :not(.sx-spot) { grid-column: 1; }
.sx .sx-spot { grid-column: 2; grid-row: 1 / span 4; align-self: center; box-shadow: 0 12px 30px rgba(0,0,0,0.35); transform: rotate(-1.2deg); }
.sx .sx-kicker { color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.sx .sx-kicker::before { content: ""; width: 26px; height: 4px; background: #d7ff3a; border-radius: 2px; }
.sx .sx-title, .sx h2, .sx .sx-uni-id, .sx .sx-champ-name, .sx .sx-spot-stat .v, .sx .sx-ml .v, .sx .sx-stat .v, .sx .sx-side .p, .sx .sx-pk-day {
  font-family: var(--sx-cond); font-stretch: condensed; text-transform: uppercase; font-style: italic; font-weight: 800; letter-spacing: 0; }
.sx .sx-title { font-size: clamp(40px, 7vw, 84px); }
.sx h2 { font-size: 26px; }
.sx .sx-play { font-family: var(--sx-cond); text-transform: uppercase; font-style: italic; letter-spacing: 0.02em; box-shadow: 0 6px 18px rgba(215,255,58,0.25); }
.sx .sx-ml .v { font-size: 42px; }
.sx .sx-pk-day { font-size: 16px; color: var(--ink); }
:root[data-theme="light"] .sx .sx-play, :root[data-theme="light"] .sx .sx-fchip.on, :root[data-theme="light"] .sx .sx-nerd.on { background: #0b0b0b; color: #d7ff3a; }
@media (max-width: 800px) {
  .sx .sx-hero { grid-template-columns: 1fr; }
  .sx .sx-spot { grid-column: 1; grid-row: auto; transform: none; }
}

/* champions with no school colors on file get the look's own accent instead of gray */
.sx .sx-champ.nocolor { background: repeating-linear-gradient(135deg, #d7ff3a 0 18px, #c2ec22 18px 24px); color: #0b0b0b; }

/* "What X needs": rows resting on few simulated seasons */
.tbl tr.rough td { opacity: 0.55; }

/* Simulator "Sim one season": act 1 regular season (standings race + match feed), act 2 seeds lock, act 3 bracket */
.sx-skip { font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; border-radius: 999px; padding: 5px 12px; border: 1px solid var(--sx-line); background: var(--sx-card2); color: var(--sx-ink); margin-left: auto; }
.sx-uni-foot { gap: 10px; align-items: center; flex-wrap: wrap; }
.sx-uni-foot .sx-skip { margin-left: 0; }
.sx-race { border: 1px solid var(--sx-line); border-radius: 14px; background: var(--sx-card2); padding: 12px 14px 14px; margin-bottom: 16px; }
.sx-race-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; }
.sx-stage { font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 20px; }
.sx-day { font-weight: 700; color: var(--sx-ink2); font-variant-numeric: tabular-nums; }
.sx-prog { flex: 1 1 120px; align-self: center; height: 4px; border-radius: 2px; background: var(--sx-track); overflow: hidden; min-width: 80px; }
.sx-prog i { display: block; height: 100%; width: 0; background: #d7ff3a; transition: width 0.4s; }
:root[data-theme="light"] .sx-prog i { background: #0b0b0b; }
.sx-race-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .sx-race-body { grid-template-columns: 1fr; } }
.sx-board { position: relative; overflow: hidden; }
.sx-br { position: absolute; left: 0; right: 0; top: 0; height: 28px; display: grid; grid-template-columns: 26px 6px minmax(0, 1fr) 34px 46px 40px auto; gap: 8px; align-items: center;
  padding: 0 8px; border-radius: 7px; font-size: 13px; transition: transform 0.55s cubic-bezier(0.3, 0.8, 0.3, 1), opacity 0.4s; will-change: transform; }
.sx-br:nth-child(odd) { background: color-mix(in srgb, var(--sx-ink) 3%, transparent); }
.sx-br.mine { background: color-mix(in srgb, var(--tc) 22%, transparent); box-shadow: inset 0 0 0 1px var(--tct); }
.sx-br.off { opacity: 0; pointer-events: none; }
.sx-board.still .sx-br { transition: none; }
.sx-br .rk { font-weight: 800; color: var(--sx-ink2); text-align: right; font-variant-numeric: tabular-nums; }
.sx-br .chipc { width: 6px; height: 18px; border-radius: 3px; background: linear-gradient(var(--tc) 0 65%, var(--tc2) 65%); }
.sx-br .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-br .mv { font-size: 11px; font-weight: 800; text-align: right; }
.sx-br .mv.up { color: var(--good-ink); animation: sx-mv 1.2s both; } .sx-br .mv.down { color: var(--crit-ink); animation: sx-mv 1.2s both; }
@keyframes sx-mv { 0% { opacity: 0; transform: translateY(4px); } 15%, 70% { opacity: 1; transform: none; } 100% { opacity: 0.35; } }
.sx-br .wl, .sx-br .ix { text-align: right; font-variant-numeric: tabular-nums; color: var(--sx-ink2); }
.sx-br .ix { font-weight: 700; color: var(--sx-ink); }
.sx-br .sd { min-width: 0; font-size: 11px; font-weight: 800; white-space: nowrap; opacity: 0; }
.sx-board.locked .sx-br .sd { opacity: 1; padding: 2px 8px; border-radius: 999px; background: var(--tc); color: var(--tcink); animation: sx-stamp 0.45s cubic-bezier(0.2, 0.8, 0.2, 1.4) both; }
.sx-board.locked .sx-br.out { opacity: 0.38; }
.sx-board.locked .sx-br.out .sd { background: transparent; color: var(--sx-ink2); animation: none; }
.sx-board.locked.still .sx-br .sd { animation: none; }
@keyframes sx-stamp { from { opacity: 0; transform: scale(1.8) rotate(-8deg); } to { opacity: 1; transform: none; } }
.sx-cutline { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed #d7ff3a; z-index: 1; }
:root[data-theme="light"] .sx-cutline { border-top-color: #4d7c0f; }
.sx-cutline span { position: absolute; right: 4px; top: -9px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 0 6px; border-radius: 4px; background: var(--sx-card2); color: var(--sx-ink2); }
.sx-cutline.bye { border-top: 1px dotted var(--sx-ink2); }
.sx-board.locked .sx-cutline:not(.bye) { animation: sx-pulse-line 0.9s 2; }
@keyframes sx-pulse-line { 50% { box-shadow: 0 0 12px #d7ff3a; } }
.sx-feed { display: grid; gap: 6px; align-content: start; min-height: 120px; }
.sx-fg { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13px; padding: 6px 10px; border-radius: 8px;
  background: var(--sx-card); animation: sx-in 0.35s both; }
.sx-fg:nth-child(2) { animation-delay: 0.05s; } .sx-fg:nth-child(3) { animation-delay: 0.1s; } .sx-fg:nth-child(4) { animation-delay: 0.15s; }
.sx-fg:nth-child(5) { animation-delay: 0.2s; } .sx-fg:nth-child(6) { animation-delay: 0.25s; } .sx-fg:nth-child(7) { animation-delay: 0.3s; }
.sx-fg.mine { box-shadow: inset 3px 0 0 var(--s1); }
.sx-fg .sc { font-weight: 800; font-variant-numeric: tabular-nums; }
.sx-fg .lo { color: var(--sx-ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-fg .tag { font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--sx-chip); white-space: nowrap; }
.sx-fg .tag.up { background: #ff3b30; color: #fff; }
.sx-feed-note { margin: 2px 0; font-size: 12.5px; color: var(--sx-ink2); }
.sx-feed-big { margin: 0; font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 22px; animation: sx-in 0.4s both; }
.sx-feed-line { margin: 0; font-size: 13px; animation: sx-in 0.4s 0.3s both; }
.sx-feed-line.mine { padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--tc) 18%, transparent); border-left: 4px solid var(--tc); animation-delay: 0.6s; }
.sx-ur .m { font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .sx-br { grid-template-columns: 20px 5px minmax(0, 1fr) 30px 44px auto; gap: 6px; padding: 0 6px; } .sx-br .ix { display: none; } .sx-br .wl { font-weight: 700; color: var(--sx-ink); } }   /* phones: show W–L instead of the rating, keep the seed badge */
@media (prefers-reduced-motion: reduce) { .sx-br, .sx-prog i { transition: none; } .sx-br .mv, .sx-board.locked .sx-br .sd, .sx-fg, .sx-feed-big, .sx-feed-line, .sx-board.locked .sx-cutline { animation: none !important; } }
/* District 7: section tables on Standings (same grid as the overview race) */
.race-row.sec-row { grid-template-columns: 22px 1fr auto auto 40px 40px; }
.race-row.sec-row.in { background: color-mix(in srgb, var(--s1) 9%, transparent); border-radius: 6px; }
.race-row.sec-row.in.mine, .race-row.sec-row.mine { background: var(--accent-wash); }

/* ===== PHONE LAYOUT PASS (2026-10-04; for the iPhone app and phone browsers) =====
   Everything phone-specific lives down here so it is easy to find or remove. Desktop is untouched. */

/* safe areas (notch, home bar, landscape side insets) and iOS touch polish */
main { padding-left: max(16px, 3vw, env(safe-area-inset-left, 0px)); padding-right: max(16px, 3vw, env(safe-area-inset-right, 0px)); padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
.foot { padding-left: max(16px, 3vw, env(safe-area-inset-left, 0px)); padding-right: max(16px, 3vw, env(safe-area-inset-right, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
a, button, select, summary, .seg-btn { touch-action: manipulation; }   /* no double-tap-to-zoom delay */

/* finger-sized targets (any touch screen). Small pills keep their look; an invisible ::after widens the tap area. */
@media (pointer: coarse) {
  select, input { font-size: 16px; min-height: 40px; }   /* 16px stops iOS from zooming the page when a field is focused */
  .top-row .myteam select { min-height: 38px; }
  #nav a { padding: 11px 14px; }
  .league-switch a { padding: 7px 11px; }
  .seg a, .seg-btn { padding: 8px 13px; }
  .seg.small .seg-btn { padding: 7px 10px; }
  .pill { padding: 9px 16px; }
  .pill.small, .link-pill, .toss { position: relative; }
  .pill.small::after, .link-pill::after, .toss::after { content: ""; position: absolute; inset: -8px -4px; }
  .tbl td, .tbl th { padding-top: 8px; padding-bottom: 8px; }
  .tbl.dense td, .tbl.dense th { padding-top: 6px; padding-bottom: 6px; }
  .theme-switch { padding: 8px 0; }
}

/* compact header: only the tab bar stays pinned. Phones, and phones turned sideways (short + touch). */
@media (max-width: 640px), (max-height: 500px) and (pointer: coarse) {
  body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .top, .nav-row { display: contents; }   /* the pieces become direct children of <body>, so the tab bar can pin on its own */
  .league-row { order: 1; margin: 0; padding: 6px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }
  .league-row .league-switch { gap: 4px 2px; }
  .top-row { order: 2; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 2px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); gap: 8px 10px; }
  .brand { flex: 1 1 100%; font-size: 14px; line-height: 1.3; }
  .myteam { flex: 1 1 0; min-width: 0; }
  .myteam select { flex: 1 1 auto; min-width: 0; }
  .refresh-wrap { flex: 1 1 100%; margin-left: 0; }
  .refresh-wrap .myteam { flex: 1 1 0; }
  .meta-box { order: 3; margin: 0; padding: 4px max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); white-space: normal; justify-content: space-between; gap: 12px; }
  .fresh { justify-content: flex-start; }
  #nav { order: 4; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; width: 100%; padding: 0; gap: 0; background: var(--surface);
         border-bottom: 1px solid var(--border); overflow-x: auto; overscroll-behavior-x: contain; scroll-behavior: smooth;
         -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 22px), transparent);
                 mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 22px), transparent); }   /* fade at both ends = more tabs this way */
  #nav::before, #nav::after { content: ""; flex: 0 0 8px; }
  #nav a { flex: none; padding: 12px 13px 10px; }
  .team-colored .top { background-image: none; border-bottom-color: var(--border); }
  .team-colored #nav { border-bottom-color: transparent; background-image: linear-gradient(90deg, var(--s1), var(--team-2)); background-size: 100% 3px; background-position: bottom; background-repeat: no-repeat; }
  main { order: 5; width: 100%; }
  .foot { order: 6; }
  html { scroll-padding-top: 56px; }
}

/* sideways phone: the title and the team picker share a line */
@media (min-width: 641px) and (max-height: 500px) and (pointer: coarse) {
  .brand { flex: 1 1 auto; }
  .myteam { flex: 0 1 340px; }
  .refresh-wrap { flex: 0 1 auto; }
}

/* phones (portrait): roomier cards, full-width tables, denser cells */
@media (max-width: 640px) {
  .card { padding: 12px 12px; }
  .tbl-wrap { margin-left: -12px; margin-right: -12px; }   /* tables use the whole card width */
  .tbl { font-size: 12px; }
  .tbl th { font-size: 11.5px; }
  .tbl th, .tbl td { padding-left: 4px; padding-right: 4px; }
  .tbl .chips { gap: 2px; }
  .tbl td:not(.num) { white-space: normal; }   /* text cells (date ranges, opponents) may wrap onto a second line instead of widening the table */
  .tbl td.nw.nw { white-space: nowrap; }   /* short values that must stay on one line ("4A of 4") */
  .tbl th { white-space: normal; vertical-align: bottom; line-height: 1.2; }   /* long column headings may wrap too */
  .tbl.f2 td, .tbl.f2 th { white-space: nowrap; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 12px; }
  .tbl th:last-child, .tbl td:last-child { padding-right: 12px; }
  .tbl.heat td.cell { padding-left: 2px; padding-right: 2px; }
  .tbl-wrap > .bracket-cols { padding: 0 12px; }   /* bracket rounds swipe sideways, snapping one round at a time */
  .tbl-wrap:has(> .bracket-cols) { scroll-snap-type: x proximity; scroll-padding-left: 12px; }
  .bracket-cols > * { scroll-snap-align: start; }
  /* the point-spread table: the first label column may wrap so both teams fit side by side */
  .tbl.tape td:first-child { white-space: normal; min-width: 108px; }
  /* Power rankings: # and Team stay put while the numbers scroll */
  .tbl.f2 th:nth-child(-n+2), .tbl.f2 td:nth-child(-n+2) { position: sticky; z-index: 1; background: var(--surface); }
  .tbl.f2 th:nth-child(1), .tbl.f2 td:nth-child(1) { left: 0; width: 40px; min-width: 40px; max-width: 40px; padding-right: 4px; }
  .tbl.f2 th:nth-child(2), .tbl.f2 td:nth-child(2) { left: 40px; max-width: 128px; overflow: hidden; text-overflow: ellipsis; box-shadow: 8px 0 8px -8px rgba(0,0,0,0.45); }
  .tbl.f2 tr.mine td:nth-child(-n+2) { background: linear-gradient(var(--accent-wash), var(--accent-wash)), var(--surface); }
  /* match rows: the odds bar starts in the same place whether or not the ⚖️ toss-up marker is there */
  .gmeta:has(> .pbar.bare):not(:has(.toss)) { padding-left: 24px; }
  .page-head h1 { font-size: 20px; }
  .section-head h2 { font-size: 17px; }
}

.pr-mv { font-size: 11px; font-weight: 800; white-space: nowrap; }
.pr-card { max-width: 640px; }

/* ===================== Power Rankings (was Standings), same "sports app" look as the Simulator ===================== */
.rk .sx-hero .sx-spot-stats { gap: 8px 22px; }
.rk .sx-title { font-size: clamp(38px, 5.2vw, 66px); }
.rk .sx-hero .sx-spot-stat.big .v { font-size: 52px; }
/* phone and tablet: one card per team */
.rk-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.rk-sort label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sx-ink2); }
.rk-sort select { flex: 0 1 118px; min-width: 0; border-radius: 999px; background: var(--sx-card2); border-color: var(--sx-line); min-height: 34px; padding: 4px 12px; }
.rk-allbtn { display: none; margin-left: auto; }
.rk-list { display: flex; flex-direction: column; gap: 8px; }
.rk-card { position: relative; border-radius: 14px; padding: 10px 12px 10px 18px; background: var(--sx-card2); border: 1px solid var(--sx-line); display: grid; gap: 10px; overflow: hidden; align-content: start; }
.rk-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(var(--tc) 0 72%, var(--tc2) 72%); }
.rk-card.mine { box-shadow: 0 0 0 2px var(--tct); }
.rk-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rk-rank { font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; font-size: 30px; line-height: 1; color: var(--sx-ink2); min-width: 1.5ch; text-align: center; font-variant-numeric: tabular-nums; }
.rk-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.rk-name .team { font-weight: 700; font-size: 16px; color: var(--sx-ink); }
.rk-name .chips { margin: 0; }
.rk-sub { display: flex; flex-wrap: wrap; gap: 1px 10px; font-size: 12px; color: var(--sx-ink2); margin-top: 1px; }
.rk-sub .rk-wl { color: var(--sx-ink); font-weight: 700; }
.rk-idx { display: grid; justify-items: end; text-align: right; }
.rk-idx .v { font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; font-size: 32px; line-height: 1; color: var(--tct); font-variant-numeric: tabular-nums; }
.rk-idx .l { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sx-ink2); margin-top: 2px; }
.rk-card .sx-stats { grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); }
.rk-card .sx-stat .v { font-size: 20px; }
.rk-more { display: none; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; justify-self: start; border: 0; background: none; color: var(--link); padding: 2px 0; }
.rk-det { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px 14px; padding-top: 10px; border-top: 1px dashed var(--sx-line); }
.rk-d { display: grid; gap: 1px; min-width: 0; }
.rk-d .l { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sx-ink2); }
.rk-d .v { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-d .v .muted { font-weight: 500; font-size: 12px; }
.rk-cut { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--s2); margin: 2px 0; }
.rk-cut::before, .rk-cut::after { content: ""; flex: 1; border-top: 2px solid var(--s2); }
@media (min-width: 760px) { .rk-card { grid-template-columns: minmax(250px, 1.1fr) minmax(0, 1.6fr); column-gap: 24px; align-items: center; }
  .rk-card .rk-det, .rk-card .rk-more { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .rk-allbtn, .rk-more { display: inline-block; }
  .rk-card:not(.open) .rk-det { display: none; }
  .rk-list.all .rk-card .rk-det { display: grid; }
  .rk-list.all .rk-more { display: none; }
  .rk-rank { font-size: 26px; }
  .rk-idx .v { font-size: 28px; }
}
/* wide screens: the full table, every column */
.rk-table { font-size: 13px; }
.rk-table th, .rk-table td { padding-left: 5px; padding-right: 5px; }
.rk-table th { white-space: normal; vertical-align: bottom; line-height: 1.2; }
.rk-table th { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: var(--sx-card); border-bottom: 2px solid var(--sx-line); }
.rk-table td { padding-top: 8px; padding-bottom: 8px; }
.rk-table tbody tr:hover td { background: var(--sx-card2); }
.rk-table tr.mine td { background: var(--accent-wash); }
.rk-table td:first-child { box-shadow: inset 5px 0 0 var(--tc, transparent); padding-left: 14px; font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; font-size: 18px; color: var(--sx-ink2); }
.rk-table th:first-child { padding-left: 14px; white-space: nowrap; }
.rk-table td:nth-child(2) .team { font-weight: 700; font-size: 14px; color: var(--tct, var(--link)); }
.rk-table td.rk-idxc { font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; font-size: 18px; color: var(--sx-ink); }
.rk-table td.rk-oc { font-weight: 700; }
.rk-ocell { display: inline-grid; justify-items: end; gap: 3px; }
.rk-ocell .sx-bar { grid-area: auto; width: 38px; height: 3px; }
.rk-table .sx-bar i { background: var(--tct, var(--s1)); }
.rk-key { display: inline-block; width: 22px; border-top: 2px solid var(--s2); vertical-align: middle; }

/* model rating beside the name on a card, with its popover */
.rk-dash { color: var(--sx-ink2); margin: 0 -3px; }
.rk-rate { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; cursor: help; border-bottom: 1px dotted var(--sx-ink2); white-space: nowrap; }
.rk-rate:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }
.rk-rate .up, .rk-rate .down { font-size: 11px; }
.rk-pop { position: absolute; z-index: 30; width: min(290px, calc(100vw - 16px)); background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); padding: 10px 12px; font-size: 12.5px; line-height: 1.4; }
.rk-pop[hidden] { display: none; }
.rk-pop p { margin: 6px 0 0; color: var(--ink2); }
.rk-pop-t { font-weight: 800; color: var(--ink); }
.rk-pop-a { display: inline-block; margin-top: 8px; font-weight: 700; }
@media print { .rk-pop { display: none; } }
/* in the team-color spotlight: a dark pill so the green / red arrow reads on any school color */
.rk .sx-spot-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.rk .sx-spot .rk-dash { color: inherit; opacity: 0.8; margin: 0; }
.rk .sx-spot .rk-rate { font-size: 20px; font-weight: 800; border-bottom: 0; padding: 1px 10px; border-radius: 999px; background: rgba(0,0,0,0.3); color: #fff; }
.rk .sx-spot .rk-rate .up, .rk .sx-spot .rk-rate .down { font-size: 13px; }
.rk .sx-spot .rk-rate .up { color: #4ade80; } .rk .sx-spot .rk-rate .down { color: #ff8a8a; }
.rk .sx-spot .rk-rate .rk-rrank { font-size: 13px; font-weight: 700; opacity: 0.8; }
.rk-ul { text-decoration: underline dashed; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rk-rcell { cursor: help; }
.rk-pop-rows { margin-top: 6px; display: grid; gap: 2px; color: var(--ink2); }
.rk-pop-rows b { color: var(--ink); margin-right: 2px; }
.rk-pop-rows b.up { color: var(--good-ink); } .rk-pop-rows b.down { color: var(--crit-ink); }

/* ===================== the rest of the app in the Simulator / Power Rankings look (2026-10) =====================
   Every page except Simulator and Power Rankings gets class "sx" on #view (route()), so it shares their tokens, then these overrides restyle
   the shared pieces: page banner, cards, tiles, tables, tabs, match rows. */
main.sx { gap: 18px; }
/* page banner = hero */
.sx .page-head { position: relative; overflow: hidden; border: 1px solid var(--sx-line); border-radius: var(--sx-r); padding: 22px 20px; background: var(--sx-hero-bg); gap: 10px 16px; align-items: center; }
.sx .page-head::before { content: attr(data-kicker); flex: 0 0 100%; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2);
  padding-left: 34px; background: linear-gradient(#d7ff3a, #d7ff3a) left center / 26px 4px no-repeat; }
.sx .page-head:not([data-kicker])::before { display: none; }
.sx .page-head h1 { font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: 0; line-height: 0.98; font-size: clamp(34px, 5.6vw, 64px); }
.sx .page-head .sub { color: var(--ink2); font-size: 13px; }
.sx .page-head select, .sx .page-head input { border-radius: 999px; background: var(--sx-card2); border-color: var(--sx-line); min-height: 36px; padding: 4px 14px; }
.sx .page-head .btn { border-radius: 999px; background: var(--sx-card2); border-color: var(--sx-line); }
.sx .page-head > :not(h1):not(.sx-spot) { position: relative; z-index: 1; }
@media (min-width: 900px) { .sx .page-head > *:not(.sx-spot):not([class*="sx-"]) { max-width: 54%; }  }
.sx .page-head.tc { --sx-hero-bg: linear-gradient(112deg, transparent 0 58%, var(--tc) 58% 66%, transparent 66% 69%, var(--tc2) 69% 73%, transparent 73%), var(--surface); }
.sx .page-head .sx-spot { position: absolute; right: 20px; top: 50%; transform: translateY(-50%) rotate(-1.2deg); width: min(400px, 36%); box-shadow: 0 12px 30px rgba(0,0,0,0.35); z-index: 2; }
@media (max-width: 899px) { .sx .page-head .sx-spot { position: static; transform: none; width: 100%; } }
/* cards */
.sx .card { background: var(--sx-card); border-color: var(--sx-line); border-radius: var(--sx-r); padding: 18px; }
.sx .card > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.sx .card > header h2 { font-size: 22px; }
.sx .card > header .sub { flex: 1 1 240px; margin: 0; color: var(--sx-ink2); }
.sx .card h3, .sx .date-head { font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 16px; color: var(--ink); }
.sx .section-head h2 { font-size: 26px; }
.sx .mine-card, .sx .class-card { border-color: var(--s1); }
@media (max-width: 640px) { .sx .card { padding: 14px; } .sx .page-head { padding: 18px 16px; } }
/* tiles */
.sx .tile { background: var(--sx-card2); border: 1px solid var(--sx-line); border-radius: 14px; padding: 12px 14px; }
.sx .tile-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sx-ink2); }
.sx .tile-value { font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; font-size: 26px; line-height: 1.1; }
.sx .tile.hero .tile-value { font-size: 42px; }
.sx .tile-note { color: var(--sx-ink2); }
/* tables */
.sx .tbl th { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: var(--sx-card); border-bottom: 2px solid var(--sx-line); }
.sx .tbl tbody tr:hover td { background: var(--sx-card2); }
.sx .tbl tr.mine td { background: var(--accent-wash); }
/* tabs */
.sx .seg { border-radius: 999px; background: var(--sx-card2); border: 1px solid var(--sx-line); padding: 3px; }
.sx .seg a, .sx .seg-btn { border-radius: 999px; font-weight: 600; }
.sx .seg a.on, .sx .seg-btn.on { background: var(--sx-hl); color: var(--sx-hl-ink); box-shadow: none; }
:root[data-theme="light"] .sx .seg a.on, :root[data-theme="light"] .sx .seg-btn.on { background: #0b0b0b; color: #d7ff3a; }
/* strips, match rows */
.sx .strip { border-radius: var(--sx-r); border-color: var(--sx-line); background: var(--sx-card); }
.sx .game { border-bottom-color: var(--sx-line); }
.sx .btn, .sx select { border-radius: 999px; }
.sx .page-head h1 .ph-sub { display: block; font-size: 0.42em; line-height: 1.2; letter-spacing: 0.02em; color: var(--ink2); margin-top: 6px; }
.sx .sx-spot .rk-rate { font-size: 20px; font-weight: 800; border-bottom: 0; padding: 1px 10px; border-radius: 999px; background: rgba(0,0,0,0.3); color: #fff; }
.sx .sx-spot .rk-rate .up { color: #4ade80; } .sx .sx-spot .rk-rate .down { color: #ff8a8a; }
@media (min-width: 900px) { .sx .page-head.has-spot { padding-right: calc(min(400px, 36%) + 44px); } .sx .page-head.has-spot > *:not(.sx-spot) { max-width: 100%; } }
@media (max-width: 899px) {                    /* phones: stripes move to the right edge so the title and text stay clear of them */
  .sx .page-head { --sx-hero-bg: linear-gradient(112deg, transparent 0 84%, var(--s1) 84% 90%, transparent 90% 92%, var(--team-2, var(--s2)) 92% 96%, transparent 96%), var(--surface); }
  .sx .page-head.tc { --sx-hero-bg: linear-gradient(112deg, transparent 0 84%, var(--tc) 84% 90%, transparent 90% 92%, var(--tc2) 92% 96%, transparent 96%), var(--surface); }
}
/* matchup, schedule, rows */
.sx .big { font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; font-size: 58px; line-height: 1; }
.sx .page-head .filters { flex-basis: 100%; }
.sx .game { padding: 9px 10px; border-radius: 10px; border-bottom: 0; transition: background 0.15s; }
.sx .game:hover { background: var(--sx-card2); }
.sx .game.mine { background: var(--accent-wash); }
.sx .gteams { font-size: 14.5px; }
.sx .gteams .team { font-weight: 600; }
.sx .score { font-family: var(--sx-cond); font-stretch: condensed; font-style: italic; font-weight: 800; font-size: 17px; }
.sx .date-head { margin: 18px 0 6px; font-size: 18px; }
.sx .date-head:first-child { margin-top: 0; }
@media (max-width: 640px) { .sx .big { font-size: 46px; } }
@media (max-width: 899px) { .sx .page-head .sub, .sx .page-head > p { max-width: 80%; } }
