/* PanPlay. Chalk by day, night pitch by night. Scores set in a condensed
   scoreboard face; floodlight yellow marks anything live; pitch green marks
   what you follow.

   Every value below comes from a token. Add a token before adding a value. */
:root {
  /* colour */
  --bg: #EDF1EE;          /* chalk */
  --surface: #FFFFFF;
  --sunk: #E2E8E4;
  --ink: #17222B;
  --muted: #55636C;       /* ≥4.5:1 on bg, surface and sunk */
  --line: #D3DCD7;        /* decorative only: never the sole carrier of meaning */
  --pitch: #0A7350;       /* follow, selected, wins */
  --pitch-ink: #FFFFFF;
  --flood: #FFC21A;       /* live */
  --flood-ink: #1E1600;
  --loss: #B4372F;
  --loss-ink: #FFFFFF;
  --draw: #8A949A;
  --draw-ink: #17222B;
  --shadow: 0 1px 2px rgba(10, 30, 25, .12);
  --scrim: rgba(4, 14, 12, .5);
  --spot: #17222B;        /* the hero card on Home: the darkest thing on the page */
  --spot-ink: #EDF1EE;

  /* type: two families, seven sizes */
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 3.4rem;

  /* space, radius, motion, touch */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-pill: 999px;
  --t-fast: 150ms; --t-med: 200ms;
  --tap: 44px;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1A1D;        /* night pitch */
    --surface: #13272B;
    --sunk: #0F2124;
    --ink: #E8F1ED;
    --muted: #8DA39E;
    --line: #22393D;
    --pitch: #3CCB91;
    --pitch-ink: #04231A;
    --loss: #E26A61;
    --loss-ink: #1A0806;
    --draw: #7F918D;
    --draw-ink: #0B1513;
    --spot: #1D3F3A;
    --spot-ink: #E8F1ED;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs-md)/1.4 var(--font);
  padding-bottom: calc(68px + var(--safe-b));
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--pitch); outline-offset: 2px; border-radius: var(--r-sm); }
.ic { width: 22px; height: 22px; flex: none; }
[hidden] { display: none !important; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: var(--safe-t); }
.bar { display: flex; align-items: center; gap: var(--s1); padding: var(--s2) var(--s2) 2px var(--s4); min-height: 56px; }
body.sub .bar { padding-left: var(--s1); border-bottom: 1px solid var(--line); }
h1 { flex: 1; margin: 0; font: 700 var(--fs-2xl)/1 var(--cond); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.sub h1 { font-size: var(--fs-lg); font-weight: 600; }
.actions { display: flex; }
.icon-btn { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: var(--r-md); color: var(--ink); transition: background var(--t-fast); }
.icon-btn:hover, .icon-btn:active { background: var(--sunk); }

.scroll { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s1) var(--s4); scrollbar-width: none; scroll-snap-type: x proximity; }
.scroll::-webkit-scrollbar { display: none; }

/* chip: sport filter */
.chip { flex: none; display: inline-flex; gap: var(--s1); align-items: center; padding: 0 var(--s4); min-height: var(--tap); border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); font: 600 var(--fs-md)/1 var(--cond); letter-spacing: .01em; white-space: nowrap;
  transition: border-color var(--t-fast), background var(--t-fast); }
.chip:hover { border-color: var(--muted); }
.chip:active { background: var(--sunk); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.more { color: var(--muted); border-style: dashed; padding-left: var(--s3); }
.chip.more .ic { width: 16px; height: 16px; }

/* day: date picker */
.date-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s1) var(--s4) 0; }
.date-month { position: relative; display: inline-flex; align-items: center; gap: var(--s1); min-height: 32px; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.date-month::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); margin-left: var(--s1); }
.date-month input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.date-month:has(input:focus-visible) { outline: 2px solid var(--pitch); outline-offset: 2px; border-radius: var(--r-sm); }
.date-bar .link { font-size: var(--fs-sm); }
.day--first { position: relative; margin-left: var(--s2); }
.day--first::before { content: ''; position: absolute; left: calc(-1 * var(--s2) - 1px); top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.day { flex: none; width: 52px; min-height: 54px; border-radius: var(--r-md); display: grid; place-items: center; align-content: center; gap: 1px; scroll-snap-align: center; transition: background var(--t-fast); }
.day:hover { background: var(--sunk); }
.day small { color: var(--muted); font-size: var(--fs-xs); }
.day b { font: 700 var(--fs-xl)/1 var(--cond); }
.day.on { background: var(--pitch); color: var(--pitch-ink); }
.day.on small { color: inherit; opacity: .85; }

/* seg: All / Live / Following */
.live-filter { display: flex; padding: 0 var(--s4) var(--s3); }
.live-filter[hidden] { display: none; }
.chip--live { min-height: 36px; padding: 0 var(--s3); font-size: var(--fs-sm); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--flood); box-shadow: inset 0 0 0 1.5px var(--flood-ink); }
.chip--live.on .live-dot { background: currentColor; }
.seg { display: flex; margin: 2px var(--s4) var(--s3); background: var(--sunk); border-radius: var(--r-md); padding: 3px; }
.seg button { flex: 1; min-height: var(--tap); border-radius: var(--r-sm); font-weight: 500; font-size: var(--fs-sm); color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

/* ---- scores list ---- */
main { max-width: 640px; margin: 0 auto; padding: var(--s1) var(--s3) var(--s2); }
.league h2 { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin: var(--s5) var(--s1) var(--s2);
  font: 600 var(--fs-lg)/1.2 var(--cond); letter-spacing: .01em; }
.league h2 span { display: inline-flex; gap: var(--s2); align-items: center; min-width: 0; }
.league h2 small { font: 400 var(--fs-xs) var(--font); color: var(--muted); }

/* badge: status (final, kick-off time, live) and the Demo tag */
.badge { display: inline-flex; align-items: center; gap: var(--s1); padding: var(--s1) var(--s2); border-radius: var(--r-pill);
  font: 600 var(--fs-sm)/1.1 var(--cond); font-style: normal; color: var(--muted); background: var(--sunk); max-width: 100%; text-align: center; }
.badge--time { background: none; color: var(--ink); font-size: var(--fs-md); padding-inline: 2px; white-space: nowrap; }
.badge--live { background: var(--flood); color: var(--flood-ink); text-align: left; }
.badge--live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; flex: none; }
.badge--demo { font: 500 var(--fs-xs)/1 var(--font); border-radius: var(--r-sm); }
.badge--real { font: 500 var(--fs-xs)/1 var(--font); border-radius: var(--r-sm); color: var(--pitch); background: color-mix(in srgb, var(--pitch) 12%, transparent); }
@keyframes pulse { 50% { opacity: .2; } }

/* crest: team or athlete badge */
.crest { width: 26px; height: 26px; flex: none; border-radius: 50%; object-fit: contain; display: grid; place-items: center;
  background: var(--sunk); color: var(--muted); font: 700 .62rem/1 var(--cond); letter-spacing: .02em; }
.crest--lg { width: 56px; height: 56px; font-size: var(--fs-md); }
.crest--xl { width: 72px; height: 72px; font-size: var(--fs-lg); }

/* match card */
.match { display: flex; align-items: stretch; background: var(--surface); border-radius: var(--r-md); margin-bottom: 6px; cursor: pointer;
  border: 1px solid transparent; transition: border-color var(--t-fast); }
.match:hover { border-color: var(--line); }
.match:active { border-color: var(--muted); }
.match.live { box-shadow: inset 4px 0 0 var(--flood); }
.teams { flex: 1; min-width: 0; padding: 6px var(--s1) 6px var(--s3); }
.team { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); }
.name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.score { min-width: 34px; text-align: right; padding-right: 6px; font: 700 var(--fs-xl)/1 var(--cond); font-variant-numeric: tabular-nums; }
.match.final .team:not(.win) .name, .match.final .team:not(.win) .score { color: var(--muted); }
.match.final .team.win .name { font-weight: 600; }
.status { width: 92px; flex: none; min-width: 0; display: grid; place-items: center; padding: var(--s1); text-align: center; }

/* star: follow toggle on cards */
.star { width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--muted); border-radius: var(--r-md); transition: background var(--t-fast); }
.star:hover, .star:active { background: var(--sunk); }
.star .ic { width: 18px; height: 18px; }
.star.on { color: var(--pitch); }
.star.on .ic { fill: currentColor; }

/* ranked events inside cards */
.match.event .teams { padding: var(--s3) var(--s2) var(--s2) var(--s3); }
.ev-title { font: 600 var(--fs-md)/1.2 var(--cond); margin-bottom: var(--s1); }
.ev-sub { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 2px; }
.res { display: flex; align-items: center; gap: var(--s2); min-height: 28px; }
.res.muted { color: var(--muted); font-size: var(--fs-sm); }
.res .name { font-weight: 500; }
small.cty, .res small, .results small, .startlist small { color: var(--muted); font-size: var(--fs-xs); }

/* pos-badge: finishing position, everywhere it appears */
.pos-badge { min-width: 22px; height: 22px; padding: 0 var(--s1); border-radius: var(--r-pill); display: inline-grid; place-items: center;
  font: 700 var(--fs-xs)/1 var(--cond); background: var(--sunk); color: var(--muted); flex: none; }
.pos-badge--first { background: var(--flood); color: var(--flood-ink); }

/* mark: a time, distance or score in a results row */
.mark { font: 600 var(--fs-md)/1 var(--cond); font-variant-numeric: tabular-nums; padding-right: var(--s1); text-align: right; }

.skeleton { height: 92px; border-radius: var(--r-md); margin: var(--s2) 0; background: linear-gradient(90deg, var(--surface), var(--sunk), var(--surface)); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
.empty { text-align: center; color: var(--muted); padding: 48px var(--s5); max-width: 34ch; margin: 0 auto; }
.source { max-width: 640px; margin: var(--s1) auto var(--s4); padding: 0 var(--s4); text-align: center; font-size: var(--fs-xs); color: var(--muted); }
.source button { color: var(--pitch); text-decoration: underline; min-height: var(--tap); padding: 0 var(--s1); }

/* ---- match screen ---- */
.page { padding-top: var(--s2); }
.board { background: var(--surface); border-radius: var(--r-lg); padding: var(--s3) var(--s3) var(--s4); margin-bottom: var(--s3); text-align: center; }
.board.live { box-shadow: inset 0 4px 0 var(--flood); }
.board-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: var(--s3); color: var(--muted); font-size: var(--fs-sm); }
.board-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--s2); margin: var(--s3) 0; }
.side { display: grid; justify-items: center; gap: var(--s2); font-weight: 600; line-height: 1.2; padding: 6px 2px; border-radius: var(--r-md); transition: background var(--t-fast); }
.side:hover, .side:active { background: var(--sunk); }
.board-score { font: 700 var(--fs-3xl)/1 var(--cond); font-variant-numeric: tabular-nums; display: flex; gap: var(--s2); align-items: baseline; padding: 0 var(--s1); }
.board-score .dash { color: var(--muted); font-weight: 500; }
.board-score .lose { color: var(--muted); }
.board-score.soon { font-size: var(--fs-2xl); }
.board-scorers { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--s2); align-items: start; margin: 0 0 var(--s3); font-size: var(--fs-sm); }
.board-scorers .sc-ball { padding-top: 1px; color: var(--muted); }
.board-scorers .sc-ball .ic { width: 14px; height: 14px; }
.scorers { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; color: var(--muted); }
.scorers--home { text-align: right; }
.scorers--away { text-align: left; }
.scorers li { overflow-wrap: anywhere; }
.scorers .sc-name { color: var(--ink); }
.scorers small { font-size: var(--fs-xs); }
.sc-red { display: inline-block; width: 8px; height: 11px; border-radius: 2px; background: var(--loss); margin-right: 4px; vertical-align: -1px; }
.board-title { font: 700 var(--fs-2xl)/1.1 var(--cond); margin: var(--s3) 0; }
.board-status { display: flex; justify-content: center; align-items: center; gap: var(--s3); }
.board-status .badge { font-size: var(--fs-md); padding: 6px var(--s3); }
.board-status .sub { color: var(--muted); font-size: var(--fs-sm); }

