/* ============================================================
   The Week Sheet — brand v1.0 tokens
   Tokens first; components consume tokens only. The legacy names the
   components were written against (--bg0, --surface, --ink, --brand, …)
   are kept as aliases of the brand tokens so every existing rule snaps
   to the palette in one place.
   ============================================================ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-var-latin.woff2") format("woff2");
}
/* display face — page-level titles only (Bricolage Grotesque, OFL) */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-var-latin.woff2") format("woff2");
}

:root {
  /* --- backgrounds --- */
  --bg-0: #06090f;
  --bg-1: #0b0f17;            /* app base */
  --bg-2: #111723;            /* card */
  --bg-3: #182030;            /* elevated / hover row */
  --bg-mark-tile: #151b26;

  /* --- borders --- */
  --border: #232c3b;
  --border-subtle: #1c2433;

  /* --- text --- */
  --text-1: #f1f4f8;
  --text-2: #a6b0c0;
  --text-3: #7c879b;          /* dimmest colour allowed to carry words */
  --text-on-accent: #0b0f17;

  /* --- lime: the model's number, A grades, active tab, primary CTA, positive edge --- */
  --lime: #a3e635;
  --lime-hover: #bef264;
  --lime-pressed: #84cc16;
  --lime-subtle: rgba(163, 230, 53, 0.12);
  --lime-subtle-border: rgba(163, 230, 53, 0.30);

  /* --- amber: caution --- */
  --amber: #f59e0b;
  --amber-hover: #fbbf24;
  --amber-pressed: #d97706;

  /* --- blue: informational callouts only --- */
  --blue: #60a5fa;
  --blue-hover: #93c5fd;
  --blue-pressed: #3b82f6;

  /* --- red: never a button --- */
  --red: #f87171;
  --red-hover: #fca5a5;
  --red-pressed: #ef4444;

  /* --- grades (B deliberately desaturated: A is the only saturated green on a board) --- */
  --grade-a: #a3e635;
  --grade-b: #d4e79a;
  --grade-c: #f59e0b;
  --grade-d: #f87171;

  /* --- radius --- */
  --radius-chip: 6px;
  --radius-btn: 10px;
  --radius-card: 12px;
  --radius-card-lg: 20px;     /* large marketing cards only */

  /* --- space --- */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  /* --- type --- */
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, sans-serif;
  --font-numeric: "Inter", system-ui, sans-serif;   /* + font-variant-numeric: tabular-nums */
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* ---------- legacy aliases (components consume these) ---------- */
  --bg0: var(--bg-1);            /* page */
  --bg1: var(--bg-1);            /* recessed sections, inputs */
  --surface: var(--bg-2);        /* cards */
  --surface-2: var(--bg-3);      /* raised: chips, hovers, popovers */
  --surface-3: var(--border);    /* highest: active chips, steppers (#232c42 snapped to #232c3b) */
  --border-2: var(--border);
  --edge: var(--border);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.45), 0 6px 20px rgba(0, 0, 0, 0.30);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.50), 0 12px 32px rgba(0, 0, 0, 0.40);

  --ink: var(--text-1);
  --ink-1: var(--text-1);
  --ink-2: var(--text-2);
  --ink-3: var(--text-3);

  --brand: var(--lime);
  --brand-hi: var(--lime-hover);
  --brand-ink: var(--text-on-accent);
  --brand-dim: var(--lime-subtle);
  --pos: var(--lime);
  --pos-dim: var(--lime-subtle);
  --neg: var(--red);
  --neg-dim: rgba(248, 113, 113, 0.12);
  /* muted result/emphasis shades — scorecards and chips, never celebration */
  --pos-soft: rgba(163, 230, 53, 0.75);
  --neg-soft: rgba(248, 113, 113, 0.7);
  --pos-tint-strong: var(--lime-subtle-border);
  --pos-tint: var(--lime-subtle);
  --pos-wash: rgba(163, 230, 53, 0.06);
  --warn-border: rgba(245, 158, 11, 0.40);
  --warn: var(--amber);
  --warn-dim: rgba(245, 158, 11, 0.12);
  --info: var(--blue);
  --info-dim: rgba(96, 165, 250, 0.12);

  --font: var(--font-ui);
  --fs-12: 12px; --fs-14: 14px; --fs-16: 16px;
  --fs-20: 20px; --fs-28: 28px; --fs-36: 36px;

  --s-1: var(--space-1); --s-2: var(--space-2); --s-3: var(--space-3); --s-4: var(--space-4);
  --s-5: 20px; --s-6: var(--space-5); --s-8: var(--space-6);
  --r-sm: var(--radius-chip); --r-md: var(--radius-card); --r-lg: var(--radius-card-lg); --r-full: 999px;

  --speed: 180ms;
}

/* ---------- type tokens ---------- */
.t-display-hero { font-family: var(--font-display); font-weight: 800; font-size: 72px; line-height: 72px; letter-spacing: -0.03em; }
.t-headline { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 48px; letter-spacing: -0.02em; }
.t-subhead { font-family: var(--font-ui); font-weight: 500; font-size: 24px; line-height: 32px; letter-spacing: -0.01em; }
.t-body { font-family: var(--font-ui); font-weight: 400; font-size: 17px; line-height: 27px; }
.t-caption { font-family: var(--font-ui); font-weight: 500; font-size: 13px; line-height: 18px; letter-spacing: 0.08em; text-transform: uppercase; }
:root { --type-caption: 500 11px/14px var(--font-ui); }   /* small caption: font shorthand */
.t-stat { font-family: var(--font-numeric); font-weight: 800; font-size: 56px; line-height: 56px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.t-wordmark { font-family: var(--font-ui); font-weight: 800; letter-spacing: -0.02em; }
/* page-level titles are the ONLY in-app use of the display face */
.page-title { font-family: var(--font-display); }

/* ---------- the WS. mark (CSS-drawn so it scales to any --mark size;
   letters Inter 900 at 40% of the tile, -8.75% tracking; tile radius 24%) ---------- */
.ws-mark {
  --mark: 28px;
  position: relative; display: inline-block; flex: none;
  width: var(--mark); height: var(--mark); min-width: 16px; min-height: 16px;
  border-radius: 24%; background: var(--bg-mark-tile);
  color: var(--lime); overflow: hidden; user-select: none;
}
.ws-mark .l {
  position: absolute; left: 44%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-ui); font-weight: 900; font-size: calc(var(--mark) * 0.40);
  line-height: 1; letter-spacing: -0.0875em; padding-top: calc(var(--mark) * 0.04);
}
.ws-mark .d {
  position: absolute; left: 78%; top: 58%;
  width: 8%; height: 8%; border-radius: 1.5%; background: currentColor;
}
.ws-mark.on-base { background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--border); }

/* header lockup: mark + wordmark + subtitle; clear space = 32% of the mark */
.lockup { display: inline-flex; align-items: center; gap: calc(var(--mark, 28px) * 0.32 + 2px); min-width: 120px; }
.lockup .wm { font-family: var(--font-ui); font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; color: var(--text-1); }
.lockup .sub {
  font-family: var(--font-ui); font-weight: 500; font-size: 11px; line-height: 14px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap;
}

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

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg0); }
body {
  background:
    radial-gradient(1100px 420px at 50% -180px, rgba(163, 230, 53, 0.05), transparent 65%),
    var(--bg0);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-14);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: transparent; border: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.num { font-variant-numeric: tabular-nums; }
.odds { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0.02em; }

