/* Mpumalanga Cycling Union — public site
   Surface A tokens (brand/tokens/mcu-tokens.css) with the accent converged to brand yellow
   #F0CD0E (Matt, 2026-08-05, ledger 2026-08-05-10). Fonts self-hosted (OFL). */

@font-face { font-family: 'Bebas Neue'; src: url('../fonts/BebasNeue-latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('../fonts/HankenGrotesk-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/JetBrainsMono-latin.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --board: #0E1626; --panel: #1a2942; --panel2: #223257; --navy: #113E60;
  --flux: #F0CD0E; --flux-dim: #F7DE5A; --alert: #EA5A2B; --ok: #2F9E73;
  --paper: #EAF0F8; --steel: #aeb9cc; --line: rgba(255,255,255,.10); --line2: rgba(255,255,255,.18);
  --ink: #0E1626;
  --font-display: 'Bebas Neue', 'Hanken Grotesk', sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sp1: .35rem; --sp2: .7rem; --sp3: 1.1rem; --sp4: 1.6rem; --sp6: 2.6rem; --sp8: 4rem; --sp12: 6.5rem;
  --dur-fast: .14s; --dur: .28s; --dur-slow: .8s; --ease: cubic-bezier(.2,.7,.2,1); --ease-out: cubic-bezier(.16,1,.3,1);
  --wrap: 1280px; --gutter: clamp(16px, 4vw, 48px);
  --radius: 4px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--board); color: var(--paper); font: 400 1.0625rem/1.55 var(--font-body); font-feature-settings: 'ss01', 'cv11'; min-height: 100svh; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--flux); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--flux-dim); }