/* block: a section card on detail screens */
.block { background: var(--surface); border-radius: var(--r-md); padding: var(--s4) var(--s4) var(--s3); margin-bottom: var(--s3); }
.block.flat { background: none; padding: 0; }
.block h3 { margin: 0 0 var(--s3); font: 600 var(--fs-lg)/1.2 var(--cond); }
.block.flat h3 { margin: var(--s4) var(--s1) var(--s2); }
.block p { margin: 0 0 var(--s2); }
.block.error { text-align: center; }
.recap { font-size: var(--fs-md); line-height: 1.55; max-width: 62ch; }
.fine { color: var(--muted); font-size: var(--fs-sm); }
.btn { min-height: var(--tap); padding: 0 var(--s5); border-radius: var(--r-md); background: var(--pitch); color: var(--pitch-ink); font: 600 var(--fs-md)/1 var(--cond); }
.btn:hover { filter: brightness(1.08); }

.timeline { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: 1fr 48px 1fr; align-items: center; min-height: var(--tap); border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; }
.ev .h { display: flex; justify-content: flex-end; align-items: center; gap: var(--s2); text-align: right; }
.ev .a { display: flex; align-items: center; gap: var(--s2); }
.ev .min { text-align: center; font: 700 var(--fs-md)/1 var(--cond); color: var(--muted); }
.who { display: grid; }
.who b { font-weight: 600; }
.who small { color: var(--muted); font-size: var(--fs-xs); }
.ic.goal { width: 18px; height: 18px; color: var(--pitch); }
.cardmark { width: 12px; height: 16px; border-radius: 2px; flex: none; }
.cardmark.yellow { background: var(--flood); }
.cardmark.red { background: var(--loss); }

.stat { margin: var(--s3) 0; }
.stat-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.stat-top b { font: 700 var(--fs-lg)/1 var(--cond); font-variant-numeric: tabular-nums; }
.stat-top span { color: var(--muted); font-size: var(--fs-sm); }
.sbar { display: flex; gap: var(--s1); height: 6px; }
.sbar i { display: block; border-radius: 3px; background: var(--pitch); }
.sbar i + i { background: var(--draw); }

.tbl-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--s1)); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.grid th, .grid td { padding: var(--s2) 6px; text-align: center; white-space: nowrap; }
.grid thead th { color: var(--muted); font-weight: 500; font-size: var(--fs-xs); }
.grid tbody th { text-align: left; font: 600 var(--fs-md)/1 var(--cond); }
.grid td { font: 600 var(--fs-lg)/1 var(--cond); }
.grid tbody tr + tr th, .grid tbody tr + tr td { border-top: 1px solid var(--line); }
.grid .tot { font-weight: 700; }
.grid td.cur { color: var(--pitch); }
.results td { padding: 2px var(--s1); border-top: 1px solid var(--line); }
.results tr:first-child td { border-top: 0; }
.link { display: inline-flex; align-items: center; min-height: var(--tap); color: inherit; font-weight: 500; text-align: left;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--muted); }
.startlist { margin: 0; padding-left: 22px; columns: 2; }

.innings + .innings { border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s3); }
.inn-top { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s1); }
.inn-top b { flex: 1; }
.inn-top .big { font: 700 var(--fs-xl)/1 var(--cond); }
.inn-top small { color: var(--muted); }

.extlink { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); color: var(--pitch); font-weight: 600; text-decoration: none; }
.extlink:hover { text-decoration: underline; }
.extlink .ic { width: 16px; height: 16px; }

/* ---- team / athlete screen ---- */
.hero { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "crest txt" "crest follow"; gap: var(--s2) var(--s4); align-items: center;
  background: var(--surface); border-radius: var(--r-lg); padding: var(--s4); margin-bottom: var(--s3); }
.hero .crest { grid-area: crest; align-self: start; }
.hero-txt { grid-area: txt; min-width: 0; }
.hero h2 { margin: 0; font: 700 var(--fs-2xl)/1.05 var(--cond); }
.hero p { margin: var(--s1) 0 0; color: var(--muted); font-size: var(--fs-sm); }

/* follow: the Follow button in a page header, a pill under the name (as wide as its words) */
.follow { grid-area: follow; justify-self: start; display: inline-flex; justify-content: center; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s4) 0 var(--s3); border-radius: var(--r-pill); background: none;
  border: 1.5px solid var(--pitch); color: var(--pitch); font: 600 var(--fs-md)/1 var(--cond); transition: background var(--t-fast); }
.follow:hover { background: var(--sunk); }
.follow .ic { width: 18px; height: 18px; }
.follow.on { background: var(--pitch); color: var(--pitch-ink); }
.follow.on .ic { fill: currentColor; }

/* form-chip: one result in a form guide */
.form { display: flex; gap: 6px; }
.form-chip { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; font: 700 var(--fs-md)/1 var(--cond); }
.form-chip--win { background: var(--pitch); color: var(--pitch-ink); }
.form-chip--draw { background: var(--draw); color: var(--draw-ink); }
.form-chip--loss { background: var(--loss); color: var(--loss-ink); }

.rows { list-style: none; margin: 0; padding: 0; }
.row-link { width: 100%; display: flex; align-items: center; gap: var(--s3); min-height: 52px; text-align: left; border-top: 1px solid var(--line); }
.row-link:hover { background: var(--sunk); }
.rows li:first-child .row-link { border-top: 0; }
.row-link .txt { flex: 1; display: grid; }
.row-link small { color: var(--muted); font-size: var(--fs-xs); }

/* ---- home ---- */
.home { padding-top: var(--s1); }
.home-date { margin: 0 var(--s1) var(--s3); color: var(--muted); font-size: var(--fs-sm); }
.home-sec h2 { margin: var(--s5) var(--s1) var(--s2); font: 600 var(--fs-lg)/1.2 var(--cond); letter-spacing: .01em; }
.sub-h { margin: var(--s3) var(--s1) var(--s2); font: 500 var(--fs-sm)/1.2 var(--font); color: var(--muted); }
.when { margin: var(--s3) var(--s1) var(--s1); font-size: var(--fs-xs); color: var(--muted); }

/* hero-match: the one game that matters most to you right now */
.hero-label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-bottom: var(--s2); }
.hero-label span { font: 700 var(--fs-md)/1 var(--cond); }
.hero-label small { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-match { background: var(--spot); color: var(--spot-ink); border-radius: var(--r-lg); padding: var(--s4) var(--s4) var(--s3); cursor: pointer; }
.hero-match .hero-label small { color: inherit; opacity: .7; }
.hero-match.live { box-shadow: inset 0 4px 0 var(--flood); }
.hero-match.live .hero-label span { color: var(--flood); }
.hero-match .crest { background: color-mix(in srgb, var(--spot-ink) 14%, transparent); color: inherit; }
.hm-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--s2); margin: var(--s2) 0 var(--s3); }
.hm-side { min-width: 0; overflow-wrap: break-word; hyphens: auto; display: grid; justify-items: center; gap: var(--s2); text-align: center; font-weight: 600; line-height: 1.2; }
.hm-score { display: flex; gap: var(--s2); align-items: baseline; font: 700 var(--fs-3xl)/1 var(--cond); font-variant-numeric: tabular-nums; }
.hm-score.soon { font-size: var(--fs-2xl); }
.hm-score--long { font-size: var(--fs-xl); gap: var(--s1); }
.hm-score .dash { opacity: .5; font-weight: 500; }
.hm-score .lose { opacity: .55; }
.hm-foot { display: flex; justify-content: center; }
.hero-match .badge:not(.badge--live) { background: color-mix(in srgb, var(--spot-ink) 14%, transparent); color: inherit; }
.hero-match:hover { filter: brightness(1.06); }

/* myteam: one followed team in the strip */
.myteams { margin: 0 calc(-1 * var(--s3)); padding: var(--s1) var(--s3); scroll-padding-inline: var(--s3); }
.myteam { flex: none; width: 112px; min-height: 128px; display: grid; justify-items: center; align-content: start; gap: var(--s1); padding: var(--s3) var(--s2);
  background: var(--surface); border-radius: var(--r-md); border: 1px solid transparent; text-align: center; scroll-snap-align: start; transition: border-color var(--t-fast); }
.myteam:hover { border-color: var(--line); }
.myteam b { font-weight: 600; font-size: var(--fs-sm); line-height: 1.2; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: var(--s1); }
.myteam small { color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.myteam.live { box-shadow: inset 0 -3px 0 var(--flood); }
.myteam.live small { color: var(--ink); font-weight: 600; }
.myteam.add { background: none; border: 1px dashed var(--line); }
.myteam.add .crest { background: none; border: 1.5px dashed var(--muted); color: var(--muted); }

/* story: a news item */
.stories { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-md); overflow: hidden; }
.story { width: 100%; display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); text-align: left; border-top: 1px solid var(--line); min-height: var(--tap); }
.stories li:first-child .story { border-top: 0; }
.story:hover { background: var(--sunk); }
.story .crest { margin-top: 2px; }
.story-txt { display: grid; gap: 2px; min-width: 0; }
.story-head { font-weight: 600; line-height: 1.3; }
.story-meta { color: var(--muted); font-size: var(--fs-xs); }
.story--lead { display: grid; gap: var(--s2); padding: var(--s4); }
.story--lead .story-top { display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: var(--fs-xs); }
.story--lead .story-top .crest { margin: 0; }
.story--lead .story-head { font: 700 var(--fs-xl)/1.15 var(--cond); }
.story-dek { color: var(--ink); line-height: 1.5; max-width: 62ch; }
.news-note { margin: var(--s2) var(--s1) 0; }
.coverage { display: flex; flex-wrap: wrap; column-gap: var(--s4); margin: 0 var(--s1); }

/* welcome: the first visit. Search, your sports, what to follow, and a foot that stays in view */
.welcome { background: var(--surface); border-radius: var(--r-lg); padding: var(--s5) var(--s4) 0; }
.welcome h2 { margin: 0; font: 700 var(--fs-2xl)/1.05 var(--cond); }
.welcome > p { margin: var(--s2) 0 var(--s2); color: var(--muted); max-width: 40ch; }
.find { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 48px; margin: var(--s3) 0 0; padding: 0 var(--s3); border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: inherit; text-align: left; transition: border-color var(--t-fast); }
.find:hover { border-color: var(--muted); }
.find .ic { width: 18px; height: 18px; flex: none; }
.suggest h3 { margin: var(--s4) 0 var(--s2); font: 500 var(--fs-sm)/1.2 var(--font); color: var(--muted); }
.suggest-head { display: flex; align-items: center; gap: var(--s3); margin: var(--s4) 0 var(--s2); }
.suggest-head h3 { margin: 0; }
.suggest-change { margin-block: -14px; font-size: var(--fs-sm); }
.suggest-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.suggest-more { margin-top: var(--s1); font-size: var(--fs-sm); }
.suggest h3:focus, .welcome h2:focus { outline: none; }
.suggest-note { margin: var(--s2) 0 0; max-width: 52ch; }

