:root {
  color-scheme: dark;
  --bg: #0b0c0b;
  --bg-raised: #111210;
  --panel: rgba(20, 20, 18, 0.92);
  --panel-solid: #151513;
  --panel-soft: #1d1b18;
  --ink: #f6f1ea;
  --muted: #a7a097;
  --subtle: #766f66;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --orange: #f97316;
  --orange-strong: #ff7a18;
  --orange-soft: rgba(249, 115, 22, 0.16);
  --gold: #f2b35e;
  --sky: #38bdf8;
  --violet: #a855f7;
  --teal: #2dd4bf;
  --danger: #ff684f;
  --green: #83c47b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
}

@media (max-width: 560px) {
  .static-stat-grid {
    grid-template-columns: 1fr;
  }

  .static-table-wrap {
    margin-inline: 10px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% 10%, rgba(56, 189, 248, 0.08), transparent 24rem),
    radial-gradient(circle at 94% 18%, rgba(168, 85, 247, 0.08), transparent 18rem),
    radial-gradient(circle at 78% 0%, rgba(249, 115, 22, 0.12), transparent 30rem),
    linear-gradient(180deg, #11110f, #090a09 34rem),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

.app-loading {
  overflow: hidden;
}

.app-loading .app-frame {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.app-frame {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 9, 8, 0.96);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 240ms ease,
    visibility 240ms ease;
}

.app-loading .app-loader {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.app-loader-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.loader-spinner {
  width: 26px;
  height: 26px;
  border: 4px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--orange);
  border-radius: 50%;
}

.app-loader p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
}

button,
input,
select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

button,
input,
select,
.custom-select-button,
.custom-select-option {
  font-size: 1rem;
}

button,
select {
  cursor: pointer;
  touch-action: manipulation;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
}

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f0f0d;
  color: var(--gold);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.app-frame {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.nav-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 18, 16, 0.96), rgba(8, 9, 8, 0.98));
}

.brand {
  display: flex;
  align-items: center;
  min-height: 56px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: min(100%, 188px);
  height: auto;
}

.brand:focus-visible {
  border-radius: var(--radius);
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

.mobile-menu-button {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.rail-nav {
  display: grid;
  gap: 6px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 720;
  white-space: nowrap;
  text-decoration: none;
}

.rail-nav a span {
  flex: 0 0 auto;
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 900;
}

.nav-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-nav a:hover,
.rail-nav a:focus-visible,
.rail-nav a.active {
  border-color: rgba(249, 115, 22, 0.42);
  outline: 0;
  background: linear-gradient(135deg, var(--orange), #ff9f1c);
  color: #120b06;
}

.rail-nav a:hover span,
.rail-nav a:focus-visible span,
.rail-nav a.active span {
  color: #120b06;
}

.rail-nav a:hover .nav-icon,
.rail-nav a:focus-visible .nav-icon,
.rail-nav a.active .nav-icon {
  color: #120b06;
}

.app-shell {
  width: min(100%, calc(100vw - 232px));
  max-width: 1500px;
  min-width: 0;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.season-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.season-tabs {
  display: inline-grid;
  grid-auto-flow: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.season-tabs button {
  min-width: 78px;
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 950;
}

.season-tabs button:last-child {
  border-right: 0;
}

.season-tabs button.active,
.season-tabs button:hover,
.season-tabs button:focus-visible {
  outline: 0;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #140c05;
}

.season-panel .season-switcher {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.season-dropdown {
  display: grid;
  gap: 6px;
}

.season-dropdown > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.season-dropdown .custom-select,
.season-dropdown .custom-select-button {
  width: 100%;
}

.season-panel .season-tabs {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

.season-panel .season-tabs button {
  min-width: 0;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(280px, 520px);
  align-items: center;
  gap: 18px;
  min-height: 56px;
  padding-bottom: 18px;
}

.global-search,
.search-box {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.07), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(12, 13, 12, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.48);
}

.global-search {
  grid-template-columns: 18px minmax(0, 1fr);
  height: 42px;
  padding: 0 13px;
}

.global-search span,
.search-box span {
  position: relative;
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 999px;
}

.global-search span::after,
.search-box span::after {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  background: var(--muted);
  content: "";
  transform: rotate(45deg);
}

.global-search input,
.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  caret-color: var(--sky);
}

.search-clear {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
}

.search-clear[hidden] {
  display: none;
}

.search-clear svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-clear:hover,
.search-clear:focus-visible {
  border-color: var(--line);
  outline: 0;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.global-search:focus-within,
.search-box:focus-within {
  border-color: rgba(56, 189, 248, 0.68);
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.event-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 182px;
  overflow: hidden;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(10, 10, 8, 0.94), rgba(10, 10, 8, 0.68) 50%, rgba(10, 10, 8, 0.28)),
    linear-gradient(140deg, transparent 0 54%, rgba(249, 115, 22, 0.22) 54% 56%, transparent 56%),
    radial-gradient(circle at 84% 36%, rgba(249, 115, 22, 0.24), transparent 14rem),
    linear-gradient(160deg, #37312b 0 16%, #151614 16% 44%, #242019 44% 58%, #0d0f0d 58%);
  box-shadow: var(--shadow);
}

.event-hero::before {
  position: absolute;
  right: 13%;
  bottom: -8px;
  width: 210px;
  height: 124px;
  border: 5px solid rgba(249, 115, 22, 0.92);
  border-top: 0;
  border-radius: 0 0 110px 110px;
  content: "";
  opacity: 0.45;
  transform: rotate(-16deg);
}

.event-hero::after {
  position: absolute;
  right: 20%;
  bottom: 68px;
  width: 170px;
  height: 6px;
  background: rgba(249, 115, 22, 0.92);
  box-shadow:
    38px 44px 0 rgba(249, 115, 22, 0.48),
    -42px 36px 0 rgba(255, 255, 255, 0.14);
  content: "";
  opacity: 0.62;
  transform: rotate(-24deg);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  max-width: 760px;
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  line-height: 0.94;
  text-transform: uppercase;
}

.event-meta {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.event-meta strong {
  color: var(--ink);
}

.profile-subheading {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.2;
}

.event-note {
  display: block;
  color: var(--gold);
}

.event-note {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.race-countdown {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 152px;
  min-height: 152px;
  padding: 18px 20px;
  border: 2px solid rgba(249, 115, 22, 0.72);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(249, 115, 22, 0.18), rgba(249, 115, 22, 0.04)),
    rgba(12, 12, 10, 0.9);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.race-countdown span,
.race-countdown small {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.race-countdown strong {
  color: var(--orange);
  font-size: 3.15rem;
  line-height: 1;
  text-shadow: 0 0 18px rgba(249, 115, 22, 0.36);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 294px);
  margin-top: 14px;
}

.site-disclaimer {
  margin-top: 18px;
  padding: 0 2px 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.site-disclaimer p {
  max-width: 960px;
  margin: 0;
}

.site-disclaimer .footer-source {
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.data-source-link {
  color: var(--muted);
  text-decoration: none;
}

.data-source-link:hover,
.data-source-link:focus-visible {
  outline: 0;
  color: var(--orange);
  text-decoration: underline;
}

.dashboard-grid > *,
.content-grid > *,
.profile-panel,
.panel-section {
  min-width: 0;
}

.search-panel,
.season-panel,
.profile-panel,
.panel-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 26, 23, 0.96), rgba(17, 17, 15, 0.96));
  box-shadow: var(--shadow);
}

.search-panel {
  display: flex;
  flex-direction: column;
  min-height: 620px;
  padding: 18px;
}

.season-panel {
  padding: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
  text-transform: uppercase;
}

.panel-kicker {
  padding: 6px 8px;
  border: 1px solid rgba(249, 115, 22, 0.32);
  border-radius: 999px;
  color: var(--gold);
  background: var(--orange-soft);
  font-size: 0.7rem;
  font-weight: 900;
}

.search-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.search-box {
  height: 44px;
  padding: 0 12px;
}

.quick-stats {
  display: contents;
}

.rider-count-pill {
  padding: 6px 10px;
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 999px;
  color: #dff7ff;
  background: rgba(56, 189, 248, 0.1);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1;
}

.filters {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.filter-control {
  display: grid;
  gap: 6px;
}

.filter-control label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-control select {
  width: 100%;
  min-height: 38px;
  padding: 0 38px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(56, 189, 248, 0.055) 42%, transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014)),
    #0d0e0c;
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.filter-control select:hover {
  border-color: rgba(56, 189, 248, 0.38);
}

.filter-control select:focus-visible {
  border-color: rgba(56, 189, 248, 0.68);
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  padding: 0 38px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(56, 189, 248, 0.055) 42%, transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014)),
    #0d0e0c;
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  text-align: left;
}

.custom-select-button span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-button::after {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  content: "";
  transform: translateY(-62%) rotate(45deg);
  transition:
    border-color 140ms ease,
    transform 140ms ease;
}

.custom-select-button:hover {
  border-color: rgba(56, 189, 248, 0.38);
}

.custom-select-button:focus-visible {
  border-color: rgba(56, 189, 248, 0.68);
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.custom-select.open .custom-select-button {
  border-color: rgba(56, 189, 248, 0.68);
}

.custom-select.open .custom-select-button::after {
  border-color: var(--sky);
  transform: translateY(-36%) rotate(225deg);
}

.custom-select-menu {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 40;
  top: calc(100% + 6px);
  display: grid;
  max-height: min(300px, 54vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(168, 85, 247, 0.05) 55%, transparent),
    #0c0d0c;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.custom-select.open .custom-select-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-select-option {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  text-align: left;
}

.custom-select-option:hover,
.custom-select-option:focus-visible,
.custom-select-option.active {
  border-color: rgba(56, 189, 248, 0.24);
  outline: 0;
  background: rgba(56, 189, 248, 0.1);
}

.custom-select-option.active {
  color: #dff7ff;
  box-shadow: inset 3px 0 0 var(--sky);
}

.empty-list,
.chart-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.empty-list {
  padding: 14px;
}

.compact-list {
  margin: 0;
  padding-left: 18px;
}

.compact-list li + li {
  margin-top: 4px;
}

.mini-stat {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.mini-stat strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
}

.mini-stat span {
  color: var(--muted);
  font-size: 0.72rem;
}

.mini-stat .metric-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 17px;
  height: 17px;
  color: var(--sky);
}

.racer-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: visible;
  padding-right: 2px;
}

.racer-button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.racer-button:hover,
.racer-button:focus-visible {
  border-color: var(--line-strong);
  outline: 0;
  background: rgba(255, 255, 255, 0.05);
}

.racer-button.active {
  border-color: rgba(249, 115, 22, 0.58);
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.32), rgba(249, 115, 22, 0.08));
}

.racer-button strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.98rem;
  line-height: 1.2;
}

.racer-button strong span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.racer-button strong span:last-child {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.9rem;
}

.racer-button > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.racer-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding-top: 8px;
}

.racer-pagination:empty {
  display: none;
}

.racer-pagination button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.racer-pagination button:hover,
.racer-pagination button:focus-visible {
  border-color: rgba(85, 199, 165, 0.55);
  outline: 0;
}

.racer-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.racer-pagination span {
  min-width: 74px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.profile-panel {
  overflow: hidden;
}

.empty-state {
  display: grid;
  align-content: center;
  min-height: 620px;
  max-width: 680px;
  padding: 56px;
}

.empty-state h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3.5vw, 3rem);
  line-height: 1;
  text-transform: uppercase;
}

