/* ============================================================
   THEME VARIABLES — Dark & Light
   ============================================================ */
:root {
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s ease;
}

.triathy-dashboard-scope[data-theme="dark"] {
  --bg-primary: #0a0c10;
  --bg-card: #12151c;
  --bg-card-hover: #181c26;
  --bg-surface: #1a1e28;
  --accent-cyan: #00e5ff;
  --accent-orange: #ff6b35;
  --accent-green: #00e676;
  --accent-magenta: #e040fb;
  --accent-gold: #ffd740;
  --race-accent: #9C27B0;          /* ◄── race colour: TA-100 purple — change per race */
  --race-accent-rgb: 156,39,176;   /* ◄── RGB triplet for rgba() usage */
  --text-primary: #f0f2f5;
  --text-secondary: #8b92a5;
  --text-muted: #545b6e;
  --border-subtle: rgba(255,255,255,0.06);
  --border-accent: rgba(0,229,255,0.15);
  --glow-cyan: 0 0 30px rgba(0,229,255,0.15);
  --glow-race: 0 0 40px rgba(var(--race-accent-rgb),0.25), inset 0 0 40px rgba(var(--race-accent-rgb),0.05);
  --mesh-1: rgba(0,229,255,0.06);
  --mesh-2: rgba(255,107,53,0.04);
  --mesh-3: rgba(224,64,251,0.02);
  --grain-opacity: 0.03;
  --chart-grid: rgba(255,255,255,0.03);
  --tooltip-bg: rgba(18,21,28,0.95);
  --skeleton-base: #1a1e28;
  --skeleton-shine: #252a36;
}

.triathy-dashboard-scope[data-theme="light"] {
  --bg-primary: #f4f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #fafbfc;
  --bg-surface: #eef0f4;
  --accent-cyan: #0091ea;
  --accent-orange: #e65100;
  --accent-green: #00a152;
  --accent-magenta: #aa00ff;
  --accent-gold: #ff8f00;
  --race-accent: #7B1FA2;          /* ◄── race colour (light): deeper purple for contrast */
  --race-accent-rgb: 123,31,162;
  --text-primary: #1a1d23;
  --text-secondary: #5f6577;
  --text-muted: #9198a8;
  --border-subtle: rgba(0,0,0,0.08);
  --border-accent: rgba(0,145,234,0.2);
  --glow-cyan: 0 0 20px rgba(0,145,234,0.1);
  --glow-race: 0 0 32px rgba(var(--race-accent-rgb),0.20), inset 0 0 32px rgba(var(--race-accent-rgb),0.04);
  --mesh-1: rgba(0,145,234,0.04);
  --mesh-2: rgba(230,81,0,0.03);
  --mesh-3: rgba(170,0,255,0.02);
  --grain-opacity: 0.015;
  --chart-grid: rgba(0,0,0,0.06);
  --tooltip-bg: rgba(255,255,255,0.97);
  --skeleton-base: #e8eaee;
  --skeleton-shine: #f4f5f7;
}

/* ============================================================
   RACE-SPECIFIC ACCENT COLOURS
   Each race overrides --race-accent and --race-accent-rgb.
   Everything else (streaks, glows, hovers) derives from these.
   Full specificity required to override base theme vars.
   ============================================================ */

/* TA-100 — Purple (default, set in theme vars above) */
.triathy-dashboard-scope.race-ta100[data-theme="dark"] {
  --race-accent: #9C27B0;
  --race-accent-rgb: 156,39,176;
}
.triathy-dashboard-scope.race-ta100[data-theme="light"] {
  --race-accent: #7B1FA2;
  --race-accent-rgb: 123,31,162;
}

/* Olympic — Amber Gold */
.triathy-dashboard-scope.race-olympic[data-theme="dark"] {
  --race-accent: #D4920B;
  --race-accent-rgb: 212,146,11;
  --glow-race: 0 0 40px rgba(212,146,11,0.25), inset 0 0 40px rgba(212,146,11,0.05);
}
.triathy-dashboard-scope.race-olympic[data-theme="light"] {
  --race-accent: #B87A00;
  --race-accent-rgb: 184,122,0;
  --glow-race: 0 0 32px rgba(184,122,0,0.20), inset 0 0 32px rgba(184,122,0,0.04);
}

/* Sprint — Electric Blue */
.triathy-dashboard-scope.race-sprint[data-theme="dark"] {
  --race-accent: #0097C7;
  --race-accent-rgb: 0,151,199;
  --glow-race: 0 0 40px rgba(0,151,199,0.25), inset 0 0 40px rgba(0,151,199,0.05);
}
.triathy-dashboard-scope.race-sprint[data-theme="light"] {
  --race-accent: #00769C;
  --race-accent-rgb: 0,118,156;
  --glow-race: 0 0 32px rgba(0,118,156,0.20), inset 0 0 32px rgba(0,118,156,0.04);
}