:focus-visible { outline: 3px solid var(--flux); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; line-height: .95; margin: 0; text-transform: uppercase; }
h1 { font-size: clamp(3.2rem, 9vw, 7.5rem); }
h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
p { margin: 0 0 var(--sp3); max-width: 68ch; }
.lede { font-size: clamp(1.15rem, 1.4vw, 1.35rem); color: var(--paper); max-width: 60ch; }
.muted { color: var(--steel); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 100; background: var(--flux); color: var(--ink); padding: .6rem 1rem; font-weight: 700; border-radius: var(--radius); }
.skip:focus { top: .6rem; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: .55rem 1.25rem; border-radius: var(--radius); font-weight: 600; text-decoration: none; background: var(--flux); color: var(--ink); transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.btn:hover { background: var(--flux-dim); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn-ghost:hover { background: rgba(255,255,255,.06); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp2); }

/* ---------- Masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--board) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.masthead-in { display: flex; align-items: center; justify-content: space-between; gap: var(--sp3); min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--paper); }
.brand img { width: 40px; height: 40px; }
.brand-word { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .02em; line-height: 1; text-transform: uppercase; }
.brand-word small { display: block; font-family: var(--font-body); font-size: .7rem; letter-spacing: .04em; text-transform: none; color: var(--steel); font-weight: 500; margin-top: .15rem; }
.nav { display: flex; gap: .25rem; align-items: center; }
.nav a { color: var(--paper); text-decoration: none; padding: .6rem .8rem; border-radius: var(--radius); font-weight: 500; font-size: .98rem; position: relative; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a[aria-current="page"] { color: var(--flux); }
.nav a[aria-current="page"]::after { content: ''; position: absolute; left: .8rem; right: .8rem; bottom: .3rem; height: 2px; background: var(--flux); }
.nav .nav-cta { margin-left: .5rem; background: var(--flux); color: var(--ink); font-weight: 700; }
.nav .nav-cta:hover { background: var(--flux-dim); }
.nav .nav-cta[aria-current="page"] { color: var(--ink); }
.nav .nav-cta[aria-current="page"]::after { display: none; }
.nav-toggle { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: var(--radius); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 2px; background: var(--paper); position: relative; transition: transform var(--dur) var(--ease), opacity var(--dur); content: ''; }
.nav-toggle span::before { position: absolute; top: -7px; } .nav-toggle span::after { position: absolute; top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--board); border-bottom: 1px solid var(--line); padding: var(--sp2) var(--gutter) var(--sp4); gap: .1rem; display: none; }
  .nav-open .nav { display: flex; }
  .nav a { padding: .85rem .6rem; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav .nav-cta { margin: var(--sp2) 0 0; text-align: center; border: 0; }
  .brand-word { font-size: 1.25rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(92svh, 860px); display: grid; align-items: end; background: var(--board); }
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg picture { position: absolute; inset: 0; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; filter: saturate(.9) contrast(1.02); }
.hero-scrim { position: absolute; inset: 0; z-index: -2; background:
  linear-gradient(180deg, rgba(14,22,38,.55) 0%, rgba(14,22,38,.15) 30%, rgba(14,22,38,.55) 65%, var(--board) 100%),
  linear-gradient(90deg, rgba(14,22,38,.55) 0%, rgba(14,22,38,0) 60%); }
.hero-rays { position: absolute; z-index: -1; right: -18vw; top: -34vw; width: 120vw; height: 120vw; max-width: 1400px; max-height: 1400px; pointer-events: none; opacity: .7;
  background: repeating-conic-gradient(from 0deg, rgba(240,205,14,.16) 0deg 3.2deg, transparent 3.2deg 22.5deg);
  -webkit-mask: radial-gradient(circle at center, #000 0, rgba(0,0,0,.55) 30%, transparent 62%); mask: radial-gradient(circle at center, #000 0, rgba(0,0,0,.55) 30%, transparent 62%); mix-blend-mode: screen; }
.hero-in { position: relative; padding: var(--sp12) 0 var(--sp6); display: grid; gap: var(--sp4); }
.hero-kicker { font-family: var(--font-mono); font-size: .85rem; color: var(--flux); letter-spacing: .02em; display: flex; gap: .8rem; align-items: center; }
.hero-kicker::before { content: ''; width: 34px; height: 2px; background: var(--flux); }
.hero h1 { max-width: 12ch; text-wrap: balance; }
.hero h1 .line { display: block; }
.hero .lede { max-width: 52ch; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp6); align-items: end; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { min-height: 0; } .hero-in { padding-top: var(--sp8); } }

/* Next-race board (hero right) */
.board { background: color-mix(in srgb, var(--panel) 78%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line2); border-top: 1px solid var(--flux); padding: var(--sp3) var(--sp4); display: grid; gap: var(--sp2); max-width: 460px; }
.board-h { font-family: var(--font-mono); font-size: .8rem; color: var(--steel); display: flex; justify-content: space-between; }
.board-title { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); text-transform: uppercase; line-height: 1; }
.board-date { font-family: var(--font-mono); color: var(--flux); font-size: 1.05rem; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .3rem; }
.countdown div { background: var(--board); border: 1px solid var(--line); padding: .5rem .3rem; text-align: center; }
.countdown b { display: block; font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; color: var(--paper); line-height: 1.1; }
.countdown span { font-size: .68rem; color: var(--steel); letter-spacing: .04em; }
.board a { font-weight: 600; }

