:root {
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
}

:root {
  --ink: #18221c;
  --paper: #f3f1e9;
  --acid: #d7ff3f;
  --moss: #3d5944;
  --line: #c9cec4;
  --white: #fff;
  --muted: #647068
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 Manrope, sans-serif
}

a {
  color: inherit
}

.skip {
  position: absolute;
  left: -999px
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--acid);
  padding: .75rem;
  z-index: 4
}

header {
  height: 72px;
  padding: 0 max(5vw, 1.25rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 241, 233, .94)
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none
}

.brand span {
  color: var(--moss)
}

nav a {
  text-decoration: none;
  font-weight: 700
}

main {
  max-width: 1180px;
  margin: auto;
  padding: 5rem max(5vw, 1.25rem)
}

h1 {
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  line-height: .92;
  letter-spacing: -.07em;
  margin: .15em 0 .35em;
  max-width: 950px
}

h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: var(--moss)
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -.04em
}

.hero {
  margin-top: 0;
  margin-bottom: 0;
  padding: 0
}

.hero>p:last-child,
.lede {
  font-size: 1.2rem;
  max-width: 650px;
  color: var(--muted)
}

.eyebrow,
.fresh,
small,
time {
  font: 500 .76rem DM Mono, monospace;
  text-transform: uppercase;
  letter-spacing: .08em
}

.eyebrow {
  color: var(--moss)
}

section {
  margin: 3rem 0 5rem
}

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

.card {
  background: var(--white);
  padding: 1.5rem;
  min-height: 180px;
  border: 1px solid var(--line);
  text-decoration: none;
  display: flex;
  flex-direction: column
}

.card h3 {
  font-size: 1.4rem
}

.card span {
  margin-top: auto;
  font-weight: 700
}

.card:hover,
.card:focus-visible {
  background: var(--acid);
  outline: 3px solid var(--ink)
}

.list {
  border-top: 1px solid var(--ink)
}

.list>a {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 1rem;
  padding: 1.2rem .25rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  align-items: center
}

.list>a:hover strong {
  text-decoration: underline
}

.list span {
  color: var(--muted)
}

.empty,
aside {
  padding: 2rem;
  background: #e4e7de;
  border-left: 5px solid var(--moss);
  max-width: 720px
}

#standings {
  margin-top: 0
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between
}

.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border-top: 3px solid var(--ink)
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px
}

th,
td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--line)
}

thead th {
  font: 500 .72rem DM Mono, monospace;
  text-transform: uppercase
}

tbody th small {
  display: block;
  color: var(--muted);
  margin-top: .25rem
}

.rank {
  font: 700 1.4rem DM Mono
}

.tag {
  font-size: .65rem;
  background: var(--acid);
  padding: .15rem
}

.scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--ink);
  color: white
}

.scores div {
  padding: 1.4rem;
  border-right: 1px solid #526159
}

.scores span {
  display: block;
  font-size: 2rem;
  font-weight: 800
}

.scores small {
  color: var(--acid)
}

details small {
  display: block
}

.fresh {
  margin-top: 4rem;
  color: var(--muted)
}

footer {
  padding: 2rem max(5vw, 1.25rem);
  background: var(--ink);
  color: white;
  display: flex;
  justify-content: space-between
}

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

:focus-visible {
  outline: 3px solid #3756d8;
  outline-offset: 3px
}

@media(max-width:650px) {
  main {
    padding-top: 3rem
  }

  .list>a {
    grid-template-columns: 1fr
  }

  .list span {
    grid-column: 1
  }

  .scores {
    grid-template-columns: 1fr 1fr
  }

  .scores div {
    border-bottom: 1px solid #526159
  }

  footer {
    display: block
  }

  footer span {
    display: block;
    margin-top: .5rem
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto !important
  }
}

.event-season-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
  margin: 1.5rem 0 2rem
}

.event-season-filter label {
  font-weight: 700
}

.event-season-filter select,
.event-season-filter button {
  min-height: 44px;
  padding: .5rem .75rem;
  border: 1px solid var(--line);
  font: inherit
}

.event-season-filter select {
  background: var(--white);
  color: var(--ink)
}

