/* beforerace.day - shared styles for the home page and race pages.
   Dark only. Layout: a floating glass nav over full-bleed heroes (video on the
   home page, photo on race pages), then a centred 1040px column of glass
   panels on an ambient green-black ground. Charts are hand-drawn SVG. */
:root {
  color-scheme: dark;
  --bg: #060d0a;
  --bg-2: #0b1611;
  --ink: #eef4f0;
  --muted: rgba(238, 244, 240, 0.62);
  --faint: rgba(238, 244, 240, 0.38);
  --line: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-hi: rgba(255, 255, 255, 0.22);
  --accent: #4fd89a;
  --accent-ink: #a3f2cb;
  --accent-wash: rgba(79, 216, 154, 0.14);
  --heat: #ff9b5e;
  --cool: #7db9ff;
  --on-photo: #ffffff;
  --on-photo-muted: rgba(255, 255, 255, 0.76);
  --shade: 6, 13, 10;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-data: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --step-1: 1.15rem;
  --step-2: 1.65rem;
  --step-3: 2.3rem;
  --step-4: clamp(2.7rem, 7.5vw, 5rem);
  --r-sm: 14px;
  --r: 22px;
  --r-lg: 28px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --nav-h: 64px;
  --blur: none;  /* was blur(22px) saturate(170%): on 100+ elements it held scrolling to ~7 fps on integrated graphics. Keep glass as plain translucent fills. */
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60rem 40rem at 85% 35rem, rgba(79, 216, 154, 0.10), transparent 70%),
    radial-gradient(50rem 36rem at 5% 70rem, rgba(70, 140, 255, 0.08), transparent 70%),
    radial-gradient(40rem 30rem at 60% 120rem, rgba(79, 216, 154, 0.07), transparent 70%),
    var(--bg);
}
.band-inner, .wrap { max-width: 1040px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.wrap { padding-block: 28px 72px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 650; }
p { margin: 0; max-width: 68ch; }
.muted { color: var(--muted); }
.mono, .num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 600; color: var(--muted); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
section[id], [id^="h-"] { scroll-margin-top: calc(var(--nav-h) + 20px); }

/* the liquid-glass surface */
.panel, .facts .fact, .race-card, .modules article, .signup, .table-wrap, .band, .hour, .seg, .compare-art, .notice {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(255, 255, 255, 0.03), 0 12px 32px rgba(0, 0, 0, 0.32);
}

/* floating glass nav */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; height: var(--nav-h); display: flex; align-items: center; padding-top: 10px; }
.topbar .band-inner { width: 100%; }
.nav-glass { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 8px 7px 18px; border-radius: 999px;
  background: rgba(16, 26, 21, 0.38); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25); }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; white-space: nowrap; flex-shrink: 1; min-width: 0; }
.brand b { font-weight: 800; }
.brand span { color: var(--accent); font-weight: 800; }
.crumbs { font-size: 0.85rem; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a { color: var(--muted); }
.prefs { display: flex; gap: 6px; flex-wrap: nowrap; }
/* language menu in the top bar: closed it shows the page's flag and code, open it lists the four languages */
.lang-menu { position: relative; margin-right: 4px; flex: none; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px; border-radius: 999px; cursor: pointer;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); transition: background 0.15s, color 0.15s; user-select: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.lang-menu .lm-chev { transition: transform 0.2s; opacity: 0.8; }
.lang-menu[open] .lm-chev { transform: rotate(180deg); }
.lm-list { position: absolute; right: 0; top: calc(100% + 10px); min-width: 172px; display: grid; gap: 2px; padding: 6px; border-radius: 16px; z-index: 30;
  background: rgba(16, 26, 21, 0.86); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: lm-in 0.16s ease-out; }
@keyframes lm-in { from { opacity: 0; transform: translateY(-4px); } }
.lm-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.lm-list a:hover { background: rgba(255, 255, 255, 0.08); }
.lm-list a[aria-current="true"] { background: rgba(255, 255, 255, 0.12); font-weight: 600; }
.lm-list a[aria-current="true"]::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.flag { display: inline-block; width: 21px; height: 14px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); vertical-align: -2px; flex: none; }
.sf-lang a { display: inline-flex; align-items: center; gap: 7px; }
.seg { display: inline-flex; border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 0.84rem; color: var(--muted); transition: background 0.2s, color 0.2s; }
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.92); color: #0b1410; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25); }
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }
.nav-glass .seg { background: rgba(255, 255, 255, 0.06); box-shadow: none; }

/* full-bleed heroes start behind the nav */
.hero, .home-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(-1 * var(--nav-h)); color: var(--on-photo); background: rgb(var(--shade)); }
.hero .photo, .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; max-width: none; }
.hero::after, .home-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(var(--shade), 0.82) 0%, rgba(var(--shade), 0.45) 55%, rgba(var(--shade), 0.12) 100%),
    linear-gradient(180deg, rgba(var(--shade), 0.55) 0%, rgba(var(--shade), 0) 22%, rgba(var(--shade), 0) 62%, rgb(var(--shade)) 100%); }
.hero .eyebrow, .home-hero .eyebrow { color: var(--on-photo-muted); }