/* ---------- Season strip (signature) ---------- */
.strip-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(17,62,96,.35), transparent); }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp3); padding: var(--sp3) 0 0; }
.strip-head h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.strip-head .mono { font-size: .8rem; color: var(--steel); }
.strip { position: relative; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--panel2) transparent; padding: var(--sp3) 0 var(--sp4); -webkit-overflow-scrolling: touch; }
.strip-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(94px, 1fr); min-width: 1150px; padding-top: 44px; }
.strip-track::before { content: ''; position: absolute; left: 0; right: 0; top: 28px; height: 2px; background: var(--line2); transform-origin: left; }
.strip-month { position: relative; border-left: 1px solid var(--line); padding: 0 .35rem; min-height: 150px; }
.strip-month > b { position: absolute; top: -44px; left: .5rem; font-family: var(--font-mono); font-weight: 500; font-size: .78rem; color: var(--steel); }
.strip-month.is-now > b { color: var(--flux); }
.tick { display: block; width: 100%; text-align: left; margin-top: 18px; padding: .35rem .4rem .35rem .55rem; border-left: 2px solid var(--flux); text-decoration: none; color: var(--paper); font-size: .78rem; line-height: 1.25; position: relative; border-radius: 0 var(--radius) var(--radius) 0; transition: background var(--dur-fast); }
.tick::before { content: ''; position: absolute; left: -7px; top: -22px; width: 12px; height: 12px; border-radius: 50%; background: var(--board); border: 2px solid var(--flux); }
.tick:first-of-type { margin-top: 0; }
.tick:hover, .tick:focus-visible { background: rgba(255,255,255,.07); color: var(--paper); }
.tick .mono { display: block; color: var(--flux); font-size: .72rem; }
.tick.past { opacity: .45; }
.tick.is-next { background: rgba(240,205,14,.12); }
.tick.disc-enduro { border-color: var(--ok); } .tick.disc-enduro::before { border-color: var(--ok); }
.tick.disc-xcm { border-color: var(--alert); } .tick.disc-xcm::before { border-color: var(--alert); }
.tick.disc-schools { border-color: var(--flux-dim); } .tick.disc-schools::before { border-color: var(--flux-dim); }
.tick.disc-club { border-color: var(--steel); } .tick.disc-club::before { border-color: var(--steel); }
.tick.disc-road { border-color: var(--paper); } .tick.disc-road::before { border-color: var(--paper); }
.strip-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--steel); padding-bottom: var(--sp3); }
.strip-legend span { white-space: nowrap; }
.strip-legend i { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 50%; border: 2px solid var(--flux); margin-right: .35rem; vertical-align: -1px; font-style: normal; line-height: 0; }
.strip-legend span { display: inline-flex; align-items: center; }
.strip-legend i.enduro { border-color: var(--ok); } .strip-legend i.xcm { border-color: var(--alert); } .strip-legend i.schools { border-color: var(--flux-dim); } .strip-legend i.club { border-color: var(--steel); } .strip-legend i.road { border-color: var(--paper); }

/* ---------- Sections ---------- */
.section { padding: var(--sp8) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp3); align-items: end; margin-bottom: var(--sp4); }
.section-h p { margin: .5rem 0 0; color: var(--steel); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp6); align-items: start; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp4); }
@media (min-width: 861px) { .two-wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
@media (max-width: 860px) { .two, .three { grid-template-columns: 1fr; } .section-h { grid-template-columns: 1fr; } }
.rule-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line2); }
.rule-list > li { padding: var(--sp3) 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; }
.rule-list h3 { font-size: 1.35rem; }
.rule-list p { margin: 0; color: var(--steel); max-width: 58ch; }
.who { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid var(--line2); }
.who > div { padding: var(--sp3) var(--sp4); border-right: 1px solid var(--line2); }
.who > div:last-child { border-right: 0; }
.who h3 { font-size: 1.2rem; color: var(--flux); margin-bottom: .4rem; }
.who p { margin: 0; color: var(--steel); font-size: .98rem; }
@media (max-width: 860px) { .who { grid-template-columns: 1fr; } .who > div { border-right: 0; border-bottom: 1px solid var(--line2); } .who > div:last-child { border-bottom: 0; } }

/* Discipline explorer (interactive) */
.explorer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--sp4); align-items: stretch; }
.explorer-tabs { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.explorer-tabs button { display: grid; grid-template-columns: 3.2rem 1fr auto; align-items: center; gap: var(--sp2); width: 100%; text-align: left; padding: .8rem .9rem; border-left: 3px solid transparent; background: var(--panel); transition: background var(--dur-fast), border-color var(--dur-fast); min-height: 60px; }
.explorer-tabs button:hover { background: var(--panel2); }
.explorer-tabs button[aria-selected="true"] { background: var(--panel2); border-left-color: var(--flux); }
.explorer-tabs .mono { color: var(--flux); font-size: .8rem; }
.explorer-tabs b { font-weight: 600; }
.explorer-tabs small { color: var(--steel); font-size: .8rem; font-family: var(--font-mono); }
.explorer-panel { position: relative; min-height: 380px; background: var(--panel); overflow: hidden; }
.explorer-panel picture, .explorer-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.explorer-panel .pane { margin: 0; position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur-slow) var(--ease); }
.explorer-panel .pane.is-active { opacity: 1; }
.explorer-panel .pane-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--sp4); background: linear-gradient(180deg, transparent, rgba(14,22,38,.94) 55%); }
.explorer-panel .pane-cap h3 { font-size: 2rem; margin-bottom: .3rem; }
.explorer-panel .pane-cap p { margin: 0 0 .6rem; color: var(--paper); max-width: 52ch; font-size: .98rem; }
.explorer-panel .pane-cap a { font-weight: 600; }
@media (max-width: 860px) { .explorer { grid-template-columns: 1fr; } .explorer-panel { min-height: 320px; } }