.event-season-filter button {
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  cursor: pointer
}

.event-index-list>a {
  grid-template-columns: 150px minmax(180px, 1fr) minmax(180px, 1fr)
}

@media(max-width:650px) {
  .event-index-list>a {
    grid-template-columns: 1fr
  }
}

.standings-preview,
.summary-card,
.metric-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.5rem
}

.standings-preview {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 3fr;
  gap: 2rem
}

.standings-preview h3 {
  font-size: 1.6rem;
  margin-top: .25rem
}

.leaders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .5rem
}

.leaders a {
  display: flex;
  flex-direction: column;
  padding: .75rem;
  text-decoration: none;
  border-left: 3px solid var(--acid)
}

.leaders a:hover strong {
  text-decoration: underline
}

.leaders span {
  color: var(--muted)
}

.summary-grid,
.metric-stack {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))
}

.summary-card h3 {
  margin: .25rem 0
}

.podium {
  list-style: none;
  padding: 0;
  margin: 1rem 0
}

.podium li {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: .5rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--line)
}

.podium li>span {
  font: 700 1.1rem DM Mono
}

.battle {
  background: #f3f6df;
  padding: .8rem
}

.results-panel {
  background: var(--white);
  border-top: 1px solid var(--line)
}

.results-panel>summary {
  display: flex;
  justify-content: space-between;
  padding: 1.2rem;
  cursor: pointer
}

.results-panel>summary span {
  color: var(--muted)
}

.metric-card {
  grid-column: 1/-1
}

.metric-card h3 {
  margin-top: 0
}

.metric-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) repeat(3, minmax(100px, 1fr));
  gap: 1rem;
  padding: .9rem 0;
  border-top: 1px solid var(--line);
  align-items: center
}

.privacy-note {
  display: inline-block;
  background: #e4e7de;
  padding: .5rem .8rem;
  font-size: .9rem
}

@media(max-width:650px) {
  .standings-preview {
    grid-template-columns: 1fr
  }

  .summary-grid {
    grid-template-columns: 1fr
  }

  .metric-row {
    grid-template-columns: 1fr 1fr
  }

  .results-panel>summary span {
    display: none
  }
}

body {
  font-family: var(--sans)
}

.eyebrow,
.fresh,
small,
time,
thead th,
.rank,
.podium li>span {
  font-family: var(--mono)
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem 1rem;
  min-width: 0
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px
}

nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: .3em
}

.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .75rem;
  justify-content: flex-end
}

.section-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700
}

.event-label {
  overflow-wrap: anywhere
}

.list>a strong,
.list>a span,
.metric-row>span {
  min-width: 0;
  overflow-wrap: anywhere
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: .65rem;
  letter-spacing: .08em
}

.battle {
  margin-top: 1rem
}

.battle p {
  margin: .45rem 0
}

.battle small {
  color: var(--muted)
}

.missing-lap {
  color: var(--muted)
}

.results-table {
  min-width: 720px
}

.results-panel summary {
  min-height: 44px;
  align-items: center
}

.leaders a,
.list>a,
.metric-row a {
  min-height: 44px
}

@media(max-width:650px) {
  header {
    height: auto;
    min-height: 72px;
    gap: .25rem;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 1rem;
    padding-bottom: 1rem
  }

  header nav {
    justify-content: flex-start;
    width: 100%;
    gap: .25rem .8rem
  }

  .list>a {
    gap: .35rem;
    padding: .9rem .25rem
  }

  .metric-row {
    grid-template-columns: 1fr;
    gap: .6rem
  }

  .metric-row>span {
    display: block
  }

  .results-table .result-place,
  .results-table .result-rider {
    position: sticky;
    background: var(--white);
    z-index: 1
  }

  .results-table .result-place {
    left: 0;
    min-width: 4.5rem
  }

  .results-table .result-rider {
    left: 4.5rem;
    min-width: 10rem;
    box-shadow: 2px 0 0 var(--line)
  }

  .results-table thead .result-place,
  .results-table thead .result-rider {
    z-index: 2
  }

  .table-wrap {
    overscroll-behavior-inline: contain
  }
}

