/* Who2Root4 — base theme */

:root {
  --bg:        oklch(0.985 0.004 90);
  --bg-soft:   oklch(0.965 0.006 90);
  --surface:   #ffffff;
  --surface-2: oklch(0.97 0.005 90);
  --border:    oklch(0.91 0.005 90);
  --border-strong: oklch(0.85 0.005 90);
  --text:      oklch(0.18 0.005 250);
  --text-muted:oklch(0.50 0.005 250);
  --text-faint:oklch(0.70 0.005 250);

  --accent:    oklch(0.68 0.17 50);           /* root-for orange */
  --accent-2:  oklch(0.74 0.16 60);           /* lighter highlight */
  --accent-soft: oklch(0.96 0.045 60);
  --accent-ink:  oklch(0.42 0.13 45);
  --against:   oklch(0.62 0.06 270);          /* cool neutral */
  --warn:      oklch(0.60 0.20 28);           /* reddish for errors */

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

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.04);
  --shadow:    0 2px 8px oklch(0 0 0 / 0.06), 0 1px 2px oklch(0 0 0 / 0.04);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.10), 0 2px 8px oklch(0 0 0 / 0.05);

  /* Typography system — Barlow Condensed for identity, Barlow for headings, Inter for data & body */
  --font-display: "Barlow Condensed", "Barlow", ui-sans-serif, system-ui, sans-serif;
  --font-heading: "Barlow", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-data:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Back-compat aliases (old code paths) */
  --font-sans: var(--font-data);
  --font-mono: var(--font-data);
}

[data-theme="dark"] {
  --bg:        oklch(0.16 0.008 260);
  --bg-soft:   oklch(0.19 0.008 260);
  --surface:   oklch(0.21 0.008 260);
  --surface-2: oklch(0.24 0.008 260);
  --border:    oklch(0.28 0.008 260);
  --border-strong: oklch(0.36 0.008 260);
  --text:      oklch(0.97 0.005 90);
  --text-muted:oklch(0.72 0.008 250);
  --text-faint:oklch(0.55 0.008 250);

  --accent:    oklch(0.76 0.17 55);
  --accent-2:  oklch(0.82 0.14 65);
  --accent-soft: oklch(0.30 0.07 55);
  --accent-ink: oklch(0.90 0.10 60);
  --against:   oklch(0.55 0.04 270);
  --warn:      oklch(0.68 0.20 28);

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.30);
  --shadow:    0 4px 12px oklch(0 0 0 / 0.40), 0 1px 2px oklch(0 0 0 / 0.30);
  --shadow-lg: 0 16px 48px oklch(0 0 0 / 0.50), 0 2px 8px oklch(0 0 0 / 0.30);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-data);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Typography roles — applied broadly via base classes */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }

/* Tabular numerals helper */
.tnum { font-variant-numeric: tabular-nums; }

/* Ambient animated background — two slow-drifting orange auras */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 18% 12%, color-mix(in oklch, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(ellipse 50% 50% at 82% 92%, color-mix(in oklch, var(--accent-2) 14%, transparent), transparent 65%),
    radial-gradient(ellipse 40% 30% at 70% 30%, color-mix(in oklch, var(--accent) 7%, transparent), transparent 70%);
  filter: blur(40px);
  animation: ambient 28s ease-in-out infinite alternate;
  opacity: 0.65;
}
[data-theme="dark"] body::before { opacity: 0.35; }
@keyframes ambient {
  0%   { transform: translate(0, 0)        scale(1);    }
  33%  { transform: translate(-30px, 10px) scale(1.04); }
  66%  { transform: translate(20px, -16px) scale(0.98); }
  100% { transform: translate(-10px, 24px) scale(1.02); }
}
.app, .auth-shell, .onb-shell { position: relative; z-index: 1; }
.topnav { z-index: 30; }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

button { font-family: inherit; cursor: pointer; }
input  { font-family: inherit; }
/* .mono is the legacy hook used for stat / score / data text — now Inter tabular */
.mono  { font-family: var(--font-data); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ── Who2Root4 TM superscript ───────────────────────────────────────────── */
.w2r4-tm {
  font-size: 0.42em;
  vertical-align: super;
  letter-spacing: 0;
  font-weight: 600;
  margin-left: 0.12em;
  opacity: 0.6;
  font-family: var(--font-data);
  line-height: 1;
}

/* ── App shell ──────────────────────────────────────────────────────────── */
/* Flex column so the header sits at the top, the main area grows to fill any
 * viewport height, and the footer is pushed to the bottom — content is always
 * anchored to the top regardless of how little there is. */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app > .topnav { flex: 0 0 auto; }
.app > .main { flex: 1 0 auto; }
.app > footer { flex: 0 0 auto; }

.topnav {
  position: sticky; top: 0; z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 28px;
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.topnav .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 20px;
  color: var(--text);
}
.topnav .brand .brand-word { text-transform: none; }
.topnav .brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent);
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.topnav .tabs {
  display: flex; gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.topnav .tab {
  border: 0; background: transparent;
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--font-data);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.topnav .tab:hover { color: var(--text); }
.topnav .tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
/* Center group: page tabs with the sport switcher to their right */
.topnav .nav-wrap {
  display: flex; align-items: center; gap: 12px;
  justify-self: center;
}
.topnav .right { justify-self: end; display: flex; align-items: center; gap: 10px; }

.team-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  color: var(--text);
  transition: all 0.15s ease;
}
.team-chip:hover { border-color: var(--border-strong); }
.team-chip .pill {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  color: white;
  font-family: var(--font-data);
  font-size: 10px; font-weight: 900;
  letter-spacing: 0.02em;
}
.team-chip .caret { color: var(--text-faint); font-size: 10px; margin-left: 2px; }