/* Photo band */
.band { position: relative; min-height: min(46vh, 440px); overflow: hidden; }
.band img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.band-in { position: relative; padding: var(--sp8) 0; background: linear-gradient(90deg, rgba(14,22,38,.92) 0, rgba(14,22,38,.6) 55%, rgba(14,22,38,.2) 100%); }
.band blockquote { margin: 0; font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1; max-width: 18ch; }
.band cite { display: block; font-family: var(--font-mono); font-style: normal; font-size: .85rem; color: var(--flux); margin-top: var(--sp3); }

/* ---------- Page head ---------- */
.page-head { padding: var(--sp8) 0 var(--sp4); background: linear-gradient(180deg, rgba(17,62,96,.4), transparent); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); }
.page-head .lede { margin-top: var(--sp3); }
.crumb { font-family: var(--font-mono); font-size: .8rem; color: var(--steel); margin-bottom: var(--sp3); }
.crumb a { color: var(--steel); }

/* ---------- Race list / calendar ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: var(--sp3) 0 var(--sp4); }
.filters legend, .filters .lbl { font-family: var(--font-mono); font-size: .78rem; color: var(--steel); margin-right: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem .95rem; border-radius: 999px; border: 1.5px solid var(--line2); color: var(--paper); font-weight: 500; font-size: .92rem; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.chip:hover { background: rgba(255,255,255,.06); }
.chip[aria-pressed="true"], .chip:has(input:checked) { background: var(--flux); border-color: var(--flux); color: var(--ink); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--flux); display: inline-block; }
.chip[aria-pressed="true"] i { border-color: var(--ink); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp2); align-items: center; }
.seg { display: inline-flex; border: 1.5px solid var(--line2); border-radius: var(--radius); overflow: hidden; }
.seg button { min-height: 44px; padding: 0 1rem; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.race-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line2); }
.race { border-bottom: 1px solid var(--line); }
.race.is-hidden { display: none; }
.race-btn { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: var(--sp3); align-items: center; width: 100%; text-align: left; padding: .8rem 0; transition: background var(--dur-fast); }
.race-btn:hover { background: rgba(255,255,255,.04); }
.race.is-past .race-btn { opacity: .55; }
.plate { display: grid; grid-template-rows: auto auto auto; justify-items: center; width: 68px; padding: .35rem 0 .4rem; background: var(--paper); color: var(--ink); border-radius: 3px; font-family: var(--font-mono); line-height: 1; box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.plate-day { font-size: .62rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.plate-num { font-size: 1.7rem; font-weight: 700; margin: .12rem 0; }
.plate-mon { font-size: .68rem; font-weight: 600; text-transform: uppercase; }
.race.is-next .plate { background: var(--flux); }
.race-main { display: grid; gap: .15rem; min-width: 0; }
.race-title { font-family: var(--font-display); text-transform: uppercase; font-size: 1.45rem; line-height: 1; letter-spacing: .01em; }
.race-sub { color: var(--steel); font-size: .9rem; }
.race-meta { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; align-items: center; max-width: 320px; }
.race-town { font-size: .85rem; color: var(--steel); }
.disc { font-family: var(--font-mono); font-size: .72rem; padding: .2rem .5rem; border: 1px solid var(--line2); border-radius: 3px; color: var(--paper); white-space: nowrap; }
.disc::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--flux); margin-right: .4rem; vertical-align: 1px; }
.disc-enduro::before { background: var(--ok); } .disc-xcm::before { background: var(--alert); } .disc-schools::before { background: var(--flux-dim); } .disc-club::before { background: var(--steel); } .disc-road::before { background: var(--paper); }
.flag { font-family: var(--font-mono); font-size: .68rem; padding: .18rem .45rem; border-radius: 3px; white-space: nowrap; }
.flag-tbc { background: rgba(234,90,43,.18); color: #ffb597; border: 1px solid rgba(234,90,43,.5); }
.flag-ok { background: rgba(47,158,115,.16); color: #8fe0bf; border: 1px solid rgba(47,158,115,.5); }
.flag-org { background: rgba(255,255,255,.08); color: var(--steel); border: 1px solid var(--line2); }
.month-h { font-family: var(--font-mono); font-size: .8rem; color: var(--flux); padding: var(--sp3) 0 .4rem; border-bottom: 1px solid var(--line2); margin-top: var(--sp3); }
.empty { padding: var(--sp6) 0; color: var(--steel); text-align: center; }
@media (max-width: 700px) {
  .race-btn { grid-template-columns: 64px minmax(0, 1fr); }
  .race-meta { grid-column: 2; justify-content: flex-start; max-width: none; }
  .plate { width: 58px; } .plate-num { font-size: 1.45rem; }
  .race-title { font-size: 1.25rem; }
}

/* Month grid view */
.grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp3); }
.month { border: 1px solid var(--line); padding: var(--sp2); }
.month h3 { font-size: 1.1rem; color: var(--steel); font-family: var(--font-mono); text-transform: none; margin-bottom: .4rem; }
.month table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: .8rem; }
.month th { font-weight: 500; color: var(--steel); padding: .15rem 0; }
.month td { text-align: center; padding: 0; }
.month td > span, .month td > button { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 3px; min-height: 30px; }
.month td.we > span { color: var(--steel); }
.month td button { background: var(--flux); color: var(--ink); font-weight: 700; }
.month td button.disc-enduro { background: var(--ok); color: var(--paper); } .month td button.disc-xcm { background: var(--alert); color: var(--paper); } .month td button.disc-schools { background: var(--flux-dim); } .month td button.disc-club { background: var(--steel); } .month td button.disc-road { background: var(--paper); }
.month td button.multi { background: linear-gradient(135deg, var(--flux) 50%, var(--alert) 50%); }
.month ul { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .8rem; display: grid; gap: .2rem; }
.month li { display: flex; gap: .5rem; }
.month li .mono { color: var(--flux); min-width: 3.2rem; }