/* ============ text roles ============ */
.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-3);
}
.display { font-size: var(--fs-36); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.display-sm { font-size: var(--fs-28); font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; }
.title { font-size: var(--fs-20); font-weight: 700; letter-spacing: -0.01em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

/* ============ global chrome ============ */
.topbar {
  display: flex; align-items: center; gap: var(--s-4);
  height: 60px; padding: 0 var(--s-6);
  background: rgba(11, 15, 23, 0.88);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(12px);
}
.wordmark { display: flex; align-items: center; cursor: pointer; }
.wordmark .name { font-weight: 800; font-size: 16px; line-height: 20px; letter-spacing: -0.02em; white-space: nowrap; }
.wordmark .tag {
  font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); white-space: nowrap;
}

.nav-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-btn);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--speed), color var(--speed);
}
.nav-pill:hover { background: var(--surface-2); color: var(--ink); }
.nav-pill.active { background: var(--brand-dim); color: var(--brand); }
.nav-pill.outline { border-color: var(--border-2); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status-dot.ok { background: var(--lime); box-shadow: 0 0 8px rgba(163, 230, 53, 0.7); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 8px rgba(245, 158, 11, 0.7); }
.status-dot.bad { background: var(--red); box-shadow: 0 0 8px rgba(248, 113, 113, 0.7); }

/* ============ layout ============ */
.page { max-width: 1240px; margin: 0 auto; padding: var(--s-6) var(--s-6) 96px; }
.page-head { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }

.section-head {
  display: flex; align-items: center; gap: var(--s-3);
  margin: var(--s-6) 0 var(--s-3);
}
.section-head .rule { flex: 1; height: 1px; background: var(--border); }

.sticky-day {
  position: sticky; top: 60px; z-index: 10;
  background: linear-gradient(180deg, var(--bg0) 75%, transparent);
  padding: var(--s-3) 0 var(--s-2);
}

/* ============ cards ============ */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 55%), var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
}
.card.pad { padding: var(--s-5); }
.card.hoverable { transition: transform var(--speed), border-color var(--speed), box-shadow var(--speed); }
.card.hoverable:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-2);
}

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius-btn);
  font-size: 13px; font-weight: 700;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--border); cursor: pointer;
  transition: background var(--speed), border-color var(--speed), transform var(--speed), box-shadow var(--speed);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn.primary {
  background: var(--lime);
  color: var(--text-on-accent); border-color: transparent;
  box-shadow: 0 2px 12px rgba(163, 230, 53, 0.25);
}
.btn.primary:hover { background: var(--lime-hover); box-shadow: 0 2px 20px rgba(163, 230, 53, 0.35); }
.btn.primary:active { background: var(--lime-pressed); transform: translateY(1px); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn:focus-visible, .nav-pill:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.select {
  appearance: none;
  background: var(--surface-2) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a6b0c0' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-btn);
  padding: 8px 32px 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color var(--speed);
}
.select:hover { border-color: rgba(255, 255, 255, 0.25); }

/* ============ chips & pills ============ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-chip);
  font-size: 12px; font-weight: 600;
  background: var(--bg-3); color: var(--text-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.chip .k { color: var(--text-2); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
/* semantic pills: 12% tint fill, 40% tint border, full-strength text */
.chip.pos { background: rgba(163, 230, 53, 0.12); color: var(--lime); border-color: rgba(163, 230, 53, 0.40); }
.chip.neg { background: rgba(248, 113, 113, 0.12); color: var(--red); border-color: rgba(248, 113, 113, 0.40); }
.chip.warn { background: rgba(245, 158, 11, 0.12); color: var(--amber); border-color: rgba(245, 158, 11, 0.40); }
.chip.info { background: rgba(96, 165, 250, 0.12); color: var(--blue); border-color: rgba(96, 165, 250, 0.40); }
.chip.live { background: rgba(248, 113, 113, 0.12); color: var(--red); border-color: rgba(248, 113, 113, 0.40); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
/* matchup grade chips (D65): A range lime-subtle, B/C neutral, D/F red-subtle */
.chip.grade-chip { padding: 2px 7px; gap: 4px; }
.chip.grade-chip b { font-weight: 800; letter-spacing: 0.02em; }
.matchup-grid { display: flex; flex-direction: column; gap: 2px; }
.matchup-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; border-top: 1px solid var(--edge); flex-wrap: wrap; }
.matchup-row.own { background: rgba(163, 230, 53, 0.05); }

.lean-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--radius-btn);
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.lean-pill.pos { background: var(--lime-subtle); color: var(--lime); border-color: var(--lime-subtle-border); }
.lean-pill.neg { background: rgba(248, 113, 113, 0.12); color: var(--red); border-color: rgba(248, 113, 113, 0.40); }
.lean-pill.flat { background: var(--surface-2); color: var(--ink-2); border-color: var(--border); }
.lean-pill .sub { font-weight: 600; opacity: 0.75; font-size: 12px; }

.grade-badge {
  display: inline-grid; place-items: center;
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: var(--radius-chip);
  font-size: 17px; font-weight: 800; border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
/* grade chips: 12% tint fill, 40% tint border, full-strength letter */
.grade-badge.g-A { color: var(--grade-a); background: rgba(163, 230, 53, 0.12); border-color: rgba(163, 230, 53, 0.40); }
.grade-badge.g-B { color: var(--grade-b); background: rgba(212, 231, 154, 0.12); border-color: rgba(212, 231, 154, 0.40); }
.grade-badge.g-C { color: var(--grade-c); background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.40); }
.grade-badge.g-D { color: var(--grade-d); background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.40); }

.team-mark {
  display: inline-grid; place-items: center; flex: none;
  border-radius: 50%; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18);
}

/* ============ hero band (game prediction) ============ */
.hero-band {
  display: grid; grid-template-columns: 1.35fr 1fr 1fr;
  gap: var(--s-4);
}
@media (max-width: 1120px) { .hero-band { grid-template-columns: 1fr 1fr; } }

.split-bar {
  display: flex; height: 14px; border-radius: var(--r-full); overflow: hidden;
  background: var(--surface-2);
}
.split-bar > div { transition: width 500ms ease; }

/* ============ stat tiles ============ */
.tile {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: var(--s-3) var(--s-4);
}
.tile .label { margin-bottom: 4px; }

/* ============ tables ============ */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.tbl thead th {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); text-align: center; padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.tbl thead th.sortable { cursor: pointer; transition: color var(--speed); }
.tbl thead th.sortable:hover { color: var(--ink); }
.tbl thead th.sorted { color: var(--brand); }
.tbl tbody td { padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--border); }
.tbl tbody tr { transition: background var(--speed); }
.tbl tbody tr.row-click { cursor: pointer; }
.tbl tbody tr.row-click:hover { background: rgba(255, 255, 255, 0.03); }
.tbl .cell-strong { font-weight: 700; font-size: 15px; }
/* D68: the Record page's ledger tables scroll inside their card on narrow
   screens instead of pushing the page wider. */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tbl-scroll .tbl { min-width: 0; }
@media (max-width: 480px) {
  .tbl-scroll .tbl { font-size: 12px; white-space: nowrap; }
  .tbl-scroll .tbl tbody td, .tbl-scroll .tbl thead th { padding-left: 4px; padding-right: 4px; }
  .tbl-scroll .tbl-sub { display: none; }
}
.tbl td.left, .tbl th.left { text-align: left; }

/* median + probability-vs-book-line chip in props tables */
.pcell {
  display: inline-block; margin-left: 7px; padding: 1px 6px;
  border-radius: var(--radius-chip); font-size: 10px; font-weight: 700;
  letter-spacing: 0.01em; white-space: nowrap; vertical-align: 1px;
  background: var(--surface-2); color: var(--ink-3);
  max-width: 92px; overflow: hidden; text-overflow: ellipsis;
}
.pcell.mid { background: var(--lime-subtle); color: var(--lime); }
.pcell.strong { background: var(--lime-subtle); color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime-subtle-border); }
/* big gap vs market (>=8pp flagged, >15pp demoted): amber, never lime */
.pcell.gap { background: rgba(245, 158, 11, 0.12); color: var(--amber); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.40); }
@media (max-width: 1280px) {
  .range-col { display: none; }   /* range collapses first… */
}
@media (max-width: 1180px) {
  .pcell { display: none; }       /* …then the prob chips; medians stay */
}

/* volatility tags: distribution shape, not direction */
.vol-tag { font-size: 9.5px; letter-spacing: 0.05em; }
.vol-tag.stable { color: var(--lime); background: rgba(163, 230, 53, 0.12); border-color: rgba(163, 230, 53, 0.40); }
.vol-tag.normal { color: var(--text-2); }
.vol-tag.chaotic { color: var(--amber); background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.40); }

/* text-3 on the elevated surface lands at 4.4996:1 — a hair under AA —
   so words on bg-3 (popovers, tooltips, chips) use text-2 */
.popover .faint, .popover .age, .tipbox .faint, .chip .faint { color: var(--text-2); }