.guidance-note {
  max-width: 720px;
  margin: 1rem 0 2rem;
  padding: .75rem 1rem;
  border-left: 3px solid var(--moss);
  background: #e4e7de
}

.guidance-note>summary {
  cursor: pointer;
  font-weight: 700
}

.guidance-note p {
  margin: .5rem 0
}

.guidance-note ul {
  margin: .5rem 0 0;
  padding-left: 1.25rem
}

.leaders {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem
}

.category-leaders {
  border-left: 3px solid var(--acid);
  padding: .75rem;
  background: var(--paper)
}

.category-leaders h4 {
  margin: 0;
  font-size: .8rem;
  font-family: var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase
}

.category-leaders ol {
  margin: .5rem 0 0;
  padding: 0;
  list-style: none
}

.category-leaders li+li {
  border-top: 1px solid var(--line)
}

.category-leaders a {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: center;
  padding: .5rem 0;
  min-height: 44px;
  border: 0;
  text-decoration: none
}

.category-leaders a:hover strong,
.category-leaders a:focus-visible strong {
  text-decoration: underline
}

.standing-rank {
  font: 700 1rem var(--mono)
}

.category-leaders a>span:last-child {
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap
}

.hero-banner,
.course-banner,
.event-banner {
  position: relative;
  margin-top: -2.5rem;
  margin-left: calc(-1 * max(2vw, .5rem));
  margin-right: calc(-1 * max(2vw, .5rem));
  overflow: hidden;
  background: var(--ink);
  isolation: isolate
}

.hero-banner {
  min-height: clamp(300px, 42vw, 520px)
}

.course-banner,
.event-banner {
  min-height: clamp(220px, 30vw, 360px);
  margin-bottom: 3rem
}

.hero-banner img,
.course-banner img,
.event-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2
}

.hero-banner::after,
.course-banner::after,
.event-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 18, 12, .8), rgba(8, 18, 12, .3) 65%, rgba(8, 18, 12, .5));
  z-index: -1
}

.hero-copy,
.course-copy,
.event-copy {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: clamp(2rem, 6vw, 5rem)
}

.hero-copy {
  max-width: 850px
}

.hero-copy .eyebrow,
.course-copy .eyebrow,
.event-copy .eyebrow {
  color: var(--acid)
}

.hero-copy h1 em {
  color: var(--acid);
  text-shadow: 0 2px 5px rgba(0, 0, 0, .85)
}

.hero-copy>p:last-child,
.course-copy .lede,
.event-copy .lede {
  color: #edf2e9
}

.hero-banner figcaption,
.course-banner figcaption,
.event-banner figcaption {
  position: absolute;
  right: 1rem;
  bottom: .75rem;
  z-index: 2;
  color: var(--white);
  font: 500 .72rem DM Mono, monospace;
  text-shadow: 0 1px 2px #000
}

.hero-banner figcaption a,
.course-banner figcaption a,
.event-banner figcaption a {
  color: var(--acid)
}

/* Shared rider-affinity and event-characteristic tiles. */
.course-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start
}

.course-score-tile {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: .9rem;
  align-items: center;
  min-width: 0;
  min-height: 116px;
  padding: 1.25rem;
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--line)
}

.course-score-tile img {
  filter: brightness(0) invert(1)
}

.course-score-label {
  min-width: 0;
  font-weight: 800;
  overflow-wrap: anywhere
}

.course-score-tile strong {
  font: 800 clamp(1.75rem, 5vw, 2.5rem)/1 var(--sans);
  font-variant-numeric: tabular-nums
}

.course-score-tile small {
  grid-column: 2/-1;
  color: var(--acid);
  overflow-wrap: anywhere
}

.affinity-tile {
  min-width: 0;
  background: var(--white)
}

.affinity-tile>summary {
  cursor: pointer;
  list-style: none
}

.affinity-tile>summary::-webkit-details-marker {
  display: none
}

.affinity-tile[open]>summary {
  border-bottom: 3px solid var(--acid)
}

.affinity-detail {
  padding: 0 1.25rem 1.25rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-top: 0;
  overflow-wrap: anywhere
}

