/* css/tokens.css */
/* Agidani League design tokens.
   Light = "the medal": warm ivory, polished gold, ink black, a hint of pitch green.
   Dark  = "the plaque": near-black, gold foil type, thin gold double rules.
   Every colour, radius, shadow, space and duration lives here. No raw hex elsewhere. */

@font-face {
  font-family: "Cinzel";
  src: url("/static/fonts/cinzel-var-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/static/fonts/barlow-condensed-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* type */
  --font-display: "Cinzel", "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-score: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --fs-2xl: clamp(1.9rem, 1.4rem + 2.6vw, 3.25rem);
  --fs-hero: clamp(2.3rem, 1.5rem + 4.4vw, 5rem);
  --fs-score: clamp(3rem, 2rem + 6vw, 6.5rem);

  /* space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --gutter: 1rem;
  --max: 72rem;
  --tabbar-h: 4rem;
  --header-h: 3.75rem;

  /* shape */
  --r-xs: 4px;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --rule: 1px;

  /* motion */
  --dur-1: 140ms;
  --dur-2: 280ms;
  --dur-3: 600ms;
  --dur-4: 1200ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* fixed brand accents (same in both themes) */
  --ribbon-red: #c8202f;
  --ribbon-white: #fbf8f1;
  --ribbon-blue: #1d3f94;
  --black: #000000;
  --plinth-hi: #2a2620;
  --plinth: #0e0d0b;
  --plinth-lo: #050504;
  --white: #ffffff;
  --gold-50: #fbf3dc;
  --gold-200: #f1d98f;
  --gold-300: #e7c463;
  --gold-400: #d4a945;
  --gold-500: #b88a2b;
  --gold-600: #946b18;
  --gold-700: #6f4f0f;
  --gold-800: #4a3407;
  --sheen: linear-gradient(
    100deg,
    var(--gold-700) 0%,
    var(--gold-400) 22%,
    var(--gold-200) 38%,
    var(--gold-500) 55%,
    var(--gold-300) 72%,
    var(--gold-600) 100%
  );

  /* light theme ("the medal") */
  color-scheme: light;
  --bg: #f6efdf;
  --bg-2: #efe5cd;
  --bg-glow: #fff8e4;
  --surface: #fffaf0;
  --surface-2: #f6eedb;
  --surface-3: #ece0c2;
  --ink: #16130d;
  --ink-2: #4f4636;
  --ink-3: #6b604b;
  --line: #ddcba0;
  --line-2: #c9b07a;
  --gold: var(--gold-500);
  --gold-ink: #6e500f; /* gold-coloured text, AA on ivory */
  --on-gold: #16130d;
  --pitch: #1d6a3a;
  --pitch-ink: #175730;
  --pitch-soft: #dcebdc;
  --live: #c8202f;
  --live-ink: #ffffff;
  --warn: #8a5a00;
  --warn-bg: #fbecc6;
  --danger: #b3261e;
  --danger-bg: #fbe1dd;
  --ok: #1d6a3a;
  --ok-bg: #dcefdf;
  --focus: #1d3f94;
  --overlay: rgb(22 19 13 / 0.55);
  --shadow-1: 0 1px 2px rgb(74 52 7 / 0.08), 0 2px 8px rgb(74 52 7 / 0.06);
  --shadow-2: 0 2px 4px rgb(74 52 7 / 0.08), 0 12px 32px rgb(74 52 7 / 0.12);
  --shadow-gold: 0 0 0 1px var(--line-2), 0 10px 30px rgb(184 138 43 / 0.18);
  --plaque: var(--surface);
  --plaque-ink: var(--ink);
  --hero-bg: radial-gradient(120% 90% at 50% 0%, var(--bg-glow) 0%, var(--bg) 55%, var(--bg-2) 100%);

  /* accent (admin theme setting overrides) and fan team tint (pick your team) */
  --accent: var(--gold);
  --fan: var(--accent);
  --fan-2: var(--ink);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0a08;
  --bg-2: #12100c;
  --bg-glow: #2a2112;
  --surface: #15130f;
  --surface-2: #1d1a14;
  --surface-3: #27221a;
  --ink: #f5ecd6;
  --ink-2: #c9bb9c;
  --ink-3: #a2957a;
  --line: #3d3220;
  --line-2: #7a6129;
  --gold: var(--gold-400);
  --gold-ink: #e8c66a;
  --on-gold: #16130d;
  --pitch: #3d9f63;
  --pitch-ink: #7fd3a0;
  --pitch-soft: #13261a;
  --live: #d02a36;
  --live-ink: #ffffff;
  --warn: #f2c25c;
  --warn-bg: #2e2410;
  --danger: #ff8a80;
  --danger-bg: #3a1714;
  --ok: #7fd3a0;
  --ok-bg: #13261a;
  --focus: #e8c66a;
  --overlay: rgb(0 0 0 / 0.7);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.5);
  --shadow-2: 0 12px 40px rgb(0 0 0 / 0.55);
  --shadow-gold: 0 0 0 1px var(--line-2), 0 10px 40px rgb(212 169 69 / 0.12);
  --plaque: #090806;
  --plaque-ink: var(--gold-ink);
  --hero-bg: radial-gradient(110% 80% at 50% 0%, var(--bg-glow) 0%, var(--bg) 60%, var(--black) 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0a08;
    --bg-2: #12100c;
    --bg-glow: #2a2112;
    --surface: #15130f;
    --surface-2: #1d1a14;
    --surface-3: #27221a;
    --ink: #f5ecd6;
    --ink-2: #c9bb9c;
    --ink-3: #a2957a;
    --line: #3d3220;
    --line-2: #7a6129;
    --gold: var(--gold-400);
    --gold-ink: #e8c66a;
    --on-gold: #16130d;
    --pitch: #3d9f63;
    --pitch-ink: #7fd3a0;
    --pitch-soft: #13261a;
    --live: #d02a36;
    --live-ink: #ffffff;
    --warn: #f2c25c;
    --warn-bg: #2e2410;
    --danger: #ff8a80;
    --danger-bg: #3a1714;
    --ok: #7fd3a0;
    --ok-bg: #13261a;
    --focus: #e8c66a;
    --overlay: rgb(0 0 0 / 0.7);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.5);
    --shadow-2: 0 12px 40px rgb(0 0 0 / 0.55);
    --shadow-gold: 0 0 0 1px var(--line-2), 0 10px 40px rgb(212 169 69 / 0.12);
    --plaque: #090806;
    --plaque-ink: var(--gold-ink);
    --hero-bg: radial-gradient(110% 80% at 50% 0%, var(--bg-glow) 0%, var(--bg) 60%, var(--black) 100%);
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 1.5rem;
    --header-h: 4.25rem;
  }
}
@media (min-width: 1440px) {
  :root {
    --max: 80rem;
  }
}

