/* Snapline Sports — premium near-black theme, restrained red accent. Ported from the
   redesign reference; cyan removed per design direction. Views: Today
   (dense scoreboard), Accuracy, Ratings, plus the game-detail dialog. */

:root {
  color-scheme: dark;
  --canvas: #07090f;
  --surface: #0d111a;
  --surface-2: #121824;
  --surface-3: #171e2c;
  --ink: #f6f7fb;
  --ink-2: #b5bdcc;
  --ink-3: #7a8498;
  --ink-4: #545e73;
  --line: rgba(162, 176, 210, .13);
  --line-strong: rgba(172, 187, 222, .22);
  --red: #f22f4d;
  --red-hi: #ff647a;
  --red-soft: rgba(242, 47, 77, .13);
  --green: #4fd499;
  --amber: #ffc267;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 22px 60px rgba(0, 0, 0, .32);
  --shell: 1240px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 5% -8%, rgba(242, 47, 77, .15), transparent 28rem),
    radial-gradient(circle at 100% 22%, rgba(120, 134, 168, .06), transparent 30rem),
    linear-gradient(rgba(157, 175, 214, .02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 175, 214, .017) 1px, transparent 1px),
    var(--canvas);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, select, input { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(242, 47, 77, .38);
  outline-offset: 2px;
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -.035em;
}

.shell { width: min(var(--shell), 100%); margin-inline: auto; }
.view[hidden] { display: none !important; }

.eyebrow {
  margin: 0;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  z-index: 80;
  top: 0;
  min-height: calc(64px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 15, .84);
  box-shadow: 0 14px 42px rgba(0, 0, 0, .22);
  backdrop-filter: blur(20px) saturate(125%);
}
.header-inner { display: flex; align-items: center; min-height: 64px; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  overflow: hidden; flex: none;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 11px;
  background: linear-gradient(145deg, #ff667c, var(--red) 52%, #a8112d);
  box-shadow: 0 9px 28px rgba(242, 47, 77, .27), inset 0 1px 0 rgba(255, 255, 255, .26);
  color: #fff;
  /* One glyph now, not two: sized up so the "S" fills the tile the way the
     old two-letter mark did. */
  font: 850 15px/1 var(--mono);
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 2px 5px auto;
  height: 1px; background: rgba(255, 255, 255, .55);
}
.brand-copy { min-width: 0; }
.brand-name { display: block; font: 850 14px/1 var(--mono); letter-spacing: .035em; }
/* Hidden on phones: the header's remaining width goes to the freshness
   badge, which tells the reader something the tagline does not. */
.brand-tagline {
  display: none; margin-top: 4px; color: var(--ink-3);
  font-size: 10px; font-weight: 750; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap;
}

.desktop-nav { display: none; align-self: stretch; margin-left: 16px; }
.nav-action {
  position: relative;
  appearance: none;
  min-width: 76px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-action:hover { color: var(--ink); }
.nav-action[aria-current="page"] { color: var(--ink); }
.desktop-nav .nav-action[aria-current="page"]::after {
  content: "";
  position: absolute; right: 16px; bottom: 0; left: 16px; height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--red), var(--red-hi));
  box-shadow: 0 0 18px rgba(242, 47, 77, .45);
}

.header-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.league-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(14, 19, 30, .88);
}
.league-switch button {
  min-width: 48px; min-height: 42px;
  border: 0; background: transparent;
  color: var(--ink-3); cursor: pointer;
  font: 800 10px/1 var(--mono);
}
.league-switch button + button { border-left: 1px solid var(--line); }
.league-switch button[aria-pressed="true"] {
  background: linear-gradient(140deg, var(--red), #b81635);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .20), 0 0 24px rgba(242, 47, 77, .20);
}

/* Freshness/connection state. Visible at every width — on phones it collapses
   to a dot plus a 3-4 character mono badge that fits the dense header, while
   the full sentence stays in the accessibility tree. */
.update-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 21, 34, .72);
  color: var(--ink-3);
  font: 700 10px/1 var(--mono);
  white-space: nowrap;
}
.update-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--green);
  box-shadow: 0 0 13px rgba(79, 212, 153, .6);
}
.update-short { font-size: 9px; font-weight: 850; letter-spacing: .02em; }
.update-label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.update-pill[data-state="stale"] { border-color: rgba(255, 194, 103, .38); color: var(--amber); }
.update-pill[data-state="stale"] .update-dot { background: var(--amber); box-shadow: 0 0 13px rgba(255, 194, 103, .55); }
.update-pill[data-state="offline"] { border-color: rgba(242, 47, 77, .46); color: var(--red-hi); }
.update-pill[data-state="offline"] .update-dot { background: var(--red); box-shadow: 0 0 13px rgba(242, 47, 77, .6); }
.update-pill[data-state="connecting"] .update-dot { background: var(--ink-4); box-shadow: none; }