.icon-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* ── Main column ────────────────────────────────────────────────────────── */
.main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 24px;
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.page-head h1 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 5vw, 34px); font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
.page-head .sub {
  font-family: var(--font-data);
  font-size: 14px; color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.6;
}
.eyebrow {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ── Entry animations (shared) ──────────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes riseSm {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes drop {
  from { opacity: 0; transform: translateY(-8px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 35%, transparent),
                          0 8px 32px color-mix(in oklch, var(--accent) 18%, transparent); }
  50%      { box-shadow: 0 0 0 14px color-mix(in oklch, var(--accent) 0%,  transparent),
                          0 18px 48px color-mix(in oklch, var(--accent) 30%, transparent); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes barFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.fade-in   { animation: fade 0.35s ease both; }
.rise-in   { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.drop-in   { animation: drop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
/* ── Score Bar Pattern (shared) ─────────────────────────────────────────── */
.score-bar {
  position: relative;
  height: 4px;
  background: color-mix(in oklch, var(--text) 8%, transparent);
  border-radius: 999px;
  overflow: hidden;
}
.score-bar .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200% 100%;
  border-radius: 999px;
  transform-origin: left;
  animation: barFill 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both, shimmer 4s linear infinite;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── REC CARD ───────────────────────────────────────────────────────────── */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.rec-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  display: flex; flex-direction: column; gap: 16px;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.25s ease,
              border-color 0.2s ease;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  overflow: hidden;
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
.rec-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px oklch(0 0 0 / 0.07),
              0 2px 6px oklch(0 0 0 / 0.04);
}
.rec-card > * { position: relative; }
.rec-card .rank {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.rec-card .rank.rank-bare {
  background: transparent;
  padding: 0;
}
.rec-card .rank .rank-num {
  display: grid; place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 5px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.rec-card.no-impact .rank { background: color-mix(in oklch, var(--text) 5%, transparent); color: var(--text-muted); }
.rec-card.no-impact .rank.rank-bare { background: transparent; }
.rec-card.no-impact .rank .rank-num { background: var(--text-faint); color: var(--surface); }

/* Impact-score pill at the bottom of each rec card — mirrors the rank pill design */
.rec-card .score-row {
  display: flex; align-items: center; justify-content: flex-end;
  margin-top: auto;
}
.rec-card .impact-score-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 6px 4px 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.rec-card .impact-score-num {
  display: inline-grid; place-items: center;
  min-width: 44px; height: 22px;
  padding: 0 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.rec-card.no-impact .impact-score-pill { background: color-mix(in oklch, var(--text) 5%, transparent); color: var(--text-muted); }
.rec-card.no-impact .impact-score-num { background: var(--text-faint); color: var(--surface); }
.rec-card .meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rec-card .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }

.matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.matchup .side {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.matchup .badge {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-data);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  letter-spacing: 0;
  position: relative;
}
.matchup .badge.against {
  background: color-mix(in oklch, var(--text) 8%, transparent) !important;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
}
.matchup .badge .check {
  position: absolute; bottom: -2px; right: -2px;
  width: 18px; height: 18px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--surface);
  font-size: 10px;
}
.matchup .label {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.matchup .city {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  color: var(--text);
}
.matchup .vs {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 28px;
}

.rec-card .reasoning {
  font-family: var(--font-data);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}
.rec-card .reasoning strong { color: var(--text); font-weight: 700; }

/* Hero / top recommendation */
.hero-rec {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px 26px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.3s ease;
}
.hero-rec::before {
  content: "";
  position: absolute;
  right: -120px; top: -100px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 22%, transparent), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 7s ease-in-out infinite;
}
.hero-rec::after {
  content: "";
  position: absolute;
  left: -80px; bottom: -120px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent-2) 15%, transparent), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 9s ease-in-out -2s infinite;
}
.hero-rec:hover { transform: translateY(-3px);
  box-shadow: 0 24px 60px color-mix(in oklch, var(--accent) 16%, transparent),
              0 4px 12px oklch(0 0 0 / 0.06);
}
.hero-rec > * { position: relative; z-index: 1; }
.hero-rec .ribbon {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 14px;
}
.hero-rec .ribbon .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 60%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero-rec h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 6vw, 42px);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  line-height: 1.1;
}
.hero-rec h2 .root-team {
  background: linear-gradient(to right, var(--accent-ink), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-rec .why {
  font-family: var(--font-data);
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 18px;
  max-width: 50ch;
  line-height: 1.6;
}
.hero-rec .stats {
  display: flex; gap: 28px;
}
.hero-rec .stat .k {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.hero-rec .stat .v {
  font-family: var(--font-data);
  font-weight: 900;
  font-size: 28px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hero-rec .hero-rank {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  border-radius: 999px;
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  pointer-events: none;
}
.hero-rec .hero-rank-num {
  display: grid;
  place-items: center;
  height: 22px;
  padding: 0 7px;
  background: var(--accent);
  border-radius: 6px;
  color: var(--surface);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-rec .visual {
  position: relative;
  height: 200px;
}
.hero-rec .visual .badge-big {
  position: absolute;
  width: 130px; height: 130px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-data);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 38px;
  letter-spacing: 0;
}
.hero-rec .visual .badge-big.root {
  left: 20px; top: 30px;
  z-index: 2;
  animation: float 5s ease-in-out infinite, glow 3.6s ease-in-out infinite;
}
.hero-rec .visual .badge-big.against {
  right: 0; top: 50px;
  background: color-mix(in oklch, var(--text) 8%, transparent) !important;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  width: 110px; height: 110px; font-size: 30px;
  animation: float 6s ease-in-out -2s infinite;
}
/* Halo ring behind the root badge */
.hero-rec .visual::before {
  content: "";
  position: absolute;
  left: -10px; top: 0;
  width: 170px; height: 170px;
  border-radius: 50%;
  border: 1px dashed color-mix(in oklch, var(--accent) 30%, transparent);
  animation: spinSlow 28s linear infinite;
  z-index: 1;
}
.hero-rec .visual .arc {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  color: var(--text-faint);
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── SCHEDULE GRID ──────────────────────────────────────────────────────── */
.slot-section { margin-bottom: 28px; animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--section-delay, 0ms);
}
.slot-section h3 {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.slot-section h3 .line {
  flex: 1; height: 1px; background: var(--border);
}

.sched-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.sched-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
  animation: riseSm 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
.sched-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px color-mix(in oklch, var(--accent) 10%, transparent),
              0 1px 4px oklch(0 0 0 / 0.04);
}
.sched-card.own {
  border-color: var(--own-color, var(--accent));
  background: color-mix(in oklch, var(--own-color, var(--accent)) 6%, var(--surface));
  position: relative;
  overflow: hidden;
}
.sched-card.own.tank-mode {
  border-color: var(--text-faint);
  background: color-mix(in oklch, var(--own-color, var(--text-faint)) 6%, var(--surface));
}
.sched-card.own .own-tag {
  background: var(--own-color, var(--accent));
  color: #fff;
  letter-spacing: 0.06em;
}
.sched-card.own.tank-mode .own-tag {
  background: color-mix(in oklch, var(--text) 6%, transparent);
  color: var(--text-muted);
}
.sched-card .top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sched-card .matchup-row {
  display: flex; flex-direction: column; gap: 6px;
}
.sched-card .team-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.sched-card .team-row.recommended { font-weight: 600; }
.sched-card .team-row.recommended .name { color: var(--text); }
.sched-card .team-row .left {
  display: flex; align-items: center; gap: 10px;
}
.sched-card .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sched-card .dot.muted { background: color-mix(in oklch, var(--text) 8%, transparent); border: 1px dashed var(--border-strong); }
.sched-card .abbr {
  font-family: var(--font-data);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0;
  min-width: 32px;
}
.sched-card .name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 15px;
}
.sched-card .rec {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  color: var(--accent-ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.sched-card .rec-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-soft); color: var(--accent-ink);
  padding: 1px 6px; border-radius: 4px;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sched-card .own-tag {
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  color: var(--accent-ink);
}
.sched-card .record {
  font-family: var(--font-data);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.sched-card .footer {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.9;
}

/* ── Onboarding ─────────────────────────────────────────────────────────── */
.onb-shell {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 100;
  overflow-y: auto;
  animation: fade 0.4s ease both;
}
.onb-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.onb-eyebrow {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.onb-title {
  font-family: var(--font-heading);
  font-size: clamp(30px, 8vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.05;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.onb-sub {
  font-family: var(--font-data);
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 0 40px;
  max-width: 52ch;
  line-height: 1.6;
  animation: rise 0.6s 0.05s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
/* ── Onboarding: header (wordmark + per-sport progress rows) ────────────── */
.onb-header {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 18px;
  margin-bottom: 36px;
}
.onb-wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.onb-sport-rows {
  display: flex; flex-direction: column;
  gap: 8px;
  width: 100%;
}
.onb-sport-row {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.onb-sport-row.active {
  background: color-mix(in oklch, var(--accent-soft) 60%, transparent);
}
.onb-sport-logo {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--text-faint);
  transition: color 0.15s ease, background 0.15s ease;
}
.onb-sport-logo:hover { color: var(--text-muted); background: var(--bg-soft); }
.onb-sport-row.active .onb-sport-logo { color: var(--accent); }
.onb-slots {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px;
}
.onb-slot {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-family: var(--font-data);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: white;
  box-shadow: 0 0 0 2px transparent;
}
.onb-slot.favorite {
  box-shadow: 0 0 0 2px var(--accent);
}
.onb-slot.rival {
  box-shadow: 0 0 0 2px var(--warn);
}
.onb-slot-badge {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px;
  font-weight: 900;
  border: 2px solid var(--bg);
}
.onb-slot.favorite .onb-slot-badge {
  background: var(--accent);
  color: white;
}
.onb-slot.rival .onb-slot-badge {
  background: var(--warn);
  color: white;
}
.onb-slot-empty {
  padding: 0;
  background: color-mix(in oklch, var(--text) 8%, transparent);
  border: 1px dashed var(--border-strong);
  color: var(--text-faint);
  font-weight: 600;
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}
.onb-loading {
  max-width: 360px;
  padding: 40px 0;
}
.onb-loading p {
  margin-top: 14px;
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--text-muted);
}
/* ── Onboarding: final sport-select screen ───────────────────────────────── */
.onb-done { padding-top: 8px; }
.onb-sport-pick-row {
  display: flex; flex-wrap: wrap;
  gap: 16px;
  animation: rise 0.6s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.onb-sport-pick {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  width: 140px;
  padding: 28px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.2s ease, border-color 0.2s ease;
}
.onb-sport-pick:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px oklch(0 0 0 / 0.07), 0 2px 6px oklch(0 0 0 / 0.04);
}
.onb-sport-pick span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.div-section {
  margin-bottom: 22px;
}
.div-section h4 {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.team-grid {
  display: grid;
  /* Default 4-across; onboarding sets an inline column count per division so a
     5-team MLB division still lands on a single row. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
/* Let the label column shrink inside its tile so 5-across stays on one row. */
.team-tile .meta { min-width: 0; }
.team-tile .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-tile {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: inherit;
  color: inherit;
  text-align: left;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.18s ease,
              box-shadow 0.18s ease,
              background 0.18s ease;
  position: relative;
  animation: riseSm 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
.team-tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px color-mix(in oklch, var(--accent) 10%, transparent);
}
.team-tile:disabled {
  background: var(--bg-soft) !important;
  border-color: var(--border) !important;
  opacity: 0.55;
  filter: grayscale(1);
  cursor: default !important;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none;
}
.team-tile.selected {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent-soft) 50%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent),
              0 12px 30px color-mix(in oklch, var(--accent) 14%, transparent);
  transform: translateY(-2px);
}
.team-tile.disliked {
  border-color: var(--warn);
  background: color-mix(in oklch, oklch(0.95 0.04 35) 50%, var(--surface));
}
[data-theme="dark"] .team-tile.disliked {
  background: color-mix(in oklch, oklch(0.30 0.06 35) 40%, var(--surface));
}
.team-tile .swatch {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.team-tile .name {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
}
.team-tile .abbr {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.team-tile .abbr .record {
  margin-left: 6px;
}
.team-tile .check {
  position: absolute; top: 6px; right: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: grid; place-items: center;
  font-size: 8px;
}

.onb-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 32px;
}
.onb-actions .helper { font-size: 13px; color: var(--text-muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text);
  color: var(--bg);
  border: 0;
  border-radius: 10px;
  padding: 11px 20px;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  transition: all 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost:hover { border-color: var(--border-strong); }
.btn.primary {
  background: var(--accent);
  color: white;
}

/* ── Filter row ──────────────────────────────────────────── */
.filter-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  animation: rise 0.5s 0.05s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-chip:hover { color: var(--text); border-color: var(--border-strong); }
.filter-chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter-chip .count {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 11px;
  opacity: 0.7;
}

/* ── Game detail overlay ────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: color-mix(in oklch, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  z-index: 80;
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.detail .close {
  position: absolute;
  top: 18px; right: 18px;
  background: none; border: 0;
  color: var(--text-muted);
  font-size: 22px;
  padding: 4px 8px;
  border-radius: 6px;
}
.detail .close:hover { color: var(--text); background: var(--surface-2); }
.detail-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 26px;
}
.detail-head h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 6px 0 0;
}
.detail .matchup-large {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 24px 0;
  border-block: 1px solid var(--border);
  margin-bottom: 22px;
}
.detail .matchup-large .side {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.detail .matchup-large .badge {
  width: 84px; height: 84px;
  border-radius: 50%;
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-data);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  letter-spacing: 0;
}
.detail .matchup-large .badge.against {
  background: color-mix(in oklch, var(--text) 8%, transparent) !important;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
}
.detail .matchup-large .label-pill {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.detail .matchup-large .label-pill.root { background: var(--accent-soft); color: var(--accent-ink); }
.detail .matchup-large .label-pill.against { background: color-mix(in oklch, var(--text) 6%, transparent); color: var(--text-muted); }
.detail .matchup-large .city { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.detail .matchup-large .record { font-family: var(--font-data); font-weight: 500; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; }
.detail .matchup-large .vs { font-family: var(--font-data); font-weight: 500; color: var(--text-faint); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding-bottom: 22px; }

.detail .reasons {
  display: grid;
  gap: 10px;
}
.detail .reason {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 10px;
}
.detail .reason .num {
  font-family: var(--font-data);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
  margin-top: 1px;
}
.detail .reason .text {
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.detail .scoremeter {
  margin-top: 24px;
}
.detail .scoremeter .row {
  display: flex; justify-content: space-between;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.detail .scoremeter .row .v { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 700; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ── Team dropdown ──────────────────────────────────────────────────────── */
.team-menu {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 320px;
  max-height: 480px;
  overflow-y: auto;
  padding: 8px;
  z-index: 50;
}
.team-menu h5 {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 12px 8px 6px;
}
.team-menu h5:first-child { margin-top: 4px; }
.team-menu .item {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border: 0; background: transparent;
  border-radius: 6px;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-family: inherit;
}
.team-menu .item:hover { background: var(--surface-2); }
.team-menu .item .swatch { width: 10px; height: 10px; border-radius: 50%; }
.team-menu .item .ab { font-family: var(--font-data); font-weight: 700; font-size: 11px; color: var(--text-faint); margin-left: auto; letter-spacing: 0.04em; }
.team-menu .item.current { background: var(--surface-2); font-weight: 600; }
.team-menu::-webkit-scrollbar { width: 5px; }
.team-menu::-webkit-scrollbar-track { background: transparent; }
.team-menu::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.team-menu::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

.position-rel { position: relative; }

/* ── Auth screen ────────────────────────────────────────────────────────── */
.auth-shell {
  position: fixed; inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg);
  overflow: hidden;
  animation: fade 0.45s ease both;
}
@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
.auth-side {
  position: relative;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 32px 56px 32px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.auth-side::before {
  content: "";
  position: absolute;
  right: -180px; top: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 22%, transparent), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-side::after {
  content: "";
  position: absolute;
  left: -120px; bottom: -160px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 12%, transparent), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 22px;
  color: var(--text);
  position: relative; z-index: 1;
}
.auth-brand .brand-word { text-transform: none; }
.auth-brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  display: grid; place-items: center;
}
.auth-pitch {
  margin: auto 0;
  position: relative; z-index: 1;
  max-width: 460px;
}
.auth-pitch-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 18px 0 18px;
}
.auth-pitch-sub {
  font-family: var(--font-data);
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 44ch;
}
.auth-bullets {
  list-style: none;
  margin: 0; padding: 0;
  display: grid; gap: 10px;
}
.auth-bullets li {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px;
  color: var(--text);
}
.auth-bullets li .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.auth-foot {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative; z-index: 1;
}

.auth-form-wrap {
  display: grid; place-items: center;
  padding: 32px 24px;
  overflow-y: auto;
}
.auth-form {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow);
  animation: rise 0.55s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.auth-pitch { animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.auth-brand { animation: fade 0.5s both; }
.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
}
.auth-tab {
  position: relative;
  z-index: 1;
  border: 0; background: transparent;
  padding: 8px 12px;
  font-family: var(--font-data);
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.2s ease;
}
.auth-tab.active { color: var(--text); }
.auth-tab-thumb {
  position: absolute;
  top: 4px; bottom: 4px;
  width: calc(50% - 4px);
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: left 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 0;
}
.auth-form-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.auth-form-sub {
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 22px;
  line-height: 1.6;
}
.auth-field {
  display: block;
  margin-bottom: 14px;
}
.auth-field-label {
  display: block;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.auth-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: all 0.15s ease;
}
.auth-input::placeholder { color: var(--text-faint); }
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent);
  background: var(--surface);
}
.auth-input.err {
  border-color: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--warn) 14%, transparent);
}
.auth-hint {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-faint);
}
.auth-hint.err { color: var(--warn); }
.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}
.auth-divider {
  text-align: center;
  margin: 18px 0;
  position: relative;
  color: var(--text-faint);
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  position: absolute;
  top: 50%; height: 1px;
  width: calc(50% - 26px);
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-demo {
  width: 100%;
  justify-content: center;
}
.auth-fineprint {
  font-family: var(--font-data);
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  margin: 18px 0 0;
  line-height: 1.6;
  opacity: 0.9;
}

/* ── User menu in nav ───────────────────────────────────────────────────── */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-data);
  font-size: 13px; font-weight: 500;
  color: var(--text);
  transition: all 0.15s ease;
}
.user-chip:hover { border-color: var(--border-strong); }
.user-chip .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
}
.user-chip .caret { color: var(--text-faint); font-size: 10px; margin-left: 2px; }
.user-menu {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 240px;
  padding: 12px;
  z-index: 50;
}
.user-menu .who {
  padding: 4px 6px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.user-menu .who .name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.user-menu .who .email { font-family: var(--font-data); font-size: 12px; color: var(--text-muted); }
.user-menu .item {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px;
  border: 0; background: transparent;
  border-radius: 6px;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-family: inherit;
}
.user-menu .item:hover { background: var(--surface-2); }
/* ── Page-level utilities ───────────────────────────────────────────────── */

/* Mode selector */
.mode-bar {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
  animation: rise 0.5s 0.05s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.mode-bar-label {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  flex-shrink: 0;
}
.mode-pills {
  display: flex; gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  flex-wrap: wrap;
}
.mode-pill {
  border: 0; background: transparent;
  color: var(--text-muted);
  padding: 7px 14px;
  font-family: var(--font-data);
  font-size: 13px; font-weight: 500;
  border-radius: 999px;
  letter-spacing: 0;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}
.mode-pill:hover:not(.disabled):not(.active) { color: var(--text); }
.mode-pill.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--accent) inset;
}
.mode-pill.disabled {
  opacity: 0.35;
  cursor: default;
}
.mode-pill:disabled { cursor: default; }

/* Native dropdown equivalent of the goal pills — hidden on desktop, swapped
   in for the pills at the mobile breakpoint (see the responsive section). */
.mode-select {
  display: none;
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 34px 9px 14px;
  appearance: none;
  -webkit-appearance: none;
  /* chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.mode-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── YOUR GAME ────────────────────────────────────────────────────────── */
.your-game {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 22px;
  position: relative;
  animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.your-game.clickable {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.2s ease,
              box-shadow 0.25s ease;
}
.your-game.clickable:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 30px oklch(0 0 0 / 0.08),
              0 2px 6px oklch(0 0 0 / 0.04);
}
.your-game.clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.your-game-stripe { width: 6px; flex-shrink: 0; }
.your-game-inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  padding: 22px 26px;
  align-items: center;
}
@media (max-width: 880px) {
  .your-game-inner { grid-template-columns: 1fr; }
}
.your-game-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 1.6s infinite;
}
.your-game-title {
  font-family: var(--font-heading);
  font-size: clamp(18px, 4vw, 24px); font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  line-height: 1.2;
}
.your-game-blurb {
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  text-wrap: pretty;
  line-height: 1.6;
  max-width: 56ch;
}