.affinity-detail p {
  margin: .75rem 0 0
}

.affinity-tile>summary:hover,
.affinity-tile>summary:focus-visible {
  background: var(--acid);
  color: var(--ink)
}

.affinity-tile>summary:hover img,
.affinity-tile>summary:focus-visible img {
  filter: none
}

.affinity-tile>summary:hover small,
.affinity-tile>summary:focus-visible small {
  color: var(--ink)
}

.event-characteristics {
  margin: 2rem 0 3rem
}

.event-vibe-tile {
  background: var(--moss);
  grid-column: 1/-1
}

@media(max-width:650px) {
  .course-score-tile {
    grid-template-columns: minmax(0, 1fr);
    gap: .35rem;
    padding: 1rem
  }

  .course-score-tile img {
    width: 32px;
    height: 32px
  }

  .course-score-tile small {
    grid-column: 1
  }
}

@media(max-width:360px) {
  .course-score-grid {
    grid-template-columns: 1fr
  }
}

/* Course voting */
.course-vote-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  margin: 0 0 3rem
}

.course-vote-callout p {
  margin: 0;
  font-weight: 700
}

.course-vote-callout .vote-range {
  font-weight: 400
}

.vote-open,
.vote-submit {
  border: 0;
  background: var(--acid);
  color: var(--ink);
  padding: .8rem 1.1rem;
  font: 800 .9rem var(--sans);
  cursor: pointer
}

.course-vote-dialog {
  width: min(720px, calc(100% - 2rem));
  border: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35)
}

.course-vote-dialog::backdrop {
  background: rgba(10, 17, 12, .72)
}

.course-vote-dialog form:not(.dialog-close) {
  padding: clamp(1.25rem, 4vw, 2.5rem)
}

.course-vote-dialog h2 {
  margin: 0;
  padding-right: 1.5rem
}

.dialog-close {
  position: absolute;
  right: .7rem;
  top: .7rem
}

.dialog-close button {
  border: 0;
  background: none;
  font-size: 2rem;
  cursor: pointer
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0
}

.vote-tile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  padding: 1rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 800
}

.vote-tile img {
  width: 42px;
  height: 42px;
  filter: brightness(0) invert(1)
}

.vote-controls {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem;
  gap: .75rem;
  align-items: center
}

.vote-slider {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  accent-color: var(--acid);
  cursor: pointer
}

.vote-value {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  font: 800 1.2rem var(--sans);
  padding: .4rem;
  border: 0
}

.vote-description {
  grid-column: 1/-1;
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.5
}

.vote-tile:last-child {
  background: var(--moss);
  grid-column: 1/-1
}

@media(max-width:550px) {
  .course-vote-callout {
    align-items: flex-start;
    flex-direction: column
  }

  .vote-open {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere
  }

  .vote-grid {
    grid-template-columns: 1fr
  }
}

/* Dense rider insights, scoped so other public pages retain their spacing. */
.rider-profile {
  min-width: 0
}

.rider-profile section {
  margin: 2rem 0
}

.rider-profile h2 {
  margin: 0 0 .75rem
}

.rider-profile p {
  margin: .5rem 0 1rem
}

.rider-profile th,
.rider-profile td {
  padding: .65rem .75rem;
  font-variant-numeric: tabular-nums
}

.rider-profile .empty {
  padding: 1rem
}

.rider-profile .table-hint,
.performance-provenance {
  font-size: .85rem;
  color: var(--muted)
}

.rivalry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  align-items: start
}

.rivalry-group {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--white)
}

.rivalry-group:last-child {
  grid-column: 1/-1
}

.rivalry-group>summary {
  cursor: pointer;
  min-height: 44px;
  padding: .75rem;
  font-weight: 750
}

.rivalry-group>summary span {
  float: right;
  font-size: .8rem;
  color: var(--muted);
  font-weight: 400
}

.rivalry-group>p {
  padding: 0 .75rem;
  font-size: .85rem
}

.rivalry-group table {
  min-width: 520px;
  font-size: .85rem
}

