/* Casual Surf Contest — Apple-design-analysis token system */

:root {
  --primary: #000000;
  --primary-focus: #000000;
  --primary-on-dark: #ffffff;
  --attention: #ff3b30;
  --ink: #000000;
  --body-on-dark: #ffffff;
  --body-muted: #ffffff;
  --ink-80: #000000;
  --ink-48: #000000;
  --divider-soft: rgba(0, 0, 0, 0.1);
  --hairline: rgba(0, 0, 0, 0.16);
  --canvas: #ffffff;
  --parchment: #ffffff;
  --pearl: #ffffff;
  --tile-1: #000000;
  --tile-2: #000000;
  --tile-3: #000000;
  --black: #000000;
  --chip-translucent: rgba(210, 210, 215, 0.64);

  --font-display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-text: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 18px;
  --r-pill: 9999px;

  --sp-xxs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 17px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;
  --sp-section: 80px;

  --product-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

.boot {
  padding: var(--sp-section) var(--sp-lg);
  text-align: center;
  color: var(--ink-48);
}

/* ------------------------------------------------ typography */

.hero-display {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
}

.display-lg {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
}

.lead {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0.196px;
}

.tagline {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
}

.body-strong { font-size: 17px; font-weight: 600; line-height: 1.24; }

.caption { font-size: 14px; font-weight: 400; line-height: 1.43; letter-spacing: -0.224px; }
.caption-strong { font-size: 14px; font-weight: 600; line-height: 1.29; letter-spacing: -0.224px; }
.fine-print { font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: -0.12px; }
.muted { color: var(--ink-48); }
.muted-on-dark { color: var(--body-muted); }

/* ------------------------------------------------ global nav */

.global-nav {
  background: var(--black);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 0 var(--sp-lg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.global-nav a {
  color: var(--body-on-dark);
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  opacity: 0.85;
}

.global-nav a:hover { opacity: 1; }
.global-nav a.active { opacity: 1; color: var(--attention); }
.global-nav .brand { font-weight: 600; opacity: 1; }

/* ------------------------------------------------ sub-nav (frosted) */

.sub-nav {
  position: sticky;
  top: 44px;
  z-index: 40;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-lg);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sub-nav .title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.231px;
}

.sub-nav .actions { display: flex; align-items: center; gap: var(--sp-sm); }

/* ------------------------------------------------ buttons */

button { font-family: var(--font-text); cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: var(--r-pill);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.374px;
  padding: 11px 22px;
  transition: transform 0.1s ease;
  text-decoration: none;
}

.btn:active { transform: scale(0.95); }
.btn:focus-visible { outline: 2px solid var(--primary-focus); outline-offset: 2px; }
.btn:disabled { opacity: 0.4; cursor: default; }

.btn-sm { font-size: 14px; padding: 7px 16px; letter-spacing: -0.224px; }

.btn-lg { font-size: 18px; font-weight: 300; letter-spacing: 0; padding: 14px 28px; }

.btn-ghost {
  background: transparent;
  color: var(--primary);
}

.btn-ghost-on-dark { color: var(--primary-on-dark); border-color: var(--primary-on-dark); background: transparent; }

.btn-dark {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-size: 14px;
  letter-spacing: -0.224px;
  padding: 8px 15px;
  transition: transform 0.1s ease;
}
.btn-dark:active { transform: scale(0.95); }

.btn-pearl {
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  font-size: 14px;
  letter-spacing: -0.224px;
  padding: 8px 14px;
  transition: transform 0.1s ease;
}
.btn-pearl:active { transform: scale(0.95); }

.text-link { background: none; border: none; color: var(--primary); font-size: 17px; letter-spacing: -0.374px; padding: 0; text-decoration: none; }
.text-link-on-dark { color: var(--primary-on-dark); }

/* ------------------------------------------------ tiles */

.tile { background: var(--canvas); padding: var(--sp-section) var(--sp-lg); }
.tile-parchment { background: var(--parchment); }
.tile-dark { background: var(--tile-1); color: var(--body-on-dark); }
.tile-dark-2 { background: var(--tile-2); color: var(--body-on-dark); }
.tile-dark-3 { background: var(--tile-3); color: var(--body-on-dark); }

.tile-inner { max-width: 980px; margin: 0 auto; }
.tile-inner-wide { max-width: 1200px; margin: 0 auto; }

.tile-head { text-align: center; margin-bottom: var(--sp-xl); }
.tile-head .eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.224px;
  color: var(--attention);
  text-transform: uppercase;
  margin-bottom: var(--sp-xs);
}
.tile-dark .tile-head .eyebrow, .tile-dark-2 .tile-head .eyebrow { color: var(--attention); }

/* ------------------------------------------------ cards */

.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ------------------------------------------------ jerseys */

.jersey {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.jersey-white { box-shadow: inset 0 0 0 1px var(--hairline); }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 17px;
  flex-shrink: 0;
}

/* ------------------------------------------------ live clock */

.heat-clock {
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.28px;
  font-size: 72px;
  line-height: 1.07;
}
.heat-clock.warning { color: var(--attention); }
.heat-clock.over { color: var(--attention); }

/* ------------------------------------------------ viewer live board */

.live-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.live-row:last-child { border-bottom: none; }
.live-row .place {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  width: 28px;
  color: var(--body-muted);
}
.live-row .name { flex: 1; font-size: 21px; font-weight: 600; font-family: var(--font-display); letter-spacing: 0.231px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.live-row .total {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.live-row .waves-mini { color: var(--body-muted); font-size: 14px; letter-spacing: -0.224px; }

/* ------------------------------------------------ wave chips */

.wave-chips { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }

.wave-chip {
  border: 1px solid var(--hairline);
  background: var(--canvas);
  color: var(--ink);
  border-radius: var(--r-pill);
  font-size: 14px;
  letter-spacing: -0.224px;
  padding: 8px 14px;
  font-variant-numeric: tabular-nums;
  transition: transform 0.1s ease;
}
.wave-chip:active { transform: scale(0.95); }
.wave-chip.counting {
  border: 2px solid var(--primary-focus);
  font-weight: 600;
  padding: 7px 13px;
}
.wave-chip.halved { text-decoration: none; opacity: 0.85; }
.wave-chips.on-dark .wave-chip { background: transparent; color: var(--body-on-dark); border-color: rgba(255,255,255,0.25); }
.wave-chips.on-dark .wave-chip.counting { border-color: var(--primary-on-dark); }

/* ------------------------------------------------ judge page */

.judge-card { margin-bottom: 20px; }

.judge-card .head {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}
.judge-card .head .name { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: 0.231px; flex: 1; min-width: 0; }
.judge-card .head .total { font-family: var(--font-display); font-size: 40px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.judge-card .head .total small { font-size: 14px; font-weight: 400; color: var(--ink-48); display: block; text-align: right; letter-spacing: -0.224px; }

.judge-card .controls { display: flex; align-items: center; gap: var(--sp-sm); margin-top: var(--sp-md); flex-wrap: wrap; }

.btn-wave {
  flex: 1;
  min-width: 140px;
  font-size: 18px;
  font-weight: 300;
  padding: 14px 28px;
}

.btn-int {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--ink-48);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.224px;
  padding: 10px 16px;
  min-height: 44px;
  transition: transform 0.1s ease;
  flex-shrink: 0;
}
.btn-int:active { transform: scale(0.95); }
.btn-int.active { background: var(--attention); border-color: var(--attention); color: #fff; }

.collapse-head { cursor: pointer; -webkit-user-select: none; user-select: none; }
.collapse-head .chev { font-size: 0.6em; vertical-align: middle; opacity: 0.6; }
.collapse-head:active .display-lg { opacity: 0.7; }

.segment {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--canvas);
}
.segment button {
  border: none;
  background: transparent;
  font-size: 14px;
  letter-spacing: -0.224px;
  padding: 10px 16px;
  color: var(--ink);
  min-height: 44px;
}
.segment button.active { background: var(--ink); color: #fff; }
.segment button.active.penalty { background: var(--attention); }

/* ------------------------------------------------ score pad */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: var(--canvas);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--sp-lg);
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .modal-backdrop { align-items: center; }
  .modal { border-radius: var(--r-lg); }
}

.modal .modal-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.231px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-md);
}

