.race-page {
  background: #f6f8fc;
}

.race-hero {
  position: relative;
  overflow: hidden;
  padding: 94px 0 105px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(135deg, #071b54, var(--navy) 62%, #154fd2);
  background-size: 48px 48px, 48px 48px, auto;
}

.race-hero::before {
  content: '10K';
  position: absolute;
  right: -1vw;
  bottom: -45px;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,.1);
  font-family: var(--font-display);
  font-size: clamp(15rem, 28vw, 29rem);
  font-weight: 900;
  line-height: .7;
}

.race-hero::after {
  content: '';
  position: absolute;
  right: 8%;
  top: 0;
  width: 150px;
  height: 100%;
  background: linear-gradient(105deg, transparent 42%, rgba(255,201,40,.85) 43% 48%, transparent 49% 58%, rgba(240,24,32,.8) 59% 64%, transparent 65%);
  opacity: .7;
}

.race-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 8vw;
  align-items: end;
}

.race-eyebrow,
.pre-race-heading > span,
.race-detail-heading > span {
  color: var(--yellow);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .17em;
}

.race-hero h1 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(5rem, 10vw, 10rem);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .72;
}

.race-hero h1 em { color: var(--yellow); font-style: normal; }

.race-hero-copy > p {
  max-width: 500px;
  color: rgba(255,255,255,.78);
  font-size: 1rem;
  line-height: 1.65;
}

.race-quick-facts {
  display: flex;
  margin-top: 30px;
  border-top: 1px solid rgba(255,255,255,.25);
}

.race-quick-facts span {
  min-width: 145px;
  padding: 18px 24px 0 0;
}

.race-quick-facts small {
  display: block;
  margin-bottom: 7px;
  color: rgba(255,255,255,.55);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .13em;
}

.race-quick-facts strong { font-size: .82rem; }

.race-tabs {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: .72fr 1.05fr 1.75fr 1.1fr .95fr;
  margin-top: -27px;
  background: var(--white);
  border: 1px solid #dfe4ef;
  box-shadow: 0 15px 35px rgba(18,32,72,.12);
}

.race-tabs a,
.race-tabs > span {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-right: 1px solid #dfe4ef;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-align: center;
  transition: color .25s, background .25s, transform .25s var(--ease-out);
}

.race-tabs > span {
  flex-direction: column;
  gap: 4px;
}

.race-tabs > span small {
  color: #a1a6b0;
  font-size: .46rem;
  letter-spacing: .08em;
}