.empty-state p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.6;
}

.profile-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(249, 115, 22, 0.14), transparent 55%),
    linear-gradient(135deg, #1b1a16, #10110f);
}

.profile-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bib-badge {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(249, 115, 22, 0.5);
  border-radius: var(--radius);
  background: var(--orange);
  color: #150c05;
  font-size: 1.45rem;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.18);
}

.profile-title h2 {
  margin-bottom: 7px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.profile-title p,
.profile-note {
  margin-bottom: 0;
  color: var(--muted);
}

.scope-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.scope-note strong,
.scope-note span {
  min-width: 0;
}

.scope-note strong {
  color: var(--ink);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.scope-note span {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.scope-note.warn {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.08);
}

.page-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(249, 115, 22, 0.1), transparent 48%),
    rgba(255, 255, 255, 0.035);
}

.page-context-bar strong,
.page-context-bar span {
  min-width: 0;
}

.page-context-bar strong {
  color: var(--ink);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.page-context-bar span {
  color: var(--muted);
  font-size: 0.84rem;
}

.page-context-bar.warn {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.08);
}

.profile-note {
  max-width: 360px;
  padding-top: 6px;
  text-align: right;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 0;
}

.stat-row + .stat-row {
  padding-top: 10px;
}

.stat-row-primary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-row-secondary {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding-bottom: 2px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(249, 115, 22, 0.12), transparent 40%),
    rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-align: left;
}

.stat-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--orange);
  content: "";
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--orange);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-card strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 1.45rem;
}

.stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--subtle);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card-button {
  width: 100%;
  cursor: pointer;
}

.stat-card-button:hover,
.stat-card-button:focus-visible {
  outline: 0;
  border-color: rgba(45, 212, 191, 0.45);
  background:
    linear-gradient(145deg, rgba(45, 212, 191, 0.12), transparent 44%),
    rgba(255, 255, 255, 0.055);
}

.stat-card[data-tone="gold"] {
  background:
    linear-gradient(145deg, rgba(242, 179, 94, 0.13), transparent 40%),
    rgba(255, 255, 255, 0.04);
}

.stat-card[data-tone="gold"]::after {
  background: var(--gold);
}

.stat-card[data-tone="gold"] .metric-icon {
  color: var(--gold);
}

.stat-card[data-tone="sky"] {
  background:
    linear-gradient(145deg, rgba(56, 189, 248, 0.13), transparent 40%),
    rgba(255, 255, 255, 0.04);
}

.stat-card[data-tone="sky"]::after {
  background: var(--sky);
}

.stat-card[data-tone="sky"] .metric-icon {
  color: var(--sky);
}

.stat-card[data-tone="violet"] {
  background:
    linear-gradient(145deg, rgba(168, 85, 247, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.04);
}

.stat-card[data-tone="violet"]::after {
  background: var(--violet);
}

.stat-card[data-tone="violet"] .metric-icon {
  color: var(--violet);
}

.stat-card[data-tone="teal"] {
  background:
    linear-gradient(145deg, rgba(45, 212, 191, 0.12), transparent 40%),
    rgba(255, 255, 255, 0.04);
}

.stat-card[data-tone="teal"]::after {
  background: var(--teal);
}

.stat-card[data-tone="teal"] .metric-icon {
  color: var(--teal);
}

.stat-card.good strong {
  color: var(--green);
}

.stat-card.warn strong {
  color: var(--gold);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px 18px 18px;
}

.panel-section {
  position: relative;
  overflow: hidden;
  background: rgba(18, 18, 16, 0.92);
  box-shadow: none;
}

.panel-section::before {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.74), rgba(56, 189, 248, 0.5), rgba(168, 85, 247, 0.4), transparent);
  content: "";
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.section-head h3 {
  margin-bottom: 0;
  font-size: 1.08rem;
  text-transform: uppercase;
}

.section-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.chart {
  width: 100%;
  height: 290px;
  padding: 8px 14px 14px;
}

.cumulative-points-chart {
  height: 340px;
  padding: 4px 4px 12px;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.075);
  stroke-dasharray: 7 10;
}

.chart-axis-title {
  fill: #a7a097;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chart-area {
  opacity: 0.92;
}

.chart-line-glow {
  paint-order: stroke;
}

.chart-point-halo {
  opacity: 0.18;
}

.cumulative-point {
  cursor: pointer;
  outline: 0;
}

.cumulative-point circle {
  transition:
    r 150ms ease,
    stroke-width 150ms ease,
    filter 150ms ease;
}

.cumulative-point.dropped {
  --point-glow: #8d8275;
  color: #8d8275;
}

.cumulative-point.dropped circle {
  opacity: 0.86;
}

.cumulative-point.dropped text {
  fill: #8d8275;
}

.cumulative-point:hover circle,
.cumulative-point:focus-visible circle {
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--point-glow, #f97316) 72%, transparent));
  stroke-width: 5;
}