/* Try — Vivid Green */
.triathy-dashboard-scope.race-try[data-theme="dark"] {
  --race-accent: #00C853;
  --race-accent-rgb: 0,200,83;
  --glow-race: 0 0 40px rgba(0,200,83,0.25), inset 0 0 40px rgba(0,200,83,0.05);
}
.triathy-dashboard-scope.race-try[data-theme="light"] {
  --race-accent: #00963E;
  --race-accent-rgb: 0,150,62;
  --glow-race: 0 0 32px rgba(0,150,62,0.20), inset 0 0 32px rgba(0,150,62,0.04);
}

.triathy-dashboard-scope, .triathy-dashboard-scope * { margin:0; padding:0; box-sizing:border-box; }

.triathy-dashboard-scope {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
.triathy-dashboard-scope::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 120px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(120,40,180,0.35) 0%, rgba(120,40,180,0) 100%);
  transition: background var(--transition);
}
[data-theme="light"].triathy-dashboard-scope::before {
  background: linear-gradient(180deg, rgba(140,60,200,0.18) 0%, rgba(140,60,200,0) 100%);
}

/* ============================================================
   BACKGROUND
   ============================================================ */
.bg-mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, var(--mesh-1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, var(--mesh-2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, var(--mesh-3) 0%, transparent 70%);
  transition: background var(--transition);
}

.grain-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   LAYOUT
   ============================================================ */
.dashboard-wrapper {
  position: relative; z-index: 2;
  max-width: 1400px; margin: 0 auto;
  padding: 32px 20px 100px;
}

/* ============================================================
   UTILITY: Scroll-triggered animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ============================================================
   SKELETON LOADER
   ============================================================ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--skeleton-base);
  border-radius: var(--radius-sm);
}
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skeleton-chart { height: 300px; }
.skeleton-text { height: 16px; width: 60%; margin: 8px 0; }

/* ============================================================
   TOOLBAR: Theme toggle + refresh + print
   ============================================================ */
.toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.tool-btn:hover {
  border-color: var(--border-accent);
  color: var(--accent-cyan);
  background: var(--bg-card-hover);
}
.tool-btn .icon { font-size: 16px; line-height: 1; }
.tool-btn .label-text { display: inline; }

.refresh-ring {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-cyan);
  display: none;
}
.refresh-ring.active {
  display: inline-block;
  animation: spin 5s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   HERO
   ============================================================ */
.hero-header {
  text-align: center;
  margin-bottom: 36px;
  position: relative;
}
.hero-header::after {
  content: '';
  position: absolute; bottom: -18px; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.race-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.2);
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent-cyan);
  margin-bottom: 14px;
}
.race-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.5; transform:scale(1.5); }
}

.hero-title {
  font-family: "industry", sans-serif;
  font-weight: 700;
  font-size: clamp(42px, 6.5vw, 76px);
  line-height: 0.95; letter-spacing: 1px;
  text-transform: uppercase;
}
.hero-title span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 15px; color: var(--text-secondary);
  margin-top: 10px; font-weight: 300;
}
.hero-subtitle strong { color: var(--text-primary); font-weight: 600; }

.meta-row {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; flex-wrap: wrap; margin-top: 10px;
  font-size: 11px; color: var(--text-muted);
}
.meta-row .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ============================================================
   DISTANCE STRIP
   ============================================================ */
.distance-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0; margin: 32px auto 36px;
  max-width: 660px;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.distance-block {
  padding: 18px 12px; text-align: center;
  position: relative; transition: background 0.2s;
}
.distance-block:not(:last-child)::after {
  content: ''; position: absolute; right: 0;
  top: 20%; height: 60%; width: 1px;
  background: var(--border-subtle);
}
.distance-block.swim { background: linear-gradient(180deg, rgba(0,229,255,0.08) 0%, transparent 100%); }
.distance-block.cycle { background: linear-gradient(180deg, rgba(255,107,53,0.08) 0%, transparent 100%); }
.distance-block.run { background: linear-gradient(180deg, rgba(0,230,118,0.08) 0%, transparent 100%); }
.distance-icon { font-size: 20px; margin-bottom: 4px; }
.distance-value {
  font-family: "industry", sans-serif;
  font-weight: 700;
  font-size: 28px; line-height: 1;
}
.distance-value .unit { font-size: 16px; color: var(--text-secondary); }
.distance-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   TICKER TAPE — Welcome latest entrants
   ============================================================ */