/* ============ tooltips / explainers ============ */
.term {
  border-bottom: 1px dotted var(--ink-3);
  cursor: help; text-decoration: none;
}
.info-dot {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px; border-radius: 50%;
  font-size: 9.5px; font-weight: 700; font-style: normal;
  background: var(--surface-3); color: var(--ink-2);
  cursor: help; vertical-align: 2px; margin-left: 5px;
  transition: background var(--speed), color var(--speed);
}
.info-dot:hover { background: var(--brand); color: var(--brand-ink); }

.tipbox {
  position: fixed; z-index: 90; max-width: 290px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 10px 12px;
  font-size: 12.5px; line-height: 1.45; color: var(--ink);
  /* neutralize inherited table-header styling (uppercase th, nowrap) */
  text-transform: none; white-space: normal; letter-spacing: normal;
  font-weight: 400; text-align: left;
  box-shadow: var(--shadow-2);
  pointer-events: none;
  animation: tip-in 120ms ease;
}
.tipbox .tip-title { font-weight: 700; margin-bottom: 2px; }
.tipbox .tip-more { color: var(--brand); font-weight: 600; font-size: 11.5px; margin-top: 4px; }
@keyframes tip-in { from { opacity: 0; transform: translateY(3px); } }

/* explainer slide-over */
.slideover-mask { position: fixed; inset: 0; background: rgba(5, 7, 11, 0.62); z-index: 95; }
.slideover {
  position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 94vw;
  background: var(--surface); border-left: 1px solid var(--border-2);
  z-index: 96; padding: var(--s-6); overflow-y: auto;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
  animation: slide-in 200ms ease;
}
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.slideover h2 { font-size: var(--fs-20); font-weight: 800; margin-bottom: var(--s-2); }
.slideover .body { color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }
.slideover .body b { color: var(--ink); }
.slideover .anchor-note {
  margin-top: var(--s-4); padding: var(--s-3) var(--s-4);
  background: var(--bg1); border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 13px; color: var(--ink-2);
}

/* onboarding banner */
.onboard {
  display: flex; align-items: flex-start; gap: var(--s-3);
  background: var(--info-dim); border: 1px solid rgba(96, 165, 250, 0.40);
  border-radius: var(--r-md); padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4); font-size: 13px; color: var(--ink-2);
}
.onboard b { color: var(--ink); }
.onboard .x { margin-left: auto; cursor: pointer; color: var(--ink-3); font-size: 16px; line-height: 1; flex: none; padding: 2px; }
.onboard .x:hover { color: var(--ink); }

.warn-banner {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--warn-dim); border: 1px solid rgba(245, 158, 11, 0.40);
  color: var(--warn); border-radius: var(--radius-btn);
  padding: 6px 14px; font-size: 12.5px; font-weight: 600;
}

/* ============ tabs ============ */
.tabs {
  display: flex; gap: var(--s-1); flex-wrap: wrap;
  border-bottom: 1px solid var(--border); margin-bottom: var(--s-5);
}
.tab {
  background: none; border: none; cursor: pointer;
  padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--speed);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ============ slate cards ============ */
.slate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--s-4); }

.game-card { position: relative; overflow: hidden; cursor: pointer; display: block; }
.game-card .inner { padding: var(--s-4) var(--s-5); }
.game-card .view-cta {
  position: absolute; right: var(--s-4); bottom: var(--s-3);
  font-size: 12px; font-weight: 700; color: var(--brand);
  opacity: 0; transform: translateX(-4px);
  transition: opacity var(--speed), transform var(--speed);
}
.game-card:hover .view-cta { opacity: 1; transform: none; }

.market-chips { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-3); }

/* desktop slate: a fixed 2-up / 3-up grid, 24px gutters, equal-height rows;
   the model read and its lean pills wrap inside .model-read so the grade
   badge always sits bottom-right on the same row */
@media (min-width: 1024px) {
  .slate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); align-items: stretch; }
  .game-card .inner { display: flex; flex-direction: column; height: 100%; }
  .game-card .model-strip, .game-card .reality-line { margin-top: auto !important; padding-top: 7px; }
  .model-strip { flex-wrap: nowrap !important; align-items: flex-end !important; }
  .model-strip .model-read { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; }
  .model-strip > .grade-badge { margin-left: auto; flex: none; }
  /* the hover affordance moves left of the badge and floats over the row */
  .game-card .view-cta {
    right: calc(var(--s-4) + 34px + 10px);
    background: var(--bg-2); padding: 2px 6px; border-radius: var(--radius-chip);
  }
}
@media (min-width: 1440px) {
  .slate-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============ freshness popover ============ */
.popover {
  position: absolute; top: 52px; right: var(--s-6); width: 380px; z-index: 60;
  max-height: calc(100vh - 120px); overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-md); box-shadow: var(--shadow-2);
  padding: var(--s-4); animation: tip-in 140ms ease;
}
.src-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.src-row:last-child { border-bottom: none; }
.src-row .age { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 11.5px; }

/* ============ props ============ */
.props-toolbar {
  position: sticky; top: 60px; z-index: 12;
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) 0; margin-bottom: var(--s-2);
  background: linear-gradient(180deg, var(--bg0) 82%, transparent);
}
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 7px 12px; min-width: 220px;
}
.search input {
  background: none; border: none; outline: none;
  color: var(--ink); font: inherit; width: 100%;
}
.search input::placeholder { color: var(--ink-3); }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; }
.stepper button {
  width: 30px; background: var(--surface-2); border: none; cursor: pointer;
  color: var(--ink-2); font-weight: 700; font-size: 15px;
  transition: background var(--speed), color var(--speed);
}
.stepper button:hover { background: var(--surface-3); color: var(--ink); }
.stepper input {
  width: 64px; text-align: center; background: var(--bg1); border: none; outline: none;
  color: var(--ink); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
}

.ou-pill {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 118px; padding: 8px 18px; border-radius: 12px;
  font-weight: 800; transition: background var(--speed), color var(--speed);
}
.ou-pill .big { font-size: 22px; line-height: 1.1; }
.ou-pill .lbl { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; opacity: 0.8; }
.ou-pill.over { background: var(--pos-dim); color: var(--pos); }
.ou-pill.under { background: var(--neg-dim); color: var(--neg); }

.td-chip {
  display: inline-block; min-width: 52px; text-align: center;
  padding: 4px 10px; border-radius: var(--radius-chip);
  font-weight: 700; font-size: 12.5px;
}

/* ============ tug of war (matchup data) ============ */
.tow-row {
  display: grid; grid-template-columns: 96px 1fr 210px 1fr 96px;
  gap: var(--s-3); align-items: center; padding: 7px 0;
}
.tow-track { position: relative; height: 10px; border-radius: var(--r-full); background: var(--bg1); overflow: hidden; }
.tow-track .fill { position: absolute; top: 0; bottom: 0; border-radius: var(--r-full); transition: width 400ms ease; }
.tow-track.left .fill { right: 0; }
.tow-track.right .fill { left: 0; }
.rank-pill {
  display: inline-block; min-width: 34px; text-align: center;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-chip);
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.rank-pill.good { background: var(--pos-dim); color: var(--pos); border-color: transparent; }
.rank-pill.bad { background: var(--neg-dim); color: var(--neg); border-color: transparent; }

/* ============ movers (why tab) ============ */
.mover-row { display: grid; grid-template-columns: 240px 1fr 92px; gap: var(--s-4); align-items: center; padding: 9px 0; }
.mover-track { position: relative; height: 12px; border-radius: var(--r-full); background: var(--bg1); overflow: hidden; }
.mover-fill {
  position: absolute; top: 0; bottom: 0; border-radius: var(--r-full);
  animation: grow-x 500ms ease both;
  transform-origin: left center;
}
@keyframes grow-x { from { transform: scaleX(0); } }

/* ============ misc ============ */
.loading { color: var(--ink-3); text-align: center; padding: 72px; font-size: 14px; }
.spinner {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: currentColor;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  background: var(--neg-dim); border: 1px solid rgba(248, 113, 113, 0.40);
  color: var(--red-hover); border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); font-size: 13px;
}

.disclaimer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: rgba(11, 15, 23, 0.92); border-top: 1px solid var(--border);
  color: var(--ink-3); font-size: 11.5px; text-align: center;
  padding: 7px 16px; backdrop-filter: blur(8px);
}