.chart-point-tooltip {
  opacity: 0;
  animation: none;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.cumulative-point:hover .chart-point-tooltip,
.cumulative-point:focus-visible .chart-point-tooltip {
  opacity: 1;
}

.chart-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.stats-page {
  align-content: start;
}

.stats-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.stats-trend-section .stats-card-row,
.stats-weather-section .stats-card-row {
  padding-top: 4px;
}

.stats-line-chart {
  height: 330px;
}

.stats-line-point {
  outline: 0;
}

.stats-line-point circle {
  transition:
    r 150ms ease,
    stroke-width 150ms ease,
    filter 150ms ease;
}

.stats-line-point:hover circle,
.stats-line-point:focus-visible circle {
  r: 8px;
  stroke-width: 5;
  filter: drop-shadow(0 0 7px rgba(249, 115, 22, 0.45));
}

.stats-line-point .chart-point-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.stats-line-point:hover .chart-point-tooltip,
.stats-line-point:focus-visible .chart-point-tooltip,
.stats-line-point .chart-point-tooltip-pinned {
  opacity: 1;
}

.stats-weather-grid {
  display: grid;
  gap: 14px;
}

.stats-weather-table {
  margin: 0 16px 16px;
  overflow: auto;
}

.weather-combo-wrap {
  display: grid;
  gap: 12px;
}

.weather-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 0 18px 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.weather-summary-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.weather-summary-strip strong {
  color: var(--ink);
}

.weather-combo-legend {
  margin-left: auto;
  color: var(--muted);
}

.weather-combo-legend i {
  width: 18px;
  height: 10px;
  border-radius: 999px;
}

.weather-temp-key {
  background: linear-gradient(90deg, #f97316, #f2b35e);
}

.weather-rain-key {
  background: #38bdf8;
}

.stats-weather-combo-chart {
  height: 350px;
}

.weather-temp-bar rect {
  fill: url(#weather-temp-gradient);
  opacity: 0.74;
  transition:
    opacity 140ms ease,
    filter 140ms ease;
}

.weather-temp-bar text {
  fill: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.weather-temp-bar:hover rect,
.weather-temp-bar:focus-visible rect {
  opacity: 0.96;
  filter: drop-shadow(0 0 10px rgba(242, 179, 94, 0.22));
}

.weather-rain-line {
  filter: drop-shadow(0 0 7px rgba(56, 189, 248, 0.28));
}

.weather-hover-column {
  outline: 0;
}

.weather-hover-column rect {
  fill: transparent;
}

.weather-hover-column .chart-point-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.weather-hover-column:hover .chart-point-tooltip,
.weather-hover-column:focus-visible .chart-point-tooltip {
  opacity: 1;
}

.stats-course-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  padding: 0 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-course-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stats-course-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--course-color);
}

.stats-stacked-chart,
.stats-scatter-chart {
  height: 350px;
}

.stats-stacked-week rect {
  transition:
    opacity 140ms ease,
    filter 140ms ease;
}

.stats-stacked-week:hover rect,
.stats-stacked-week:focus-visible rect {
  opacity: 1;
  filter: saturate(1.2);
}

.stats-heatmap {
  display: grid;
  grid-template-columns: minmax(120px, 170px) repeat(var(--week-count), minmax(34px, 1fr));
  gap: 5px;
  padding: 16px;
  overflow-x: auto;
}

.stats-heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.stats-heatmap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stats-heatmap-legend i {
  width: 13px;
  height: 13px;
  border-radius: 4px;
}

.stats-heatmap-corner,
.stats-heatmap-week,
.stats-heatmap-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.stats-heatmap-week {
  text-align: center;
}

.stats-heatmap-label {
  display: flex;
  align-items: center;
  min-height: 30px;
  color: var(--ink);
  text-transform: none;
}

.stats-heatmap-cell {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 950;
  background: #242426;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.18);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.stats-heatmap-cell.heat-0 {
  border-color: rgba(255, 255, 255, 0.1);
  background: #242426;
  color: var(--muted);
  text-shadow: none;
}

.stats-heatmap-legend .heat-1,
.stats-heatmap-cell.heat-1 {
  border-color: rgba(248, 113, 113, 0.7);
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
}

.stats-heatmap-legend .heat-2,
.stats-heatmap-cell.heat-2 {
  border-color: rgba(251, 146, 60, 0.74);
  background: linear-gradient(135deg, #9a3412, #f97316);
}

.stats-heatmap-legend .heat-3,
.stats-heatmap-cell.heat-3 {
  border-color: rgba(250, 204, 21, 0.8);
  background: linear-gradient(135deg, #a16207, #facc15);
  color: #141107;
  text-shadow: none;
}

.stats-heatmap-legend .heat-4,
.stats-heatmap-cell.heat-4 {
  border-color: rgba(74, 222, 128, 0.78);
  background: linear-gradient(135deg, #166534, #22c55e);
  color: #06140d;
  text-shadow: none;
}

.stats-heatmap-legend .heat-5,
.stats-heatmap-cell.heat-5 {
  border-color: rgba(52, 211, 153, 0.85);
  background: linear-gradient(135deg, #047857, #34d399);
  color: #03130d;
  text-shadow: none;
}

.difficulty-read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
}

.difficulty-read-low {
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(52, 211, 153, 0.14);
  color: #b8f7dc;
}

.difficulty-read-medium {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
}

.difficulty-read-high {
  border-color: rgba(248, 113, 113, 0.46);
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

.difficulty-read-no-read {
  color: var(--muted);
}

.bar-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.bar-axis-title {
  color: #a7a097;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bar-axis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bar-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.bar-legend-male {
  background: var(--orange);
}

.bar-legend-female {
  background: #55c7a5;
}

.course-time-layout {
  align-items: start;
  padding: 16px;
}

.course-time-list {
  display: grid;
  gap: 14px;
}

.course-time-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.course-time-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 0;
}

.course-time-head strong {
  color: var(--ink);
  font-size: 0.95rem;
  text-transform: uppercase;
}

.course-time-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.course-time-body {
  display: grid;
  gap: 8px;
  align-items: start;
}

.course-time-chart {
  height: clamp(330px, 24vw, 430px);
}

.course-time-guide {
  opacity: 0;
  transition: opacity 160ms ease;
}

.course-time-body.show-best-guide .course-time-guide-best,
.course-time-body.show-average-guide .course-time-guide-average,
.course-time-body:has(.course-time-pill.best:hover) .course-time-guide-best,
.course-time-body:has(.course-time-pill.best:focus-visible) .course-time-guide-best,
.course-time-body:has(.course-time-pill.average:hover) .course-time-guide-average,
.course-time-body:has(.course-time-pill.average:focus-visible) .course-time-guide-average {
  opacity: 1;
  filter: drop-shadow(0 0 6px currentColor);
}

.course-time-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.course-time-pill {
  display: grid;
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: default;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.course-time-pill:hover,
.course-time-pill:focus-visible,
.course-time-pill.active {
  outline: 0;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.course-time-pill.best:hover,
.course-time-pill.best:focus-visible,
.course-time-pill.best.active {
  border-color: rgba(110, 231, 183, 0.9);
}

.course-time-pill.average:hover,
.course-time-pill.average:focus-visible,
.course-time-pill.average.active {
  border-color: rgba(242, 179, 94, 0.9);
}

.course-time-pill span,
.course-time-pill small {
  color: var(--muted);
}

.course-time-pill span {
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.course-time-pill strong {
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1;
}

.course-time-pill small {
  font-size: 0.86rem;
  font-weight: 800;
}

.course-time-pill.best {
  border-color: rgba(110, 231, 183, 0.4);
  background: rgba(16, 32, 26, 0.72);
}

.course-time-pill.best strong {
  color: #6ee7b7;
}

.course-time-pill.average {
  border-color: rgba(242, 179, 94, 0.42);
  background: rgba(34, 25, 13, 0.72);
}

.course-time-pill.average strong {
  color: #f2b35e;
}

.rules-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.rule-row {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) 78px 78px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.rule-row:last-child {
  border-bottom: 0;
}

.rule-row strong {
  color: var(--ink);
}

.rules-info {
  display: grid;
  gap: 10px;
  margin: 0 16px 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.rules-info p {
  max-width: 920px;
  margin: 0;
}

.standings-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.standing-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.84rem;
}

.clickable-rider-row {
  cursor: pointer;
}

.standing-row.clickable-rider-row,
.compact-row.clickable-rider-row,
tr.clickable-rider-row {
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.standing-row.clickable-rider-row:hover,
.standing-row.clickable-rider-row:focus-visible,
.compact-row.clickable-rider-row:hover,
.compact-row.clickable-rider-row:focus-visible {
  border-color: rgba(85, 199, 165, 0.55);
  outline: 0;
  background: rgba(85, 199, 165, 0.1);
  box-shadow: inset 3px 0 0 rgba(85, 199, 165, 0.82);
}

tr.clickable-rider-row:hover,
tr.clickable-rider-row:focus-visible {
  outline: 0;
  background: rgba(85, 199, 165, 0.1);
}

tr.clickable-rider-row:hover td:first-child,
tr.clickable-rider-row:focus-visible td:first-child {
  box-shadow: inset 3px 0 0 rgba(85, 199, 165, 0.82);
}

.standing-row.active {
  border-color: rgba(249, 115, 22, 0.52);
  background: var(--orange-soft);
}

.standing-row strong {
  display: block;
  color: var(--ink);
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(96px, 140px) 1fr 42px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--gold));
}

.stacked-bar-track {
  display: flex;
}

.stacked-bar-track .bar-fill {
  flex: 0 0 auto;
  min-width: 0;
}

.stacked-bar-track .bar-fill:first-child {
  border-radius: 999px 0 0 999px;
}

.stacked-bar-track .bar-fill:last-child {
  border-radius: 0 999px 999px 0;
}

.stacked-bar-track .bar-fill-solo {
  border-radius: 999px;
}

.bar-fill-male {
  background: linear-gradient(90deg, var(--orange), #f2b35e);
}

.bar-fill-female {
  background: linear-gradient(90deg, #55c7a5, #38bdf8);
}

.results-table-wrap {
  grid-column: 1 / -1;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.mobile-result-cards {
  display: none;
}

.all-results-section {
  grid-column: 1 / -1;
  overflow: visible;
}

.field-section {
  grid-column: 1 / -1;
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 8px 18px;
  align-items: start;
  padding: 0 10px 12px;
}

.field-title-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.field-title-stack h3 {
  margin: 0;
}

.field-gender-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.field-gender-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.035);
}

.field-gender-chip strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.field-gender-chip-male {
  border-color: rgba(249, 115, 22, 0.28);
}

.field-gender-chip-female {
  border-color: rgba(85, 199, 165, 0.28);
}

.gender-compact-list {
  display: grid;
  gap: 8px;
  padding: 10px 16px 6px;
}

.field-grid h4 {
  margin: 8px 10px 0;
  font-size: 0.84rem;
  text-transform: uppercase;
}

.field-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 10px 0;
}

.field-chart-head h4 {
  margin: 0;
}

.field-gender-toggle {
  grid-template-columns: repeat(3, minmax(66px, 1fr));
  flex: 0 0 auto;
}

.field-gender-toggle button {
  min-height: 30px;
  font-size: 0.66rem;
}

.field-age-panel .bar-row {
  grid-template-columns: minmax(max-content, 150px) minmax(150px, 1fr) 32px;
  min-height: 30px;
}

.field-age-panel .bar-row > span {
  white-space: nowrap;
}

.field-section .bar-list {
  gap: 7px;
  padding: 10px;
}

.field-section .bar-axis-row {
  min-height: 24px;
}

.field-section .bar-axis-title {
  font-size: 0.76rem;
}

.field-section .bar-row {
  gap: 8px;
}

.field-section .bar-row > span,
.field-section .bar-row strong {
  font-size: 0.84rem;
}

.field-section .bar-track {
  height: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.055);
}

td.numeric,
th.numeric {
  text-align: right;
}

th.status-column,
td.status-column {
  text-align: center;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

th.table-sort-header {
  cursor: pointer;
  user-select: none;
}

th.table-sort-header::after {
  display: inline-block;
  min-width: 1em;
  margin-left: 6px;
  color: var(--subtle);
  content: "↕";
}

th.table-sort-header[aria-sort="ascending"]::after {
  color: var(--ink);
  content: "↑";
}

th.table-sort-header[aria-sort="descending"]::after {
  color: var(--ink);
  content: "↓";
}

th.table-sort-header:hover,
th.table-sort-header:focus-visible,
th.table-sort-header[aria-sort="ascending"],
th.table-sort-header[aria-sort="descending"] {
  color: var(--ink);
}

th.table-sort-header:focus-visible {
  outline: 2px solid rgba(85, 199, 165, 0.8);
  outline-offset: -2px;
}

.course-place-podium {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 950;
}

.course-place-pill {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(242, 179, 94, 0.2);
  box-shadow: 0 0 18px rgba(242, 179, 94, 0.18);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
}

.course-place-podium-1 .course-place-pill {
  color: #f2b35e;
  background: rgba(242, 179, 94, 0.24);
}

.course-place-podium-2 .course-place-pill {
  color: #dfe5e1;
  background: rgba(214, 208, 198, 0.18);
  box-shadow: 0 0 18px rgba(214, 208, 198, 0.14);
}

.course-place-podium-3 .course-place-pill {
  color: #c98952;
  background: rgba(201, 137, 82, 0.22);
  box-shadow: 0 0 18px rgba(201, 137, 82, 0.14);
}

.rider-name-prize {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.profile-course-prize {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.weekly-prize-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(242, 179, 94, 0.6);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(242, 179, 94, 0.14);
  box-shadow: 0 0 18px rgba(242, 179, 94, 0.18);
}

.weekly-prize-svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sort-header-button {
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 6px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 750;
  text-align: inherit;
  text-transform: inherit;
  white-space: nowrap;
  cursor: pointer;
}

th.numeric .sort-header-button {
  margin-left: auto;
}

.sort-header-button:focus-visible {
  outline: 2px solid rgba(85, 199, 165, 0.8);
  outline-offset: 4px;
}

.sort-header-button:hover,
th[aria-sort="ascending"] .sort-header-button,
th[aria-sort="descending"] .sort-header-button {
  color: var(--ink);
}

.course-page th {
  vertical-align: bottom;
}

.course-page .sort-header-button {
  white-space: normal;
  line-height: 1.08;
}

.course-page th.status-column,
.course-page td.status-column {
  width: 1%;
  text-align: center;
}

.course-page th.status-column .sort-header-button {
  justify-content: center;
}

.profile-weekly-results th {
  vertical-align: bottom;
  white-space: normal;
  line-height: 1.08;
}

.profile-weekly-results th,
.profile-weekly-results td {
  padding-right: 10px;
  padding-left: 10px;
}

.profile-weekly-results th.status-column,
.profile-weekly-results td.status-column {
  width: 1%;
  text-align: center;
}

.profile-weekly-results th.status-column {
  min-width: 82px;
  white-space: nowrap;
}

.week-value,
.course-value,
.age-group-badge,
.gender-badge,
.fraction-value,
.eligibility-value,
.rank-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.week-value,
.course-value,
.age-group-badge,
.gender-badge {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.week-value {
  border-color: rgba(56, 189, 248, 0.45);
  color: #d7f2ff;
  background: rgba(56, 189, 248, 0.12);
}

.course-value {
  border-color: rgba(249, 115, 22, 0.34);
  color: #ffd3b1;
  background: rgba(249, 115, 22, 0.11);
}

.age-group-badge {
  border-color: rgba(56, 189, 248, 0.34);
  color: #d7f2ff;
  background: rgba(56, 189, 248, 0.1);
}

.age-group-badge.muted {
  border-color: var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.gender-badge.female {
  border-color: rgba(217, 70, 239, 0.5);
  color: #f5d0fe;
  background: rgba(217, 70, 239, 0.14);
}

.gender-badge.male {
  border-color: rgba(20, 184, 166, 0.48);
  color: #cffaf5;
  background: rgba(20, 184, 166, 0.13);
}

.gender-badge.neutral {
  color: var(--muted);
}

.time-value,
.points-value,
.gap-value,
.signed-value,
.speed-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.time-value {
  color: var(--ink);
  font-weight: 800;
}

.points-value {
  color: #ffe4bc;
  font-weight: 800;
}

.gap-value {
  font-weight: 800;
}

.gap-value.leader {
  color: var(--teal);
}

.gap-value.behind {
  color: #d8d0c5;
}

.signed-value {
  font-weight: 800;
}

.signed-value.positive {
  color: var(--teal);
}

.signed-value.negative {
  color: var(--danger);
}

.speed-value {
  color: #d8d0c5;
  font-weight: 750;
}

.fraction-value {
  gap: 3px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.fraction-value strong {
  color: var(--ink);
  font-weight: 800;
}

.fraction-value span {
  color: var(--subtle);
}

.rank-value {
  min-width: 30px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.eligibility-value {
  gap: 5px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.eligibility-value strong {
  display: inline;
  min-width: 0;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.eligibility-value.eligible {
  color: var(--muted);
  background: transparent;
}

.eligibility-value.short {
  color: var(--muted);
  background: transparent;
}

td.status-dnf {
  color: var(--danger);
  font-weight: 900;
}

.weekly-status-symbol {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(85, 199, 165, 0.48);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(85, 199, 165, 0.12);
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1;
}

.weekly-status-dnf {
  border-color: rgba(239, 68, 68, 0.52);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

.weekly-status-svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link {
  color: var(--orange);
  font-weight: 900;
  text-decoration: none;
}

.rider-name-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition:
    color 140ms ease,
    text-decoration-color 140ms ease;
}

.rider-name-link:hover,
.rider-name-link:focus-visible {
  outline: 0;
  color: var(--orange);
  text-decoration-color: currentColor;
}

.clickable-rider-row .rider-name-link:hover {
  color: var(--ink);
  text-decoration-color: transparent;
}

.rider-name-link.profile-name {
  color: inherit;
  text-transform: inherit;
}

.rider-name-link.profile-name:hover,
.rider-name-link.profile-name:focus-visible {
  color: var(--gold);
}

.standing-name {
  display: inline;
}

.table-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--orange);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
}

.table-link:hover,
.table-link:focus-visible {
  outline: 0;
  text-decoration: underline;
}

.clickable-rider-row .table-link:hover,
.clickable-rider-row .table-link:focus-visible {
  text-decoration: none;
}

.icon-link {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--orange);
  text-decoration: none;
}

.icon-link svg {
  width: 16px;
  height: 16px;
}

.icon-link:hover,
.icon-link:focus-visible {
  outline: 0;
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.1);
}

.error-box {
  margin: 24px;
  padding: 18px;
  border: 1px solid rgba(255, 104, 79, 0.36);
  border-radius: var(--radius);
  background: rgba(255, 104, 79, 0.1);
  color: var(--danger);
}

@media (max-width: 1180px) {
  .app-shell {
    width: 100%;
  }

  .app-frame {
    grid-template-columns: 1fr;
  }

  .nav-rail {
    position: static;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: auto;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-nav {
    display: flex;
    overflow-x: auto;
  }

  .rail-nav a {
    flex: 0 0 auto;
  }

}

@media (max-width: 1400px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .stat-row-primary,
  .stat-row-secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .event-hero {
    grid-template-columns: 1fr;
  }

  .race-countdown {
    justify-self: start;
    margin-top: 18px;
    min-height: 118px;
    min-width: 132px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .search-panel {
    min-height: auto;
  }

  .search-panel .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-head span {
    display: none;
  }

  .racer-list {
    max-height: none;
  }
}

@media (max-width: 980px) {
  .dashboard-grid,
  .content-grid,
  .field-grid,
  .profile-hero,
  .event-hero,
  .topbar {
    grid-template-columns: 1fr;
  }

  .profile-note {
    text-align: left;
  }

  .stat-row-primary,
  .stat-row-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-panel {
    min-height: auto;
  }

  .racer-list {
    max-height: none;
  }

  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-card-row {
    grid-template-columns: 1fr;
  }

  .stats-filter-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px 10px 32px;
  }

  .nav-rail {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rail-nav a {
    min-height: 38px;
    padding-inline: 10px;
  }

  .event-hero,
  .profile-hero,
  .stat-row,
  .content-grid,
  .empty-state {
    padding-left: 16px;
    padding-right: 16px;
  }

  .event-hero {
    min-height: 230px;
  }

  .season-switcher,
  .season-link-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .season-tabs {
    width: 100%;
  }

  .season-tabs button {
    min-width: 0;
  }

  .season-link-actions {
    justify-content: stretch;
  }

  .season-link-actions button {
    flex: 1 1 120px;
  }

  h1 {
    font-size: 2.15rem;
  }

  .profile-title {
    align-items: start;
    flex-direction: column;
  }

  .search-panel .filters {
    grid-template-columns: 1fr;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .results-table-wrap {
    overflow-x: auto;
  }
}

/* 2025 rider cockpit refresh */
:root {
  --forest: #55c7a5;
  --forest-soft: rgba(85, 199, 165, 0.14);
  --clay: #dd6f3b;
  --paper: #f8f3ea;
}

body {
  background:
    radial-gradient(circle at 72% 10%, rgba(56, 189, 248, 0.08), transparent 24rem),
    radial-gradient(circle at 94% 18%, rgba(168, 85, 247, 0.08), transparent 18rem),
    linear-gradient(180deg, rgba(85, 199, 165, 0.07), transparent 24rem),
    linear-gradient(180deg, #11130f, #090a09 36rem),
    var(--bg);
}

.app-frame {
  grid-template-columns: 400px minmax(0, 1fr);
}

.nav-rail {
  gap: 16px;
  overflow-y: auto;
  padding: 20px 16px;
}

.rail-nav {
  grid-template-columns: 1fr 1fr;
}

.rail-nav a {
  min-height: 40px;
}

.app-shell {
  width: min(100%, calc(100vw - 400px));
  max-width: 1680px;
  padding: 20px 22px 34px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr);
  min-height: auto;
}

.search-panel,
.season-panel {
  min-height: auto;
  padding: 16px;
  border-color: var(--line);
  background: rgba(14, 15, 13, 0.72);
  box-shadow: none;
}

.panel-title {
  margin-bottom: 10px;
}

.panel-kicker {
  display: none;
}

.filters {
  gap: 8px;
}

.compare-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.07), transparent 44%),
    rgba(255, 255, 255, 0.04);
}

.compare-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.compare-title .eyebrow {
  margin: 0;
}

.compare-controls label {
  align-self: end;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compare-controls select {
  width: 100%;
  min-height: 34px;
  padding: 0 36px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, transparent 50%, var(--forest) 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--forest) 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(85, 199, 165, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.012)),
    #0d0e0c;
  color: var(--ink);
  font-size: 0.82rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.compare-controls select:hover {
  border-color: rgba(85, 199, 165, 0.42);
}

.compare-controls select:focus-visible {
  border-color: rgba(85, 199, 165, 0.64);
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(85, 199, 165, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.compare-controls .custom-select-button {
  min-height: 34px;
  background:
    linear-gradient(135deg, rgba(85, 199, 165, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.012)),
    #0d0e0c;
  font-size: 0.82rem;
}

.compare-controls .custom-select-button:hover,
.compare-controls .custom-select-button:focus-visible,
.compare-controls .custom-select.open .custom-select-button {
  border-color: rgba(85, 199, 165, 0.64);
}

.compare-controls .custom-select-button:focus-visible {
  box-shadow:
    0 0 0 3px rgba(85, 199, 165, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.compare-controls .custom-select-button::after {
  border-color: var(--forest);
}

.compare-controls .custom-select-menu {
  border-color: rgba(85, 199, 165, 0.28);
}

.compare-controls .custom-select-option:hover,
.compare-controls .custom-select-option:focus-visible,
.compare-controls .custom-select-option.active {
  border-color: rgba(85, 199, 165, 0.24);
  background: rgba(85, 199, 165, 0.1);
}

.compare-controls .custom-select-option.active {
  color: #dffcf3;
  box-shadow: inset 3px 0 0 var(--forest);
}

.season-link-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 18px 0;
  padding: 12px 14px;
  border: 1px solid rgba(242, 179, 94, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(242, 179, 94, 0.1), transparent 48%),
    rgba(255, 255, 255, 0.035);
}

.season-link-bar .eyebrow {
  margin-bottom: 3px;
}

.season-link-bar strong,
.season-link-bar span {
  display: block;
}

.season-link-bar > div > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.season-link-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.season-link-actions button {
  display: grid;
  grid-template-columns: auto 24px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 8px 0 16px;
  border: 1px solid rgba(242, 179, 94, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), transparent 58%),
    rgba(242, 179, 94, 0.08);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  font-size: 0.92rem;
  font-weight: 950;
}

.season-link-year {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1;
}

.season-link-bib {
  color: var(--gold);
  font-size: 0.78rem;
  line-height: 1;
  opacity: 0.82;
}

.season-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.season-link-icon svg {
  width: 16px;
  height: 16px;
}

.season-link-actions button:hover,
.season-link-actions button:focus-visible {
  border-color: rgba(242, 179, 94, 0.68);
  outline: 0;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.22), transparent 58%),
    rgba(242, 179, 94, 0.12);
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.racer-list {
  max-height: none;
}

.search-panel .search-box {
  height: 40px;
}

.search-panel .racer-list {
  margin-top: 8px;
}

.search-panel .racer-button {
  min-height: 34px;
  padding: 7px 10px;
}

.event-hero {
  margin-bottom: 14px;
}

.event-hero.home-hero {
  min-height: 158px;
  padding: 22px 28px;
  background:
    linear-gradient(90deg, rgba(10, 11, 9, 0.96), rgba(10, 11, 9, 0.76) 54%, rgba(10, 11, 9, 0.44)),
    linear-gradient(135deg, rgba(85, 199, 165, 0.2), transparent 36%),
    linear-gradient(160deg, #2a322b 0 18%, #151614 18% 54%, #292019 54% 70%, #0d0f0d 70%);
}

.event-hero.home-hero h1 {
  margin-bottom: 9px;
  max-width: 680px;
  font-size: clamp(2rem, 3.7vw, 2.85rem);
  line-height: 0.96;
}

.event-hero.home-hero .event-meta {
  font-size: 0.88rem;
  line-height: 1.45;
}

.event-hero.home-hero .event-note {
  margin-top: 4px;
  font-size: 0.78rem;
}

.event-hero.home-hero .race-countdown {
  min-width: 120px;
  min-height: 120px;
  padding: 14px 16px;
}

.event-hero.home-hero .race-countdown span,
.event-hero.home-hero .race-countdown small {
  font-size: 0.68rem;
}

.event-hero.home-hero .race-countdown strong {
  font-size: 2.58rem;
}

.event-hero.compact-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  min-height: 132px;
  padding: 24px 28px;
  background:
    linear-gradient(90deg, rgba(85, 199, 165, 0.16), transparent 52%),
    linear-gradient(135deg, #171914, #10110f);
}

.event-hero.compact-hero::before,
.event-hero.compact-hero::after {
  display: none;
}

.event-hero.compact-hero h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
}

.event-hero.compact-hero .race-countdown {
  justify-items: start;
  min-width: 144px;
  min-height: 84px;
  padding: 14px 16px 13px;
  border-width: 1px;
  border-left-width: 5px;
  background:
    linear-gradient(90deg, rgba(249, 115, 22, 0.2), rgba(255, 255, 255, 0.045)),
    rgba(15, 15, 13, 0.92);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.event-hero.compact-hero .race-countdown span {
  color: var(--gold);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.event-hero.compact-hero .race-countdown strong {
  color: var(--ink);
  font-size: 2.05rem;
  line-height: 0.95;
  text-shadow: none;
}

.event-hero.compact-hero .race-countdown small {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
}

.event-hero.compact-hero .race-countdown .rank-scope {
  max-width: 10rem;
  margin-top: 2px;
  overflow: hidden;
  font-size: 0.62rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bib-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border: 1px solid rgba(249, 115, 22, 0.42);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.14);
  color: var(--orange);
  font-size: 0.46em;
  line-height: 1;
  transform: translateY(-0.04em);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 8px;
  max-width: 760px;
  margin-bottom: 12px;
}

.hero-metrics div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  color: var(--paper);
  font-size: 1.35rem;
  line-height: 1;
}

.hero-metrics span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-panel {
  border-color: var(--line);
  background: rgba(18, 19, 16, 0.78);
}

.stat-row {
  padding: 16px 18px 2px;
}

.stat-row-primary {
  grid-template-columns: repeat(4, minmax(138px, 1fr));
}

.stat-row-secondary {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.stat-card {
  min-height: 84px;
}

.content-grid,
.home-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px 18px 18px;
}

.home-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: start;
}

.seo-results-section {
  grid-column: 1 / -1;
}

.weekly-results-home {
  grid-column: 1 / -1;
  padding: 0;
}

.seo-results-section .section-head h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
}

.seo-results-copy {
  display: grid;
  gap: 10px;
  max-width: 980px;
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.65;
}

.seo-results-copy p {
  margin: 0;
}

.seo-results-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.seo-results-list li {
  padding-left: 4px;
}

.seo-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

.seo-link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(249, 115, 22, 0.34);
  border-radius: var(--radius);
  background: rgba(249, 115, 22, 0.1);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.seo-link-row a:hover,
.seo-link-row a:focus-visible {
  border-color: rgba(249, 115, 22, 0.68);
  outline: 0;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #140c05;
}

.seo-landing-hero {
  align-items: end;
}

.seo-landing-hero .eyebrow {
  margin-bottom: 12px;
}

.seo-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(249, 115, 22, 0.42);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 950;
  text-decoration: none;
}

.primary-action {
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #140c05;
}

.secondary-action {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.primary-action:hover,
.primary-action:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible {
  outline: 0;
  transform: translateY(-1px);
}

.seo-landing-layout {
  display: grid;
  gap: 12px;
}

.seo-detail-list {
  padding: 16px;
}

.seo-page-frame .nav-rail {
  gap: 28px;
}

.static-seo-layout {
  grid-template-columns: 1fr;
}

.static-seo-page .panel-section {
  overflow: hidden;
}

.static-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.static-stat {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.static-stat span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.static-stat strong {
  align-self: end;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.static-table-wrap {
  margin: 0 16px 16px;
}

.static-table-wrap a {
  color: var(--ink);
  font-weight: 900;
  text-decoration-color: rgba(249, 115, 22, 0.6);
  text-underline-offset: 3px;
}

.static-table-wrap a:hover,
.static-table-wrap a:focus-visible {
  color: var(--orange);
  outline: 0;
}

.admin-layout {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
}

.admin-refresh-section,
.admin-static-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.admin-static-section {
  grid-template-columns: 1fr;
}

.admin-login-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 20px;
  align-items: center;
  padding: 24px;
}

.admin-refresh-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  line-height: 1;
  text-transform: uppercase;
}

.admin-refresh-copy p:last-child {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-login-form {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.admin-login-form label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-login-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0d0e0c;
  color: var(--ink);
}

.admin-login-form input:focus-visible {
  border-color: rgba(249, 115, 22, 0.68);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.13);
}

.admin-turnstile {
  min-height: 65px;
}

.admin-login-form button {
  min-height: 46px;
  border: 1px solid rgba(249, 115, 22, 0.58);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #140c05;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-login-form button:disabled,
.admin-login-form input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-auth-message {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-auth-message.warn {
  color: var(--gold);
}

.admin-refresh-button {
  display: grid;
  gap: 8px;
  justify-items: start;
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(249, 115, 22, 0.58);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(249, 115, 22, 0.2), rgba(45, 212, 191, 0.08)),
    rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-align: left;
}

.admin-refresh-button .metric-icon {
  color: var(--orange);
}

.admin-refresh-button span,
.admin-refresh-button small {
  display: block;
}

.admin-refresh-button span {
  font-size: 1.05rem;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-refresh-button small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-refresh-button:hover,
.admin-refresh-button:focus-visible {
  border-color: rgba(249, 115, 22, 0.84);
  outline: 0;
  background:
    linear-gradient(145deg, rgba(249, 115, 22, 0.28), rgba(45, 212, 191, 0.1)),
    rgba(255, 255, 255, 0.055);
}

.admin-refresh-button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-control-section,
.admin-action-log-section {
  display: grid;
  gap: 14px;
}

.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.admin-details {
  padding-bottom: 16px;
}

.admin-url-section {
  display: grid;
  gap: 14px;
}

.source-url-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.source-url-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) minmax(180px, 260px);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.source-url-row strong {
  color: var(--gold);
  font-size: 1rem;
  font-weight: 950;
}

.source-url-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.source-url-row span,
.source-url-results h4 {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.source-url-row a,
.source-url-results a {
  color: var(--ink);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  text-decoration-color: rgba(249, 115, 22, 0.5);
  text-underline-offset: 3px;
}

.source-url-row small,
.source-url-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.source-url-results {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.source-url-results ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.admin-action-log {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.admin-action-row {
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.admin-action-row.success {
  border-color: rgba(45, 212, 191, 0.28);
}

.admin-action-row.failed {
  border-color: rgba(239, 68, 68, 0.34);
}

.admin-action-row div {
  display: grid;
  gap: 4px;
}

.admin-action-row span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-action-row strong {
  color: var(--ink);
}

.admin-action-row small {
  color: var(--muted);
}

.admin-action-row pre {
  max-height: 138px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.admin-edge-section {
  display: grid;
  gap: 14px;
}

.edge-diagnostic-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  align-items: center;
  padding: 0 16px 16px;
}

.edge-diagnostic-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.edge-diagnostic-button {
  min-height: 108px;
}

.edge-diagnostic-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.edge-diagnostic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.edge-diagnostic-row.pass {
  border-left-color: var(--green);
}

.edge-diagnostic-row.warn {
  border-left-color: var(--gold);
}

.edge-diagnostic-row.fail {
  border-left-color: var(--danger);
}

.edge-diagnostic-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.edge-diagnostic-main span {
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.edge-diagnostic-row.pass .edge-diagnostic-main span {
  border-color: rgba(131, 196, 123, 0.44);
  color: var(--green);
}

.edge-diagnostic-row.warn .edge-diagnostic-main span {
  border-color: rgba(242, 179, 94, 0.5);
  color: var(--gold);
}

.edge-diagnostic-row.fail .edge-diagnostic-main span {
  border-color: rgba(255, 104, 79, 0.5);
  color: var(--danger);
}

.edge-diagnostic-main strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.edge-diagnostic-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.edge-diagnostic-main code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.edge-diagnostic-headers {
  display: grid;
  gap: 7px;
  margin: 0;
}

.edge-diagnostic-headers div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.edge-diagnostic-headers dt {
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.edge-diagnostic-headers dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.compact-empty-state {
  margin: 0 16px 16px;
  padding: 18px;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.admin-detail-grid div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.admin-detail-grid span,
.admin-detail-grid strong {
  display: block;
}

.admin-detail-grid span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-detail-grid strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.9rem;
}

.admin-seo-section {
  display: grid;
  gap: 16px;
  padding-bottom: 16px;
}

.admin-seo-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) repeat(2, minmax(180px, 0.85fr));
  gap: 12px;
  padding: 0 16px;
}

.admin-seo-preview,
.admin-seo-icons,
.admin-seo-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.admin-seo-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.admin-seo-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  border-radius: var(--radius);
  object-fit: cover;
  background: #000;
}

.admin-seo-preview span,
.admin-seo-icons span,
.admin-seo-card span,
.admin-seo-indexing h4 {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-seo-preview a,
.admin-seo-card a,
.admin-seo-indexing a {
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
  text-decoration-color: rgba(249, 115, 22, 0.62);
  text-underline-offset: 3px;
}

.admin-seo-preview a:hover,
.admin-seo-preview a:focus-visible,
.admin-seo-card a:hover,
.admin-seo-card a:focus-visible,
.admin-seo-indexing a:hover,
.admin-seo-indexing a:focus-visible {
  color: var(--orange);
  outline: 0;
}

.admin-seo-icons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.admin-seo-icons div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-seo-icons img {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background: #000;
}

.admin-seo-icons code,
.admin-seo-indexing code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-seo-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.admin-seo-card small {
  color: var(--muted);
  line-height: 1.4;
}

.admin-seo-indexing {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 0 16px;
}

.admin-seo-indexing > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.admin-seo-indexing h4 {
  margin: 0 0 10px;
}

.admin-seo-indexing ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.admin-seo-indexing li {
  min-width: 0;
}

.leaderboard-section {
  grid-row: span 2;
}

.leaderboard-section {
  overflow: visible;
}

.standings-leaderboard {
  grid-column: 1 / -1;
  overflow: hidden;
  border-color: rgba(242, 179, 94, 0.22);
  background:
    linear-gradient(135deg, rgba(242, 179, 94, 0.08), transparent 24%),
    rgba(12, 13, 12, 0.78);
}

.leader-age-list {
  display: grid;
  gap: 8px;
  padding: 8px 12px 14px;
}

.leader-age-header,
.leader-age-row {
  display: grid;
  grid-template-columns: minmax(104px, 0.24fr) repeat(2, minmax(0, 0.5fr));
  gap: 8px;
  min-width: 0;
}

.leader-age-header {
  align-items: end;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leader-age-header strong {
  min-width: 0;
  padding: 0 12px 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.leader-age-header strong:first-of-type {
  grid-column: 2;
}

.leader-age-header strong:last-of-type {
  grid-column: 3;
}

.leader-age-row {
  align-items: stretch;
}

.leader-age-title {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 8px 10px 8px 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--muted);
}

.leader-age-title h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
}

.leader-age-winners {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.leader-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  position: relative;
  min-width: 0;
  min-height: 54px;
  padding: 8px 12px 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 179, 94, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.035);
  color: var(--ink);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.leader-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold);
  opacity: 0.78;
}

.leader-card-f::before {
  background: linear-gradient(180deg, #f2b35e, #55c7a5);
}

.leader-card-m::before {
  background: linear-gradient(180deg, #f2b35e, #6aa6ff);
}

.leader-rank {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(242, 179, 94, 0.48);
  border-radius: 999px;
  background: rgba(242, 179, 94, 0.14);
  color: #ffe4bc;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.leader-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.12;
}

.leader-gender {
  display: none;
}

.leader-points {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.leader-points strong {
  color: #fff8ea;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.leader-points span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.leader-card-empty {
  min-height: 54px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.015);
  pointer-events: none;
  opacity: 0.5;
}

.leader-card-empty::before {
  display: none;
}

.standings-gender-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.standings-gender-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 0;
  border-top: 1px solid var(--line);
}

.standings-gender-head h3 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
}

.standings-gender-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.standings-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 8px;
}

.standings-category-grid .results-table-wrap {
  grid-column: auto;
}

.standings-card .section-head {
  padding: 10px 12px 0;
}

.standings-card .section-head h3 {
  font-size: 0.82rem;
}

.standings-card th,
.standings-card td {
  padding: 7px 9px;
  font-size: 0.8rem;
}

.standings-card th {
  font-size: 0.64rem;
}

.standings-pagination {
  border-bottom: 1px solid var(--line);
}

.standings-card .standings-pagination {
  padding: 8px 10px 10px;
}

.leaderboard-row {
  min-height: 58px;
}

.leaderboard-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 320px);
  gap: 10px;
  align-items: end;
  padding: 14px 16px 0;
}

.all-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.all-results-course-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.all-results-course-filter span {
  font-size: 0.76rem;
}

.all-results-course-filter .custom-select {
  width: min(260px, 48vw);
}

.all-results-course-filter .custom-select-button {
  min-height: 34px;
}

.all-results-pagination {
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 0;
}

.all-results-pagination button {
  min-height: 32px;
  padding: 0 10px;
}

.all-results-pagination span {
  font-size: 0.84rem;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.segmented-control:has(button:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(72px, 1fr));
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 950;
  text-transform: uppercase;
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button.active,
.segmented-control button:hover,
.segmented-control button:focus-visible {
  outline: 0;
  background: var(--forest-soft);
  color: #dffcf3;
}

.home-category-filter {
  display: grid;
  gap: 6px;
}

.home-category-filter span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-category-filter select {
  min-height: 38px;
  padding: 0 38px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--gold) 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(242, 179, 94, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014)),
    #0d0e0c;
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.home-category-filter select:hover {
  border-color: rgba(242, 179, 94, 0.42);
}

.home-category-filter select:focus-visible {
  border-color: rgba(242, 179, 94, 0.66);
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(242, 179, 94, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.home-category-filter .custom-select-button {
  background:
    linear-gradient(135deg, rgba(242, 179, 94, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014)),
    #0d0e0c;
}

.home-category-filter .custom-select-button:hover,
.home-category-filter .custom-select-button:focus-visible,
.home-category-filter .custom-select.open .custom-select-button {
  border-color: rgba(242, 179, 94, 0.66);
}

.home-category-filter .custom-select-button:focus-visible {
  box-shadow:
    0 0 0 3px rgba(242, 179, 94, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.home-category-filter .custom-select-button::after {
  border-color: var(--gold);
}

.home-category-filter .custom-select-menu {
  border-color: rgba(242, 179, 94, 0.28);
}

.home-category-filter .custom-select-option:hover,
.home-category-filter .custom-select-option:focus-visible,
.home-category-filter .custom-select-option.active {
  border-color: rgba(242, 179, 94, 0.24);
  background: rgba(242, 179, 94, 0.1);
}

.home-category-filter .custom-select-option.active {
  color: #fff1da;
  box-shadow: inset 3px 0 0 var(--gold);
}

.leaderboard-table {
  padding: 12px 16px 0;
}

.leaderboard-table table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.standings-results-table {
  padding: 0;
}

.standings-results-table table {
  border: 0;
  border-radius: 0;
}

.table-subtle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.table-head-detail,
.table-cell-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: none;
}

.table-cell-detail {
  color: var(--subtle);
  font-size: 0.86rem;
}

.leaderboard-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 16px;
}

.leaderboard-pagination button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  text-transform: uppercase;
}

.leaderboard-pagination button:hover,
.leaderboard-pagination button:focus-visible {
  border-color: rgba(85, 199, 165, 0.55);
  outline: 0;
}

.leaderboard-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.leaderboard-pagination span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.weekly-controls-section,
.weekly-course-summary {
  grid-column: 1 / -1;
}

.weekly-controls-section {
  z-index: 20;
  overflow: visible;
}

.weekly-controls-section .custom-select-menu {
  z-index: 60;
}

.weekly-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(190px, 1.2fr);
  gap: 12px;
  align-items: end;
  padding: 14px 16px 16px;
}

.weekly-week-picker {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: stretch;
}

.weekly-week-picker > button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(242, 179, 94, 0.34);
  border-radius: var(--radius);
  background: rgba(242, 179, 94, 0.08);
  color: var(--gold);
}

.weekly-week-picker > button:hover,
.weekly-week-picker > button:focus-visible {
  border-color: rgba(242, 179, 94, 0.66);
  outline: 0;
  background: rgba(242, 179, 94, 0.14);
}

.weekly-week-picker > button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.weekly-week-picker svg {
  width: 18px;
  height: 18px;
}

.weekly-gender-control {
  grid-template-columns: repeat(3, minmax(74px, 1fr));
}

.weekly-stat-row {
  grid-column: 1 / -1;
  padding-top: 0;
}

.weekly-course-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
}

.weekly-course-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 4px 10px;
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  text-align: left;
}

.weekly-course-card > span {
  align-self: stretch;
  border-radius: 999px;
  background: var(--course-color, var(--orange));
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.2);
}

.weekly-course-card strong,
.weekly-course-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weekly-course-card strong {
  font-size: 0.95rem;
  font-weight: 950;
}

.weekly-course-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.weekly-course-card:hover,
.weekly-course-card:focus-visible {
  border-color: var(--course-color, var(--orange));
  outline: 0;
  background: rgba(249, 115, 22, 0.1);
  background: color-mix(in srgb, var(--course-color, var(--orange)) 13%, transparent);
}

.weekly-course-card.active {
  border-color: var(--course-color, var(--orange));
  outline: 0;
  background: rgba(249, 115, 22, 0.1);
  background: color-mix(in srgb, var(--course-color, var(--orange)) 18%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--course-color, var(--orange)) 44%, transparent),
    0 0 26px color-mix(in srgb, var(--course-color, var(--orange)) 18%, transparent);
}

.weekly-course-card.active > span {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--course-color, var(--orange)) 18%, transparent),
    0 0 22px color-mix(in srgb, var(--course-color, var(--orange)) 44%, transparent);
}

.race-selection-preview-section {
  grid-column: 1 / -1;
}

.race-selection-preview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 14px 16px 16px;
}

.race-selection-preview-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 5px 11px;
  min-height: 150px;
  padding: 13px;
  border: 1px solid rgba(85, 199, 165, 0.25);
  border-radius: var(--radius);
  background: rgba(85, 199, 165, 0.055);
  color: var(--ink);
  text-align: left;
}