.ticker-wrap {
  display: flex;
  align-items: stretch;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: var(--bg-card);
}
.ticker-label {
  display: flex; flex-direction: column; justify-content: center;
  padding: 8px 16px;
  font-family: "industry", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--accent-cyan);
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 1;
  line-height: 1.2;
}
.ticker-label .ticker-label-main {
  font-size: 13px;
  letter-spacing: 2px;
}
.ticker-label .ticker-label-sub {
  font-size: 8px;
  letter-spacing: 1.5px;
  opacity: 0.75;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.ticker-content {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
  width: max-content;
}
.ticker-content:hover { animation-play-state: paused; }

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: "industry", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
}
.ticker-item .ticker-icon {
  color: var(--accent-green);
  font-size: 10px;
}
.ticker-item .ticker-name {
  font-weight: 700;
  color: var(--accent-cyan);
}
.ticker-sep {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px;
  position: relative; overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--glow-race);
}
.kpi-card:hover {
  border-color: rgba(var(--race-accent-rgb),0.3);
  background: var(--bg-card-hover);
  box-shadow: 0 0 60px rgba(var(--race-accent-rgb),0.35), inset 0 0 60px rgba(var(--race-accent-rgb),0.07);
  transform: translateY(-2px);
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--race-accent), transparent);
}

.kpi-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 10px;
}
.kpi-value {
  font-family: "industry", sans-serif;
  font-weight: 700;
  font-size: 38px; line-height: 1;
}
.kpi-value .unit { font-size: 18px; color: var(--text-secondary); margin-left: 2px; }
.kpi-change {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 6px;
}
.kpi-change.positive { color: var(--accent-green); background: rgba(0,230,118,0.1); }
.kpi-change.neutral { color: var(--accent-gold); background: rgba(255,215,64,0.1); }
.kpi-change.negative { color: var(--accent-orange); background: rgba(255,107,53,0.1); }

/* ============================================================
   CHART CARDS
   ============================================================ */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  box-shadow: var(--glow-race);
}
.chart-card:hover {
  border-color: rgba(var(--race-accent-rgb),0.3);
  background: var(--bg-card-hover);
  box-shadow: 0 0 60px rgba(var(--race-accent-rgb),0.35), inset 0 0 60px rgba(var(--race-accent-rgb),0.07);
}

.chart-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 20px;
  gap: 12px; flex-wrap: wrap;
}
.chart-title {
  font-family: "industry", sans-serif;
  font-weight: 700;
  font-size: 20px; letter-spacing: 1px;
  text-transform: uppercase;
}
.chart-title-sub {
  font-size: 12px; color: var(--text-muted);
  font-family: "industry", sans-serif;
  font-weight: 400; margin-top: 2px;
}
.chart-badge {
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; padding: 4px 10px;
  border-radius: 6px; white-space: nowrap;
  background: rgba(0,229,255,0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(0,229,255,0.15);
}
#projectionBadge {
  white-space: normal;
  text-align: center;
  line-height: 1.5;
}

/* Chart legend chips */
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center;
}
.legend-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
}
.legend-chip .swatch {
  width: 14px; height: 3px; border-radius: 2px;
}
.legend-chip .swatch.dashed {
  border-top: 2px dashed; background: none; height: 0;
}

/* Chart containers */
.chart-container { position: relative; width: 100%; }
.chart-container.entries-chart { height: 456px; }
.chart-container.age-chart { height: 380px; }
.chart-container.gender-chart {
  max-width: 220px; margin: 0 auto; aspect-ratio: 1 / 1;
}

/* Layout grids */
.section-gap { margin-bottom: 28px; }
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.grid-charts-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
  align-items: start;
}

/* ============================================================
   FULLSCREEN CHART OVERLAY
   ============================================================ */
.fullscreen-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px;
  min-width: 44px; min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: "industry", sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.fullscreen-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0,229,255,0.06);
}
.fullscreen-btn .fs-icon { font-size: 14px; line-height: 1; }

.chart-card.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  margin: 0;
  border-radius: 0;
  overflow-y: auto;
  background: var(--bg-primary);
  padding: 24px;
}
.chart-card.is-fullscreen .chart-container.entries-chart {
  height: calc(100vh - 140px) !important;
}
.chart-card.is-fullscreen .fullscreen-btn .fs-label::after {
  content: 'Exit';
}
.chart-card:not(.is-fullscreen) .fullscreen-btn .fs-label::after {
  content: 'Expand';
}

/* ============================================================
   GENDER STATS
   ============================================================ */
.gender-stats {
  display: flex; justify-content: center;
  gap: 28px; margin-top: 18px;
}
.gender-stat { text-align: center; }
.gender-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px; font-weight: 600;
}
.gender-stat-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted); margin-top: 2px;
}