/* ── Stream banner (stale / disconnected) ─────────────────────────────── */
.banner-slot { padding: 10px 12px 0; }
.banner-slot[hidden] { display: none; }
.stream-banner {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 194, 103, .34);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(255, 194, 103, .10), rgba(16, 21, 34, .92) 60%);
}
.stream-banner[data-state="offline"] {
  border-color: rgba(242, 47, 77, .42);
  background: linear-gradient(120deg, rgba(242, 47, 77, .12), rgba(16, 21, 34, .92) 60%);
}
.stream-banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(255, 194, 103, .6);
}
.stream-banner[data-state="offline"] .stream-banner-dot { background: var(--red); box-shadow: 0 0 12px rgba(242, 47, 77, .6); }
.stream-banner-copy { min-width: 0; }
.stream-banner-copy strong { display: block; font-size: 11px; }
.stream-banner-copy span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 10px; line-height: 1.45; }
.stream-banner-action {
  min-height: 36px; flex: none; padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(9, 13, 22, .8);
  color: var(--ink-2); cursor: pointer;
  font-size: 11px; font-weight: 800;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.stream-banner-action:hover { border-color: rgba(242, 90, 113, .5); background: var(--red-soft); color: #ffb3bd; }

/* ── Layout scaffolding ───────────────────────────────────────────────── */
.main-shell { padding: 20px 12px calc(90px + env(safe-area-inset-bottom)); }

.page-intro {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 3px 2px 14px;
  padding-left: 14px;
}
.page-intro::before {
  content: "";
  position: absolute; inset: 2px auto 2px 0; width: 3px;
  border-radius: 4px;
  background: linear-gradient(var(--red), rgba(242, 47, 77, .18));
  box-shadow: 0 0 18px rgba(242, 47, 77, .35);
}
.page-intro h1 {
  margin: 5px 0 0;
  background: linear-gradient(110deg, #fff 16%, #f0f2f8 62%, #d7c3c8 120%);
  color: transparent;
  font-size: clamp(27px, 7vw, 40px);
  line-height: .98;
  letter-spacing: -.055em;
  -webkit-background-clip: text;
  background-clip: text;
}
.page-intro p:not(.eyebrow) { max-width: 540px; margin: 9px 0 0; color: var(--ink-2); font-size: 13px; }

/* ── Feed toolbar ─────────────────────────────────────────────────────── */
.feed-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 1px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.feed-toolbar::-webkit-scrollbar { display: none; }
.layout-switch {
  display: grid; grid-template-columns: repeat(2, auto);
  flex: none; overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 17, 27, .86);
}
.layout-switch button {
  min-height: 40px; padding: 0 12px;
  border: 0; background: transparent;
  color: var(--ink-3); cursor: pointer;
  font-size: 11px; font-weight: 850;
}
.layout-switch button + button { border-left: 1px solid var(--line); }
.layout-switch button[aria-pressed="true"] {
  background: var(--red-soft); color: #ffb6c0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.filter-chip {
  min-height: 42px; flex: none; padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 21, 34, .78);
  color: var(--ink-3); cursor: pointer;
  font-size: 11px; font-weight: 800;
}
.filter-chip[aria-pressed="true"] {
  border-color: rgba(255, 99, 121, .52);
  background: var(--red-soft);
  color: #ffb3bd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.game-count { margin-left: auto; color: var(--ink-3); font: 700 10px/1 var(--mono); white-space: nowrap; }

/* ── Day headers ──────────────────────────────────────────────────────── */
.day-head {
  position: sticky;
  z-index: 15;
  top: calc(64px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  margin: 12px 0 7px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 13, 22, .94);
  color: var(--ink-2);
  font: 800 10px/1 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  width: fit-content;
}
.day-head::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px rgba(242, 47, 77, .7); }
.day-head .day-count { color: var(--ink-4); letter-spacing: .02em; text-transform: none; }
.day-group:first-child .day-head { margin-top: 0; }

/* ── Compact scoreboard (mobile cards / desktop table) ────────────────── */
.game-list { display: grid; gap: 10px; }
.compact-table-head { display: none; }
.compact-list { gap: 7px; }
.compact-game {
  position: relative;
  display: grid;
  /* The numbers block wants 168px so the widest realistic fact ("USC −24.5")
     is not ellipsed away; the matchup keeps a 116px floor so team codes stay
     readable at 320px, where the numbers block gives width back instead. */
  grid-template-columns: minmax(116px, 1fr) minmax(146px, 168px) 26px;
  grid-template-rows: 32px 64px;
  overflow: hidden;
  /* The accent outline frames each game as one unit of the board. */
  border: 1px solid rgba(242, 47, 77, .30);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(17, 23, 36, .98), rgba(10, 14, 23, .98));
  box-shadow: 0 10px 26px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .025);
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}
.compact-game::before {
  content: "";
  position: absolute; z-index: 1; inset: 0 auto 0 0; width: 2px;
  background: linear-gradient(var(--red), rgba(242, 47, 77, .12));
  opacity: .58;
}
.compact-game:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 90, 113, .34);
  background: linear-gradient(145deg, rgba(21, 27, 42, .99), rgba(11, 16, 26, .99));
}
.compact-open {
  position: absolute; z-index: 2; inset: 0; width: 100%;
  border: 0; border-radius: inherit; background: transparent; cursor: pointer;
}
.compact-open:focus-visible { outline: 2px solid var(--red-hi); outline-offset: -3px; }
.compact-kickoff {
  grid-column: 1 / -1; grid-row: 1;
  display: flex; align-items: center; min-width: 0; gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font: 780 10px/1 var(--mono);
  white-space: nowrap;
}
.compact-kickoff .compact-status {
  overflow: hidden;
  color: var(--ink-3);
  font: 820 9px/1 var(--sans);
  letter-spacing: .06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
}
.badge-featured {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid rgba(255, 99, 121, .42);
  border-radius: 999px;
  background: var(--red-soft);
  color: #ffb3bd;
  font: 850 8px/1 var(--sans);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.compact-matchup {
  grid-column: 1; grid-row: 2;
  display: grid; align-content: center; min-width: 0; gap: 2px;
  padding: 4px 8px 4px 10px;
}
.compact-team {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center; min-width: 0; gap: 6px; min-height: 28px;
}
.compact-team:not(.likely) { opacity: .68; }
/* Team identity is an abbreviation badge by design — no logos anywhere. */
.team-badge {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(7, 10, 17, .68);
}
.team-abbr { color: var(--ink-2); font: 900 8px/1 var(--mono); }
.compact-team-name { overflow: hidden; font: 860 12px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.compact-mobile-score { font: 900 20px/1 var(--mono); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.compact-at { display: none; }
.compact-score { display: none; }
.compact-facts {
  grid-column: 2; grid-row: 2;
  display: grid; grid-template-columns: repeat(3, 1fr);
  min-width: 0;
  border-left: 1px solid var(--line);
}
.compact-fact {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 0; padding: 4px 1px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.compact-fact:last-child { border-right: 0; }
.compact-fact span { color: var(--ink-3); font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.compact-fact strong {
  display: block; overflow: hidden; max-width: 100%; margin-top: 4px;
  font: 850 10px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis; white-space: nowrap;
}
.compact-desktop-value { display: none; }
.compact-mobile-value, .compact-desktop-value { font-style: normal; }
.compact-chevron {
  z-index: 3;
  grid-column: 3; grid-row: 2;
  display: grid; place-items: center;
  border-left: 1px solid var(--line);
  color: var(--ink-4);
  font-size: 20px;
  pointer-events: none;
}
.compact-game .compact-nogame { grid-column: 1 / -1; }

/* ── Spotlight cards ──────────────────────────────────────────────────── */
.game-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(242, 47, 77, .30);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 23, 36, .98), rgba(10, 14, 23, .98));
  box-shadow: 0 12px 34px rgba(0, 0, 0, .19), inset 0 1px 0 rgba(255, 255, 255, .025);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.game-open-overlay {
  position: absolute; z-index: 2; inset: 0; width: 100%;
  border: 0; border-radius: inherit; background: transparent; cursor: pointer;
}
.game-open-overlay:focus-visible { outline: 2px solid var(--red-hi); outline-offset: -3px; }
.game-card::before {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 2px;
  background: linear-gradient(var(--red), rgba(242, 47, 77, .12));
  opacity: .55;
}
.game-card:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 90, 113, .32);
  background: linear-gradient(145deg, rgba(21, 27, 42, .99), rgba(11, 16, 26, .99));
}
.game-head {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 40px; padding: 9px 12px 7px;
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}
.game-head > div { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.game-time { color: var(--ink-2); font: 750 11px/1 var(--mono); }
.game-status { color: var(--ink-3); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.score-board { display: grid; gap: 8px; padding: 12px; }
.score-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; min-height: 42px;
}
.score-row .team-badge { width: 38px; height: 38px; border-radius: 11px; }
.score-row .team-abbr { font-size: 10px; }
.team-copy { min-width: 0; }
.team-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 14px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.team-copy span { display: block; margin-top: 4px; color: var(--ink-3); font: 700 10px/1 var(--mono); }
.score-value { color: var(--ink); font: 900 28px/1 var(--mono); letter-spacing: -.075em; font-variant-numeric: tabular-nums; }
.score-row.likely .score-value { color: #fff; text-shadow: 0 0 22px rgba(255, 255, 255, .16); }
.score-row:not(.likely) { opacity: .76; }
.prediction-sentence { padding: 0 12px 11px; color: var(--ink-2); font-size: 12px; }
.prediction-sentence strong { color: var(--ink); }
.quick-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.quick-fact { min-width: 0; padding: 10px 7px; border-right: 1px solid var(--line); text-align: center; }
.quick-fact:last-child { border-right: 0; }
.quick-fact span { display: block; color: var(--ink-3); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.quick-fact strong {
  display: block; overflow: hidden; margin-top: 4px; color: var(--ink);
  font: 800 12px/1 var(--mono); font-variant-numeric: tabular-nums;
  text-overflow: ellipsis; white-space: nowrap;
}

/* The model's stated calls — the conclusion row above the raw projections. */
.pick-facts { background: rgba(242, 47, 77, .07); }
.pick-fact span { color: rgba(255, 179, 189, .85); }
.pick-fact strong { font-size: 13px; }

/* ── Shared surfaces / states ─────────────────────────────────────────── */
.surface-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 23, 36, .98), rgba(10, 14, 23, .98));
  box-shadow: 0 14px 38px rgba(0, 0, 0, .18);
}
.card-padding { padding: 16px; }
.empty-state { padding: 40px 20px; text-align: center; }
.empty-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin: 0 auto 13px;
  border-radius: 18px;
  background: var(--red-soft);
  color: var(--red-hi);
  font-size: 23px;
}
.empty-state h2 { margin: 0; font-size: 18px; }
.empty-state p { max-width: 380px; margin: 8px auto 0; color: var(--ink-3); font-size: 12px; }
.retry-button {
  min-height: 44px; margin-top: 14px; padding: 0 18px;
  border: 1px solid rgba(255, 101, 123, .42);
  border-radius: 11px;
  background: linear-gradient(140deg, var(--red), #b91836);
  color: #fff; cursor: pointer;
  font-size: 12px; font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.skeleton-row {
  height: 98px; border: 1px solid var(--line); border-radius: 13px;
  background: linear-gradient(100deg, rgba(17, 23, 36, .9) 40%, rgba(28, 36, 54, .9) 50%, rgba(17, 23, 36, .9) 60%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { to { background-position: -300% 0; } }

/* ── Accuracy view ────────────────────────────────────────────────────── */
.accuracy-hero {
  position: relative; overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(242, 84, 108, .24);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 4% 110%, rgba(242, 47, 77, .22), transparent 42%),
    linear-gradient(145deg, #16131d, #0b1119);
  box-shadow: var(--shadow);
}
.accuracy-hero h2 { max-width: 650px; margin: 8px 0 0; font-size: clamp(26px, 6vw, 44px); line-height: 1; letter-spacing: -.055em; }
.accuracy-hero p:last-child { max-width: 620px; margin: 12px 0 0; color: var(--ink-2); font-size: 12px; }
.accuracy-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(11, 15, 25, .92);
}
.accuracy-stat { min-height: 96px; padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.accuracy-stat:nth-child(2n) { border-right: 0; }
.accuracy-stat:nth-last-child(-n+2) { border-bottom: 0; }
.accuracy-stat span { display: block; color: var(--ink-3); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.accuracy-stat strong { display: block; margin-top: 8px; color: var(--ink); font: 900 24px/1 var(--mono); font-variant-numeric: tabular-nums; }
.accuracy-stat small { display: block; margin-top: 7px; color: var(--ink-3); font-size: 10px; }
.panel-grid { display: grid; gap: 12px; margin-top: 12px; }
.trend-card { padding: 16px; }
.reliability, .movement { width: 100%; height: auto; margin-top: 12px; display: block; }
.axis-num { font-family: var(--mono); font-size: 10px; fill: var(--ink-4); }
.roll-list { display: grid; }
.roll-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; padding: 13px 15px; border-top: 1px solid var(--line); }
.roll-item:first-child { border-top: 0; }
.roll-item strong { display: block; font-size: 11px; }
.roll-item span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 10px; }
.roll-value { text-align: right; font: 800 11px/1.5 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ── Ratings view ─────────────────────────────────────────────────────── */
.ratings-table-wrap { overflow-x: auto; }
.ratings-table { width: 100%; border-collapse: collapse; }
.ratings-table th {
  position: sticky; top: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(9, 13, 22, .97);
  color: var(--ink-3);
  font-size: 9px; font-weight: 850;
  letter-spacing: .07em; text-align: right; text-transform: uppercase;
  white-space: nowrap;
}
.ratings-table th:first-child { text-align: left; padding-left: 14px; }
.ratings-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font: 700 12px/1.3 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  text-align: right; white-space: nowrap;
}
.ratings-table tr:last-child td { border-bottom: 0; }
.ratings-table td:first-child { text-align: left; padding-left: 14px; }
.ratings-table .team-cell { display: flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 700; color: var(--ink); font-size: 12px; }
.ratings-table .team-cell .team-badge { width: 24px; height: 24px; border-radius: 7px; }
.ratings-table .rank { color: var(--ink-4); font: 800 10px/1 var(--mono); min-width: 18px; }
.pos-val { color: var(--green); }
.neg-val { color: var(--red-hi); }

/* ── Bottom nav ───────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  z-index: 90;
  right: 0; bottom: 0; left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line-strong);
  background: rgba(7, 9, 15, .93);
  box-shadow: 0 -20px 48px rgba(0, 0, 0, .28);
  backdrop-filter: blur(20px) saturate(125%);
}
.bottom-nav .nav-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 0; min-height: 64px; gap: 4px;
  border-top: 3px solid transparent;
  font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
}
.bottom-nav .nav-action[aria-current="page"] { border-top-color: var(--red); color: #fff; }
.bottom-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* ── Detail dialog ────────────────────────────────────────────────────── */
.game-dialog {
  width: 100%; max-width: 100%;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0;
  overflow: hidden auto;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 -28px 80px rgba(0, 0, 0, .48);
}
.game-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(5px); }
.dialog-grabber { width: 42px; height: 4px; margin: 9px auto 4px; border-radius: 999px; background: var(--line-strong); }
.dialog-close {
  position: sticky; z-index: 5; top: 8px;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  margin: 0 10px -44px auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(9, 13, 22, .88);
  color: var(--ink-2);
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.dialog-close svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; fill: none; }

.detail-card { overflow: hidden; }
.detail-atmosphere {
  position: relative; overflow: hidden;
  min-height: 200px;
  padding: 17px;
  background:
    radial-gradient(circle at 8% 22%, rgba(242, 47, 77, .14), transparent 40%),
    radial-gradient(circle at 92% 18%, rgba(120, 134, 168, .12), transparent 42%);
}
.detail-kicker { display: flex; justify-content: space-between; gap: 12px; padding-right: 46px; color: var(--ink-3); font: 750 10px/1 var(--mono); }
.detail-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 22px; }
.detail-team { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.detail-team .team-badge { width: 52px; height: 52px; border-radius: 15px; }
.detail-team .team-abbr { font-size: 13px; }
.detail-team strong { margin-top: 8px; font: 850 14px/1 var(--mono); }
.detail-scoreline { display: flex; align-items: center; gap: 6px; font: 900 35px/1 var(--mono); letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.detail-scoreline span { color: var(--ink-4); font-size: 15px; }
.detail-declaration { margin: 16px 0 0; color: var(--ink-2); font-size: 12px; text-align: center; }
.detail-declaration strong { color: var(--ink); }

.probability { padding: 14px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.probability-head { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--ink-2); font-size: 10px; font-weight: 750; }
.probability-head .num { font-size: 11px; }
.probability-track { position: relative; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(157, 175, 214, .12); }
.probability-fill {
  position: absolute; inset: 0 auto 0 0;
  width: var(--prob);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--red-hi));
  box-shadow: 0 0 16px rgba(242, 47, 77, .34);
  transition: width 360ms cubic-bezier(.2, .8, .2, 1);
}

.detail-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.detail-fact { padding: 13px 7px; border-right: 1px solid var(--line); text-align: center; }
.detail-fact:last-child { border-right: 0; }
.detail-fact span { display: block; color: var(--ink-3); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.detail-fact strong { display: block; margin-top: 5px; font: 850 12px/1 var(--mono); font-variant-numeric: tabular-nums; }

.detail-section { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border-bottom: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 11px; color: var(--ink); font-size: 12px; }
.driver-list { display: grid; gap: 8px; }
.driver {
  display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 10, 17, .44);
}
.driver-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--red-soft); color: #ff9dac; font-size: 13px; }
.driver strong { display: block; font-size: 11px; }
.driver span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 10px; }
.consensus-note { color: var(--ink-3); font-size: 11px; line-height: 1.55; }
.consensus-note strong { color: var(--ink-2); font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* Emphasis inside running prose, not a number: keep it in the text face. */
.consensus-note strong.note-emph { font-family: var(--sans); font-weight: 800; color: var(--ink); }
.history-list { display: grid; }
.history-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 12px; padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-3); font: 700 10px/1.5 var(--mono);
  font-variant-numeric: tabular-nums;
}
.history-row:first-child { border-top: 0; }
.history-row b { color: var(--ink-2); font-weight: 800; }