.rivalry-group small {
  font-size: .65rem;
  letter-spacing: 0;
  text-transform: none
}

.rider-history-table {
  min-width: 800px
}

.rider-history-table time {
  white-space: nowrap;
  letter-spacing: 0
}

.rider-profile .table-wrap {
  max-width: 100%;
  overscroll-behavior-inline: contain
}

.rider-profile td small {
  display: block;
  font-size: .65rem;
  letter-spacing: 0
}

.performance-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
  margin: 1rem 0
}

.performance-controls label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .8rem;
  font-weight: 650
}

.performance-controls select,
.performance-controls input {
  min-height: 44px;
  max-width: 100%;
  border: 1px solid var(--line);
  padding: .5rem;
  background: var(--white);
  color: var(--ink);
  font: inherit
}

.performance-controls>div {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem
}

.performance-plot {
  position: relative;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line)
}

.performance-plot svg {
  display: block;
  width: 100%;
  height: 300px;
  font: 12px var(--sans);
  fill: var(--muted)
}

.plot-grid {
  stroke: var(--line);
  stroke-width: 1
}

.score-line {
  stroke: var(--moss);
  stroke-width: 2.5
}

.score-marker {
  fill: var(--moss);
  stroke: var(--moss);
  stroke-width: 2
}

.carried-marker {
  fill: var(--white)
}

.season-break {
  fill: #e4e7de
}

.season-divider {
  stroke: var(--muted);
  stroke-dasharray: 3 3
}

.category-transition,
.provisional-marker {
  fill: var(--ink);
  font-weight: 700
}

.score-point {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer
}

.score-point:hover,
.score-point:focus-visible {
  background: rgba(61, 89, 68, .12);
  outline: 2px solid var(--moss)
}

.performance-detail {
  padding: .75rem 1rem;
  border-left: 3px solid var(--moss);
  background: #e4e7de;
  font-size: .9rem
}

.rider-profile .performance-detail p {
  margin: .25rem 0
}

.performance-table>summary {
  cursor: pointer;
  min-height: 44px;
  padding: .65rem 0;
  font-weight: 650
}

.performance-table>p {
  font-size: .85rem;
  color: var(--muted)
}

.performance-provenance {
  overflow-wrap: anywhere
}

.rider-profile [hidden] {
  display: none !important
}

@media(max-width:850px) {
  .rivalry-grid {
    grid-template-columns: 1fr
  }

  .rivalry-group:last-child {
    grid-column: auto
  }
}

@media(max-width:650px) {
  .rider-profile section {
    margin: 1.5rem 0
  }

  .performance-controls {
    gap: .5rem
  }

  .performance-controls label {
    min-width: 0
  }

  .rider-profile th,
  .rider-profile td {
    padding: .6rem
  }

  .rivalry-group>summary span {
    float: none;
    margin-left: .5rem
  }
}

.performance-scroll {
  max-width: 100%;
  min-width: 0
}

.performance-plot {
  width: 100%;
  min-width: 0
}

/* Contain absolutely positioned screen-reader labels inside scrolled cells. */
.rider-profile td {
  position: relative
}

/* Rider explanations and point details float above content. */
.rider-section-heading {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .75rem
}

.rider-profile .rider-section-heading h2 {
  margin: 0
}

.section-info {
  position: relative;
  flex: none
}

.section-info>summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  list-style: none
}

.section-info>summary::-webkit-details-marker {
  display: none
}

.section-info>summary span {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  font: bold 14px Georgia, serif;
  color: var(--moss)
}

.section-info-popup {
  position: fixed;
  z-index: 20;
  width: min(420px, calc(100vw - 24px));
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 5px 24px #18221c30;
  font-size: .9rem;
  max-height: calc(100dvh - 24px);
  overflow: auto
}

.rider-profile .section-info-popup p {
  margin: 0 0 .75rem
}

.rider-profile .section-info-popup p:last-child {
  margin-bottom: 0
}

.performance-detail {
  position: fixed;
  z-index: 25;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 5px 24px #18221c30
}

.rider-profile .performance-detail p {
  margin: .35rem 0
}

.rider-profile .section-info-popup,
.rider-profile .performance-detail {
  overflow-wrap: anywhere
}

