/* Indoor Racing League — "timing screen" look.
   Ink header/footer, pale ground, one accent. Barlow Condensed for display,
   Instrument Sans for body, JetBrains Mono for every time and points figure. */

@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url('/fonts/barlow-condensed-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url('/fonts/instrument-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url('/fonts/instrument-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; font-display: swap; src: url('/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); }

:root {
	--ink: #14171c;
	--ink-2: #3a4049;
	--muted: #5a606a;
	--muted-on-ink: #b9bfc7;
	--faint: #8a9098;
	--ground: #eef0eb;
	--panel: #ffffff;
	--rule: #d3d7cf;
	--rule-strong: #a9aea6;
	--accent: #d4f53c;
	--leader-tint: #f6fadf;

	--flat-bg: #d7e4ff;    --flat-fg: #173a86;
	--rolling-bg: #cdefe6; --rolling-fg: #0f5544;
	--climb-bg: #ffd9c7;   --climb-fg: #8a2e0a;

	--display: 'Barlow Condensed', 'Arial Narrow', sans-serif-condensed, sans-serif;
	--body: 'Instrument Sans', system-ui, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

	--gutter: 1rem;
	--skew: skewX(-10deg);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font: 400 1rem/1.55 var(--body);
	-webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-underline-offset: 0.15em; }
a:hover { color: var(--ink-2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: 1; margin: 0; }
h2 { font-size: 2rem; }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1em; }

svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { max-width: 70rem; margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--faint); }
.strong { font-weight: 700; }
.small { font-size: 0.875rem; }
.label { font: 600 0.75rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
abbr[title] { text-decoration: none; }

/* Header and footer */
.site-header { background: var(--ink); color: var(--ground); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-block: 0.875rem; }
.brand { display: flex; align-items: center; gap: 0.625rem; color: var(--ground); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--ground); }
.brand-mark {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 2.25rem; height: 2.25rem; background: var(--accent); color: var(--ink);
	font: 800 1.125rem/1 var(--display); transform: var(--skew);
}
.brand-name { font: 700 1.125rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }

.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	min-height: 2.75rem; padding: 0.625rem 1.125rem; border: 1.5px solid var(--ink);
	background: var(--ink); color: var(--ground); font: 600 0.9375rem/1 var(--body); text-decoration: none; white-space: nowrap;
}
.button:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--ground); }
.button-ghost { background: transparent; border-color: var(--ground); color: var(--ground); padding-inline: 0.875rem; }
.button-ghost:hover { background: var(--ground); border-color: var(--ground); color: var(--ink); }
.button-outline { background: transparent; color: var(--ink); }
.button-outline:hover { background: var(--ink); color: var(--ground); }
.button-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.button-accent:hover { background: var(--ground); border-color: var(--ground); color: var(--ink); }

.site-footer { margin-top: 4rem; background: var(--ink); color: var(--muted-on-ink); font-size: 0.875rem; }
.site-footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding-block: 2rem; text-align: center; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--accent); font-weight: 600; }
.site-footer a:hover { color: var(--ground); }

/* Hero band, continuous with the header */
.hero { background: var(--ink); color: var(--ground); padding: 1.75rem 0 2.5rem; }
.hero-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.75rem 2.5rem; }
.hero-main { flex: 1 1 32rem; min-width: 0; }
.kicker { margin: 0 0 0.75rem; color: var(--accent); font: 600 0.75rem/1.3 var(--body); letter-spacing: 0.14em; text-transform: uppercase; }
.display { font-size: clamp(2.75rem, 9vw, 5rem); line-height: 0.9; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0.375rem 1.5rem; margin: 1.125rem 0 0; padding: 0; list-style: none; color: var(--muted-on-ink); font-size: 0.9375rem; }
.hero-stats strong { color: var(--ground); font-family: var(--mono); }