/* "Sign in to save what you follow": on Home after the first visit; can be closed (back in 5 days). */
.save-offer { display: flex; align-items: center; gap: var(--s3); background: var(--surface); border-radius: var(--r-lg); padding: var(--s3) var(--s2) var(--s3) var(--s4); border-left: 4px solid var(--pitch); }
.save-offer-txt { flex: 1; min-width: 0; }
.save-offer h2 { margin: 0; font: 600 var(--fs-md)/1.25 var(--font); }
.save-offer p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.save-offer .btn, .save-offer-close { flex: none; }
.home-main:focus { outline: none; }
@media (max-width: 480px) {
  .save-offer { flex-wrap: wrap; padding-right: var(--s4); position: relative; }
  .save-offer-txt { flex-basis: 100%; padding-right: var(--tap); }
  .save-offer-close { position: absolute; top: var(--s1); right: var(--s1); }
}
.suggest-chips .chip { font-family: var(--font); font-weight: 500; font-size: var(--fs-sm); gap: var(--s2); max-width: 100%; }
.suggest-chips .chip:has(.crest) { padding-left: var(--s2); }
.suggest-chips .chip .chip-name { overflow: hidden; text-overflow: ellipsis; }
.suggest-chips .chip.on { background: var(--pitch); border-color: var(--pitch); color: var(--pitch-ink); }
.suggest-chips .chip > .ic { width: 14px; height: 14px; flex: none; stroke-width: 2.5; }
.suggest-chips .chip .crest { width: 28px; height: 28px; }
.suggest-chips .chip.on span.crest { background: color-mix(in srgb, var(--pitch-ink) 20%, transparent); color: inherit; }
.suggest-chips .chip.on img.crest { background: var(--surface); border-radius: 50%; }
.welcome-foot { position: sticky; bottom: calc(59px + var(--safe-b)); z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: var(--s3);
  margin: var(--s4) calc(-1 * var(--s4)) 0; padding: var(--s2) var(--s4); min-height: 64px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.welcome-count { margin: 0; display: grid; gap: 2px; min-width: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.3; }
.welcome-count b { color: var(--ink); font: 700 var(--fs-lg)/1.1 var(--cond); }
.welcome-foot .btn, .welcome-foot .link { flex: none; }
@media (max-width: 480px) { .welcome-more { display: none; } }
.welcome .link { color: var(--pitch); }
.welcome--small { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4); }
.welcome--small > p { margin: 0; color: var(--ink); }
.welcome + .hero-match, .welcome + .home-sec h2 { margin-top: var(--s5); }
.news-sec--trend .trend-h { margin-top: var(--s5); font: 600 var(--fs-lg)/1.2 var(--cond); letter-spacing: .01em; color: var(--ink); }
.btn--quiet { display: block; width: 100%; margin-top: var(--s3); background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn--quiet:hover { filter: none; border-color: var(--muted); }

/* ---- competition page ---- */
.league-mark { font-size: var(--fs-2xl); background: var(--sunk); }
.more-link { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--fs-sm); font-weight: 600; }
.season-pick { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); }
.season-pick label { font-size: var(--fs-sm); color: var(--muted); }
.season-pick select { min-height: var(--tap); padding: 0 var(--s6) 0 var(--s3); border: 1px solid var(--muted); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: 600 var(--fs-sm)/1 var(--font);
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.season-pick select:hover { border-color: var(--ink); }
.season-note { margin: 0 0 var(--s2); }
.seg--page { margin: 0 0 var(--s2); }
.league-link { display: inline-flex; align-items: center; gap: 2px; min-height: var(--tap); font: inherit; color: inherit; text-align: left; }
.league-link .ic { width: 16px; height: 16px; color: var(--muted); }
.league-link:hover .ic { color: var(--ink); }
.board-meta .link, .hero p .link { min-height: var(--tap); color: inherit; }
.hero p .link { color: var(--muted); }

/* standings: league table */
.table-card { background: var(--surface); border-radius: var(--r-md); overflow-x: auto; }
.standings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.standings th, .standings td { padding: 0 var(--s1); text-align: center; white-space: nowrap; height: 48px; }
.standings thead th { height: 36px; color: var(--muted); font-weight: 500; font-size: var(--fs-xs); }
.standings abbr { text-decoration: none; }
.standings tbody tr + tr > * { border-top: 1px solid var(--line); }
.standings .c-pos { width: 36px; padding-left: var(--s3); }
.standings .c-name { text-align: left; width: 100%; max-width: 0; }
.standings thead .c-name { padding-left: var(--s1); }
.standings .c-pts { font: 700 var(--fs-md)/1 var(--cond); padding-right: var(--s3); }
.standings tr.mine { box-shadow: inset 4px 0 0 var(--pitch); }
.standings tr.me { box-shadow: inset 4px 0 0 var(--pitch); background: color-mix(in srgb, var(--pitch) 10%, transparent); }
.standings tr.me .team-link span { color: var(--pitch); font-weight: 700; }
.standings tr.gap > * { border-top: 2px dashed var(--line) !important; }
.standing h3 small { font: 400 var(--fs-sm) var(--font); color: var(--muted); margin-left: var(--s1); }
.standing .btn--quiet { margin-top: var(--s2); }
.standings tr.mine .team-link span { color: var(--pitch); }
.team-link { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: var(--tap); text-align: left; font-weight: 500; }
.team-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.team-link small { color: var(--muted); font-size: var(--fs-xs); flex: none; }
.team-link:hover span { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.name .cardmark { display: inline-block; vertical-align: -2px; margin-left: var(--s1); width: 9px; height: 12px; }

/* ---- follows ---- */
/* chip--suggested: a sport in the top row you have not followed (suggested, or opened from More) */
.chip--suggested { border-style: dashed; border-color: var(--muted); color: var(--muted); background: transparent; }
.chip--suggested.on { border-style: dashed; border-color: var(--ink); background: var(--sunk); color: var(--ink); }

/* sport-strip: top of a sport's scores — suggested (Follow / Hide), browsing, or why it is yours */
.sport-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3);
  background: var(--surface); border: 1px dashed var(--muted); border-radius: var(--r-md); padding: var(--s3) var(--s4); margin: var(--s2) 0 var(--s3); }
.sport-strip p { margin: 0; flex: 1 1 200px; }
.sport-strip-actions { display: flex; gap: var(--s2); }
.sport-strip--quiet { border: 0; background: none; padding: 0 var(--s1); margin: var(--s1) 0 0; color: var(--muted); font-size: var(--fs-sm); }
.sport-strip--quiet .link { color: var(--pitch); font-weight: 600; }
.btn--small { min-height: var(--tap); padding: 0 var(--s4); font-size: var(--fs-sm); }
.btn--small.btn--quiet { width: auto; display: inline-flex; align-items: center; margin: 0; }

/* Your games: followed teams' games pulled to the top of All and Live */
.league--yours h2 span { color: var(--pitch); }

/* Profile */
.card-list { background: var(--surface); border-radius: var(--r-md); padding: var(--s1); }
.card-list .sport-row + .sport-row { border-top: 1px solid var(--line); border-radius: 0; }
.pick.static { cursor: default; }
.pick.static:hover { background: none; }
.sport-row .btn--small { margin-right: var(--s1); }
/* switch: on/off control ("I play") */
.switch { flex: none; display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s2); border-radius: var(--r-md); color: var(--muted); font-size: var(--fs-xs); }
.switch:hover { background: var(--sunk); }
.switch-track { width: 36px; height: 22px; border-radius: var(--r-pill); background: var(--muted); position: relative; transition: background var(--t-fast); }
.switch-track i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); transition: transform var(--t-fast); }
.switch.on { color: var(--pitch); font-weight: 600; }
.switch.on .switch-track { background: var(--pitch); }
.switch.on .switch-track i { transform: translateX(14px); }

/* place: your city in the setup panel */
.place--picker { display: grid; gap: var(--s1); margin-bottom: var(--s2); }
.place-hint { margin: 0; }
.place--picker .sheet-search { margin: 0; }
.place-results { list-style: none; margin: 0; padding: 0; }
.place-option { width: 100%; min-height: var(--tap); text-align: left; padding: 0 var(--s2); border-radius: var(--r-sm); }
.place-option:hover { background: var(--surface); }
.place--picker .link { justify-self: start; color: var(--pitch); }
.chip-note { font: 400 var(--fs-xs)/1 var(--font); color: var(--muted); margin-left: var(--s1); }
.chip.on .chip-note { color: inherit; opacity: .8; }

/* ---- tab bar ---- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); z-index: 6; }
.tab { flex: 1; min-height: 58px; display: grid; place-items: center; align-content: center; gap: 3px; font-size: var(--fs-xs); color: var(--muted); }
.tab .ic { width: 22px; height: 22px; }
.tab.active { color: var(--pitch); font-weight: 600; }

/* ---- sheets ---- */
body.locked { overflow: hidden; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; animation: fade var(--t-fast) ease-out; }
.sheet { width: 100%; max-width: 640px; max-height: 82vh; overflow-y: auto; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--s2) var(--s3) calc(var(--s4) + var(--safe-b)); animation: up var(--t-med) ease-out; }
.sheet.tall { height: 82vh; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: var(--s1) auto var(--s2); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--s1); }
.sheet-head h2 { margin: 0; font: 700 var(--fs-xl)/1 var(--cond); }
.sheet-hint { margin: 2px var(--s1) var(--s3); color: var(--muted); font-size: var(--fs-sm); }
.sheet-search { width: 100%; min-height: 48px; margin: var(--s1) 0 var(--s2); padding: 0 var(--s3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.sheet-search:focus { outline: 2px solid var(--pitch); outline-offset: 0; }
.sheet-empty { color: var(--muted); padding: var(--s5) var(--s2); text-align: center; }
.sport-list { list-style: none; margin: 0; padding: 0; }
.sport-list .grp { color: var(--muted); font-size: var(--fs-xs); padding: var(--s3) var(--s2) var(--s1); }
.sport-row { display: flex; align-items: center; border-radius: var(--r-md); }
.sport-row.on { background: var(--sunk); }
.sport-row .pick { flex: 1; display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: 6px var(--s2); text-align: left; border-radius: var(--r-md); }
.sport-row .pick:hover { background: var(--sunk); }
.ic-wrap { width: 34px; display: grid; place-items: center; font-size: var(--fs-xl); flex: none; }
.sport-row .txt { display: grid; }
.sport-row .txt b { font-weight: 600; }
.sport-row small { color: var(--muted); font-size: var(--fs-xs); }
.sport-row .star { flex: none; }
.browse-back .link { gap: var(--s1); color: var(--pitch); font-weight: 600; padding: 0 var(--s1); }
.browse-manage .link { gap: 2px; color: var(--pitch); font-weight: 600; padding: 0 var(--s2); }
.browse-manage .link .ic { width: 16px; height: 16px; }
.browse-back .link .ic { width: 18px; height: 18px; }
.sport-row .unpin { color: var(--muted); font-size: var(--fs-sm); padding: 0 var(--s3); min-height: var(--tap); border-radius: var(--r-sm); }
.toast { position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: var(--fs-sm); z-index: 30; max-width: 90vw; }

@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- football detail: previews, missing players, line-ups, squads, athletes ---------- */
.crest--photo { object-fit: cover; background: var(--sunk); }
.rating { flex: none; min-width: 34px; padding: 3px 6px; border-radius: var(--r-sm); font: 700 var(--fs-sm)/1 var(--cond); text-align: center; }
.rating--good { background: var(--pitch); color: var(--pitch-ink); }
.rating--ok { background: var(--sunk); color: var(--ink); }
.rating--low { background: var(--loss); color: var(--loss-ink); }

.chances { margin: var(--s2) 0 var(--s3); }
.chances-bar { display: flex; gap: 2px; height: 10px; border-radius: var(--r-pill); overflow: hidden; }
.chances-bar span { min-width: 4px; }
.ch-home { background: var(--pitch); } .ch-draw { background: var(--draw); } .ch-away { background: var(--ink); }
.chances-legend { display: flex; justify-content: space-between; gap: var(--s2); margin-top: var(--s2); font-size: var(--fs-sm); }
.chances-legend span:nth-child(2) { text-align: center; } .chances-legend span:last-child { text-align: right; }
.form-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); margin: var(--s2) 0; }
.form-pair small { display: block; color: var(--muted); margin-bottom: var(--s1); }
.form--sm { display: flex; gap: 3px; }
.form--sm .form-chip { width: 24px; height: 24px; font-size: var(--fs-xs); }
.h2h { list-style: none; margin: 0; padding: 0; }
.h2h li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--s2); align-items: center; padding: var(--s2) 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.h2h-date { color: var(--muted); font-size: var(--fs-xs); }
.h2h-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--s2); }
.h2h-teams span:last-child { text-align: right; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); }
.absent { list-style: none; margin: 0; padding: 0; }
.absent li { padding: var(--s1) 0; }
.absent .link { min-height: 32px; font-weight: 600; }
.absent small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.missing { margin: var(--s1) var(--s1) var(--s3); font-size: var(--fs-sm); }
.missing small { color: var(--muted); }

