:root {
  --turquoise: #18afc8;
  --turquoise-2: #01c6de;
  --navy: #101f3a;
  --navy-2: #162a4a;
  --ink: #15243b;
  --muted: #5f738f;
  --line: rgba(22, 54, 92, 0.16);
  --glass: rgba(255, 255, 255, 0.86);
  --shadow-lg: 0 20px 48px rgba(10, 27, 52, 0.16);
  --shadow-md: 0 10px 24px rgba(10, 27, 52, 0.11);

  --sprint: #20b15a;
  --treasure: #1e72d8;
  --mountain: #e13a52;
  --finish: #1f2a39;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
  background:
    radial-gradient(circle at 8% 12%, rgba(0, 203, 230, 0.17), transparent 38%),
    radial-gradient(circle at 92% 8%, rgba(24, 175, 200, 0.2), transparent 40%),
    linear-gradient(160deg, #e7f5fc 0%, #f2f7fc 48%, #eef3fa 100%);
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: radial-gradient(#11253f 0.5px, transparent 0.5px);
  background-size: 6px 6px;
}

.page-wrap {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.1rem 0 2rem;
  position: relative;
  z-index: 1;
}

.card-glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.hero-card {
  border-radius: 24px;
  padding: 0.84rem;
  color: #f8fdff;
  background:
    linear-gradient(132deg, #102544 0%, #13355c 52%, #1689a7 100%);
  border: 1px solid rgba(160, 221, 250, 0.24);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      128deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 12px,
      transparent 14px,
      transparent 28px
    );
  pointer-events: none;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -130px;
  top: -130px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 66%);
  pointer-events: none;
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: stretch;
  gap: 0.62rem;
  position: relative;
  z-index: 1;
}

.hero-brand-stack {
  display: grid;
  align-content: start;
  gap: 0.38rem;
  padding: 0.46rem;
  border-radius: 14px;
  border: 1px solid rgba(154, 221, 248, 0.2);
  background: linear-gradient(180deg, rgba(8, 28, 52, 0.28) 0%, rgba(12, 41, 71, 0.16) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-mini-label {
  display: none;
}

.hero-logo-plate {
  border-radius: 10px;
  border: 1px solid rgba(182, 218, 243, 0.45);
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(8, 23, 40, 0.18);
}

.cb-plate {
  min-height: 46px;
  padding: 0.3rem 0.44rem;
}

.tot-plate {
  min-height: 80px;
  padding: 0.34rem 0.44rem;
}

.cb-logo {
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
}

.tot-logo {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(10, 23, 41, 0.16));
}

.bikepedia-slot {
  margin-top: 0;
  width: 92px;
  min-height: 92px;
  border: 1px solid rgba(255, 213, 72, 0.56);
  border-radius: 12px;
  padding: 0.32rem;
  display: flex;
  flex-direction: row;
  gap: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, rgba(4, 17, 32, 0.72), rgba(8, 28, 50, 0.55));
  color: #edf7ff;
  box-shadow: 0 6px 14px rgba(8, 17, 31, 0.26);
}

.bikepedia-label {
  display: none;
}

.bikepedia-slot img {
  max-height: 62px;
  max-width: 62px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.32));
}

.bikepedia-slot.empty img {
  display: none;
}

.bikepedia-fallback {
  font-size: 0.7rem;
  color: #d8f4ff;
}

.bikepedia-slot:not(.empty) .bikepedia-fallback {
  display: none;
}