/* css/base.css */
/* Base: reset, typography, page shell. Mobile first (360 px), min-width queries only. */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-base) / 1.55 var(--font-body);
  font-feature-settings: "tnum" 1, "lnum" 1;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-decoration-color: var(--line-2);
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-2xl);
}
h2 {
  font-size: var(--fs-xl);
}
h3 {
  font-size: var(--fs-lg);
}
h4 {
  font-size: var(--fs-md);
}
p {
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
}
.num,
time {
  font-variant-numeric: tabular-nums lining-nums;
}
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: var(--s-2);
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
}
.skip:focus {
  top: var(--s-2);
}

/* ------------------------------------------------------------------ layout */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
main {
  display: block;
  padding-block: var(--s-5) var(--s-7);
}
.stack > * + * {
  margin-top: var(--s-5);
}
.section {
  margin-block: var(--s-7);
}
.section:first-child {
  margin-top: 0;
}
.grid {
  display: grid;
  gap: var(--s-4);
}
.grid > *,
.stack > *,
.match-grid > *,
.draw-layout > *,
.verify-grid > *,
.wall-layout > *,
.rules-layout > * {
  min-width: 0;
}
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
}
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .grid-lg-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------------ section heading */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font: 600 var(--fs-xs) / 1 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 var(--s-2);
}
.eyebrow .icon {
  width: 1rem;
  height: 1rem;
}
.head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.head h2,
.head h1 {
  margin: 0;
}
.head .more-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--gold-ink);
  text-decoration: none;
  min-height: 44px;
}
.lede {
  font-size: var(--fs-md);
  color: var(--ink-2);
  max-width: 40rem;
}
.muted {
  color: var(--ink-2);
}
.small {
  font-size: var(--fs-sm);
}
.ribbon-rule {
  height: 6px;
  border: 0;
  margin: var(--s-6) 0;
  background: linear-gradient(
    180deg,
    var(--ribbon-red) 0 33.3%,
    var(--ribbon-white) 33.3% 66.6%,
    var(--ribbon-blue) 66.6%
  );
  border-radius: var(--r-pill);
  box-shadow: 0 0 0 1px var(--line);
  max-width: 7rem;
}
.ribbon-rule.center {
  margin-inline: auto;
}
.gold-text {
  background: var(--sheen);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-title {
  text-align: center;
  padding-block: var(--s-4) var(--s-5);
}
.page-title h1 {
  margin-bottom: var(--s-2);
}
.page-title .lede {
  margin-inline: auto;
}

/* ------------------------------------------------------------------ helpers */
[hidden] {
  display: none !important;
}
code.break {
  display: block;
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
  color: var(--gold-ink);
  background: var(--surface-2);
  padding: var(--s-2);
  border-radius: var(--r-xs);
}
.center-flex {
  justify-content: center;
}
.flush {
  margin: 0;
}
.pre {
  white-space: pre-line;
  margin: 0;
}
.h-sm {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-lg);
}
.h-sm .icon {
  color: var(--gold);
}
.h-xs {
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.h-section {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-lg);
  letter-spacing: 0.08em;
  margin-bottom: var(--s-4);
}
.h-section::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: var(--rule) solid var(--line);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -3px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fan), transparent);
  opacity: 0.85;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: var(--header-h);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  text-decoration: none;
  min-width: 0;
  margin-right: auto;
}
.wordmark .crown {
  width: 1.9rem;
  height: 1.9rem;
  color: var(--gold);
  flex: none;
}
.wordmark-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1;
}
.wordmark-name {
  font: 700 0.95rem / 1 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark-tag {
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-top: 0.2rem;
  white-space: nowrap;
}
.wordmark-tag .script {
  flex: none;
  height: 1.25em;
  width: 3.1em;
  color: var(--gold-ink);
  transform: translateY(-0.08em);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur-1);
}
.icon-btn:hover {
  background: var(--surface-2);
}
.icon-btn .icon {
  width: 1.3rem;
  height: 1.3rem;
}
.fan-btn {
  width: auto;
  padding-inline: var(--s-2);
  gap: var(--s-1);
  display: inline-flex;
  align-items: center;
}
.fan-dot {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: conic-gradient(var(--fan) 0 50%, var(--fan-2) 0);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-2);
}
.fan-code {
  display: none;
  font: 700 var(--fs-xs) / 1 var(--font-body);
  letter-spacing: 0.08em;
}
@media (min-width: 480px) {
  .fan-code {
    display: inline;
  }
}
.theme-toggle .moon,
[data-theme="dark"] .theme-toggle .sun {
  display: none;
}
[data-theme="dark"] .theme-toggle .moon {
  display: block;
}
.lite-toggle[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--gold-ink);
}
.desk-nav {
  display: none;
}
@media (min-width: 1024px) {
  .desk-nav {
    display: flex;
    gap: var(--s-1);
  }
  .desk-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: var(--s-2);
    white-space: nowrap;
    border-radius: var(--r-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--ink-2);
  }
  .desk-nav a:hover {
    color: var(--ink);
    background: var(--surface-2);
  }
  .desk-nav a[aria-current="page"] {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 var(--gold);
    border-radius: 0;
  }
  .wordmark-name {
    font-size: 1.2rem;
  }
  .wordmark .crown {
    width: 2.3rem;
    height: 2.3rem;
  }
}
@media (max-width: 359px) {
  .wordmark-tag {
    display: none;
  }
}

