/* ============================================================
   LEAP SCORES — "FLIGHT PATH" redesign prototype  ·  v2 hybrid
   Dark broadcast STAGE (header / hero / ticker / mastheads /
   CTA / footer) + light, high-contrast READING surfaces
   (meet listings, session info, score tables).
   Display: Archivo Expanded — Numerals: Chivo Mono (tabular)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,62..125,100..900;1,62..125,100..900&family=Chivo+Mono:ital,wght@0,300..700;1,300..700&display=swap');

:root {
  /* ---- light reading surfaces ---- */
  --bg: #f4f7fb;          /* page */
  --paper: #ffffff;       /* cards / table */
  --paper-2: #f7f9fc;
  --th-bg: #eef2f8;       /* table head */
  --ink: #0f1828;         /* primary text — ~15:1 on white */
  --ink-soft: #3a4762;    /* secondary */
  --ink-faint: #5b6678;   /* tertiary — ~5.0:1 on white */
  --line: #e3e8f1;
  --line-strong: #cdd6e4;

  /* ---- dark stage ---- */
  --stage-950: #070c17;
  --stage-900: #0a101f;
  --stage-850: #0e1628;
  --stage-800: #131d35;
  --chalk: #f2f6ff;
  --chalk-dim: #aebbd6;
  --chalk-faint: #8694b8;

  /* ---- brand ---- */
  --teal-bright: #1ce4c4;          /* electric green — dark surfaces, fills, glows */
  --teal-ink: #00736a;             /* teal text/links on white (~5:1) */
  --teal-soft: rgba(0, 115, 106, 0.10);

  /* ---- medals: vivid accent + deep text variant for white ---- */
  --gold: #eaa400;    --gold-soft: rgba(234, 164, 0, 0.16);   --gold-ink: #876200;
  --silver: #94a3bd;  --silver-soft: rgba(120, 138, 168, 0.18); --silver-ink: #515d72;
  --bronze: #cf8043;  --bronze-soft: rgba(196, 120, 60, 0.16); --bronze-ink: #8c4f1d;

  --live: #c52c45;   --live-soft: rgba(216, 50, 79, 0.12);

  --focus: #00736a;

  --radius: 14px;
  --radius-lg: 22px;

  --font-ui: 'Archivo', 'Segoe UI', sans-serif;
  --font-score: 'Chivo Mono', 'Consolas', monospace;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 10px rgba(15, 23, 42, 0.07), 0 18px 40px rgba(15, 23, 42, 0.09);
  --shadow-glow: 0 0 24px rgba(28, 228, 196, 0.3);
}

/* ---------- reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-ui);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--teal-bright); color: var(--stage-950); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

a { color: var(--teal-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

.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;
}

/* dark containers expose a brighter focus + flip the focus token */
.topbar, .hero, .ticker, .masthead, .cta-band, .site-foot { --focus: var(--teal-bright); }

/* ---------- type ---------- */
.display {
  font-family: var(--font-ui);
  font-variation-settings: 'wdth' 122;
  font-weight: 860;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 0.96;
}

.kicker {
  font-variation-settings: 'wdth' 110;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  color: var(--teal-bright);
}

.num { font-family: var(--font-score); font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

main { padding-bottom: 96px; }

section { margin-top: 72px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.section-head h2::before {
  content: '';
  width: 26px; height: 4px; border-radius: 2px;
  background: var(--teal-ink);
}

.section-head .count {
  color: var(--ink-faint);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ============================================================
   TOP BAR (dark)
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--stage-900);
  border-bottom: 1px solid rgba(150, 172, 222, 0.16);
  color: var(--chalk);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.brand img {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);   /* navy logo → white */
  opacity: 0.97;
}

.brand .proto-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stage-950);
  background: var(--teal-bright);
  padding: 3px 8px;
  border-radius: 99px;
  transform: translateY(-8px);
}

.topnav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.topnav a {
  color: var(--chalk-dim);
  font-weight: 650;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.18s, background 0.18s;
}

.topnav a:hover { color: var(--chalk); background: rgba(160, 185, 235, 0.10); text-decoration: none; }
.topnav a.active { color: var(--teal-bright); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
}

.btn-solid { background: var(--teal-bright); color: var(--stage-950); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); text-decoration: none; }