.lineup + .lineup { margin-top: var(--s4); }
.lineup .sub-h small { margin-left: var(--s1); }
.lu-list { list-style: none; margin: 0; padding: 0; }
.lu-row { display: flex; align-items: center; gap: var(--s2); border-top: 1px solid var(--line); }
.lu-num { width: 24px; flex: none; text-align: right; font: 600 var(--fs-sm)/1 var(--cond); color: var(--muted); }
.lu-name { flex: 1; min-width: 0; min-height: 40px; overflow-wrap: anywhere; }
.lu-name small { color: var(--muted); }
.lu-marks { display: inline-flex; gap: 4px; align-items: center; }
.mk { display: inline-flex; align-items: center; gap: 1px; font: 700 var(--fs-xs)/1 var(--cond); color: var(--muted); }
.mk .ic { width: 14px; height: 14px; color: var(--ink); }
.mk--yellow, .mk--red { width: 9px; height: 12px; border-radius: 2px; }
.mk--yellow { background: var(--flood); box-shadow: inset 0 0 0 1px var(--flood-ink); } .mk--red { background: var(--loss); }
.lu-label { margin: var(--s3) 0 var(--s1); font-size: var(--fs-xs); color: var(--muted); }
.lu-bench summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-size: var(--fs-sm); color: var(--muted); }

.squad { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.squad li + li { border-top: 1px solid var(--line); }
.squad-row { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 56px; padding: var(--s2) var(--s3); text-align: left; }
.squad-row:hover { background: var(--sunk); }
.squad-num { width: 22px; flex: none; text-align: right; font: 700 var(--fs-md)/1 var(--cond); color: var(--muted); }
.squad-row .crest { width: 36px; height: 36px; }
.squad-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.squad-txt b { font-weight: 600; overflow-wrap: anywhere; }
.squad-txt small { color: var(--muted); font-size: var(--fs-xs); }
.tag--warn { flex: none; padding: 3px 8px; border-radius: var(--r-pill); background: var(--loss); color: var(--loss-ink); font-size: var(--fs-xs); font-weight: 600; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s4); margin: 0; }
.facts dt { font-size: var(--fs-xs); color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.pstats { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.pstats th, .pstats td { padding: var(--s2) var(--s1); text-align: right; border-top: 1px solid var(--line); }
.pstats thead th { border-top: 0; font-weight: 500; color: var(--muted); font-size: var(--fs-xs); }
.pstats tbody th { text-align: left; font-weight: 600; }
.pmatch .when { display: flex; align-items: center; gap: var(--s2); }

/* Preview: home | label | away rows */
.vs-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--s2); align-items: center; padding: var(--s2) 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.vs-row > span:first-child { text-align: left; }
.vs-row > span:last-child { text-align: right; justify-self: end; }
.vs-row .vs-label { color: var(--muted); font-size: var(--fs-xs); text-align: center; }
.vs-row small { color: var(--muted); }
.vs-row .vs-best { font-weight: 700; }
.vs-head { border-top: 0; font-weight: 600; padding-bottom: 0; }
.vs-row .form--sm { display: inline-flex; }
.vs-row--players { border-top: 0; padding-top: 0; align-items: start; }
.kp { display: inline-grid; gap: 2px; text-align: inherit; min-height: var(--tap); align-content: center; }
.vs-row > span:last-child .kp { justify-items: end; }
.kp small { font-size: var(--fs-xs); }

/* AI preview / report */
.ai-story-line { font: 700 var(--fs-lg)/1.25 var(--font); margin: var(--s2) 0; }
.ai-story-short { margin: 0 0 var(--s3); line-height: 1.5; }
.ai-story-more summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--pitch); }
.ai-story-article { line-height: 1.55; }
.ai-story-article h4 { margin: var(--s4) 0 var(--s1); font: 700 var(--fs-md)/1.3 var(--font); }
.ai-story-article p { margin: 0 0 var(--s3); }
.ai-story-article ul { margin: 0 0 var(--s3); padding-left: var(--s5); }
.ai-story-sources { list-style: none; margin: 0; padding: 0; }
.ai-story-sources li { padding: 2px 0; }
.ai-story-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); }
.ai-story-meta { margin: 0; }
.votes { display: flex; gap: var(--s1); flex: none; }
.vote { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); border: 1px solid var(--line); }
.vote .ic { width: 18px; height: 18px; }
.vote:hover { background: var(--sunk); color: var(--ink); }
.vote.on { background: var(--pitch); border-color: var(--pitch); color: #fff; }
.vote:focus-visible { outline: 2px solid var(--pitch); outline-offset: 2px; }
.ai-story--pending { border: 1px dashed var(--muted); }

.coverage-list { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.coverage-list li { display: grid; gap: 2px; padding: var(--s2) 0; border-top: 1px solid var(--line); }
.coverage-list li:first-child { border-top: 0; }
.coverage-list .extlink { min-height: 32px; }
.coverage-list small { color: var(--muted); font-size: var(--fs-xs); }

/* Key moments: substitutions and VAR, quieter than goals and cards */
.evmark { display: inline-grid; place-items: center; flex: none; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 4px; font: 700 10px/1 var(--cond); color: var(--muted); background: var(--sunk); }
.evmark--var { letter-spacing: .02em; }
.evmark--pen { font-size: 9px; letter-spacing: .02em; }
.evmark--play { letter-spacing: .02em; color: var(--ink); }
/* Scoring plays (American football): the clock reads "Q4 1:59", wider than a minute. */
.ev.play { grid-template-columns: 1fr 64px 1fr; }
.ev.sub .who b, .ev.var .who b { font-weight: 500; color: var(--muted); }
.ev.sub .who small, .ev.var .who small { font-size: var(--fs-xs); }
.stats-more summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--pitch); }

/* Key moments: half-time divider */
.ev.ev--ht { display: flex; justify-content: center; align-items: center; gap: var(--s2); padding: var(--s2) 0; background: var(--sunk); border-radius: var(--r-sm); color: var(--muted); font-size: var(--fs-sm); }
.ev--ht .ht-score { font: 700 var(--fs-md)/1 var(--cond); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- Home: the daily page ------------------------------------------------------------
   One column on phones; a side column from tablet width; a follows sidebar on desktop.
   Live is floodlight yellow, followed is pitch green, the briefing is the --spot card. */
main#home { max-width: 640px; }
.home-head { display: grid; gap: var(--s2); margin-bottom: var(--s2); }
.home-head .home-date { margin: 0 var(--s1); }
.live-strip { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: var(--tap); padding: var(--s2) var(--s4); border-radius: var(--r-md);
  background: var(--flood); color: var(--flood-ink); text-align: left; }
.ls-live { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-sm); }
.ls-live i { width: 8px; height: 8px; border-radius: var(--r-pill); background: currentColor; }
.ls-score { flex: 1; font: 600 var(--fs-lg)/1 var(--cond); font-variant-numeric: tabular-nums; }
.ls-min { font-weight: 600; font-size: var(--fs-sm); }

.home-follows { margin: 0 calc(-1 * var(--s3)) var(--s3); }
.ff-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ff-list { display: flex; gap: var(--s2); padding: var(--s1) var(--s3); scroll-padding-inline: var(--s3); }
.ff { flex: none; display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s3) 0 var(--s2);
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.ff:first-child { padding-left: var(--s3); }
.ff .crest { width: 24px; height: 24px; font-size: 9px; }
.ff.on { background: var(--pitch); border-color: var(--pitch); color: var(--pitch-ink); }
.ff-n { font-weight: 500; color: var(--muted); font-size: var(--fs-xs); }
.ff.on .ff-n { color: inherit; opacity: .85; }
.ff-add { border-style: dashed; color: var(--muted); padding-left: var(--s3); }
.ff-add svg { width: 16px; height: 16px; }