/* ------------------------------------------------------------------ ticker */
.ticker {
  position: relative;
  overflow: hidden;
  background: var(--plaque);
  color: var(--ink);
  border-bottom: var(--rule) solid var(--line);
  font-size: var(--fs-sm);
  height: 2.25rem;
  display: flex;
  align-items: center;
}
[data-theme="dark"] .ticker {
  color: var(--gold-ink);
}
.ticker-label {
  position: relative;
  z-index: 2;
  flex: none;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding-inline: var(--s-3);
  background: var(--live);
  color: var(--live-ink);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ticker-track {
  display: flex;
  gap: var(--s-6);
  white-space: nowrap;
  padding-left: var(--s-4);
  animation: ticker 40s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track {
  animation-play-state: paused;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.ticker-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.ticker-item[data-kind="goal"]::before,
.ticker-item[data-kind="own_goal"]::before {
  background: var(--pitch);
}
.ticker-item[data-kind="red"]::before {
  background: var(--live);
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------------ live pill */
.live-pill {
  position: fixed;
  z-index: 45;
  left: 50%;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s-2));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  max-width: calc(100vw - 2 * var(--gutter));
  padding: var(--s-1) var(--s-3) var(--s-1) var(--s-1);
  min-height: 44px;
  border-radius: var(--r-pill);
  background: var(--plaque);
  color: var(--ink);
  border: var(--rule) solid var(--line-2);
  box-shadow: var(--shadow-2);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
[data-theme="dark"] .live-pill {
  background: var(--surface-2);
}
.live-pill .badge-live {
  flex: none;
}
.live-pill .score {
  font-family: var(--font-score);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.live-pill .clock {
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.live-pill[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ bottom tabs */
.tabbar {
  position: fixed;
  z-index: 50;
  inset: auto 0 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: var(--rule) solid var(--line);
}
.tabbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.tabbar a .icon {
  width: 1.45rem;
  height: 1.45rem;
}
.tabbar a[aria-current="page"] {
  color: var(--ink);
}
.tabbar a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0;
  width: 2rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--fan);
}
.tabbar .dot-live {
  position: absolute;
  top: 0.6rem;
  left: calc(50% + 0.5rem);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 2px var(--surface);
}
@media (min-width: 1024px) {
  .tabbar {
    display: none;
  }
  body {
    padding-bottom: 0;
  }
  .live-pill {
    bottom: var(--s-5);
  }
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  border-top: var(--rule) solid var(--line);
  background: var(--bg-2);
  padding-block: var(--s-6) var(--s-7);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.site-footer .presented {
  text-align: center;
  margin-bottom: var(--s-5);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-1) var(--s-4);
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--ink);
}
.footer-fine {
  text-align: center;
  margin-top: var(--s-4);
  font-size: var(--fs-xs);
}

/* ------------------------------------------------------------------ flash */
.flashes {
  display: grid;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.flash {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border-left: 4px solid var(--gold);
}
.flash.error {
  background: var(--danger-bg);
  border-color: var(--danger);
}
.flash.success {
  background: var(--ok-bg);
  border-color: var(--ok);
}

/* ------------------------------------------------------------------ motion */
.rise {
  animation: rise var(--dur-3) var(--ease) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.no-js .reveal,
[data-lite="1"] .reveal {
  opacity: 1;
  transform: none;
}
.page-wipe {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--ribbon-red) 0 33.3%,
    var(--ribbon-white) 33.3% 66.6%,
    var(--ribbon-blue) 66.6%
  );
  transform: translateX(-101%);
}
.page-wipe.go {
  animation: wipe 520ms var(--ease) forwards;
}
@keyframes wipe {
  50% {
    transform: translateX(0);
  }
  to {
    transform: translateX(101%);
  }
}

[data-lite="1"] *,
[data-lite="1"] *::before,
[data-lite="1"] *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 160ms !important;
}
[data-lite="1"] .ticker-track {
  animation: none !important;
  overflow-x: auto;
}
[data-lite="1"] .ticker {
  overflow-x: auto;
  scrollbar-width: none;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

.page-live .site-footer .presented {
  display: none;
}

@media (min-width: 1280px) {
  .desk-nav a {
    padding-inline: var(--s-3);
  }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  /* the wordmark already links home; frees room for the rest */
  .desk-nav a:first-child {
    display: none;
  }
}

/* css/components/core.css */
/* Buttons, badges, plaque cards, team chips, forms, dialogs, segmented tabs. */

/* ------------------------------------------------------------------ buttons */
.btn {
  --btn-bg: var(--surface-2);
  --btn-ink: var(--ink);
  --btn-line: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  border: var(--rule) solid var(--btn-line);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 650;
  font-size: var(--fs-base);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1), background var(--dur-1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-gold {
  --btn-bg: var(--sheen);
  --btn-ink: var(--on-gold);
  --btn-line: var(--gold-600);
  background-size: 160% 100%;
  box-shadow: 0 6px 20px rgb(148 107 24 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.35);
}
.btn-gold:hover {
  background-position: 100% 0;
}
.btn-ink {
  --btn-bg: var(--ink);
  --btn-ink: var(--bg);
  --btn-line: var(--ink);
}
.btn-ghost {
  --btn-bg: transparent;
}
.btn-danger {
  --btn-bg: var(--danger-bg);
  --btn-ink: var(--danger);
  --btn-line: var(--danger);
}
.btn-team {
  --btn-bg: var(--team);
  --btn-ink: var(--team-ink);
  --btn-line: var(--team);
}
.btn-sm {
  min-height: 44px;
  padding-inline: var(--s-4);
  font-size: var(--fs-sm);
}
.btn-block {
  width: 100%;
}
.btn .icon {
  width: 1.2rem;
  height: 1.2rem;
}

/* ------------------------------------------------------------------ badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
  font: 700 0.7rem / 1.3 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-3);
  color: var(--ink-2);
  white-space: nowrap;
}
.badge-live {
  background: var(--live);
  color: var(--live-ink);
}
.badge-live::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.25;
    transform: scale(0.7);
  }
}
.badge-gold {
  background: var(--gold);
  color: var(--on-gold);
}
.badge-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge-warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge-q {
  background: var(--pitch);
  color: var(--white);
  padding: 0.1rem 0.4rem;
}
.badge-e {
  background: var(--surface-3);
  color: var(--ink-3);
  padding: 0.1rem 0.4rem;
}

/* ------------------------------------------------------------------ plaque card */
.card {
  position: relative;
  background: var(--surface);
  border: var(--rule) solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  padding: var(--s-4);
  min-width: 0;
}
.plaque {
  position: relative;
  background: var(--plaque);
  color: var(--plaque-ink);
  border-radius: var(--r);
  padding: var(--s-5) var(--s-4);
  border: var(--rule) solid var(--line-2);
  box-shadow: var(--shadow-gold);
}
.plaque::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: var(--rule) solid var(--line-2);
  border-radius: calc(var(--r) - 4px);
  pointer-events: none;
  opacity: 0.8;
}
[data-theme="dark"] .plaque h1,
[data-theme="dark"] .plaque h2,
[data-theme="dark"] .plaque h3 {
  color: var(--gold-ink);
}
.card-link {
  text-decoration: none;
  display: block;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2);
}
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.team-tint {
  border-top: 4px solid var(--team, var(--gold));
}
.empty {
  text-align: center;
  padding: var(--s-6) var(--s-4);
  color: var(--ink-2);
}
.empty .icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto var(--s-3);
  color: var(--gold);
}

/* ------------------------------------------------------------------ team chip / crest */
.crest {
  --size: 2.5rem;
  position: relative;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 30% 30% 48% 48%;
  background: linear-gradient(160deg, var(--team) 0 72%, var(--team-2) 72%);
  color: var(--team-ink);
  display: grid;
  place-items: center;
  font: 700 calc(var(--size) * 0.29) / 1 var(--font-body);
  letter-spacing: 0.02em;
  padding-bottom: calc(var(--size) * 0.12);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.25), 0 0 0 1px var(--line-2);
  overflow: hidden;
}
.crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.crest-lg {
  --size: 4.25rem;
}
.crest-xl {
  --size: 6rem;
}
.crest-sm {
  --size: 1.75rem;
}
.crest-tbd {
  background: var(--surface-3);
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.team-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
  text-decoration: none;
}
.team-chip .name {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-swatch {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--team) 0 55%, var(--team-2) 55%);
  box-shadow: 0 0 0 1px var(--line-2);
  vertical-align: middle;
}

