:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f0f2f6;
  --line: #e1e5ec;
  --ink: #131a24;
  --ink-2: #4a5567;
  --ink-3: #7a8597;
  --accent: #8a1538;
  --win: #1e8a4c;
  --tie: #6b7689;
  --loss: #c8372d;
  --hl: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 8px rgba(16, 24, 40, .04);
  --tabbar-h: 62px;
  color-scheme: light;
}
/* Dark: follows the device unless the switch has picked a theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1219;
    --surface: #151d27;
    --surface-2: #1c2632;
    --line: #283444;
    --ink: #eef2f7;
    --ink-2: #b3bdcb;
    --ink-3: #8491a3;
    --win: #35b06a;
    --tie: #8793a6;
    --loss: #e5594f;
    --hl: color-mix(in srgb, var(--accent) 28%, var(--surface));
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1219;
  --surface: #151d27;
  --surface-2: #1c2632;
  --line: #283444;
  --ink: #eef2f7;
  --ink-2: #b3bdcb;
  --ink-3: #8491a3;
  --win: #35b06a;
  --tie: #8793a6;
  --loss: #e5594f;
  --hl: color-mix(in srgb, var(--accent) 28%, var(--surface));
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- chrome ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: #0f1720; color: #fff;
  border-bottom: 3px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { font-size: 22px; }
.brand-text { font-weight: 700; line-height: 1.15; white-space: nowrap; }
.brand-text small { display: block; font-weight: 500; font-size: 11px; opacity: .7; letter-spacing: .04em; text-transform: uppercase; }
.pov-btn {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px; padding: 5px 12px 5px 5px; color: #fff; font-weight: 600;
}
.brand-text { overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.theme-btn {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff;
}
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn:hover, .theme-btn:focus-visible { background: rgba(255, 255, 255, .2); }
.pov-btn .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pov-btn .chev { opacity: .7; font-size: 11px; }

.pov-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 8px 16px; background: var(--hl); border-bottom: 1px solid var(--line); font-size: 13px;
}
.pov-banner { flex-wrap: nowrap; gap: 6px; padding-left: 12px; padding-right: 12px; }   /* one row: the short school names keep it narrow enough for a phone */
.pov-banner .grow { flex: 1 1 auto; white-space: nowrap; }
/* The two actions are pills that stay together on one row, beside the label when there is room and under it on a phone. */
.pov-acts { display: flex; gap: 6px; flex-wrap: nowrap; min-width: 0; }
.pov-pill { padding: 6px 10px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--ink) 28%, transparent); background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pov-pill.solid { flex: none; border-color: transparent; background: var(--fav, var(--accent)); color: #fff; }
.pov-pill:hover, .pov-pill:focus-visible { filter: brightness(1.08); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

main { max-width: 1180px; margin: 0 auto; padding: 14px 16px 8px; outline: none; }
.foot { max-width: 1180px; margin: 0 auto; padding: 8px 16px 20px; color: var(--ink-3); font-size: 12px; }
.foot a { text-decoration: underline; text-underline-offset: 2px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
}
.tabbar a span { font-size: 19px; filter: grayscale(1); opacity: .75; }
.tabbar a.on { color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
.tabbar a.on span { filter: none; opacity: 1; }

/* ---------- building blocks ---------- */
.grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-2 { grid-column: span 2; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .span-3 { grid-column: span 3; } }

.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; min-width: 0;
}
.tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tile-head h2 { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.tile-head a { font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tile-head a:hover, .more:hover { color: var(--ink); }
/* The hub's three route cards: a .tile that's itself the link, so it needs the anchor reset + a hover lift a
   plain .tile never needed before. */
.hub-card { display: block; text-decoration: none; color: inherit; transition: transform .12s ease, border-color .12s ease; }
.hub-card:hover, .hub-card:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
.hub-card .tile-head h2 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.hub-card .chev { color: var(--ink-3); font-size: 18px; font-weight: 700; }
/* The hub's own "where things stand" badge on each card -- a checkmark that draws itself in once for a
   finished season/bracket, or a steady pulsing dot for whichever one is actually being played right now.
   Not animated forever on the finished cards -- an endless animation there would read as still in progress,
   which is the opposite of what "complete" means. */
.hub-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin: 8px 0 2px; white-space: nowrap; }
.hub-status.done { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.hub-status.live { background: color-mix(in srgb, var(--win) 16%, transparent); color: var(--win); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--win) 45%, transparent); }
/* The State Playoffs card's own badge sits in the tile-head row instead of below it -- on the same line as
   the title, never its own line -- so it needs to be small enough to actually fit there alongside the title
   and chevron on a phone. */
.tile-head .hub-status.compact { flex: none; margin: 0; gap: 3px; font-size: 9px; padding: 2px 6px; }
.tile-head .hub-status.compact .pulse-dot { width: 7px; height: 7px; }
/* Title pill + "Live now" side by side (not spread apart by the tile-head's space-between), with the live
   dot inside the title pill itself, ahead of the text. */
.hub-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.hub-title h2 { display: inline-flex; align-items: center; gap: 7px; }
.hub-title h2 .pulse-dot { width: 11px; height: 11px; }
.hub-card .tile-head h2 .hub-check { display: inline-block; vertical-align: -2px; width: 14px; height: 14px; margin-right: 6px; }
.hub-check { width: 13px; height: 13px; flex: none; }
.hub-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: hub-check-draw .5s ease-out forwards; }
@keyframes hub-check-draw { to { stroke-dashoffset: 0; } }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--win); flex: none;
  filter: drop-shadow(0 0 4px var(--win));
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--win) 85%, transparent); animation: hub-pulse 1.5s ease-out infinite; }
/* Each beat starts with the dot small and grows it back to full size while the ring spreads out. */
@keyframes hub-pulse { 0% { transform: scale(.5); } 55% { transform: scale(1); } 75%, 100% { transform: scale(1); box-shadow: 0 0 0 12px transparent; } }
@media (prefers-reduced-motion: reduce) { .hub-check path { animation: none; stroke-dashoffset: 0; } .pulse-dot { animation: none; } }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.page-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.page-sub { color: var(--ink-2); margin-bottom: 12px; font-size: 13.5px; }

.badge {
  flex: none; display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--tie); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .02em;
}
.badge.lg { width: 56px; height: 56px; font-size: 15px; }
.badge.md { width: 40px; height: 40px; font-size: 12px; }

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}

/* Two small chips -- class, then seed -- next to a team's full name wherever that name appears -- themed like
   .tag by default (for a name sitting on the ordinary page background), overridden to translucent white -- the
   same technique as .cmp-pill and .po-path-cta -- wherever the name instead sits on a team-colour gradient (the
   playoff hero, duo score cards). */
/* The two pills' shared wrapper: inline-block + nowrap so they break onto the next line as one unit on a
   narrow phone, never split with the class pill on one line and a stranded "#2" on the next. */
.cs-badges { display: inline-block; white-space: nowrap; }
.cs-badge { display: inline-block; vertical-align: middle; padding: 1px 6px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.cs-badge + .cs-badge { margin-left: 3px; }
.score-card.duo .cs-badge {
  background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32); color: #fff; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- selected-team card: Option A from mockup/ecrl/match-tile's "Selected Team tile" options for
   Default style, Option B for Bold -- never the page's own colour-scheme pick, always the viewed school's real
   colour, the same rule the playoff hero below it follows (this card now carries the name/record header that
   used to live inside the hero). Default: a gradient of the school's own colour, white text, translucent white
   stat tiles. Bold: the flat near-black card every other Bold tile already uses, border and stat tiles in the
   school's colour instead of the page's chosen accent. ---------- */
/* !important on background/box-shadow too, not just border: several older per-theme and per-mix rules paint
   every ordinary ".grid > .tile" with a scheme-tinted gradient at higher specificity than a bare ".th-c", and
   there are too many of those (each theme/mix combination has its own) to safely chase and exclude one by one. */
.th-c { position: relative; overflow: hidden; padding: 16px; color: #fff;
  border: 1.5px solid color-mix(in srgb, var(--club) 55%, transparent) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--club) 62%, #000), color-mix(in srgb, var(--club) 25%, #000)) !important;
  box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--club) 70%, #000) !important; }
