/* =====================================================================
   MERIDIAN LINE RUN CLUB / main.css
   Consumes tokens.css only. Organised as:
   00 reset + base    01 shared roles     02 site chrome (ruler, veil, signpost)
   03 the route mechanic (course, trace, markers)
   04 legs, in page order    05 form kit (club entry)    06 utilities
   ===================================================================== */

/* ---------- 00 reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: var(--wght-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--wght-display);
  line-height: var(--lh-heading);
  letter-spacing: var(--track-display);
  margin: 0;
}
p { margin: 0; }
/* hidden beats any display a component sets: the error summary, the fallback
   panel and the live splits table all rest hidden until something opens them */
[hidden] { display: none !important; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: inherit; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- 01 shared roles ---------- */
.lane {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.bib {
  display: inline-flex;
  /* a bib is pinned on, never stretched across the grid cell it lands in */
  justify-self: start;
  align-self: start;
  width: fit-content;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-tick);
  font-weight: 700;
  letter-spacing: var(--track-tick);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  border: var(--hair) solid currentColor;
  border-radius: var(--r-pill);
  padding: 0.32em 0.8em;
  line-height: 1;
}
.bib--quiet { color: var(--muted); }
.bib--sample { color: var(--fg); border-style: dashed; }

.leg-title {
  font-size: var(--t-h2);
  text-wrap: balance;
  max-width: 20ch;
}
.leg-title .lit { color: var(--accent); }

.prose {
  max-width: var(--measure);
  color: var(--muted);
  font-size: var(--t-lead);
  line-height: 1.55;
}
.prose strong { color: var(--fg); font-weight: 600; }

.stride {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.85em 1.5em;
  border-radius: var(--r-pill);
  border: var(--hair) solid transparent;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out), background var(--dur-1) linear;
}
.stride::after {
  content: "";
  width: 1.1em;
  height: 1px;
  background: currentColor;
  transition: width var(--dur-2) var(--ease-out);
}
.stride:hover { transform: translateY(-1px); }
.stride:hover::after { width: 1.9em; }
.stride--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.stride--ghost:hover { background: var(--bg-2); }
.stride--sm { padding: 0.6em 1.1em; font-size: 0.82rem; }

.reflector {
  border: 0;
  border-top: var(--hair) solid var(--line);
  margin: 0;
}

/* ---------- 02 site chrome ---------- */
.skip-link {
  position: fixed;
  top: var(--s-3);
  left: var(--s-3);
  z-index: var(--z-skip);
  transform: translateY(-200%);
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-pill);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: none; }