.section-info-popup {
  left: 12px;
  top: 20vh
}

/* Shared metric information controls, with an in-flow native disclosure fallback. */
.section-info {
  z-index: 21
}

.section-info>summary {
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%
}

.section-info>summary:hover,
.section-info>summary:focus-visible {
  background: var(--acid)
}

.section-info-popup {
  position: absolute;
  left: 0;
  top: calc(100% + .4rem);
  width: min(420px, calc(100vw - 24px));
  max-height: min(60vh, 28rem);
  overflow: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain
}

.section-info-popup p {
  margin: 0
}

.section-info:not(.section-info-enhanced)[open] {
  flex-basis: 100%
}

.section-info:not(.section-info-enhanced)[open] .section-info-popup {
  position: static;
  width: min(420px, calc(100vw - 24px));
  max-height: min(60vh, 28rem);
  margin: .5rem 0 0
}

.section-info-enhanced .section-info-popup {
  position: fixed;
  z-index: 22;
  left: 12px;
  top: 20vh;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px)
}

.metric-section-title {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0
}

.metric-section-title h2 {
  margin: 0
}

.metric-column-title {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  min-width: 0
}

.calculation-details {
  font-size: .9rem
}

.calculation-details>summary {
  min-height: 44px;
  padding: .6rem .75rem;
  cursor: pointer
}

.calculation-details>p {
  max-width: 65ch;
  margin: .25rem .75rem .75rem
}

@media(max-width:650px) {
  .metric-section-title {
    flex-wrap: wrap
  }

  .section-info:not(.section-info-enhanced)[open] .section-info-popup {
    width: min(420px, calc(100vw - 24px))
  }
}

/* Shared search form and bounded suggestion list. */
.site-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .25rem;
  width: min(19rem, 34vw);
  min-width: 12rem
}

.site-search input {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: .45rem .65rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit
}

.site-search button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: var(--acid);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer
}

.search-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + .4rem);
  left: 0;
  width: max(100%, min(26rem, calc(100vw - 2rem)));
  max-height: min(60vh, 24rem);
  overflow: auto;
  margin: 0;
  padding: .35rem;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px #18221c30;
  list-style: none
}

.search-suggestions[hidden],
.search-all[hidden] {
  display: none
}

.search-suggestions a {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: .1rem .5rem;
  align-items: center;
  min-height: 44px;
  padding: .45rem .55rem;
  text-decoration: none
}

.search-suggestions a:hover,
.search-suggestions a[aria-selected="true"],
.search-suggestions a:focus-visible {
  background: var(--acid);
  color: var(--ink)
}

.suggestion-type {
  grid-row: span 2;
  font: 600 .65rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--moss)
}

.suggestion-detail {
  font-size: .75rem;
  color: var(--muted)
}

.search-all {
  display: block;
  min-height: 44px;
  padding: .75rem;
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-weight: 700
}

@media(max-width:650px) {
  .site-search {
    order: 2;
    width: 100%;
    min-width: 0
  }

  .search-suggestions {
    width: 100%
  }
}

.site-footer {
  align-items: flex-start;
  gap: 2rem
}

.site-footer>p {
  margin: 0
}

.site-footer nav {
  justify-content: flex-start;
  gap: .25rem 1rem
}

.site-footer nav a {
  color: inherit;
  min-height: 44px
}

.site-footer nav a:hover {
  text-decoration: underline
}

@media(max-width:650px) {
  .site-footer nav {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: start;
    gap: .25rem
  }

  .site-footer nav a {
    overflow-wrap: anywhere
  }
}

/* Keep dense public tables scrollable and explain the keyboard path on phones. */
.table-wrap {
  min-width: 0;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--moss) var(--paper)
}

.table-scroll-note {
  margin: .5rem 0;
  padding: .5rem .75rem;
  border-left: 3px solid var(--moss);
  background: #e4e7de;
  color: var(--ink);
  font-size: .85rem;
  line-height: 1.4
}

@media(min-width:651px) {
  .table-scroll-note {
    display: none
  }
}

