/* TWHS XC, unofficial. Shared by every page. The scroll show's own layer is in show.css, loaded by the home page only.
   Named rules (DESIGN.md):
   - The Distance Rule: --bib red marks distance and place, and nothing else.
   - Bib type: Big Shoulders Display, set large, for headings and numbers only. Never under 20 px.
   - Proof is plain: tables, lists and sources are never animated. */

@font-face { font-family: 'Shoulders'; src: url('/fonts/shoulders-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Hanken'; src: url('/fonts/hanken-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hanken'; src: url('/fonts/hanken-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --tyvek: #f1f2ec;   /* race-bib paper: the ground */
  --pine: #10201a;    /* ink, and the night ground */
  --forest: #1d4630;  /* team green */
  --bib: #c4271c;     /* distance and place only */
  --bib-lite: #f0574a;/* the same red on dark grounds */
  --graphite: #535a55;/* captions */
  --chalk: #ffffff;
  --ink: var(--pine);
  --ground: var(--tyvek);
  --dim: var(--graphite);
  --rule: rgba(16, 32, 26, 0.22);
  --chrome: 3.5rem;
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --display: 'Shoulders', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --text: 'Hanken', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--chrome) + 1rem); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--ground); font: 400 1.0625rem/1.55 var(--text); font-feature-settings: 'kern'; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--bib); outline-offset: 3px; }
main:focus { outline: none; }
p, li { max-width: 64ch; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 0.92; margin: 0 0 1rem; letter-spacing: 0; text-transform: uppercase; text-wrap: balance; }
h1 { font-size: clamp(3rem, 8vw, 7rem); }
h2 { font-size: clamp(2.5rem, 5.5vw, 5rem); }
h3 { font-size: 1.625rem; margin-top: 2rem; }
figure { margin: 0; }
figcaption { font-size: 0.8125rem; line-height: 1.4; color: var(--dim); margin-top: 0.6rem; max-width: 46ch; }
figcaption b { color: var(--ink); font-weight: 600; }
q { quotes: '\201C' '\201D'; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fine { font-size: 0.8125rem; color: var(--dim); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.kicker { font-size: 0.9375rem; font-weight: 600; margin: 0 0 0.75rem; display: flex; gap: 0.75rem; align-items: baseline; }
.km { font-family: var(--display); font-weight: 800; color: var(--bib); font-size: 1.375rem; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- the chrome: the name, two places, and nothing else ---------- */
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 50; background: var(--pine); color: var(--tyvek); padding: 0.75rem 1rem; font-weight: 600; }
.skip:focus { top: 0.75rem; }
.top { position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--chrome); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 var(--gut); background: var(--tyvek); color: var(--pine); border-bottom: 1px solid var(--rule); }
.top__name { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 2.75rem; font-family: var(--display); font-weight: 800; font-size: 1.5rem; text-decoration: none; letter-spacing: 0.01em; white-space: nowrap; }
.top__mark { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--bib); }
.top__note { font-family: var(--text); font-weight: 400; font-size: 0.8125rem; color: var(--graphite); letter-spacing: 0; }
.top__nav ul { display: flex; gap: clamp(0.75rem, 2.5vw, 2rem); list-style: none; margin: 0; padding: 0; }
.top__nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.top__nav a:hover, .top__nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 420px) { .top__note { display: none; } .top__name::after { content: 'unofficial'; font: 400 0.75rem var(--text); color: var(--graphite); } }

main { display: block; padding-top: var(--chrome); }

/* ---------- tables: proof is plain ---------- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.tbl, .staff { border-collapse: collapse; width: 100%; max-width: 60rem; font-variant-numeric: tabular-nums lining-nums; }
.tbl caption, .staff caption { text-align: left; font-size: 0.8125rem; color: var(--dim); padding-bottom: 0.6rem; }
.tbl th, .tbl td, .staff th, .staff td { text-align: left; vertical-align: top; padding: 0.7rem 1.25rem 0.7rem 0; border-top: 1px solid var(--rule); }
.tbl thead th, .staff thead th { font-size: 0.8125rem; font-weight: 600; color: var(--dim); border-top: 0; padding-top: 0; }
@media (min-width: 600px) { .tbl thead th, .staff thead th { white-space: nowrap; } }
.tbl tbody th, .staff tbody th { font-weight: 600; white-space: nowrap; }
.tbl .dim { color: var(--dim); }
.pl { font-family: var(--display); font-weight: 800; color: var(--bib); font-size: 1.5rem; line-height: 1; margin-right: 0.35rem; }

/* ---------- the plain pages ---------- */
.page { padding: clamp(3rem, 8vw, 6rem) var(--gut) 5rem; max-width: 72rem; }
.page__head { margin-bottom: 3rem; }
.page__lead, .policy .lead { font-size: 1.25rem; line-height: 1.45; max-width: 52ch; }
.page section { margin-top: 3.5rem; }
.page h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.page__pic { margin: 2rem 0; max-width: 65rem; }
.page__pic--side { float: right; width: min(26rem, 45%); margin: 0 0 1.5rem 2rem; }
.page--lost { min-height: 70svh; }
.sources { padding-left: 1.1rem; }
.sources li { margin-bottom: 0.4rem; }
.policy { padding: clamp(3rem, 8vw, 6rem) var(--gut) 5rem; max-width: 50rem; }
.policy .meta { color: var(--dim); font-size: 0.875rem; }
.policy nav ol { padding-left: 1.2rem; columns: 2; font-size: 0.9375rem; }
.policy nav li a { display: inline-block; padding: 0.3rem 0; min-height: 2rem; }
.policy h2 { font-size: 2rem; margin-top: 2.75rem; }
@media (max-width: 640px) { .page__pic--side { float: none; width: 100%; margin: 1rem 0; } .policy nav ol { columns: 1; } }

.finish__links { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.finish__links a { display: inline-flex; min-height: 2.75rem; align-items: center; font-weight: 600; }

/* ---------- the foot ---------- */
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem var(--gut); padding: 3.5rem var(--gut) 2rem; background: var(--pine); color: var(--tyvek); }
.foot__say p { max-width: 48ch; font-size: 0.9375rem; color: #c9cec9; }
.foot__big { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 0.95; text-transform: uppercase; color: var(--tyvek) !important; margin-top: 0; }
.foot h2 { font-family: var(--text); font-weight: 600; font-size: 0.8125rem; text-transform: none; color: #c9cec9; margin: 0 0 0.5rem; line-height: 1.4; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li a { display: inline-flex; min-height: 2.5rem; align-items: center; font-size: 0.9375rem; }
.foot__legal { grid-column: 1 / -1; font-size: 0.8125rem; color: #aab2ac; border-top: 1px solid rgba(241, 242, 236, 0.18); padding-top: 1.25rem; margin: 0; }
.foot :focus-visible { outline-color: var(--bib-lite); }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot__say { grid-column: 1 / -1; } }

@media print { .top, .skip, .course, .watch { display: none; } main { padding-top: 0; } }