.your-game-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}
.yg-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.yg-badge {
  width: 54px; height: 54px;
  border-radius: 50%;
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-data);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  letter-spacing: 0;
}
.yg-badge.against {
  background: color-mix(in oklch, var(--text) 8%, transparent);
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
}
.yg-record { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text); letter-spacing: 0.02em; }
.yg-strength {
  display: flex; align-items: center; gap: 6px;
  width: 100%;
}
.yg-str-track {
  flex: 1; height: 3px;
  background: color-mix(in oklch, var(--text) 8%, transparent);
  border-radius: 999px; overflow: hidden;
}
.yg-str-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  animation: barFill 0.9s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.yg-strength .mono { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-muted); min-width: 18px; text-align: right; }
.yg-label {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex; align-items: center; gap: 6px;
}
.yg-under {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  text-transform: none;
  letter-spacing: 0;
}
.yg-vs {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--font-data);
  color: var(--text-faint);
}
.yg-vs-text { font-weight: 500; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.yg-spread {
  font-family: var(--font-data);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* ── STRENGTH BADGE ───────────────────────────────────────────────────── */
.strength-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0;
  border: 1px solid transparent;
}
.strength-badge.tone-fav     { background: var(--accent-soft); color: var(--accent-ink); }
.strength-badge.tone-neutral { background: color-mix(in oklch, var(--text) 5%, transparent); color: var(--text-muted); }
.strength-badge.tone-warn    { background: color-mix(in oklch, var(--warn) 12%, transparent); color: var(--warn); }
.strength-badge.tone-muted   { background: var(--surface-2); color: var(--text-faint); border-color: var(--border); }
.strength-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
}
.strength-badge .strength-label {
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.strength-badge .strength-sep { opacity: 0.4; }
.strength-badge .strength-category { font-weight: 500; }
.strength-badge.large {
  padding: 5px 12px;
  font-size: 12.5px;
}
.strength-badge.large .dot { width: 7px; height: 7px; }
.strength-badge.large .strength-label { font-size: 11px; }

/* Underdog tag */
.under-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 500;
  background: color-mix(in oklch, oklch(0.68 0.16 195) 14%, transparent);
  color: oklch(0.45 0.14 200);
  border: 1px solid color-mix(in oklch, oklch(0.68 0.16 195) 35%, transparent);
}
[data-theme="dark"] .under-tag {
  background: color-mix(in oklch, oklch(0.68 0.16 195) 18%, transparent);
  color: oklch(0.80 0.14 200);
}
.under-tag svg { flex-shrink: 0; }
.under-tag.small {
  padding: 2px 6px 2px 5px;
  font-size: 10px;
  letter-spacing: 0.02em;
}