/* ------------------------------------------------------------------ segmented tabs */
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  margin-bottom: var(--s-4);
  overflow-x: auto;
  scrollbar-width: none;
}
.seg button,
.seg a {
  flex: 1;
  min-height: 44px;
  padding: 0 var(--s-4);
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font-weight: 650;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.seg [aria-selected="true"],
.seg [aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

/* ------------------------------------------------------------------ forms */
.form {
  display: grid;
  gap: var(--s-4);
}
.field {
  display: grid;
  gap: var(--s-1);
  min-width: 0;
}
.field label,
.label {
  font-weight: 650;
  font-size: var(--fs-sm);
}
.field .hint {
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.field .error {
  font-size: var(--fs-sm);
  color: var(--danger);
}
.input,
.field input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  border: var(--rule) solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem; /* 16px stops iOS zoom */
}
.field textarea {
  min-height: 7rem;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  outline: 2px solid color-mix(in srgb, var(--gold) 45%, transparent);
  outline-offset: 0;
}
.field input[type="color"] {
  width: 100%;
  height: 48px;
  padding: 2px;
  border-radius: var(--r-sm);
  border: var(--rule) solid var(--line-2);
  background: var(--surface);
}
.check {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  font-weight: 550;
}
.check input {
  width: 1.3rem;
  height: 1.3rem;
  accent-color: var(--gold-600);
}
.form-row {
  display: grid;
  gap: var(--s-3);
}
@media (min-width: 480px) {
  .form-row {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  }
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
}

/* ------------------------------------------------------------------ dialog */
dialog {
  border: 0;
  padding: 0;
  max-width: min(32rem, calc(100vw - 2rem));
  width: 100%;
  background: transparent;
  color: var(--ink);
}
dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(3px);
}
dialog .plaque {
  background: var(--surface);
  color: var(--ink);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.dialog-head h2 {
  margin: 0;
  font-size: var(--fs-lg);
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-2);
}
.picker-grid button {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 56px;
  padding: var(--s-2);
  border-radius: var(--r-sm);
  border: var(--rule) solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  font-weight: 650;
  font-size: var(--fs-sm);
  min-width: 0;
}
.picker-grid button[aria-pressed="true"] {
  border-color: var(--team);
  box-shadow: 0 0 0 2px var(--team);
}
.picker-grid .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  top: calc(var(--header-h) + var(--s-3));
  transform: translate(-50%, -20px);
  opacity: 0;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-weight: 650;
  box-shadow: var(--shadow-2);
  transition: opacity var(--dur-2), transform var(--dur-2) var(--ease);
  pointer-events: none;
  max-width: calc(100vw - 2rem);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------ share row */
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.btn-wa {
  --btn-bg: var(--pitch);
  --btn-ink: var(--white);
  --btn-line: var(--pitch);
}

/* ------------------------------------------------------------------ prose (rules) */
.prose {
  max-width: 44rem;
}
.prose h3 {
  margin-top: var(--s-5);
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 var(--s-4);
}
.prose li + li {
  margin-top: var(--s-1);
}
.prose strong {
  font-weight: 700;
}

/* css/components/match.css */
/* Match cards, scoreboard with laurel frame, standings tables, bracket, sponsors, countdown. */

/* ------------------------------------------------------------------ fixture card */
.fixture {
  position: relative;
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r);
  background: var(--surface);
  border: var(--rule) solid var(--line);
  box-shadow: var(--shadow-1);
  text-decoration: none;
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2);
}
a.fixture:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.fixture::before,
.fixture::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
}
.fixture::before {
  left: 0;
  background: var(--home, var(--line));
}
.fixture::after {
  right: 0;
  background: var(--away, var(--line));
}
.fixture.is-live {
  border-color: var(--live);
  box-shadow: 0 0 0 1px var(--live), var(--shadow-2);
}
.fixture-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  color: var(--ink-2);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.fixture-meta time {
  font: 700 var(--fs-sm) / 1 var(--font-body);
  color: var(--ink);
  letter-spacing: 0;
}
.fixture-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s-2);
}
.fixture-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  text-align: center;
  min-width: 0;
}
.fixture-team .name {
  font-weight: 700;
  font-size: var(--fs-sm);
  line-height: 1.2;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}