.hero-main {
  margin-top: 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(154, 222, 250, 0.2);
  background: linear-gradient(180deg, rgba(8, 29, 51, 0.3), rgba(12, 42, 70, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  padding: 0.58rem 0.68rem;
  position: relative;
  z-index: 1;
}

.hero-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(162, 224, 251, 0.36);
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #bdefff;
  background: rgba(8, 38, 65, 0.44);
}

.hero-main h1 {
  margin: 0.34rem 0 0.32rem;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.46rem, 3.5vw, 2.18rem);
  line-height: 0.96;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.hero-lede {
  margin: 0;
  line-height: 1.34;
  color: #dcedfc;
  max-width: 880px;
  font-size: 0.8rem;
}

.hero-badges {
  display: none;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(172, 225, 250, 0.52);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(8, 37, 63, 0.45);
  color: #d9f4ff;
}

.hero-metrics {
  margin-top: 0.56rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.hero-metrics article {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(188, 228, 250, 0.32);
  border-radius: 11px;
  padding: 0.45rem 0.54rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-metrics p {
  margin: 0;
  font-size: 0.61rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #bfe0f0;
  font-weight: 700;
}

.hero-metrics h3 {
  margin: 0.14rem 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f6fdff;
}

.race-panel,
.teams-panel {
  margin-top: 0.9rem;
  padding: 0.95rem;
}

.panel-head {
  display: grid;
  grid-template-columns: repeat(3, max-content) auto;
  align-items: end;
  gap: 0.75rem;
}

.label {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.value {
  margin: 0.16rem 0 0;
  font-size: 0.97rem;
  font-weight: 700;
}

.panel-head > button {
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(130deg, var(--navy), var(--turquoise));
  box-shadow: var(--shadow-md);
  justify-self: end;
}

.panel-head > button:hover {
  transform: translateY(-1px);
}

.status {
  min-height: 1.3rem;
  margin: 0.7rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.stage-help {
  margin: -0.15rem 0 0.62rem;
  color: #597594;
  font-size: 0.79rem;
  font-weight: 600;
}

.stage-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.58rem;
}

.stage-btn {
  border: 1px solid #c0d8ec;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fd 54%, #eaf3fc 100%);
  padding: 0.62rem 0.64rem;
  text-align: left;
  color: #102b46;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 106px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.22rem;
  box-shadow: 0 4px 12px rgba(10, 28, 49, 0.08);
  position: relative;
  overflow: hidden;
}

.stage-btn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, #7cb8ea, #23c7df);
  opacity: 0.85;
}

.stage-btn:hover {
  border-color: #8dbce3;
  box-shadow: 0 8px 20px rgba(12, 38, 66, 0.14);
  transform: translateY(-2px);
}

.stage-btn.active {
  background: linear-gradient(140deg, #0f2a4a 8%, #133f68 52%, #15a6c3 100%);
  color: #ffffff;
  border-color: #0f385f;
  box-shadow: var(--shadow-md);
}

.stage-btn .n {
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1.08;
  color: #112e4c;
}

.stage-btn .r {
  display: block;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.2;
  min-height: 2.2em;
  color: #244869;
}

.stage-btn .meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
}

.stage-btn .d,
.stage-btn .k {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  color: #3c5f84;
}

.stage-btn .c {
  display: flex;
  gap: 0.22rem;
  flex-wrap: wrap;
  font-size: 0.65rem;
  font-weight: 700;
  color: #234667;
}

.stage-btn .chip {
  border: 1px solid #d4e4f3;
  background: #eff6ff;
  border-radius: 999px;
  padding: 0.09rem 0.33rem;
  white-space: nowrap;
}

.stage-btn .chip.s {
  color: #0e6c35;
  background: #e2f8eb;
  border-color: #cdeeda;
}

.stage-btn .chip.m {
  color: #9f1833;
  background: #ffe8ee;
  border-color: #ffd3df;
}

.stage-btn .chip.t {
  color: #194f9d;
  background: #e7efff;
  border-color: #d7e4ff;
}

.stage-btn .chip.f {
  color: #2a3547;
  background: #ebeff5;
  border-color: #dbe3ee;
}

.stage-btn.active::before {
  background: linear-gradient(90deg, #6ed4e7, #ffffff, #8de8f3);
}

.stage-btn.active .n,
.stage-btn.active .r {
  color: #ffffff;
}

.stage-btn.active .d,
.stage-btn.active .k,
.stage-btn.active .c {
  color: #e6f9ff;
}

.stage-btn.active .chip {
  color: #e7f9ff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.35);
}

.stage-detail {
  margin-top: 0.72rem;
  border: 1px solid #dae7f4;
  border-radius: 18px;
  background: #fff;
  padding: 0.85rem;
}

.stage-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
}

.stage-kicker {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.stage-title-row h2 {
  margin: 0.3rem 0 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.stage-meta-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.38rem;
}

.meta-chip {
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.73rem;
  font-weight: 700;
  background: #edf5ff;
  color: #24405d;
  border: 1px solid #d8e7f7;
}

.meta-chip.sprint {
  color: #106937;
  background: #ddf8e8;
  border-color: #c8efd7;
}

.meta-chip.mountain {
  color: #9f1833;
  background: #ffe4eb;
  border-color: #ffd0dd;
}

.meta-chip.treasure {
  color: #1c4f9a;
  background: #e5efff;
  border-color: #d5e5ff;
}

.track-wrap {
  margin-top: 0.75rem;
  border-radius: 16px;
  border: 1px solid #194a75;
  background:
    radial-gradient(circle at 16% 16%, rgba(81, 238, 255, 0.2), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(66, 125, 236, 0.16), transparent 44%),
    linear-gradient(145deg, #0f2849 0%, #12365f 42%, #0f2542 100%);
  padding: 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.track {
  position: relative;
  height: 168px;
  border-radius: 14px;
  border: 1px solid rgba(184, 214, 242, 0.2);
  background:
    repeating-linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 12px,
      rgba(255, 255, 255, 0.02) 12px,
      rgba(255, 255, 255, 0.02) 24px
    ),
    linear-gradient(180deg, rgba(10, 22, 40, 0.55), rgba(14, 36, 60, 0.28));
  overflow: hidden;
}

.track-line {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  top: 84px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1c4e7f 0%, #2084b6 52%, #2db6d0 100%);
  box-shadow: inset 0 2px 5px rgba(8, 19, 35, 0.34), 0 6px 18px rgba(3, 12, 25, 0.4);
}

.track-line::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  border-top: 2px dashed rgba(232, 248, 255, 0.7);
}

.track-label {
  position: absolute;
  top: 114px;
  font-size: 0.67rem;
  font-weight: 700;
  color: #e5f8ff;
  background: rgba(17, 47, 80, 0.85);
  border: 1px solid rgba(153, 208, 236, 0.55);
  border-radius: 999px;
  padding: 0.16rem 0.42rem;
}

.track-label.start { left: 0.9rem; }
.track-label.finish { right: 0.9rem; }

.marker {
  position: absolute;
  top: 78px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  transform: translateX(-50%);
  box-shadow: 0 7px 16px rgba(7, 18, 34, 0.42);
}

.marker::before {
  content: attr(data-type);
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
  color: #eefaff;
  background: rgba(14, 43, 73, 0.92);
  border: 1px solid rgba(150, 204, 234, 0.6);
  border-radius: 999px;
  padding: 0.09rem 0.34rem;
}

.marker::after {
  content: attr(data-km);
  position: absolute;
  top: 23px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
  color: #d5eefe;
  letter-spacing: 0.01em;
}

.marker.sprint { background: var(--sprint); }
.marker.treasure { background: var(--treasure); }
.marker.mountain { background: var(--mountain); }
.marker.finish { background: var(--finish); }
.marker.other { background: #66788c; }

.track-legend {
  margin-top: 0.68rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.75rem;
  color: #d3ecfc;
}

.track-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.dot.sprint { background: var(--sprint); }
.dot.treasure { background: var(--treasure); }
.dot.mountain { background: var(--mountain); }
.dot.finish { background: var(--finish); }

.event-list {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.5rem;
}

.event-list li {
  border: 1px solid #d7e7f6;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfeff 0%, #f6faff 100%);
  padding: 0.58rem 0.64rem;
  box-shadow: 0 2px 10px rgba(12, 31, 56, 0.04);
}

.event-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.event-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #183554;
}

.event-meta {
  margin-top: 0.2rem;
  color: #60748f;
  font-size: 0.74rem;
}

.event-km {
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  background: #eaf3ff;
  color: #2b4c70;
  border: 1px solid #d3e4f7;
  white-space: nowrap;
}

.event-type {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.16rem 0.46rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.event-type.sprint {
  color: #0e6c35;
  background: #dff8e9;
  border-color: #caefd9;
}

.event-type.treasure {
  color: #1a4f9b;
  background: #e7efff;
  border-color: #d8e4ff;
}

.event-type.mountain {
  color: #a01534;
  background: #ffe8ee;
  border-color: #ffd4e0;
}

.event-type.finish {
  color: #283243;
  background: #ebeff5;
  border-color: #dbe2ec;
}

.event-type.other {
  color: #425972;
  background: #eef3f9;
  border-color: #dde7f1;
}

.teams-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
}

.teams-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.teams-head p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.teams-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px;
  gap: 0.5rem;
}

input,
select {
  border: 1px solid #d6e4f2;
  background: #fff;
  border-radius: 12px;
  padding: 0.65rem 0.78rem;
  font: inherit;
  color: var(--ink);
}

.teams-grid {
  margin-top: 0.78rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(318px, 1fr));
  gap: 0.55rem;
}

.team-card {
  border: 1px solid #dbe8f6;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(12, 34, 59, 0.03);
}

.team-card:hover {
  border-color: #c8ddef;
}

.team-card.expanded {
  box-shadow: var(--shadow-md);
}

.team-head {
  padding: 0.62rem 0.68rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.team-head-left {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  min-width: 0;
}

.jersey {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 9px;
  border: 1px solid #e1ecf8;
  background: #fff;
  flex: 0 0 auto;
}

.team-name {
  margin: 0;
  font-size: 0.95rem;
}

.team-meta {
  margin: 0.16rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.team-count {
  border: 1px solid #d9e8f6;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #2b4869;
  background: #eff6ff;
}

.rider-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #edf3fb;
}

.rider-list li {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-top: 1px solid #f2f6fb;
}

.rider-list li:first-child {
  border-top: none;
}

.rider-list li.extra {
  display: none;
}

.team-card.expanded .rider-list li.extra {
  display: grid;
}

.team-toggle {
  width: calc(100% - 1.2rem);
  margin: 0.15rem 0.6rem 0.6rem;
  border: 1px solid #d4e4f5;
  background: #f3f8fe;
  color: #204364;
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.team-toggle:hover {
  background: #e9f3fd;
  transform: none;
}

.r-no {
  font-size: 0.76rem;
  font-weight: 700;
  color: #4d6481;
}

.r-name {
  font-size: 0.84rem;
}

.r-nat {
  font-size: 0.73rem;
  color: #64809f;
}

@media (max-width: 1080px) {
  .hero-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero-main {
    padding: 0.56rem 0.64rem;
  }

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

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

  .panel-head > button {
    justify-self: start;
  }

  .stage-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .teams-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .page-wrap {
    width: min(100%, calc(100% - 0.85rem));
    padding-top: 0.55rem;
  }

  .hero-card,
  .race-panel,
  .teams-panel {
    border-radius: 18px;
    padding: 0.64rem;
  }

  .hero-top {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.42rem;
  }

  .hero-brand-stack {
    width: auto;
    padding: 0.34rem;
    border-radius: 12px;
  }

  .cb-plate {
    min-height: 36px;
    padding: 0.22rem 0.32rem;
  }

  .tot-plate {
    min-height: 60px;
    padding: 0.25rem 0.34rem;
  }

  .hero-main {
    margin-top: 0.42rem;
    padding: 0.45rem 0.52rem;
    border-radius: 12px;
  }

  .hero-kicker {
    font-size: 0.5rem;
    padding: 0.11rem 0.36rem;
  }

  .bikepedia-slot {
    width: 72px;
    min-height: 72px;
    margin-top: 0;
    padding: 0.2rem;
    border-radius: 10px;
  }

  .bikepedia-slot img {
    max-height: 44px;
    max-width: 44px;
  }

  .hero-main h1 {
    font-size: clamp(1.25rem, 6.6vw, 1.66rem);
    margin-top: 0.24rem;
    margin-bottom: 0.2rem;
  }

  .hero-lede {
    font-size: 0.73rem;
    line-height: 1.3;
  }

  .hero-metrics {
    margin-top: 0.42rem;
    gap: 0.34rem;
  }

  .hero-metrics article {
    padding: 0.36rem 0.44rem;
    border-radius: 9px;
  }

  .hero-metrics p {
    font-size: 0.56rem;
  }

  .hero-metrics h3 {
    font-size: 0.9rem;
  }

  .panel-head {
    grid-template-columns: 1fr;
    gap: 0.44rem;
  }

  .panel-head > div {
    padding: 0.5rem 0.62rem;
    border: 1px solid #d9e8f6;
    border-radius: 12px;
    background: #fdfefe;
  }

  .panel-head > button {
    width: 100%;
    justify-self: stretch;
    min-height: 44px;
  }

  .status {
    margin-top: 0.5rem;
    margin-bottom: 0.45rem;
    font-size: 0.84rem;
  }

  .stage-help {
    font-size: 0.74rem;
    margin-bottom: 0.5rem;
  }

  .event-list,
  .teams-grid {
    grid-template-columns: 1fr;
  }

  .stage-nav {
    display: flex;
    gap: 0.52rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.12rem 0.05rem 0.5rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .stage-nav::-webkit-scrollbar {
    height: 6px;
  }

  .stage-nav::-webkit-scrollbar-thumb {
    background: #bed9ee;
    border-radius: 999px;
  }

  .stage-btn {
    flex: 0 0 84%;
    min-width: 84%;
    min-height: 98px;
    scroll-snap-align: start;
  }

  .stage-btn .r {
    min-height: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .stage-detail {
    border-radius: 16px;
    padding: 0.72rem;
  }

  .stage-title-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .stage-title-row h2 {
    font-size: clamp(1.16rem, 5.6vw, 1.45rem);
  }

  .stage-meta-badges {
    justify-content: flex-start;
    gap: 0.34rem;
  }

  .meta-chip {
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
  }

  .track-wrap {
    padding: 0.64rem;
  }

  .track {
    height: 152px;
  }

  .track-line {
    top: 70px;
    left: 0.55rem;
    right: 0.55rem;
    height: 12px;
  }

  .marker {
    top: 66px;
    width: 15px;
    height: 15px;
  }

  .marker::before,
  .marker::after {
    display: none;
  }

  .track-label {
    top: 91px;
    font-size: 0.6rem;
    padding: 0.14rem 0.35rem;
  }

  .track-label.start {
    left: 0.5rem;
  }

  .track-label.finish {
    right: 0.5rem;
  }

  .track-legend {
    margin-top: 0.55rem;
    gap: 0.45rem;
    font-size: 0.66rem;
  }

  .event-list {
    margin-top: 0.65rem;
  }

  .event-list li {
    padding: 0.56rem 0.58rem;
  }

  .event-title {
    font-size: 0.8rem;
  }

  .event-meta {
    font-size: 0.7rem;
  }

  .event-km {
    font-size: 0.64rem;
  }

  .teams-head h3 {
    font-size: 1.06rem;
  }

  .teams-head p {
    font-size: 0.81rem;
    margin-top: 0.2rem;
  }

  input,
  select {
    min-height: 44px;
  }

  .teams-grid {
    gap: 0.45rem;
  }

  .team-card {
    border-radius: 12px;
  }

  .team-head {
    padding: 0.55rem 0.58rem;
  }

  .jersey {
    width: 40px;
    height: 40px;
  }

  .team-count {
    font-size: 0.65rem;
  }

  .rider-list li {
    grid-template-columns: 2.6rem minmax(0, 1fr);
    padding: 0.44rem 0.58rem;
    row-gap: 0.06rem;
  }

  .r-nat {
    grid-column: 2;
    font-size: 0.68rem;
  }

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

@media (max-width: 420px) {
  .stage-btn {
    flex-basis: 90%;
    min-width: 90%;
  }
}

/* Premium layout refresh */
.hero-card {
  padding: 0.74rem;
}

.hero-top {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.54rem;
}

.hero-brand-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.42rem;
  padding: 0.44rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(5, 25, 45, 0.44), rgba(7, 33, 57, 0.24));
  border: 1px solid rgba(167, 220, 246, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 20px rgba(8, 24, 42, 0.22);
}

.hero-mini-label {
  display: block;
  grid-column: 1 / -1;
  margin: 0 0 0.08rem;
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #9bdcf8;
  opacity: 0.94;
}

.hero-logo-plate {
  border-radius: 10px;
  border: 1px solid rgba(183, 221, 245, 0.64);
  background: linear-gradient(180deg, #ffffff 0%, #edf6ff 100%);
}

.cb-plate,
.tot-plate {
  min-height: 66px;
  padding: 0.34rem 0.38rem;
}

.cb-logo {
  max-width: 340px;
}

.tot-logo {
  max-width: 310px;
}

.bikepedia-slot {
  width: 74px;
  min-height: 74px;
  border-radius: 12px;
  border: 1px solid rgba(255, 216, 84, 0.72);
  background: linear-gradient(165deg, rgba(6, 19, 36, 0.86), rgba(10, 35, 60, 0.7));
  box-shadow: 0 12px 22px rgba(5, 16, 30, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bikepedia-slot img {
  max-width: 50px;
  max-height: 50px;
}

.hero-main {
  margin-top: 0.48rem;
  padding: 0.62rem 0.7rem;
}

.hero-kicker {
  color: #cff5ff;
}

.hero-main h1 {
  letter-spacing: 0.015em;
}

.hero-lede {
  max-width: 860px;
}

.hero-metrics {
  margin-top: 0.52rem;
}

.quick-menu {
  margin-top: 0.66rem;
  padding: 0.38rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  position: sticky;
  top: 0.42rem;
  z-index: 8;
}

.quick-menu a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 11px;
  border: 1px solid #ccdeef;
  background: linear-gradient(180deg, #fefefe 0%, #edf4fc 100%);
  color: #173c60;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(11, 30, 53, 0.08);
}

.quick-menu a:hover {
  border-color: #84bddf;
  color: #0f2c47;
  transform: translateY(-1px);
}

.jerseys-panel {
  margin-top: 0.9rem;
  padding: 0.95rem;
}

.jerseys-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.7rem;
}

.jerseys-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.jerseys-head p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.jersey-source {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #3f6185;
  background: #eff5fc;
  border: 1px solid #d2e2f2;
  border-radius: 999px;
  padding: 0.3rem 0.58rem;
  white-space: nowrap;
}

.jersey-grid {
  margin-top: 0.74rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 0.55rem;
}

.jersey-card {
  border-radius: 16px;
  border: 1px solid #d5e6f6;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  padding: 0.62rem 0.66rem;
  box-shadow: 0 7px 16px rgba(8, 25, 43, 0.07);
  position: relative;
  overflow: hidden;
}

.jersey-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 16px 0 0 16px;
  background: #8eaec7;
}

.jersey-card.turquoise::before {
  background: linear-gradient(180deg, #08b7cd, #10d0e3);
}

.jersey-card.green::before {
  background: linear-gradient(180deg, #2bb867, #5fd68f);
}

.jersey-card.red::before {
  background: linear-gradient(180deg, #dc2f4c, #f06c80);
}

.jersey-card.white::before {
  background: linear-gradient(180deg, #d5dde8, #b5c4d8);
}

.jersey-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.jersey-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d6e4f2;
  background: #eef5ff;
  color: #24486b;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.52rem;
}

.jersey-code {
  font-size: 0.66rem;
  font-weight: 800;
  color: #617a97;
  letter-spacing: 0.04em;
}

.jersey-card h4 {
  margin: 0.42rem 0 0;
  font-size: 1.02rem;
  line-height: 1.2;
}

.jersey-rider {
  margin: 0.34rem 0 0;
  color: #16375a;
  font-size: 0.94rem;
  font-weight: 800;
}

.jersey-team {
  margin: 0.2rem 0 0;
  color: #5d7694;
  font-size: 0.75rem;
  min-height: 1.1em;
}

.jersey-meta {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.jersey-bib,
.jersey-value {
  border-radius: 999px;
  border: 1px solid #d2e3f3;
  padding: 0.18rem 0.5rem;
  font-size: 0.69rem;
  font-weight: 800;
  white-space: nowrap;
}

.jersey-bib {
  color: #264b71;
  background: #edf5ff;
}

.jersey-value {
  color: #31597f;
  background: #f4f8fd;
}

.jersey-note {
  margin: 0.38rem 0 0;
  color: #6f6288;
  font-size: 0.7rem;
}

.jersey-empty {
  margin: 0.35rem 0 0;
  color: #607894;
  font-size: 0.85rem;
}

@media (max-width: 1080px) {
  .hero-brand-stack {
    grid-template-columns: 1fr;
  }

  .quick-menu {
    top: 0.28rem;
  }
}

@media (max-width: 760px) {
  .hero-card {
    padding: 0.62rem;
  }

  .hero-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero-brand-stack {
    gap: 0.34rem;
    padding: 0.32rem;
    border-radius: 12px;
  }

  .hero-mini-label {
    font-size: 0.49rem;
    letter-spacing: 0.06em;
  }

  .cb-plate,
  .tot-plate {
    min-height: 48px;
    padding: 0.2rem 0.3rem;
  }

  .bikepedia-slot {
    width: 62px;
    min-height: 62px;
    border-radius: 10px;
  }

  .bikepedia-slot img {
    max-width: 40px;
    max-height: 40px;
  }

  .quick-menu {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    margin-top: 0.52rem;
    padding: 0.34rem;
    border-radius: 14px;
    position: static;
  }

  .quick-menu a {
    min-height: 44px;
    font-size: 0.79rem;
  }

  .jerseys-panel {
    padding: 0.74rem;
    border-radius: 16px;
  }

  .jerseys-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .jerseys-head h3 {
    font-size: 1.07rem;
  }

  .jerseys-head p {
    font-size: 0.8rem;
  }

  .jersey-source {
    white-space: normal;
    border-radius: 11px;
    padding: 0.42rem 0.55rem;
    font-size: 0.72rem;
  }

  .jersey-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .jersey-card {
    border-radius: 13px;
    padding: 0.56rem 0.58rem 0.58rem 0.62rem;
  }

  .jersey-card h4 {
    font-size: 0.94rem;
  }

  .jersey-rider {
    font-size: 0.84rem;
  }
}