.pad-display {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
  text-align: center;
  padding: var(--sp-md) 0 var(--sp-lg);
  font-variant-numeric: tabular-nums;
  min-height: 92px;
}
.pad-display .placeholder { color: var(--hairline); }

.pad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.pad-grid button {
  height: 64px;
  font-size: 24px;
  font-weight: 400;
  font-family: var(--font-display);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  transition: transform 0.1s ease;
}
.pad-grid button:active { transform: scale(0.95); }
.pad-grid button.util { font-size: 17px; color: var(--ink-80); }

.modal .modal-actions { display: flex; gap: var(--sp-sm); }
.modal .modal-actions .btn { flex: 1; }

.btn-danger { background: var(--attention); }

/* ------------------------------------------------ forms */

.field { margin-bottom: var(--sp-md); }
.field label { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.224px; margin-bottom: 6px; color: var(--ink-80); }

.input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--canvas);
  border-radius: var(--r-pill);
  padding: 12px 20px;
  font-size: 17px;
  font-family: var(--font-text);
  letter-spacing: -0.374px;
  color: var(--ink);
}
.input:focus { outline: 2px solid var(--primary-focus); outline-offset: 1px; }

.chip-select { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.chip-option {
  border: 1px solid var(--hairline);
  background: var(--canvas);
  border-radius: var(--r-pill);
  padding: 12px 16px;
  font-size: 14px;
  letter-spacing: -0.224px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.1s ease;
}
.chip-option:active { transform: scale(0.95); }
.chip-option.selected { border: 2px solid var(--primary-focus); padding: 11px 15px; font-weight: 600; }

/* ------------------------------------------------ bracket draw */

.bracket {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: var(--sp-xs);
  -webkit-overflow-scrolling: touch;
}

.bracket-col { flex: 0 0 300px; min-width: 300px; }

.bracket-col .round-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.231px;
  margin-bottom: var(--sp-sm);
}