.race-selection-preview-card:hover,
.race-selection-preview-card:focus-visible {
  border-color: rgba(85, 199, 165, 0.58);
  outline: 0;
  background: rgba(85, 199, 165, 0.1);
}

.race-selection-course-mark {
  grid-row: 1 / 5;
  align-self: stretch;
  border-radius: 999px;
  background: var(--course-color, var(--teal));
  box-shadow: 0 0 16px rgba(85, 199, 165, 0.22);
}

.race-selection-preview-card strong,
.race-selection-preview-card small,
.race-selection-preview-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.race-selection-preview-card strong {
  font-size: 0.98rem;
  font-weight: 950;
}

.race-selection-preview-card small,
.race-selection-preview-card em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.race-selection-preview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.race-selection-preview-metrics span {
  display: grid;
  gap: 1px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.race-selection-preview-metrics b,
.race-selection-preview-metrics i {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.race-selection-preview-metrics b {
  color: var(--teal);
  font-size: 1rem;
  font-weight: 950;
}

.race-selection-preview-metrics i {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.race-selection-table-section table {
  min-width: 860px;
}

.race-selection-strength {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(242, 179, 94, 0.12);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
}

.race-selection-strength-direct-course {
  background: rgba(85, 199, 165, 0.12);
  color: var(--teal);
}

.race-selection-strength-new {
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.race-selection-footnote {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.weekly-results-section table {
  min-width: 760px;
}

.point-play-controls {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 10px;
  align-items: center;
  margin: 12px 16px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.point-play-controls button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.point-play-controls button:hover,
.point-play-controls button:focus-visible {
  border-color: rgba(85, 199, 165, 0.55);
  outline: 0;
}

.point-play-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.point-play-controls svg {
  width: 18px;
  height: 18px;
}

.point-play-controls div {
  min-width: 0;
  text-align: center;
}

.point-play-controls strong,
.point-play-controls span {
  display: block;
}

.point-play-controls strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.point-play-controls span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.compact-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.compact-row strong {
  color: var(--forest);
}

.point-play-card {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 18px;
  align-items: stretch;
  padding: 14px 16px;
}

.point-play-card-step-up {
  border-color: rgba(242, 179, 94, 0.36);
  background:
    linear-gradient(90deg, rgba(242, 179, 94, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.025);
}

.point-play-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.point-play-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.point-play-title strong {
  font-size: 1.02rem;
  line-height: 1.1;
}

.point-play-title span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid rgba(85, 199, 165, 0.28);
  border-radius: 999px;
  background: rgba(85, 199, 165, 0.1);
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.point-play-title .point-play-confidence {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.point-play-card-step-up .point-play-title .point-play-confidence {
  border-color: rgba(242, 179, 94, 0.42);
  background: rgba(242, 179, 94, 0.12);
  color: var(--gold);
}

.point-play-card p {
  max-width: 880px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.45;
}

.point-play-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.point-play-tags span {
  min-height: 24px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.2;
}

.point-play-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-self: center;
}

.point-play-scoreboard-single {
  grid-template-columns: minmax(0, 1fr);
}

.point-play-scoreboard div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(85, 199, 165, 0.22);
  border-radius: var(--radius);
  background: rgba(85, 199, 165, 0.07);
  text-align: right;
}

.point-play-card-step-up .point-play-scoreboard div {
  border-color: rgba(242, 179, 94, 0.28);
  background: rgba(242, 179, 94, 0.08);
}

.point-play-card-step-up .point-play-scoreboard strong {
  color: var(--gold);
}

.point-play-scoreboard span,
.point-play-scoreboard strong {
  display: block;
}

.point-play-scoreboard span {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.point-play-scoreboard strong {
  color: var(--forest);
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1;
}

.point-play-footnote {
  margin: 0 16px 16px;
  padding: 12px 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.5;
}

.standings-break {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.standings-break span {
  height: 1px;
  background: var(--line);
}

.chart-pill {
  paint-order: stroke;
}

.profile-compare-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px 0;
}

.profile-compare-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.profile-compare-bar .eyebrow {
  flex: 0 0 auto;
  margin: 0;
}

.profile-compare-pills {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-compare-pill {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: baseline;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-compare-pill.accent-a {
  border-color: rgba(249, 115, 22, 0.44);
}

.profile-compare-pill.accent-b {
  border-color: rgba(85, 199, 165, 0.44);
}

.profile-compare-pill strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-compare-pill span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-compare-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.compare-slot-button,
.compare-open-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.compare-slot-button:hover,
.compare-slot-button:focus-visible,
.compare-open-button:hover,
.compare-open-button:focus-visible {
  border-color: rgba(85, 199, 165, 0.55);
  outline: 0;
}

.compare-slot-button.active {
  border-color: rgba(249, 115, 22, 0.62);
  background: var(--orange-soft);
  color: var(--paper);
}

.compare-open-button {
  border-color: rgba(85, 199, 165, 0.48);
  background: var(--forest-soft);
  color: #dffcf3;
}

.compare-open-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.rules-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
}

.rules-details summary span {
  font-size: 0.98rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rules-details summary small {
  color: var(--muted);
  font-size: 0.8rem;
}

.comparison-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 18px 0;
}

.compare-rider-card {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.compare-rider-card.accent-a {
  border-color: rgba(249, 115, 22, 0.45);
}

.compare-rider-card.accent-b {
  border-color: rgba(85, 199, 165, 0.48);
}

.compare-rider-card span,
.compare-rider-card small {
  display: block;
  color: var(--muted);
}

.compare-rider-card span {
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compare-rider-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.35rem;
}

.comparison-stat-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .comparison-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .comparison-stat-row {
    grid-template-columns: 1fr;
  }
}

.compare-chart {
  height: 340px;
}

.compare-explain {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.compare-explain p {
  max-width: 660px;
}

.compare-legend {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.compare-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.compare-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-a {
  background: #f97316;
}

.legend-b {
  background: #55c7a5;
}

.compare-table-note {
  padding: 8px 16px 0;
}

.course-page {
  display: grid;
  gap: 14px;
}

.course-map-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 156px);
  align-items: center;
  gap: 14px;
  min-height: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(105deg, rgba(45, 212, 191, 0.07), transparent 48%),
    linear-gradient(135deg, #1b1a16, #10110f);
}

.course-map-copy {
  align-self: center;
}

.course-map-copy h2 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1;
  text-transform: uppercase;
}

.course-map-copy p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.6;
}

.course-map-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.course-map-meta span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.course-map-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    rgba(8, 10, 8, 0.66);
  background-size: 24px 24px, 24px 24px, auto;
  opacity: 0.86;
}

.course-map-svg {
  width: 88%;
  height: auto;
}

.course-map-contour,
.course-map-gridline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 2;
}

.course-map-gridline {
  stroke-dasharray: 7 9;
}

.course-map-route-shadow,
.course-map-route {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-map-route-shadow {
  stroke: rgba(0, 0, 0, 0.65);
  stroke-width: 12;
}

.course-map-route {
  stroke: var(--course-color);
  stroke-width: 5;
  filter: url(#courseGlow);
}

.course-map-start {
  fill: var(--orange);
  stroke: #160c05;
  stroke-width: 2;
}

.course-button-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px;
}

.course-button-grid button {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-align: left;
}

.course-button-grid button span {
  width: 10px;
  height: 30px;
  border-radius: 999px;
  background: var(--course-color);
}

.course-button-grid button strong,
.course-button-grid button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-button-grid button strong {
  font-size: 0.9rem;
}

.course-button-grid button small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.course-button-grid button.active,
.course-button-grid button:hover,
.course-button-grid button:focus-visible {
  border-color: rgba(249, 115, 22, 0.48);
  outline: 0;
  background: rgba(249, 115, 22, 0.1);
}

.stats-course-button-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 18px;
}

.stats-course-button-grid button {
  grid-template-columns: 10px minmax(0, 1fr);
}

.stats-filter-controls {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(240px, 360px);
  gap: 12px;
  align-items: end;
  padding: 0 18px 14px;
}

.stats-filters-section,
.stats-filters-section .stats-filter-controls,
.stats-age-filter,
.stats-age-filter .custom-select {
  overflow: visible;
}

.stats-filters-section {
  z-index: 30;
}

.stats-age-filter .custom-select.open {
  z-index: 80;
}

.stats-age-filter .custom-select-menu {
  z-index: 90;
}

.stats-gender-control {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
}

.stats-age-filter {
  display: grid;
  gap: 6px;
}

.course-toolbar {
  grid-template-columns: minmax(180px, 240px) minmax(190px, 250px) minmax(220px, 340px) minmax(180px, 240px);
  padding-top: 0;
}

.course-toolbar .segmented-control {
  width: 100%;
}

.course-toolbar .home-category-filter,
.course-toolbar .custom-select {
  align-self: stretch;
}

.course-toolbar .custom-select-button {
  height: 100%;
}

.course-stat-row {
  padding-top: 0;
}

@media (max-width: 1180px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: 100%;
  }

  .nav-rail {
    position: static;
    grid-template-columns: 1fr;
    height: auto;
  }

  .rail-nav {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .search-panel .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .racer-list {
    max-height: none;
  }
}

@media (max-width: 920px) {
  .static-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-layout,
  .admin-seo-layout,
  .admin-seo-indexing,
  .admin-refresh-section,
  .admin-static-section,
  .admin-login-section,
  .admin-metrics,
  .admin-control-grid,
  .admin-action-row,
  .admin-detail-grid,
  .source-url-row,
  .edge-diagnostic-summary,
  .edge-diagnostic-row,
  .leaderboard-toolbar,
  .weekly-toolbar,
  .comparison-head,
  .course-time-body,
  .profile-compare-bar,
  .course-toolbar,
  .leader-age-row,
  .point-play-card {
    grid-template-columns: 1fr;
  }

  .profile-compare-summary {
    align-items: stretch;
  }

  .profile-compare-pills {
    flex-direction: column;
  }

  .point-play-scoreboard {
    align-self: stretch;
  }

  .course-button-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-time-body {
    padding-right: 0;
  }

  .course-time-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 14px 14px;
  }

  .profile-compare-actions {
    justify-content: start;
  }

  .compare-explain {
    align-items: flex-start;
    flex-direction: column;
  }

  .compare-legend {
    justify-content: flex-start;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rail-nav {
    grid-template-columns: 1fr 1fr;
  }

  .leader-age-header {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
  }

  .leader-age-header span {
    display: none;
  }

  .leader-age-header strong:first-of-type,
  .leader-age-header strong:last-of-type {
    grid-column: auto;
  }

  .leader-age-winners {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px 10px 28px;
  }

  .event-hero.home-hero,
  .event-hero.compact-hero {
    padding: 18px 16px;
  }

  .hero-metrics,
  .stat-row-primary,
  .stat-row-secondary,
  .search-panel .filters,
  .course-button-grid {
    grid-template-columns: 1fr;
  }

  .course-map-panel {
    grid-template-columns: minmax(0, 1fr) minmax(102px, 132px);
    padding: 18px 16px;
  }

  .race-countdown {
    display: none;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .all-results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .all-results-course-filter .custom-select {
    width: min(260px, calc(100vw - 84px));
  }
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 82px;
  }

  body {
    overflow-x: hidden;
    background:
      radial-gradient(circle at 16% 0%, rgba(249, 115, 22, 0.14), transparent 18rem),
      radial-gradient(circle at 92% 8%, rgba(85, 199, 165, 0.1), transparent 16rem),
      linear-gradient(180deg, #11130f, #090a09 34rem),
      var(--bg);
  }

  body::before {
    background-size: 34px 34px;
  }

  .app-frame {
    display: block;
  }

  .nav-rail {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(84px, max-content);
    gap: 12px;
    width: 100%;
    overflow: visible;
    padding: max(12px, env(safe-area-inset-top)) 10px 12px;
    background: rgba(9, 10, 9, 0.96);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px);
  }

  .nav-rail.menu-open {
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .brand {
    justify-content: start;
    min-height: 46px;
    min-width: 0;
  }

  .brand-logo {
    width: clamp(132px, 44vw, 188px);
    max-width: 100%;
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 84px;
    min-height: 44px;
    max-width: 100%;
    padding: 0 10px;
    border: 1px solid rgba(249, 115, 22, 0.42);
    border-radius: var(--radius);
    background: rgba(249, 115, 22, 0.12);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 950;
    text-transform: uppercase;
  }

  .mobile-menu-button:hover,
  .mobile-menu-button:focus-visible,
  .nav-rail.menu-open .mobile-menu-button {
    border-color: rgba(249, 115, 22, 0.72);
    outline: 0;
    background: linear-gradient(135deg, var(--orange), var(--gold));
    color: #140c05;
  }

  .mobile-menu-button:hover .nav-icon,
  .mobile-menu-button:focus-visible .nav-icon,
  .nav-rail.menu-open .mobile-menu-button .nav-icon {
    color: #140c05;
  }

  .rail-nav {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .nav-rail.menu-open .rail-nav {
    display: grid;
    padding-top: 2px;
  }

  .rail-nav a {
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 8px 9px;
    font-size: 0.92rem;
    line-height: 1.1;
    white-space: normal;
  }

  .rail-nav a span {
    display: none;
  }

  .nav-icon {
    width: 16px;
    height: 16px;
  }

  .search-panel,
  .season-panel {
    display: none;
    grid-column: 1 / -1;
    padding: 12px;
  }

  .search-panel {
    max-height: calc(100dvh - 132px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .nav-rail.menu-open .search-panel,
  .nav-rail.menu-open .season-panel {
    display: flex;
  }

  .app-shell {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    position: fixed;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    z-index: 120;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(8, 9, 8, 0.94);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    min-height: 50px;
    padding: 5px 4px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
  }

  .mobile-bottom-nav .nav-icon {
    width: 18px;
    height: 18px;
  }

  .mobile-bottom-nav a.active,
  .mobile-bottom-nav a:focus-visible,
  .mobile-bottom-nav button:focus-visible {
    border-color: rgba(249, 115, 22, 0.48);
    outline: 0;
    background: rgba(249, 115, 22, 0.18);
    color: var(--ink);
  }

  .static-seo-page .nav-rail {
    grid-template-columns: 1fr;
  }

  .static-seo-page .rail-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding-top: 2px;
  }

  .static-seo-page .rail-nav a {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 0.8rem;
  }

  .panel-title {
    margin-bottom: 10px;
  }

  .panel-title h2 {
    font-size: 1rem;
  }

  .mini-stat {
    padding: 10px;
  }

  .mini-stat strong {
    font-size: 1.08rem;
  }

  .racer-list {
    max-height: 230px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell {
    padding: 12px 10px 28px;
  }

  .season-switcher {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .season-tabs {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
    width: 100%;
  }

  .season-tabs button {
    min-width: 0;
  }

  .event-hero,
  .event-hero.home-hero,
  .event-hero.compact-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px 16px;
  }

  .event-hero::before,
  .event-hero::after {
    opacity: 0.22;
    transform: scale(0.72) rotate(-16deg);
    transform-origin: right bottom;
  }

  .event-hero.compact-hero h1 {
    gap: 8px;
    font-size: clamp(1.55rem, 8vw, 2.2rem);
    line-height: 1;
  }

  .event-hero.view-profile {
    gap: 8px;
    padding: 11px 12px;
    border-radius: 12px;
  }

  .event-hero.view-profile h1 {
    gap: 7px;
    margin-bottom: 5px;
    font-size: clamp(1.3rem, 8vw, 1.85rem);
    line-height: 1;
  }

  .event-hero.view-profile .profile-subheading {
    min-height: 0;
    font-size: 0.92rem;
    line-height: 1.2;
  }

  h1,
  .course-map-copy h2,
  .empty-state h2 {
    font-size: clamp(1.75rem, 9vw, 2.35rem);
    line-height: 1;
  }

  .event-meta {
    font-size: 0.98rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .race-countdown,
  .event-hero.compact-hero .race-countdown {
    display: none;
  }

  .event-hero.view-profile .race-countdown {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
    width: fit-content;
    min-width: 0;
    min-height: 0;
    margin-top: 4px;
    padding: 6px 8px;
    border-width: 1px;
    border-left-width: 2px;
    border-radius: 8px;
  }

  .event-hero.view-profile .race-countdown span {
    color: var(--gold);
    font-size: 0.55rem;
    white-space: nowrap;
  }

  .event-hero.view-profile .race-countdown strong {
    font-size: 1.08rem;
    line-height: 1;
  }

  .event-hero.view-profile .race-countdown small {
    max-width: none;
    color: var(--muted);
    font-size: 0.55rem;
    white-space: nowrap;
  }

  .bib-pill {
    min-height: 24px;
    padding-inline: 8px;
    font-size: 0.8rem;
  }

  .hero-metrics,
  .stat-row,
  .stat-row-primary,
  .stat-row-secondary,
  .admin-metrics,
  .admin-control-grid,
  .admin-action-row,
  .admin-detail-grid,
  .source-url-row,
  .comparison-head,
  .course-time-pills,
  .search-panel .filters {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    max-width: none;
  }

  .course-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-stat-row .stat-card {
    min-height: 96px;
  }

  .profile-hero,
  .content-grid,
  .home-layout,
  .admin-layout,
  .stat-row,
  .course-time-layout,
  .compact-list,
  .leaderboard-table,
  .leader-age-list {
    padding: 12px;
  }

  .profile-panel,
  .panel-section:not(.results-table-wrap) {
    overflow: visible;
  }

  .profile-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .profile-hero,
  .content-grid,
  .home-layout,
  .admin-layout,
  .course-time-layout {
    padding: 0;
  }

  .panel-section {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .panel-section:not(.results-table-wrap) {
    background: rgba(18, 18, 16, 0.72);
  }

  .weekly-course-cards,
  .stats-card-row,
  .compact-list,
  .leaderboard-table,
  .leader-age-list,
  .seo-results-copy,
  .seo-link-row {
    padding-right: 10px;
    padding-left: 10px;
  }

  .weekly-toolbar,
  .leaderboard-toolbar,
  .course-toolbar,
  .stats-filter-controls,
  .section-head {
    padding-right: 10px;
    padding-left: 10px;
  }

  .profile-title {
    gap: 12px;
  }

  .profile-title > div,
  .season-link-bar > div,
  .course-map-copy {
    min-width: 0;
  }

  .profile-title h2 {
    font-size: clamp(1.55rem, 8vw, 2.25rem);
  }

  .bib-badge {
    width: 58px;
    height: 58px;
    font-size: 1.15rem;
  }

  .season-link-bar,
  .profile-compare-bar {
    margin: 8px 10px 0;
    padding: 10px;
  }

  .all-results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .season-link-bar {
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    border-radius: 10px;
  }

  .season-link-bar .eyebrow {
    margin-bottom: 1px;
    font-size: 0.6rem;
  }

  .season-link-bar > div > span {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .season-link-actions button {
    min-height: 34px;
    grid-template-columns: auto 18px;
    justify-content: start;
    gap: 8px;
    padding: 0 8px 0 10px;
    border-radius: 9px;
  }

  .season-link-year {
    font-size: 0.92rem;
  }

  .season-link-bib {
    font-size: 0.68rem;
  }

  .profile-compare-bar {
    gap: 8px;
    padding-top: 8px;
  }

  .profile-compare-summary {
    min-height: 0;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .profile-compare-bar .eyebrow {
    width: 100%;
    font-size: 0.6rem;
  }

  .profile-compare-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  .profile-compare-pill {
    gap: 5px;
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 9px;
  }

  .profile-compare-pill span {
    font-size: 0.6rem;
  }

  .profile-compare-pill strong {
    font-size: 0.78rem;
  }

  .profile-compare-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .compare-slot-button,
  .compare-open-button {
    min-height: 34px;
    padding: 0 8px;
    border-radius: 9px;
  }

  .compare-slot-button small,
  .compare-open-button small {
    display: none;
  }

  .compare-slot-button strong,
  .compare-open-button strong {
    font-size: 0.76rem;
    line-height: 1.1;
  }

  .season-link-actions,
  .profile-compare-actions,
  .leaderboard-pagination,
  .racer-pagination {
    align-items: stretch;
  }

  .season-link-actions button,
  .profile-compare-actions button,
  .leaderboard-pagination button,
  .racer-pagination button {
    flex: 1 1 0;
  }

  .leaderboard-toolbar,
  .weekly-toolbar,
  .course-toolbar,
  .stats-filter-controls {
    gap: 12px;
    padding: 12px 12px 0;
  }

  .stats-filter-controls {
    grid-template-columns: 1fr;
    padding-bottom: 14px;
  }

  .segmented-control {
    width: 100%;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 6px;
    padding: 13px 12px 0;
  }

  .section-head span {
    display: block;
    white-space: normal;
  }

  .stat-card {
    min-height: 76px;
    padding: 13px;
  }

  .stat-card strong {
    font-size: 1.22rem;
  }

  .stat-label {
    align-items: start;
  }

  .chart {
    height: 280px;
    padding: 8px 10px 12px;
  }

  .cumulative-points-chart {
    height: 330px;
  }

  .course-time-body {
    gap: 0;
  }

  .course-time-chart,
  .compare-chart {
    height: 320px;
  }

  .course-time-pills {
    padding: 0 12px 12px;
  }

  .course-time-pill {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 78px;
    border-radius: var(--radius);
  }

  .course-time-pill small {
    grid-column: 1 / -1;
  }

  .course-map-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
    padding: 18px 16px;
  }

  .course-map-copy p {
    line-height: 1.5;
  }

  .course-map-art {
    display: none;
  }

  .course-button-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 12px;
  }

  .course-button-grid button {
    grid-template-columns: 9px minmax(0, 1fr);
    min-height: 46px;
    padding: 10px;
  }

  .course-button-grid button span {
    width: 9px;
  }

  .course-button-grid button strong {
    font-size: 0.86rem;
  }

  .course-button-grid button small {
    display: none;
  }

  .admin-refresh-section,
  .admin-static-section,
  .admin-login-section {
    padding: 16px;
  }

  .admin-refresh-button {
    min-height: 104px;
  }

  .results-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: rgba(249, 115, 22, 0.55) rgba(255, 255, 255, 0.08);
  }

  .results-table-wrap table {
    min-width: 720px;
  }

  .weekly-results-section .desktop-results-table,
  .all-results-section .desktop-results-table {
    display: none;
  }

  .weekly-results-section .mobile-result-cards,
  .all-results-section .mobile-result-cards {
    display: grid;
    gap: 8px;
  }

  .mobile-result-card {
    display: grid;
    grid-template-columns: minmax(52px, auto) minmax(0, 1fr) auto;
    gap: 6px 10px;
    align-items: center;
    width: 100%;
    min-height: 68px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--ink);
    text-align: left;
  }

  .mobile-result-card:focus-visible {
    border-color: rgba(249, 115, 22, 0.72);
    outline: 2px solid rgba(249, 115, 22, 0.32);
    outline-offset: 2px;
  }

  .mobile-result-place {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 950;
  }

  .mobile-result-rider {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .mobile-result-rider strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-result-rider span,
  .mobile-result-meta,
  .mobile-result-points {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .mobile-result-time {
    justify-self: end;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 950;
  }

  .mobile-result-meta {
    grid-column: 2 / 4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-result-points {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    justify-self: center;
    color: var(--orange);
  }

  .mobile-result-empty {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-weight: 800;
  }

  .leaderboard-table table,
  .standings-card table {
    min-width: 540px;
  }

  .course-page .results-table-wrap table {
    min-width: 860px;
  }

  .weekly-results-section table {
    min-width: 720px;
  }

  table {
    font-size: 0.82rem;
  }

  th,
  td {
    padding: 8px 9px;
  }

  th {
    font-size: 0.68rem;
    line-height: 1.12;
  }

  .sort-header-button {
    gap: 4px;
  }

  .week-value,
  .course-value,
  .age-group-badge,
  .gender-badge {
    min-height: 23px;
    padding: 4px 7px;
    font-size: 0.7rem;
  }

  .course-place-pill {
    min-width: 38px;
    min-height: 24px;
    padding: 3px 8px;
    font-size: 0.72rem;
  }

  .weekly-prize-icon,
  .weekly-status-symbol {
    width: 22px;
    height: 22px;
  }

  .table-link,
  .rider-name-link {
    font-size: inherit;
  }

  .table-cell-detail,
  .table-head-detail {
    font-size: 0.68rem;
  }

  .compact-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .leader-age-winners,
  .point-play-scoreboard {
    grid-template-columns: 1fr;
  }

  .leader-age-header {
    display: none;
  }

  .leader-gender {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
  }

  .point-play-scoreboard-single {
    grid-template-columns: minmax(0, 1fr);
  }

  .bar-legend,
  .stats-course-legend,
  .compare-legend {
    justify-content: flex-start;
  }

  .stats-heatmap {
    grid-template-columns: minmax(104px, 140px) repeat(var(--week-count), minmax(34px, 1fr));
    padding: 12px;
  }

  .compare-rider-card strong,
  .point-play-title strong {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .compare-controls {
    grid-template-columns: 1fr;
  }

  .course-button-grid button {
    min-height: 52px;
  }

  .course-button-grid button strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.12;
  }

  .rail-nav a {
    font-size: 0.9rem;
  }

  .event-hero,
  .event-hero.home-hero,
  .event-hero.compact-hero,
  .course-map-panel,
  .profile-hero,
  .empty-state {
    padding: 16px 12px;
  }

  .profile-compare-bar,
  .season-link-bar {
    margin-right: 10px;
    margin-left: 10px;
  }

  .leaderboard-pagination,
  .racer-pagination {
    flex-wrap: wrap;
  }

  .leaderboard-pagination span,
  .racer-pagination span {
    order: -1;
    width: 100%;
  }

  .all-results-pagination span {
    order: 0;
    width: auto;
  }

  .point-play-scoreboard {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .event-hero,
  .search-panel,
  .profile-panel {
    animation: premium-surface-in 520ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
  }

  .profile-panel > *,
  .home-layout > *,
  .content-grid > *,
  .stat-row > * {
    animation: premium-content-in 560ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
  }

  .home-layout > *:nth-child(2),
  .content-grid > *:nth-child(2),
  .stat-row > *:nth-child(2) {
    animation-delay: 45ms;
  }

  .home-layout > *:nth-child(3),
  .content-grid > *:nth-child(3),
  .stat-row > *:nth-child(3) {
    animation-delay: 90ms;
  }

  .home-layout > *:nth-child(4),
  .content-grid > *:nth-child(4),
  .stat-row > *:nth-child(4) {
    animation-delay: 135ms;
  }

  .stat-card,
  .mini-stat,
  .leader-card,
  .admin-refresh-button,
  .compact-row,
  .course-time-card,
  .leaderboard-pagination button,
  .segmented-control button,
  .racer-button,
  .compare-rider-card {
    transition:
      border-color 180ms ease,
      background-color 180ms ease,
      box-shadow 180ms ease,
      transform 180ms ease;
  }

  .stat-card:hover,
  .mini-stat:hover,
  .leader-card:hover,
  .admin-refresh-button:hover,
  .compact-row:hover,
  .course-time-card:hover,
  .compare-rider-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow:
      0 18px 36px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .number-tick {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    animation: number-pop 520ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
  }

  .chart line,
  .chart text {
    animation: chart-detail-in 480ms ease both;
  }

  .chart-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: chart-line-draw 920ms cubic-bezier(0.33, 1, 0.68, 1) 90ms both;
  }

  .chart-line-secondary {
    animation-delay: 180ms;
  }

  .chart-area {
    transform-box: fill-box;
    transform-origin: bottom center;
    animation: chart-area-in 760ms cubic-bezier(0.2, 0.75, 0.2, 1) 120ms both;
  }

  .chart circle:not(.chart-point-halo) {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: chart-point-in 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 360ms both;
  }

.chart-pill {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: chart-pill-in 420ms cubic-bezier(0.2, 0.75, 0.2, 1) 520ms both;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.68));
  isolation: isolate;
}

.chart-pill-underlay {
  opacity: 1;
}

  .chart-point-tooltip {
    opacity: 0;
    animation: none;
  }

  .compare-chart .compare-point circle:not(.chart-point-halo) {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .cumulative-point:hover .chart-point-tooltip,
  .cumulative-point:focus-visible .chart-point-tooltip {
    opacity: 1;
  }

  .bar-fill {
    transform: scaleX(0);
    transform-origin: left center;
    animation: bar-fill-in 620ms cubic-bezier(0.2, 0.75, 0.2, 1) var(--bar-delay, 0ms) both;
  }

  .loader-spinner {
    animation: loader-spin 880ms linear infinite;
  }
}

@keyframes premium-surface-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes premium-content-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes number-pop {
  0% {
    opacity: 0.66;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chart-detail-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes chart-line-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes chart-area-in {
  from {
    opacity: 0;
    transform: scaleY(0.82);
  }
  to {
    opacity: 0.92;
    transform: scaleY(1);
  }
}

@keyframes chart-point-in {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes chart-pill-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bar-fill-in {
  to {
    transform: scaleX(1);
  }
}

@keyframes loader-spin {
  to {
    transform: rotate(1turn);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