/* Hero / card extras */
.hero-badges {
  display: flex; gap: 8px;
  margin: -4px 0 14px;
  flex-wrap: wrap;
}
.hero-reasons {
  list-style: none; margin: 0 0 22px; padding: 0;
  display: grid; gap: 6px;
}
.hero-reasons li {
  position: relative;
  padding-left: 18px;
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  text-wrap: pretty;
}
.hero-reasons li::before {
  content: "";
  position: absolute;
  left: 4px; top: 9px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.rec-card-badges {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.rec-card.no-impact {
  opacity: 0.72;
}
.rec-card.no-impact:hover { opacity: 1; }

.rec-card .vs {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.rec-card .vs .spread {
  font-size: 9.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-muted);
}

/* Detail-overlay tag row */
.detail-tags {
  display: flex; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.detail-strength {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 8px;
  width: 100%;
  max-width: 160px;
}
.detail-strength .lbl {
  grid-column: 1 / -1;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
}
.detail-strength .ds-track {
  flex: 1; height: 3px;
  background: color-mix(in oklch, var(--text) 8%, transparent);
  border-radius: 999px; overflow: hidden;
}
.detail-strength .ds-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.detail-strength .mono { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-muted); min-width: 22px; text-align: right; }

.user-menu .item.danger { color: var(--warn); }

/* ═══════════════════════════════════════════════════════════════════════
   STANDINGS
═══════════════════════════════════════════════════════════════════════ */
/* Playoff picture row — AFC & NFC brackets side by side */
.brackets-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 760px) { .brackets-row { grid-template-columns: 1fr; } }

.conf-block { margin-bottom: 32px; animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--section-delay, 0ms);
}
.conf-title {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 14px;
}
/* 4 division tables in a single horizontal row */
.div-tables-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .div-tables-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .div-tables-row { grid-template-columns: 1fr; } }

/* Compact div-row used inside the 4-col grid.
   - Drops the strength bar and city name to save horizontal space.
   - Removes the 88 px minimum on the seed-cell so You/GB always fit.
   - Only applies when the grid is actually at 4 columns (> 1100 px). */