.btn-ghost { background: transparent; color: var(--chalk); border-color: rgba(150, 172, 222, 0.32); }
.btn-ghost:hover { border-color: var(--teal-bright); color: var(--teal-bright); text-decoration: none; transform: translateY(-2px); }

/* light-surface button variant (used in light sections if needed) */
.btn-solid-ink { background: var(--teal-ink); color: #fff; }
.btn-solid-ink:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }

/* hamburger */
.menu-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid rgba(150, 172, 222, 0.32);
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
}
.menu-btn span {
  display: block; width: 20px; height: 2px;
  background: var(--chalk);
  margin: 4px 0; border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.menu-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   HERO (dark stage)
   ============================================================ */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
  color: var(--chalk);
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(28, 228, 196, 0.16), transparent 60%),
    radial-gradient(900px 540px at 95% 8%, rgba(64, 96, 255, 0.14), transparent 65%),
    linear-gradient(180deg, var(--stage-900) 0%, var(--stage-950) 100%);
}

.hero::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg,
    rgba(160, 185, 235, 0.05) 0px, rgba(160, 185, 235, 0.05) 1px,
    transparent 1px, transparent 160px);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.2) 55%, rgba(0,0,0,.6));
}

.hero > .wrap { position: relative; z-index: 1; }

.hero h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); max-width: 13ch; }

.hero h1 .accent {
  color: var(--teal-bright);
  font-style: italic;
  text-shadow: 0 0 38px rgba(28, 228, 196, 0.45);
}

.hero .lede { margin-top: 22px; max-width: 52ch; color: var(--chalk-dim); font-size: 1.06rem; }

.hero .cta-row { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero .kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.hero .kicker::before { content: ''; width: 34px; height: 2px; background: var(--teal-bright); }

/* flight arc */
.arc-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.arc-stage svg { position: absolute; right: -6%; top: 4%; width: 62%; min-width: 540px; opacity: 0.9; }
.arc-path { fill: none; stroke: url(#arcGrad); stroke-width: 2.5; stroke-dasharray: 8 10; animation: arc-dash 30s linear infinite; }
.arc-path-soft { fill: none; stroke: rgba(150, 172, 222, 0.14); stroke-width: 1.5; }
@keyframes arc-dash { to { stroke-dashoffset: -1000; } }
.arc-dot { filter: drop-shadow(0 0 8px rgba(28, 228, 196, 0.9)); }

/* staggered entrance */
.rise { opacity: 0; transform: translateY(22px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.rise.d1 { animation-delay: 0.08s; }
.rise.d2 { animation-delay: 0.18s; }
.rise.d3 { animation-delay: 0.3s; }
.rise.d4 { animation-delay: 0.44s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* hero stat band */
.stat-band {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid rgba(150, 172, 222, 0.16);
}
.stat-band .stat { padding: 22px 26px; border-left: 1px solid rgba(150, 172, 222, 0.16); }
.stat-band .stat:first-child { border-left: none; padding-left: 0; }
.stat .stat-num { font-family: var(--font-score); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; color: var(--chalk); }
.stat .stat-num em { color: var(--teal-bright); font-style: normal; }
.stat .stat-label { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--chalk-faint); font-weight: 700; margin-top: 4px; }

/* ============================================================
   LIVE TICKER (dark)
   ============================================================ */
.ticker {
  background: var(--stage-850);
  border-bottom: 1px solid rgba(150, 172, 222, 0.16);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  color: var(--chalk-dim);
}

.ticker-label {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 30px 10px 18px;
  font-weight: 850; font-size: 0.78rem; letter-spacing: 0.18em;
  background: var(--live); color: #fff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}

.ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; cursor: pointer; }

.ticker-move {
  display: flex; gap: 48px; white-space: nowrap;
  padding-left: 48px;   /* equals gap so the -50% loop point is seamless */
  animation: ticker-scroll 38s linear infinite;
}
.tick-copy { display: inline-flex; gap: 48px; }
.ticker-track:hover .ticker-move,
.ticker-track:focus-within .ticker-move,
.ticker-track.paused .ticker-move { animation-play-state: paused; }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }

.tick-item { display: inline-flex; align-items: baseline; gap: 10px; font-size: 0.88rem; }
.tick-item .ev { color: var(--teal-bright); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.12em; }
.tick-item .sc { font-family: var(--font-score); color: var(--chalk); font-weight: 600; }

/* pulse dot — adapts to the text color of its context */
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, currentColor 0%, transparent); }
}

/* ============================================================
   MEET CARDS (light)
   ============================================================ */
.meet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
  gap: 18px;
}