.takeaway {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 13px; color: var(--ink-2);
  padding: var(--s-2) var(--s-1) 0;
}
.takeaway::before { content: "→"; color: var(--brand); font-weight: 700; }

.footnote-card {
  background: var(--bg1); border: 1px dashed var(--border-2);
  border-radius: var(--r-sm); padding: var(--s-3) var(--s-4);
  font-size: 12.5px; color: var(--ink-3);
}

.icon { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* count-up shimmer removed by reduced-motion via global rule */

/* ============================================================
   MOBILE (≤760px) — same design system, rethought for touch.
   Everything below is gated behind this media query (or classes
   that only mount on mobile), so desktop ≥1024px is untouched.

   Spacing is a 4px scale (--m-1 … --m-8); cards pad 16 and sit 12
   apart; the screen edge is 16; section heads get 24 above / 12
   below. Type is the mobile scale (display 28/32, title 20/24,
   body 15/20, secondary 13/18, caption 11/14 uppercase, mono
   numerals 15/20 tabular). One pill style everywhere: 28px tall,
   10px side padding, 13px text, 6px radius, never wraps.
   ============================================================ */

/* ---- bottom tab bar + sheet: exist only on mobile ---- */
.bottombar, .sheet-mask, .bottom-sheet { display: none; }
/* the header's short "Wk N" chip only appears below 380px */
.topbar .chip-narrow { display: none; }

@media (max-width: 760px) {
  :root {
    --m-1: 4px; --m-2: 8px; --m-3: 12px; --m-4: 16px;
    --m-5: 20px; --m-6: 24px; --m-8: 32px;
    --m-edge: 16px; --m-card-pad: 16px; --m-card-gap: 12px;
    --m-topbar: 56px; --m-tabbar: 58px;
    --m-disclaimer: 40px;
    --m-display: 28px; --m-display-lh: 32px;
    --m-title: 20px;   --m-title-lh: 24px;
    --m-body: 15px;    --m-body-lh: 20px;
    --m-sec: 13px;     --m-sec-lh: 18px;
    --m-cap: 11px;     --m-cap-lh: 14px;
    --m-pill-h: 28px;
    --m-radius: 12px;
    /* charts: full width, reduced height */
    --dist-h: 185px; --wp-h: 165px; --hist-h: 150px; --cal-h: 220px;
  }

  /* ---------- type scale ---------- */
  body { font-size: var(--m-body); line-height: var(--m-body-lh); }
  .display { font-size: var(--m-display); line-height: var(--m-display-lh); }
  .display-sm { font-size: 24px; line-height: 28px; }
  .title { font-size: var(--m-title); line-height: var(--m-title-lh); }
  .page-title { letter-spacing: -0.02em; }
  .label { font-size: var(--m-cap); line-height: var(--m-cap-lh); letter-spacing: 0.06em; }
  .num { font-variant-numeric: tabular-nums; }

  /* ---------- no horizontal page scroll, ever ---------- */
  html, body { overflow-x: clip; }
  html {
    scroll-padding-top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px) + 8px);
    scroll-padding-bottom: calc(var(--m-disclaimer) + var(--m-tabbar) + env(safe-area-inset-bottom, 0px));
  }

  /* ---------- frame ---------- */
  .page {
    padding: var(--m-4) var(--m-edge)
      calc(var(--m-disclaimer) + var(--m-tabbar) + var(--m-4) + env(safe-area-inset-bottom, 0px));
  }
  .page-head { gap: var(--m-2) var(--m-3); margin-bottom: var(--m-4); }
  .section-head { margin: var(--m-6) 0 var(--m-3); gap: var(--m-3); }
  .section-head:first-child { margin-top: 0; }

  /* header: 56px, everything on one centerline, 36px chips, 12px gap;
     safe-area top inset on notched phones */
  .topbar {
    height: calc(var(--m-topbar) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) var(--m-edge) 0;
    gap: var(--m-3);
  }
  .topbar > * { flex: none; }
  .topbar > .wordmark { flex: 1 1 auto; min-width: 0; }
  .wordmark { gap: var(--m-2); }
  .wordmark .tag { font-size: 9.5px; line-height: 12px; letter-spacing: 0.06em; }
  .wordmark .name { font-size: 15px; line-height: 18px; white-space: nowrap; }
  /* the lockup, week chip and status button must never touch: below 390px
     the week chip swaps to its "Wk N" twin (the full chip needs >=390px
     next to a 32px mark), and below 380px the subtitle drops too */
  @media (max-width: 389px) {
    .topbar .chip:not(.chip-narrow) { display: none; }
    .topbar .chip-narrow { display: inline-flex; }
  }
  @media (max-width: 379px) {
    .topbar .tag { display: none; }
  }
  .wordmark .mark { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
  .topbar .desktop-nav { display: none; }
  .topbar .chip {
    height: 36px; padding: 0 var(--m-3); border-radius: 10px;
    font-size: var(--m-sec); font-weight: 700;
  }
  .topbar .nav-pill {
    min-height: 36px; height: 36px; padding: 0 var(--m-3); border-radius: 10px;
    min-width: 44px;
  }
  .topbar .nav-pill.outline { min-width: 52px; }
  .topbar .popover { top: 44px; width: 220px; padding: var(--m-2); }
  .topbar .popover .nav-pill { min-height: 44px; height: auto; border-radius: 8px; }
  .sticky-day {
    top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px));
    padding: var(--m-3) 0 var(--m-2);
  }
  .sticky-day .label { font-size: var(--m-cap); }
  .props-toolbar { top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px)); flex-wrap: wrap; }

  /* disclaimer sits above the tab bar */
  .disclaimer {
    bottom: calc(var(--m-tabbar) + env(safe-area-inset-bottom, 0px));
    min-height: var(--m-disclaimer);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; line-height: 13px; padding: 4px var(--m-edge);
  }

  /* ---------- bottom tab bar ---------- */
  .bottombar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--m-tabbar) + env(safe-area-inset-bottom, 0px));
    background: rgba(11, 15, 23, 0.94);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(14px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottomtab {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; min-height: 44px;
    font-size: var(--m-cap); line-height: var(--m-cap-lh); font-weight: 700;
    letter-spacing: 0.04em; color: var(--ink-3);
  }
  .bottomtab.active { color: var(--brand); }
  .bottomtab .icon { width: 22px; height: 22px; }

  /* ---------- touch targets: 44×44 minimum ---------- */
  .nav-pill, .btn, .select, .search { min-height: 44px; }
  .btn.sm { padding: 0 var(--m-4); font-size: var(--m-sec); border-radius: 10px; }
  .select { padding: 0 var(--m-8) 0 var(--m-4); font-size: var(--m-sec); border-radius: 10px; }
  .search { padding: 0 var(--m-4); border-radius: 10px; min-width: 0; }
  .search input { font-size: 16px; }   /* 16px: iOS does not zoom the field */
  .stepper button { width: 48px; min-height: 48px; font-size: 20px; flex: none; }
  .stepper input { min-height: 48px; flex: 1 1 0; width: 64px; min-width: 0; font-size: 16px; }
  .info-dot { width: 18px; height: 18px; font-size: 11px; }
  /* small visible controls keep a 44px hit area through an invisible halo */
  .info-dot, .onboard .x, .sheet-close { position: relative; }
  .info-dot::after, .onboard .x::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 44px; height: 44px; transform: translate(-50%, -50%);
  }
  .topbar .nav-pill, .topbar .chip { position: relative; }
  .topbar .nav-pill::after { content: ""; position: absolute; inset: -4px; }

  /* ---------- the ONE pill style ---------- */
  .chip, .pcell, .td-chip, .rank-pill, .warn-banner {
    display: inline-flex; align-items: center; gap: 6px;
    height: var(--m-pill-h); padding: 0 10px; border-radius: 6px;
    font-size: var(--m-sec) !important; line-height: 1; font-weight: 700;
    white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
    vertical-align: middle; flex: none; min-width: 0;
  }
  .chip > *, .warn-banner > * { min-width: 0; }
  .chip .k { font-size: var(--m-cap); letter-spacing: 0.06em; color: var(--ink-2); }
  /* AA contrast on phones: light team colors get a dark ink, no shadow */
  .team-mark { text-shadow: none; }
  .team-mark[data-light] { color: #000; }
  .chip .odds { font-size: 13px; }
  .chip.vol-tag { font-size: var(--m-cap) !important; letter-spacing: 0.06em; }
  .vol-tag.normal { color: var(--ink-2); }   /* AA on the chip surface */
  .td-chip { min-width: 56px; justify-content: center; font-variant-numeric: tabular-nums; }
  .rank-pill { min-width: 40px; justify-content: center; }
  .pcell { margin: 0; }
  /* a flagged chip carries one more glyph (⚠); tighter padding keeps it inside its statlet column */
  .pcard .pcell.gap { padding: 0 6px; gap: 3px; letter-spacing: -0.01em; }
  .lean-pill { border-radius: 10px; }
  .grade-badge { min-width: 36px; height: 36px; border-radius: var(--radius-chip); font-size: 16px; }
  /* chips that ellipsize keep their text on one line inside flex rows */
  .chip > .term-box, .chip > .term-box > span { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }

  /* ---------- horizontal strips: fade at the right edge ---------- */
  .chip-row, .tabs, .board-scroll, .ctx-log {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  }
  .chip-row {
    display: flex; gap: var(--m-2); overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 2px 32px 2px 0; margin: 0;
    scroll-padding-left: var(--m-edge);
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-row > * { flex: none; }
  .chip-row .nav-pill { min-height: 36px; height: 36px; padding: 0 var(--m-3); font-size: var(--m-sec) !important; }
  .chip-row .nav-pill { position: relative; }
  .chip-row .nav-pill::after { content: ""; position: absolute; inset: -4px; }
  /* the search circle: 44px, round */
  .search-circle {
    width: 44px; min-width: 44px; height: 44px; padding: 0;
    border-radius: 50%; justify-content: center;
  }

  /* matchup tabs: a 44px strip that scrolls, 2px underline, fades right */
  .tabs {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: 0;
    margin: 0 calc(-1 * var(--m-edge)) var(--m-4);
    padding: 0 32px 0 var(--m-edge);
    scroll-padding: 0 var(--m-edge);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    white-space: nowrap; min-height: 44px; padding: 0 var(--m-3);
    font-size: var(--m-body); line-height: var(--m-body-lh); font-weight: 600;
    border-bottom-width: 2px; margin-bottom: -1px; transition: none;
  }
  .tab-panel { animation: tab-in 120ms ease-out; }
  @keyframes tab-in { from { opacity: 0; } }

  /* ---------- cards ---------- */
  .card { border-radius: var(--m-radius); }
  .card.pad { padding: var(--m-card-pad); }
  .card.hoverable { transition: none; }
  .card.hoverable:hover { transform: none; box-shadow: var(--shadow-1); border-color: var(--border); }
  .tile { padding: var(--m-card-pad); border-radius: 10px; }
  .footnote-card { padding: var(--m-3) var(--m-4); font-size: var(--m-sec); line-height: var(--m-sec-lh); }
  .btn, .nav-pill, .select, .chip { transition: none; }

  /* callouts: 16px padding, 44px close */
  .onboard {
    padding: var(--m-4); gap: var(--m-3); border-radius: var(--m-radius);
    font-size: var(--m-sec); line-height: var(--m-sec-lh); margin-bottom: var(--m-4);
  }
  .onboard .x { padding: 0; margin: -4px -4px -4px auto; width: 24px; height: 24px; display: grid; place-items: center; }
  .warn-banner {
    display: flex; height: auto; min-height: 44px; white-space: normal;
    padding: var(--m-3) var(--m-4); border-radius: 10px;
    font-size: var(--m-sec) !important; line-height: var(--m-sec-lh); font-weight: 600;
    margin-bottom: var(--m-3) !important;
  }
  .error-box { padding: var(--m-4); border-radius: var(--m-radius); font-size: var(--m-sec); line-height: var(--m-sec-lh); }
  .takeaway { font-size: var(--m-sec); line-height: var(--m-sec-lh); padding: var(--m-2) 0 0; }

  /* ---------- slate ---------- */
  .slate-grid { grid-template-columns: 1fr; gap: var(--m-card-gap); margin-bottom: var(--m-2) !important; }
  .game-card .inner { padding: var(--m-card-pad); }
  .game-card .view-cta { display: none; }
  .market-chips { gap: var(--m-2); margin-top: var(--m-3); }
  .market-chips .chip b, .market-chips .chip .odds { font-size: 13px; }
  .slate-tools { margin-bottom: var(--m-4); }
  .slate-tools > div { display: flex; align-items: center; gap: var(--m-3); }
  .slate-tools .chip-row { flex: 1; min-width: 0; }
  /* model strip: two lines — read + grade, then the two lean pills */
  .model-strip {
    display: grid !important; grid-template-columns: auto auto 1fr auto;
    gap: var(--m-2) var(--m-2); align-items: center; margin-top: var(--m-3) !important;
  }
  .model-strip > .num { grid-column: 1 / 4; grid-row: 1; font-size: var(--m-sec) !important; line-height: var(--m-sec-lh); }
  .model-strip > .chip { grid-row: 2; }
  .model-strip > .grade-badge { grid-column: 4; grid-row: 1 / 3; align-self: center; }
  .reality-line { margin-top: var(--m-3) !important; gap: var(--m-2) !important; }

  /* ---------- matchup header: equal team columns ---------- */
  .mu-head { display: block; padding: var(--m-card-pad); margin-bottom: var(--m-4); }
  .mu-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--m-3); align-items: center; }
  .mu-teams > * { min-width: 0; }
  .mu-team { display: flex; align-items: center; gap: var(--m-3); min-width: 0; }
  .mu-team.home { flex-direction: row-reverse; text-align: right; }
  .mu-team .team-mark { width: 40px !important; height: 40px !important; font-size: 14px !important; }
  .mu-team-name { font-size: var(--m-title) !important; line-height: var(--m-title-lh); }
  .mu-team-sub { font-size: var(--m-cap) !important; line-height: var(--m-cap-lh); }
  .mu-live { width: 100%; margin: var(--m-3) 0 0; padding: var(--m-3); border-radius: 10px; background: var(--bg1); }
  .mu-meta { margin-top: var(--m-3); align-items: stretch !important; gap: var(--m-2) !important; }
  .mu-meta > div { justify-content: flex-start !important; gap: var(--m-2) !important; }
  /* market row: a 2-col grid — spread | total, ML across, volatility | grade */
  .mu-meta > div:last-child { display: grid !important; grid-template-columns: 1fr 1fr; }
  .mu-meta > div:last-child > .chip { width: 100%; }
  .mu-meta > div:last-child > .chip:nth-child(3) { grid-column: 1 / -1; }
  .mu-meta > div:last-child > .grade-badge { justify-self: end; }
  .mu-meta > div:last-child > .vol-tag { width: auto; justify-self: start; }

  /* best board: swipeable horizontal cards */
  .board-scroll {
    display: flex !important; grid-template-columns: none !important;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    gap: var(--m-card-gap) !important;
    margin: 0 calc(-1 * var(--m-edge)); padding: 2px 32px 6px var(--m-edge);
    scroll-padding-left: var(--m-edge);
  }
  .board-scroll::-webkit-scrollbar { display: none; }
  .board-scroll > * { flex: 0 0 min(260px, 76vw); scroll-snap-align: start; padding: var(--m-card-pad) !important; }
  .board-scroll .chip { margin-left: auto; }

  /* hero: score card full width, spread/total 2-up */
  .hero-band { grid-template-columns: 1fr 1fr; gap: var(--m-card-gap); }
  .hero-band > :first-child { grid-column: 1 / -1; }
  .hero-band > * { min-width: 0; }   /* grid items may shrink; rows wrap */
  @media (max-width: 374px) {
    .hero-band { grid-template-columns: 1fr; }
    .hero-band > :first-child { grid-column: auto; }
  }
  .hero-band .stepper { width: 100%; }
  .hero-band .stepper input { width: auto; }
  .lean-pill { width: 100%; justify-content: center; }
  .edge-row {
    display: grid !important; grid-template-columns: auto auto auto auto auto 1fr;
    gap: var(--m-2) var(--m-3) !important; padding: var(--m-3) 0 !important;
    align-items: center;
  }
  .edge-row > :nth-child(1) { grid-column: 1 / -1; width: auto !important; }
  .edge-row > :nth-child(7) { display: none; }
  .edge-row > :nth-child(8) { grid-column: 1 / -1; align-items: flex-start !important; }

  /* ---------- matchup data: tug-of-war reflows to two rows ---------- */
  .tow-row {
    grid-template-columns: 64px 1fr 1fr 64px;
    grid-template-areas: "lbl lbl lbl lbl" "av at ht hv";
    gap: 4px var(--m-2); padding: 9px 0;
  }
  .tow-row > :nth-child(1) { grid-area: av; }
  .tow-row > :nth-child(2) { grid-area: at; align-self: center; }
  .tow-row > :nth-child(3) { grid-area: lbl; text-align: left !important; }
  .tow-row > :nth-child(4) { grid-area: ht; align-self: center; }
  .tow-row > :nth-child(5) { grid-area: hv; }

  /* why: mover rows stack the bar under the label */
  .mover-row {
    grid-template-columns: 1fr 76px;
    grid-template-areas: "f p" "t t";
    gap: 6px var(--m-3);
  }
  .mover-row > :nth-child(1) { grid-area: f; }
  .mover-row > :nth-child(2) { grid-area: t; }
  .mover-row > :nth-child(3) { grid-area: p; text-align: right; }

  /* injuries: fixed name width becomes fluid */
  .injury-name { width: auto !important; flex: 1; min-width: 0; }

  /* ---------- tables (accuracy, season log) ---------- */
  .tbl { font-size: var(--m-sec); }
  .tbl thead th { font-size: var(--m-cap); letter-spacing: 0.06em; padding: var(--m-2) var(--m-2); }
  .tbl tbody td { padding: var(--m-3) var(--m-2); height: 44px; line-height: var(--m-sec-lh); }
  .tbl .cell-strong { font-size: var(--m-body); }
  .tbl td.left, .tbl th.left { padding-left: 0; }
  .tbl td:last-child, .tbl th:last-child { padding-right: 0; }

  /* ---------- accuracy ---------- */
  .stat-grid { grid-template-columns: 1fr 1fr !important; gap: var(--m-card-gap) !important; }
  .stat-grid .tile .num { font-size: 22px !important; line-height: 26px; }
  .cal-grid { grid-template-columns: 1fr !important; gap: var(--m-4) !important; }
  .review-stats { display: grid !important; grid-template-columns: 1fr 1fr; gap: var(--m-3) !important; }
  .review-stats > span { min-width: 0 !important; }
  .scored-row { padding: var(--m-3) 0 !important; }

  /* ---------- This Week ---------- */
  .ws-title { font-size: var(--m-display) !important; line-height: var(--m-display-lh); }
  .ws-head { gap: var(--m-3) !important; margin-bottom: var(--m-3) !important; }
  .ws-head > div:first-child { min-width: 0; flex: 1 1 100%; }
  .ws-actions { width: 100%; }
  .ws-actions .btn { flex: 1; }
  .standing-note { padding: var(--m-card-pad) !important; border-radius: 10px; }
  .standing-note > div:last-child { font-size: var(--m-sec) !important; line-height: var(--m-sec-lh); }
  .ws-card-head { padding: var(--m-4) var(--m-4) var(--m-3) !important; display: flex; flex-wrap: wrap; align-items: center; gap: var(--m-1) var(--m-3) !important; }
  .ws-card-head .select { margin-left: auto; }
  .ws-card-head .sub { flex: 1 1 100%; font-size: var(--m-sec) !important; line-height: var(--m-sec-lh); }
  .lean-row { display: block; padding: var(--m-3) var(--m-4); border-top: 1px solid var(--border); }
  .lean-row .l1 { display: flex; align-items: center; gap: var(--m-2); min-height: 28px; }
  .lean-row .l1 .name { font-weight: 800; font-size: var(--m-body); line-height: var(--m-body-lh); flex: none; }
  .lean-row .l1 .chip { flex: 0 1 auto; }
  .lean-row .l2 {
    display: grid; grid-template-columns: 1fr 1fr 1fr minmax(44px, max-content);
    gap: var(--m-2); margin-top: var(--m-2); align-items: start;
  }
  .lean-row .cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .lean-row .cell .label { white-space: nowrap; }
  .lean-row .cell .v { font-size: var(--m-body); line-height: var(--m-body-lh); font-weight: 800; white-space: nowrap; }
  .lean-row .cell .s { font-size: var(--m-cap); line-height: var(--m-cap-lh); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  /* differing-team spread: a deliberate two-line stack, never an ellipsis */
  .lean-row .cell .s.stack {
    display: flex; flex-direction: column; font: var(--type-caption); color: var(--text-3);
    overflow: visible; text-overflow: clip;
  }
  .lean-row .cell .s.stack > span { white-space: nowrap; }
  @media (max-width: 374px) { .lean-row .l2 { gap: 6px; } }
  .lean-row .cell.grade { align-items: flex-end; }
  .lean-row .cell.grade .vol-tag {
    font: var(--type-caption); letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-3); background: none; border: 0; box-shadow: none;
    padding: 0; height: auto; text-align: right; overflow: visible; max-width: none;
  }
  .watch-row { display: block; padding: var(--m-3) var(--m-4); border-top: 1px solid var(--border); }
  .watch-row .l1 { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: var(--m-2); }
  .watch-row .l1 .name { font-weight: 700; font-size: var(--m-body); line-height: var(--m-body-lh); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .watch-row .l1 .meta { font-size: var(--m-cap); line-height: var(--m-cap-lh); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .watch-row .l2 { display: grid; grid-template-columns: 1.1fr 1.15fr 1fr; gap: var(--m-2); margin-top: var(--m-3); }
  .watch-row .cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .watch-row .cell .v { font-size: var(--m-sec); line-height: var(--m-sec-lh); font-weight: 700; }
  .ws-edge-grid { grid-template-columns: 1fr !important; gap: var(--m-card-gap) !important; }
  .ws-td { gap: var(--m-4) !important; }
  .ws-td > div { min-width: 0 !important; flex: 1 1 100%; }

  /* explainer slide-over becomes full width */
  .slideover { width: 100vw; max-width: 100vw; padding: var(--m-4); padding-top: calc(var(--m-4) + env(safe-area-inset-top, 0px)); }
  .slideover .btn.ghost.sm { width: 44px; min-width: 44px; padding: 0; }

  /* ---------- props: filter row, meta line, card list ---------- */
  .props-toolbar {
    padding: var(--m-3) var(--m-edge); margin: 0 calc(-1 * var(--m-edge)) var(--m-2);
    gap: var(--m-2) !important; z-index: 13;
    background: var(--bg-1); border-bottom: 1px solid var(--border-subtle);
  }
  /* the list below the sticky block: section heads stick under it, and
     anchored scrolls land below it (height measured by PropsMobile) */
  .props-list { --props-tools-h: 120px; scroll-margin-top: calc(var(--m-topbar) + var(--props-tools-h)); }
  .props-list .psection-head { top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px) + var(--props-tools-h)); }
  .props-filter { display: flex; gap: var(--m-2); width: 100%; align-items: center; }
  .props-filter .nav-pill { flex: 1; justify-content: center; padding: 0 var(--m-3); }
  .props-search { display: flex; gap: var(--m-2); width: 100%; align-items: center; }
  .props-search .search { flex: 1 1 120px; min-width: 0; }
  .props-search .select { flex: 0 1 auto; min-width: 0; max-width: 60%; text-overflow: ellipsis; }
  .props-meta { display: flex; align-items: center; gap: var(--m-3); margin: 0 0 var(--m-3); }
  .props-meta .txt { flex: 1; min-width: 0; font-size: var(--m-sec); line-height: var(--m-sec-lh); color: var(--ink-3); }
  .props-meta .btn { flex: none; }
  .psection-head {
    position: sticky; top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px)); z-index: 11;
    background: linear-gradient(180deg, var(--bg0) 78%, transparent);
    padding: var(--m-6) 0 var(--m-3);
    display: flex; align-items: baseline; gap: var(--m-2);
  }
  .psection-head .label { color: var(--ink-2); }
  .psection-head .sub { font-size: var(--m-cap); line-height: var(--m-cap-lh); color: var(--ink-3); }
  .pcard {
    display: block; width: 100%; text-align: left;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 55%), var(--surface);
    border: 1px solid var(--border); border-radius: var(--m-radius);
    padding: var(--m-card-pad); margin-bottom: var(--m-card-gap); min-height: 44px;
    content-visibility: auto; contain-intrinsic-size: auto 118px;
  }
  .pcard:active { background: var(--surface-2); }
  .pcard .line1 { display: flex; align-items: center; gap: var(--m-2); min-width: 0; min-height: 28px; }
  .pcard .line1 .team-mark { width: 28px !important; height: 28px !important; font-size: 10px !important; }
  .pcard .name { font-weight: 800; font-size: var(--m-body); line-height: var(--m-body-lh); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pcard .pos { font-size: var(--m-cap); line-height: var(--m-cap-lh); color: var(--ink-3); flex: none; text-transform: uppercase; letter-spacing: 0.06em; }
  .pcard .line2 {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--m-3); margin-top: var(--m-3); align-items: start;
  }
  .pcard .statlet { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .pcard .statlet .k {
    font-size: var(--m-cap); line-height: var(--m-cap-lh); font-weight: 700;
    letter-spacing: 0.06em; color: var(--ink-3); text-transform: uppercase;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .pcard .statlet .v { font-size: var(--m-body); line-height: var(--m-body-lh); font-weight: 800; font-variant-numeric: tabular-nums; }
  .pcard .statlet > * { align-self: flex-start; }
  .pcell b { font-weight: 800; }
  .pcell.strong, .pcell.mid { color: var(--pos); }
  .pcard .btn { margin-top: 0; }
  .expand-btn { width: 100%; min-height: 44px; margin-bottom: var(--m-3); }
  .props-note { font-size: var(--m-sec); line-height: var(--m-sec-lh); color: var(--ink-3); margin-top: var(--m-2); }

  /* ---------- skeleton loaders ---------- */
  .skeleton { display: flex; flex-direction: column; gap: 10px; padding: 2px 0; }
  .skeleton span {
    display: block; height: 12px; border-radius: 6px;
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
  }
  @keyframes shimmer { to { background-position: -200% 0; } }

  /* ---------- season context inside the sheet ---------- */
  .ctx-head { gap: var(--m-2) !important; }
  .ctx-head .nav-pill { min-height: 36px; height: 36px; padding: 0 var(--m-3) !important; font-size: var(--m-sec) !important; }
  .ctx-stats { display: grid !important; grid-template-columns: 1fr 1fr; gap: var(--m-3) var(--m-3) !important; margin: var(--m-3) 0 var(--m-2) !important; }
  .ctx-stats > span { min-width: 0; }
  .ctx-stats .ctx-proj { font-size: var(--m-body) !important; line-height: var(--m-body-lh); }
  .ctx-stats .ctx-avg { display: block; font-size: var(--m-sec) !important; line-height: var(--m-sec-lh); }
  .ctx-stats .ctx-sep { display: none; }
  .ctx-stats .label { font-size: var(--m-cap) !important; }
  .cons-row { display: grid; grid-template-columns: 1fr auto; gap: var(--m-2); align-items: center; font-size: var(--m-sec) !important; line-height: var(--m-sec-lh); }
  .cons-row .chip { margin-left: 0 !important; }
  .ctx-body-line { font-size: var(--m-sec) !important; line-height: var(--m-sec-lh); }
  .ctx-log {
    margin: var(--m-3) calc(-1 * var(--m-4)) 0; padding: 0 32px 0 var(--m-4);
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .ctx-log::-webkit-scrollbar { display: none; }
  .ctx-log .tbl { font-size: var(--m-sec); min-width: 100%; }
  .ctx-log .tbl th, .ctx-log .tbl td { white-space: nowrap; }
  .ctx-log .tbl td { height: 44px; padding: 0 var(--m-2); }
  .ctx-log .tbl th { padding: var(--m-2); }
  .ctx-log .col-wk, .ctx-log .col-team, .ctx-log .col-opp {
    position: sticky; z-index: 1; background: var(--bg1);
  }
  .ctx-log .col-wk { left: 0; min-width: 48px; }
  .ctx-log .col-team { left: 48px; min-width: 48px; }
  .ctx-log .col-opp { left: 48px; }
  .ctx-log.has-team .col-opp { left: 96px; }
  .ctx-log .col-opp { box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.55); }
  .ctx-log tr.h2h .col-wk, .ctx-log tr.h2h .col-team, .ctx-log tr.h2h .col-opp {
    background: linear-gradient(var(--pos-wash), var(--pos-wash)), var(--bg1);
  }
  .ctx-log tr.h2h .col-wk { box-shadow: inset 2px 0 0 var(--brand); }
  .ctx-log .post-tag {
    display: inline; height: auto; padding: 0; margin-left: 4px; border: 0; background: none;
    font-size: var(--m-cap) !important; letter-spacing: 0.06em; color: var(--ink-3); vertical-align: 1px;
  }
  .ctx-log .season-row td { height: 32px; font-size: var(--m-cap); }

  /* ---------- player sheet ---------- */
  .sheet-title { display: flex; align-items: center; gap: var(--m-2); min-width: 0; }
  .sheet-title .name { font-weight: 800; font-size: 17px; line-height: 22px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sheet-title .pos { font-size: var(--m-cap); color: var(--ink-3); flex: none; text-transform: uppercase; letter-spacing: 0.06em; }
  .sheet-td-line { display: flex; align-items: center; gap: var(--m-3); margin: var(--m-1) 0 var(--m-3); font-size: var(--m-sec); line-height: var(--m-sec-lh); }
  .detail-compact { margin: 0 0 var(--m-card-gap) !important; padding: var(--m-card-pad) !important; }
  .detail-compact .d-title { font-weight: 800; font-size: var(--m-body); line-height: var(--m-body-lh); }
  .detail-compact .d-quart { font-size: var(--m-sec); line-height: var(--m-sec-lh); color: var(--ink-3); margin-top: 2px; }
  .detail-compact .d-line { display: grid; grid-template-columns: auto 1fr; gap: var(--m-3); align-items: stretch; margin: var(--m-3) 0 var(--m-2); }
  .detail-compact .stepper { height: 48px; border-radius: 10px; }
  .detail-compact .stepper input { width: 64px; flex: none; }
  .detail-compact .ou-pill {
    flex-direction: row; justify-content: space-between; gap: var(--m-2);
    min-width: 0; height: 48px; padding: 0 var(--m-3); border-radius: 10px;
  }
  .detail-compact .ou-pill .lbl { font-size: var(--m-cap); letter-spacing: 0.06em; white-space: nowrap; }
  .detail-compact .ou-pill .big { font-size: 20px; line-height: 24px; }
  .detail-compact .hist { margin: 0 calc(-1 * var(--m-1)); }
  .sheet-book-card { margin: 0 0 var(--m-card-gap) !important; padding: var(--m-card-pad) !important; }
  .sheet-book-card .d-title { font-weight: 800; font-size: var(--m-body); line-height: var(--m-body-lh); }
  .sheet-book-card .d-sub { font-size: var(--m-sec); color: var(--ink-3); font-weight: 600; margin-left: var(--m-2); }
  .booklist { margin-top: var(--m-2); }
  .booklist-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 96px 84px;
    gap: var(--m-2); align-items: center; min-height: 44px;
    padding: 0 var(--m-2); border-bottom: 1px solid var(--border);
    font-size: var(--m-sec); line-height: var(--m-sec-lh);
  }
  .booklist-row .bk { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: var(--m-2); }
  .booklist-row .bk .chip { height: 22px; padding: 0 6px; font-size: var(--m-cap) !important; }
  .booklist-row .ln { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .booklist-row .ln b { font-weight: 700; }
  .booklist-row .ln .odds { margin-left: 6px; color: var(--ink-2); }
  .booklist-row .ed { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .booklist-note { font-size: var(--m-cap); line-height: var(--m-cap-lh); color: var(--ink-3); margin-top: var(--m-2); }

  /* long explainer labels may wrap on phones — an atomic nowrap term
     wider than the viewport is exactly the horizontal-overflow bug */
  .term-box { white-space: normal !important; }
}

/* ---------- bottom sheet (styles live outside the media query so the
   sheet renders if ever opened at odd widths; it only MOUNTS on mobile) */
.sheet-mask {
  position: fixed; inset: 0; z-index: 97;
  background: rgba(5, 7, 11, 0.6);
  animation: mask-in 220ms ease-out;
}
@keyframes mask-in { from { opacity: 0; } }
.bottom-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 98;
  max-height: 90svh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-2);
  border-bottom: none; border-radius: 18px 18px 0 0;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.55);
  animation: sheet-up 220ms ease-out;
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-grab { padding: 10px 0 4px; display: grid; place-items: center; flex: none; min-height: 24px; }
.sheet-grab span {
  width: 40px; height: 4px; border-radius: 999px; background: var(--surface-3);
}
.sheet-head {
  display: flex; align-items: center; gap: 12px; flex: none;
  padding: 4px 16px 12px; border-bottom: 1px solid var(--border);
}
.sheet-close {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface-2); color: var(--ink-2);
}
.sheet-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.mask-open .sheet-mask, .mask-open .bottom-sheet { display: block; }
@media (max-width: 760px) {
  .sheet-mask { display: block; }
  .bottom-sheet { display: flex; }
}