@media (min-width: 1101px) {
  .div-tables-row .div-row {
    grid-template-columns: 18px 10px minmax(0, 1fr) auto max-content;
    gap: 6px;
    padding: 8px 10px;
  }
  .div-tables-row .div-row .strength-cell { display: none; }
  .div-tables-row .div-row .city { display: none; }
}
/* Legacy 2-col layout kept for any other usages */
.div-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 760px) { .div-tables { grid-template-columns: 1fr; } }
.div-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.div-table-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.div-table-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.div-table-head .mono { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-faint); letter-spacing: 0.06em; }
.div-table-rows { display: flex; flex-direction: column; }
.div-row {
  display: grid;
  grid-template-columns: 20px 12px minmax(0, 1fr) 72px auto max-content;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  animation: riseSm 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
  transition: background 0.15s ease;
}
.div-row:last-child { border-bottom: 0; }
.div-row:hover { background: var(--surface-2); }
.div-row .rank {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-data); font-weight: 700;
  font-variant-numeric: tabular-nums; font-size: 10px;
  color: var(--text-faint); background: transparent;
}
.div-row .rank.rank-div-leader { background: var(--accent-soft); color: var(--accent-ink); }
.div-row .rank.rank-wc { background: oklch(0.92 0.07 305); color: oklch(0.40 0.20 305); }
[data-theme="dark"] .div-row .rank.rank-wc { background: oklch(0.30 0.09 305); color: oklch(0.80 0.14 305); }
.div-row .rank.rank-first-out { color: var(--warn); background: transparent; border: 1.5px dashed color-mix(in oklch, var(--warn) 55%, transparent); }
.div-row .swatch { width: 8px; height: 8px; border-radius: 50%; }
.div-row .name { display: flex; gap: 4px; align-items: baseline; }
.div-row .city { font-family: var(--font-data); color: var(--text-muted); font-size: 12px; }
.div-row .team-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.div-row .record { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
.div-row .pct { font-family: var(--font-data); font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 11px; }
.div-row .strength-cell {
  display: flex; align-items: center; gap: 6px;
}
.div-row .strength-cell .strength-track {
  flex: 1; height: 3px;
  background: color-mix(in oklch, var(--text) 8%, transparent);
  border-radius: 999px; overflow: hidden;
}
.div-row .strength-cell .strength-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.div-row .strength-cell .mono { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-muted); min-width: 20px; text-align: right; }
.div-row .name { display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.tb-tag {
  display: inline-flex; align-items: center; gap: 3px;
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  color: var(--accent-ink);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: help;
  margin-left: 4px;
}
.tb-tag svg { opacity: 0.7; }

/* Tiebreaker panel */
.tb-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  animation: rise 0.55s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.tb-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.tb-row {
  display: grid;
  grid-template-columns: 10px auto 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 7px 4px;
  font-size: 12px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.tb-row:hover { background: var(--surface-2); }
.tb-swatch { width: 8px; height: 8px; border-radius: 50%; align-self: center; }
.tb-team { display: flex; gap: 6px; align-items: baseline; }
.tb-team .ab { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12px; letter-spacing: 0.04em; }
.tb-team .tb-over { font-family: var(--font-data); color: var(--text-muted); font-size: 11px; }
.tb-reason { font-family: var(--font-data); color: var(--text-muted); font-size: 12px; text-align: right; text-wrap: pretty; line-height: 1.5; }
.tb-foot {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 8px;
  line-height: 1.5;
  text-transform: uppercase;
}
.tb-procs { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .tb-procs { grid-template-columns: 1fr; } }
.tb-proc-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.tb-proc-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.tb-proc-tag {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.tb-proc-tag.div { background: var(--accent-soft); color: var(--accent-ink); }
.tb-proc-tag.wc  { background: oklch(0.92 0.07 305); color: oklch(0.40 0.20 305); }
[data-theme="dark"] .tb-proc-tag.wc { background: oklch(0.30 0.09 305); color: oklch(0.80 0.14 305); }
.tb-proc-title {
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.02em;
}
.tb-proc-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
  counter-reset: tbstep;
}
.tb-proc-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  font-family: var(--font-data);
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  counter-increment: tbstep;
}
.tb-proc-list li::before {
  content: counter(tbstep);
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 10px;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  height: 18px;
  display: inline-grid; place-items: center;
}
.tb-proc-list li.lead { color: var(--text); font-weight: 500; }
.div-row .seed-cell {
  display: flex; align-items: center; gap: 6px;
  justify-content: flex-end;
}
.div-row.is-fav {
  background: color-mix(in oklch, var(--accent-soft) 50%, var(--surface));
  position: relative;
}
.div-row.is-fav::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
}
.div-row .you-tag {
  background: var(--accent-soft); color: var(--accent-ink);
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 2px 6px; border-radius: 4px;
  white-space: nowrap;
}
.div-row .gb { font-family: var(--font-data); font-variant-numeric: tabular-nums; color: var(--text-faint); font-size: 11px; white-space: nowrap; }

/* Elimination marker shown next to team name when a team is mathematically out */
.elim-tag {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* Clinch markers (* ** ***) shown next to team names */
.clinch-mark {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-ink);
  letter-spacing: 0.02em;
}