/* Race detail (native <dialog>) */
dialog.sheet { border: 0; padding: 0; background: var(--panel); color: var(--paper); width: min(100%, 640px); max-height: 100svh; margin: auto 0 auto auto; height: 100svh; box-shadow: -20px 0 60px rgba(0,0,0,.5); }
dialog.sheet::backdrop { background: rgba(6,10,20,.66); backdrop-filter: blur(3px); }
.sheet-in { padding: var(--sp4) var(--sp4) var(--sp8); display: grid; gap: var(--sp3); overflow-y: auto; height: 100%; }
.sheet-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp2); }
.sheet h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.close { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line2); font-size: 1.4rem; line-height: 1; }
.close:hover { background: rgba(255,255,255,.08); }
.sheet .plate { width: 76px; }
.sheet dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1rem; font-size: .98rem; }
.sheet dt { font-family: var(--font-mono); font-size: .78rem; color: var(--steel); padding-top: .2rem; }
.sheet dd { margin: 0; }
.sheet .note { background: rgba(234,90,43,.12); border: 1px solid rgba(234,90,43,.45); padding: .7rem .9rem; font-size: .92rem; }
.sheet .note-ok { background: rgba(47,158,115,.12); border-left-color: var(--ok); }
.sheet .fine { color: var(--steel); font-size: .85rem; }
@media (max-width: 700px) { dialog.sheet { width: 100%; height: 92svh; margin: auto 0 0; border-radius: 12px 12px 0 0; } }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-in var(--dur) var(--ease-out); }
  @keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } }
  @media (max-width: 700px) { @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } } }
}