/* ============ Game Day: lineup banner + LIVE READ props ============ */
.lineup-banner {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 16px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.lineup-banner.alert { border-left: 3px solid var(--amber); }
.lineup-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lineup-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.lineup-row.changed .lineup-text { color: var(--ink); }
.lineup-row.flagged .lineup-text { color: var(--ink); }
.lineup-row.flagged { border-left: 2px solid var(--warn); padding-left: 8px; }
.lineup-text { flex: 1 1 320px; min-width: 0; line-height: 1.4; }
.lineup-text b { font-weight: 800; }
.lineup-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.select.sm { padding: 5px 28px 5px 10px; font-size: 12px; }
.mode-toggle { display: inline-flex; gap: 4px; }
.lr-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; }
.lr-table thead th { white-space: nowrap; }
.lr-table tbody tr.row-out td { opacity: 0.7; }
.lr-cell { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.2; }
.lr-cell b { font-size: 15px; font-weight: 700; }
.lr-cell .range { font-size: 10.5px; color: var(--ink-3); }
.lr-cell .sub { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.lr-cell.out b { color: var(--ink-3); text-decoration: line-through; }
.lr-confirm { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .lineup-banner { padding: var(--m-3); gap: var(--m-2); margin-bottom: var(--m-4); }
  .lineup-row { font-size: var(--m-sec); line-height: var(--m-sec-lh); }
  .lineup-text { flex: 1 1 60%; }
  .lineup-actions { width: 100%; justify-content: flex-end; }
  .lineup-actions .select { flex: 1; min-width: 0; }
  .props-mode { margin-top: var(--m-2); }
  .lr-meta { font-size: var(--m-cap); line-height: var(--m-cap-lh); padding: var(--m-3) 0; }
  .lr-card .statlet .lr-cell { align-items: flex-start; }
  .lr-card .statlet .lr-cell b { font-size: var(--m-body); line-height: var(--m-body-lh); }
  .lr-card .statlet .lr-cell .sub { white-space: normal; }
}

/* ============ scoreboard strip (under the header, every page) ============ */
:root { --strip-h: 0px; }
.scorestrip {
  position: sticky; top: 60px; z-index: 39;
  display: flex; align-items: stretch; height: 64px;
  background: var(--bg-1); border-bottom: 1px solid var(--border-subtle);
}
.scorestrip.collapsed { height: 28px; align-items: center; padding-left: var(--s-6); }
.strip-summary { display: inline-flex; align-items: center; gap: 8px; font: var(--type-caption); color: var(--text-3); }
.strip-summary .label { font-size: 10px; color: var(--text-2); }
.strip-scroll {
  flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center;
  padding: 0 var(--s-6); overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; scroll-behavior: auto;
}
.strip-scroll::-webkit-scrollbar { display: none; }
.strip-scroll.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.strip-scroll.fade-l { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px); mask-image: linear-gradient(to right, transparent, #000 32px); }
.strip-scroll.fade-l.fade-r {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}
.stile {
  flex: none; width: 184px; height: 48px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 6px 10px; border-radius: var(--radius-chip);
  background: var(--bg-2); border: 1px solid var(--border-subtle);
  color: var(--text-1); text-decoration: none; font: var(--type-caption);
  transition: background 200ms;
}
.stile:hover { border-color: var(--border); }
.stile.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: strip-shimmer 1.4s infinite; border-color: transparent; }
@keyframes strip-shimmer { to { background-position: -200% 0; } }
.stile.quiet { justify-content: center; align-items: center; color: var(--text-3); width: auto; padding: 0 16px; }
.stile-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.stile-teams { display: inline-flex; align-items: center; gap: 3px; min-width: 0; white-space: nowrap; }
.stile-teams .team-mark { width: 16px !important; height: 16px !important; font-size: 6px !important; }
.stile-teams .abbr { font-weight: 800; font-size: 11px; letter-spacing: -0.01em; margin-right: 3px; }
.stile-teams .poss { font-size: 9px; margin-left: 2px; }
.stile-score { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 1px; white-space: nowrap; }
.stile-score .dash { color: var(--text-3); font-weight: 500; }
.stile-score.final { color: var(--text-2); }
.stile-when { color: var(--text-2); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.stile-when.live { color: var(--red); font-weight: 700; }
.stile-when .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 1.6s infinite; }
.stile-when .poss { color: var(--text-2); font-weight: 500; }
.stile-line { white-space: nowrap; font-variant-numeric: tabular-nums; }
.stile-read { color: var(--lime); font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; border-bottom: 1px dotted rgba(163, 230, 53, 0.45); cursor: help; }
.stile-read .arrow { font-size: 9px; }
.stile-read .qbmark { color: var(--amber); font-size: 10px; }
.stile-grade { font-weight: 800; color: var(--text-2); }
.stile-grade.hit { color: var(--lime); }
.stile-grade.miss { color: var(--red); }
.stile-grade.push { color: var(--text-3); font-size: 10px; }
.stile.flash { animation: strip-flash 200ms ease-out; }
@keyframes strip-flash { 0% { background: var(--lime-subtle); } 100% { background: var(--bg-2); } }
@media (prefers-reduced-motion: reduce) {
  .stile.flash, .stile.skeleton, .stile-when .dot { animation: none; }
  .stile { transition: none; }
}
.strip-toggle {
  flex: none; width: 40px; display: grid; place-items: center;
  background: var(--bg-1); border: none; border-left: 1px solid var(--border-subtle);
  color: var(--text-3); cursor: pointer;
}
.scorestrip.collapsed .strip-toggle { margin-left: auto; height: 100%; }
.strip-toggle:hover { color: var(--text-1); background: var(--bg-2); }
.strip-toggle .chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-135deg); transition: transform 150ms; }
.strip-toggle .chev.down { transform: rotate(45deg); }
/* everything sticky under the header sits under the strip too */
.sticky-day { top: calc(60px + var(--strip-h, 0px)); }
.props-toolbar { top: calc(60px + var(--strip-h, 0px)); }
@media (max-width: 760px) {
  .scorestrip { top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px)); height: 72px; }
  .scorestrip.collapsed { height: 28px; padding-left: var(--m-edge); }
  .strip-scroll { padding: 0 var(--m-edge); gap: var(--m-2); scroll-snap-type: x mandatory; }
  .stile { scroll-snap-align: start; height: 56px; min-height: 44px; width: 188px; font-size: 11px; line-height: 14px; }
  .stile .stile-line, .stile .stile-when, .stile .stile-read { font-size: 11px; line-height: 14px; }
  .strip-toggle { width: 44px; }
  html { scroll-padding-top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px) + var(--strip-h, 0px) + 8px); }
  .sticky-day { top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px) + var(--strip-h, 0px)); }
  .props-toolbar { top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px) + var(--strip-h, 0px)); }
  .psection-head { top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px) + var(--strip-h, 0px)); }
  .props-list .psection-head { top: calc(var(--m-topbar) + env(safe-area-inset-top, 0px) + var(--strip-h, 0px) + var(--props-tools-h)); }
}