/* Legend shown below division tables */
.clinch-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-faint);
  padding: 6px 2px 12px;
}
.clinch-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.seed-pill {
  display: inline-flex; align-items: center; gap: 4px;
  color: white;
  font-family: var(--font-data);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
}
.seed-pill .seed-kind {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.standings-side { display: flex; flex-direction: column; gap: 16px; }
.bracket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.bracket-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.bracket-head h4 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.bracket-head .mono { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-faint); letter-spacing: 0.06em; }
.bracket-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bracket-row {
  display: grid;
  grid-template-columns: 22px 8px 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 6px;
  font-size: 12.5px;
  transition: background 0.15s ease;
}
.bracket-row:hover { background: var(--surface-2); }
.bracket-seed {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 900;
}
.bracket-row.div-winner .bracket-seed { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in oklch, var(--accent) 45%, var(--border)); }
.bracket-seed.seed-wc { background: oklch(0.92 0.07 305); color: oklch(0.40 0.20 305); border-color: oklch(0.78 0.13 305); }
[data-theme="dark"] .bracket-seed.seed-wc { background: oklch(0.30 0.09 305); color: oklch(0.80 0.14 305); border-color: oklch(0.42 0.12 305); }
.bracket-row.bubble-row .bracket-seed { background: transparent; color: var(--text-faint); border-style: dashed; }
.bracket-row.bubble-row { opacity: 0.78; }
.bracket-row.bubble-row .bracket-record { color: var(--text-faint); font-weight: 600; }
.bracket-row.bubble-row .bracket-kind { color: var(--text-faint); }
.bracket-row.bubble-row .bracket-name { color: var(--text-muted); }
.bracket-row.bubble-row .bracket-name .team-name { font-style: normal; color: var(--text-muted); }
.bracket-row.bubble-row.first-out .bracket-seed { border-color: color-mix(in oklch, var(--warn) 40%, var(--border-strong)); color: var(--warn); }
.bracket-swatch { width: 8px; height: 8px; border-radius: 50%; }
.bracket-swatch.muted { background: color-mix(in oklch, var(--text) 10%, transparent); }
.bracket-name { display: flex; gap: 4px; align-items: baseline; }
.bracket-name .city { font-family: var(--font-data); color: var(--text-muted); font-size: 12px; }
.bracket-name .team-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.bracket-name.muted { color: var(--text-faint); font-style: italic; }
.bracket-record { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-muted); }
.bracket-kind {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.bracket-kind.is-div { color: var(--accent-ink); }
.bracket-row.is-fav {
  background: color-mix(in oklch, var(--accent-soft) 60%, var(--surface));
  outline: 1px solid var(--accent);
}
.bracket-divider {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px;
}
.bracket-divider .line { flex: 1; height: 1px; background: var(--border); }
.bracket-divider .cutoff {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bubble-row { opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════════════════
   SCENARIOS
═══════════════════════════════════════════════════════════════════════ */
.scn-section { margin-bottom: 28px; animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scn-section-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.scn-section-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.scn-section-dot.good    { background: var(--accent); }
.scn-section-dot.neutral { background: oklch(0.66 0.05 240); }
.scn-section-dot.danger  { background: var(--warn); }
.scn-section-count { font-family: var(--font-data); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-faint); margin-left: 4px; font-size: 11px; }
.scn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}
.scn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  position: relative;
  overflow: hidden;
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
.scn-card::before {
  content: "";
  position: absolute;
  right: -80px; top: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.55;
}
.scn-card.tone-good::before    { background: radial-gradient(circle, color-mix(in oklch, var(--accent) 20%, transparent), transparent 60%); }
.scn-card.tone-neutral::before { background: radial-gradient(circle, color-mix(in oklch, oklch(0.66 0.05 240) 22%, transparent), transparent 60%); }
.scn-card.tone-danger::before  { background: radial-gradient(circle, color-mix(in oklch, var(--warn) 20%, transparent), transparent 60%); }
.scn-card > * { position: relative; }
.scn-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 18px;
}
.scn-kind {
  display: inline-flex; align-items: center;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.tag-good    { background: var(--accent-soft); color: var(--accent-ink); }
.tag-neutral { background: color-mix(in oklch, oklch(0.66 0.05 240) 14%, transparent); color: oklch(0.40 0.07 240); }
.tag-danger  { background: color-mix(in oklch, var(--warn) 14%, transparent); color: var(--warn); }
.scn-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  text-wrap: balance;
  line-height: 1.25;
}
.scn-summary {
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  text-wrap: pretty;
}
.scn-likelihood { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.scn-urgency {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.lk-ring-num { font-family: var(--font-data); font-weight: 900; font-variant-numeric: tabular-nums; }
.scn-divider {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 6px 0 12px;
}
.scn-divider .line { flex: 1; height: 1px; background: var(--border); }
.scn-reqs {
  display: flex; flex-direction: column;
  gap: 8px;
}
.req-row {
  display: grid;
  grid-template-columns: 28px 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  animation: riseSm 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
.req-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 900;
  color: white;
}
.req-icon.win  { background: var(--accent); }
.req-icon.loss { background: var(--warn); }
.req-team { display: flex; align-items: center; gap: 8px; }
.req-team .dot { width: 8px; height: 8px; border-radius: 50%; }
.req-team-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text); }
.req-rationale { font-family: var(--font-data); font-size: 13px; color: var(--text-muted); line-height: 1.5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.req-rationale .req-rationale-text { flex: 1; min-width: 0; }
.req-week {
  display: inline-flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 4px;
  font-family: var(--font-data);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.req-week.any { color: var(--text-faint); font-weight: 500; font-style: italic; }

/* ═══════════════════════════════════════════════════════════════════════
   HISTORY
═══════════════════════════════════════════════════════════════════════ */
.history-tally {
  display: flex; gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  animation: rise 0.55s 0.05s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.tally-stat .k {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.tally-stat .v {
  font-family: var(--font-data);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
}

.past-week {
  margin-bottom: 28px;
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
.past-week-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.past-week-title {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 700;
  letter-spacing: -0.01em;
  margin: 4px 0 0;
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
  line-height: 1.2;
}
.past-week-delta {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.past-week-meter { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.past-week-meter .meter-track {
  flex: 1; height: 6px;
  background: color-mix(in oklch, var(--text) 8%, transparent);
  border-radius: 999px; overflow: hidden;
}
.past-week-meter .meter-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  animation: barFill 1s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.past-week-meter .meter-num { font-family: var(--font-data); font-variant-numeric: tabular-nums; font-weight: 900; font-size: 14px; min-width: 38px; text-align: right; }

.past-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.past-table-head, .past-row {
  display: grid;
  grid-template-columns: 40px 1.8fr 2fr 80px 100px;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}
.past-table-head {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.past-list { list-style: none; margin: 0; padding: 0; }
.past-row {
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  transition: background 0.15s ease;
  animation: riseSm 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
.past-row:last-child { border-bottom: 0; }
.past-row:hover { background: var(--surface-2); }
.past-num { font-family: var(--font-data); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-faint); font-size: 11px; }
.past-matchup {
  display: flex; align-items: center; gap: 10px;
}
.past-side { display: flex; align-items: center; gap: 6px; }
.past-side .dot { width: 8px; height: 8px; border-radius: 50%; }
.past-side .dot.muted { background: color-mix(in oklch, var(--text) 12%, transparent); }
.past-side .ab { font-family: var(--font-data); font-weight: 900; font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: 0.02em; }
.past-side .city { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--text-muted); }
.past-side.muted .ab, .past-side.muted .city { color: var(--text-muted); }
.past-matchup .vs { font-family: var(--font-data); font-weight: 500; font-size: 10px; color: var(--text-faint); letter-spacing: 0.12em; text-transform: uppercase; }
.past-reason { font-family: var(--font-data); color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.past-final { font-family: var(--font-data); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; }
.past-result { justify-self: end; }

.result-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.result-pill .dot { width: 5px; height: 5px; border-radius: 50%; }
.result-pill.hit  { background: var(--accent-soft); color: var(--accent-ink); }
.result-pill.hit  .dot { background: var(--accent); }
.result-pill.miss { background: color-mix(in oklch, var(--text) 6%, transparent); color: var(--text-muted); }
.result-pill.miss .dot { background: var(--text-faint); }


/* ── Boot screen (data loading) ────────────────────────────────────────── */
.w2r4-boot {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: var(--bg);
  z-index: 9999;
}
.w2r4-boot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px 32px;
  max-width: 460px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.w2r4-boot-card.error { border-color: color-mix(in oklch, var(--warn) 40%, var(--border)); }
.w2r4-boot-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 auto 18px;
  box-shadow: 0 8px 24px color-mix(in oklch, var(--accent) 30%, transparent);
}
.w2r4-boot-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 6px;
}
.w2r4-boot-sub {
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.w2r4-boot-sub code,
.w2r4-boot-help code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.w2r4-boot-help {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.w2r4-boot-retry {
  margin-top: 16px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.w2r4-boot-retry:hover { filter: brightness(1.05); }
.w2r4-boot-bar {
  margin-top: 22px;
  height: 3px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.w2r4-boot-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  animation: w2r4-boot-slide 1.4s ease-in-out infinite;
}
@keyframes w2r4-boot-slide {
  0%   { left: -40%; }
  100% { left: 105%; }
}

/* ── Data-source footer ────────────────────────────────────────────────── */
.w2r4-source-footer {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  padding: 24px 16px 32px;
  letter-spacing: 0.02em;
}
.w2r4-source-footer a { color: var(--text-muted); text-decoration: none; border-bottom: 1px dotted var(--border-strong); }
.w2r4-source-footer a:hover { color: var(--text); }
.w2r4-source-footer code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

/* ── Schedule completed-game treatment ─────────────────────────────────── */
.sched-card.completed { opacity: 0.85; }
.sched-card .final-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sched-card .score {
  font-family: var(--font-data);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: var(--text);
  margin-left: auto;
}
.sched-card .score.loser { color: var(--text-faint); font-weight: 500; }


/* ── Auth: Dev mode (sim-week picker) ──────────────────────────────────── */
.auth-dev {
  margin-top: 18px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}
.auth-dev-btn {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
}
.auth-dev-btn:hover { color: var(--text); border-color: var(--text-faint); }
.auth-dev-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-faint);
}
.auth-dev-dot[data-on="true"] { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 25%, transparent); }
.auth-dev-pill {
  margin-left: auto;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.auth-dev-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
}
.auth-dev-help {
  font-family: var(--font-data);
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
.auth-dev-help code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
}
.auth-dev-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
}

/* ── Print view ─────────────────────────────────────────────────────────── */
.pv-overlay {
  position: fixed; inset: 0;
  background: color-mix(in oklch, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  z-index: 90;
  display: grid; place-items: start center;
  padding: 24px;
  overflow-y: auto;
  animation: fadeIn 0.18s ease;
}
.pv-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 860px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}
.pv-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  gap: 12px;
}
.pv-meta { font-family: var(--font-data); font-size: 13px; color: var(--text-muted); }
.pv-print-head { padding: 16px 20px 0; display: none; }
.pv-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-data); font-size: 13px;
}
.pv-table thead th {
  padding: 9px 12px;
  text-align: left;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.pv-table tbody tr:hover { background: var(--surface-2); }
.pv-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pv-slot-row td {
  padding: 6px 12px 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.pv-own td { background: color-mix(in oklch, var(--accent) 6%, transparent); }
.pv-miss td { color: var(--text-muted); }
.pv-at { color: var(--text-faint); }
.pv-root { font-weight: 700; color: var(--accent-ink); }
.pv-you { font-family: var(--font-data); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; background: var(--accent-soft); color: var(--accent-ink); padding: 2px 6px; border-radius: 4px; }
.pv-dash { color: var(--text-faint); }
.pv-time { color: var(--text-muted); white-space: nowrap; }
.pv-reason { color: var(--text-muted); font-size: 12px; max-width: 300px; }

/* Print — show only the pv-sheet content, no chrome */
@media print {
  .no-print { display: none !important; }
  body > *:not(.pv-overlay) { display: none !important; }
  .pv-overlay {
    position: static !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    display: block !important;
  }
  .pv-sheet {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
  }
  .pv-print-head { display: block !important; }
  .pv-table { font-size: 11px; }
  .pv-table td, .pv-table th { padding: 4px 8px; }
  .pv-own td { background: #f5f5f5 !important; -webkit-print-color-adjust: exact; }
  .pv-root { color: #000 !important; }
}

/* ── Simulate Results panel ─────────────────────────────────────────────── */
.sim-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  overflow: hidden;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.sim-meta {
  display: block;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sim-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
@media (max-width: 720px) {
  .sim-body { grid-template-columns: 1fr; }
}

.sim-section-label {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 20px 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Game picker ── */
.sim-games {
  border-right: 1px solid var(--border);
}
.sim-empty {
  padding: 20px;
  font-size: 13px;
  color: var(--text-faint);
}
.sim-game {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.sim-game:last-child { border-bottom: none; }

.sim-team-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--text);
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
  text-align: left;
}
.sim-team-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.sim-team-btn.sim-picked {
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 600;
  color: var(--accent-ink);
}
.sim-team-btn.sim-lost {
  opacity: 0.38;
}

.sim-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sim-abbr {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.sim-rec {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}
.sim-team-btn.sim-picked .sim-rec { color: var(--accent-ink); }

.sim-at {
  font-size: 11px;
  color: var(--text-faint);
  flex-shrink: 0;
  font-weight: 500;
  width: 14px;
  text-align: center;
}

.sim-tie-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 34px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.sim-tie-btn:hover { background: var(--surface-3, var(--surface-2)); border-color: var(--text-muted); color: var(--text-muted); }
.sim-tie-btn.sim-picked { background: var(--surface-2); border-color: var(--text-muted); color: var(--text); }

.sim-team-btn.sim-tied { opacity: 0.55; }

/* ── Projected standings ── */
.sim-standings {
  min-width: 0;
}
.sim-conf-block {
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--border);
}
.sim-conf-block:last-child { border-bottom: none; }
.sim-conf-title {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 10px 20px 4px;
}
.sim-seed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sim-seed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 20px;
  font-size: 13px;
  border-left: 2px solid transparent;
  transition: background 0.1s;
}
.sim-seed-row.is-fav {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}
.sim-seed-row.div-winner { color: var(--text); }
.sim-seed-row.wc-team   { color: var(--text); }
.sim-seed-row.out-team  { color: var(--text-faint); }

.sim-seed {
  width: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  text-align: right;
}
.sim-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sim-team-name {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  flex: 1;
  min-width: 0;
}
.sim-record {
  font-size: 12px;
  color: var(--text-muted);
}
.sim-win-added {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-ink);
  margin-left: 3px;
  background: var(--accent-soft);
  padding: 0 4px;
  border-radius: 3px;
}
.sim-seed-delta {
  font-size: 11px;
  font-weight: 700;
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}
.sim-seed-delta.moved-up   { color: oklch(0.55 0.18 145); }
.sim-seed-delta.moved-down { color: var(--warn); }
.auth-dev-week {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.auth-dev-week:hover { border-color: var(--accent); color: var(--text); }
.auth-dev-week.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.auth-dev-clear {
  margin-top: 10px;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 0;
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
}
.auth-dev-clear:hover:not(:disabled) { color: var(--text); border-color: var(--text-faint); }
.auth-dev-clear:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Dev-mode banner inside the app ────────────────────────────────────── */
.dev-banner {
  background: color-mix(in oklch, var(--accent) 14%, var(--bg));
  border-bottom: 1px solid color-mix(in oklch, var(--accent) 35%, var(--border));
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  padding: 6px 16px;
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
}
.dev-banner strong { font-weight: 700; }
.dev-banner button {
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--accent-ink) 30%, transparent);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  cursor: pointer;
}
.dev-banner button:hover { background: var(--accent-soft); }
.dev-banner select.dev-banner-week {
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--accent-ink) 30%, transparent);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  cursor: pointer;
}

/* ── Sport switcher (header + onboarding) ──────────────────────────────────
 * Scaffolding for multi-sport support; only the NFL exists today. */
.sport-switch { display: inline-flex; align-items: center; gap: 4px; }
/* Icon-only sport button: gray by default, orange (site accent) when selected.
 * Same treatment in the header and the onboarding sport row. */
.sport-btn {
  display: inline-flex; align-items: center;
  border: 0; background: transparent;
  color: var(--text-faint);
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.sport-btn:hover { color: var(--text-muted); }
.sport-btn.active { color: var(--accent); }

.team-chip.pick-team {
  color: var(--accent-ink);
  border-color: color-mix(in oklch, var(--accent) 40%, transparent);
  gap: 6px;
  padding: 7px 14px;
}
.team-chip.pick-team:hover { background: var(--accent-soft); }

/* ── Onboarding: top action bar ──────────────────────────────────────────── */
.onb-actions.onb-actions-top { margin-top: 0; margin-bottom: 28px; }

/* ── Top Games (team-agnostic) view ────────────────────────────────────── */
.nopref-section { margin-top: 36px; }
.nopref-h {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--text);
}
.nopref-sub {
  font-family: var(--font-data);
  font-size: 13px; color: var(--text-muted);
  margin: 0 0 16px;
}
/* Ranked cards on the Top Games page reuse the rec-card look but aren't
 * clickable and have a balanced (no root-side check badge) matchup. */
.top-game-card { cursor: default; }
.top-game-card:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}
.top-game-card .vs { padding-bottom: 0; }

/* Best-matchups: per-team strength rating bar with % to the right */
.top-game-card .tg-strength { display: flex; flex-direction: column; gap: 8px; }
.top-game-card .tg-str-row { display: flex; align-items: center; gap: 8px; }
.top-game-card .tg-str-abbr {
  font-family: var(--font-data);
  font-weight: 700; font-size: 11px; letter-spacing: 0.02em;
  min-width: 34px;
}
.top-game-card .tg-str-row .strength-track {
  flex: 1; height: 4px;
  background: color-mix(in oklch, var(--text) 8%, transparent);
  border-radius: 999px; overflow: hidden;
}
.top-game-card .tg-str-row .strength-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.top-game-card .tg-str-pct {
  font-family: var(--font-data);
  font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: 11px; color: var(--text-muted);
  min-width: 32px; text-align: right;
}

/* Playoff-implications: bulleted reasons outlining the stakes */
.top-game-card .tg-reasons {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.top-game-card .tg-reasons li {
  position: relative; padding-left: 16px;
  font-family: var(--font-data);
  font-size: 13px; line-height: 1.5;
  color: var(--text-muted);
}
.top-game-card .tg-reasons li::before {
  content: "›";
  position: absolute; left: 3px; top: 0;
  color: var(--accent); font-weight: 700;
}

/* CTA shown on "This Week" when no favorite team is selected. Sits at the top
 * of the page (like every other view); the rest of the page stays blank. */
.pick-team-cta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.pick-team-cta .page-head { margin-bottom: 16px; }
.pick-team-cta .page-head h1 { font-size: 22px; }
.matchup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.matchup-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  animation: riseSm 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
.matchup-card .meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-data);
  font-size: 12px; color: var(--text-muted);
}
.matchup-card .meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-faint);
}
.matchup-card .matchup {
  display: flex; align-items: center; justify-content: space-between;
}
.matchup-card .side {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 1;
}
.matchup-card .badge {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800; font-size: 15px;
  letter-spacing: 0.02em;
}
.matchup-card .side .label {
  font-family: var(--font-data);
  font-size: 12px; color: var(--text-muted);
}
.matchup-card .vs {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: var(--font-data);
  font-size: 11px; font-weight: 600;
  color: var(--text-faint);
  padding: 0 10px;
}
.matchup-card .vs .spread {
  color: var(--text-muted);
  font-size: 12px;
}
.matchup-tag {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  font-family: var(--font-data);
  font-size: 12px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.matchup-tag.good { background: var(--accent-soft); color: var(--accent-ink); }
.matchup-tag.warn {
  background: color-mix(in oklch, var(--warn) 16%, transparent);
  color: var(--warn);
}

.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--accent-ink);
  font: inherit; font-weight: 600;
  cursor: pointer;
}