.race-tabs > :last-child { border-right: 0; }
.race-tabs a:hover { z-index: 1; color: var(--navy); background: #edf3ff; transform: translateY(-3px); }
.race-tabs > span { color: #6f7581; cursor: not-allowed; }

.race-tabs .is-active {
  color: var(--white);
  background: var(--navy);
}

.race-tabs .is-active::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  background: var(--accent);
}

.route-availability {
  display: grid;
  grid-template-columns: .65fr 1.35fr .8fr;
  gap: 32px;
  align-items: center;
  margin-top: 26px;
  padding: 22px 26px;
  background: var(--white);
  border: 1px solid #dfe4ef;
  border-left: 6px solid var(--yellow);
}

.route-status {
  display: grid;
  grid-template-columns: 10px 1fr;
  column-gap: 10px;
  align-items: center;
}

.route-status > span {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  background: #29b35b;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(41,179,91,.12);
}

.route-status small,
.route-docs small {
  color: #8b909b;
  font-size: .5rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.route-status strong { margin-top: 4px; color: var(--navy); font-size: .82rem; }
.route-availability > p { margin: 0; color: #5f6674; font-size: .76rem; line-height: 1.6; }

.route-docs {
  display: grid;
  gap: 7px;
  padding-left: 24px;
  border-left: 1px solid #dfe4ef;
}

.route-docs a {
  width: fit-content;
  color: var(--navy);
  font-size: .66rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(7,91,232,.3);
}

.route-docs a:hover { color: var(--accent); border-color: var(--accent); }

.pre-race {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 8vw;
  padding-top: 115px;
  padding-bottom: 115px;
}

.pre-race-heading > span,
.race-detail-heading > span { color: var(--accent); }

.pre-race h2,
.race-detail-heading h2 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6.4vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .82;
}

.pre-race h2 em,
.race-detail-heading h2 em { color: var(--navy); font-style: normal; }

.pre-race-list { border-top: 3px solid var(--navy); }

.pre-race-list article {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 18px;
  padding: 25px 0;
  border-bottom: 1px solid rgba(7,91,232,.18);
  transition: padding .3s var(--ease-out), background .3s;
}

.pre-race-list article:hover { padding-inline: 15px; background: rgba(7,91,232,.045); }
.pre-race-list b { color: var(--accent); font-size: .65rem; }
.pre-race-list h3 { margin: 0 0 7px; font-size: 1rem; }
.pre-race-list p { margin: 0; color: #666d7a; font-size: .82rem; line-height: 1.6; }

.race-detail {
  padding: 100px 0 130px;
  background: var(--white);
}

.race-detail-heading {
  display: grid;
  grid-template-columns: .42fr 1.58fr;
  gap: 30px;
  align-items: start;
  margin-bottom: 55px;
}

.race-detail-heading h2 { margin-top: 0; }
.race-detail-heading p { max-width: 500px; color: #697080; line-height: 1.6; }

.route-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 610px;
  border: 1px solid #dbe0eb;
  box-shadow: 0 20px 60px rgba(24,39,76,.09);
}

.route-map {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #e9edee;
  border-right: 1px solid #dbe0eb;
}

.route-map-art {
  width: 100%;
  height: 100%;
  min-height: 610px;
  object-fit: cover;
}

.map-title {
  position: absolute;
  top: 24px;
  left: 24px;
  display: grid;
  padding: 14px 20px;
  color: var(--white);
  background: #142656;
  border-left: 7px solid var(--accent);
  box-shadow: 0 8px 24px rgba(17,24,39,.18);
}

.map-title span { font-size: .57rem; font-weight: 800; letter-spacing: .12em; }
.map-title strong { font-family: var(--font-display); font-size: 3rem; line-height: .85; }

.map-pin {
  position: absolute;
  padding: 8px 12px;
  color: var(--white);
  border: 4px solid var(--white);
  box-shadow: 0 5px 12px rgba(17,24,39,.18);
  font-size: .57rem;
  font-weight: 900;
}

.map-start { bottom: 13%; left: 37%; background: var(--navy); }
.map-finish { bottom: 18%; left: 16%; background: var(--accent); }

.map-status {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 8px 25px rgba(17,24,39,.12);
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.map-status strong { color: var(--navy); font-size: 1rem; }

.race-info { background: var(--white); }

.race-info > h2 {
  margin: 0;
  padding: 25px 30px;
  background: #f4f6fa;
  border-left: 7px solid var(--accent);
  font-size: 1.2rem;
}

.race-info dl { margin: 0; padding: 12px 30px 0; }

.race-info dl > div {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 20px;
  padding: 19px 0;
  border-bottom: 1px solid #dfe4ee;
  font-size: .8rem;
}

.race-info dt { font-weight: 800; }
.race-info dd { margin: 0; color: #54617d; text-align: right; }

.gpx-button {
  display: flex;
  min-width: 190px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 34px auto 15px;
  padding: 14px 18px;
  color: #8d929c;
  background: #f2f3f5;
  border: 2px solid #c9cdd5;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  cursor: pointer;
  text-decoration: none;
}

.gpx-button span { color: var(--accent); font-size: .56rem; }
.gpx-note { padding-inline: 30px; color: var(--navy); font-size: .69rem; line-height: 1.55; text-align: center; }

.race-notice {
  margin: 35px 30px 0;
  padding: 18px 20px;
  background: #fff8db;
  border-left: 5px solid var(--yellow);
}

.race-notice strong { font-size: .6rem; letter-spacing: .12em; }
.race-notice p { margin: 8px 0 0; color: #65615a; font-size: .7rem; line-height: 1.5; }

@media (max-width: 900px) {
  .race-hero-inner,
  .pre-race,
  .race-detail-heading,
  .route-layout { grid-template-columns: 1fr; }

  .race-hero { padding: 75px 0 85px; }
  .race-hero-inner { gap: 45px; }
  .race-tabs { display: flex; overflow-x: auto; }
  .race-tabs > * { min-width: 145px; }
  .race-tabs > :nth-child(3) { min-width: 220px; }
  .route-availability { grid-template-columns: 1fr; gap: 18px; }
  .route-docs { padding: 18px 0 0; border-top: 1px solid #dfe4ef; border-left: 0; }
  .pre-race { gap: 45px; padding-block: 80px; }
  .race-detail { padding-block: 80px; }
  .route-map { border-right: 0; border-bottom: 1px solid #dbe0eb; }
  .route-map-art { height: 560px; min-height: 0; }
  .race-info { min-height: 580px; }
}

@media (max-width: 520px) {
  .race-hero h1 { font-size: 4.8rem; }
  .race-quick-facts { flex-direction: column; }
  .race-quick-facts span + span { margin-top: 12px; }
  .pre-race h2,
  .race-detail-heading h2 { font-size: 3.7rem; }
  .route-layout { width: calc(100% - 24px); }
  .route-map-art { height: 480px; }
  .map-title { top: 15px; left: 15px; }
  .map-status { right: 12px; bottom: 12px; left: 12px; padding: 15px; }
  .map-pin { transform: scale(.85); }
  .race-info dl { padding-inline: 20px; }
  .race-info dl > div { grid-template-columns: 1fr; gap: 7px; }
  .race-info dd { text-align: left; }
  .race-notice { margin-inline: 20px; }
}