.feature-card {
	flex: 1 1 20rem; max-width: 24rem; display: flex; flex-direction: column; gap: 0.75rem;
	padding: 1.25rem; background: var(--accent); color: var(--ink); text-decoration: none;
}
.feature-card:hover { color: var(--ink); background: #e0fa66; }
.feature-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.feature-top .mono { font-weight: 700; font-size: 0.8125rem; }
.feature-top .label { font-size: 0.6875rem; }
.feature-title { font: 800 1.875rem/0.95 var(--display); text-transform: uppercase; }
.feature-meta { font-size: 0.9375rem; }
.feature-link { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9375rem; }

.hero-event { padding-top: 0.5rem; }
.back { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; color: var(--muted-on-ink); font-size: 0.9375rem; text-decoration: none; }
.back:hover { color: var(--ground); }
.hero-event .hero-inner { margin-top: 0.5rem; }
.hero-event .display { line-height: 0.86; }
.event-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.875rem; }
.event-kicker { margin-right: 0.25rem; color: var(--accent); font: 800 1.25rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.facts { flex: 1 1 18rem; max-width: 24rem; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.facts dt { color: var(--faint); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; }
.facts dd { margin: 0.25rem 0 0; font: 500 0.9375rem/1.25 var(--mono); }
.hero-foot {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
	margin-top: 1.5rem; padding-top: 1.125rem; border-top: 1px solid var(--ink-2);
	color: var(--muted-on-ink); font-size: 0.875rem;
}
.hero-foot a { color: var(--accent); font-weight: 600; }
.hero-foot a:hover { color: var(--ground); }
/* Phones: rider count, then the links stacked underneath it, all left-aligned. */
.hero-foot:has(.hero-links) { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.hero-links { display: flex; flex-direction: column; align-items: flex-start; }
.hero-links a { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; text-decoration: none; }
.hero-links a:hover { text-decoration: underline; }
@media (min-width: 40rem) {
	.hero-foot:has(.hero-links) { flex-direction: row; align-items: center; justify-content: space-between; }
	.hero-links { flex-direction: row; flex-wrap: wrap; gap: 0 1.75rem; }
}

/* Badges */
.badge {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0.4375rem 0.625rem; border: 1px solid transparent;
	font: 600 0.6875rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.badge-flat, .badge-seg-sprint { background: var(--flat-bg); color: var(--flat-fg); }
.badge-rolling, .badge-seg-segment { background: var(--rolling-bg); color: var(--rolling-fg); }
.badge-punchy { border-color: var(--climb-fg); color: var(--climb-fg); }
.badge-climbing, .badge-seg-climb { background: var(--climb-bg); color: var(--climb-fg); }
.badge-qualifier { background: var(--ink); color: var(--ground); }
.badge-open { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.badge-closed { border-color: var(--rule-strong); color: var(--muted); }
.badge-upcoming { border: 1px dashed var(--ink); color: var(--ink); }
.badge-late { border-color: var(--accent); color: var(--ink); }
.hero .badge-closed { border-color: var(--muted); color: var(--muted-on-ink); }
.hero .badge-upcoming { border-color: var(--muted-on-ink); color: var(--ground); }
.hero .badge-late { color: var(--ground); }
.tag { display: inline-block; margin-left: 0.5rem; padding: 0.1875rem 0.4375rem; border: 1px solid var(--rule-strong); color: var(--muted); font-size: 0.6875rem; font-weight: 400; vertical-align: 0.1em; white-space: nowrap; }

/* Sections */
.section { margin-top: 3rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 1rem; }
.section-note { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.panel { background: var(--panel); }
.empty { padding: 1.5rem; background: var(--panel); color: var(--muted); }
.notice { margin: 2rem 0 0; padding: 1rem 1.25rem; background: var(--panel); border-top: 3px solid var(--ink); }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0.75rem 0.25rem 0.25rem; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th {
	padding: 0.5rem 0.5rem 0.625rem; border-bottom: 2px solid var(--ink); text-align: left;
	color: var(--muted); font: 600 0.6875rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.table th a { color: inherit; }
.table td { padding: 0.625rem 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.num { color: var(--ink-2); }
.table td.total { color: var(--ink); font-weight: 700; }
.table td.total { font-size: 1.125rem; }
.table .rider { font-weight: 600; white-space: nowrap; }
/* Rider names link to their page; quiet until hovered, and inherit colour (the podium's first card is inverted). */
.rider-link { color: inherit; text-decoration: none; }
.rider-link:hover, .rider-link:focus-visible { color: inherit; text-decoration: underline; }
/* Rider page: one card per event, figures in a grid that wraps, so it fits a phone without scrolling sideways. */
.rider-events { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.rider-event { display: grid; gap: 0.875rem; padding: 1rem 1.125rem; }
.rider-event-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.625rem; }
.rider-event-head > a { font: 700 1.25rem/1 var(--display); text-transform: uppercase; }
.rider-event-route { color: var(--muted); font-size: 0.875rem; }
.rider-event-tags { display: flex; gap: 0.375rem; margin-left: auto; }
.rider-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr)); gap: 0.75rem 1rem; margin: 0; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.rider-figs dt { margin-bottom: 0.25rem; color: var(--muted); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; }
.rider-figs dt abbr { text-decoration: none; }
.rider-figs dd { margin: 0; color: var(--ink); font-size: 1.0625rem; }
.rider-fig-points dd { font-weight: 700; }
@media (min-width: 40rem) {
	.rider-event { grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr); align-items: center; }
	.rider-figs { padding-top: 0; border-top: 0; }
	.rider-event-tags { margin-left: 0; }
}
.col-place { width: 3.25rem; }
/* Event results: the points breakdown follows the total, set off by a rule. */
.table .col-split { border-left: 1px solid var(--rule); }
/* Phones: tables scroll sideways under a pinned Pos and Rider, so every column is reachable without losing the name. */
@media (max-width: 39.99rem) {
	.table-scroll .table { width: max-content; min-width: 100%; }
	.table-scroll .col-place, .table-scroll .rider, .table-scroll th:nth-child(2) { position: sticky; z-index: 1; background: var(--panel); }
	.table-scroll .col-place { left: 0; box-sizing: border-box; min-width: 3.25rem; }
	.table-scroll .rider, .table-scroll th:nth-child(2) { left: 3.25rem; box-shadow: 1px 0 0 var(--rule); }
	.table-scroll .is-leader .col-place, .table-scroll .is-leader .rider { background: var(--leader-tint); }
}
.is-leader td { background: var(--leader-tint); }

.place-num {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 2.25rem; height: 1.875rem; padding: 0 0.3125rem;
	font: 800 1.25rem/1 var(--display); white-space: nowrap;
}
.place-1, .place-2, .place-3 { transform: var(--skew); }
.place-1 { background: var(--accent); color: var(--ink); }
.place-2, .place-3 { background: var(--ink); color: var(--ground); }

.hide-xs { display: none; }


.unbenchmarked { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; padding: 1rem 0.5rem 0.75rem; border-top: 1px solid var(--rule); }
.unbenchmarked .label { color: var(--muted); }
.unbenchmarked ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.unbenchmarked .mono { margin-left: 0.25rem; font-weight: 700; }
.unbenchmarked p { flex-basis: 100%; margin: 0; font-size: 0.875rem; }

/* Podium */
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.625rem; margin-top: 2rem; }
.wrap > .podium:first-child { margin-top: -1.25rem; }
.podium-card { padding: 1.25rem; background: var(--panel); }
.podium-card.is-first { background: var(--accent); }
.podium-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.podium-top .mono { font-weight: 700; font-size: 0.875rem; padding-top: 0.25rem; }
.podium-place { font: 800 3.5rem/0.8 var(--display); }
.podium-name { margin-top: 1rem; font: 700 1.625rem/1 var(--display); text-transform: uppercase; }

/* Events list */
.events { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.event-row {
	display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0.75rem 0.875rem; align-items: center;
	padding: 1rem; background: var(--panel); color: var(--ink); text-decoration: none;
}
.event-row:hover { color: var(--ink); outline: 2px solid var(--ink); outline-offset: -2px; }
.event-row.is-open { background: var(--ink); color: var(--ground); }
.event-row.is-open:hover { color: var(--ground); outline-color: var(--accent); }
.event-row.is-upcoming { background: transparent; border: 1px solid #c4c9c0; }
.event-num { font: 800 1.75rem/1 var(--display); }
.event-route { display: block; font: 700 1.375rem/1.05 var(--display); text-transform: uppercase; }
.event-world { display: block; margin-top: 0.25rem; font-size: 0.8125rem; opacity: 0.78; }
.event-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.event-dates { font-size: 0.8125rem; font-weight: 500; }
.event-row .badge { min-width: 5.5rem; }
.event-row.is-open .badge-qualifier { background: var(--ground); color: var(--ink); }
/* Challenge: a lime "race number" block instead of a plain number, plus a note under the route */
.event-row.is-challenge .event-num {
	display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem;
	background: var(--accent); color: var(--ink); transform: var(--skew);
}
.event-note { display: block; margin-top: 0.375rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.event-row.is-open .event-note { color: var(--accent); }
.event-row.is-open .badge-punchy, .hero .badge-punchy { border-color: var(--climb-bg); color: var(--climb-bg); }

/* Bonus segments */
.segments { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.625rem; }
.segment { padding: 1.25rem; }
.segment-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.segment-head h3 { font-size: 1.5rem; }
.segment-head a { display: inline-flex; align-items: center; gap: 0.375rem; text-decoration: none; }
.segment-head a:hover { text-decoration: underline; }
.segment-list { margin: 1rem 0 0; padding: 0; list-style: none; }
.segment-list li { display: flex; align-items: center; gap: 1rem; padding: 0.625rem 0; border-top: 1px solid var(--rule); }
.segment-place { width: 1.75rem; font: 800 1.375rem/1 var(--display); }
.segment-rider { flex: 1; font-weight: 600; }
.segment-list .mono { font-weight: 700; }

/* vs prediction: beating it gets a lime chip (ink on lime; lime text alone fails on white) */
.vs { display: inline-block; padding: 0.125rem 0.3125rem; font: 600 0.875rem/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.vs-beat { background: var(--accent); color: var(--ink); }
.podium-vs { margin-top: 0.5rem; }
.podium-card.is-first .vs { color: var(--ink-2); }
.podium-card.is-first .vs-beat { background: var(--ink); color: var(--accent); }

/* Three-up explainer */
.explainer { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.explainer h3 { font-size: 1.375rem; }
.explainer p { margin: 0.625rem 0 0; color: var(--ink-2); font-size: 0.9375rem; }

/* Homepage (interim, until it gets its own redesign) */
.lede { font-size: 1.125rem; max-width: 40rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.band { margin-top: 3rem; padding-block: 2.5rem; background: var(--panel); }
.band h2 { margin-bottom: 1rem; }
.band p { max-width: 48rem; }
.band p:last-child { margin-bottom: 0; }
.hero + .band { margin-top: 0; }
.hero-home { padding-block: 3rem 3.5rem; }
.hero-home .display { max-width: 20ch; }
.hero-home .lede { margin: 1.25rem 0 0; color: var(--ground); }
.hero-home .actions { margin-top: 2rem; }
.section-foot { margin-top: 1rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; color: var(--ink-2); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: 800 2rem/1 var(--display); color: var(--ink); }
.steps strong { display: block; margin: 0.5rem 0 0.25rem; color: var(--ink); }
/* Route-type badges inside step text: compact, so they don't push the lines apart. */
.steps .badge { padding: 0.1875rem 0.4375rem; font-size: 0.625rem; vertical-align: 0.1em; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 1rem; }
.card { padding: 1.25rem; background: var(--panel); }
.card h3 { margin-bottom: 0.5rem; }
.card p { margin: 0; color: var(--ink-2); }
.section > h1, .section > h2 { margin-bottom: 1rem; }
.section ul, .section ol:not(.events):not(.steps):not(.rider-events) { padding-left: 1.25rem; }

/* Homepage: points, rules, call to action */
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 0.625rem; }
.points-card { padding: 1.25rem; }
.points-card h3 { padding-bottom: 0.75rem; border-bottom: 2px solid var(--ink); }
.points-list { margin: 0; padding: 0 !important; list-style: none; }
.points-list li { display: flex; align-items: baseline; gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid var(--rule); }
.points-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.points-value { flex: 0 0 4.5rem; font: 700 1.0625rem/1.4 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.points-list li span:last-child { color: var(--ink-2); }

/* League page: rules */
#rules .points { margin-bottom: 0.625rem; }
.league-rules { margin: 0; padding: 0.25rem 1.25rem; }
.league-rules > div { padding: 0.875rem 0; border-bottom: 1px solid var(--rule); }
.league-rules > div:last-child { border-bottom: 0; }
.league-rules dt { margin-bottom: 0.25rem; color: var(--ink); font: 700 1.125rem/1.1 var(--display); text-transform: uppercase; }
.league-rules dd { margin: 0; color: var(--ink-2); }
@media (min-width: 40rem) {
	.league-rules > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
	.league-rules dt { margin: 0; }
}

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.625rem; margin: 0; padding: 0 !important; list-style: none; counter-reset: rule; }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 0.75rem; align-content: start; padding: 1rem 1.125rem; color: var(--ink-2); font-size: 0.9375rem; }
.rules li::before { content: counter(rule, decimal-leading-zero); grid-row: span 2; font: 800 1.75rem/1 var(--display); color: var(--ink); }
.rules strong { display: block; margin-bottom: 0.25rem; color: var(--ink); font: 700 1.25rem/1.1 var(--display); text-transform: uppercase; }
@media (min-width: 40rem) {
	.rules li { display: block; padding: 1.25rem; }
	.rules li::before { display: block; font-size: 2rem; }
	.rules strong { margin: 0.625rem 0 0.375rem; }
}
@media (min-width: 64rem) {
	.rules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cta { margin-top: 4rem; padding-block: 3rem; background: var(--accent); text-align: center; }
main:has(> .cta:last-child) + .site-footer { margin-top: 0; }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.cta h2 { font-size: clamp(2.25rem, 9vw, 3.5rem); }
.cta p { max-width: 32rem; margin: 0; font-size: 1.0625rem; }
.cta .button { margin-top: 0.5rem; padding-inline: 1.75rem; }

@media (min-width: 40rem) {
	:root { --gutter: 1.5rem; }
	.brand-mark { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }
	.brand-name { font-size: 1.375rem; }
	.hero { padding: 2.5rem 0 3.5rem; }
	.hero-event { padding-top: 1rem; }
	.hero-home { padding-block: 4.5rem 5rem; }
	.hero-home .lede { font-size: 1.25rem; }
	.feature-card { padding: 1.5rem; }
	.feature-title { font-size: 2.25rem; }
	.section { margin-top: 3.5rem; }
	.section-note { font-size: 0.875rem; }
	.table-scroll { padding: 1.25rem 0.75rem 0.5rem; }
	.table th { padding-inline: 0.75rem; }
	.table td { padding: 0.875rem 0.75rem; font-size: 1rem; }
	.table td.total { font-size: 1.25rem; }
	.place-num { min-width: 2.75rem; height: 2.25rem; font-size: 1.5rem; }
	.col-place { width: 4.5rem; }
	.hide-xs { display: inline; }
	.event-row { grid-template-columns: 3.5rem minmax(0, 1fr) auto; padding: 1.125rem 1.375rem; gap: 1rem 1.5rem; }
	.event-num { font-size: 2rem; }
	.event-route { font-size: 1.5rem; }
	.event-tags { grid-column: auto; flex-wrap: nowrap; }
	.event-dates { width: 9.5rem; }
	.podium-place { font-size: 4.25rem; }
	.podium-name { font-size: 1.875rem; }
}

@media (min-width: 64rem) {
	h2 { font-size: 2.5rem; }
	.section { margin-top: 4rem; }
	.event-tags { gap: 1.5rem; }
}

@media (max-width: 22rem) {
	.brand-name { display: none; }
}

/* Phones: podium as three compact columns, event-row badges sized to content */
@media (max-width: 39.99rem) {
	.podium { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.375rem; }
	.podium-card { padding: 0.875rem 0.75rem; }
	.podium-top { flex-direction: column; gap: 0.5rem; }
	.podium-top .mono { padding: 0; font-size: 0.75rem; }
	.podium-place { font-size: 2.5rem; }
	.podium-name { margin-top: 0.5rem; font-size: 1.125rem; overflow-wrap: anywhere; }
	.event-row .badge { min-width: 0; }
	.event-tags { gap: 0.5rem; }
}

/* Clubs */
.club-logo { display: inline-grid; place-items: center; flex: none; object-fit: contain; background: var(--panel); border-radius: 50%; }
.club-logo-sm { width: 1.75rem; height: 1.75rem; }
.club-logo-md { width: 2.75rem; height: 2.75rem; }
.club-logo-lg { width: 3.5rem; height: 3.5rem; }
.club-monogram { background: var(--accent); color: var(--ink); font: 800 1.125rem/1 var(--display); text-transform: uppercase; }
.club-logo-lg.club-monogram { font-size: 1.75rem; }

.header-club { display: flex; align-items: center; gap: 0.5rem; min-width: 0; color: var(--ground); }
.header-club-name { font: 700 1.125rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hero-club { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; }
.hero-club .kicker { display: block; margin: 0 0 0.25rem; }
.hero-club-platform { display: block; color: var(--muted-on-ink); font-size: 0.8125rem; }
.hero-actions { margin: 1.25rem 0 0; }

.button-strava { gap: 0.5rem; background: #fc5200; border-color: #fc5200; color: #fff; }
.button-strava:hover { background: #d94600; border-color: #d94600; color: #fff; }

.club-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 2rem; padding: 1rem 1.25rem; }
.club-strip p { flex: 1 1 16rem; margin: 0; font-size: 0.9375rem; }

/* Club page */
.club-logo-xl { width: 5rem; height: 5rem; }
.club-logo-xl.club-monogram { font-size: 2.5rem; }
.header-club { text-decoration: none; }
.header-club:hover { color: var(--accent); }
.hero-club-page { padding-top: 2.5rem; }
.club-hero { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.25rem 1.75rem; }
.club-hero-main { flex: 1 1 20rem; min-width: 0; }
.club-hero-lede { max-width: 38rem; margin: 1rem 0 0; color: var(--muted-on-ink); font-size: 1.0625rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.625rem; }
@media (min-width: 40rem) {
	.club-logo-xl { width: 7rem; height: 7rem; }
}