.home-top { display: grid; gap: var(--s4); }
.brief { background: var(--spot); color: var(--spot-ink); border-radius: var(--r-lg); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.brief h2 { margin: 0; font: 700 var(--fs-xl)/1.1 var(--cond); }
.brief ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.brief li button { display: flex; gap: var(--s3); align-items: baseline; width: 100%; min-height: var(--tap); padding: var(--s1) 0; text-align: left; color: inherit; }
.brief li button:hover .brief-txt { text-decoration: underline; text-underline-offset: 3px; }
.brief-when { flex: none; width: 5.6em; font: 600 var(--fs-md)/1.3 var(--cond); color: var(--flood); font-variant-numeric: tabular-nums; }
.brief-txt { font-size: var(--fs-md); line-height: 1.4; }
.brief-foot { margin: auto 0 0; font-size: var(--fs-xs); color: color-mix(in srgb, var(--spot-ink) 72%, transparent); }

.lead { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s4) var(--s5) var(--s4); display: grid; gap: var(--s3); align-content: start; cursor: pointer; }
.lead:hover { box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.lead.live { box-shadow: var(--shadow), inset 0 4px 0 var(--flood); }
.lead-top { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-sm); color: var(--muted); }
.lead-live { color: var(--ink); font-weight: 700; }
.lead-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--s3); }
.lead-side { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.lead-side:last-child { justify-items: end; text-align: right; }
.lead-side b { font: 700 var(--fs-2xl)/1 var(--cond); }
.lead-side small { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lead-side .crest { margin-bottom: var(--s1); }
.lead-v { font: 600 var(--fs-lg)/1 var(--cond); color: var(--muted); }
.lead-score { font: 700 var(--fs-3xl)/1 var(--cond); font-variant-numeric: tabular-nums; }
.lead-score .lose { color: var(--muted); }
.lead-stage { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lead-stage li { display: grid; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.lead-stage i { height: 4px; border-radius: var(--r-pill); background: var(--line); }
.lead-stage li.done i { background: var(--pitch); }
.lead-stage li.now i { background: var(--pitch); }
.lead.live .lead-stage li.now i { background: var(--flood); }
.lead-stage li.now { color: var(--pitch); font-weight: 600; }
.lead.live .lead-stage li.now { color: var(--ink); }
.lead-line { margin: 0; font: 700 var(--fs-xl)/1.15 var(--cond); }
.lead-short { margin: 0; line-height: 1.5; max-width: 62ch; }
.lead-foot { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.tag-new { font-style: normal; font-weight: 700; color: var(--pitch-ink); background: var(--pitch); border-radius: var(--r-sm); padding: 1px 6px; margin-right: 4px; font-size: var(--fs-xs); }

.moments { list-style: none; margin: 0 calc(-1 * var(--s3)); padding: var(--s1) var(--s3); display: flex; gap: var(--s3); scroll-padding-inline: var(--s3); }
.moments li { flex: 0 0 236px; display: flex; }
.moment { width: 100%; display: grid; align-content: start; gap: var(--s2); text-align: left; padding: var(--s3) var(--s4); background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); }
.moment:hover { box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.mo-who { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.mo-who > span { display: grid; min-width: 0; }
.mo-who b { font-weight: 600; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-who small { color: var(--muted); font-size: var(--fs-xs); }
.mo-who .crest { border-radius: var(--r-pill); object-fit: cover; }
.mo-big { font: 700 var(--fs-xl)/1 var(--cond); color: var(--pitch); }
.mo-big small { font: 500 var(--fs-xs)/1 var(--font); color: var(--muted); }
.mo-txt { font-size: var(--fs-sm); line-height: 1.4; }

.sclist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.sc { width: 100%; display: grid; gap: var(--s2); text-align: left; padding: var(--s4); background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); }
.sc:hover { box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.sc-meta { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-xs); color: var(--muted); }
.sc-meta b { font-weight: 600; }
.sc.report .sc-meta b { color: var(--pitch); }
.sc-body { display: grid; gap: var(--s1); }
.sc-title { font: 700 var(--fs-lg)/1.2 var(--cond); }
.sc-text { line-height: 1.45; color: var(--ink); max-width: 62ch; }
.sc-foot { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

.home-side { display: grid; gap: var(--s4); margin-top: var(--s5); align-content: start; }
.side-card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: var(--s4) var(--s4) var(--s2); }
.side-card--sunk { background: var(--sunk); box-shadow: none; }
.side-card h2 { margin: 0 0 var(--s2); font: 700 var(--fs-lg)/1.2 var(--cond); }
.side-card .btn { margin-top: var(--s1); }
.tdlist, .tblist, .arlist { list-style: none; margin: 0; padding: 0; }
.td { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: var(--tap); text-align: left; border-top: 1px solid var(--sunk); font-size: var(--fs-sm); }
.td.mine { font-weight: 600; }
.td-tag { flex: none; min-width: 3.4em; text-align: center; padding: 2px 6px; border-radius: var(--r-sm); font-weight: 700; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.td-tag.live { background: var(--flood); color: var(--flood-ink); }
.tblist li { display: flex; align-items: center; gap: var(--s2); padding: 6px var(--s2); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.tblist li.mine { background: color-mix(in srgb, var(--pitch) 14%, transparent); font-weight: 600; }
.tb-pos { width: 1.6em; color: var(--muted); font-variant-numeric: tabular-nums; }
.tb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-pts { font: 700 var(--fs-md)/1 var(--cond); font-variant-numeric: tabular-nums; }
.ar { display: grid; gap: 2px; width: 100%; min-height: var(--tap); padding: var(--s2) 0; text-align: left; font-size: var(--fs-sm); line-height: 1.4; }
.ar small { color: var(--muted); font-size: var(--fs-xs); }
.ar b { font-weight: 600; }
.home-main > .home-sec:first-child h2, .home-main > .welcome:first-child { margin-top: 0; }

@media (min-width: 760px) {
  main#home { max-width: 1100px; padding-inline: var(--s5); }
  .home--grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: var(--s5); grid-template-areas: "head head" "follows follows" "main side"; grid-template-rows: auto auto 1fr; }
  .home--grid .home-head { grid-area: head; grid-template-columns: 1fr auto; align-items: center; }
  .home--grid .home-follows { grid-area: follows; margin-inline: 0; }
  .home--grid .ff-list { flex-wrap: wrap; padding-inline: 0; }
  .home--grid .home-main { grid-area: main; min-width: 0; }
  .home--grid .home-side { grid-area: side; margin-top: 0; }
  .home--grid.home--noside { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "follows" "main"; }
  /* Nothing followed yet: the panel at a readable width, today's games beside it, the pair centred. */
  .home--new { display: grid; grid-template-columns: minmax(0, 680px) 300px; justify-content: center; column-gap: var(--s5); grid-template-areas: "head head" "main side"; grid-template-rows: auto 1fr; }
  .home--new .home-head { grid-area: head; }
  .home--new .home-main { grid-area: main; min-width: 0; }
  .home--new .home-side { grid-area: side; margin-top: 0; }
  .moments { margin-inline: 0; padding-inline: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .moments li { flex: auto; }
  .brief h2 { font-size: var(--fs-2xl); }
  .lead-line { font-size: var(--fs-2xl); }
}
@media (min-width: 1200px) {
  main#home { max-width: 1400px; }
  .home--new { grid-template-columns: minmax(0, 720px) 320px; column-gap: var(--s6); }
  .home--grid { grid-template-columns: 220px minmax(0, 1fr) 320px; column-gap: var(--s6); grid-template-areas: "follows head side" "follows main side"; grid-template-rows: auto 1fr; }
  .home--grid .home-head { grid-template-columns: 1fr auto; }
  .home--grid .home-follows { position: sticky; top: var(--s4); align-self: start; }
  .home--grid .ff-head { position: static; width: auto; height: auto; clip: auto; margin: 0 0 var(--s2) var(--s3); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
  .home--grid .ff-list { display: grid; gap: 2px; overflow: visible; }
  .home--grid .ff { width: 100%; border: 0; background: none; border-radius: var(--r-sm); padding: 0 var(--s3); }
  .home--grid .ff .ff-name { flex: 1; text-align: left; }
  .home--grid .ff:hover { background: var(--sunk); }
  .home--grid .ff.on { background: var(--pitch); color: var(--pitch-ink); }
  .home--grid .ff-add { margin-top: var(--s2); }
  .home--grid .home-side { grid-row: 1 / span 2; }
  .home--grid.home--noside { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "follows head" "follows main"; }
  .home--noside .home-main { max-width: 900px; }
  .home-top { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .home-top--one { grid-template-columns: minmax(0, 1fr); }
  .home-top .lead-line { font-size: var(--fs-xl); }
  .home-top .lead-score { font-size: var(--fs-2xl); }
  .moments { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Home's wide column: the label beside the story. (The club page's column is narrower.) */
  #home .sc { grid-template-columns: 170px minmax(0, 1fr); column-gap: var(--s5); }
  #home .sc-meta { flex-direction: column; justify-content: start; gap: 2px; }
}

/* Hockey clocks ("P2 04'") stay on one line in Key moments. */
.ev .min { white-space: nowrap; }

/* ---- Motorsport sessions ------------------------------------------------------------ */
.ev-session { font-weight: 600; color: var(--pitch); margin-left: 4px; }
.board-session { margin: 2px 0 0; text-align: center; font-weight: 600; font-size: var(--fs-md); }
.board-session small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.board-winner { margin: var(--s2) 0 0; text-align: center; font-size: var(--fs-sm); }
.board-winner small { color: var(--muted); }
.results--f1 { width: 100%; font-size: var(--fs-sm); }
.results--f1 th { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; text-align: left; padding: 4px; }
.results--f1 td { padding: 6px 4px; border-top: 1px solid var(--sunk); vertical-align: middle; }
.results--f1 .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.results--f1 .drv small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.results--f1 tr.mine td { background: color-mix(in srgb, var(--pitch) 10%, transparent); }
.results--f1 tr.out td { color: var(--muted); }
.gain { font-size: var(--fs-xs); color: var(--muted); margin-left: 2px; }
.gain.up { color: var(--pitch); }
.gain.down { color: #b4231a; }
.fl { font-size: var(--fs-xs); }
.weekend .row-link.here { background: color-mix(in srgb, var(--pitch) 10%, transparent); border-radius: var(--r-sm); }
.weekend .txt { display: grid; gap: 2px; }
.wk-top, .wk-time { font-size: var(--fs-xs); color: var(--muted); }
.champs { display: grid; gap: var(--s4); }
.champ h4 { margin: 0 0 var(--s1); font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.champ .tblist li small { color: var(--muted); font-size: var(--fs-xs); }
@media (min-width: 760px) { .champs { grid-template-columns: 3fr 2fr; } }

/* F1 driver profile */
.driver h4 { margin: var(--s4) 0 var(--s2); font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.dfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: 0; }
.dfacts dt { font-size: var(--fs-xs); color: var(--muted); }
.dfacts dd { margin: 2px 0 0; font-weight: 600; }
.dstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.dstat { background: var(--sunk); border-radius: var(--r-sm); padding: var(--s2) var(--s3); display: grid; gap: 2px; }
.dstat b { font: 700 var(--fs-xl)/1.1 var(--cond); font-variant-numeric: tabular-nums; }
.dstat span { font-size: var(--fs-xs); color: var(--muted); }
.dteams { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); }
.dteams li { display: flex; gap: var(--s3); }
.dteams span { min-width: 6.5em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* New version banner: above the tab bar, until tapped or dismissed. */
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: var(--s3); width: min(560px, calc(100% - 24px)); box-sizing: border-box;
  padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: var(--r-md); background: var(--spot); color: var(--spot-ink); box-shadow: var(--shadow); }
.update-bar span { flex: 1; font-size: var(--fs-sm); }
.update-bar .btn { min-height: 40px; background: var(--flood); color: var(--flood-ink); border: 0; }
.update-x { width: 40px; height: 40px; color: inherit; font-size: 20px; }

/* Recent transfers on team pages */
.trlist { list-style: none; margin: 0; padding: 0; }
.tr { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--sunk); }
.tr:first-child { border-top: 0; }
.tr-dir { flex: none; min-width: 2.8em; text-align: center; padding: 2px 6px; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 700; }
.tr.in .tr-dir { background: color-mix(in srgb, var(--pitch) 16%, transparent); color: var(--pitch); }
.tr.out .tr-dir { background: var(--sunk); color: var(--muted); }
.tr-who { flex: 1; min-width: 0; display: grid; }
.tr-who small { color: var(--muted); font-size: var(--fs-xs); }
.tr-date { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }

/* ---- Final day: the end-of-season title race ----------------------------------------- */
.fd-kicker { margin: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.fd-head { background: var(--spot); color: var(--spot-ink); border-radius: var(--r-lg); padding: var(--s5); margin-bottom: var(--s4); }
.fd-head .fd-kicker { color: var(--flood); }
.fd-head h2 { margin: var(--s1) 0; font: 700 var(--fs-2xl)/1.1 var(--cond); }
.fd-head p { margin: 0; }
.fd-head.live { box-shadow: inset 0 4px 0 var(--flood); }
.fd-games { display: grid; gap: var(--s3); margin-bottom: var(--s4); }
.fd-game { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: var(--s2) var(--s3);
  padding: var(--s4); background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); text-align: left; }
.fd-game.live { box-shadow: var(--shadow), inset 0 3px 0 var(--flood); }
.fd-side { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.fd-side b { font-weight: 600; overflow-wrap: break-word; hyphens: auto; line-height: 1.2; }
.fd-side--away { justify-content: flex-end; text-align: right; }
.fd-score { font: 700 var(--fs-2xl)/1 var(--cond); font-variant-numeric: tabular-nums; }
.fd-state { grid-column: 1 / -1; justify-self: center; display: flex; align-items: center; gap: var(--s2); }
.fd-date { color: var(--muted); font-size: var(--fs-sm); }
.fd-table .fd-team { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.fd-table tr.top td { background: color-mix(in srgb, var(--flood) 22%, transparent); font-weight: 600; }
.fd-table tr.out td { color: var(--muted); }
.fd-table tr.mine .fd-team b { text-decoration: underline; text-decoration-color: var(--pitch); text-underline-offset: 3px; }
.fd-crown { font-size: var(--fs-xs); font-weight: 700; color: var(--flood-ink); background: var(--flood); border-radius: var(--r-sm); padding: 1px 6px; }
.fd-move { margin-left: 4px; font-size: var(--fs-xs); }
.fd-move.up { color: var(--pitch); }
.fd-move.down { color: #b4231a; }
.fd-needs { display: grid; gap: var(--s3); }
.fd-need h4 { margin: 0 0 var(--s1); }
.fd-need ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: var(--fs-sm); line-height: 1.45; }
.fd-swings { list-style: none; margin: 0; padding: 0; }
.fd-swing { display: flex; gap: var(--s3); padding: var(--s2); border-top: 1px solid var(--sunk); font-size: var(--fs-sm); line-height: 1.45; }
.fd-swing:first-child { border-top: 0; }
.fd-swing.swing { background: color-mix(in srgb, var(--flood) 18%, transparent); border-radius: var(--r-sm); }
.fd-swing small { color: var(--muted); }
.fd-min { flex: none; min-width: 3em; font: 600 var(--fs-md)/1.3 var(--cond); color: var(--muted); }
.race-card { box-shadow: var(--shadow), inset 0 4px 0 var(--flood); }
.race-card h3 { margin: var(--s1) 0 var(--s2); }
.race-card .tblist li.top { background: color-mix(in srgb, var(--flood) 22%, transparent); font-weight: 600; }
.race-others h4 { margin: var(--s3) 0 var(--s1); font-size: var(--fs-sm); color: var(--muted); }
.race-card .btn { margin-top: var(--s3); width: 100%; }
.race-others .row-link { padding: 0 var(--s2); border-radius: var(--r-sm); font-variant-numeric: tabular-nums; }
.race-others .row-link b { font-weight: 600; }
@media (max-width: 480px) {
  .fd-game { gap: var(--s2); padding: var(--s3); }
  .fd-side b { font-size: var(--fs-sm); }
  .fd-score { font-size: var(--fs-xl); }
}
.home-race { background: var(--spot); color: var(--spot-ink); border-radius: var(--r-lg); padding: var(--s5); margin-bottom: var(--s4); display: grid; gap: var(--s3); }
.home-race .fd-kicker { color: var(--flood); }
.home-race h2 { margin: 0; font: 700 var(--fs-xl)/1.1 var(--cond); }
.home-race.live { box-shadow: inset 0 4px 0 var(--flood); }
.fd-minis { display: grid; gap: var(--s2); }
.fd-mini { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: var(--tap); padding: 0 var(--s3); border-radius: var(--r-md); background: color-mix(in srgb, var(--spot-ink) 10%, transparent); color: inherit; font-variant-numeric: tabular-nums; }
.home-race .btn { background: var(--flood); color: var(--flood-ink); border: 0; }
@media (min-width: 760px) {
  .fd-needs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fd-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* News for you: stories from clubs and the press (they open on the publisher's site) */
.wclist { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s3); }
.wc { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s3); padding: var(--s3); background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.wc:not(:has(.wc-img)) { grid-template-columns: minmax(0, 1fr); }
.wc:hover .wc-title { text-decoration: underline; }
.wc:focus-visible { outline: 2px solid var(--pitch); outline-offset: 2px; }
.wc-img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-sm); background: var(--sunk); }
.wc-body { display: grid; gap: 4px; min-width: 0; }
.wc-title { font-weight: 600; line-height: 1.3; }
.wc-text { color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-foot { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.wc-foot .ic { width: 14px; height: 14px; flex: none; }
.wc-foot b { color: var(--ink); font-weight: 600; }
@media (min-width: 760px) { .wc { grid-template-columns: 140px minmax(0, 1fr); } .wc-img { width: 140px; height: 96px; } }

/* ---- your account and signing in ---- */
.account p { margin-bottom: var(--s2); }
.account .btn { margin-top: var(--s1); }
.account--warn { border: 1px solid var(--loss); }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s2); }
.account-actions .btn { margin: 0; }
.btn--danger { background: var(--loss); color: var(--loss-ink); }
.link--danger { color: var(--loss); font-weight: 600; }
.btn:disabled { opacity: .6; cursor: progress; filter: none; }
.btn--wide { display: block; width: 100%; margin-top: var(--s3); }
.sign-in form { margin: var(--s3) 0 var(--s2); }
.field-label { display: block; margin-bottom: var(--s1); font-weight: 600; font-size: var(--fs-sm); }
.field { width: 100%; min-height: 48px; padding: 0 var(--s3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: max(16px, var(--fs-md)); }
.field:focus { outline: 2px solid var(--pitch); outline-offset: 0; }
.field[aria-invalid="true"] { border-color: var(--loss); }
.field--code { font: 600 var(--fs-xl)/1 var(--cond); letter-spacing: .3em; text-align: center; }
.form-error { margin: var(--s2) 0 0; color: var(--loss); font-weight: 600; font-size: var(--fs-sm); }
.sign-in-more { display: flex; flex-wrap: wrap; gap: var(--s4); }
.sign-in-more .link { color: var(--pitch); font-weight: 600; }
@media (min-width: 720px) { .sign-in { max-width: 480px; } }

/* Coverage on the match page: article cards inside the block, outlined rather than raised. */
.match-coverage .wclist { margin: 0 0 var(--s3); gap: var(--s2); }
.match-coverage .wc { background: var(--bg); box-shadow: none; border: 1px solid var(--line); }

/* ---- Play: your games, scoring, your record ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.play .btn--wide { margin-top: var(--s2); }
.play-new { margin: 0 0 var(--s3); min-height: 52px; font-size: var(--fs-lg); }
.play-note { margin: var(--s3) var(--s1); }
.play-live { border: 2px solid var(--flood); }
.play-live p { margin-bottom: var(--s2); }
.live-badge { display: inline-block; margin-right: var(--s1); padding: 2px 6px; border-radius: var(--r-sm); background: var(--flood); color: var(--flood-ink); font: 700 var(--fs-xs)/1.2 var(--font); text-transform: uppercase; letter-spacing: .04em; vertical-align: 1px; }
.play-pick { list-style: none; margin: var(--s2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.play-list { list-style: none; margin: 0; padding: 0; }
.play-list li + li { border-top: 1px solid var(--line); }
.play-row { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 60px; padding: var(--s2) var(--s3); text-align: left; }
.play-row:hover { background: var(--sunk); }
.play-row-ic { font-size: 22px; width: 28px; text-align: center; flex: none; }
.play-row-txt { flex: 1; min-width: 0; }
.play-row-txt b, .play-row-txt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-row-txt small { color: var(--muted); font-size: var(--fs-sm); }
.play-row-score { flex: none; font: 600 var(--fs-md)/1.2 var(--cond); font-variant-numeric: tabular-nums; text-align: right; }
.play-row .form-chip { flex: none; width: 28px; height: 28px; font-size: var(--fs-sm); }
.pb { display: inline-block; padding: 1px 5px; border-radius: var(--r-sm); background: var(--pitch); color: var(--pitch-ink); font: 600 var(--fs-xs)/1.3 var(--font); }
.play .sport-row .form--sm { margin-right: var(--s3); }

/* the form */
.play-form .field-row { display: block; margin-bottom: var(--s3); }
.play-form .field-row small { display: block; margin-top: var(--s1); }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); }
.field--area { min-height: 80px; padding: var(--s2) var(--s3); resize: vertical; }
select.field { appearance: auto; }
.seg--form { margin: 0 0 var(--s3); border: 0; }
.seg--form legend.field-label { float: left; width: 100%; padding: 0 0 var(--s1); background: var(--surface); }
.seg--form label { flex: 1; display: flex; align-items: center; justify-content: center; min-height: var(--tap); border-radius: var(--r-sm); font-weight: 500; font-size: var(--fs-sm); color: var(--muted); text-align: center; cursor: pointer; padding: 0 var(--s2); }
.seg--form label.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.seg--form label:focus-within { outline: 2px solid var(--pitch); }
.seg--form input { position: absolute; opacity: 0; pointer-events: none; }
fieldset.seg--form:has(legend.field-label) { display: flex; flex-wrap: wrap; background: none; padding: 0; }
fieldset.seg--form:has(legend.field-label) label { background: var(--sunk); margin-right: 3px; }
fieldset.seg--form:has(legend.field-label) label.on { background: var(--ink); color: var(--bg); }
.score-sets { border: 0; padding: 0; margin: 0 0 var(--s3); }
.score-head, .score-set { display: grid; grid-template-columns: 1fr 72px 72px; gap: var(--s2); align-items: center; }
.score-head span { font-size: var(--fs-sm); color: var(--muted); text-align: center; }
.score-set { margin-bottom: var(--s2); }
.score-set .field { text-align: center; font: 600 var(--fs-lg)/1 var(--cond); padding: 0; }

/* the scorer */
.scorer-block { text-align: center; }
.scorer-unit { margin: 0 0 var(--s2); color: var(--muted); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; }
.scorer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); }
.scorer-side { display: flex; flex-direction: column; align-items: stretch; background: var(--bg); border-radius: var(--r-md); padding: var(--s3); }
.scorer-name { margin: 0; font-weight: 600; min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
.scorer-big { margin: var(--s2) 0 0; font: 700 5rem/1 var(--cond); font-variant-numeric: tabular-nums; }
.scorer-sets { margin: var(--s2) 0; display: flex; gap: var(--s2); justify-content: center; color: var(--muted); font: 600 var(--fs-lg)/1 var(--cond); min-height: 1.2em; }
.scorer-sets .won { color: var(--ink); }
.scorer-tap { width: 100%; min-height: 72px; font-size: var(--fs-xl); margin-top: auto; }
.scorer-steps { display: flex; gap: var(--s2); margin-top: auto; }
.scorer-steps .scorer-tap { padding: 0; }
.scorer-tools { display: flex; justify-content: center; gap: var(--s3); margin: var(--s3) 0 var(--s1); }
.play-discard { display: block; margin: 0 auto; }

/* a game */
.game-head { text-align: center; }
.game-sport { margin: 0 0 var(--s2); color: var(--muted); font-weight: 600; }
.game-result { display: inline-block; margin: 0 0 var(--s2); padding: 4px 12px; border-radius: var(--r-pill); font: 700 var(--fs-md)/1.2 var(--cond); text-transform: uppercase; letter-spacing: .05em; }
.game-result--win { background: var(--pitch); color: var(--pitch-ink); }
.game-result--loss { background: var(--loss); color: var(--loss-ink); }
.game-result--draw { background: var(--draw); color: var(--draw-ink); }
.game-big { margin: 0; font: 700 var(--fs-3xl)/1.1 var(--cond); font-variant-numeric: tabular-nums; word-spacing: .3em; }
.game-sides { margin: var(--s1) 0 var(--s2); font-weight: 600; }
.sets-table { margin: var(--s3) auto 0; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sets-table th, .sets-table td { padding: var(--s1) var(--s3); text-align: center; }
.sets-table thead th { color: var(--muted); font-weight: 500; font-size: var(--fs-sm); }
.sets-table tbody th { text-align: left; font-weight: 500; }
.sets-table td { font: 600 var(--fs-lg)/1 var(--cond); color: var(--muted); }
.sets-table td.won { color: var(--ink); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s4); margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.game-notes { margin: var(--s3) 0 0; white-space: pre-wrap; }
.play-actions { margin: var(--s2) var(--s1) 0; }

/* your record */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: var(--s2); }
.stat-tile { background: var(--bg); border-radius: var(--r-md); padding: var(--s3) var(--s2); text-align: center; }
.stat-tile b { display: block; font: 700 var(--fs-2xl)/1 var(--cond); }
.stat-tile span { font-size: var(--fs-sm); color: var(--muted); }
.play-form-guide { display: flex; align-items: center; gap: var(--s3); margin: var(--s3) 0 var(--s1); }
.h2h { list-style: none; margin: 0; padding: 0; }
.h2h li { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); min-height: var(--tap); }
.h2h li + li { border-top: 1px solid var(--line); }
.h2h span { color: var(--muted); text-align: right; }
@media (min-width: 720px) { .play-form, .scorer-block { max-width: 560px; margin-left: auto; margin-right: auto; } }

/* names you've played with or against before */
.name-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: calc(-1 * var(--s1)) 0 var(--s3); }
.name-suggest:empty { display: none; }
.name-suggest-label { margin-right: var(--s1); }
.chip--name { min-height: 36px; padding: 0 var(--s3); font-size: var(--fs-sm); background: var(--surface); border: 1px solid var(--line); }
@media (pointer: coarse) { .chip--name { min-height: var(--tap); } }

/* inviting people you've played with */
.h2h li { align-items: center; }
.h2h-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.h2h-who span { text-align: left; font-size: var(--fs-sm); }
.play-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 0; border-radius: var(--r-lg); padding: var(--s4) var(--s4) var(--s5); background: var(--surface); color: var(--ink); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.play-dialog::backdrop { background: var(--scrim); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.dialog-head h2 { margin: var(--s2) 0 0; font: 600 var(--fs-xl)/1.15 var(--cond); }
.dialog-x { font-size: 28px; line-height: 1; flex: none; }
.invite-option { margin-bottom: var(--s4); }
.invite-option .field-row { display: block; }
.invite-row { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s1); }
.invite-row .field { flex: 1; min-width: 0; }
.invite-row .btn { flex: none; }
.field:disabled, .btn:disabled.btn--small { opacity: .55; }
.invite-url { font-size: var(--fs-sm); }
.invite-option .fine { display: block; margin-top: var(--s1); }
.invite-flow h3 { margin-top: 0; }
.invite-step { margin: 0 0 var(--s2); text-transform: uppercase; letter-spacing: .06em; font-size: var(--fs-xs); }
.invite-flow .play-pick .chip.on { background: var(--pitch); border-color: var(--pitch); color: var(--pitch-ink); }
@media (min-width: 720px) { .invite-flow { max-width: 560px; margin-left: auto; margin-right: auto; } }
.h2h .h2h-who { text-align: left; color: var(--ink); }
.h2h .h2h-who span { color: var(--muted); text-align: left; }
.invite-row .btn:disabled { background: var(--sunk); color: var(--muted); opacity: 1; }
.on-sideline { flex: none; padding: 4px 10px; border-radius: var(--r-pill); background: var(--sunk); color: var(--pitch); font: 600 var(--fs-sm)/1.2 var(--cond); }

/* ---- Profile: who you are ---- */
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; object-fit: cover;
  background: var(--pitch); color: var(--pitch-ink); font: 700 var(--fs-md)/1 var(--cond); letter-spacing: .02em; }
.avatar .ic { width: 55%; height: 55%; }
.avatar--lg { width: 72px; height: 72px; font-size: var(--fs-xl); }
.me-top { display: flex; align-items: center; gap: var(--s4); }
.me-who { min-width: 0; }
.me-name { margin: 0; font: 600 var(--fs-xl)/1.15 var(--cond); overflow-wrap: anywhere; }
.block .me-plays { margin: var(--s1) 0 0; color: var(--muted); }
.me-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--s2); margin: var(--s4) 0 0; }
.me-stat { display: grid; justify-items: start; text-align: left; min-height: var(--tap); background: var(--bg); border-radius: var(--r-sm); padding: var(--s2) var(--s3); transition: background var(--t-fast); }
.me-stat:hover, .me-stat:active { background: var(--sunk); }
.me-stat b { font: 700 var(--fs-xl)/1.1 var(--cond); }
.me-stat span { color: var(--muted); font-size: var(--fs-xs); }
.profile-tabs { scroll-margin-top: calc(var(--safe-t) + 72px); }
.me-actions { margin-top: var(--s3); }
.profile > .account { margin-top: var(--s5); }
.me-actions .btn--small.btn--quiet { padding: 0 var(--s3); margin-left: calc(-1 * var(--s3)); }
.me--edit .field { margin-bottom: var(--s2); }
.me-pic { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.me-pic-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.file-btn { cursor: pointer; border: 1px solid var(--line); }
.file-btn:focus-within { outline: 2px solid var(--pitch); outline-offset: 2px; }
.seg-count { color: var(--muted); font-weight: 500; }
.seg button.on .seg-count { color: var(--muted); }
.following .seg { margin: 0 0 var(--s2); }
.follow-empty { padding: var(--s2) var(--s1); }
.sub-h { margin: var(--s4) var(--s1) var(--s2); font: 600 var(--fs-md)/1.2 var(--cond); color: var(--muted); }
@media (min-width: 900px) {
  .me-stats { max-width: 480px; }
}

/* News on a club's page: the same cards as Home, headed like the page's other sections. */
#page .news-sec h2 { margin: var(--s4) var(--s1) var(--s2); }
#page .news-sec .sclist { margin-bottom: var(--s3); }
.sc--static:hover { box-shadow: var(--shadow); }

/* pictures of people you've played with (Play) */
.avatar--sm { width: 40px; height: 40px; font-size: var(--fs-sm); }
.h2h li { gap: var(--s3); }
.invite-from { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
.invite-from h3 { margin: 0; }
.h2h .avatar { color: var(--pitch-ink); text-align: center; }

/* Profile: Play | Watch, and your games with a filter by sport */
.profile-tabs { margin: var(--s3) 0 0; }
.game-filter { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); }
.chip--filter { min-height: 36px; padding: 0 var(--s3); font-size: var(--fs-sm); }
.chip--filter .seg-count { margin-left: 2px; opacity: .7; font-weight: 500; }
@media (pointer: coarse) { .chip--filter { min-height: var(--tap); } }

/* Carousel: the games around now, at the top of team and competition pages. Swipe or
   scroll; the next card peeks in; dots show where you are (hidden when all cards fit). */
.carousel { margin: var(--s3) 0; }
.car-track { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: var(--s3); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 0 var(--s1); }
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline: 2px solid var(--pitch); outline-offset: 2px; border-radius: var(--r-md); }
.car-slide { scroll-snap-align: start; min-width: 0; display: grid; align-content: start; }
.car-slide .match { margin: 0; height: 100%; }
.carousel--one .car-track { grid-auto-columns: 100%; }
.car-label { margin: 0 var(--s1) var(--s1); font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-label b { color: var(--ink); font-weight: 600; }
.car-dots { display: flex; justify-content: center; gap: 2px; margin-top: var(--s1); }
.car-dot { width: 28px; height: 28px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.car-dot::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .2s, background .2s; }
.car-dot.on::before { width: 20px; background: var(--pitch); }
.car-dot:focus-visible { outline: 2px solid var(--pitch); outline-offset: -4px; border-radius: 8px; }
.car-fits .car-dots { display: none; }
@media (prefers-reduced-motion: reduce) { .car-dot::before { transition: none; } }
@media (min-width: 760px) { .car-track { grid-auto-columns: calc(50% - var(--s3) / 2); } }
.car-slide .lead { height: 100%; align-content: start; }
/* Full cards in a carousel: compact, so a card fits a phone screen and two sit side by side. */
.car-slide .lead { padding: var(--s4); gap: var(--s2); }
.car-slide .lead-top { font-size: var(--fs-xs); }
.car-slide .lead-top span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-slide .lead-top span:last-child { flex: none; }
.car-slide .lead-side b { font-size: var(--fs-xl); }
.car-slide .lead-score { font-size: var(--fs-2xl); }
.car-slide .lead-line, #page .car-slide .lead-line { font-size: var(--fs-lg); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.car-slide .lead-short { font-size: var(--fs-sm); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Profile: choosing the sports you play */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.sec-head h2 { margin-right: auto; }
.sec-link { color: var(--pitch); font-weight: 600; padding: 0 var(--s1); }
.plays-edit .play-pick { margin: var(--s3) 0; }
.chip--play.on { background: var(--pitch); border-color: var(--pitch); color: var(--pitch-ink); }

/* "This week at <club>": the digest at the top of a club's News. */
.digest { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s4); display: grid; gap: var(--s2); margin-bottom: var(--s3); border-top: 4px solid var(--pitch); }
.digest-kicker { margin: 0; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pitch); }
.digest-line { margin: 0; font: 700 var(--fs-lg)/1.2 var(--cond); }
.digest-short { margin: 0; color: var(--muted); line-height: 1.45; }
.digest-points { margin: var(--s1) 0 0; padding-left: 1.1em; display: grid; gap: var(--s2); line-height: 1.45; }
.digest-points b { font-weight: 600; }
.digest-src { font-size: var(--fs-xs); color: var(--muted); }
.digest-src a { color: inherit; }
.digest-foot { margin: var(--s1) 0 0; font-size: var(--fs-xs); color: var(--muted); }

/* Club page tabs, below the header: one scrolling row on phones, underlined when chosen. */
.ptabs { margin: var(--s3) 0; border-bottom: 1px solid var(--line); }
/* Matches tabs: the tabs stay in view while the list opens at the latest result. */
.ptabs--stick { position: sticky; top: var(--top-h, 56px); z-index: 4; background: var(--bg); }
.ptabs-row { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.ptabs-row::-webkit-scrollbar { display: none; }
.ptab { flex: none; min-height: 44px; padding: 0 var(--s3); background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; font: 600 var(--fs-sm)/1 var(--font); color: var(--muted); white-space: nowrap; cursor: pointer; }
.ptab:hover { color: var(--ink); }
.ptab.on { color: var(--ink); border-bottom-color: var(--pitch); }
.ptab:focus-visible { outline: 2px solid var(--pitch); outline-offset: -4px; border-radius: 6px; }
.ptab-body > :first-child { margin-top: 0; }
/* Stats */
.stats-table td, .stats-table th { text-align: right; }
.stats-table th.c-name { text-align: left; }
.stat-facts { margin: var(--s3) 0 var(--s1); font-weight: 600; }
.leaders { list-style: none; margin: 0; padding: 0; display: grid; }
.leaders li + li { border-top: 1px solid var(--line); }
.leader-n { margin-left: auto; font: 700 var(--fs-lg)/1 var(--cond); font-variant-numeric: tabular-nums; }

/* Club page on desktop: wider, two columns under the header and tabs. Narrower screens: the
   column wrappers disappear and the blocks run in one column in their set order. */
.cols { display: flex; flex-direction: column; }
.col-main, .col-side { display: contents; }
.col-item:empty { display: none; }
/* Tablet to desktop (760–1099px): one column that grows with the window. */
@media (min-width: 760px) {
  main#page:has(.page--wide) { max-width: none; padding-inline: var(--s5); }
  .page--wide .hero { margin-bottom: var(--s2); grid-template-columns: auto 1fr auto; grid-template-areas: "crest txt follow"; }
  .page--wide .hero .crest { align-self: center; }
  .page--wide .hero .follow { justify-self: end; }
}
/* Desktop (1100px+): two columns up to 1360px; the side column keeps its width and the main
   (left) column takes everything else. */
@media (min-width: 1100px) {
  main#page:has(.page--wide) { max-width: 1360px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 0 var(--s5); align-items: start; }
  .cols--one { display: flex; flex-direction: column; }
  .col-main, .col-side { display: flex; flex-direction: column; min-width: 0; }
}
/* Competition Stats: facts from the table. */
.tfacts { list-style: none; margin: 0; padding: 0; display: grid; }
.tfacts li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label n" "team n"; padding: var(--s2) 0; border-top: 1px solid var(--line); }
.tfacts li:first-child { border-top: 0; }
.tfacts span { grid-area: label; font-size: var(--fs-xs); color: var(--muted); }
.tfacts b { grid-area: team; font-weight: 600; }
.tfacts small { grid-area: n; align-self: center; font: 700 var(--fs-md)/1 var(--cond); }

/* Home: a full card for each of your games around now, under Your day. Two side by side
   where they fit (tablet and up), the lead cards' larger type. */
.home-leads { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); margin-top: var(--s4); }
.home-leads > * { min-width: 0; }
@media (min-width: 760px) {
  .home-leads { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: stretch; }
  .home-leads .lead-line { font-size: var(--fs-xl); }
  .home-leads .lead-score { font-size: var(--fs-2xl); }
}
/* Home with one club or athlete chosen: no side column, and its page uses the width. */
.home--club .home-main { max-width: none; }

/* A game in a list: the score box, and from tablet width up its preview or report beside it. */
.grow { display: block; }
.grow-text { display: none; }
@media (min-width: 760px) {
  .grow { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: var(--s3); align-items: stretch; margin-bottom: 6px; }
  .grow .match { margin-bottom: 0; }
  .grow-text { display: grid; align-content: center; gap: 4px; text-align: left; padding: var(--s2) var(--s4); border-radius: var(--r-md); background: var(--surface); color: inherit; cursor: pointer; min-width: 0; }
  .grow-text:hover { box-shadow: 0 0 0 1px var(--line); }
  .grow-text b { font: 600 var(--fs-md)/1.25 var(--font); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .grow-text span { font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .grow-text small { font-size: var(--fs-xs); color: var(--muted); }
}
/* Your day: a small crest after each line for the club, athlete or competition it's about. */
.brief-who { display: inline-flex; vertical-align: -5px; margin-left: 2px; }
.brief-who .crest { width: 20px; height: 20px; font-size: 8px; background: color-mix(in srgb, var(--spot-ink) 14%, transparent); color: inherit; }
/* Game cards: room for each side's crest; long scores (basketball's 112–107) in smaller type. */
.lead-teams { grid-template-columns: minmax(56px, 1fr) auto minmax(56px, 1fr); }
.lead-score--long, .home-leads .lead-score--long, .car-slide .lead-score--long { font-size: var(--fs-xl); white-space: nowrap; }

/* A group of reports of one story: one card with its summary, the sites, and the reports to open. */
.wc--group { list-style: none; }
.wc--group .wc-text--full { -webkit-line-clamp: 5; }
.wc-ai { font-size: var(--fs-xs); color: var(--muted); }
.wc-reports summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--pitch); padding: 2px 0; }
.wc-reports ul { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s2); }
.wc-reports li { display: grid; gap: 2px; }
.wc-reports a { display: inline-flex; gap: 6px; align-items: baseline; color: inherit; font-size: var(--fs-sm); line-height: 1.35; }
.wc-reports a .ic { width: 12px; height: 12px; flex: none; }
.wc-reports small { color: var(--muted); font-size: var(--fs-xs); }
.wc--group:hover .wc-title { text-decoration: none; }

/* Languages you read (Profile): each language under its own name, with what happens to its stories. */
.langs-why { margin: 0 0 var(--s3); }
.lang-row .btn--small { flex: none; }
.lang-row .txt small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.wc--group .wc-reports { grid-column: 1 / -1; }

/* Home: a card for each of your leagues (side column on desktop; after your games on a phone). */
.lcard { display: grid; gap: var(--s2); padding-bottom: var(--s3); }
.lcard h2 { margin: 0; font-size: var(--fs-md); }
.lc-name { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; font: inherit; }
.lc-name .ic { width: 14px; height: 14px; color: var(--muted); }
.lc-name:hover { text-decoration: underline; }
.lc-name:focus-visible, .lc-more:focus-visible, .lc-game:focus-visible { outline: 2px solid var(--pitch); outline-offset: 2px; }
.lc-round { margin: -4px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.lc-live { color: var(--live, #d92d20); font-weight: 600; }
.lc-line { margin: 0; font-size: var(--fs-sm); line-height: 1.4; }
.lc-line small { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.lc-games, .lc-table, .lc-notes { list-style: none; margin: 0; padding: 0; }
.lc-games { border-top: 1px solid var(--sunk); padding-top: var(--s1); }
.lc-day { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); padding: var(--s1) 0 2px; }
.lc-game { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 3.6em minmax(0, 1fr); gap: var(--s2); align-items: baseline; padding: 3px 0; font-size: var(--fs-sm); line-height: 1.35; }
.lc-game:hover .lc-match { text-decoration: underline; }
.lc-game.mine { font-weight: 600; }
.lc-when { color: var(--muted); font-size: var(--fs-xs); font-weight: 400; font-variant-numeric: tabular-nums; }
.lc-when.live { color: var(--live, #d92d20); font-weight: 600; }
.lc-match { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-score { font-variant-numeric: tabular-nums; }
.lc-v { color: var(--muted); font-weight: 400; }
.lc-table { display: grid; gap: 2px; border-top: 1px solid var(--sunk); padding-top: var(--s2); }
.lc-table li { display: flex; align-items: center; gap: var(--s2); padding: 4px var(--s2); border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: 1.3; }
.lc-table li.mine { background: color-mix(in srgb, var(--pitch) 12%, transparent); font-weight: 600; }
.lc-table .tb-pts { font: 600 var(--fs-sm)/1.3 inherit; min-width: 2em; text-align: right; font-variant-numeric: tabular-nums; }
.lc-table .lc-gap { justify-content: center; padding: 0; color: var(--muted); line-height: 1; }
.lc-behind { color: var(--muted); font-size: var(--fs-xs); font-weight: 400; white-space: nowrap; }
.lc-notes { display: grid; gap: var(--s1); font-size: var(--fs-sm); line-height: 1.4; border-top: 1px solid var(--sunk); padding-top: var(--s2); }
.lc-more { all: unset; cursor: pointer; justify-self: start; display: inline-flex; align-items: center; gap: 2px; min-height: var(--tap); font-size: var(--fs-sm); font-weight: 600; color: var(--pitch); }
.lc-more .ic { width: 14px; height: 14px; }
.lc-more:hover { text-decoration: underline; }

/* Home: a race weekend as one card (sessions, the latest top three, PanPlay AI's piece). */
.wk-head { display: grid; gap: 2px; }
.wk-title { margin: 0; font: 700 var(--fs-xl)/1.1 var(--cond); }
.wk-head small { color: var(--muted); font-size: var(--fs-sm); }
.wk-stage { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.wk-stage li.next { color: var(--ink); font-weight: 600; }
.wk-sub { margin: 0; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.wk-res { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wk-res li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s2); align-items: center; font-size: var(--fs-sm); }
.wk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wk-mark { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Trending (Home, after the fifth story; league Overview). */
.trend-block { margin: var(--s4) 0; }
.trend-h { display: flex; align-items: center; gap: 6px; }

/* Videos: our thumbnail as a Play button; YouTube's player only after Play. */
.vid-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.vid-list--row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.vid-list--row .vid { flex: 0 0 min(260px, 78%); scroll-snap-align: start; }
.vid { min-width: 0; }
.vid-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #111; }
.vid-play { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.vid-play:focus-visible { outline: 3px solid var(--accent, #2a7); outline-offset: 2px; }
.vid-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; display: grid; place-items: center; }
.vid-play:hover .vid-btn { background: #c00; }
.vid-kind { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.vid-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-title { margin: 6px 0 2px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-meta { margin: 0; font-size: 13px; color: var(--muted, #667); }
.vid-sec .fine { margin-top: var(--s2); }
.lead-vid { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--accent, #2a7); margin-right: 4px; }
.vid-meta a { color: inherit; }
.trend-vh { margin: var(--s3) 0 var(--s2); font-size: 14px; color: var(--muted, #667); }
.digest--link { cursor: pointer; }
.digest--link:hover { box-shadow: 0 0 0 2px var(--line, #dde); }
.digest--link:focus-visible { outline: 3px solid var(--accent, #2a7); outline-offset: 2px; }
.digest-open { margin-top: var(--s2); display: inline-flex; align-items: center; gap: 4px; }

/* Transfer rumours (club and league pages): a row per move; opening it shows the reports. */
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.rm-head h3 { margin: 0; }
.rm-filter { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); color: var(--muted); }
.rm-filter select { min-height: 36px; padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font: inherit; font-size: var(--fs-sm); max-width: 100%; }
.rm { border-top: 1px solid var(--sunk); }
.rm summary { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; min-height: var(--tap); cursor: pointer; list-style: none; }
.rm summary::-webkit-details-marker { display: none; }
.rm summary:focus-visible { outline: 2px solid var(--pitch); outline-offset: 2px; border-radius: var(--r-sm); }
.rm-dir--in { background: color-mix(in srgb, var(--pitch) 16%, transparent); color: var(--pitch); }
.rm-dir--out { background: var(--sunk); color: var(--muted); }
.rm-rate { flex: none; display: grid; justify-items: end; gap: 2px; text-align: right; }
.rm-rate small { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.rm-band { padding: 2px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; background: var(--sunk); color: var(--ink); }
.rm-band--done { background: var(--pitch); color: var(--pitch-ink); }
.rm-band--close { background: color-mix(in srgb, var(--pitch) 28%, var(--surface)); }
.rm-band--serious { background: var(--flood); color: var(--flood-ink); }
.rm-band--vague { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.rm-band--denied { background: transparent; color: var(--loss); box-shadow: inset 0 0 0 1px var(--loss); }
.rm-reports { list-style: none; margin: 0 0 var(--s3); padding: 0 0 0 var(--s3); border-left: 2px solid var(--sunk); display: grid; gap: var(--s2); }
.rm-reports a { color: var(--ink); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.rm-reports small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.rm-how summary { cursor: pointer; color: var(--pitch); font-weight: 600; font-size: var(--fs-sm); min-height: var(--tap); display: flex; align-items: center; }
.rm-how ul { margin: 0 0 var(--s2); padding-left: var(--s4); }