/* ── Team Summaries ────────────────────────────────────────────────────── */
.ts-shell {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 100;
  overflow-y: auto;
  animation: fade 0.4s ease both;
}
.ts-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}
.ts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.ts-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-data);
  font-size: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.ts-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ts-card.rival { border-color: color-mix(in oklch, var(--warn) 35%, var(--border)); }
.ts-card-head {
  display: flex; align-items: center; gap: 12px;
}
.ts-swatch {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-data);
  font-weight: 900;
  font-size: 12px;
}
.ts-card-title { min-width: 0; flex: 1; }
.ts-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ts-sub {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 2px;
}
.ts-record { margin-left: 4px; color: var(--text-muted); }
.ts-streak {
  flex-shrink: 0;
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--text) 8%, transparent);
  color: var(--text-muted);
}
.ts-streak.win { background: var(--accent-soft); color: var(--accent-ink); }
.ts-streak.loss { background: color-mix(in oklch, var(--warn) 16%, transparent); color: var(--warn); }
.ts-stat-row {
  display: flex; flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ts-stat {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; min-width: 90px;
}
.ts-stat-label {
  font-family: var(--font-data);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-faint);
}
.ts-stat-value {
  font-family: var(--font-data);
  font-size: 13px; font-weight: 700;
  color: var(--text);
}
.ts-stat-unit {
  font-weight: 500;
  color: var(--text-faint);
  font-size: 11px;
}
.ts-last, .ts-series {
  font-family: var(--font-data);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.ts-series { color: var(--accent-ink); font-weight: 600; }
.ts-card.rival .ts-series { color: var(--warn); }
.link-btn:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — tablet, phone, small phone, landscape
═══════════════════════════════════════════════════════════════════════ */

/* ── Tablet (~880px and down): tighter shell, hero stacks, compact nav ── */
@media (max-width: 880px) {
  .main { padding: 24px 20px 64px; }
  .hero-rec {
    grid-template-columns: 1fr;
    padding: 24px 24px 22px;
  }
  .hero-rec .visual { height: 150px; margin-top: 4px; }
  .hero-rec .visual .badge-big.root { left: 10px; top: 18px; }
  .hero-rec .visual .badge-big.against { right: 10px; }

  /* Top nav: brand + account controls on row 1, a scrollable tab strip on
     row 2 — the 3-column desktop layout runs out of room for tab labels
     once the team chip and account chip are both showing, well before
     phone widths (the middle "auto" column and the two flexible side
     columns collide first on tablets). */
  .topnav {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand right" "nav nav";
    row-gap: 10px;
    padding: 10px 16px;
  }
  .topnav .brand { grid-area: brand; font-size: 16px; gap: 6px; }
  .topnav .brand-mark { width: 24px; height: 24px; font-size: 12px; border-radius: 6px; }
  .topnav .right { grid-area: right; gap: 6px; }
  /* Stack the sport switcher (football/baseball) *under* the page tabs rather
     than beside them — there isn't room for both on one row on a phone. */
  .topnav .nav-wrap {
    grid-area: nav;
    width: 100%;
    justify-self: stretch;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  /* Tabs get their own horizontal scroll if the four labels don't all fit. */
  .topnav .tabs {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topnav .tabs::-webkit-scrollbar { display: none; }
  .topnav .tab { padding: 6px 11px; font-size: 12.5px; }

  /* Compact chips: keep the colored pill / avatar (still identifies the
     team or account) and drop the label so brand + right side both fit. */
  .team-chip:not(.pick-team) > span:nth-of-type(2),
  .user-chip > span:nth-of-type(2) { display: none; }
  .team-chip, .user-chip { padding-right: 8px; }

  /* Right-anchor the chip dropdowns to the header's right edge (the viewport),
     not to the chip itself. The chips sit mid-row, so a menu anchored to a
     chip's right edge overflows off the left of the screen. Anchoring to
     .right (which ends at the header's right padding) keeps them on-screen. */
  .topnav .right { position: relative; }
  .topnav .position-rel { position: static; }
  .team-menu, .user-menu { right: 0; left: auto; max-width: calc(100vw - 28px); }

  /* Login screen fixes. The marketing side-panel's base rule (`display:flex`)
     is declared *after* the earlier `@media(max-width:880px){display:none}`,
     so source order was re-showing it on mobile — hence the stacked, cut-off
     look. Re-hide it here (after the base rule) so it actually stays hidden. */
  .auth-side { display: none; }
  /* With only the form left, its wrapper centers content, which pushes the top
     of a tall sign-up form above the scroll origin (unreachable). Pin it to the
     top and let the shell scroll. */
  .auth-shell { overflow-y: auto; }
  .auth-form-wrap { align-items: start; }
}

/* ── Phone (≤640px): the main mobile layer ─────────────────────────────── */
@media (max-width: 640px) {
  .main { padding: 18px 14px 56px; }
  .onb-inner { padding: 32px 18px 56px; }
  .ts-inner { padding: 28px 16px 64px; }
  .topnav { padding: 10px 14px; }

  /* Hero badges are sized for a 320px-tall visual — on a narrow phone the
     two circles overlap, so shrink and tuck them in further. */
  .hero-rec .visual { height: 120px; }
  .hero-rec .visual .badge-big.root { width: 96px; height: 96px; font-size: 26px; left: 4px; top: 12px; }
  .hero-rec .visual .badge-big.against { width: 80px; height: 80px; font-size: 20px; right: 4px; top: 30px; }

  /* Page headers: stack the title block above any action button instead of
     squeezing both onto one row. */
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head > .btn { width: 100%; justify-content: center; }

  /* Goal selector: the pill row doesn't fit on a phone — swap it for the
     native dropdown (rendered alongside the pills in ModeSelector). */
  .mode-bar { gap: 10px; }
  .mode-pills { display: none; }
  .mode-select { display: block; }

  /* Card grids: one column reads better than squeezed columns on a phone. */
  .rec-grid, .sched-grid, .matchup-grid, .scn-grid, .ts-grid {
    grid-template-columns: 1fr;
  }

  /* Standings rows: same compact treatment already used for the desktop
     4-across layout — drop the strength bar and city name. */
  .div-row {
    grid-template-columns: 16px 10px minmax(0, 1fr) auto max-content;
    gap: 6px;
    padding: 9px 10px;
  }
  .div-row .strength-cell, .div-row .city { display: none; }

  .req-row { grid-template-columns: 22px 1fr; row-gap: 6px; }
  .req-rationale { grid-column: 1 / -1; }
  .tb-row { grid-template-columns: 10px 1fr; row-gap: 4px; }
  .tb-reason { grid-column: 1 / -1; text-align: left; }

  .onb-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .onb-actions > div { flex-wrap: wrap; }
  .onb-actions .btn { flex: 1 1 auto; justify-content: center; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .onb-sport-pick-row { justify-content: center; }
  .onb-sport-pick { flex: 1 1 130px; }

  .overlay { padding: 12px; }
  .detail { padding: 22px; }
  .detail .matchup-large { gap: 10px; padding: 18px 0; }
  .detail .matchup-large .badge { width: 64px; height: 64px; font-size: 20px; }

  .auth-form-wrap { padding: 20px 14px; }
  .auth-form { padding: 22px 20px 20px; }
}

/* ── Small phone (≤400px): squeeze one notch further ───────────────────── */
@media (max-width: 400px) {
  .team-grid { grid-template-columns: 1fr !important; }
  .topnav .brand .brand-word { font-size: 15px; }
  .rec-card, .sched-card, .scn-card, .ts-card { padding: 16px 14px 14px; }
}

/* ── Short / landscape phones: trim vertical chrome so content is reachable
   without a wall of empty space above it ──────────────────────────────── */
@media (max-height: 480px) and (orientation: landscape) {
  .onb-inner { padding-top: 20px; padding-bottom: 32px; }
  .ts-inner { padding-top: 20px; padding-bottom: 32px; }
  .onb-title { margin-bottom: 8px; }
  .onb-sub { margin-bottom: 20px; }
  .overlay { padding: 10px; place-items: start center; }
  .detail { max-height: 96vh; }
}