.fixture-team .slot {
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.fixture-score {
  font: 700 2.1rem / 1 var(--font-score);
  letter-spacing: 0.02em;
  min-width: 4.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.fixture-score .vs {
  font: 600 var(--fs-sm) / 1 var(--font-display);
  color: var(--ink-3);
  letter-spacing: 0.1em;
}
.fixture-score .pens {
  display: block;
  font: 600 var(--fs-xs) / 1.4 var(--font-body);
  color: var(--ink-2);
}
.fixture-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.clash {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  color: var(--warn);
  background: var(--warn-bg);
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-pill);
  font-weight: 650;
}
.fixture-winner {
  font-weight: 800;
}
.fixture-loser .name {
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ scoreboard */
.scoreboard {
  position: relative;
  padding: var(--s-5) var(--s-3) var(--s-4);
  border-radius: var(--r-lg);
  background: var(--plaque);
  color: var(--plaque-ink);
  border: var(--rule) solid var(--line-2);
  box-shadow: var(--shadow-gold);
  overflow: hidden;
  text-align: center;
}
.scoreboard::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: var(--rule) solid var(--line-2);
  border-radius: calc(var(--r-lg) - 5px);
  pointer-events: none;
}
.scoreboard .stage {
  font: 700 var(--fs-xs) / 1 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-4);
}
.score-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
}
.score-team .name {
  font: 700 clamp(0.74rem, 0.5rem + 1.1vw, 1.25rem) / 1.15 var(--font-display);
  letter-spacing: 0;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  color: var(--ink);
}
.score-figure {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 6.5rem;
  padding-inline: var(--s-2);
}
.score-figure .laurel {
  position: absolute;
  inset: -1.4rem -0.5rem -1rem;
  width: calc(100% + 1rem);
  height: calc(100% + 2.4rem);
  color: var(--gold);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--dur-3), transform var(--dur-3) var(--ease-out-back);
}
.is-finished .score-figure .laurel {
  opacity: 0.85;
  transform: none;
}
.score-digits {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.15em;
  font: 700 var(--fs-score) / 0.95 var(--font-score);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.score-digits .sep {
  color: var(--gold);
  font-size: 0.6em;
}
.digit {
  display: inline-block;
  min-width: 0.6em;
  transform-origin: 50% 60%;
}
.digit.flip {
  animation: flip 520ms var(--ease-out-back);
}
@keyframes flip {
  0% {
    transform: rotateX(90deg);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
.score-sub {
  margin-top: var(--s-3);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  font-weight: 650;
  color: var(--ink-2);
}
.match-clock {
  font: 700 var(--fs-lg) / 1 var(--font-score);
  letter-spacing: 0.04em;
  color: var(--ink);
}
.scoreboard .team-bar {
  position: absolute;
  top: 0;
  height: 6px;
  width: 50%;
}
.scoreboard .team-bar.home {
  left: 0;
  background: var(--home);
}
.scoreboard .team-bar.away {
  right: 0;
  background: var(--away);
}

/* ------------------------------------------------------------------ timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
  transform: translateX(-50%);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 3rem 1fr;
  align-items: center;
  gap: var(--s-2);
  padding-block: var(--s-2);
}
.tl-min {
  grid-column: 2;
  justify-self: center;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-2);
  font: 700 var(--fs-sm) / 1 var(--font-score);
}
.tl-body {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
  font-size: var(--fs-sm);
}
.tl-item.home .tl-body {
  grid-column: 1;
  grid-row: 1;
  justify-content: flex-end;
  text-align: right;
}
.tl-item.away .tl-body {
  grid-column: 3;
  grid-row: 1;
}
.tl-body strong {
  display: block;
}
.tl-body .sub {
  color: var(--ink-2);
  font-size: var(--fs-xs);
}
.tl-ico {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
}
.tl-ico.yellow {
  color: var(--gold-300);
}
.tl-ico.red {
  color: var(--live);
}
.tl-ico.goal {
  color: var(--pitch);
}
.tl-item.goal .tl-min {
  border-color: var(--pitch);
  background: var(--pitch-soft);
}

/* ------------------------------------------------------------------ standings table */
.table-card {
  padding: 0;
  overflow: hidden;
}
.table-card .table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  border-bottom: var(--rule) solid var(--line);
  background: var(--surface-2);
}
.table-card .table-head h3 {
  margin: 0;
  font-size: var(--fs-md);
  letter-spacing: 0.08em;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.standings {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.standings th,
.standings td {
  padding: 0 var(--s-2);
  height: 3.25rem;
  text-align: center;
  white-space: nowrap;
  border-bottom: var(--rule) solid var(--line);
  background: var(--surface);
}
.standings th {
  height: 2.25rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface);
}
.standings tr:last-child td {
  border-bottom: 0;
}
.standings .pos {
  width: 2rem;
  font-weight: 700;
  color: var(--ink-2);
}
.standings .team-col {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  min-width: 8.5rem;
  max-width: 10rem;
  padding-left: var(--s-3);
  box-shadow: 1px 0 0 var(--line);
}
.standings .pts-col {
  position: sticky;
  right: 0;
  z-index: 1;
  font-weight: 800;
  font-size: var(--fs-md);
  box-shadow: -1px 0 0 var(--line);
  min-width: 3rem;
}
.standings .team-col .team-chip {
  max-width: 100%;
}
.standings tr.qual td {
  background: color-mix(in srgb, var(--pitch-soft) 55%, var(--surface));
}
.standings tr.qual td.team-col {
  box-shadow: inset 4px 0 0 var(--pitch), 1px 0 0 var(--line);
}
.form-dots {
  display: inline-flex;
  gap: 3px;
}
.form-dots span {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--white);
}
.form-dots .W {
  background: var(--pitch);
}
.form-dots .D {
  background: var(--ink-3);
}
.form-dots .L {
  background: var(--live);
}
.table-note {
  padding: var(--s-2) var(--s-4) var(--s-3);
  font-size: var(--fs-xs);
  color: var(--ink-2);
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ bracket */
.bracket {
  display: grid;
  gap: var(--s-4);
  position: relative;
}
.bracket-col {
  display: grid;
  gap: var(--s-3);
  align-content: center;
}
.bracket-col h4 {
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0;
  text-align: center;
}
.bslot {
  display: block;
  border-radius: var(--r-sm);
  border: var(--rule) solid var(--line);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-1);
}
.bteam {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  min-height: 3rem;
  border-left: 5px solid var(--team, var(--line));
}
.bteam + .bteam {
  border-top: var(--rule) solid var(--line);
}
.bteam .name {
  flex: 1;
  min-width: 0;
  font-weight: 650;
  font-size: var(--fs-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bteam .g {
  font: 700 1.2rem / 1 var(--font-score);
}
.bteam.won {
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
}
.bteam.won .name {
  font-weight: 800;
}
.bteam.tbd .name {
  color: var(--ink-3);
  font-style: italic;
  font-weight: 500;
}
.bracket-svg {
  display: none;
}
.champion-card {
  text-align: center;
}
.champion-card .crown-drop {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto var(--s-2);
  color: var(--gold);
}
.champion-card .crest {
  margin: 0 auto var(--s-2);
}
@media (min-width: 768px) {
  .bracket {
    grid-template-columns: 1fr 1fr 0.9fr;
    gap: var(--s-6);
  }
  .bracket-svg {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
  }
  .bracket-svg path {
    fill: none;
    stroke: var(--line-2);
    stroke-width: 2;
  }
  .bracket-svg path.won {
    stroke: var(--gold);
    stroke-width: 3;
  }
}

/* ------------------------------------------------------------------ countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: var(--s-2);
}
.cd-unit {
  display: grid;
  justify-items: center;
  gap: var(--s-1);
  min-width: 4.1rem;
  padding: var(--s-3) var(--s-2);
  border-radius: var(--r-sm);
  background: var(--plaque);
  border: var(--rule) solid var(--line-2);
  box-shadow: var(--shadow-1);
}
.cd-unit b {
  font: 700 clamp(2rem, 1.4rem + 3vw, 3.5rem) / 1 var(--font-score);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
[data-theme="dark"] .cd-unit b {
  color: var(--gold-ink);
}
.cd-unit span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ sponsors */
.sponsor-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3);
}
.sponsor-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
  border: var(--rule) solid var(--line-2);
  background: var(--surface);
  text-decoration: none;
  text-align: center;
}
.sponsor-mark .sname {
  font: 700 var(--fs-sm) / 1.15 var(--font-display);
  letter-spacing: 0.06em;
  color: var(--ink);
}
.sponsor-mark .srole {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-top: 2px;
}
.sponsor-mark img {
  max-height: 44px;
  width: auto;
}
.presented-line {
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--s-2);
}