/* race hero */
.hero .band-inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: 24px; align-items: end; padding-block: calc(var(--nav-h) + 72px) 28px; min-height: 560px; }
.hero h1 { font-size: var(--step-4); font-weight: 800; line-height: 0.98; letter-spacing: -0.04em; }
.hero .local { font-size: var(--step-1); color: var(--on-photo-muted); }
.hero-copy { display: grid; gap: 14px; }
.hero-summary { font-size: 1.05rem; color: var(--on-photo); max-width: 46ch; }
.hero .raceday { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--on-photo-muted); }
.hero-course { align-self: center; justify-self: end; width: 100%; max-width: 330px; margin: 0; }
.hero-course svg { overflow: visible; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45)); }
.h-route { fill: none; stroke: var(--on-photo); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; opacity: 0.95; }
.h-route-glow { fill: none; stroke: rgba(var(--shade), 0.5); stroke-width: 8; stroke-linejoin: round; }
.h-start { fill: var(--accent); stroke: var(--on-photo); stroke-width: 2; }
.hero-course figcaption { font-family: var(--font-data); font-size: 0.76rem; color: var(--on-photo-muted); text-align: right; margin-top: 8px; }
.credit { grid-column: 1 / -1; font-size: 0.72rem; color: var(--faint); }
.credit a { color: var(--on-photo-muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 13px; font-size: 0.88rem; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.pill.live { background: var(--accent-wash); color: var(--accent-ink); border-color: rgba(79, 216, 154, 0.35); font-weight: 600; }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.94); color: #0b1410; text-decoration: none; font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.btn.ghost { background: rgba(255, 255, 255, 0.08); color: var(--ink); border-color: rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-1px); } }

/* distance tabs: a glass segmented control */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; overflow-x: auto; max-width: 100%; justify-self: start;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.tabs button { background: none; border: 0; padding: 8px 18px; border-radius: 999px; cursor: pointer; font-family: var(--font-display); font-weight: 650; font-size: 1rem; color: var(--muted); white-space: nowrap; text-align: left; }
.tabs button[aria-selected="true"] { background: rgba(255, 255, 255, 0.92); color: #0b1410; }
.tabs small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.74rem; opacity: 0.75; }

/* sections */
section.module { display: grid; gap: 16px; padding-top: 6px; }
section.module > header { display: grid; gap: 6px; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.facts .fact { border-radius: var(--r-sm); padding: 14px 16px; display: grid; gap: 3px; align-content: start; }
.fact .v { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1.15; letter-spacing: -0.02em; }
.fact .v.sm { font-size: 1.1rem; }
.fact .s { font-size: 0.8rem; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat { display: grid; gap: 2px; }
.stat .v { font-family: var(--font-display); font-weight: 750; font-size: var(--step-3); line-height: 1.05; letter-spacing: -0.03em; }
.stat .s { font-size: 0.84rem; color: var(--muted); }

.course-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.panel { border-radius: var(--r); padding: 18px; min-width: 0; }
.panel figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
figure { margin: 0; }
svg { display: block; width: 100%; height: auto; overflow: visible; }
.c-route { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.c-route-under { fill: none; stroke: rgba(var(--shade), 0.85); stroke-width: 7; stroke-linejoin: round; }
.c-dot-start { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.c-dot-finish { fill: var(--ink); stroke: var(--bg); stroke-width: 2; }
.c-km { fill: rgba(var(--shade), 0.9); stroke: var(--ink); stroke-width: 1.2; }
.c-km-t { fill: var(--ink); font-family: var(--font-data); font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.c-axis { stroke: var(--line); stroke-width: 1; }
.c-axis-t { fill: var(--faint); font: 11px var(--font-data); }
.c-area { fill: var(--accent-wash); }
.c-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.c-climb { fill: none; stroke: var(--heat); stroke-width: 3; }
.c-cursor { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.c-label { fill: var(--ink); font-weight: 600; font-family: var(--font-body); font-size: 12px; }
.c-label-m { fill: var(--muted); font-family: var(--font-body); font-size: 11px; }
.c-bar { fill: rgba(255, 255, 255, 0.14); }
.c-bar.hot { fill: var(--accent); }
.c-marker { stroke: var(--heat); stroke-width: 2; }
.c-dot { fill: var(--cool); opacity: 0.6; }
.c-dot.today { fill: var(--heat); opacity: 1; }
.c-band { fill: rgba(255, 255, 255, 0.08); }
.c-tick { stroke: var(--ink); stroke-width: 2; }
.readout { font-family: var(--font-data); font-size: 0.82rem; color: var(--muted); min-height: 1.4em; margin-top: 6px; }
.compare { font-size: 0.9rem; color: var(--muted); padding: 12px 16px; border-radius: var(--r-sm); background: rgba(79, 216, 154, 0.06); border: 1px solid rgba(79, 216, 154, 0.18); }
.compare b { font-family: var(--font-data); font-weight: 500; color: var(--ink); }

.hours { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.hour { border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 1px; }
.hour.in { border-color: rgba(79, 216, 154, 0.55); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px rgba(79, 216, 154, 0.25), 0 12px 32px rgba(0, 0, 0, 0.32); }
.hour .h { font-family: var(--font-data); font-size: 0.78rem; color: var(--muted); }
.hour .t { font-family: var(--font-display); font-weight: 750; font-size: 1.55rem; line-height: 1.1; letter-spacing: -0.02em; }
.hour .d { font-size: 0.74rem; color: var(--muted); }
.notice { border-radius: var(--r-sm); padding: 14px 16px; color: var(--muted); font-size: 0.92rem; }
.table-wrap { overflow-x: auto; border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
td.n, th.n { text-align: right; font-family: var(--font-data); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 0.74rem; background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.tag.warn { background: rgba(255, 155, 94, 0.16); color: var(--heat); }
.tag.note { border: 1px dashed var(--faint); background: transparent; }

.predict { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; }
.form { display: grid; gap: 14px; align-content: start; }
.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-size: 0.84rem; font-weight: 600; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.field input[type="text"], .field select, .finder input, .signup input {
  border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.06); color: var(--ink);
  border-radius: 12px; padding: 9px 12px; min-width: 0; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
.field select option { background: var(--bg-2); }
.field input[type="text"] { font-family: var(--font-data); width: 9.5em; }
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.hint { font-size: 0.8rem; color: var(--muted); }
.result { display: grid; gap: 12px; }
.bigtime { font-family: var(--font-display); font-weight: 750; font-size: clamp(3.2rem, 9vw, 5rem); line-height: 0.95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.range { font-family: var(--font-data); color: var(--muted); font-size: 0.9rem; }
.bridge { display: grid; gap: 6px; font-size: 0.9rem; }
.bridge div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.bridge div span:last-child { font-family: var(--font-data); white-space: nowrap; }

.pacebar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.band { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); border-radius: var(--r-sm); overflow: hidden; }
.band div { padding: 10px 12px; border-right: 1px solid var(--line); display: grid; }
.band div:last-child { border-right: 0; }
.band .k { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.band .t { font-family: var(--font-data); font-weight: 500; font-size: 1.02rem; }
.splits td.g { color: var(--muted); }
.splits tr.up td.g { color: var(--heat); }
.status { font-size: 0.85rem; color: var(--accent-ink); min-height: 1.2em; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; }
.check li::before { content: ""; width: 16px; height: 16px; border: 1.5px solid var(--accent); border-radius: 6px; margin-top: 3px; }
.signup { display: grid; gap: 12px; border-radius: var(--r); padding: 20px; align-content: start;
  background: linear-gradient(160deg, rgba(79, 216, 154, 0.16), rgba(255, 255, 255, 0.04)); }
.signup form { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input { flex: 1 1 200px; border-radius: 999px; padding: 11px 16px; }

.sources { columns: 2 280px; column-gap: 28px; padding-left: 18px; margin: 0; font-size: 0.88rem; color: var(--muted); }
.sources li { break-inside: avoid; margin-bottom: 6px; }
.disclaimer { font-size: 0.8rem; color: var(--faint); }

/* home page */
.home-hero .band-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr); gap: 32px; align-items: center; padding-block: calc(var(--nav-h) + 84px) 64px; min-height: 640px; }
.home-hero h1 { font-size: clamp(2.9rem, 8vw, 5.6rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.045em; }
.home-hero h1 em { font-style: normal; background: linear-gradient(90deg, #6ff0b0, #4fd89a 60%, #9ee8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero .lead { margin-top: 16px; color: var(--on-photo); }
.finder { display: grid; gap: 10px; margin-top: 22px; }
.finder input { width: 100%; border-radius: 999px; padding: 14px 20px; font-size: 1.05rem; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 30px rgba(0, 0, 0, 0.3); }
.finder input::placeholder { color: rgba(255, 255, 255, 0.6); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); color: var(--on-photo); border-radius: 999px; padding: 6px 13px; cursor: pointer; font-size: 0.86rem;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.chip[aria-pressed="true"] { background: rgba(255, 255, 255, 0.92); color: #0b1410; border-color: transparent; }
.compare-art { border-radius: var(--r-lg); padding: 20px; display: grid; align-content: start; gap: 10px; color: var(--on-photo);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)); border-color: rgba(255, 255, 255, 0.18); }
.compare-art figcaption { font-size: 0.78rem; line-height: 1.45; color: var(--on-photo-muted); padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.12); text-wrap: pretty; }
.compare-art .c-band { fill: rgba(255, 255, 255, 0.12); }
.compare-art .c-dot { fill: #a9d4ff; opacity: 0.8; }
.compare-art .c-tick { stroke: var(--on-photo); }
.compare-art .c-axis-t { fill: rgba(255, 255, 255, 0.6); }
#strips .c-label { font-size: 13px; }
#strips .c-axis-t { font-size: 12px; }
.video-toggle { position: absolute; top: calc(var(--nav-h) + 14px); right: var(--gutter-r); z-index: 2; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1); color: var(--on-photo); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.video-toggle svg { width: 15px; height: 15px; }
.video-toggle:hover { background: rgba(255, 255, 255, 0.18); }

.race-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.race-card { display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-lg); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform 0.2s, border-color 0.2s; }
.race-card:hover { border-color: rgba(79, 216, 154, 0.45); }
@media (prefers-reduced-motion: no-preference) { .race-card:hover { transform: translateY(-3px); } }
.race-card .pic { position: relative; aspect-ratio: 16 / 8; max-width: 100%; overflow: hidden; background: var(--bg-2); }
.race-card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.race-card .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--shade), 0) 40%, rgba(var(--shade), 0.55)); }
.race-card .pic .date { position: absolute; left: 12px; top: 12px; z-index: 1; background: rgba(var(--shade), 0.45); color: var(--on-photo); border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 999px; padding: 4px 11px; font-size: 0.8rem; font-weight: 600; }
.race-card .pic svg { position: absolute; right: 12px; bottom: 10px; width: 34%; height: auto; z-index: 1; }
.race-card .body { padding: 16px 18px 18px; display: grid; gap: 12px; align-content: start; }
.race-card h3 { font-size: 1.4rem; font-weight: 750; letter-spacing: -0.03em; }
.race-card .where { font-size: 0.86rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.kv div { display: grid; }
.kv .k { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.kv .v { font-family: var(--font-display); font-weight: 750; font-size: 1.2rem; letter-spacing: -0.02em; }
.race-card .distances { display: flex; gap: 6px; flex-wrap: wrap; }
.race-card .distances .pill { font-size: 0.78rem; padding: 3px 10px; }
.empty { padding: 18px; border: 1px dashed var(--glass-border); border-radius: var(--r); color: var(--muted); }
.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.modules article { border-radius: var(--r); padding: 18px; display: grid; gap: 6px; align-content: start; }
.modules .big { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; line-height: 1; letter-spacing: -0.04em; color: var(--accent); }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.calc .out { display: grid; gap: 8px; }

@media (max-width: 760px) {
  :root { --nav-h: 60px; }
  .course-grid, .predict, .two, .calc, .home-hero .band-inner { grid-template-columns: minmax(0, 1fr); }
  .hero .band-inner { grid-template-columns: minmax(0, 1fr); min-height: 500px; padding-block: calc(var(--nav-h) + 40px) 22px; }
  .home-hero .band-inner { padding-block: calc(var(--nav-h) + 66px) 40px; min-height: 0; }
  .hero { position: relative; }
  .hero .band-inner { min-height: 0; padding-block: calc(var(--nav-h) + 150px) 22px; }
  .hero-course { position: absolute; top: calc(var(--nav-h) + 14px); right: max(16px, env(safe-area-inset-right, 0px)); width: 104px; max-width: 104px; }
  .hero-course figcaption { display: none; }
  .hero h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .hero .actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hero .actions .btn { justify-content: center; text-align: center; }
  .modules article, .panel { padding: 14px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  /* Wide time-series charts keep a readable scale and scroll sideways inside their panel. */
  .panel:has(> #tempdots) { overflow-x: auto; overscroll-behavior-x: contain; }
  #tempdots { min-width: 600px; }
  .splits { font-size: 0.84rem; }
  .splits th, .splits td { padding-inline: 8px; }
  .hero::after, .home-hero::after { background: linear-gradient(180deg, rgba(var(--shade), 0.6) 0%, rgba(var(--shade), 0.55) 50%, rgb(var(--shade)) 100%); }
  .crumbs { display: none; }
  .nav-glass { padding-left: 14px; gap: 8px; }
}
/* 375 px and narrower: the longer wordmark has to share the nav with two toggles */
@media (max-width: 420px) {
  .brand { font-size: 1.02rem; letter-spacing: -0.045em; }
  .topbar .nav-glass .seg button { padding-inline: 8px; min-width: 36px; }
  .prefs { gap: 4px; }
}
@media (max-width: 340px) {
  .brand { font-size: 0.9rem; }
  .topbar .nav-glass .seg button { padding-inline: 5px; min-width: 30px; }
  .nav-glass { padding-right: 6px; }
}

/* Touch screens: larger tap targets, and 16px inputs so iOS Safari doesn't zoom on focus. */
@media (pointer: coarse) {
  .seg button { min-height: 38px; padding: 8px 14px; }
  .btn { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  input[type="text"], input[type="email"], select { min-height: 44px; }
  .brand { padding-block: 8px; }
}

/* long source URLs and file names in captions and source lists must wrap instead of widening the page */
figcaption, .sources li, .compare, .lead, .muted, .readout, .disclaimer { overflow-wrap: anywhere; }

/* "Updated" line, FAQ and More races blocks (added with the server-rendered race pages) */
.hero .updated { font-size: 0.8rem; color: var(--on-photo-muted); }
.updated-note { font-size: 0.82rem; color: var(--muted); }
.faq { display: grid; gap: 14px; }
.faq-item { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.04); }
.faq-item h3 { font-size: 1.05rem; }
.faq-item p { color: var(--muted); }
.more-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.more-list a { display: grid; gap: 2px; padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.04); color: var(--ink); text-decoration: none; }
.more-list a:hover { border-color: rgba(79, 216, 154, 0.45); }
.more-list b { font-weight: 650; }
.more-list span { font-size: 0.82rem; color: var(--muted); }
.more-links { font-size: 0.92rem; }

/* ======================================================================================================
   Shared look, carried over from the home page redesign (2026-10-24): one top bar and footer on every page,
   photo headers, display-type section titles and the photo sign-up band.
   ====================================================================================================== */
:root { --edge: clamp(20px, 4.45vw, 64px); --gutter-l: max(var(--edge), env(safe-area-inset-left, 0px)); --gutter-r: max(var(--edge), env(safe-area-inset-right, 0px)); }
html, body { overflow-x: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.band-inner, .wrap { max-width: 1200px; }
.topbar .band-inner { max-width: none; }

/* top bar: brand, main links, unit switches where a page has units */
.top-nav { display: flex; gap: 2px; margin-right: auto; margin-left: 12px; min-width: 0; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 500; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.top-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.top-nav a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, 0.1); }
@media (max-width: 760px) { .nav-glass:has(.prefs) .top-nav { display: none; } }
@media (max-width: 400px) { .top-nav a { padding: 7px 8px; font-size: 0.82rem; } .top-nav { margin-left: 4px; } }
/* the pace link: full label, or the short one on phones (two whole phrases, so translations keep their word order) */
.top-nav .nav-s { display: none; }
@media (max-width: 560px) { .top-nav .nav-x { display: none; } .top-nav .nav-s { display: inline; } .top-nav { overflow-x: auto; scrollbar-width: none; } .lang-menu .lm-code { display: none; } .lang-menu summary { padding: 6px 8px; } }
.sf-lang a[aria-current="true"] { color: var(--ink); font-weight: 600; }

/* section titles: the hero's display face, a size down */
.module > header .eyebrow, .page-hero .eyebrow { color: var(--accent-ink); }
.module > header h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
.wrap { gap: clamp(44px, 6vw, 72px); padding-block: clamp(36px, 5vw, 64px) clamp(56px, 7vw, 88px); }

/* breadcrumbs inside a photo header */
.hero-crumbs, .page-hero .crumbs { white-space: normal; overflow: visible; color: var(--on-photo-muted); font-size: 0.82rem; }
.hero-crumbs a, .page-hero .crumbs a { color: var(--on-photo-muted); }
.hero-crumbs a:hover, .page-hero .crumbs a:hover { color: var(--on-photo); }

/* photo header for list and info pages */
.page-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(-1 * var(--nav-h)); color: var(--on-photo); background: rgb(var(--shade));
  min-height: clamp(380px, 52vh, 540px); display: flex; align-items: flex-end; }
.page-hero picture img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; max-width: none; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(var(--shade), 0.86) 0%, rgba(var(--shade), 0.5) 55%, rgba(var(--shade), 0.12) 100%),
    linear-gradient(180deg, rgba(var(--shade), 0.6) 0%, rgba(var(--shade), 0) 26%, rgba(var(--shade), 0) 58%, rgb(var(--shade)) 100%); }
.page-hero .band-inner { width: 100%; display: grid; gap: 14px; justify-items: start; padding-block: calc(var(--nav-h) + 64px) clamp(28px, 5vw, 48px); }
.page-hero h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; max-width: 16ch; text-wrap: balance; overflow-wrap: anywhere; }
.page-hero .lead, .page-hero .hub-intro { margin: 0; max-width: 60ch; font-size: 1.05rem; line-height: 1.55; color: var(--on-photo-muted); }
.page-hero .toc { display: flex; flex-wrap: wrap; gap: 6px; }
.page-hero .toc a { color: var(--on-photo); text-decoration: none; font-size: 0.85rem; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.page-hero .toc a:hover { background: rgba(255, 255, 255, 0.16); }
.page-hero.tall { min-height: 100vh; min-height: 100svh; align-items: center; }

/* race pages: the hero photo, or a generic race-morning image when the race has no licensed photo */
.hero.fallback .photo { object-position: 65% 50%; }
.hero-copy .hero-crumbs { margin-bottom: -4px; }

/* 404 search */
.nf-search { display: flex; gap: 4px; width: min(100%, 560px); padding: 6px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.35); }
.nf-search input { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 0 16px; border: 0; background: transparent; color: var(--on-photo); font-size: 1rem; outline: none; box-shadow: none; }
.nf-search .btn { flex: none; min-height: 48px; border: 0; background: var(--accent); color: #06130d; font-weight: 650; }
.nf-links { margin: 0; font-size: 0.9rem; color: var(--on-photo-muted); }
.nf-links a { color: var(--on-photo); }

/* ---------- countdown sign-up: a photo band like the hero ---------- */
.signup-band { position: relative; isolation: isolate; overflow: hidden; color: var(--on-photo); background: rgb(var(--shade));
  min-height: clamp(460px, 62vh, 620px); display: flex; align-items: center; }
.signup-band picture img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; max-width: none; }
.signup-band::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(var(--shade), 0.88) 0%, rgba(var(--shade), 0.55) 50%, rgba(var(--shade), 0.05) 100%),
    linear-gradient(180deg, rgb(var(--shade)) 0%, rgba(var(--shade), 0) 18%, rgba(var(--shade), 0) 78%, rgb(var(--shade)) 100%); }
.sb-inner { width: 100%; padding: clamp(64px, 9vw, 110px) var(--gutter-r) clamp(64px, 9vw, 110px) var(--gutter-l); display: grid; gap: 16px; justify-items: start; }
.sb-inner .pill { margin: 0; font-size: 0.8rem; }
.sb-inner h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; max-width: 12ch; }
.sb-inner h2 em { font-style: normal; background: linear-gradient(90deg, #6ff0b0, #4fd89a 60%, #9ee8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-lead { margin: 0; max-width: 46ch; font-size: 1.05rem; line-height: 1.5; color: var(--on-photo-muted); }
.signup-band .signup { width: min(100%, 560px); padding: 0; margin-top: 8px; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.signup-band .signup form { flex-wrap: nowrap; gap: 4px; padding: 6px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.35); }
.signup-band .signup input { flex: 1 1 auto; min-width: 0; min-height: 48px; border: 0; background: transparent; box-shadow: none; color: var(--on-photo); font-size: 1rem; padding-inline: 16px; outline: none; }
.signup-band .signup .btn { flex: none; min-height: 48px; border: 0; background: var(--accent); color: #06130d; font-weight: 650; box-shadow: 0 6px 20px rgba(79, 216, 154, 0.35); }
.signup-band .signup .btn:hover { background: #6ff0b0; }
.signup-band .signup-consent { padding-inline: 6px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) var(--gutter-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); }
.sf-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr) minmax(0, 0.9fr) minmax(0, 0.5fr) minmax(0, 1.4fr); gap: 32px 40px; }
.sf-brand { display: grid; gap: 12px; align-content: start; }
.sf-brand .brand { font-size: 1.5rem; }
.sf-brand p { margin: 0; max-width: 34ch; font-size: 0.9rem; line-height: 1.5; }
.sf-col { display: grid; gap: 10px; align-content: start; font-size: 0.9rem; }
.sf-col h2 { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.sf-col a { color: var(--ink); text-decoration: none; width: fit-content; }
.sf-col a:hover { color: var(--accent-ink); }
.sf-data p { margin: 0; font-size: 0.82rem; line-height: 1.55; color: var(--muted); }
.sf-data a { display: inline; color: var(--accent-ink); }
.sf-legal { max-width: none; margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--faint); }

/* the band inside a race page's content column bleeds to the screen edges */
.wrap > .signup-band { margin-inline: calc(50% - 50vw); min-height: clamp(400px, 52vh, 540px); }
.signup-band.compact .sb-inner { padding-block: clamp(56px, 7vw, 88px); }
.signup-band.compact h2 { max-width: 18ch; font-size: clamp(2rem, 4.2vw, 3.4rem); }
@media (min-width: 1329px) { .wrap > .signup-band .sb-inner { padding-left: calc(50vw - 600px + var(--gutter-l)); } }

@media (max-width: 960px) {
  .sf-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sf-brand, .sf-data { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .page-hero { min-height: 0; }
  .hero-crumbs, .page-hero .crumbs { display: block; }
  /* long list-page intros stay in the page for search, but show a few lines on a phone */
  .page-hero .hub-intro { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }
  .page-hero .band-inner { padding-top: calc(var(--nav-h) + 120px); }
  .page-hero::after { background: linear-gradient(180deg, rgba(var(--shade), 0.55) 0%, rgba(var(--shade), 0.35) 30%, rgba(var(--shade), 0.85) 70%, rgb(var(--shade)) 100%); }
  .page-hero.tall { min-height: 100svh; align-items: flex-end; }
  .nf-search { flex-wrap: wrap; border-radius: 24px; }
  .nf-search input { flex-basis: 100%; }
  .nf-search .btn { flex: 1 1 100%; justify-content: center; }
  .signup-band { min-height: 0; align-items: flex-end; }
  .signup-band picture img { object-position: 60% 30%; }
  .signup-band::after { background: linear-gradient(180deg, rgb(var(--shade)) 0%, rgba(var(--shade), 0.2) 25%, rgba(var(--shade), 0.6) 55%, rgba(var(--shade), 0.94) 100%); }
  .sb-inner { padding-top: 220px; }
  .signup-band .signup form { flex-wrap: wrap; border-radius: 24px; }
  .signup-band .signup input { flex-basis: 100%; }
  .signup-band .signup .btn { flex: 1 1 100%; justify-content: center; }
}

/* Results & history (race pages) */
.results h3.sub { margin: 26px 0 10px; font-size: 1.05rem; }
.results .fact .s .cc, .podium .cc { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted); }
.results .src { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.eds { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.ed { padding: 16px 18px; border-radius: var(--r-sm); }
.ed h3 { margin: 0 0 10px; font-size: 1rem; }
.ed-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ed h4 { margin: 0 0 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.podium { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 0.9rem; }
.podium li { overflow-wrap: anywhere; }
.podium .t { display: block; font-variant-numeric: tabular-nums; font-weight: 600; }
.ed p.muted { margin: 10px 0 0; }
.fun { padding-left: 18px; display: grid; gap: 8px; margin: 0; }
.results .small { font-size: 0.8rem; margin-top: 16px; }
@media (max-width: 420px) { .ed-cols { grid-template-columns: 1fr; } }

/* phone menu (chrome.MOBILE_MENU): under 760px it replaces the inline nav and the language menu */
.nav-menu { display: none; position: relative; flex: none; }
.nav-menu summary { list-style: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; cursor: pointer; color: var(--ink); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary, .nav-menu summary:hover { background: rgba(255, 255, 255, 0.1); }
.nm-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(280px, calc(100vw - 32px)); padding: 8px; border-radius: 18px; z-index: 30;
  background: rgba(16, 26, 21, 0.9); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.5); animation: lm-in 0.16s ease-out; }
.nm-panel nav { display: grid; gap: 2px; }
.nm-panel a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 1rem; }
.nm-panel a:hover, .nm-panel a[aria-current="page"], .nm-panel a[aria-current="true"] { background: rgba(255, 255, 255, 0.1); }
.nm-panel .nav-x { display: inline !important; } .nm-panel .nav-s { display: none !important; }
.nm-lang { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.1); grid-template-columns: 1fr 1fr; }
.nm-lang a { font-size: 0.9rem; padding: 9px 10px; }
@media (max-width: 900px) {
  .nav-menu { display: block; }
  .nav-glass .top-nav, .nav-glass .lang-menu { display: none; }
  .nav-glass { padding-right: 6px; padding-left: 14px; gap: 6px; }
  .nav-glass .brand { flex-shrink: 0; }
  .nav-glass .prefs { margin-left: auto; gap: 4px; }
}
@media (max-width: 420px) { .topbar .nav-glass .seg button { padding-inline: 6px; min-width: 32px; } .nav-menu summary { width: 34px; height: 34px; } .nav-glass { padding-left: 12px; padding-right: 4px; } }

/* race page "On this page" bar: sticks under the floating nav */
.sec-nav { position: sticky; top: calc(var(--nav-h) + 4px); z-index: 15; display: flex; gap: 2px; width: max-content; max-width: 100%; margin: 18px auto 0; padding: 4px; border-radius: 999px;
  overflow-x: auto; scrollbar-width: none; background: rgba(16, 26, 21, 0.6); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 22px rgba(0, 0, 0, 0.3); }
.sec-nav::-webkit-scrollbar { display: none; }
.sec-nav a { flex: none; padding: 7px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.84rem; font-weight: 500; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.sec-nav a:hover { color: var(--ink); }
.sec-nav a[aria-current] { background: rgba(255, 255, 255, 0.92); color: #0b1410; }
@media (max-width: 760px) { .sec-nav { margin-inline: 0; border-radius: 16px; } .sec-nav a { padding: 7px 11px; } }
section[id] { scroll-margin-top: calc(var(--nav-h) + 70px); }

/* folded detail (every split, method notes) */
.more-box { margin-top: 18px; }
.more-box > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  color: var(--ink); border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.05); }
.more-box > summary::-webkit-details-marker { display: none; }
.more-box > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.2s; }
.more-box[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.more-box[open] > summary { margin-bottom: 14px; }
@media print { .sec-nav { display: none; } }

/* no backdrop blur: what floats over photos or scrolling content needs a denser fill to stay readable */
.nav-glass { background: rgba(16, 26, 21, 0.96); }
.sec-nav { background: rgba(16, 26, 21, 0.96); }
.lm-list { background: rgba(16, 26, 21, 0.97); }
.nm-panel { background: rgba(16, 26, 21, 0.97); }
.race-card .pic .date { background: rgba(var(--shade), 0.72); }
.btn.ghost, .finder input, .chip, .video-toggle, .page-hero .toc a, .nf-search, .signup-band .signup form { background: rgba(var(--shade), 0.5); }

/* Race-week guide and course walk-through (content plan, Phase 1) */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; align-items: start; }
.guide-sec { border-radius: var(--r-sm); border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.04); padding: 16px 18px; }
.guide-sec h3 { font-size: 1.05rem; margin: 0 0 10px; }
.guide-sec dl { margin: 0; display: grid; gap: 12px; }
.g-row dt { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.g-row dd { margin: 0; font-size: 0.95rem; line-height: 1.5; overflow-wrap: anywhere; }
.guide .src, .walk .src { font-size: 0.78rem; white-space: nowrap; color: var(--muted); }
.guide-np ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.92rem; display: grid; gap: 4px; }
.guide-np p { font-size: 0.88rem; margin: 0; }
.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.changes li { display: grid; gap: 2px; font-size: 0.95rem; }
.changes time { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.correction { margin-top: 14px; }
.walk { margin-top: 26px; }
.walk h3 { font-size: 1.15rem; margin: 0 0 6px; }
.walk-lead { color: var(--muted); margin: 0 0 12px; }
.walk-t { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.walk-t th, .walk-t td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--glass-border); }
.walk-t .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.walk-t thead th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.walk-t tbody th { font-weight: 600; }
.walk-f { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; min-width: 220px; }
.walk-f li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.walk-f .km, .walk-f .k { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.walk .small { font-size: 0.8rem; margin-top: 10px; }
.tag.ok { background: rgba(79, 216, 154, 0.16); color: var(--accent, #4fd89a); }
.confirmed { margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.confirmed .by { color: var(--ink); }

/* Spectator planner (content plan, Phase 2) */
.sp-controls { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-bottom: 8px; }
.sp-controls label { display: grid; gap: 6px; }
.sp-controls input { font: inherit; color: var(--ink); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-border); border-radius: 12px; padding: 9px 12px; width: 150px; color-scheme: dark; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; margin-top: 14px; align-items: start; }
@media (max-width: 760px) { .sp-grid { grid-template-columns: 1fr; } }
.sp-pick, .sp-plan { border-radius: var(--r-sm); border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.04); padding: 16px 18px; }
.sp-pick h3, .sp-plan h3 { font-size: 1.05rem; margin: 0 0 10px; }
.sp-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; display: grid; gap: 2px; }
.sp-list label { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 7px 6px; border-radius: 10px; cursor: pointer; font-size: 0.92rem; }
.sp-list label:hover { background: rgba(255, 255, 255, 0.05); }
.sp-list input { accent-color: var(--accent, #4fd89a); width: 16px; height: 16px; margin: 0; align-self: center; }
.spectate .k, .spectate .km { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.sp-rows { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 0; }
.sp-rows li { padding: 10px 0; border-bottom: 1px solid var(--glass-border); }
.sp-rows li:last-child { border-bottom: 0; }
.sp-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sp-t { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.sp-win { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.sp-move { margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); }
.sp-rows li.tight .sp-move { color: var(--heat); }
.spectate .small { font-size: 0.8rem; margin-top: 12px; }
/* entry calendar: race-page module (pipeline/guide_html.py entry_html) and /entries/ (pipeline/build_entries.py) */
.entry-state { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin: 4px 0 12px; font-size: 1.02rem; }
.entry-go { margin: 0 0 14px; }
.entry .src, .entries .src { font-size: 0.78rem; white-space: nowrap; color: var(--muted); }
.entry-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.entry-dates li { display: grid; grid-template-columns: 10.5em minmax(0, 1fr); gap: 4px 12px; align-items: baseline; }
.entry-dates time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.92rem; }
.entry-dates b { font-weight: 600; }
.entry-dates p { margin: 2px 0 0; font-size: 0.92rem; color: var(--muted); }
.entry-dates li.past, .entry-dates li.hint-row { opacity: 0.62; }
.entry-alert { margin-top: 16px; border-radius: var(--r-sm); border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.04); padding: 16px 18px; }
.entry-alert h3 { font-size: 1.05rem; margin: 0 0 6px; }
.entry-alert p { margin: 0 0 10px; font-size: 0.9rem; }
.entry-alert .signup { padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 560px) { .entry-dates li { grid-template-columns: 1fr; } }
.entries-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.entries-list li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 4px 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
.entries-list li:last-child { border-bottom: 0; }
.entries-list time { font-variant-numeric: tabular-nums; font-weight: 600; }
.entries-list .what { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
@media (max-width: 560px) { .entries-list li { grid-template-columns: 1fr; } }
.entries-list li > .tag { justify-self: start; }

/* ======================================================================================================
   Responsive structure pass (2026-11-12): measured with headless Chromium at 360/390/768/1024/1440.
   ====================================================================================================== */
/* `hidden` must win over component display rules (.field and the calculator output are display: grid) */
[hidden] { display: none !important; }

/* fact tiles: at least two per row; a value that reads as a phrase (flagged .long by render_pages.py / race.js)
   takes two columns and text size, and a row of facts holding one switches to four even tracks on wider screens
   (six tiles, two of them long, fill two full rows instead of one row stretched to the tallest note); long
   German compounds hyphenate instead of running into the next tile */
.facts { grid-template-columns: repeat(auto-fit, minmax(min(150px, calc(50% - 5px)), 1fr)); }
.fact .v, .fact .eyebrow { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.facts .fact.long { grid-column: span 2; }
.fact.long .v { font-size: 1.1rem; line-height: 1.3; }
@media (min-width: 761px) { .facts:has(> .fact.long) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* logistics tiles hold places and sentences, not numbers: wider tracks (one column on a phone), text-size values */
div#logistics.facts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
div#logistics .fact .v.sm { font-size: 1.05rem; line-height: 1.3; }

/* wide data tables on phones scroll inside their panel; the row label column stays in view while they do */
@media (max-width: 760px) {
  .table-wrap { overscroll-behavior-x: contain; }
  .table-wrap > table > * > tr > :first-child { position: sticky; left: 0; z-index: 1; background: rgb(17, 25, 21); box-shadow: 1px 0 0 var(--line); }
}

/* touch: 40-44px targets for the menu, footer links, section bar and photo-header links; 16px controls so iOS
   Safari does not zoom (the attribute selectors outrank page rules such as `.rk-ctl select`) */
@media (pointer: coarse) {
  .nav-menu summary, .topbar .nav-menu summary { width: 44px; height: 44px; }
  .sf-col { gap: 0; }
  .sf-col h2 { margin-bottom: 8px; }
  .sf-col a { padding-block: 9px; }
  .sec-nav a { padding-block: 10px; }
  .page-hero .toc a { padding-block: 10px; }
  .field input[type="range"] { height: 32px; }
  :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]) { font-size: 16px; }
}

/* module sections are one-column grids: an explicit minmax(0, 1fr) track keeps a wide child (the course
   walk-through table, a long date list) from widening the whole section past the screen; the child scrolls instead */
section.module { grid-template-columns: minmax(0, 1fr); }
/* key-date lists inside a guide card: the date column stacks above its text when the card is narrow */
.guide-sec { container-type: inline-size; min-width: 0; }
@container (max-width: 520px) { .entry-dates li { grid-template-columns: minmax(0, 1fr); } }
/* source links in the guide, walk-through and entry modules carry whole page names ("Official registration page",
   longer in German and Spanish), so they wrap inside narrow cards instead of running out of them */
.guide .src, .walk .src, .entry .src, .entries .src { white-space: normal; }