.meet-card {
  position: relative;
  display: flex;
  gap: 18px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.22s, box-shadow 0.22s;
}
.meet-card:hover {
  transform: translateY(-4px);
  border-color: var(--teal-ink);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
/* live accent bar: a clipped overlay, not a border override, so the 1px box
   border stays uniform (no corner taper, no content shift) */
.meet-card.is-live, .session-card.is-live { overflow: hidden; }
.meet-card.is-live::before, .session-card.is-live::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--live); z-index: 1;
}

.date-block {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  align-self: flex-start;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}
.date-block .mon {
  display: block;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 4px 0 3px;
  background: var(--teal-soft); color: var(--teal-ink);
}
.date-block .day { display: block; font-family: var(--font-score); font-size: 1.5rem; font-weight: 600; padding: 6px 0 7px; color: var(--ink); }
.meet-card.is-live .date-block .mon { background: var(--live-soft); color: var(--live); }

.meet-body { min-width: 0; flex: 1; }
.meet-name {
  font-variation-settings: 'wdth' 112;
  font-weight: 820; text-transform: uppercase;
  font-size: 1.08rem; line-height: 1.15; letter-spacing: 0.01em;
  color: var(--ink);
}
.meet-meta { margin-top: 7px; color: var(--ink-soft); font-size: 0.84rem; }
.meet-meta .sep { color: var(--ink-faint); margin-inline: 6px; }
.meet-foot { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* status chips */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.66rem; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 99px; border: 1px solid transparent;
}
.chip-live { background: var(--live-soft); color: var(--live); border-color: rgba(216, 50, 79, 0.32); }
.chip-up { background: var(--teal-soft); color: var(--teal-ink); border-color: rgba(0, 115, 106, 0.28); }
.chip-final { background: #eef2f8; color: var(--ink-faint); border-color: var(--line-strong); }
.sessions-note { font-size: 0.78rem; color: var(--ink-faint); font-weight: 600; }

/* compact past meet rows */
.past-list { border-top: 1px solid var(--line); }
.past-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 18px; align-items: center;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.15s;
}
.past-row:hover { background: var(--paper); text-decoration: none; }
.past-row .pr-date { font-family: var(--font-score); color: var(--ink-faint); font-size: 0.82rem; }
.past-row .pr-name { font-weight: 750; font-variation-settings: 'wdth' 108; text-transform: uppercase; font-size: 0.95rem; }
.past-row .pr-loc { display: block; font-weight: 400; text-transform: none; font-variation-settings: 'wdth' 100; color: var(--ink-faint); font-size: 0.8rem; margin-top: 2px; }
.past-row .pr-go { color: var(--ink-faint); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.past-row:hover .pr-go { color: var(--teal-ink); }

/* search */
.search-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 10px 18px;
  min-width: 270px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-pill:focus-within { border-color: var(--teal-ink); box-shadow: 0 0 0 3px var(--teal-soft); }
.search-pill svg { flex-shrink: 0; opacity: 0.5; }
.search-pill input {
  background: none; border: none; outline: none;
  color: var(--ink); font-family: var(--font-ui);
  font-size: 1rem;   /* 16px avoids iOS auto-zoom */
  width: 100%;
}
.search-pill input::placeholder { color: var(--ink-faint); }

/* director CTA band (dark accent) */
.cta-band {
  margin-top: 88px;
  position: relative;
  border-radius: var(--radius-lg);
  padding: 46px 48px;
  color: var(--chalk);
  background:
    radial-gradient(700px 300px at 85% 20%, rgba(28, 228, 196, 0.16), transparent 60%),
    linear-gradient(160deg, var(--stage-800), var(--stage-950));
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap; overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); max-width: 22ch; color: var(--chalk); }
.cta-band p { color: var(--chalk-dim); margin-top: 10px; max-width: 50ch; }

/* ============================================================
   PAGE MASTHEAD (dark) — meet + scores pages
   ============================================================ */