/* ------------------------------------------------------------------ people (guests, players) */
.person {
  display: flex;
  gap: var(--s-3);
  align-items: center;
}
.avatar {
  flex: none;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  font: 700 var(--fs-lg) / 1 var(--font-display);
  color: var(--gold-ink);
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.person h3 {
  margin: 0;
  font-size: var(--fs-md);
}
.person .role {
  font-size: var(--fs-sm);
  color: var(--gold-ink);
  font-weight: 600;
}
.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rank-list li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 3.25rem;
  border-bottom: var(--rule) solid var(--line);
}
.rank-list li:last-child {
  border-bottom: 0;
}
.rank-list .rk {
  width: 1.75rem;
  text-align: center;
  font: 700 var(--fs-md) / 1 var(--font-score);
  color: var(--ink-3);
}
.rank-list li:first-child .rk {
  color: var(--gold-ink);
}
.rank-list .who {
  flex: 1;
  min-width: 0;
  text-decoration: none;
}
.rank-list .who strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-list .who span {
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.rank-list .val {
  font: 700 1.5rem / 1 var(--font-score);
}

/* goal burst */
.goal-burst {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--s-2);
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--team) 85%, transparent) 0%, color-mix(in srgb, var(--team) 55%, transparent) 60%, transparent 100%);
}
.goal-word {
  font: 700 clamp(4rem, 20vw, 12rem) / 0.9 var(--font-score);
  letter-spacing: 0.04em;
  color: var(--white);
  -webkit-text-stroke: 3px var(--team-2);
  text-shadow: 0 8px 40px rgb(0 0 0 / 0.45);
}
.goal-team {
  font: 700 var(--fs-lg) / 1.2 var(--font-display);
  color: var(--white);
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.6);
  padding-inline: var(--s-4);
  text-align: center;
}
.goal-burst.go {
  animation: burst-bg 2.2s var(--ease) both;
}
.goal-burst.go .goal-word {
  animation: burst-word 2.2s var(--ease-out-back) both;
}
.goal-burst.lite {
  animation: burst-lite 1.6s ease both;
}
@keyframes burst-bg {
  0% {
    opacity: 0;
  }
  10%,
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes burst-word {
  0% {
    transform: scale(0.2) rotate(-8deg);
  }
  18% {
    transform: scale(1.12) rotate(2deg);
  }
  30%,
  80% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}
@keyframes burst-lite {
  0%,
  100% {
    opacity: 0;
  }
  15%,
  80% {
    opacity: 1;
  }
}


/* ------------------------------------------------------------------ pitch lines (draw on scroll) */
.pitch-lines {
  display: block;
  width: min(100%, 34rem);
  height: auto;
  margin: var(--s-6) auto;
  color: var(--line-2);
}
.pitch-lines path,
.pitch-lines circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.6s var(--ease);
}
.pitch-lines.in path,
.pitch-lines.in circle,
.no-js .pitch-lines path,
.no-js .pitch-lines circle,
[data-lite="1"] .pitch-lines path,
[data-lite="1"] .pitch-lines circle {
  stroke-dashoffset: 0;
}
.sound-btn[aria-pressed="true"] {
  background: var(--gold);
  color: var(--on-gold);
}