.bracket-card { padding: var(--sp-md); margin-bottom: var(--sp-md); }
.bracket-card.ghost { border-style: dashed; background: transparent; }

.bc-head { display: flex; justify-content: space-between; align-items: center; }

.bc-time {
  font-size: 12px;
  letter-spacing: -0.12px;
  color: var(--ink-48);
  margin: 2px 0 var(--sp-xs);
}

.bc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider-soft);
}
.bc-row:last-of-type { border-bottom: none; }

.bc-rank {
  width: 16px;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  flex-shrink: 0;
}
.bc-rank.adv { font-weight: 700; }

.bc-name { flex: 1; min-width: 0; font-size: 15px; letter-spacing: -0.2px; }

.bc-total {
  text-align: right;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.bc-note {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: -0.1px;
  color: var(--ink-48);
}

.bc-actions { display: flex; gap: var(--sp-xs); margin-top: var(--sp-sm); flex-wrap: wrap; }

.iavatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--hairline);
  background: var(--canvas);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.iavatar.ghost-slot { color: var(--ink-48); border-style: dashed; background: transparent; }

@media (max-width: 735px) {
  .bracket-col { flex: 0 0 260px; min-width: 260px; }
}

/* ------------------------------------------------ schedule */

.sched-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--divider-soft);
  flex-wrap: wrap;
}
.sched-row:last-child { border-bottom: none; }
.sched-row .time { font-family: var(--font-display); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 72px; }
.sched-row .heat-label { flex: 1; min-width: 180px; }
.sched-row .heat-label .who { color: var(--ink-48); font-size: 14px; letter-spacing: -0.224px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sched-row .badges { display: flex; align-items: center; gap: var(--sp-xs); flex-wrap: wrap; }

.tile-dark .sched-row, .tile-dark-2 .sched-row { border-bottom-color: rgba(255,255,255,0.12); }
.tile-dark .sched-row .heat-label .who { color: var(--body-muted); }

.badge {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
  border-radius: var(--r-pill);
  padding: 4px 10px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  color: var(--ink);
}
.badge-live { background: var(--attention); color: #fff; }
.badge-done { background: var(--ink); color: #fff; }
.badge-advance { background: var(--ink); color: #fff; }

/* ------------------------------------------------ tables */

.stat-table { width: 100%; border-collapse: collapse; }
.stat-table th {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.224px;
  text-align: right;
  color: var(--body-muted);
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.stat-table th:first-child { text-align: left; }
.stat-table td {
  padding: 12px 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-size: 17px;
}
.stat-table td:first-child { text-align: left; font-weight: 600; }
.stat-table tr:last-child td { border-bottom: none; }

/* ------------------------------------------------ results */

.result-card { margin-bottom: 20px; }
.result-card .rows { margin-top: var(--sp-sm); }
.result-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px 0;
  border-bottom: 1px solid var(--divider-soft);
}
.result-row:last-child { border-bottom: none; }
.result-row .place { font-family: var(--font-display); font-weight: 600; width: 24px; color: var(--ink-48); }
.result-row .name { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.result-row .total { font-family: var(--font-display); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ events dashboard */

.event-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--divider-soft);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.event-row:last-child { border-bottom: none; }
.event-row:active { opacity: 0.7; }
.event-row .event-chev {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--ink-48);
  line-height: 1;
}

.tab-row {
  display: flex;
  gap: var(--sp-lg);
  border-bottom: 1px solid var(--hairline);
}
.tab {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.374px;
  padding: 10px 2px;
  color: var(--ink-48);
}
.tab.active {
  color: var(--ink);
  border-bottom: 2px solid var(--attention);
  margin-bottom: -1px;
}

/* ------------------------------------------------ footer */

.footer {
  background: var(--parchment);
  color: var(--ink-80);
  padding: 40px var(--sp-lg);
  text-align: center;
}
.footer .fine-print { color: var(--ink-48); }

/* ------------------------------------------------ auth gate */

.gate {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg);
}
.gate .card { width: 100%; max-width: 380px; text-align: center; }
.gate .display-lg { margin-bottom: var(--sp-xs); }
.gate p { color: var(--ink-48); margin-bottom: var(--sp-lg); }
.gate .error { color: var(--attention); font-size: 14px; margin-top: var(--sp-sm); }

/* ------------------------------------------------ misc */

.empty {
  text-align: center;
  color: var(--ink-48);
  padding: var(--sp-xl) 0;
}
.tile-dark .empty, .tile-dark-2 .empty { color: var(--body-muted); }

.row { display: flex; align-items: center; gap: var(--sp-sm); }
.spread { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack-sm > * + * { margin-top: var(--sp-sm); }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }
.center { text-align: center; }

/* ------------------------------------------------ responsive */

@media (max-width: 735px) {
  .tile { padding: var(--sp-xxl) var(--sp-md); }
  .hero-display { font-size: 34px; }
  .display-lg { font-size: 28px; }
  .lead { font-size: 21px; }
  .heat-clock { font-size: 56px; }
  .live-row .total { font-size: 28px; }
  .global-nav { gap: 20px; }
  .sub-nav { padding: 0 var(--sp-md); }
  .stat-table { font-size: 14px; }
  .stat-table td { font-size: 14px; padding: 10px 6px; }
  .stat-table th { padding: 8px 6px; font-size: 12px; }
}

/* ------------------------------------------------ page tabs (Live / Judge) */

.page-tabs {
  position: sticky;
  top: 96px;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--divider-soft);
  flex-wrap: wrap;
}

.page-tab {
  border: 1px solid var(--hairline);
  background: var(--canvas);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 8px 18px;
  font-size: 14px;
  letter-spacing: -0.224px;
  transition: transform 0.1s ease;
}
.page-tab:active { transform: scale(0.95); }
.page-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* clickable schedule rows + surfer links (Live page) */
.sched-row.clickable { cursor: pointer; }
.sched-row.clickable:active { opacity: 0.6; }
.who-link {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  letter-spacing: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* red = attention only */
.btn-live { background: var(--attention); border-color: var(--attention); }
.stat-table tr.focus td { font-weight: 700; }

/* sub-nav action buttons share one size */
.sub-nav .actions .btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 15px;
  font-size: 14px;
}

/* ------------------------------------------------ athlete stats */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat-card {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--r-lg);
  padding: 24px 12px;
  text-align: center;
}
.stat-card .v {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-card .l {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
  text-transform: uppercase;
  margin-top: 6px;
  color: var(--attention);
}

/* Contest / Overall stats scope toggle (lives on the dark stats tile) */
.scope-toggle { background: var(--canvas); }
.scope-toggle button.active { background: var(--attention); color: #fff; }

.stats-hit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--r-lg);
  margin-bottom: 10px;
  cursor: pointer;
  background: transparent;
  color: var(--body-on-dark);
}
.stats-hit:active { opacity: 0.7; }
.stats-hit .iavatar { background: #fff; }

.stat-table tr.pickable { cursor: pointer; }
.stat-table tr.pickable:active td { opacity: 0.7; }