@media(max-width:650px) {
  .results-table .result-rider a {
    overflow-wrap: anywhere;
    white-space: normal
  }
}

/* Native closed details can otherwise let positioned popup content widen tiny screens. */
.section-info:not(.section-info-enhanced) .section-info-popup {
  position: static
}

.section-info-popup {
  display: none
}

.section-info[open]>.section-info-popup {
  display: block
}

@media(max-width:420px) {
  .rider-section-heading {
    flex-wrap: wrap;
    min-width: 0
  }

  .rider-section-heading h2 {
    min-width: 0;
    overflow-wrap: anywhere
  }
}

@media(max-width:250px) {

  .results-table th,
  .results-table td {
    padding: .25rem
  }

  .results-table .result-place {
    min-width: 2.5rem;
    font-size: .62rem
  }

  .results-table .result-rider {
    left: 2.5rem;
    min-width: 6.5rem;
    max-width: 6.5rem
  }
}

@media(max-width:250px) {
  .results-table .result-rider {
    width: calc(100vw - 7.25rem);
    min-width: calc(100vw - 7.25rem);
    max-width: calc(100vw - 7.25rem)
  }
}

@media(max-width:250px) {
  h1 {
    overflow-wrap: anywhere
  }

  .event-copy {
    padding: 1rem
  }
}

.event-sources {
  margin: 1.25rem 0
}

.event-sources h2 {
  font-size: 1rem;
  margin: .3rem 0
}

.event-sources ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none
}

.fresh {
  width: 100%;
  max-width: none;
  margin: 1.25rem 0 0;
  grid-column: 1/-1;
  font-size: .88rem;
  line-height: 1.45
}

/* Public metric directory */
.metric-directory-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1rem
}

.metric-directory-entry {
  min-width: 0;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--moss)
}

.metric-directory-entry h3 {
  margin: .15rem 0 .75rem;
  font-size: 1.3rem;
  line-height: 1.2
}

.metric-directory-entry p {
  max-width: 65ch;
  margin: 0 0 1rem
}

.metric-directory-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none
}

.metric-directory-links a {
  display: inline-block;
  min-height: 44px;
  padding: .55rem 0;
  font-weight: 700;
  text-underline-offset: .2em
}

.metric-directory-links a:focus-visible {
  outline: 3px solid #3756d8;
  outline-offset: 3px
}

/* Homepage product updates mockup. */
.whats-new {
  padding: 1.5rem;
  background: #e4e7de;
  border: 1px solid var(--line)
}

.whats-new .section-head {
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.25rem
}

.whats-new .section-head h2 {
  margin: .1rem 0 0
}

.updates-note {
  max-width: 22rem;
  color: var(--muted);
  font-size: .9rem;
  text-align: right
}

.updates-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem
}

.update-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line)
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .35rem;
  color: var(--muted);
  font: 500 .7rem var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase
}

.update-kind {
  color: var(--moss);
  font-weight: 700
}

.update-card h3 {
  margin: .9rem 0 .4rem;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.025em
}

.update-card p {
  margin: .25rem 0 1rem;
  color: var(--muted);
  font-size: .92rem
}

.update-card>a {
  display: inline-flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
  padding-top: .5rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
  text-decoration: none
}

.update-card>a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .2em
}

@media(max-width:800px) {
  .updates-list {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .update-card:last-child {
    grid-column: 1/-1
  }
}

@media(max-width:550px) {
  .whats-new {
    padding: 1rem
  }

  .whats-new .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: .25rem
  }

  .updates-note {
    text-align: left
  }

  .updates-list {
    grid-template-columns: 1fr
  }

  .update-card:last-child {
    grid-column: auto
  }
}

.updates-intro {
  margin-bottom: 2.5rem
}

.updates-history .updates-list {
  grid-template-columns: 1fr;
  gap: .9rem
}

.updates-history .update-card {
  width: 100%;
  max-width: 900px;
  border-left: 4px solid var(--moss)
}

.updates-history .update-card h3 {
  font-size: 1.35rem
}

.updates-source-note {
  margin: .8rem 0 0;
  color: var(--muted);
  font-size: .78rem
}