/* the ruler: a distance scale that doubles as the primary nav */
.ruler {
  position: sticky;
  top: 0;
  z-index: var(--z-ruler);
  background: var(--bg);
  border-bottom: var(--hair) solid var(--line);
}
.ruler-row {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: 3.9rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.wordmark .wm-2 { color: var(--muted); font-weight: 500; }

.waypoints {
  display: none;
  margin-left: auto;
  align-items: flex-end;
  gap: clamp(0.6rem, 1.8vw, 1.6rem);
}
.waypoints a {
  display: grid;
  gap: 2px;
  justify-items: center;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.waypoints a:hover { border-bottom-color: var(--line-strong); }
.waypoints a[aria-current="true"] { border-bottom-color: var(--accent); }
.waypoints a[aria-current="true"] .wp-dist { color: var(--accent); }
.wp-dist {
  font-size: var(--t-tick);
  font-weight: 700;
  letter-spacing: var(--track-tick);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.wp-name { font-size: 0.86rem; font-weight: 500; }

.ruler-cta { margin-left: auto; }
.waypoints + .ruler-cta { margin-left: 0; }

.trailhead-toggle {
  margin-left: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  background: transparent;
  color: var(--fg);
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 0.6em 1.1em;
  cursor: pointer;
}
.ruler-scale {
  position: relative;
  height: 10px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 24px);
  border-top: var(--hair) solid var(--line);
}
.ruler-pip {
  position: absolute;
  top: -3px;
  left: calc(var(--run-progress, 0) * 100%);
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}
html:not(.js) .ruler-scale { display: none; }

/* narrow phones: the ruler keeps the wordmark and the menu, and the entry CTA
   moves into the veil, which is where the thumb already is */
@media (max-width: 34rem) {
  .wordmark .wm-2 { display: none; }
  .ruler-row .ruler-cta { display: none; }
  .trailhead-toggle { margin-left: auto; }
}
@media (min-width: 62rem) {
  .waypoints { display: flex; }
  .trailhead-toggle { display: none; }
}

/* the veil: menu overlay, focus trapped */
.veil {
  position: fixed;
  inset: 0;
  z-index: var(--z-veil);
  background: var(--bg);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-5);
  padding: var(--edge);
}
.veil.is-open { display: flex; }
.veil nav { display: grid; gap: var(--s-4); }
.veil nav a {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  border-bottom: var(--hair) solid var(--line);
  padding-bottom: var(--s-3);
}
.veil nav a span {
  font-size: var(--t-tick);
  letter-spacing: var(--track-tick);
  color: var(--accent);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}
.trailhead-close {
  align-self: flex-start;
  font: inherit;
  font-weight: 700;
  background: transparent;
  color: var(--fg);
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 0.6em 1.1em;
  cursor: pointer;
}
.veil-note { color: var(--muted); font-size: var(--t-small); max-width: var(--measure); }

/* the signpost: footer */
.signpost {
  border-top: var(--hair) solid var(--line);
  background: var(--bg-2);
  padding-block: var(--s-8) var(--s-6);
}
.signpost-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 48rem) {
  .signpost-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.signpost h2 { font-size: var(--t-h3); }
.signpost ul { display: grid; gap: var(--s-2); }
.signpost a { color: var(--muted); text-decoration: none; }
.signpost a:hover { color: var(--fg); text-decoration: underline; }
.signpost-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: var(--hair) solid var(--line);
  color: var(--muted);
  font-size: var(--t-small);
}
.odometer { font-variant-numeric: tabular-nums; }

/* ---------- 03 the route mechanic ---------- */
.course { position: relative; }
.trace {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--trace-gutter);
  z-index: var(--z-trace);
  pointer-events: none;
}
.trace-svg { display: block; width: 100%; height: 100%; }
.trace-ghost {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.trace-ink {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  /* rest state: the whole route is already run */
  stroke-dashoffset: 0;
}
/* only a scripted page hides the untravelled part of the route */
html.js .trace-ink {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--run-progress, 1));
}
@media (prefers-reduced-motion: reduce) {
  html.js .trace-ink { stroke-dasharray: none; stroke-dashoffset: 0; }
}

.leg {
  position: relative;
  z-index: var(--z-marker);
  padding-block: var(--section-pad);
  padding-left: var(--trace-gutter);
}
.leg--band { background: var(--bg-2); }
.leg-mark {
  position: absolute;
  top: calc(var(--section-pad) - 0.35rem);
  left: 0;
  width: var(--trace-gutter);
  display: grid;
  justify-items: center;
  gap: var(--s-2);
}
.mark-pip {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.leg--band .mark-pip { box-shadow: 0 0 0 4px var(--bg-2); }
.mark-dist {
  font-size: var(--t-tick);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.leg-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-6); justify-items: start; }