.legal-note {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 16, 26, .72);
  color: var(--ink-3);
  font-size: 11px; line-height: 1.55;
}
.legal-note strong { color: var(--ink-2); }
.app-footer { margin: 20px 4px 0; color: var(--ink-4); font-size: 10px; line-height: 1.55; text-align: center; }
.app-footer p { margin: 0 0 6px; }
.app-footer a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.app-footer a:hover { color: var(--ink-2); }

.toast {
  position: fixed; z-index: 120;
  right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); left: 16px;
  max-width: 360px; margin-inline: auto;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(22, 28, 43, .96);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 11px; text-align: center;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── Board switch (Upcoming | Recent) ─────────────────────────────────── */
/* Same segmented family as the layout switch, but weighted as the primary
   control on the page: this one changes what you are looking at. */
.board-switch {
  display: grid; grid-template-columns: repeat(2, auto);
  flex: none; overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 17, 27, .86);
}
.board-switch button {
  min-height: 40px; padding: 0 15px;
  border: 0; background: transparent;
  color: var(--ink-3); cursor: pointer;
  font-size: 11px; font-weight: 850;
  letter-spacing: .02em;
  transition: color 150ms ease, background 150ms ease;
}
.board-switch button + button { border-left: 1px solid var(--line); }
.board-switch button:hover { color: var(--ink); }
.board-switch button[aria-pressed="true"] {
  background: linear-gradient(140deg, var(--red), #b81635);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 22px rgba(242, 47, 77, .18);
}

/* ── Verdict chips (Recent board) ─────────────────────────────────────── */
.verdict-chips { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; align-items: center; }
.verdict {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-3);
  font: 850 8px/1.15 var(--mono);
  letter-spacing: .02em;
  white-space: nowrap;
}
.verdict b { font-weight: 850; opacity: .78; }
.verdict[data-result="win"] { border-color: rgba(79, 212, 153, .45); background: rgba(79, 212, 153, .12); color: var(--green); }
.verdict[data-result="loss"] { border-color: rgba(242, 47, 77, .42); background: var(--red-soft); color: var(--red-hi); }
.verdict[data-result="push"] { border-color: rgba(255, 194, 103, .4); background: rgba(255, 194, 103, .1); color: var(--amber); }
.recent-game .compact-kickoff .compact-status { color: var(--ink-4); }
.recent-game .compact-team:not(.likely) { opacity: .55; }