/* ============================================================
   PRICING TABLE
   ============================================================ */
.pricing-table-wrapper { overflow-x: auto; margin-top: 8px; }

.pricing-table { width: 100%; border-collapse: collapse; font-size: 13px; font-family:"industry",sans-serif; }
.pricing-table thead th {
  text-align: center; padding: 10px 8px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted);
  border-bottom: 2px solid var(--border-subtle);
  background: var(--bg-surface);
}
.pricing-table tbody tr {
  transition: all 0.2s; border-bottom: 1px solid var(--border-subtle);
}
.triathy-dashboard-scope .pricing-table tbody tr:nth-child(odd) { background:var(--bg-surface) !important; }
.triathy-dashboard-scope .pricing-table tbody tr:nth-child(even) { background:var(--bg-card) !important; }
.triathy-dashboard-scope .pricing-table thead th { background:var(--bg-surface) !important; }
.triathy-dashboard-scope .pricing-table td {
  padding: 12px 10px !important; text-align: center;
  vertical-align: middle; color: var(--text-secondary) !important;
  background: transparent !important;
}
.tier-num { font-family:"industry",sans-serif; font-weight:700; font-size:20px; color:var(--text-primary); }
.tier-name-cell { text-align: left !important; }
.tier-name-text { font-weight:600; font-size:17px; color:var(--text-primary); display:block; text-transform:uppercase; line-height:1.1; }
.tier-range-text { font-size:10px; color:var(--text-secondary); margin-top:1px; display:block; }

/* Tier row states */
.pricing-table tr.tier-sold-out td { opacity: 0.35; }
.pricing-table tr.tier-sold-out .tier-name-text { text-decoration:line-through; text-decoration-thickness:2px; }

.triathy-dashboard-scope .pricing-table tr.tier-current {
  background: rgba(255,215,64,0.08) !important;
  border-left: 3px solid var(--accent-gold);
  position: relative;
}
.pricing-table tr.tier-current td { color:var(--text-primary); }
.pricing-table tr.tier-current .tier-name-text { color:var(--accent-gold); }

/* "YOU ARE HERE" pulse on current tier — positioned on first td for reliability */
.pricing-table tr.tier-current td:first-child {
  position: relative;
}
.pricing-table tr.tier-current td:first-child::before {
  content: ''; position: absolute; left: -6px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  animation: pulse-dot 2s ease-in-out infinite;
}
.pricing-table tr.tier-future td { color:var(--accent-green); }

.sold-out-badge {
  display:inline-block; padding:4px 10px; border-radius:6px;
  font-family:"industry",sans-serif;
  font-size:14px; font-weight:700; letter-spacing:1px; text-transform:uppercase;
  background:rgba(255,107,53,0.12); color:var(--accent-orange);
  animation: soldOutPulse 2s ease-in-out infinite;
}
@keyframes soldOutPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.04); }
}
.tier-gauge-wrap { display:flex; flex-direction:column; align-items:center; gap:2px; }
.tier-gauge-canvas { display:block; width:120px; height:40px; }
.tier-gauge-label { text-align:center; white-space:nowrap; }
.tier-gauge-label .remaining-value { font-family:"industry",sans-serif; font-weight:700; font-size:14px; color:var(--text-primary); }
.tier-gauge-label .remaining-of { font-family:"industry",sans-serif; font-weight:400; font-size:10px; color:var(--text-muted); }
.remaining-value { font-family:"industry",sans-serif; font-weight:700; font-size:13px; }
.price-value { font-family:"industry",sans-serif; font-weight:700; font-size:22px; color:var(--text-primary); }
.price-value .currency-sym { font-size:13px; color:var(--text-secondary); }
.savings-badge {
  display:inline-block; margin-top:3px; padding:2px 7px; border-radius:10px;
  font-family:"industry",sans-serif;
  font-size:9px; font-weight:700;
  background:rgba(0,230,118,0.15); color:var(--accent-green);
}

/* Mobile pricing: card layout */
.pricing-cards-mobile { display: none; }

/* ============================================================
   PARTICIPANTS TABLE
   ============================================================ */