.masthead {
  position: relative;
  overflow: hidden;
  padding: 56px 0 40px;
  color: var(--chalk);
  background:
    radial-gradient(700px 360px at 88% -20%, rgba(28, 228, 196, 0.14), transparent 60%),
    linear-gradient(180deg, var(--stage-900), var(--stage-850));
  border-bottom: 1px solid rgba(150, 172, 222, 0.14);
}

.crumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--chalk-faint); margin-bottom: 18px;
}
.crumb a { color: var(--chalk-dim); }
.crumb a:hover { color: var(--teal-bright); text-decoration: none; }

.masthead h1 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); }

.masthead .meta-row {
  margin-top: 16px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  color: var(--chalk-dim); font-size: 0.92rem;
}
.meta-row .m { display: inline-flex; align-items: center; gap: 8px; }
.meta-row svg { opacity: 0.7; }

.live-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--live); color: #fff;
  font-size: 0.7rem; font-weight: 900; letter-spacing: 0.2em;
  padding: 6px 13px; border-radius: 7px;
  vertical-align: middle; transform: translateY(-4px);
}

/* push content area down a touch from the dark masthead */
.masthead + main { padding-top: 8px; }
main > .podium:first-child,
.day-label:first-of-type { margin-top: 38px; }

/* ============================================================
   SESSION GRID (light) — meet page
   ============================================================ */
.day-label {
  margin: 38px 0 16px;
  display: flex; align-items: center; gap: 16px;
  font-weight: 850; font-variation-settings: 'wdth' 115;
  text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 1.02rem; color: var(--ink-soft);
}
.day-label::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }

.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr));
  gap: 16px;
}

.session-card {
  position: relative;
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.session-card:hover { transform: translateY(-3px); border-color: var(--teal-ink); box-shadow: var(--shadow-md); text-decoration: none; }

.session-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.session-num { font-variation-settings: 'wdth' 118; font-weight: 860; text-transform: uppercase; font-size: 1.05rem; color: var(--ink); }
.session-levels { margin-top: 8px; color: var(--ink-soft); font-size: 0.88rem; }
.session-time {
  margin-top: 14px; font-family: var(--font-score); font-size: 0.82rem; color: var(--ink-faint);
  display: flex; justify-content: space-between; align-items: center;
}
.session-time .go { font-family: var(--font-ui); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-ink); }

/* ============================================================
   PODIUM (light, medal accents) — scores page
   ============================================================ */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 34px 0 10px; }

.podium-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px 20px;
  overflow: hidden;
}
.podium-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--medal, var(--ink-faint));
}
.podium-card.gold   { --medal: var(--gold);   --medal-ink: var(--gold-ink); }
.podium-card.silver { --medal: var(--silver); --medal-ink: var(--silver-ink); }
.podium-card.bronze { --medal: var(--bronze); --medal-ink: var(--bronze-ink); }

.podium-rank {
  position: absolute; right: 14px; top: 4px;
  font-family: var(--font-score); font-size: 3.6rem; font-weight: 700;
  color: var(--medal); opacity: 0.2; line-height: 1;
}
.podium-label { font-size: 0.64rem; font-weight: 850; letter-spacing: 0.24em; text-transform: uppercase; color: var(--medal-ink); }
.podium-name { margin-top: 8px; font-variation-settings: 'wdth' 112; font-weight: 830; text-transform: uppercase; font-size: 1.12rem; line-height: 1.1; color: var(--ink); }
.podium-club { color: var(--ink-faint); font-size: 0.8rem; margin-top: 4px; font-weight: 600; }
.podium-score { margin-top: 14px; font-family: var(--font-score); font-size: 2.1rem; font-weight: 700; color: var(--ink); }
.podium-score .lbl { font-family: var(--font-ui); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.2em; color: var(--ink-faint); display: block; margin-bottom: 2px; }

/* ============================================================
   FILTER CHIPS + CONTROLS (light) — scores page
   ============================================================ */