/* the course card: the route as a plain list of markers */
.cardnav {
  border: var(--hair) solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-5);
  background: var(--bg-2);
}
.cardnav h2 {
  font-size: var(--t-tick);
  letter-spacing: var(--track-tick);
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-body);
  margin-bottom: var(--s-4);
}
.cardnav ol { display: grid; gap: 1px; background: var(--line); }
.cardnav li { background: var(--bg-2); }
.cardnav a {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  align-items: baseline;
  gap: var(--s-3);
  padding: 0.6rem var(--s-2);
  text-decoration: none;
}
.cardnav a:hover { background: var(--bg-3); }
.cardnav a[aria-current="true"] { background: var(--bg-3); }
.cardnav a[aria-current="true"] .cn-name { color: var(--accent); }
.cn-dist {
  font-size: var(--t-tick);
  font-weight: 700;
  letter-spacing: var(--track-tick);
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.cn-name { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }

/* ---------- 04 legs ---------- */

/* 01 / 0K start */
#start-01 { padding-top: clamp(3rem, 8vh, 5rem); }
.startline {
  display: grid;
  gap: var(--s-6);
  align-items: start;
}
@media (min-width: 64rem) {
  .startline { grid-template-columns: 1.55fr 1fr; gap: var(--s-8); }
}
.startline h1 {
  font-size: var(--t-h1);
  text-wrap: balance;
  margin-block: var(--s-4);
}
.startline h1 .lit { color: var(--accent); }
.gunline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}
.conditions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: var(--hair) solid var(--line);
  font-size: var(--t-small);
  color: var(--muted);
}
.conditions b { color: var(--fg); font-variant-numeric: tabular-nums; }

/* 02 / 2K the pack */
.pack-notes {
  display: grid;
  gap: var(--s-5);
  counter-reset: note;
}
@media (min-width: 52rem) { .pack-notes { grid-template-columns: repeat(3, 1fr); } }
.pack-note {
  border-top: 2px solid var(--accent);
  padding-top: var(--s-4);
  display: grid;
  gap: var(--s-3);
}
.pack-note h3 { font-size: var(--t-h3); }
.pack-note p { color: var(--muted); }

/* 03 / 5K routes */
.route-strips { display: grid; gap: var(--s-5); }
.route-strip {
  display: grid;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-5);
  border: var(--hair) solid var(--line);
  border-radius: var(--r-2);
  background: var(--bg-2);
}
@media (min-width: 56rem) {
  .route-strip { grid-template-columns: 1.1fr 1.4fr auto; gap: var(--s-6); }
}
.route-strip h3 { font-size: var(--t-h3); }
.route-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-2);
  font-size: var(--t-small);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.route-facts b { color: var(--fg); font-weight: 600; }
.elev { display: block; width: 100%; height: auto; }
.elev-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.elev-fill { fill: var(--accent); opacity: 0.13; }
.elev-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* 04 / 7K the week */
.week-wrap { overflow-x: auto; }
.week {
  width: 100%;
  border-collapse: collapse;
  min-width: 44rem;
  font-variant-numeric: tabular-nums;
}
.week caption {
  text-align: left;
  color: var(--muted);
  font-size: var(--t-small);
  padding-bottom: var(--s-4);
}
.week th, .week td {
  text-align: left;
  padding: var(--s-4) var(--s-3);
  border-bottom: var(--hair) solid var(--line);
  vertical-align: baseline;
}
.week thead th {
  font-family: var(--font-body);
  font-size: var(--t-tick);
  letter-spacing: var(--track-tick);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  border-bottom-color: var(--line-strong);
}
.week tbody th { font-family: var(--font-display); font-size: 1rem; font-weight: 800; }
.week td.pace { color: var(--muted); }
.run-row:hover { background: var(--bg-2); }
.claim {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  background: transparent;
  color: var(--accent);
  border: var(--hair) solid currentColor;
  border-radius: var(--r-pill);
  padding: 0.45em 0.9em;
  cursor: pointer;
}
.claim:hover { background: var(--accent); color: var(--on-accent); }