.table-controls {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.search-input {
  flex: 1; min-width: 180px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; outline: none;
  transition: all 0.2s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color:var(--accent-cyan); box-shadow:0 0 0 3px rgba(0,229,255,0.1); }

.table-page-controls {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.page-btn {
  min-width: 44px; min-height: 44px;
  padding: 8px 14px; font-size: 12px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface); color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.page-btn:hover:not(:disabled) { border-color:var(--accent-cyan); color:var(--accent-cyan); }
.page-btn:disabled { opacity:0.3; cursor:default; }
.page-info {
  font-size:11px; color:var(--text-muted);
  font-family:'JetBrains Mono',monospace; white-space:nowrap;
}

.table-scroll { overflow-x: auto; }
.participant-table { width:100%; border-collapse:collapse; font-size:13px; }
.participant-table thead th {
  text-align:left; padding:10px 12px;
  font-size:10px; font-weight:600; text-transform:uppercase;
  letter-spacing:1.5px; color:var(--text-muted);
  border-bottom:1px solid var(--border-subtle);
  background:var(--bg-card);
  cursor:pointer; user-select:none;
  min-height:44px;
  -webkit-tap-highlight-color: transparent;
}
.participant-table thead th:hover { color:var(--accent-cyan); }
.participant-table tbody tr { transition:background 0.15s; }
.triathy-dashboard-scope .participant-table tbody tr:nth-child(odd) { background:var(--bg-surface) !important; }
.triathy-dashboard-scope .participant-table tbody tr:nth-child(even) { background:var(--bg-card) !important; }
.triathy-dashboard-scope .participant-table tbody tr:hover { background:rgba(0,229,255,0.06) !important; }
.triathy-dashboard-scope .participant-table thead th { background:var(--bg-surface) !important; }
.triathy-dashboard-scope .participant-table td {
  padding:10px 12px !important;
  border-bottom:1px solid var(--border-subtle) !important;
  color:var(--text-secondary) !important;
  background:transparent !important;
}
.name-cell { color:var(--text-primary); font-family:"industry",sans-serif; font-weight:700; }
.name-cell.last-name { font-size:115%; text-transform:uppercase; }
.gender-cell { font-family:"industry",sans-serif; font-weight:400; font-size:13px; color:var(--text-secondary); }
.modified-cell { font-family:"industry",sans-serif; font-weight:400; font-size:11px; color:var(--text-muted); }
.sort-icon { font-size:10px; opacity:0.4; margin-left:3px; }
.participant-table thead th.active-sort { color:var(--accent-cyan); }
.participant-table thead th.active-sort .sort-icon { opacity:1; color:var(--accent-cyan); }

/* Gender filter buttons */
.gender-filters {
  display:flex; gap:4px; flex-shrink:0;
}
.gender-btn {
  padding:8px 14px; min-height:44px;
  font-family:"industry",sans-serif; font-weight:600;
  font-size:11px; letter-spacing:0.5px; text-transform:uppercase;
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-sm);
  background:var(--bg-surface); color:var(--text-muted);
  cursor:pointer; transition:all 0.2s;
  -webkit-tap-highlight-color:transparent;
}
.gender-btn:hover {
  border-color:var(--accent-cyan); color:var(--accent-cyan);
  background:rgba(0,229,255,0.04);
}
.gender-btn.active {
  border-color:var(--accent-cyan); color:var(--accent-cyan);
  background:rgba(0,229,255,0.1);
  box-shadow:0 0 8px rgba(0,229,255,0.15);
}

.race-tag {
  display:inline-flex; align-items:center; gap:5px;
  text-decoration:none; color:var(--accent-cyan);
  font-size:12px; font-weight:600;
  padding:3px 9px; border-radius:6px;
  background:rgba(0,229,255,0.08);
  border:1px solid rgba(0,229,255,0.15);
  transition:all 0.2s;
}
.race-tag:hover { background:rgba(0,229,255,0.15); }
.race-tag img { width:16px; height:auto; }

/* ============================================================
   CTA
   ============================================================ */
.cta-section {
  padding:40px 28px;
  border-radius:var(--radius);
  background: linear-gradient(135deg, rgba(0,229,255,0.06), rgba(255,107,53,0.06), rgba(224,64,251,0.06));
  border:1px solid var(--border-subtle);
  position:relative; overflow:hidden;
  box-shadow: var(--glow-race);
}
.cta-section::before {
  content:''; position:absolute; top:-50%; left:-50%; width:200%; height:200%;
  background:conic-gradient(from 0deg, transparent, rgba(var(--race-accent-rgb),0.04), transparent, rgba(0,229,255,0.03), transparent);
  animation:rotate-bg 20s linear infinite;
}
@keyframes rotate-bg { to { transform:rotate(360deg); } }

/* CTA flex layout with logo */
.cta-layout {
  display: flex; align-items: center; gap: 32px;
  position: relative; z-index: 1;
}
.cta-logo-wrap {
  flex-shrink: 0; width: 160px; height: 160px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cta-logo-img {
  width: 160px !important; height: 160px !important;
  object-fit: contain !important;
  display: block;
}
.cta-content {
  flex: 1; text-align: left;
}

.cta-title { font-family:"industry",sans-serif; font-weight:700; font-size:36px; text-transform:uppercase; letter-spacing:1px; }
.cta-subtitle { color:var(--text-secondary); font-size:42px; margin-top:8px; font-family:"industry",sans-serif; font-weight:600; }
.cta-subtitle strong { color:var(--accent-gold); font-weight:700; }
.cta-button {
  display:inline-flex; align-items:center; gap:8px;
  margin-top:20px; padding:14px 36px;
  font-family:"industry",sans-serif; font-weight:700; font-size:18px; letter-spacing:2px; text-transform:uppercase;
  color:var(--bg-primary); background:linear-gradient(135deg, var(--accent-cyan), #00b8d4);
  border:none; border-radius:var(--radius-sm);
  cursor:pointer; text-decoration:none;
  transition:all 0.3s;
  box-shadow:0 4px 20px rgba(0,229,255,0.3);
  animation: ctaPulse 2s ease-in-out infinite;
}
.cta-button:hover { transform:translateY(-2px) scale(1.05); box-shadow:0 8px 30px rgba(0,229,255,0.4); animation:none; }
@keyframes ctaPulse {
  0%, 100% { transform: scale(1); box-shadow:0 4px 20px rgba(0,229,255,0.3); }
  50% { transform: scale(1.08); box-shadow:0 8px 40px rgba(0,229,255,0.5); }
}

/* ============================================================
   STICKY MOBILE CTA
   ============================================================ */
.sticky-cta {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.sticky-cta-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  max-width: 600px; margin: 0 auto;
  gap: 12px;
}
.sticky-cta-text {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.sticky-cta-text .spots {
  color: var(--accent-orange); font-family: 'JetBrains Mono', monospace;
}
.sticky-cta-btn {
  padding: 10px 24px;
  font-family: "industry", sans-serif;
  font-weight: 700;
  font-size: 16px; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-cyan), #00b8d4);
  border: none; border-radius: 8px;
  cursor: pointer; text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0,229,255,0.3);
}

/* ============================================================
   FOOTER
   ============================================================ */
.dashboard-footer {
  text-align:center; padding:18px;
  font-size:11px; color:var(--text-muted);
  letter-spacing:1px; text-transform:uppercase;
  border-top:1px solid var(--border-subtle); margin-top:40px;
}
.dashboard-footer a { color:var(--accent-cyan); text-decoration:none; }

/* ============================================================
   HISTORICAL RESULTS SECTION
   ============================================================ */
.history-section { margin-bottom: 28px; }
.history-header { margin-bottom: 18px; }
.history-year-tabs {
  display: flex; gap: 8px; margin-top: 12px;
}
.history-year-tab {
  padding: 6px 16px; border-radius: 6px; cursor: pointer;
  font-family: 'industry', sans-serif; font-weight: 700; font-size: 13px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); transition: all var(--transition);
}
.history-year-tab:hover { border-color: var(--border-accent); }
.history-year-tab.active {
  background: linear-gradient(135deg, rgba(120,40,180,0.25), rgba(0,229,255,0.15));
  border-color: rgba(120,40,180,0.5); color: var(--text-primary);
}

.history-panels {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.history-panel {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--glow-race);
}
.history-panel:hover {
  border-color: rgba(var(--race-accent-rgb),0.3);
  box-shadow: 0 0 60px rgba(var(--race-accent-rgb),0.35), inset 0 0 60px rgba(var(--race-accent-rgb),0.07);
}
.history-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; font-family: 'industry', sans-serif;
  font-weight: 700; font-size: 13px; text-transform: uppercase;
  letter-spacing: 1px;
}
.history-panel-header.male-header {
  background: linear-gradient(90deg, rgba(0,229,255,0.12), transparent);
  border-bottom: 2px solid rgba(0,229,255,0.3);
}
.history-panel-header.female-header {
  background: linear-gradient(90deg, rgba(224,64,251,0.12), transparent);
  border-bottom: 2px solid rgba(224,64,251,0.3);
}
.history-gender-icon {
  font-size: 18px; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.male-header .history-gender-icon {
  background: rgba(0,229,255,0.15); color: var(--accent-cyan);
}
.female-header .history-gender-icon {
  background: rgba(224,64,251,0.15); color: var(--accent-magenta);
}
.history-gender-label { color: var(--text-primary); }
.history-finisher-count {
  margin-left: auto; font-size: 11px; font-weight: 600;
  color: var(--text-muted); font-family: 'JetBrains Mono', monospace;
}

/* Winner highlight */
.history-winner {
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.history-winner-medal { font-size: 24px; }
.history-winner-info { flex: 1; min-width: 0; }
.history-winner-name {
  font-family: 'industry', sans-serif; font-weight: 700;
  font-size: 27px; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-winner-name .winner-first {
  font-weight: 500;
}
.history-winner-name .winner-surname {
  font-weight: 800; font-size: 115%;
}
.history-winner-detail {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
.history-winner-time {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 24px; text-align: right;
}
.male-header ~ .history-winner .history-winner-time { color: var(--accent-cyan); }
.female-header ~ .history-winner .history-winner-time { color: var(--accent-magenta); }
.history-panel-male .history-winner-time { color: var(--accent-cyan); }
.history-panel-female .history-winner-time { color: var(--accent-magenta); }

/* Split legend */
.split-legend {
  display: flex; gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.split-legend-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
}
.split-legend-dot {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
}

/* Top 5 table */
.history-table {
  width: 100%; border-collapse: collapse;
  border: none !important;
}
.history-table td,
.history-table th {
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
}
.history-table thead th {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  font-family: 'industry', sans-serif;
  padding: 8px 12px; text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.history-table-row {
  cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
/* Zebra striping — target both tr AND td to override WordPress theme table styles */
.triathy-dashboard-scope .history-panel .history-table tbody tr:nth-child(odd),
.triathy-dashboard-scope .history-panel .history-table tbody tr:nth-child(odd) td { background: #1a1e28 !important; }
.triathy-dashboard-scope .history-panel .history-table tbody tr:nth-child(even),
.triathy-dashboard-scope .history-panel .history-table tbody tr:nth-child(even) td { background: #12151c !important; }
.triathy-dashboard-scope .history-panel .history-table tbody tr:hover,
.triathy-dashboard-scope .history-panel .history-table tbody tr:hover td { background: rgba(0,229,255,0.06) !important; }
.triathy-dashboard-scope .history-panel .history-table thead th { background: #1a1e28 !important; color: var(--text-muted) !important; }
.history-table-row:last-child { border-bottom: none; }

.ht-pos {
  width: 36px; text-align: center; padding: 10px 8px;
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 12px; color: var(--text-muted);
}
.ht-pos-h { width: 36px; text-align: center; }

.ht-name {
  padding: 10px 12px;
  font-family: 'industry', sans-serif; font-weight: 500;
  font-size: 12px; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 0; /* forces text-overflow in table cells */
}
.ht-name-h { min-width: 120px; }
.ht-name .list-first { font-weight: 500; }
.ht-name .list-surname { font-weight: 700; font-size: 115%; }
.ht-name .cat-tag {
  font-size: 9px; color: var(--text-muted); margin-left: 6px;
  padding: 1px 5px; border-radius: 3px;
  background: rgba(255,255,255,0.05);
  font-family: 'JetBrains Mono', monospace; font-weight: 500;
}

.ht-time {
  padding: 10px 12px; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 14px; color: var(--text-secondary);
}
.ht-time-h { white-space: nowrap; }

.ht-splits { padding: 10px 12px; width: 35%; }
.ht-splits-h { width: 35%; }

/* Inline split bar */
.split-bar-wrap {
  display: flex; height: 14px; border-radius: 3px;
  overflow: hidden; min-width: 40px;
}
.split-seg {
  height: 100%; transition: opacity 0.15s; cursor: pointer;
  position: relative;
}
.split-seg:hover { opacity: 0.7; }
.triathy-dashboard-scope .history-table tbody tr:hover .split-seg { opacity: 0.85; }
.split-seg:hover { opacity: 0.7 !important; }

/* Segment hover tooltip */
.seg-tooltip {
  position: fixed; z-index: 200; pointer-events: none;
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border-accent);
  border-radius: 6px; padding: 5px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  font-size: 11px; white-space: nowrap;
  transform: translateX(-50%);
  opacity: 0; transition: opacity 0.12s;
}
.seg-tooltip.visible { opacity: 1; }
.seg-tt-dot {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
}
.seg-tt-leg {
  font-family: 'DM Sans', sans-serif; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  font-size: 9px; letter-spacing: 0.5px;
}
.seg-tt-time {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 12px;
}

/* Results link */
.history-results-link {
  padding: 12px 18px; text-align: center;
  border-top: 1px solid var(--border-subtle);
}
.results-link-btn {
  display: inline-block; padding: 8px 20px;
  font-family: 'industry', sans-serif; font-weight: 700;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent-cyan); text-decoration: none;
  border: 1px solid rgba(0,229,255,0.3); border-radius: 6px;
  transition: all var(--transition);
}
.results-link-btn:hover {
  background: rgba(0,229,255,0.1);
  border-color: rgba(0,229,255,0.6);
}

/* ============================================================
   PRINT MODE
   ============================================================ */
.history-split-tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: var(--bg-card); border: 1px solid var(--border-accent);
  border-radius: 8px; padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  font-size: 12px; min-width: 200px;
  opacity: 0; transition: opacity 0.15s;
}
.history-split-tooltip.visible { opacity: 1; pointer-events: auto; }
.history-split-tooltip .tt-name {
  font-weight: 700; font-size: 13px; color: var(--text-primary);
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}
.history-split-tooltip .tt-row {
  display: flex; justify-content: space-between; padding: 2px 0;
}
.history-split-tooltip .tt-label { color: var(--text-muted); }
.history-split-tooltip .tt-val {
  font-family: 'JetBrains Mono', monospace; font-weight: 600;
}

/* ============================================================
   PRINT MODE
   ============================================================ */
@media print {
  .triathy-dashboard-scope { background: #fff !important; color: #000 !important; }
  .bg-mesh, .grain-overlay, .toolbar, .sticky-cta, .cta-section,
  .dashboard-footer, .table-controls, .table-page-controls, .ticker-wrap { display: none !important; }
  .chart-card, .kpi-card { break-inside: avoid; border: 1px solid #ddd; }
  .dashboard-wrapper { padding: 0; max-width: 100%; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .grid-2col { grid-template-columns: 1fr; }
  .grid-charts-main { grid-template-columns: 1fr; }
  .chart-container.gender-chart { max-width: 200px; }
  .history-panels { grid-template-columns: 1fr; }
  .cta-layout { flex-direction: column; text-align: center; gap: 20px; }
  .cta-content { text-align: center; }
  .cta-logo-wrap { width: 120px; height: 120px; }
  .cta-logo-wrap .cta-logo-img { width: 120px !important; height: 120px !important; }
  .cta-subtitle { font-size: 32px; }
}

/* Mobile */
@media (max-width: 640px) {
  .dashboard-wrapper { padding: 20px 14px 120px; }
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 13px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-card { padding: 16px; }
  .kpi-value { font-size: 32px; }
  .kpi-label { font-size: 9px; }

  .distance-strip { grid-template-columns: repeat(3, 1fr); }
  .distance-value { font-size: 22px; }
  .distance-block { padding: 14px 8px; }
  .distance-label { font-size: 9px; }

  .chart-card { padding: 18px 14px; }
  .chart-title { font-size: 18px; }
  .chart-container.entries-chart { height: 312px; }
  .chart-container.age-chart { height: 280px; }
  .chart-container.gender-chart { max-width: 180px; }

  .gender-stats { gap: 16px; margin-top: 14px; }
  .gender-stat-value { font-size: 20px; }
  .gender-stat-label { font-size: 9px; letter-spacing: 1px; }

  .chart-header { flex-direction: column; gap: 8px; }
  .chart-legend { gap: 8px; }

  .table-controls { flex-direction: column; align-items: stretch; }
  .table-page-controls { justify-content: center; }
  .search-input { min-width: 100%; }

  /* Mobile pricing: hide table, show cards */
  .pricing-table-wrapper { display: none; }
  .pricing-cards-mobile { display: flex; flex-direction: column; gap: 10px; }
  .pricing-card-m {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    font-family: "industry", sans-serif;
  }
  .pricing-card-m.m-sold-out { opacity: 0.35; }
  .pricing-card-m.m-current {
    border-color: var(--accent-gold);
    background: rgba(255,215,64,0.06);
    box-shadow: 0 0 12px rgba(255,215,64,0.08);
  }
  .pricing-card-m .m-name { font-weight: 700; font-size: 13px; color: var(--text-primary); text-transform: uppercase; }
  .pricing-card-m .m-range { font-size: 10px; color: var(--text-muted); }
  .pricing-card-m .m-price {
    font-family: "industry", sans-serif; font-weight: 700; font-size: 24px; color: var(--text-primary);
  }
  .pricing-card-m .m-status {
    font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  }

  /* Show sticky CTA on mobile */
  .sticky-cta { display: block; }
  .cta-section { display: none; }

  /* Tool buttons: icon-only on mobile */
  .tool-btn .label-text { display: none; }
  .tool-btn { padding: 8px; }
  .fullscreen-btn .fs-label { display: none; }

  /* Participant table: hide modified column on very small screens */
  .participant-table th:nth-child(4),
  .participant-table td:nth-child(4) { display: none; }

  /* History panels stack */
  .history-panels { grid-template-columns: 1fr; }
  .history-winner-time { font-size: 15px; }
  .history-winner-name { font-size: 20px; }
  .ht-splits { display: none; }
  .ht-splits-h { display: none; }
  .ht-name { font-size: 11px; }
}

@media (max-width: 380px) {
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-card { padding: 14px 12px; }
  .kpi-value { font-size: 28px; }
  .distance-strip { gap: 0; }
}