/* ---------- Clubs ---------- */
.search { display: flex; gap: .5rem; align-items: center; flex: 1 1 260px; max-width: 420px; }
.search input { flex: 1; min-height: 46px; padding: .5rem .9rem; background: var(--panel); border: 1.5px solid var(--line2); border-radius: var(--radius); color: var(--paper); font: inherit; }
.search input::placeholder { color: var(--steel); }
.district { margin-top: var(--sp4); }
.district.is-hidden { display: none; }
.district-h { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: .5rem; border-bottom: 2px solid var(--flux); font-size: 1.4rem; }
.district-n { color: var(--flux); font-size: 1rem; }
.club-list { list-style: none; margin: 0; padding: 0; }
.club { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: var(--sp3); align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.club.is-hidden { display: none; }
.club-n { color: var(--steel); font-size: .85rem; }
.club-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .7rem; min-width: 0; }
.club-name { font-weight: 600; font-size: 1.05rem; }
.club-town { color: var(--steel); font-size: .92rem; }
.club-links { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }
.club-links a { min-height: 40px; display: inline-flex; align-items: center; padding: .2rem .75rem; border: 1.5px solid var(--line2); border-radius: 999px; text-decoration: none; color: var(--paper); font-size: .88rem; font-weight: 500; }
.club-links a:hover { border-color: var(--flux); color: var(--flux); }
@media (max-width: 700px) { .club { grid-template-columns: 2.2rem minmax(0, 1fr); } .club-links { grid-column: 2; justify-content: flex-start; } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.steps li { counter-increment: s; background: var(--panel); padding: var(--sp4); display: grid; gap: .5rem; align-content: start; border-top: 3px solid var(--flux); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-mono); color: var(--flux); font-size: .85rem; }
.steps h3 { font-size: 1.5rem; }
.steps p { margin: 0; color: var(--steel); font-size: .98rem; }
.steps a { font-weight: 600; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Host a race: process rail + planner ---------- */
.rail { list-style: none; margin: 0; padding: 0; counter-reset: r; position: relative; }
.rail::before { content: ''; position: absolute; left: 23px; top: 12px; bottom: 12px; width: 2px; background: var(--line2); }
.rail > li { counter-increment: r; position: relative; padding: .2rem 0 var(--sp4) 4.2rem; }
.rail > li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--board); border: 2px solid var(--flux); font-family: var(--font-mono); font-weight: 600; color: var(--flux); }
.rail > li.is-done::before { background: var(--flux); color: var(--ink); }
.rail h3 { font-size: 1.6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.rail h3 .lead { font-family: var(--font-mono); font-size: .75rem; color: var(--alert); text-transform: none; letter-spacing: 0; }
.rail p { color: var(--steel); margin: .4rem 0 0; max-width: 62ch; }
.rail .tick-row { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; font-size: .9rem; color: var(--steel); }
.rail input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--flux); }
.progress { display: grid; gap: .4rem; margin: var(--sp3) 0 var(--sp4); }
.progress .bar { height: 8px; background: var(--panel2); border-radius: 999px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--flux); transition: width var(--dur-slow) var(--ease-out); }
.progress .mono { font-size: .8rem; color: var(--steel); }
.planner { background: var(--panel); border: 1px solid var(--line2); padding: var(--sp4); display: grid; gap: var(--sp3); position: sticky; top: 5.2rem; }
.planner h3 { font-size: 1.6rem; }
.planner label { display: grid; gap: .3rem; font-size: .9rem; color: var(--steel); }
.planner input[type="date"] { min-height: 46px; padding: .4rem .7rem; background: var(--board); border: 1.5px solid var(--line2); border-radius: var(--radius); color: var(--paper); font: inherit; font-family: var(--font-mono); color-scheme: dark; }
.planner ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.planner li { display: grid; grid-template-columns: 6.2rem 1fr; gap: .6rem; font-size: .92rem; align-items: baseline; }
.planner li .mono { color: var(--flux); font-size: .82rem; }
.planner li.late .mono { color: var(--alert); }
.planner .fine { font-size: .8rem; color: var(--steel); margin: 0; }
.callout { border: 1px solid var(--line2); padding: var(--sp3) var(--sp4); background: rgba(255,255,255,.03); }
.callout h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.callout p, .callout li { color: var(--steel); }
.callout ul { margin: 0; padding-left: 1.1rem; }
.callout-alert { border-color: rgba(234,90,43,.45); }