.controls { margin-top: 30px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip-row .row-label { font-size: 0.66rem; font-weight: 850; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin-right: 4px; }

.fchip {
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 700;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 99px; padding: 7px 15px; cursor: pointer;
  transition: all 0.16s;
}
.fchip:hover { border-color: var(--teal-ink); color: var(--ink); }
.fchip.on { background: var(--teal-bright); color: var(--stage-950); border-color: var(--teal-bright); font-weight: 800; }

.sim-toggle {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 99px; padding: 8px 16px; cursor: pointer;
  transition: all 0.18s;
}
.sim-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); }
.sim-toggle.on { color: var(--live); border-color: rgba(216, 50, 79, 0.4); }
.sim-toggle.on .dot { background: var(--live); animation: pulse 1.6s infinite; }

/* ============================================================
   RESULTS TABLE (light) — columns on every screen
   ============================================================ */
.board {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.board-scroll { max-height: min(72vh, 680px); overflow: auto; }

table.results { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

.results thead th {
  position: sticky; top: 0; z-index: 5;
  background: var(--th-bg);
  font-size: 0.66rem; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.results thead th button {
  all: unset;
  display: flex; align-items: center; gap: 6px;
  width: 100%; box-sizing: border-box;
  padding: 13px 14px; cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.results thead th button:hover { color: var(--ink); background: rgba(15, 23, 42, 0.04); }
.results thead th button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.results thead th.sorted button { color: var(--teal-ink); }
.results thead th .arrow { font-size: 0.7rem; opacity: 0; transition: opacity 0.15s, transform 0.2s; }
.results thead th.sorted .arrow { opacity: 1; }
.results thead th.sorted.desc .arrow { transform: rotate(180deg); }
.results thead th.num-col button { justify-content: flex-end; text-align: right; }

.results tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink); }
.results tbody tr { transition: background 0.15s; }
.results tbody tr:hover { background: var(--paper-2); }
.results tbody tr:last-child td { border-bottom: none; }

/* top-3 AA row tints */
.results tbody tr.r1 { background: linear-gradient(90deg, var(--gold-soft), transparent 70%); }
.results tbody tr.r2 { background: linear-gradient(90deg, var(--silver-soft), transparent 70%); }
.results tbody tr.r3 { background: linear-gradient(90deg, var(--bronze-soft), transparent 70%); }

.gymnast-cell { display: flex; flex-direction: column; min-width: 150px; white-space: normal; }
.gymnast-cell .gname { font-weight: 750; color: var(--ink); }
.gymnast-cell .gclub { font-size: 0.76rem; color: var(--ink-faint); font-weight: 600; }
.gage { display: none; }   /* age folded into the name cell on mobile only */

.lvl-cell { color: var(--ink-soft); font-size: 0.82rem; font-weight: 650; }

.score-cell { text-align: right; font-family: var(--font-score); font-weight: 600; font-size: 0.95rem; }
.score-cell .rk {
  display: inline-block; font-family: var(--font-ui);
  font-size: 0.7rem; font-weight: 800; color: var(--ink-faint);
  margin-left: 7px; min-width: 22px; text-align: center;
  background: #eef2f8; border-radius: 6px; padding: 2px 4px; vertical-align: 2px;
}
.score-cell .rk.rk1 { background: var(--gold-soft); color: var(--gold-ink); }
.score-cell .rk.rk2 { background: var(--silver-soft); color: var(--silver-ink); }
.score-cell .rk.rk3 { background: var(--bronze-soft); color: var(--bronze-ink); }
.score-cell.empty { color: var(--ink-faint); font-weight: 400; }
.aa-cell { font-size: 1.04rem; font-weight: 700; color: var(--teal-ink); }

/* score landing flash (teal wash, reads on white) */
@keyframes land {
  0% { background: rgba(28, 228, 196, 0.5); box-shadow: inset 0 0 0 1px var(--teal-ink); }
  100% { background: transparent; box-shadow: none; }
}
td.flash { animation: land 1.8s ease-out; border-radius: 6px; }

/* compact event headers: full word on desktop, 2-letter on mobile */
.ev-ab { display: none; }
.ev-ic { width: 15px; height: 15px; opacity: 0.65; flex-shrink: 0; }

/* board footer */
.board-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 13px 18px; border-top: 1px solid var(--line);
  font-size: 0.76rem; color: var(--ink-faint); flex-wrap: wrap;
}
.board-foot .upd { font-family: var(--font-score); color: var(--ink-soft); }

/* ============================================================
   FOOTER (dark)
   ============================================================ */
footer.site-foot {
  margin-top: 40px;
  padding: 36px 0 46px;
  position: relative;
  background: var(--stage-900);
  color: var(--chalk-dim);
}
footer.site-foot::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 180px; height: 3px;
  background: linear-gradient(90deg, var(--teal-bright), transparent);
}
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-inner img { height: 22px; filter: brightness(0) invert(1); opacity: 0.6; }
.foot-inner .fine { color: var(--chalk-faint); font-size: 0.78rem; }
.foot-inner .fine strong { color: var(--chalk-dim); }
.foot-links { display: flex; gap: 18px; font-size: 0.8rem; }
.foot-links a { color: var(--chalk-dim); }
.foot-links a:hover { color: var(--teal-bright); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .podium { grid-template-columns: 1fr; }
  .podium-card { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 16px 20px; }
  .podium-score { margin-top: 0; font-size: 1.7rem; }
  .podium-rank { font-size: 2.6rem; top: auto; bottom: 2px; }
  .stat-band { grid-template-columns: 1fr; }
  .stat-band .stat { border-left: none; border-top: 1px solid rgba(150,172,222,0.16); padding-left: 0; }
  .stat-band .stat:first-child { border-top: none; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }

  .topnav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--stage-900);
    border-bottom: 1px solid rgba(150, 172, 222, 0.28);
    padding: 12px 16px 18px; gap: 2px;
  }
  .topnav.open { display: flex; }
  .topnav a { padding: 13px 14px; font-size: 1rem; }
  .topnav .btn { justify-content: center; margin-top: 8px; }
  .menu-btn { display: block; }

  .hero { padding: 64px 0 48px; }
  .arc-stage svg { opacity: 0.45; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .search-pill { width: 100%; min-width: 0; }

  .cta-band { padding: 32px 26px; }

  .past-row { grid-template-columns: 1fr auto; }
  .past-row .pr-date { grid-column: 1 / -1; order: -1; margin-bottom: -8px; }

  .controls .sim-toggle { margin-left: 0; width: 100%; justify-content: center; }

  /* ---- scores stay a SORTABLE TABLE on phones ---- */
  /* scroll-padding keeps a focused/scrolled event column clear of the two
     pinned columns (name on the left, AA on the right) */
  .board-scroll { max-height: none; overflow: auto; scroll-padding-inline: 118px 86px; }
  table.results { font-size: 0.8rem; }
  .results thead th button { padding: 10px 7px; gap: 3px; }
  .results tbody td { padding: 9px 7px; }

  /* event headers: hide icon + word, show the 2-letter code */
  .ev-ic { display: none; }
  .ev-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ev-ab { display: inline; }

  /* drop the Age column; show age under the gymnast name */
  .results .age-col, .results .lvl-cell { display: none; }
  .gage { display: inline; }

  /* stack the rank under the score so each event column stays one number wide */
  .score-cell .rk { display: block; width: fit-content; margin: 3px 0 0 auto; }
  .score-cell { padding-left: 6px; padding-right: 6px; }

  /* pin the gymnast name (left) and AA (right); the 4 events scroll between them */
  .results th:first-child, .results td:first-child {
    position: sticky; left: 0; z-index: 2; background: var(--paper);
    box-shadow: 6px 0 8px -8px rgba(15, 23, 42, 0.28);
  }
  .results th:last-child, .results td:last-child {
    position: sticky; right: 0; z-index: 2; background: var(--paper);
    box-shadow: -6px 0 8px -8px rgba(15, 23, 42, 0.28);
  }
  .results thead th:first-child,
  .results thead th:last-child { z-index: 7; background: var(--th-bg); }
  .results tbody tr.r1 td:first-child, .results tbody tr.r1 td:last-child { background: #fbf3df; }
  .results tbody tr.r2 td:first-child, .results tbody tr.r2 td:last-child { background: #eef1f7; }
  .results tbody tr.r3 td:first-child, .results tbody tr.r3 td:last-child { background: #f8ede2; }
  .results tbody tr:hover td:first-child,
  .results tbody tr:hover td:last-child { background: var(--paper-2); }
  .gymnast-cell { min-width: 112px; }
  .results td.aa-cell { padding-left: 10px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .ticker-move { animation: none; }
  html { scroll-behavior: auto; }
}