/* ── Detail: graded verdict strip ─────────────────────────────────────── */
.detail-verdicts { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-verdict { padding: 13px 12px; border-right: 1px solid var(--line); text-align: center; }
.detail-verdict:last-child { border-right: 0; }
.detail-verdict span { display: block; color: var(--ink-3); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.detail-verdict strong { display: block; margin-top: 6px; font: 900 15px/1 var(--sans); letter-spacing: -.02em; }
.detail-verdict small { display: block; margin-top: 6px; color: var(--ink-4); font-size: 9px; }
.detail-verdict[data-result="win"] strong { color: var(--green); }
.detail-verdict[data-result="loss"] strong { color: var(--red-hi); }
.detail-verdict[data-result="push"] strong { color: var(--amber); }
.detail-verdict[data-result="none"] strong { color: var(--ink-3); }

.age-note { margin-top: 8px; color: var(--ink-4); }
.history-row.canonical { color: var(--ink-2); }
.history-row.canonical b { color: #fff; }
.snapshot-panel { margin-top: 12px; }
.snapshot-panel .consensus-note { margin: 8px 0 0; }

/* ── ≥700px ───────────────────────────────────────────────────────────── */
@media (min-width: 700px) {
  .brand-tagline { display: block; }
  .update-pill { padding: 8px 12px; gap: 8px; }
  .update-short { display: none; }
  .update-label {
    position: static;
    width: auto; height: auto;
    overflow: visible;
    clip-path: none;
  }
  .banner-slot { padding: 14px 20px 0; }
  .main-shell { padding: 26px 20px 70px; }
  .game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-list.compact-list { grid-template-columns: 1fr; }
  .compact-game { grid-template-columns: minmax(0, 1fr) 250px 30px; }
  .panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accuracy-stats { grid-template-columns: repeat(4, 1fr); }
  .accuracy-stat { border-bottom: 0; }
  .accuracy-stat:nth-child(2n) { border-right: 1px solid var(--line); }
  .accuracy-stat:last-child { border-right: 0; }
  .game-dialog {
    width: min(650px, calc(100% - 30px));
    margin: auto;
    border-radius: 24px;
  }
}

/* ── ≥980px: desktop table ────────────────────────────────────────────── */
@media (min-width: 980px) {
  .desktop-nav { display: flex; }
  .bottom-nav { display: none; }
  .main-shell { padding-bottom: 60px; }
  .game-list { grid-template-columns: 1fr; }
  .game-card { display: grid; grid-template-columns: minmax(0, 1fr) 310px; }
  .game-head { grid-column: 1 / -1; }
  .score-board { border-right: 1px solid var(--line); }
  .prediction-sentence { display: none; }
  .quick-facts { align-self: stretch; border-top: 0; }
  .quick-fact { display: flex; flex-direction: column; justify-content: center; padding-inline: 10px; }
  .panel-grid { grid-template-columns: 1.2fr .8fr; }

  .day-head { position: static; margin: 14px 0 8px; backdrop-filter: none; }

  .compact-table-head {
    position: sticky;
    z-index: 20;
    top: 64px;
    display: grid;
    grid-template-columns: 140px minmax(240px, 1fr) 110px 120px 90px 115px 26px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
    background: rgba(9, 13, 22, .96);
    color: var(--ink-3);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
    backdrop-filter: blur(16px);
  }
  .compact-table-head span {
    display: flex; align-items: center;
    padding: 0 11px;
    border-right: 1px solid var(--line);
    font-size: 9px; font-weight: 850;
    letter-spacing: .07em; text-transform: uppercase;
  }
  .compact-table-head span:last-child { border-right: 0; }
  .compact-list { gap: 0; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; background: rgba(9, 13, 22, .72); }
  .day-group .compact-list { border-radius: 0 0 14px 14px; }
  .compact-game {
    grid-template-columns: 140px minmax(240px, 1fr) 110px 120px 90px 115px 26px;
    grid-template-rows: 64px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
  .compact-game::before { display: none; }
  .compact-game:last-child { border-bottom: 0; }
  .compact-game:hover {
    z-index: 1; transform: none;
    background: linear-gradient(90deg, rgba(242, 47, 77, .07), rgba(16, 22, 34, .99) 24%, rgba(11, 16, 26, .99));
  }
  .compact-kickoff {
    grid-column: 1; grid-row: 1;
    align-items: flex-start; justify-content: center; flex-direction: column; gap: 6px;
    padding: 0 11px;
    border: 0; border-right: 1px solid var(--line);
  }
  .badge-featured { margin-left: 0; }
  .compact-matchup {
    grid-column: 2; grid-row: 1;
    display: flex; align-items: center; gap: 10px;
    padding: 0 11px;
    border-right: 1px solid var(--line);
  }
  .compact-team { display: flex; flex: none; gap: 7px; min-height: 0; }
  .compact-team .team-badge { width: 30px; height: 30px; border-radius: 9px; }
  .compact-team-name { max-width: 88px; font-size: 12px; }
  .compact-mobile-score { display: none; }
  .compact-at { display: inline; color: var(--ink-4); font: 800 10px/1 var(--mono); }
  .compact-score {
    grid-column: 3; grid-row: 1;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    border-right: 1px solid var(--line);
    font: 900 19px/1 var(--mono);
    letter-spacing: -.055em;
    font-variant-numeric: tabular-nums;
  }
  .compact-score i { color: var(--ink-4); font-style: normal; font-size: 12px; }
  .compact-facts { display: contents; }
  .compact-fact { grid-row: 1; padding: 0 8px; border-left: 0; border-right: 1px solid var(--line); }
  .compact-fact:nth-child(1) { grid-column: 4; }
  .compact-fact:nth-child(2) { grid-column: 5; }
  .compact-fact:nth-child(3) { grid-column: 6; }
  .compact-fact span { display: none; }
  .compact-fact strong { margin-top: 0; font-size: 12px; }
  .result-fact .verdict-chips { flex-direction: row; margin-top: 0; justify-content: flex-start; }
  .verdict { font-size: 9px; padding: 3px 6px; }
  .compact-mobile-value { display: none; }
  .compact-desktop-value { display: inline; }
  .compact-chevron { grid-column: 7; grid-row: 1; border-left: 0; font-size: 18px; }
}

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