.th-top { display: flex; align-items: flex-start; gap: 13px; }
.th-top h1 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; }
.th-sub { margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .85); }
.th-c .cs-badge { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32); color: #fff; }
.th-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.th-stat { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 9px 11px; }
.th-stat .k { display: block; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.th-stat .v { display: block; font-size: 19px; font-weight: 800; margin: 2px 0 1px; color: #fff; }
.th-stat .s { font-size: 11px; color: rgba(255, 255, 255, .78); }
/* The Championship phrase's own sub-tile (teamCard()'s champTile()): same .th-stat family as Record/Seed/Goal
   diff, but spanning every column instead of sharing a row with them -- it's a full sentence, not a short
   label/number pair, so it needs the room a 1/3-width box doesn't have. th-stat-phrase keeps the same size and
   weight .th-line (the plain text this replaced) already had, rather than .th-stat .v's bold 19px -- a full
   sentence read as shouted at that size, where a bare number doesn't. "View full list" is a small po-path-cta
   pill living inside the sentence itself, trailing "...championship" on the same line when there's room --
   normal text reflow, not flexbox (which would treat the whole multi-line phrase as one box and always drop
   the pill below it even when the last line has room to spare). Square-cornered like Full Bracket/History
   (.cmp-pill's own Bold-style shape), not fully rounded like every other po-path-cta use -- same size as
   those, at a size small enough to share the line with the sentence. */
.th-stat-wide { grid-column: 1 / -1; }
.th-stat-phrase { font-size: 14.5px; font-weight: 500; color: #fff; }
.th-stat-wide .po-path-cta { vertical-align: middle; margin: 0 0 0 4px; font-size: 9px; padding: 2px 6px; border-radius: 6px; }
/* Championship sub-tile: the percentage is the headline (big, left), the sentence and its link beside it. */
.th-stat-champ { display: flex; align-items: center; gap: 12px; }
.th-champ-pct { flex: none; font-size: 28.9px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.th-stat-champ .th-stat-phrase { flex: 1; min-width: 0; line-height: 1.35; }
/* Last five results under the selected team's name: small circles that always stay on one line. */
.th-form { display: flex; flex-wrap: nowrap; gap: 4px; margin-top: 7px; }
.th-form .pill { width: 17px; height: 17px; font-size: 9px; flex: none; }
.th-form a.pill:hover, .th-form a.pill:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.th-line { margin: 14px 0 0; font-size: 14.5px; }
.th-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin-top: 12px; }
@media (max-width: 420px) {
  .th-actions { flex-wrap: nowrap; gap: 6px; justify-content: space-between; }
  .th-actions .cmp-pill { flex: 1 1 0; justify-content: center; padding: 7px 6px; font-size: 12px; white-space: nowrap; }
}
/* Bold: Option B -- the same flat dark card every other Bold tile already uses, accented in the school's own
   colour rather than the page's chosen scheme. */
:root[data-style="bold"] .grid > .tile.th-c {
  background: #15161a !important; border: 1.5px solid var(--club) !important; box-shadow: none !important; color: #fff !important;
}
:root[data-style="bold"] .th-c .th-sub, :root[data-style="bold"] .th-c .th-line { color: #aeb3bd !important; }
:root[data-style="bold"] .th-c .cs-badge { background: transparent !important; box-shadow: inset 0 0 0 1px var(--club) !important; color: #fff !important; }
:root[data-style="bold"] .th-c .cmp-pill, :root[data-style="bold"] .th-c .po-path-cta { background: transparent !important; border: 1.5px solid var(--club) !important; border-radius: 8px !important; color: #fff !important; box-shadow: none !important; }
:root[data-style="bold"] .th-c .cmp-pill:hover, :root[data-style="bold"] .th-c .cmp-pill:focus-visible,
:root[data-style="bold"] .th-c .po-path-cta:hover, :root[data-style="bold"] .th-c .po-path-cta:focus-visible { background: color-mix(in srgb, var(--club) 15%, transparent) !important; }
:root[data-style="bold"] .th-c .th-stat { background: color-mix(in srgb, var(--club) 7%, transparent) !important; border: 1px solid color-mix(in srgb, var(--club) 40%, transparent) !important; }
:root[data-style="bold"] .th-c .th-stat .k, :root[data-style="bold"] .th-c .th-stat .s { color: #9aa0ab !important; }
:root[data-style="bold"] .th-c .th-stat .v { color: #fff !important; }

/* ---------- hero ---------- */
.hero { border-top: 4px solid var(--accent); }
.hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hero-top h1 { font-size: 22px; font-weight: 800; line-height: 1.15; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { display: block; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
a.kpi:hover, a.kpi:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.kpi .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.kpi .v { font-size: 24px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--ink-2); }

/* ---------- match rows ---------- */
.matchup { display: flex; align-items: center; gap: 12px; }
.matchup .who { flex: 1; min-width: 0; }
.matchup .who b { display: block; font-size: 18px; line-height: 1.2; }
.big-score { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.when { font-weight: 700; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 9px 8px; border-radius: 8px;
}
a.row:hover, a.row:focus-visible { background: var(--surface-2); }
.row .dt { font-size: 12px; color: var(--ink-2); line-height: 1.25; }
.row .dt b { display: block; color: var(--ink); font-size: 13px; }
.row .opp { min-width: 0; }
.row .opp .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .opp .m { font-size: 12px; color: var(--ink-3); }
.row .res { display: flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .chev { color: var(--ink-3); font-size: 16px; font-weight: 700; line-height: 1; }   /* a bracket row with no score yet still needs *some* sign it's a link */
.pair .n { display: flex; justify-content: space-between; gap: 8px; }
.pair .n.lose { font-weight: 400; color: var(--ink-2); }
/* Full Bracket's own badged rows (pendingGame()'s `badges` flag): the badge sits right after the name, not
   pinned to the row's far edge the way a "name ... score" pair's second item usually is. */
.pair .n.n-badged { justify-content: flex-start; gap: 4px; }
/* Three badges after a name (district, rank, record) plus the predicted-winner W must still leave a full school name
   room on a 375px phone, so inside a badged name row they are tighter than elsewhere. */
.pair .n-badged .cs-badge { padding: 1px 4px; font-size: 9px; letter-spacing: 0; }
.pair .n-badged .cs-badge + .cs-badge { margin-left: 2px; }
.po-card .row { grid-template-columns: 54px minmax(0, 1fr) auto; gap: 6px; }
.pair .n-badged .cs-badge.cs-win { padding: 0 4px; }
.pair .n.n-badged > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.pill {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  color: #fff; font-size: 12px; font-weight: 800;
}
.pill.W { background: var(--win); } .pill.T { background: var(--tie); } .pill.L { background: var(--loss); }
.form { display: flex; gap: 6px; }
.form .pill { width: 34px; height: 34px; border-radius: 50%; font-size: 14px; }
.form a:hover .pill, .form a:focus-visible .pill { outline: 2px solid var(--ink); outline-offset: 1px; }

/* ---------- last result: a carousel inside one plain tile ---------- */
/* The "Last result" tile's presentation from mockup/ecrl/match-tile -- badges on the outer edges, both team
   names stacked above and below the score in the centre column, a divider, a meta line, then a centred action
   pill below it -- see lastResultTile() in app.js. The tile itself is untouched (the ordinary .tile background/
   border/left edge band every other home-page tile already has -- no card of its own nested inside it); only
   its content swipes, one game filling the whole width per swipe (mandatory snap, no peek of a neighbour either
   side), with a dot per game underneath tracking whichever one is actually in view. */
/* A separate pill, not inline with the label -- but close beside it rather than pushed to the row's far right
   edge the way tile-head's own space-between would otherwise put it. */
.lr-sched-head { justify-content: flex-start; gap: 6px; }
.lr-sched-pill { flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.lr-sched-pill:hover, .lr-sched-pill:focus-visible { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.lr-sched-pill .ico { width: 14px; height: 14px; margin: 0; }
.lr-wrap { position: relative; }
.lr-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lr-carousel::-webkit-scrollbar { display: none; }
.lr-slide { position: relative; flex: none; width: 100%; scroll-snap-align: start; }
/* Prev/next, for a mouse on a computer -- touch already has swiping, so these stay out of its way there. */
.lr-nav {
  position: absolute; top: 44px; z-index: 1; width: 30px; height: 30px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font-size: 18px; line-height: 1;
}
.lr-nav:hover, .lr-nav:focus-visible { background: var(--hl); }
.lr-prev { left: -4px; } .lr-next { right: -4px; }
/* Hidden until the carousel itself is hovered or a nav button gets focus (keyboard users still reach them) --
   not gone from layout, just invisible, so there's no pop-in resize when they do appear. */
@media (hover: hover) and (pointer: fine) {
  .lr-nav { display: flex; opacity: 0; transition: opacity .15s ease; }
  .lr-wrap:hover .lr-nav, .lr-wrap:focus-within .lr-nav { opacity: 1; }
}
/* min-height keeps the badges' top/bottom padding consistent regardless of what the centre column holds -- a
   short "vs" label (Upcoming Game) would otherwise collapse the row tighter than a taller score line (Past
   Games), leaving the same 56px badge looking cramped against the row's edges in one tile but not the other. */
.lr-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 0 8px; min-height: 74px; }
.lr-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; text-align: center; }
/* The W/T/L mark sits on the corner of the badge it describes (lrBadge() in app.js), not loose in the card's
   own corner -- .lr-badge-wrap is just large enough to anchor it there without resizing the badge. */
.lr-badge-wrap { position: relative; display: inline-flex; }
.lr-pill { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; font-size: 10.5px;
  border: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 2px var(--surface-2); }
.lr-name { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--ink-2);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-name.me { color: var(--ink); }
.lr-score { margin: 1px 0; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.lr-divider { height: 1px; margin: 14px 0 12px; background: var(--line); }
.lr-meta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.lr-actions { margin-top: 14px; display: flex; justify-content: center; }
.lr-dots { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; }
.lr-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line); transition: width .15s, background-color .15s; }
.lr-dots i.on { width: 18px; background: var(--ink-3); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 6px; text-align: center; white-space: nowrap; }
th { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
td { border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th.l, td.l { text-align: left; }
/* The school column takes whatever width is left and wraps, so number columns never get pushed off-screen. */
td.team { width: 100%; text-align: left; font-weight: 600; white-space: normal; }
td.team .tc { display: flex; align-items: center; gap: 8px; min-width: 0; }
td.team .tn { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
td.team a.n { line-height: 1.2; }
.l5 { flex-basis: 100%; display: flex; gap: 4px; margin-top: 5px; }
/* Last five as small dots; the W/T/L letter stays in the markup for screen readers and tooltips. */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; font-size: 0; }
.dot.W { background: var(--win); } .dot.T { background: var(--tie); } .dot.L { background: var(--loss); }
a.dot:hover, a.dot:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
tbody tr[data-href] { cursor: pointer; }
tbody tr[data-href]:hover td { background: var(--surface-2); }
tr.me td { background: var(--hl); font-weight: 700; }
tr.me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.cut td { border-bottom: 2px dashed var(--ink-3); }
tr.gap td { padding: 2px; color: var(--ink-3); font-size: 12px; }
.hide-sm { display: none; }
@media (min-width: 520px) { .hide-sm { display: table-cell; } }

/* ---------- stats / compare ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 9px 10px; }
.stat .v { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 11.5px; color: var(--ink-2); }

.cmp { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 10px; align-items: center; }
.cmp > div { padding: 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cmp .a { text-align: right; font-weight: 700; } .cmp .b { font-weight: 700; }
.cmp .k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.cmp .form { display: inline-flex; gap: 3px; } .cmp .form .pill { width: 20px; height: 20px; font-size: 10px; border-radius: 50%; }

.score-card { text-align: center; border-top: 4px solid var(--accent); }
.score-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 10px 0 6px; }
.score-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; }
.score-grid a small { font-weight: 500; color: var(--ink-3); }

details.tile > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
details.tile > summary::-webkit-details-marker { display: none; }
details.tile > summary::after { content: "＋"; color: var(--ink-3); }
details.tile[open] > summary::after { content: "－"; }
details.tile[open] > summary { margin-bottom: 10px; }
.round-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 12px 0 8px; }
.prose { color: var(--ink-2); font-size: 13.5px; }
.prose li { margin: 4px 0; } .prose ul { padding-left: 18px; margin: 6px 0; }

/* ---------- school picker ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(5, 10, 16, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-radius: 18px 18px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
}
@media (min-width: 620px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { font-size: 18px; }
.sheet-sub { color: var(--ink-2); font-size: 13px; margin: 4px 0 12px; }
.icon-btn { background: var(--surface-2); border: 0; width: 34px; height: 34px; border-radius: 50%; }
.school-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.school {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
}
.school.cur { border-color: var(--ink); }
.school .go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 2px; text-align: left; font-weight: 600; }
.school .go span.n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.school .go .tag { flex: none; font-size: 10px; padding: 1px 5px; }
.school .star { background: none; border: 0; font-size: 18px; padding: 4px; color: var(--ink-3); line-height: 1; }
.school .star.on { color: #e0a100; }

/* ---------- narrow phones: keep the school name readable in the top bar ---------- */
@media (max-width: 430px) {
  .topbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .brand-mark { display: none; }
  .brand { flex: 0 10 auto; }
  .brand-text small { font-size: 10px; letter-spacing: .02em; }
  .top-actions { flex: 0 1 auto; gap: 6px; }
}

/* ---------- light theme: colour pass (pastel tiles, sticker labels, gradient hero) ---------- */
:root[data-theme="light"] {
  --bg: #faf7ff;
  --ink-2: #3d4759;
  --ink-3: #5f6b7d;
  --radius: 20px;
}
:root[data-theme="light"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 30rem at -10% -5%, #efe3ff 0%, transparent 60%),
    radial-gradient(50rem 28rem at 110% 10%, #dff3ff 0%, transparent 60%),
    radial-gradient(50rem 30rem at 50% 110%, #ffe9f3 0%, transparent 60%),
    var(--bg);
}
:root[data-theme="light"] .grid > .tile {
  --tint: #efe9ff; --pop: #cdbdff;
  --surface-2: rgba(255, 255, 255, .72);
  --line: rgba(19, 26, 36, .1);
  --hl: color-mix(in srgb, var(--accent) 16%, #fff);
  background: linear-gradient(165deg, var(--tint), color-mix(in srgb, var(--tint) 45%, #fff));
  border: 1.5px solid color-mix(in srgb, var(--pop) 70%, transparent);
  box-shadow: 0 10px 22px -14px color-mix(in srgb, var(--pop) 80%, #6b5a9a);
}
:root[data-theme="light"] .grid > .tile:nth-child(6n+2) { --tint: #e2f8ec; --pop: #9be3bd; }
:root[data-theme="light"] .grid > .tile:nth-child(6n+3) { --tint: #ffeedd; --pop: #ffc490; }
:root[data-theme="light"] .grid > .tile:nth-child(6n+4) { --tint: #e1f0ff; --pop: #a6d3ff; }
:root[data-theme="light"] .grid > .tile:nth-child(6n+5) { --tint: #ffe6f1; --pop: #ffb0cf; }
:root[data-theme="light"] .grid > .tile:nth-child(6n)   { --tint: #fff6d2; --pop: #ffdf66; }

:root[data-theme="light"] .tile-head h2,
:root[data-theme="light"] details.tile > summary {
  background: var(--pop); color: var(--ink);
  padding: 4px 11px; border-radius: 999px; letter-spacing: .05em;
}
:root[data-theme="light"] details.tile > summary { display: inline-flex; font-size: 12px; text-transform: uppercase; }
:root[data-theme="light"] details.tile > summary::after { color: var(--ink); margin-left: 6px; }
:root[data-theme="light"] .tile-head { align-items: center; }
:root[data-theme="light"] .tag { background: rgba(255, 255, 255, .8); }
:root[data-theme="light"] .kpi, :root[data-theme="light"] .stat { border-radius: 14px; }
:root[data-theme="light"] .chip { background: rgba(255, 255, 255, .85); border-color: rgba(19, 26, 36, .12); }
:root[data-theme="light"] .chip.on { background: linear-gradient(120deg, #6d4bff, #ff5fa8); border-color: transparent; color: #fff; }
:root[data-theme="light"] .page-title { font-size: 24px; letter-spacing: -.01em; }

/* Hero and scoreboard: school colour melting into violet */
:root[data-theme="light"] .grid > .tile.hero,
:root[data-theme="light"] .grid > .tile.score-card {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 45%, #6d4bff));
  border: 0; color: #fff;
  --surface-2: rgba(255, 255, 255, .16);
  box-shadow: 0 14px 28px -14px var(--accent);
}
:root[data-theme="light"] .hero .muted, :root[data-theme="light"] .score-card .muted,
:root[data-theme="light"] .hero .kpi .k, :root[data-theme="light"] .hero .kpi .s,
:root[data-theme="light"] .score-card small { color: rgba(255, 255, 255, .82); }
:root[data-theme="light"] .hero .badge, :root[data-theme="light"] .score-card .badge { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); background: color-mix(in srgb, var(--bc, currentColor) 55%, #fff) !important; }
:root[data-theme="light"] .hero a.kpi:hover, :root[data-theme="light"] .hero a.kpi:focus-visible { outline-color: #fff; }
:root[data-theme="light"] .score-card .tag { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .35); color: #fff; }

/* opponent name on its own line, record/seed line beneath */
.row .opp:not(.pair) > .n, .row .opp > .m { display: block; }

@media (max-width: 430px) {
  th, td { padding-left: 3px; padding-right: 3px; }
  td.team .tc { gap: 6px; }
  td.team .badge { width: 24px; height: 24px; font-size: 8.5px; }
}

/* rankings: seven columns, so run compact until there is room */
@media (max-width: 560px) {
  .rank th, .rank td { padding-left: 2px; padding-right: 2px; font-size: 14px; }
  .rank th { font-size: 10.5px; }
}

/* ---------- dark theme: colour pass (deep tinted tiles, neon labels, gradient hero) ---------- */
:root[data-theme="dark"] {
  --bg: #0b0b16;
  --surface: #15152a;
  --surface-2: #1e1e38;
  --line: #2c2c4a;
  --ink-2: #c3c6dc;
  --ink-3: #9497b3;
  --radius: 20px;
}
:root[data-theme="dark"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55rem 28rem at -10% -5%, rgba(124, 92, 255, .28) 0%, transparent 60%),
    radial-gradient(48rem 26rem at 110% 12%, rgba(56, 189, 248, .18) 0%, transparent 60%),
    radial-gradient(50rem 30rem at 50% 112%, rgba(244, 114, 182, .2) 0%, transparent 60%),
    var(--bg);
}
:root[data-theme="dark"] .grid > .tile {
  --tint: #1f1a40; --pop: #a78bfa;
  --surface-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .1);
  --hl: color-mix(in srgb, var(--pop) 22%, transparent);
  background: linear-gradient(165deg, var(--tint), color-mix(in srgb, var(--tint) 55%, #0b0b16));
  border: 1.5px solid color-mix(in srgb, var(--pop) 45%, transparent);
  box-shadow: 0 12px 28px -18px var(--pop);
}
:root[data-theme="dark"] .grid > .tile:nth-child(6n+2) { --tint: #10291f; --pop: #4ade80; }
:root[data-theme="dark"] .grid > .tile:nth-child(6n+3) { --tint: #2f1f12; --pop: #fb923c; }
:root[data-theme="dark"] .grid > .tile:nth-child(6n+4) { --tint: #11243d; --pop: #60a5fa; }
:root[data-theme="dark"] .grid > .tile:nth-child(6n+5) { --tint: #301428; --pop: #f472b6; }
:root[data-theme="dark"] .grid > .tile:nth-child(6n)   { --tint: #2b2610; --pop: #facc15; }

:root[data-theme="dark"] .tile-head h2,
:root[data-theme="dark"] details.tile > summary {
  background: var(--pop); color: #0b0b16;
  padding: 4px 11px; border-radius: 999px; letter-spacing: .05em;
}
:root[data-theme="dark"] details.tile > summary { display: inline-flex; font-size: 12px; text-transform: uppercase; }
:root[data-theme="dark"] details.tile > summary::after { color: #0b0b16; margin-left: 6px; }
:root[data-theme="dark"] .tile-head { align-items: center; }
:root[data-theme="dark"] .grid > .tile tr.me td:first-child { box-shadow: inset 3px 0 0 var(--pop); }
:root[data-theme="dark"] .kpi, :root[data-theme="dark"] .stat { border-radius: 14px; }
:root[data-theme="dark"] .chip.on { background: linear-gradient(120deg, #7c5cff, #ff5fa8); border-color: transparent; color: #fff; }
:root[data-theme="dark"] .page-title { font-size: 24px; letter-spacing: -.01em; }
:root[data-theme="dark"] .tabbar a.on { box-shadow: inset 0 3px 0 #a78bfa; }

:root[data-theme="dark"] .grid > .tile.hero,
:root[data-theme="dark"] .grid > .tile.score-card {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 40%, #7c5cff));
  border: 0; color: #fff;
  --surface-2: rgba(255, 255, 255, .14);
  box-shadow: 0 14px 34px -14px #7c5cff;
}
:root[data-theme="dark"] .hero .muted, :root[data-theme="dark"] .score-card .muted,
:root[data-theme="dark"] .hero .kpi .k, :root[data-theme="dark"] .hero .kpi .s,
:root[data-theme="dark"] .score-card small { color: rgba(255, 255, 255, .82); }
:root[data-theme="dark"] .hero .badge, :root[data-theme="dark"] .score-card .badge { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); background: color-mix(in srgb, var(--bc, currentColor) 55%, #fff) !important; }
:root[data-theme="dark"] .hero a.kpi:hover, :root[data-theme="dark"] .hero a.kpi:focus-visible { outline-color: #fff; }
:root[data-theme="dark"] .score-card .tag { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* ---------- predictions ---------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; padding: 10px 16px; border: 0; border-radius: 999px;
  background: linear-gradient(120deg, #6d4bff, #ff5fa8); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 18px -10px #6d4bff;
}
.cta:hover, .cta:focus-visible { filter: brightness(1.08); }
.cta.wide { width: 100%; max-width: 340px; margin-top: 0; }
.cta:disabled { opacity: .6; cursor: default; filter: none; }
.cta b { background: rgba(255, 255, 255, .22); padding: 1px 8px; border-radius: 999px; }
.cta.ghost { background: var(--surface-2); color: inherit; box-shadow: none; border: 1px solid var(--line); }
.score-card .cta { background: #fff; color: #2a1a6e; box-shadow: none; }
.score-card .cta b { background: rgba(109, 75, 255, .16); }

.pick-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; margin: 12px 0 4px; }
.pick-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; }
.pick-grid a small { font-weight: 500; }
.pick-grid .vs { align-self: center; font-size: 26px; font-weight: 800; white-space: nowrap; }
.verdict { display: inline-block; margin-top: 10px; padding: 6px 14px; border-radius: 999px; font-weight: 700; background: rgba(255, 255, 255, .2); }
.headline { margin: 10px auto 0; max-width: 34ch; font-size: 16px; font-weight: 600; line-height: 1.35; }
.why { margin: 0; padding-left: 20px; }
.why li { margin: 6px 0; }
.scen { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 10px 4px; }
.scen .lab { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; color: #fff; background: var(--tie); justify-self: start; }
.scen.best .lab { background: var(--win); } .scen.worst .lab { background: var(--loss); }
.scen .sc { font-size: 18px; font-weight: 800; text-align: right; white-space: nowrap; }
.scen .how { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); }

/* ---------- next matchup (from the Squad Cards concept) ---------- */
.mu-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; text-align: center; }
.mu-vs a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.mu-vs a b { font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
.mu-vs a small { font-size: 12px; color: var(--ink-3); }
.mu-vs .badge.lg { box-shadow: 0 0 0 3px var(--surface), 0 6px 14px -6px rgba(0, 0, 0, .45); }
.mu-vs .mid { font-size: 30px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
  background: linear-gradient(120deg, #6d4bff, #ff5fa8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mu-vs .mid small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); -webkit-text-fill-color: currentColor; }
.mu-cmp { display: grid; grid-template-columns: 28px minmax(0, 1fr) 46px minmax(0, 1fr) 28px; gap: 8px 6px; align-items: center; margin-top: 14px; font-weight: 800; }
.mu-cmp .lab { text-align: center; font-size: 11px; letter-spacing: .1em; color: var(--ink-3); }
.mu-cmp .r { text-align: right; }
.mu-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; box-shadow: inset 0 0 0 1px var(--line); }
.mu-track.l { justify-content: flex-end; }
.mu-track i { display: block; height: 100%; border-radius: 999px; }

/* win / tie / loss chances on the prediction card */
.odds { display: flex; gap: 2px; height: 12px; max-width: 340px; margin: 12px auto 6px; }
.odds i { border-radius: 4px; min-width: 4px; }
.odds .oh { background: #fff; } .odds .ot { background: rgba(255, 255, 255, .55); } .odds .oa { background: rgba(255, 255, 255, .28); }
.odds-key { display: flex; justify-content: space-between; gap: 8px; max-width: 340px; margin: 0 auto; font-size: 12.5px; }
.odds-key b { font-size: 14px; }

/* Home header card: the school's own colour, solid, in both themes (match pages keep the gradient). */
:root[data-theme="light"] .grid > .tile.hero,
:root[data-theme="dark"] .grid > .tile.hero {
  background: var(--accent);
  box-shadow: 0 14px 28px -16px var(--accent);
}

/* Dark theme: the remaining school-colour accents use the school colour too (as in light), not the tile's neon. */
:root[data-theme="dark"] .grid > .tile { --hl: color-mix(in srgb, var(--accent) 62%, transparent); }
:root[data-theme="dark"] .grid > .tile tr.me td:first-child { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 60%, #fff); }
:root[data-theme="dark"] .tabbar a.on { box-shadow: inset 0 3px 0 color-mix(in srgb, var(--accent) 70%, #fff); }

/* ---------- next matchup, refined: quieter centre, slim bars, only the stronger side in colour ---------- */
.mu-vs { gap: 6px; align-items: start; }
.mu-vs a b { font-size: 16px; font-weight: 700; margin-top: 4px; }
.mu-vs a small { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mu-vs .badge.lg { width: 52px; height: 52px; font-size: 14px; }
.mu-vs .mid { align-self: center; gap: 1px; background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--ink); font-size: inherit; font-weight: 400; letter-spacing: 0; }
.mu-vs .mid .vs { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.mu-vs .mid .day { font-size: 15px; font-weight: 700; }
/* Last result: the score, from this school's side, takes the place of "vs"; the W / L / T mark sits beside it. */
.mu-vs .mid .score { display: inline-flex; align-items: center; gap: 7px; font-size: 28px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mu-vs .mid .score .pill { width: 22px; height: 22px; font-size: 11px; }
/* This school, on whichever side it is: a ring in the theme colour round its badge; the other school's name is a little lighter. */
.mu-vs a.me .badge.lg { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5.5px var(--fav, var(--accent)); }
.mu-vs a:not(.me):not(.mid) b { font-weight: 600; }
/* One line, even on a narrow phone: the text shrinks a little rather than wrapping. */
.mu-call { margin: 14px 0 0; text-align: center; font-weight: 600; white-space: nowrap; font-size: clamp(10.5px, 3.3vw, 12.5px); }
.mu-vs .mid .time { font-size: 13px; color: var(--ink-2); }
.mu-vs .mid .ctx { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.mu-cmp { grid-template-columns: 26px minmax(0, 1fr) 58px minmax(0, 1fr) 26px; gap: 11px 8px; margin-top: 18px; font-weight: 500; }
.mu-cmp .num { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mu-cmp .num.lead { color: var(--ink); font-weight: 800; }
.mu-cmp .lab { font-size: 11.5px; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--ink-2); }
.mu-track { height: 5px; box-shadow: none; background: color-mix(in srgb, var(--ink) 13%, transparent); }
.mu-track i.dim { background: color-mix(in srgb, var(--ink) 58%, transparent); }
.mu-help { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.mu-help summary { cursor: pointer; display: inline-block; list-style: none; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.mu-help summary::-webkit-details-marker { display: none; }
.mu-help p { margin-top: 8px; text-align: left; color: var(--ink-2); line-height: 1.5; }
.mu-cta { text-align: center; }
.mu-cta .cta { margin-top: 14px; padding: 9px 16px; font-size: 13.5px; }
/* School colours are often dark; lift them so the bars read on dark tiles. */
:root[data-theme="dark"] .mu-track i:not(.dim) { filter: brightness(1.7) saturate(1.15); }

/* Home header: the tiles always sit in one row, however many there are (three for a league school). */
.kpis { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
@media (max-width: 559px) {
  .kpis { gap: 6px; }
  .kpi { padding: 9px 8px; }
  .kpi .k { font-size: 10px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kpi .v { font-size: 21px; white-space: nowrap; }
  .kpi .s { font-size: 11px; line-height: 1.3; }
}
/* Strength bars on the match page: a little air above the first row, team initials as column heads. */
.tile > .mu-cmp:first-of-type { margin-top: 4px; }

/* Prediction button: the viewed school's colour, white text. A light edge keeps it visible on dark or same-coloured backgrounds. */
.cta, .score-card .cta { background: var(--fav, var(--accent)); color: #fff; box-shadow: none; }
:root[data-theme="dark"] .cta, .score-card .cta { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.cta:hover, .cta:focus-visible { filter: brightness(1.15); }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; margin-right: .35em; }
.cta .ico { margin-right: 0; }

/* ---------- prediction card, "score first": date and confidence on one line, big score, slim chances bar ---------- */
:root[data-theme="light"] .grid > .tile.duo, :root[data-theme="dark"] .grid > .tile.duo { box-shadow: 0 14px 28px -18px rgba(0, 0, 0, .55); }
.pred-card { text-align: left; padding: 16px; }
.pred-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .9); }
.pred-top > span:first-child { min-width: 0; }
.pred-top-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; }
.pred-card .tag { flex: none; background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .35); color: #fff; }
.pred-card .pick-grid { margin: 18px 0 14px; align-items: center; text-align: center; }
.pred-card .pick-grid a { font-size: 14px; line-height: 1.25; }
.pred-card .badge.lg { width: 46px; height: 46px; font-size: 13px; }
/* The score is a single scoreline out of dozens, so it is secondary here: smaller, with a note on how
   likely it is on its own. The win/tie/loss and goals bars are the primary, honest read of the forecast. */
.pred-card .pick-grid .vs { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 26px; line-height: 1.15; }
.pred-card .pick-grid .vs .score-note { font-size: 10.5px; font-weight: 600; white-space: normal; color: rgba(255, 255, 255, .78); }
.pred-card .odds { max-width: none; height: 8px; margin: 0 0 6px; }
.pred-card .odds i { background: rgba(255, 255, 255, .32); }
.pred-card .odds i.on { background: #fff; }
.pred-card .odds-key { max-width: none; font-size: 12px; color: rgba(255, 255, 255, .9); }
.pred-card .odds-key b { font-size: 13px; color: #fff; }
.pred-card .verdict { margin-top: 10px; }
.says { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }

/* ---------- footer: one centred block, links as quiet pills ---------- */
.foot { margin-top: 18px; padding: 16px 16px 22px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; line-height: 1.5; }
.foot p { margin: 0; }
.foot p + p { margin-top: 2px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-bottom: 10px; }
.foot-links span { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 10.5px; margin-right: 2px; }
.foot .foot-links a { text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.foot .foot-links a:hover, .foot .foot-links a:focus-visible { color: var(--ink); border-color: var(--ink-3); }

/* 2025 season tile: playoff rows have no date column; long stat values step down a size */
.row.ly { grid-template-columns: minmax(0, 1fr) auto; }
.stat .v.sm { font-size: 15px; line-height: 1.5; white-space: nowrap; }

/* Sparkles twinkle: each of the three shapes pulses on its own beat. Off for people who ask for less motion. */
.ico.spark path { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
.ico.spark path:nth-child(2) { animation-delay: .8s; }
.ico.spark path:nth-child(3) { animation-delay: 1.6s; }
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(.55) rotate(18deg); opacity: .35; }
}
@media (prefers-reduced-motion: reduce) { .ico.spark path { animation: none; } }

/* Rankings now have the same six columns as the league table, so they use the same cell spacing. */
@media (max-width: 560px) {
  .rank th, .rank td { padding-left: 6px; padding-right: 6px; font-size: inherit; }
  .rank th { font-size: 11px; }
}
@media (max-width: 430px) { .rank th, .rank td { padding-left: 3px; padding-right: 3px; } }
/* A little air between the row's left edge (and the highlight bar) and the position number, in both tables. */
td.num:first-child, thead th:first-child { padding-left: 10px; }
.link-btn.small { font-size: 13px; color: var(--ink-2); }

/* ---------- More: a menu button as the fifth tab, opening a sheet ---------- */
.tabbar button { border: 0; background: none; display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.tabbar button.on { color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
:root[data-theme="dark"] .tabbar button.on { box-shadow: inset 0 3px 0 color-mix(in srgb, var(--accent) 70%, #fff); }
.burger { display: grid; gap: 5px; width: 24px; filter: none !important; opacity: 1 !important; }
.burger i { display: block; height: 2.5px; border-radius: 2px; background: currentColor; }
.more-list { grid-column: 1 / -1; display: grid; }
.more-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 6px; border-top: 1px solid var(--line); }
.more-item:first-child { border-top: 0; }
.more-item .e { font-size: 22px; text-align: center; }
.more-item b { display: block; } .more-item small { display: block; color: var(--ink-3); font-size: 12.5px; }
.more-item .go { color: var(--ink-3); font-size: 20px; }
.more-item.on b { color: var(--fav, var(--accent)); }
.more-item:hover, .more-item:focus-visible { background: var(--surface-2); border-radius: 12px; }

/* ---------- Compare two teams ---------- */
.compare-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 12px; }
.team-select { width: 100%; min-width: 0; font: inherit; font-weight: 600; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 10px; text-overflow: ellipsis; }
.swap { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); font-size: 18px; color: var(--ink-2); }

/* Footer sources on one line on a phone: tighter pills, no wrapping. */
.foot-links { flex-wrap: nowrap; gap: 4px; }
.foot-links span { font-size: 10px; letter-spacing: .04em; margin-right: 0; }
.foot .foot-links a { padding: 3px 7px; font-size: 11px; }
@media (max-width: 359px) { .foot-links { flex-wrap: wrap; } }  /* very small phones may still need two lines */

/* ---------- Compare: "If they played today" ---------- */
.whatif-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; font-weight: 700; color: var(--ink-2); }
.whatif-score b { font-size: 40px; line-height: 1; color: var(--ink); white-space: nowrap; }
.whatif-bar { display: flex; gap: 2px; height: 8px; margin: 12px 0 6px; }
.whatif-bar i { border-radius: 4px; min-width: 4px; } .whatif-bar i.t { background: color-mix(in srgb, var(--ink) 22%, transparent); }
.whatif-key { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); } .whatif-key b { font-size: 13px; color: var(--ink); }
:root[data-theme="dark"] .whatif-bar i:not(.t) { filter: brightness(1.7) saturate(1.15); }
/* Rough Estimate (roughEstimateTile() in app.js): deliberately plainer than "If they played today" -- a dashed
   border and a muted heading pill, so it never reads as confidently as one of Raj's real predictions. No
   coloured win-probability bar either (see the function itself): just the plain text percentages. */
.whatif-rough { border-style: dashed; }
.whatif-rough .tile-head h2 { color: var(--ink-3); }

/* ---------- first visit: welcome page ---------- */
.w-hero { border-radius: var(--radius); padding: 16px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--fill) 86%, #fff), color-mix(in srgb, var(--fill) 80%, #000)); box-shadow: 0 14px 28px -18px rgba(0, 0, 0, .55); }
.w-eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.w-hero h1 { margin: 0 0 8px; font-size: 22px; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.w-line { margin: 0; font-size: 14.5px; line-height: 1.45; opacity: .95; }
.w-prev { display: grid; gap: 8px; margin-top: 10px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 720px) { .w-prev { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.w-card { padding: 0 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.w-card[open] { padding-bottom: 8px; }
.w-card summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; cursor: pointer; list-style: none;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.w-card summary::-webkit-details-marker { display: none; }
.w-card summary::after { content: "▾"; font-size: 14px; color: var(--ink-3); transition: transform .15s; }
.w-card[open] summary::after { transform: rotate(180deg); }
.w-card summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .w-card summary::after { transition: none; } }
.w-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; }
.w-row .pos { width: 14px; color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.w-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-row b { font-variant-numeric: tabular-nums; } .w-row .when { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.w-pick { margin-top: 16px; } .w-pick h2 { margin: 0; font-size: 18px; }
@media (min-width: 720px) { .w-pick .school-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- track record and sharing ---------- */
/* The two pills sit in the middle of the card and are the same size; on a narrow phone they stack. */
.card-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.card-actions:empty { display: none; }
.card-actions .cta { margin-top: 0; }
.card-actions > * { min-width: 212px; justify-content: center; white-space: nowrap; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 0; font-weight: 700; font-size: 14px;
  color: #fff; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.share-btn:hover, .share-btn:focus-visible { background: rgba(255, 255, 255, .3); }
.share-btn .ico { width: 16px; height: 16px; }
.score-card .call { margin: 10px 0 0; font-weight: 600; white-space: nowrap; font-size: clamp(10.5px, 3.3vw, 12.5px); }
.streak { display: flex; gap: 5px; margin-top: 10px; }
.streak i { flex: 1; max-width: 26px; height: 8px; border-radius: 999px; background: var(--loss); }
.streak i.right, .streak i.exact { background: var(--win); }
.toast { position: fixed; z-index: 80; left: 50%; top: calc(70px + env(safe-area-inset-top)); transform: translateX(-50%); white-space: nowrap;
  padding: 9px 16px; border-radius: 999px; background: #131a24; color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .6); }

/* ---------- add to home screen ---------- */
button.more-item { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; color: inherit; font: inherit; }
.steps { grid-column: 1 / -1; margin: 4px 0 6px; padding-left: 22px; display: grid; gap: 10px; font-size: 14.5px; line-height: 1.4; }
.steps li::marker { font-weight: 700; color: var(--fav, var(--accent)); }

/* ---------- contact ---------- */
.contact { grid-column: 1 / -1; padding: 2px 0 6px; }
.contact p { margin: 0 0 4px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.contact .cta { text-decoration: none; margin-top: 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.contact-actions .cta { flex: 1 1 200px; white-space: nowrap; }
.contact .cta.ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }

/* ---------- school card: "Compare" pill at the right of the school's name ---------- */
.hero-top > div { flex: 1; min-width: 0; }
.cmp-pill { flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.cmp-pill:hover, .cmp-pill:focus-visible { background: rgba(255, 255, 255, .28); }
.cmp-pill .ico { width: 15px; height: 15px; margin-right: 0; overflow: visible; }
/* The arrows sit still; they part a little only when the pill is hovered, focused or pressed. */
.cmp-pill .ico path { transition: transform .18s ease; }
.cmp-pill:hover .a1, .cmp-pill:focus-visible .a1, .cmp-pill:active .a1 { transform: translateX(-2px); }
.cmp-pill:hover .a2, .cmp-pill:focus-visible .a2, .cmp-pill:active .a2 { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .cmp-pill .ico path { transition: none; } }

/* ---------- the look, chosen by the visitor ----------
   Two kinds, switched by the script (see applyScheme in app.js):

   ONE COLOUR (the default; <html> has no data-mix). The page is drawn from a single colour:
     --base    the chosen colour: the page glow and the tile tints
     --fill    the same colour made safe for white text: label pills, the school card, buttons, the top bar
     --fill-d  the fill used in dark mode, lifted when the colour is too close to black
   Every tile carries a clear tint of the colour (about 20%) and a band of it down the left side, on a plain white page
   (dark mode keeps a dark tinted page).

   PASTEL MIX (<html data-mix="...">). The earlier design: a different pastel on each tile, with the school card
   and buttons in the viewed school's own colour. The rules for that are the older ones above; the palettes for
   each mix are at the end of this file.

   Colours that carry meaning are never touched: green/grey/red for win, tie and loss, and each school's badge. */
:root { --base: #8B2C38; --fill: #8B2C38; --fill-d: #8B2C38; }   /* until the script sets them; the default is the viewed school's colour */
:root:not([data-mix]) .topbar { background: color-mix(in srgb, var(--fill) 58%, #000); border-bottom-color: color-mix(in srgb, var(--base) 55%, #fff); }

:root:not([data-mix])[data-theme="light"] { --bg: #fff; }
:root:not([data-mix])[data-theme="light"] body::before { background: var(--bg); }   /* plain white page; the tiles carry the colour */
:root:not([data-mix])[data-theme="light"] .grid > .tile:nth-child(n) { --tint: color-mix(in srgb, var(--base) 20%, #fff); --pop: color-mix(in srgb, var(--base) 46%, #fff); }
/* The tint holds across the tile instead of fading to near-white at the bottom. */
:root:not([data-mix])[data-theme="light"] .grid > .tile:not(.hero):not(.score-card):not(.th-c) {
  background: linear-gradient(165deg, var(--tint), color-mix(in srgb, var(--tint) 88%, #fff));
  --surface-2: rgba(255, 255, 255, .78);
}
:root:not([data-mix])[data-theme="light"] .tile-head h2, :root:not([data-mix])[data-theme="light"] details.tile > summary { background: var(--fill); color: #fff; }
:root:not([data-mix])[data-theme="light"] details.tile > summary::after { color: #fff; }
:root:not([data-mix])[data-theme="light"] .grid > .tile.hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--fill) 86%, #fff), color-mix(in srgb, var(--fill) 80%, #000));
  box-shadow: 0 14px 28px -16px var(--fill);
}

:root:not([data-mix])[data-theme="dark"] {
  --bg: color-mix(in srgb, var(--base) 16%, #08080c);
  --surface: color-mix(in srgb, var(--base) 16%, #101015);
  --surface-2: color-mix(in srgb, var(--base) 24%, #14141a);
  --line: color-mix(in srgb, var(--base) 38%, #1c1c24);
}
:root:not([data-mix])[data-theme="dark"] body::before {
  background:
    radial-gradient(55rem 28rem at -10% -5%, color-mix(in srgb, var(--base) 46%, transparent) 0%, transparent 60%),
    radial-gradient(50rem 30rem at 50% 112%, color-mix(in srgb, var(--base) 28%, transparent) 0%, transparent 60%),
    var(--bg);
}
:root:not([data-mix])[data-theme="dark"] .topbar { background: color-mix(in srgb, var(--fill-d) 42%, #000); }
:root:not([data-mix])[data-theme="dark"] .grid > .tile:nth-child(n) { --tint: color-mix(in srgb, var(--base) 48%, #0e0e13); --pop: color-mix(in srgb, var(--base) 56%, #fff); }
:root:not([data-mix])[data-theme="dark"] .grid > .tile.hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--fill-d) 88%, #fff), color-mix(in srgb, var(--fill-d) 72%, #000));
  box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--fill-d) 60%, #fff);
}
:root[data-theme="dark"] .w-hero { background: linear-gradient(135deg, color-mix(in srgb, var(--fill-d) 88%, #fff), color-mix(in srgb, var(--fill-d) 72%, #000)); }

/* A band of the colour down the left side of every tile (a lighter shade in dark mode, so it shows on the dark tile).
   Drawn as a layer that takes the tile's own rounded shape, so the band follows the corners without clipping the tile's contents. */
.grid > .tile:not(.hero):not(.score-card):not(.th-c) { position: relative; padding-left: 18px; }
.grid > .tile:not(.hero):not(.score-card):not(.th-c)::before {
  content: ""; position: absolute; inset: 0; border-radius: calc(var(--radius) - 1.5px); pointer-events: none;
  background: linear-gradient(90deg, var(--edge) 5px, transparent 5px);
}
:root:not([data-mix])[data-theme="light"] { --edge: var(--fill); }
:root:not([data-mix])[data-theme="dark"] { --edge: color-mix(in srgb, var(--fill-d) 62%, #fff); }
/* In a pastel mix every tile has its own colour, so each band takes the stronger shade of its own tile (the one behind its title). */
:root[data-mix] .grid > .tile { --edge: var(--pop); }

/* Selected filter chips follow the colour too (in a pastel mix they keep the violet-to-pink of that design). */
:root:not([data-mix])[data-theme="light"] .chip.on, :root:not([data-mix])[data-theme="dark"] .chip.on { background: var(--fav, var(--fill)); border-color: transparent; color: #fff; }

/* The picker */
.swatches { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.swatch { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px; border-radius: 12px; cursor: pointer;
  background: var(--surface-2); border: 2px solid var(--line); font-weight: 600; text-align: left; }
.swatch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch i { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); }
.swatch i.any { background: conic-gradient(#e11d48, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #e11d48); }
.swatch.on { border-color: var(--ink); }
.swatch.on::after { content: "✓"; margin-left: auto; font-weight: 800; }
.swatch:hover, .swatch:focus-visible, .swatch:focus-within { border-color: var(--ink-3); }
.swatch.on:hover { border-color: var(--ink); }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.theme-btn + .theme-btn { margin-left: 0; }
.swatch-h { grid-column: 1 / -1; margin: 6px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.swatch-h:first-child { margin-top: 0; }
/* The "Card style" swatches: a little preview of each look instead of a plain colour dot. */
.style-swatch.default i { border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.style-swatch.bold i { border-radius: 6px; background: #15161a; box-shadow: inset 0 0 0 1.5px var(--accent); }

/* ---------- pastel mixes ----------
   A mix is six tile tints (--t1..--t6), their matching label/border colours (--p1..--p6) and three soft page glows
   (--g1..--g3), given once for light and once for dark. Everything else comes from the earlier tile design above. */
:root[data-mix] .grid > .tile { --tint: var(--t1); --pop: var(--p1); }
:root[data-mix] .grid > .tile:nth-child(6n+2) { --tint: var(--t2); --pop: var(--p2); }
:root[data-mix] .grid > .tile:nth-child(6n+3) { --tint: var(--t3); --pop: var(--p3); }
:root[data-mix] .grid > .tile:nth-child(6n+4) { --tint: var(--t4); --pop: var(--p4); }
:root[data-mix] .grid > .tile:nth-child(6n+5) { --tint: var(--t5); --pop: var(--p5); }
:root[data-mix] .grid > .tile:nth-child(6n)   { --tint: var(--t6); --pop: var(--p6); }
:root[data-mix][data-theme="light"] body::before {
  background: radial-gradient(60rem 30rem at -10% -5%, var(--g1) 0%, transparent 60%), radial-gradient(50rem 28rem at 110% 10%, var(--g2) 0%, transparent 60%),
              radial-gradient(50rem 30rem at 50% 110%, var(--g3) 0%, transparent 60%), var(--bg); }
:root[data-mix][data-theme="dark"] body::before {
  background: radial-gradient(55rem 28rem at -10% -5%, var(--g1) 0%, transparent 60%), radial-gradient(48rem 26rem at 110% 12%, var(--g2) 0%, transparent 60%),
              radial-gradient(50rem 30rem at 50% 112%, var(--g3) 0%, transparent 60%), var(--bg); }

/* Cool pastels: lavender, mint, sky, sage, aqua, iris */
:root[data-mix="cool"][data-theme="light"] {
  --bg: #f6f8fe; --g1: #e3e1ff; --g2: #d9f1f8; --g3: #dcf3e6;
  --t1: #e9e7ff; --t2: #dff5f1; --t3: #e1efff; --t4: #e6f6ea; --t5: #e3f3fb; --t6: #ece8fb;
  --p1: #bcb4ff; --p2: #93dccf; --p3: #a3ccff; --p4: #a6dfb4; --p5: #9fd6ee; --p6: #c6b8f2; }
:root[data-mix="cool"][data-theme="dark"] {
  --g1: rgba(129, 120, 255, .28); --g2: rgba(56, 189, 248, .18); --g3: rgba(52, 211, 153, .16);
  --t1: #1b1a40; --t2: #0f2a27; --t3: #11243d; --t4: #122a1b; --t5: #0f2733; --t6: #231c3f;
  --p1: #a5a0ff; --p2: #5eead4; --p3: #60a5fa; --p4: #6ee7a0; --p5: #67d5f5; --p6: #c4b5fd; }

/* Warm pastels: peach, butter, rose, sand, honey, coral */
:root[data-mix="warm"][data-theme="light"] {
  --bg: #fff9f3; --g1: #ffe1cc; --g2: #ffecbc; --g3: #ffd8df;
  --t1: #ffe9da; --t2: #fff2d1; --t3: #ffe2e4; --t4: #fdecd8; --t5: #fff4d8; --t6: #ffe1d3;
  --p1: #ffb07a; --p2: #f6c453; --p3: #ff9aa2; --p4: #f3b27c; --p5: #f8cf6a; --p6: #ff9d7a; }
:root[data-mix="warm"][data-theme="dark"] {
  --g1: rgba(251, 146, 60, .24); --g2: rgba(251, 191, 36, .14); --g3: rgba(251, 113, 133, .18);
  --t1: #2b1810; --t2: #2b2310; --t3: #2e1319; --t4: #2a1b11; --t5: #2c2512; --t6: #2f160f;
  --p1: #fb923c; --p2: #fbbf24; --p3: #fb7185; --p4: #fdba74; --p5: #fcd34d; --p6: #f97316; }

/* Sky and sand: two colours, alternating */
:root[data-mix="two"][data-theme="light"] {
  --bg: #f8f9fc; --g1: #dbe9fb; --g2: #faefd6; --g3: #dbe9fb;
  --t1: #e3effd; --t2: #fbf1dc; --t3: #e3effd; --t4: #fbf1dc; --t5: #e3effd; --t6: #fbf1dc;
  --p1: #9ec5f5; --p2: #eccb7c; --p3: #9ec5f5; --p4: #eccb7c; --p5: #9ec5f5; --p6: #eccb7c; }
:root[data-mix="two"][data-theme="dark"] {
  --g1: rgba(96, 165, 250, .24); --g2: rgba(236, 203, 124, .14); --g3: rgba(96, 165, 250, .16);
  --t1: #11233d; --t2: #2a2312; --t3: #11233d; --t4: #2a2312; --t5: #11233d; --t6: #2a2312;
  --p1: #7fb2f5; --p2: #eccb7c; --p3: #7fb2f5; --p4: #eccb7c; --p5: #7fb2f5; --p6: #eccb7c; }

/* Brighter mix: lavender, mint, peach, sky, pink and butter, stronger */
:root[data-mix="bright"][data-theme="light"] {
  --bg: #faf7ff; --g1: #e2d3ff; --g2: #cdeaff; --g3: #ffd6ea;
  --t1: #e3d9ff; --t2: #cff5df; --t3: #ffe0c2; --t4: #d3e8ff; --t5: #ffd6e8; --t6: #fff0b3;
  --p1: #a98bff; --p2: #58d596; --p3: #ff9f4a; --p4: #5aa9ff; --p5: #ff6fae; --p6: #f5c518; }
:root[data-mix="bright"][data-theme="light"] .grid > .tile:not(.hero):not(.score-card):not(.th-c) { background: linear-gradient(165deg, var(--tint), color-mix(in srgb, var(--tint) 75%, #fff)); }
:root[data-mix="bright"][data-theme="dark"] {
  --g1: rgba(124, 92, 255, .36); --g2: rgba(56, 189, 248, .24); --g3: rgba(244, 114, 182, .26);
  --t1: #2a2160; --t2: #0f3a26; --t3: #40260f; --t4: #12305a; --t5: #45193a; --t6: #3b330f;
  --p1: #a78bfa; --p2: #4ade80; --p3: #fb923c; --p4: #60a5fa; --p5: #f472b6; --p6: #facc15; }

/* White tiles: the six colours live only in the small label pills */
:root[data-mix="neutral"][data-theme="light"] {
  --bg: #f3f4f8; --g1: #e9e6f7; --g2: #e3eef8; --g3: #f6e8ee;
  --t1: #ffffff; --t2: #ffffff; --t3: #ffffff; --t4: #ffffff; --t5: #ffffff; --t6: #ffffff;
  --p1: #cdbdff; --p2: #9be3bd; --p3: #ffc490; --p4: #a6d3ff; --p5: #ffb0cf; --p6: #ffdf66; }
:root[data-mix="neutral"][data-theme="light"] .grid > .tile:not(.hero):not(.score-card):not(.th-c) {
  background: #fff; border: 1px solid #e3e6ee; box-shadow: 0 10px 24px -18px rgba(40, 50, 90, .5); --surface-2: #f3f4f8; }
:root[data-mix="neutral"][data-theme="dark"] {
  --g1: rgba(124, 92, 255, .16); --g2: rgba(56, 189, 248, .1); --g3: rgba(244, 114, 182, .12);
  --t1: #171a22; --t2: #171a22; --t3: #171a22; --t4: #171a22; --t5: #171a22; --t6: #171a22;
  --p1: #a78bfa; --p2: #4ade80; --p3: #fb923c; --p4: #60a5fa; --p5: #f472b6; --p6: #facc15; }
:root[data-mix="neutral"][data-theme="dark"] .grid > .tile:not(.hero):not(.score-card):not(.th-c) { background: #171a22; border: 1px solid #2a2f3b; box-shadow: none; }

/* Slate tiles: every tile is slate and its title pill dark slate; the colour lives only in each tile's left band, a different
   bright colour on each (the Brighter mix's six). The school card keeps the school's colour, as in the other mixes. */
:root[data-mix="slate"][data-theme="light"] {
  --bg: #f4f6f9; --g1: #e2e7ef; --g2: #e6ebf2; --g3: #eceff4;
  --t1: #dfe4eb; --t2: #dfe4eb; --t3: #dfe4eb; --t4: #dfe4eb; --t5: #dfe4eb; --t6: #dfe4eb;
  --p1: #a98bff; --p2: #58d596; --p3: #ff9f4a; --p4: #5aa9ff; --p5: #ff6fae; --p6: #f5c518; }
:root[data-mix="slate"][data-theme="light"] .grid > .tile:not(.hero):not(.score-card):not(.th-c) {
  background: #dfe4eb; border: 1px solid #cfd6e0; box-shadow: 0 10px 22px -16px rgba(30, 41, 59, .45); }
:root[data-mix="slate"][data-theme="dark"] {
  --g1: rgba(100, 116, 139, .22); --g2: rgba(71, 85, 105, .2); --g3: rgba(100, 116, 139, .16);
  --t1: #1e293b; --t2: #1e293b; --t3: #1e293b; --t4: #1e293b; --t5: #1e293b; --t6: #1e293b;
  --p1: #a78bfa; --p2: #4ade80; --p3: #fb923c; --p4: #60a5fa; --p5: #f472b6; --p6: #facc15; }
:root[data-mix="slate"][data-theme="dark"] .grid > .tile:not(.hero):not(.score-card):not(.th-c) { background: #1e293b; border: 1px solid #334155; box-shadow: none; }
:root[data-mix="slate"] .tile-head h2, :root[data-mix="slate"] details.tile > summary { background: #334155; color: #fff; }
:root[data-mix="slate"][data-theme="dark"] .tile-head h2, :root[data-mix="slate"][data-theme="dark"] details.tile > summary { background: #475569; }
:root[data-mix="slate"] details.tile > summary::after { color: #fff; }

/* Dark mode: several school colours are very dark (navy, maroon), so a badge gets a faint ring to stay visible. */
:root[data-theme="dark"] .badge { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .3); }
/* .hero/.score-card's own background is duoBg(A, B) -- the exact same color(id) each side's own badge uses --
   so a badge sat on its own half of that gradient was invisible but for its ring (fill and background being
   literally the same colour), on any pairing, not just a dark one. A brightness() dip isn't actually enough to
   fix it: a colour that's already fairly dark (a slate, say) just gets darker, nowhere near the contrast a
   bright school colour gets from the same filter. Mixing toward white by a fixed ratio instead (badge() in
   app.js also sets --bc, since CSS can't read the inline style otherwise) shifts every colour by a comparable,
   guaranteed amount regardless of how dark or light it started -- !important to win over that inline style. */
:root[data-theme="dark"] .hero .badge, :root[data-theme="dark"] .score-card .badge { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); background: color-mix(in srgb, var(--bc, currentColor) 55%, #fff) !important; }
:root[data-theme="dark"] .mu-vs .badge.lg { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .3), 0 6px 14px -6px rgba(0, 0, 0, .45); }

/* ---------- school card: a ball in outline ----------
   A large ball, half off the right edge of the card. White at low strength, so it suits any colour and sits
   behind the school's name, the Compare pill and the record boxes. From the pre-playoff season's plain
   .tile.hero; the playoff-era selected-school tile (.po-hero, then .th-c) carried it too. */
.grid > .tile.hero, .grid > .tile.th-c { position: relative; overflow: hidden; }
.grid > .tile.hero > *, .grid > .tile.th-c > * { position: relative; z-index: 1; }
.grid > .tile.hero::before, .grid > .tile.th-c::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 240' preserveAspectRatio='xMaxYMid slice'%3E%3Cg fill='none' stroke='%23FFD54A' stroke-opacity='.045' stroke-width='.7' stroke-linejoin='round'%3E%3Ccircle cx='330' cy='120' r='104'/%3E%3Cpath d='M330.0 84.6 L363.6 109.1 L350.8 148.6 L309.2 148.6 L296.4 109.1Z M330.0 84.6 L330.0 51.4 M330.0 51.4 L287.7 25.0 M330.0 51.4 L372.3 25.0 M372.3 25.0 L380.7 50.2 L407.3 50.4 M363.6 109.1 L395.3 98.8 M395.3 98.8 L407.3 50.4 M395.3 98.8 L433.4 130.9 M433.4 130.9 L412.1 146.7 L420.1 172.0 M350.8 148.6 L370.3 175.5 M370.3 175.5 L420.1 172.0 M370.3 175.5 L351.6 221.7 M351.6 221.7 L330.0 206.3 L308.4 221.7 M309.2 148.6 L289.7 175.5 M289.7 175.5 L308.4 221.7 M289.7 175.5 L239.9 172.0 M239.9 172.0 L247.9 146.7 L226.6 130.9 M296.4 109.1 L264.7 98.8 M264.7 98.8 L226.6 130.9 M264.7 98.8 L252.7 50.4 M252.7 50.4 L279.3 50.2 L287.7 25.0'/%3E%3C/g%3E%3C/svg%3E") right center / cover no-repeat;
}
/* Upcoming Game (.po-champ) gets the same ball, mirrored to the left -- but on ::after, not ::before: it's an
   ordinary tile too, so ::before is already its own left edge band (the rule just above), and the two would
   otherwise fight over the same pseudo-element. Same fix Past Games' own ball (.pg, further down) already uses. */
.grid > .tile.po-champ { overflow: hidden; }
.grid > .tile.po-champ > * { position: relative; z-index: 1; }
.grid > .tile.po-champ::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; transform: scaleX(-1);
  /* 82.5%/50% (the ball's own cx/cy as a fraction of the image, not the box) as the *position*, not a
     transform-origin: background-position's percentage anchors that exact point in the image to that same
     fraction of the box for any background-size, so the ball's own centre stays put as the size grows. A
     transform-origin percentage is relative to the box instead, which doesn't track the image at all -- that
     mismatch is what sent the ball to the wrong side last time. */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 240' preserveAspectRatio='xMaxYMid slice'%3E%3Cg fill='none' stroke='%23FFD54A' stroke-opacity='.045' stroke-width='.7' stroke-linejoin='round'%3E%3Ccircle cx='330' cy='120' r='104'/%3E%3Cpath d='M330.0 84.6 L363.6 109.1 L350.8 148.6 L309.2 148.6 L296.4 109.1Z M330.0 84.6 L330.0 51.4 M330.0 51.4 L287.7 25.0 M330.0 51.4 L372.3 25.0 M372.3 25.0 L380.7 50.2 L407.3 50.4 M363.6 109.1 L395.3 98.8 M395.3 98.8 L407.3 50.4 M395.3 98.8 L433.4 130.9 M433.4 130.9 L412.1 146.7 L420.1 172.0 M350.8 148.6 L370.3 175.5 M370.3 175.5 L420.1 172.0 M370.3 175.5 L351.6 221.7 M351.6 221.7 L330.0 206.3 L308.4 221.7 M309.2 148.6 L289.7 175.5 M289.7 175.5 L308.4 221.7 M289.7 175.5 L239.9 172.0 M239.9 172.0 L247.9 146.7 L226.6 130.9 M296.4 109.1 L264.7 98.8 M264.7 98.8 L226.6 130.9 M264.7 98.8 L252.7 50.4 M252.7 50.4 L279.3 50.2 L287.7 25.0'/%3E%3C/g%3E%3C/svg%3E") 82.5% 50% / 160% no-repeat;
}
/* Past Games (.pg) gets the same ball too, right side -- unflipped, same orientation as the selected-team
   card -- same ::after fix as Upcoming Game, for the same reason (::before is its own left edge band). */
.grid > .tile.pg { overflow: hidden; }
.grid > .tile.pg > * { position: relative; z-index: 1; }
.grid > .tile.pg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 240' preserveAspectRatio='xMaxYMid slice'%3E%3Cg fill='none' stroke='%23FFD54A' stroke-opacity='.045' stroke-width='.7' stroke-linejoin='round'%3E%3Ccircle cx='330' cy='120' r='104'/%3E%3Cpath d='M330.0 84.6 L363.6 109.1 L350.8 148.6 L309.2 148.6 L296.4 109.1Z M330.0 84.6 L330.0 51.4 M330.0 51.4 L287.7 25.0 M330.0 51.4 L372.3 25.0 M372.3 25.0 L380.7 50.2 L407.3 50.4 M363.6 109.1 L395.3 98.8 M395.3 98.8 L407.3 50.4 M395.3 98.8 L433.4 130.9 M433.4 130.9 L412.1 146.7 L420.1 172.0 M350.8 148.6 L370.3 175.5 M370.3 175.5 L420.1 172.0 M370.3 175.5 L351.6 221.7 M351.6 221.7 L330.0 206.3 L308.4 221.7 M309.2 148.6 L289.7 175.5 M289.7 175.5 L308.4 221.7 M289.7 175.5 L239.9 172.0 M239.9 172.0 L247.9 146.7 L226.6 130.9 M296.4 109.1 L264.7 98.8 M264.7 98.8 L226.6 130.9 M264.7 98.8 L252.7 50.4 M252.7 50.4 L279.3 50.2 L287.7 25.0'/%3E%3C/g%3E%3C/svg%3E") 82.5% 50% / 160% no-repeat;
}

/* ---------- match details card ---------- */
/* Home school on the left; between the two, "vs" (or the score), the day, the time and League / Non-League. */
.match-card .score-grid { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 6px; margin: 4px 0 6px; }
.sc-mid { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 1px; white-space: nowrap; }
.sc-mid .vs { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.sc-mid b { font-size: 15.5px; }
.sc-mid span { font-size: 13.5px; }
.sc-mid span:empty { display: none; }
.sc-mid small { font-size: 11.5px; color: rgba(255, 255, 255, .82); }
.sc-mid .big-score { font-size: 30px; line-height: 1.1; }
/* Prediction is frosted, so it reads on any two school colours. */
:root .match-card .card-actions .cta { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
:root .match-card .card-actions .cta:hover, :root .match-card .card-actions .cta:focus-visible { background: rgba(255, 255, 255, .3); filter: none; }
/* Share is a soft icon in the card's top right corner: no button shape, just the mark, brighter on touch. */
.match-card { position: relative; }
.share-corner { position: absolute; top: 6px; right: 6px; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: rgba(255, 255, 255, .72); }
.share-corner .ico { width: 18px; height: 18px; margin: 0; }
.share-corner:hover, .share-corner:focus-visible { color: #fff; background: rgba(255, 255, 255, .16); }

/* ---------- right / missed marks ---------- */
.mark { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%; color: #fff; vertical-align: -0.26em; flex: none; }
.mark svg { width: 64%; height: 64%; }
.mark.right { background: var(--win); } .mark.miss { background: var(--loss); }
.mu-call .mark, .score-card .call .mark { vertical-align: 0.03em; }   /* sits level with the middle of the words beside it */
.called { white-space: nowrap; font-size: clamp(12px, 3.55vw, 15px); }   /* call and verdict stay on one line; the type eases down on a narrow phone */
.called-how { white-space: nowrap; font-weight: 700; margin-left: 4px; }   /* the verdict, on the call's own line and in its type */
.called-how .mark { vertical-align: -0.2em; margin-right: 2px; }
.score-card .mark { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .75); }   /* a white edge, so it holds on any school colour */
.rows .res .mark { font-size: 15px; }

/* ---------- header: a hint of goal net ---------- */
/* A patch of net behind the site name, bulging as if the ball had just hit it, in the same faint white line as the ball on the
   school card and fading out to the right. The picture is drawn by mockup/header-net/net.py (a mesh of diamonds pushed outwards from one point). */
body:not(.admin) .topbar::before {
  content: ""; position: absolute; left: 0; top: 0; width: 260px; max-width: 62%; height: 100%; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='96'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' y1='0' x2='1' y2='.25'%3E%3Cstop offset='0' stop-color='white'/%3E%3Cstop offset='.35' stop-color='white'/%3E%3Cstop offset='.95' stop-color='black'/%3E%3C/linearGradient%3E%3Cmask id='m'%3E%3Crect width='260' height='96' fill='url%28%23f%29'/%3E%3C/mask%3E%3C/defs%3E%3Cpath d='M-27 95 L-22 100 L-17 105 L-12 110 L-7 115 M-6.8 -20.5 L-11.7 -15.4 L-16.6 -10.3 L-21.5 -5.2 L-26.4 -0.1 M-26.3 70.1 L-21.3 75.2 L-16.4 80.2 L-11.4 85.3 L-6.5 90.4 L-1.5 95.4 L3.6 100.5 L8.6 105.5 L13.7 110.5 L18.8 115.4 M18.1 -21.9 L12.9 -16.7 L7.9 -11.4 L2.9 -6.1 L-2 -0.8 L-6.8 4.4 L-11.5 9.6 L-16.2 14.8 L-21 19.9 L-25.7 25 L-30.4 30 M-30.4 40 L-25.6 45.1 L-20.8 50.2 L-16.1 55.3 L-11.2 60.5 L-6.4 65.7 L-1.5 70.9 L3.5 76.1 L8.5 81.2 L13.6 86.4 L18.8 91.5 L23.9 96.5 L29.1 101.5 L34.3 106.4 L39.5 111.2 L44.7 116.1 M44 -24.2 L38.3 -19.1 L32.7 -13.9 L27.2 -8.4 L21.9 -2.8 L16.8 2.9 L11.9 8.5 L7.2 14 L2.7 19.5 L-1.9 24.8 L-6.4 30 L-10.8 35.1 L-15.4 40.2 L-20 45.2 L-24.6 50.1 L-29.3 55.1 M-29.4 14.9 L-24.7 19.9 L-20.1 24.9 L-15.4 30 L-10.8 35.1 L-6.3 40.3 L-1.6 45.6 L3 50.9 L7.8 56.4 L12.7 61.8 L17.8 67.3 L23 72.7 L28.3 78.1 L33.8 83.3 L39.3 88.3 L44.7 93.2 L50.1 97.9 L55.5 102.6 L60.7 107.2 L65.9 111.8 L71 116.4 M72.2 -25.4 L66.6 -21.2 L60.6 -16.8 L54.4 -12.1 L47.9 -6.9 L41.4 -1.1 L35.4 5.3 L29.9 11.8 L25 18.2 L20.5 24.2 L16.2 30 L12.1 35.5 L7.9 40.7 L3.7 45.8 L-0.6 50.8 L-4.9 55.7 L-9.4 60.5 L-13.9 65.4 L-18.6 70.3 L-23.3 75.1 L-28.1 80.1 M-28.2 -10.1 L-23.4 -5.2 L-18.8 -0.3 L-14.2 4.6 L-9.7 9.6 L-5.3 14.5 L-0.9 19.6 L3.4 24.7 L7.7 30 L12.1 35.5 L16.5 41.1 L21.2 47 L26.2 53.1 L31.5 59.1 L37.3 65.1 L43.3 70.7 L49.4 75.9 L55.3 80.7 L61.2 85.3 L66.7 89.7 L72.1 94 L77.4 98.3 L82.5 102.6 L87.5 107 L92.4 111.5 L97.3 116 M100.1 -23.8 L95.4 -19.8 L90.6 -15.9 L85.6 -12.1 L80.3 -8.5 L74.2 -4.9 L66.9 -1 L58 4.2 L48.7 12.3 L41.8 21.7 L37.3 30 L33.6 36.7 L30.1 42.5 L26.4 47.7 L22.6 52.6 L18.6 57.3 L14.5 62 L10.3 66.6 L6 71.3 L1.6 76 L-3 80.7 L-7.6 85.4 L-12.3 90.2 L-17.1 95.1 L-22 100 L-27 105 M-12.5 -20.3 L-7.9 -15.5 L-3.4 -10.8 L1.1 -6 L5.4 -1.3 L9.6 3.5 L13.7 8.4 L17.7 13.3 L21.6 18.5 L25.5 24 L29.4 30 L33.6 36.7 L38.7 44.2 L45.1 52 L52.7 58.9 L60.4 64.5 L67.4 69 L73.7 73 L79.4 76.8 L84.7 80.7 L89.7 84.7 L94.6 88.7 L99.4 92.9 L104.1 97.2 L108.9 101.6 L113.6 106.1 L118.4 110.7 L123.2 115.4 M125.8 -21.6 L121.3 -17.1 L117 -12.7 L112.8 -8.4 L108.6 -4.1 L104.6 0.2 L100.7 4.4 L97 8.7 L93.6 13.2 L90.7 18.5 L89 30 L66.1 49.4 L57.3 51.2 L52.2 54.2 L47.8 57.7 L43.5 61.5 L39.3 65.4 L35 69.5 L30.7 73.6 L26.4 77.9 L22 82.2 L17.5 86.6 L12.9 91.2 L8.3 95.8 L3.6 100.5 L-1.2 105.2 L-6.1 110.1 L-11 115 M12.3 -21.5 L16.7 -17 L21.1 -12.5 L25.3 -8.2 L29.4 -3.8 L33.4 0.5 L37.3 4.8 L41 9.3 L44.4 14 L47.2 19.6 L49.6 30 L66.1 49.4 L78.9 52.3 L85 55 L89.8 58.3 L94.3 61.9 L98.6 65.8 L102.9 69.8 L107.3 73.9 L111.7 78.1 L116.1 82.4 L120.6 86.8 L125.1 91.3 L129.8 95.9 L134.5 100.5 L139.2 105.3 L144.1 110.1 L149 115 M150.6 -20.4 L146 -15.6 L141.5 -10.9 L137.1 -6.1 L132.8 -1.4 L128.6 3.4 L124.5 8.2 L120.6 13.1 L116.7 18.3 L112.9 23.9 L109 30 L104.7 36.9 L99.5 44.7 L92.7 52.7 L84.7 59.5 L76.9 64.7 L70 69 L63.9 72.9 L58.3 76.7 L53.1 80.6 L48.2 84.5 L43.4 88.6 L38.6 92.8 L33.9 97.1 L29.1 101.5 L24.4 106 L19.6 110.6 L14.8 115.3 M37.8 -23.6 L42.5 -19.6 L47.2 -15.6 L52.1 -11.9 L57.3 -8.2 L63.1 -4.7 L70 -1.1 L78.8 3.6 L88.8 11.2 L96.4 21.2 L101.1 30 L104.7 36.9 L108.2 42.7 L111.9 47.9 L115.6 52.8 L119.6 57.5 L123.6 62.2 L127.8 66.8 L132.1 71.4 L136.5 76.1 L141 80.7 L145.7 85.5 L150.4 90.3 L155.1 95.1 L160 100 L165 105 L170 110 L175 115 M176 -20 L171.1 -15 L166.3 -10.1 L161.5 -5.2 L156.9 -0.3 L152.3 4.6 L147.8 9.5 L143.4 14.5 L139.1 19.5 L134.8 24.7 L130.6 30 L126.2 35.5 L121.8 41.3 L117.1 47.2 L112 53.4 L106.6 59.5 L100.7 65.4 L94.6 71 L88.4 76.1 L82.4 80.9 L76.6 85.4 L71.1 89.7 L65.7 94 L60.5 98.3 L55.5 102.6 L50.5 107 L45.6 111.4 L40.7 116 M65.6 -25.4 L71.1 -21.2 L77 -17 L83.3 -12.4 L89.9 -7.3 L96.5 -1.5 L102.7 4.8 L108.3 11.5 L113.3 18 L117.8 24.2 L122.1 30 L126.2 35.5 L130.4 40.8 L134.5 45.9 L138.8 50.8 L143.1 55.7 L147.5 60.6 L152 65.4 L156.6 70.3 L161.3 75.2 L166.1 80.1 L171 85 L176 90 L181 95 L186 100 L191 105 L196 110 L201 115 M202 -20 L197 -15 L192 -10 L187 -5 L182 -0 L177.1 5 L172.3 9.9 L167.5 14.9 L162.8 19.9 L158.2 24.9 L153.6 30 L149 35.1 L144.5 40.3 L139.9 45.6 L135.2 51 L130.4 56.5 L125.5 62 L120.4 67.5 L115.1 72.9 L109.7 78.3 L104.2 83.4 L98.7 88.4 L93.2 93.3 L87.8 98 L82.5 102.6 L77.2 107.2 L72 111.8 L67 116.4 M93.9 -24.3 L99.6 -19.3 L105.3 -14.1 L110.9 -8.6 L116.2 -3 L121.4 2.7 L126.3 8.4 L131 13.9 L135.6 19.4 L140.1 24.8 L144.6 30 L149 35.1 L153.5 40.2 L158.1 45.2 L162.7 50.2 L167.4 55.1 L172.2 60.1 L177.1 65 L182 70 L187 75 L192 80 L197 85 L202 90 L207 95 L212 100 L217 105 L222 110 L227 115 M228 -20 L223 -15 L218 -10 L213 -5 L208 0 L203 5 L198 10 L193 15 L188 20 L183.1 25 L178.2 30 L173.3 35 L168.5 40.1 L163.7 45.1 L159 50.2 L154.2 55.4 L149.4 60.5 L144.5 65.7 L139.6 71 L134.6 76.2 L129.6 81.4 L124.5 86.5 L119.3 91.6 L114.1 96.6 L108.9 101.6 L103.6 106.5 L98.5 111.3 L93.3 116.1 M120 -22.1 L125.2 -16.8 L130.2 -11.5 L135.2 -6.2 L140.1 -0.9 L144.9 4.3 L149.7 9.6 L154.4 14.7 L159.1 19.9 L163.8 25 L168.5 30 L173.3 35 L178.1 40 L183 45 L188 50 L193 55 L198 60 L203 65 L208 70 L213 75 L218 80 L223 85 L228 90 L233 95 L238 100 L243 105 L248 110 L253 115 M254 -20 L249 -15 L244 -10 L239 -5 L234 0 L229 5 L224 10 L219 15 L214 20 L209 25 L204 30 L199 35 L194 40 L189 45 L184 50 L179.1 55 L174.1 60 L169.2 65.1 L164.3 70.1 L159.4 75.2 L154.5 80.3 L149.5 85.4 L144.5 90.4 L139.5 95.5 L134.5 100.5 L129.4 105.5 L124.3 110.5 L119.3 115.5 M144.9 -20.6 L149.8 -15.5 L154.7 -10.3 L159.6 -5.2 L164.5 -0.2 L169.3 4.9 L174.2 10 L179.1 15 L184 20 L189 25 L194 30 L199 35 L204 40 L209 45 L214 50 L219 55 L224 60 L229 65 L234 70 L239 75 L244 80 L249 85 L254 90 L259 95 L264 100 L269 105 L274 110 L279 115 M280 -20 L275 -15 L270 -10 L265 -5 L260 0 L255 5 L250 10 L245 15 L240 20 L235 25 L230 30 L225 35 L220 40 L215 45 L210 50 L205 55 L200 60 L195 65 L190 70 L185 75 L180 80 L175 85 L170 90 L165 95 L160 100 L155 105 L150 110 L145 115 M170.1 -20 L175 -15 L180 -10 L185 -5 L190 0 L195 5 L200 10 L205 15 L210 20 L215 25 L220 30 L225 35 L230 40 L235 45 L240 50 L245 55 L250 60 L255 65 L260 70 L265 75 L270 80 L275 85 L280 90 L285 95 L290 100 M286 0 L281 5 L276 10 L271 15 L266 20 L261 25 L256 30 L251 35 L246 40 L241 45 L236 50 L231 55 L226 60 L221 65 L216 70 L211 75 L206 80 L201 85 L196 90 L191 95 L186 100 L181 105 L176 110 L171 115 M196 -20 L201 -15 L206 -10 L211 -5 L216 0 L221 5 L226 10 L231 15 L236 20 L241 25 L246 30 L251 35 L256 40 L261 45 L266 50 L271 55 L276 60 L281 65 L286 70 M287 25 L282 30 L277 35 L272 40 L267 45 L262 50 L257 55 L252 60 L247 65 L242 70 L237 75 L232 80 L227 85 L222 90 L217 95 L212 100 L207 105 L202 110 L197 115 M222 -20 L227 -15 L232 -10 L237 -5 L242 0 L247 5 L252 10 L257 15 L262 20 L267 25 L272 30 L277 35 L282 40 L287 45 M288 50 L283 55 L278 60 L273 65 L268 70 L263 75 L258 80 L253 85 L248 90 L243 95 L238 100 L233 105 L228 110 L223 115 M248 -20 L253 -15 L258 -10 L263 -5 L268 0 L273 5 L278 10 L283 15 L288 20 M289 75 L284 80 L279 85 L274 90 L269 95 L264 100 L259 105 L254 110 L249 115 M274 -20 L279 -15 L284 -10 L289 -5 M290 100 L285 105 L280 110 L275 115' fill='none' stroke='white' stroke-opacity='.12' stroke-width='1.1' stroke-linejoin='round' stroke-linecap='round' mask='url%28%23m%29'/%3E%3C/svg%3E") left top / 260px 96px no-repeat;
}
body:not(.admin) .topbar > * { position: relative; }

/* ---------- the playoffs on Home ---------- */
/* No forced border/background here any more (see git history for the !important/--po-accent version this
   replaced) -- tried making Next State Game, Playoff Path and Full Bracket share one colour so they'd stop
   clashing under a Pastel Mix scheme, but asked, on reflection, to go back to the original Pastel Mix design
   instead: every tile, these three included, takes its colour from its own position in the grid (--pop/--tint,
   set by the already-existing per-theme/per-mix rules), the same as any ordinary .tile. */
.po-card, .po-champ { color: #fff; }
.po-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.po-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; letter-spacing: .01em; }
.po-card .muted, .po-champ .muted { color: rgba(255, 255, 255, .78); }
.po-champ-action { margin: 6px 0 0; text-align: center; font-weight: 600; font-size: 9.5px; color: rgba(255, 255, 255, .72); text-transform: uppercase; letter-spacing: .04em; }
/* The "can't predict this one" reason sentence is prose, not a short caption like the rest of .po-champ-action's
   uses (score summaries, labels) -- a full sentence in all caps is harder to read, so this turns that off and
   restores normal letter-spacing/size for it specifically, keeping the same muted colour and centering. */
.po-champ-reason { text-transform: none; letter-spacing: normal; font-size: 12px; font-weight: 500; }
/* Next State Game's rough estimate: big percentage left, sentence beside it (same shape as .th-stat-champ). */
.po-rough { display: flex; align-items: center; gap: 12px; margin: 10px auto 0; padding: 9px 12px; max-width: 340px; text-align: left; background: rgba(255, 255, 255, .12); border-radius: 12px; }
.po-rough-pct { flex: none; font-size: 25.5px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.po-rough-text { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 500; line-height: 1.35; color: rgba(255, 255, 255, .88); }
.keep-case { text-transform: none; }
/* The championship tile reuses the Past Games carousel's own badge/name/divider/meta classes (lr-*) -- same
   "Upcoming Games" layout from mockup/ecrl/match-tile -- just recoloured for its white-on-gradient card instead
   of the plain surface Past Games sits on. */
.po-champ .tile-head { margin-bottom: 14px; }
.po-champ .tile-head h2 { color: rgba(255, 255, 255, .85); }
.po-champ .lr-sched-pill { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .32); color: #fff; }
.po-champ .lr-sched-pill:hover, .po-champ .lr-sched-pill:focus-visible { background: rgba(255, 255, 255, .28); }
.po-champ .lr-name { color: rgba(255, 255, 255, .78); }
.po-champ .lr-name.me { color: #fff; }
/* Tighter than Past Games' own divider -- both lines here (meta above, Raj's summary below) sit close against
   the line instead of floating a full paragraph's distance from it. */
.po-champ .lr-divider { background: rgba(255, 255, 255, .22); margin: 8px 0 6px; }
/* Meta sits above the divider here, the reverse of Past Games (where it's the divider's own margin that spaces
   it below) -- so this one needs its own top margin instead. */
/* Round tag and date/time nearly always fit one line; the venue (a third span, only here -- Past Games' own
   lr-meta never has one) wraps to a second. .lr-meta's shared 16px gap is a column gap between the first two;
   as a row gap once the venue wraps, that read as a much bigger drop than intended, so this closes it up on
   its own row while leaving the horizontal spacing alone. */
.po-champ .lr-meta { color: rgba(255, 255, 255, .72); margin-top: 14px; row-gap: 4px; }
.po-champ .lr-actions { gap: 8px; flex-wrap: wrap; }
.po-champ .lr-nav { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .32); color: #fff; }
.po-champ .lr-nav:hover, .po-champ .lr-nav:focus-visible { background: rgba(255, 255, 255, .28); }
.po-champ .lr-dots i { background: rgba(255, 255, 255, .3); }
.po-champ .lr-dots i.on { background: #fff; }
.po-champ-vs { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.po-champ-score { margin: 1px 0; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }

/* The Final, once it's done, gets a trophy card instead of the plain vs/score layout -- gold-on-black and
   celebratory for the win (confetti flecks, a giant faint watermark of the team's own badge letters), a muted
   quiet version for a loss. Scoped to exactly these two modifier classes on .po-champ -- nothing else on the
   page is touched. This is the one tile that deliberately ignores the page's own colour scheme (see the
   comment on playoffTimeline()'s championship var in app.js): a trophy stays gold regardless.
   !important is required on background/border/box-shadow: :root[data-theme="dark"] .grid > .tile (far up this
   file) redeclares --tint/--pop from --accent at a higher specificity than any plain .po-champ.champ-win
   selector could reach, the same trap .th-c/.po-champ's base rules already had to clear. */
.po-champ.champ-win {
  background: radial-gradient(130% 150% at 88% 8%, rgba(139, 28, 56, .4), transparent 55%), linear-gradient(135deg, #171310, #0a0908) !important;
  border-color: #d4af37 !important; box-shadow: 0 0 0 1px rgba(212, 175, 55, .35), 0 16px 32px -18px rgba(0, 0, 0, .7) !important;
}
.po-champ.champ-loss { background: linear-gradient(135deg, #1b1f26, #0e1116) !important; border-color: rgba(255, 255, 255, .22) !important; box-shadow: 0 14px 28px -18px rgba(0, 0, 0, .6) !important; }
/* The one-off commemorative photo (see championshipCard()): the picture already has its own border, header and
   background baked in, so the tile around it goes flat and the photo bleeds to the tile's own edges instead of
   sitting inside another frame. */
.po-champ.champ-photo { background: #0a0908 !important; border-color: #0a0908 !important; padding: 0 !important; }
.po-champ.champ-photo::before, .po-champ.champ-photo::after { display: none !important; }
.po-trophy-photo { margin: 0; line-height: 0; }
.po-trophy-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
/* A giant, near-invisible echo of the team's own badge letters in the corner -- the same "C" watermark the
   reference design uses, built from short(id) instead of a fixed logo so it works for any school. */
.po-trophy-watermark { position: absolute; top: -0.2em; right: -0.1em; font-size: 130px; font-weight: 900; line-height: 1;
  color: rgba(212, 175, 55, .14); letter-spacing: -.04em; pointer-events: none; user-select: none; z-index: 0; }
.champ-loss .po-trophy-watermark { color: rgba(255, 255, 255, .1); }
/* Confetti: small gold flecks, each a tiny rotated rectangle, scattered near the card's corners -- left side
   (the icon) and right side (the text block) both. On .po-trophy/.po-trophy-icon/.po-trophy-body, not
   .po-champ itself -- .po-champ's own ::before/::after are already claimed (the ordinary-tile left edge band
   and the soccer-ball inlay respectively; see the comment on that ball further up this file about never
   fighting over the same pseudo-element twice). */
.champ-win .po-trophy::before, .champ-win .po-trophy-icon::before, .champ-win .po-trophy-icon::after,
.champ-win .po-trophy-body::before, .champ-win .po-trophy-body::after {
  content: ""; position: absolute; width: 5px; height: 11px; border-radius: 1px;
  background: linear-gradient(#f3d57a, #c9a227); opacity: .85; pointer-events: none; z-index: 1;
}
.champ-win .po-trophy::before { top: -6px; left: 2px; transform: rotate(-18deg); }
.champ-win .po-trophy-icon::before { top: -10px; right: -6px; transform: rotate(22deg); }
.champ-win .po-trophy-icon::after { bottom: -8px; right: 10px; transform: rotate(-8deg); width: 4px; height: 8px; }
.champ-win .po-trophy-body::before { top: -10px; right: 12px; transform: rotate(16deg); }
.champ-win .po-trophy-body::after { top: 2px; right: -4px; transform: rotate(-12deg); width: 4px; height: 8px; }
/* Two more flecks, on elements that had no ::before/::after of their own yet. */
.champ-win .po-trophy-name::before, .champ-win .po-trophy-banner::after {
  content: ""; position: absolute; width: 4px; height: 8px; border-radius: 1px;
  background: linear-gradient(#f3d57a, #c9a227); opacity: .8; pointer-events: none; z-index: 1;
}
.champ-win .po-trophy-name::before { top: -4px; left: -10px; transform: rotate(-24deg); }
.champ-win .po-trophy-score::before { bottom: -10px; left: 6px; transform: rotate(18deg); }
/* The banner's two laurel sprigs (one mirrored) and the card's four corner brackets -- the frame and foliage
   from the reference design, both win-only like everything else celebratory here. */
.po-trophy-sprig { width: 16px; height: 16px; flex: none; opacity: .75; vertical-align: middle; }
.po-trophy-sprig-flip { display: inline-flex; transform: scaleX(-1); }
.po-trophy-corner { position: absolute; width: 20px; height: 20px; pointer-events: none; z-index: 1; opacity: .9; }
.po-trophy-corner svg { width: 100%; height: 100%; display: block; }
.po-trophy-corner.tl { top: -6px; left: -6px; }
.po-trophy-corner.tr { top: -6px; right: -6px; transform: scaleX(-1); }
.po-trophy-corner.bl { bottom: -6px; left: -6px; transform: scaleY(-1); }
.po-trophy-corner.br { bottom: -6px; right: -6px; transform: scale(-1, -1); }
/* A gold ribbon sweeping low across the card, behind everything else -- its own element (not a pseudo-element:
   both of .po-trophy's own slots are already the first confetti fleck and nothing else, but a sweep this wide
   needs to span the full card, not anchor to one narrow column the way the flecks do). */
.po-trophy-ribbon { position: absolute; left: -10%; right: -10%; bottom: 14%; height: 22px;
  background: linear-gradient(100deg, transparent, rgba(212, 175, 55, .25) 45%, rgba(243, 213, 122, .4) 50%, rgba(212, 175, 55, .25) 55%, transparent);
  transform: rotate(-6deg); pointer-events: none; z-index: 0; }
.po-trophy { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 2px 2px; min-height: 108px; }
.po-trophy-icon { position: relative; font-size: 44px; line-height: 1; filter: drop-shadow(0 0 10px rgba(212, 175, 55, .55)); z-index: 1; }
.champ-loss .po-trophy-icon { filter: none; opacity: .85; }
.po-trophy-svg { position: relative; width: 60px; height: 60px; flex: none; filter: drop-shadow(0 0 10px rgba(212, 175, 55, .55)); z-index: 1; }
.po-trophy-body { position: relative; z-index: 1; min-width: 0; }
.po-trophy-eyebrow { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); white-space: nowrap; }
.po-trophy-eyebrow::before, .po-trophy-eyebrow::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .18); min-width: 10px; }
/* A serif face for the champion's own name and the labels around it -- the one place on the site that departs
   from the system sans, on purpose, to read like an engraved trophy plate rather than another app screen. */
.champ-win .tile-head h2, .champ-loss .tile-head h2,
.po-trophy-eyebrow, .po-trophy-name, .po-trophy-banner, .po-trophy-meta { font-family: Georgia, "Times New Roman", serif; }
.po-trophy-name { margin: 4px 0 6px; font-size: 19px; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; color: #fff; line-height: 1.15; overflow-wrap: break-word; }
.po-trophy-banner { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; width: fit-content; }
.champ-win .po-trophy-banner { background: linear-gradient(135deg, #f3d57a, #c9a227); color: #2a1f05; box-shadow: 0 0 14px -2px rgba(212, 175, 55, .6); }
.champ-loss .po-trophy-banner { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .75); }
.po-trophy-score { display: flex; align-items: baseline; gap: 6px; margin: 0 0 8px; padding: 4px 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; font-size: 14px; font-weight: 800; color: #fff; white-space: nowrap; width: fit-content; background: rgba(0, 0, 0, .25); }
.champ-win .po-trophy-score { border-color: rgba(212, 175, 55, .45); }
.po-trophy-score .vs { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.po-trophy-meta { margin: 0; font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .55); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.po-trophy-meta::before, .po-trophy-meta::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .18); }
.po-trophy-meta.po-trophy-sub { margin-top: 5px; white-space: normal; justify-content: center; text-align: center; }
.po-trophy-meta.po-trophy-sub::before, .po-trophy-meta.po-trophy-sub::after { display: none; }
@media (max-width: 360px) { .po-trophy-icon { font-size: 34px; } .po-trophy-svg { width: 48px; height: 48px; } .po-trophy-name { font-size: 16px; } .po-trophy-watermark { font-size: 84px; } }

/* "Who's waiting in the next round" -- its own tile (see nextRoundOutlook in app.js), not squeezed into a
   track box. A full-width split bar in each candidate's own colour, then each team spelled out below with
   its badge, name and share, so it reads without needing the track box next to it for context. */
.np-bar { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; background: var(--surface-2); margin-bottom: 10px; }
.np-bar i { display: block; min-width: 4px; }
.np-teams { display: flex; flex-direction: column; gap: 8px; }
.np-team { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.np-team a { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; }
.np-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-pct { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }

/* The playoff timeline, inside the hero itself (see playoffTimeline() and playoffHero() in app.js) -- just the
   live part of the run (next game, then any further projections) now; already-played rounds no longer get
   their own list here (the Last Result tile below covers recent results instead), and the Final is pulled out
   entirely into its own tile (.po-champ, in dashboard()'s grid) rather than reading as just one more line.
   Colours lean on translucent white rather than the theme's surface/line tokens, the same adaptation .mu-cta
   and .muted already make for sitting on the hero's own accent-coloured gradient instead of the page background. */
.po-path-wrap { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .22); }
.po-path { display: flex; flex-direction: column; }
.po-path-wrap > .po-path { padding-left: 14px; }
.po-path-step { display: flex; gap: 12px; text-decoration: none; color: inherit; padding-bottom: 16px; }
.po-path-step:last-child { padding-bottom: 0; }
.po-path-dotcol { display: flex; flex-direction: column; align-items: center; flex: none; width: 28px; }
.po-path-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; color: #fff; flex: none; }
.po-path-dot.win { background: color-mix(in srgb, var(--win) 75%, transparent); }
.po-path-dot.loss { background: color-mix(in srgb, var(--loss) 75%, transparent); }
.po-path-dot.tie { background: color-mix(in srgb, var(--tie) 75%, transparent); }
.po-path-dot.now { background: rgba(255, 255, 255, .22); border: 2px solid #fff; }
.po-path-dot.proj { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); border: 1px solid rgba(255, 255, 255, .3); }
.po-path-dot.champ { background: linear-gradient(135deg, #e8c96a, #a9781f); font-size: 15px; }
.po-path-line { flex: 1; width: 2px; min-height: 10px; background: rgba(255, 255, 255, .25); margin-top: 2px; }
.po-path-body { flex: 1; min-width: 0; padding-top: 2px; }
.po-path-round { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: rgba(255, 255, 255, .72); }
.po-path-vs { display: block; margin-top: 2px; font-weight: 700; font-size: clamp(13px, 3.6vw, 15px); overflow-wrap: break-word; color: #fff; }
.po-path-score { display: block; margin-top: 1px; font-size: 12.5px; color: rgba(255, 255, 255, .78); font-variant-numeric: tabular-nums; }
.po-path-cta { display: inline-flex; align-items: center; margin-top: 6px; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .85); white-space: nowrap; text-decoration: none; }
.po-path-step:hover .po-path-vs, .po-path-step:focus-visible .po-path-vs { text-decoration: underline; }
.po-path-step:hover .po-path-cta, .po-path-step:focus-visible .po-path-cta { background: rgba(255, 255, 255, .26); color: #fff; }
/* The "vs Northeastern"/projected-opponent pills live inside .po-path-vs's own line now (see
   statePathTile()'s pathCmpPill and the "now" row's inline View matchup), not below it as a block -- undo
   the block-cta spacing so each sits on the text's baseline, and opt back out of Bold style's uppercase
   (inherited from .po-path-vs) since a pill isn't a team-name label. */
.po-path-vs .po-path-cta { margin: 0 0 0 2px; vertical-align: middle; font-size: 10px; padding: 2px 7px; text-transform: none; letter-spacing: normal; }
/* The championship row: two separate pills (not one row-wide link), so each needs its own hover/focus state. */
.po-path-cta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.po-path-cta-row .po-path-cta:hover, .po-path-cta-row .po-path-cta:focus-visible { background: rgba(255, 255, 255, .26); color: #fff; }
.po-path-step.loss .po-path-score { color: #ffd4cf; }
/* A pill that reads as a button but isn't one -- Next State Game's "Raj's Prediction" when the game genuinely
   isn't forecastable (see stateGameTile() in app.js). A <span>, not an <a>, so there's nothing to click either
   way; the dimmed look just makes that visible instead of looking like a live pill with a slow link. */
.po-path-cta.disabled { opacity: .5; cursor: default; }

/* The full field, round by round: real games once they're added, a quiet placeholder line until then. */
.po-card .row.me { background: var(--hl); border-radius: 10px; box-shadow: inset 3px 0 0 var(--accent); }
.po-tbd { font-style: italic; opacity: .72; }

/* ---------- card style: "Bold" ----------
   A second look chosen from the "Card style" picker (see applyStyle() in app.js), replacing every tile's own
   colour-scheme tint/gradient with one flat dark card everywhere -- the "Stacked Vs" skin from
   mockup/ecrl/match-tile, generalised past the single component it was built for. It still honours whichever
   colour the visitor picked on this same screen: var(--accent) is always that colour (set inline by
   applyScheme(), school colour or custom pick alike -- even in a pastel mix, where it follows the viewed
   school), so Bold's border/highlight colour is never hard-coded here, only the dark surfaces it sits on are.
   Team badges keep each school's own colour as their ring (inline style, untouched): colours that carry
   meaning are never touched.

   Most surfaces below (pills, chips, the compare picker, the welcome cards) are already drawn from --surface /
   --surface-2 / --line / --ink*, so redefining those tokens re-skins them for free -- with !important on each,
   since the colour scheme's own dark-mode rule (":root:not([data-mix])[data-theme=\"dark\"]") redefines the very
   same tokens at higher specificity (0,3,0 against this block's 0,2,0) and would otherwise win the cascade and
   quietly leave those surfaces in the scheme's tint instead of Bold's fixed dark. The handful of tiles that
   paint a literal gradient on top of those tokens (.grid > .tile's own theme rules, the hero/score-card/
   playoff cards) need their own override below -- at (0,4,0) specificity, equal to the highest existing rule,
   so !important plus this block's place at the very end of the file is what makes Bold win there too. */
:root[data-style="bold"] {
  --bg: #0b0b0e !important;
  --surface: #15161a !important;
  --surface-2: #1f2024 !important;
  --line: var(--accent) !important;
  --ink: #fff !important;
  --ink-2: #c7c9cf !important;
  --ink-3: #8a8f99 !important;
  --hl: color-mix(in srgb, var(--accent) 18%, transparent) !important;
  --shadow: none !important;
}
:root[data-style="bold"] body::before { background: #0b0b0e !important; }
:root[data-style="bold"] .topbar { background: #15161a !important; border-bottom-color: var(--accent) !important; }
:root[data-style="bold"] .tabbar { background: #15161a !important; border-top-color: var(--accent) !important; }
:root[data-style="bold"] .tabbar a.on, :root[data-style="bold"] .tabbar button.on { box-shadow: inset 0 3px 0 var(--accent) !important; }

/* Every plain tile: flat dark card, accent-coloured border and left edge. --edge is redeclared here, right on
   the tile, rather than once up at :root -- custom properties resolve var() against whatever already-computed
   value they inherit, so a :root-level --edge would keep reading the page's own accent even on po-champ/po-card,
   which each pin their OWN --accent to the viewed team's colour (inline style) rather than the page's.
   Declaring it again here, on the tile itself, makes it re-resolve against that tile's own --accent instead --
   the same fix :root[data-mix] already makes for the pastel mixes' --edge, below. */
/* var(--pop, var(--accent)): a pastel mix has no single accent colour of its own (applyScheme() leaves --accent
   pinned to the viewed school's colour there, for the buttons and hero that are supposed to use it) -- but it
   does give every tile its own --pop shade by grid position, the same one Default tints that tile's label pill
   with, so Bold borrows that instead when it's there, falling back to --accent for a one-colour scheme (which
   has no --pop at all). Without this, every tile's border went flat to the school's colour under any mix --
   exactly the one case where Default's tiles are each a different colour and Bold's all looked the same. */
:root[data-style="bold"] .grid > .tile {
  background: #15161a !important; border: 1.5px solid var(--pop, var(--accent)) !important; box-shadow: none !important;
  --edge: var(--pop, var(--accent)) !important;
}
:root[data-style="bold"] .tile-head h2,
:root[data-style="bold"] details.tile > summary {
  background: none !important; color: #8a8f99 !important; padding: 0 !important; border-radius: 0 !important;
}
:root[data-style="bold"] details.tile > summary::after { color: #8a8f99 !important; }

/* Hero, score cards and the playoff cards: the same flat dark card instead of their own colour gradient. */
:root[data-style="bold"] .grid > .tile.hero,
:root[data-style="bold"] .grid > .tile.score-card,
:root[data-style="bold"] .po-card,
:root[data-style="bold"] .po-champ {
  background: #15161a !important; border: 1.5px solid var(--po-accent, var(--accent)) !important; box-shadow: none !important; color: #fff !important;
}
/* The trophy card stays gold/silver-on-black even under Bold -- same reasoning as the Default override above,
   just also winning against Bold's own !important flat-card rule immediately above. */
:root[data-style="bold"] .po-champ.champ-win {
  background: radial-gradient(130% 150% at 85% 10%, rgba(139, 28, 56, .35), transparent 60%), linear-gradient(135deg, #171310, #0a0908) !important;
  border: 1.5px solid #d4af37 !important; box-shadow: 0 0 0 1px rgba(212, 175, 55, .3) !important;
}
:root[data-style="bold"] .po-champ.champ-loss {
  background: linear-gradient(135deg, #1b1f26, #0e1116) !important; border: 1.5px solid rgba(255, 255, 255, .22) !important;
}
:root[data-style="bold"] .score-card .cta {
  background: transparent !important; color: #fff !important; box-shadow: none !important; border: 1.5px solid var(--accent) !important;
}

/* Pills and buttons: a rounded rectangle with an accent-coloured border, not a fully-round chip. The same
   var(--pop, var(--accent)) fallback as the tile border above -- a button inside a mix-tinted tile (the
   Championship tile's "Full prediction"/"Title Odds", say) picks up that tile's own --pop this way, rather
   than every button sitting in the school's colour regardless of which tile it's in. */
:root[data-style="bold"] .cta,
:root[data-style="bold"] .cmp-pill,
:root[data-style="bold"] .pov-pill,
:root[data-style="bold"] .chip,
:root[data-style="bold"] .tag,
:root[data-style="bold"] .share-btn,
:root[data-style="bold"] .po-path-cta {
  background: transparent !important; border: 1.5px solid var(--pop, var(--accent)) !important; border-radius: 8px !important;
  color: #fff !important; box-shadow: none !important;
}
:root[data-style="bold"] .cta:hover, :root[data-style="bold"] .cta:focus-visible,
:root[data-style="bold"] .cmp-pill:hover, :root[data-style="bold"] .cmp-pill:focus-visible,
:root[data-style="bold"] .pov-pill:hover, :root[data-style="bold"] .pov-pill:focus-visible,
:root[data-style="bold"] .share-btn:hover, :root[data-style="bold"] .share-btn:focus-visible,
:root[data-style="bold"] .po-path-cta:hover, :root[data-style="bold"] .po-path-step:hover .po-path-cta {
  background: color-mix(in srgb, var(--pop, var(--accent)) 15%, transparent) !important; filter: none !important;
}
:root[data-style="bold"] .chip.on { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
:root[data-style="bold"] .pov-pill.solid { border-color: var(--accent) !important; background: var(--accent) !important; }

/* Team names: white, bold, uppercase -- the mockup's look -- wherever a team's full name appears. */
:root[data-style="bold"] .matchup .who b,
:root[data-style="bold"] .score-grid a,
:root[data-style="bold"] .pick-grid a,
:root[data-style="bold"] .mu-vs a b,
:root[data-style="bold"] .po-path-vs {
  text-transform: uppercase; letter-spacing: .01em; font-weight: 800 !important; color: #fff !important;
}
/* Playoff Path's longer prose lines ("CHS would face the winner of...", "Opponent not yet decided") aren't a
   short team-name label like the rest of .po-path-vs's uses above -- a full sentence in caps is harder to read,
   same reasoning as .po-champ-reason's own exception elsewhere in this file. */
:root[data-style="bold"] .po-path-vs-prose { text-transform: none; letter-spacing: normal; }

/* The welcome hero keeps the same treatment as every other card. */
:root[data-style="bold"] .w-hero { background: #15161a !important; border: 1.5px solid var(--accent) !important; box-shadow: none !important; }
.cs-badge.cs-rec { background: transparent; color: var(--ink); }
.cs-badge.cs-win { position: relative; background: transparent; color: var(--win); box-shadow: none; box-sizing: border-box;
  width: 18px; height: 15px; padding: 0; line-height: 15px; text-align: center; }
/* Long dashes (9.6 on, 2.5 off: four dashes round the pill) -- a CSS dashed border's dash length can't be set, so the outline is a small SVG. */
.cs-badge.cs-win svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 9.6 2.5; }
.pair .n-badged .cs-badge.cs-win { padding: 0; }
.po-key { display: flex; align-items: center; gap: 6px; margin: 2px 0 4px; }
.po-key .cs-badge { flex: none; }
.cs-badge.cs-win.cs-won svg { stroke-dasharray: none; }
.po-keys { margin: 2px 0 4px; }
.po-keys .po-key { margin: 0 0 3px; }