/* 05 / 10K membership */
.dues { display: grid; gap: var(--s-5); }
@media (min-width: 54rem) { .dues { grid-template-columns: repeat(3, 1fr); } }
.dues-tier {
  display: grid;
  gap: var(--s-4);
  align-content: start;
  padding: var(--s-6) var(--s-5);
  border: var(--hair) solid var(--line);
  border-radius: var(--r-2);
}
.dues-tier--lead {
  background: var(--bg);
  border-color: var(--accent);
}
.dues-price {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.dues-price small { font-family: var(--font-body); font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.dues-list { display: grid; gap: var(--s-3); color: var(--muted); font-size: 0.95rem; }
.dues-list li { display: grid; grid-template-columns: 1.1rem 1fr; gap: var(--s-3); }
.dues-list li::before { content: ""; height: 2px; width: 0.9rem; background: var(--accent); margin-top: 0.75em; }

/* 06 / 13K the pace desk */
.pace-block {
  display: grid;
  gap: var(--s-6);
  padding: clamp(var(--s-4), 4vw, var(--s-6));
  border-radius: var(--r-3);
  background: var(--bg);
  color: var(--fg);
  border: var(--hair) solid var(--line);
}
@media (min-width: 62rem) { .pace-block { grid-template-columns: 20rem 1fr; gap: var(--s-8); } }
.pace-desk { display: grid; gap: var(--s-5); align-content: start; }
.pace-desk fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.pace-desk legend, .pace-clock-label {
  font-size: var(--t-tick);
  letter-spacing: var(--track-tick);
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  padding: 0;
}
.bib-set { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.bib-radio { position: relative; }
.bib-radio input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.bib-radio span {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.5em 0.9em;
  border-radius: var(--r-pill);
  border: var(--hair) solid var(--line-strong);
  color: var(--fg);
}
.bib-radio input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bib-radio input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.pace-clock { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; }
.pace-unit { display: grid; gap: var(--s-2); flex: 1 1 4rem; min-width: 0; }
.pace-unit label { font-size: var(--t-tick); letter-spacing: var(--track-tick); text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pace-unit input {
  font: inherit;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  width: 100%;
  max-width: 5.4rem;
  min-width: 0;
  padding: 0.35em 0.5em;
  background: var(--bg-2);
  color: var(--fg);
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-1);
}
.pace-readout {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-variant-numeric: tabular-nums;
}
.pace-readout small { display: block; font-family: var(--font-body); font-size: var(--t-small); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.splits-scroll { max-height: 26rem; overflow-y: auto; border: var(--hair) solid var(--line); border-radius: var(--r-2); }
.splits-sheet, .splits-live {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.splits-sheet caption, .splits-live caption {
  text-align: left;
  padding: var(--s-4);
  color: var(--muted);
  font-size: var(--t-small);
  border-bottom: var(--hair) solid var(--line);
}
.splits-sheet th, .splits-live th, .splits-sheet td, .splits-live td {
  text-align: left;
  padding: 0.55rem var(--s-4);
  border-bottom: var(--hair) solid var(--line);
}
.splits-sheet thead th, .splits-live thead th {
  position: sticky;
  top: 0;
  background: var(--bg-2);
  font-family: var(--font-body);
  font-size: var(--t-tick);
  letter-spacing: var(--track-tick);
  text-transform: uppercase;
  color: var(--muted);
}
.splits-sheet tbody th, .splits-live tbody th { font-weight: 700; font-family: var(--font-body); }
/* Rest state, no script: the 10K reference sheet stands and the distance bibs
   still swap it, because :has() reads the radio group without any JS at all.
   With script, one live sheet replaces all four, so every reference is hidden. */
.splits-sheet { display: none; }
html:not(.js) .pace-block .splits-sheet[data-dist="10"] { display: table; }
html:not(.js) .pace-block:has(#pd-5:checked) .splits-sheet { display: none; }
html:not(.js) .pace-block:has(#pd-5:checked) .splits-sheet[data-dist="5"] { display: table; }
html:not(.js) .pace-block:has(#pd-10:checked) .splits-sheet { display: none; }
html:not(.js) .pace-block:has(#pd-10:checked) .splits-sheet[data-dist="10"] { display: table; }
html:not(.js) .pace-block:has(#pd-21:checked) .splits-sheet { display: none; }
html:not(.js) .pace-block:has(#pd-21:checked) .splits-sheet[data-dist="21"] { display: table; }
html:not(.js) .pace-block:has(#pd-42:checked) .splits-sheet { display: none; }
html:not(.js) .pace-block:has(#pd-42:checked) .splits-sheet[data-dist="42"] { display: table; }
html:not(.js) .pace-js-only { display: none; }
html.js .pace-nojs-only { display: none; }

/* 07 / 16K crew */
.crew { display: grid; gap: var(--s-5); }
@media (min-width: 52rem) { .crew { grid-template-columns: repeat(3, 1fr); } }
.crew-member {
  display: grid;
  gap: var(--s-3);
  align-content: start;
  padding-top: var(--s-4);
  border-top: var(--hair) solid var(--line-strong);
}
.crew-member h3 { font-size: var(--t-h3); }
.crew-member p { color: var(--muted); font-size: 0.95rem; }
.crew-pace { font-size: var(--t-small); color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }

/* 08 / 21K race calendar */
.laps { display: grid; gap: 0; }
.lap {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-5) 0;
  border-bottom: var(--hair) solid var(--line);
  align-items: baseline;
}
@media (min-width: 52rem) {
  .lap { grid-template-columns: 8rem 1fr 10rem 7rem; gap: var(--s-5); }
}
.lap-date { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.lap h3 { font-size: 1.05rem; }
.lap p { color: var(--muted); font-size: 0.95rem; }
.lap-dist { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.95rem; }

/* 09 / 26K the briefing (questions) */
.briefing { display: grid; gap: 0; border-top: var(--hair) solid var(--line); }
.brief-item { border-bottom: var(--hair) solid var(--line); }
.brief-trigger {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  text-align: left;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.02rem, 1.9vw, 1.25rem);
  color: var(--fg);
  background: transparent;
  border: 0;
  padding: var(--s-5) 0;
  cursor: pointer;
}
/* drawn, not typed: a text glyph here would be read out after every question */
.brief-trigger::after {
  content: "";
  flex: none;
  width: 0.95em;
  height: 0.95em;
  align-self: center;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 2px 100% no-repeat;
}
.brief-trigger[aria-expanded="true"]::after {
  background: linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat;
}
.brief-panel { overflow: hidden; }
.brief-panel p { color: var(--muted); padding-bottom: var(--s-5); max-width: var(--measure); }

/* 10 / 30K club entry */
.entry-block { display: grid; gap: var(--s-7); }
@media (min-width: 62rem) { .entry-block { grid-template-columns: 1fr 1.25fr; gap: var(--s-8); } }
.entry-aside { display: grid; gap: var(--s-4); align-content: start; }
.entry-aside a { color: var(--accent); }
.entry-aside dl { display: grid; gap: var(--s-3); margin: 0; }
.entry-aside dt { font-size: var(--t-tick); letter-spacing: var(--track-tick); text-transform: uppercase; color: var(--muted); font-weight: 700; }
.entry-aside dd { margin: 0; }

/* ---------- 05 form kit ---------- */
.entry {
  display: grid;
  gap: var(--s-5);
  padding: var(--s-6);
  border-radius: var(--r-3);
  border: var(--hair) solid var(--line);
  background: var(--bg-2);
}
.entry-row { display: grid; gap: var(--s-5); }
@media (min-width: 40rem) { .entry-row { grid-template-columns: 1fr 1fr; } }
.entry-field { display: grid; gap: var(--s-2); align-content: start; }
.entry-field label { font-size: var(--t-tick); letter-spacing: var(--track-tick); text-transform: uppercase; font-weight: 700; color: var(--muted); }
.entry-field input, .entry-field select, .entry-field textarea {
  font: inherit;
  width: 100%;
  padding: 0.75em 0.85em;
  background: var(--bg);
  color: var(--fg);
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-1);
}
.entry-field textarea { min-height: 7rem; resize: vertical; }
.entry-field.is-invalid input, .entry-field.is-invalid select, .entry-field.is-invalid textarea { border-color: var(--accent); }
.entry-err { color: var(--accent); font-size: var(--t-small); font-weight: 600; }
.entry-hint { color: var(--muted); font-size: var(--t-small); }
.entry-summary {
  border: var(--hair) solid var(--accent);
  border-radius: var(--r-2);
  padding: var(--s-4);
  display: grid;
  gap: var(--s-2);
}
.entry-summary h3 { font-size: 1rem; }
.entry-summary ul { display: grid; gap: var(--s-1); list-style: disc; padding-left: 1.2rem; }
.entry-summary a { color: var(--accent); }
.entry-status { font-size: var(--t-small); color: var(--fg); }
.entry-fallback { display: grid; gap: var(--s-3); }
.entry-fallback textarea {
  font-family: var(--font-body);
  font-size: var(--t-small);
  min-height: 9rem;
  width: 100%;
  padding: var(--s-3);
  background: var(--bg);
  color: var(--fg);
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-1);
}
.entry-fallback-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.marshal { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* the marshal's note: shown only when script never arrived, so the form still
   has a destination and the club still has a phone number on the page */
.entry-nojs {
  border: var(--hair) dashed var(--accent);
  border-radius: var(--r-2);
  padding: var(--s-4);
  font-size: var(--t-small);
  color: var(--fg);
}
.entry-nojs a { color: var(--accent); }
html.js .entry-nojs { display: none; }
html:not(.js) .entry-draftnote { display: none; }
.entry-hint code { font-family: var(--font-body); font-weight: 700; color: var(--fg); }

/* ---------- 06 utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
html.js .reveal { opacity: 0; transform: translateY(22px); }
html.js .reveal.is-inview {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  html.js .reveal.is-inview { transition: none; }
  .stride, .stride::after { transition: none; }
  .stride:hover { transform: none; }
  .stride:hover::after { width: 1.1em; }
}

/* banner for interior pages */
.banner {
  padding-block: clamp(2.5rem, 7vh, 4.5rem) var(--s-7);
  border-bottom: var(--hair) solid var(--line);
  background: var(--bg-2);
}
.banner h1 { font-size: var(--t-h1); margin-block: var(--s-4) var(--s-4); }
.crumbs { display: flex; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--line-strong); }
.crumbs ol { display: flex; gap: var(--s-2); }

/* interior page furniture */
.plain-leg { padding-block: var(--section-pad); }
.plain-leg > .lane, #routes-end > .lane { display: grid; gap: var(--s-4); }
.route-file {
  display: grid;
  gap: var(--s-5);
  padding-block: var(--s-7);
  border-top: var(--hair) solid var(--line-strong);
}
@media (min-width: 60rem) { .route-file { grid-template-columns: 1fr 1.2fr; gap: var(--s-8); } }
.route-file > div { display: grid; gap: var(--s-4); align-content: start; justify-items: start; }
.route-file h2 { font-size: var(--t-h2); }
.route-file .spec, .route-file .elev, .route-file .turns { width: 100%; }
.turns { display: grid; gap: var(--s-3); counter-reset: turn; }
.turns li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: var(--s-3);
  color: var(--muted);
  border-bottom: var(--hair) solid var(--line);
  padding-bottom: var(--s-3);
}
.turns li::before {
  counter-increment: turn;
  content: counter(turn, decimal-leading-zero);
  font-size: var(--t-tick);
  font-weight: 700;
  letter-spacing: var(--track-tick);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 0.35em;
}
.spec {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.spec th, .spec td { text-align: left; padding: var(--s-3) 0; border-bottom: var(--hair) solid var(--line); }
.spec th { color: var(--muted); font-weight: 700; font-size: var(--t-tick); letter-spacing: var(--track-tick); text-transform: uppercase; width: 12rem; }

/* styleguide + 404 furniture */
.swatches { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.swatch { border: var(--hair) solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.swatch-chip { height: 5rem; }
.swatch-meta { padding: var(--s-3); font-size: var(--t-small); display: grid; gap: 2px; }
.swatch-meta b { font-variant-numeric: tabular-nums; }
.spec-list { display: grid; gap: var(--s-4); }
.spec-list > div { display: grid; gap: var(--s-2); border-top: var(--hair) solid var(--line); padding-top: var(--s-3); }
.demo-box { border: var(--hair) solid var(--line); border-radius: var(--r-2); padding: var(--s-5); display: grid; gap: var(--s-4); }
.wrongturn { display: grid; gap: var(--s-5); place-items: start; padding-block: clamp(4rem, 14vh, 9rem); }
.wrongturn h1 { font-size: var(--t-h1); }
.wrongturn .deadend { width: min(100%, 26rem); height: auto; }