/* ---------- Documents / contact ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line2); }
.doc-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: var(--sp2); align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.doc-list b { display: block; font-weight: 600; }
.doc-list span { color: var(--steel); font-size: .92rem; }
.doc-list a.btn { min-height: 40px; padding: .3rem .9rem; }
.contact-card { background: var(--panel); border: 1px solid var(--line2); padding: var(--sp4); display: grid; gap: .6rem; }
.contact-card .big { font-family: var(--font-mono); font-size: clamp(1.1rem, 2.6vw, 1.5rem); word-break: break-all; }
.copy { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .3rem .8rem; border: 1.5px solid var(--line2); border-radius: 999px; font-size: .88rem; }
.copy[data-copied="true"] { border-color: var(--ok); color: #8fe0bf; }
.fact { display: grid; gap: .2rem; padding: var(--sp3) 0; border-bottom: 1px solid var(--line); }
.fact .mono { font-size: .78rem; color: var(--steel); }
.fact b { font-weight: 600; }

/* ---------- Footer ---------- */
.footer { margin-top: var(--sp8); border-top: 1px solid var(--line2); background: linear-gradient(180deg, transparent, rgba(17,62,96,.35)); }
.footer-in { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp4); padding: var(--sp6) 0 var(--sp4); }
.footer h3 { font-size: 1.05rem; color: var(--flux); margin-bottom: .6rem; letter-spacing: .04em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.footer a { color: var(--paper); text-decoration: none; font-size: .95rem; }
.footer a:hover { color: var(--flux); text-decoration: underline; }
.footer-brand { display: grid; gap: .6rem; max-width: 40ch; color: var(--steel); font-size: .92rem; }
.footer-brand .brand { color: var(--paper); }
.footer-legal { border-top: 1px solid var(--line); padding: var(--sp3) 0; font-size: .8rem; color: var(--steel); display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: space-between; }
@media (max-width: 860px) { .footer-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-in { grid-template-columns: 1fr; } }

/* ---------- Motion: one orchestrated entrance, and only when allowed ----------
   Hidden states live INSIDE the keyframes (fill-mode both), so if animations never run the
   content is simply visible. Nothing here can hide content from a reader. */
@media (prefers-reduced-motion: no-preference) {
  .hero-rays { animation: rays 1.8s var(--ease-out) both, rays-drift 60s linear 1.8s infinite; }
  @keyframes rays { from { opacity: 0; transform: rotate(-14deg) scale(.86); } to { opacity: .7; transform: rotate(0) scale(1); } }
  @keyframes rays-drift { to { transform: rotate(22.5deg); } }
  .hero h1 .line { animation: rise .9s var(--ease-out) both; }
  .hero h1 .line:nth-child(2) { animation-delay: .12s; }
  .hero h1 .line:nth-child(3) { animation-delay: .24s; }
  @keyframes rise { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -10% 0); } }
  .hero-kicker, .hero .lede, .hero .btn-row, .hero .board { animation: fade .7s var(--ease-out) both; }
  .hero-kicker { animation-delay: .05s; } .hero .lede { animation-delay: .35s; } .hero .btn-row { animation-delay: .5s; } .hero .board { animation-delay: .6s; }
  @keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .strip-track::before { animation: draw 1.6s var(--ease-out) .4s both; }
  @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .strip .tick { animation: fade .5s var(--ease-out) both; animation-delay: calc(.5s + var(--i, 0) * 45ms); }
  .strip .tick.past { animation-name: fade-dim; }
  @keyframes fade-dim { from { opacity: 0; transform: translateY(6px); } to { opacity: .45; transform: none; } }
  .hero-bg img { animation: settle 6s var(--ease-out) both; }
  @keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { .masthead, .footer, .hero-rays, .nav-toggle, .btn, .filters, .toolbar { display: none !important; } body { background: #fff; color: #000; } .plate { box-shadow: none; border: 1px solid #000; } }
