/*
 * Colour read off the live Squarespace site's theme variables in site.css and
 * converted from HSL. None of these values is invented.
 *   --ground  hsl(0, 0%, 0%)
 *   --type    hsl(60, 4.35%, 95.49%)
 *   --accent  hsl(349.09, 82.5%, 52.94%)   4.84:1 on pure black
 *   --grey    hsl(0, 0%, 21.96%)
 * The ground is pure black deliberately. See spec §5 before changing it.
 */
:root {
  --ground: #000000;
  --type: #F4F4F3;
  --accent: #EA2448;
  /* Fill for buttons carrying white text: --accent is 4.33:1 against white, this is 4.79:1. */
  --accent-solid: #DE1F42;
  --grey: #383838;

  /*
   * Extended neutrals. Tasks 6-14 needed finer text- and surface-hierarchy
   * steps than the four base tokens alone give (a hairline reads differently
   * from a border, muted meta text from body text), so every task from Nav
   * onward introduced literal hex greys as it went, each one legitimate on
   * its own but never registered anywhere. Task 16's whole-site colour audit
   * is what actually surfaced them all at once: 14 distinct colours in the
   * built CSS, not 4. All ten of these are achromatic (no rogue hue sneaked
   * in alongside them, which is what the audit is actually guarding
   * against), so registering them here is the "add it to tokens.css... so
   * every addition is a decision rather than a drift" the audit's own
   * comment asks for, rather than a silent one.
   * Two families: near-black surfaces/borders, and muted text.
   */
  --surface-1: #141414;
  --surface-2: #171717;
  --surface-3: #1E1E1E;
  --surface-4: #232323;
  --surface-5: #2A2A2A;
  --surface-6: #3D3D3D;
  /* Raised from a 5.23:1-on-black value. --text-quiet carries ~90% of the
     site's 11-14px meta/label text (checked: 34 of 38 pairings site-wide),
     where WCAG's flat 4.5:1 floor is real but not generous enough to read
     comfortably at that size. Now 6.23:1. It's also the last remaining grey
     text tier: --text-muted/--text-dim/--text-soft read as too hard to read
     for real body copy, so they now resolve straight to --type (white) and
     stay only as semantic names so call sites don't need touching. --text-quiet
     stays grey because it carries genuinely minor annotations only (eyebrow
     labels, timestamps, source attribution), never body copy. */
  --text-quiet: #8C8C8A;
  --text-muted: var(--type);
  --text-dim: var(--type);
  --text-soft: var(--type);

  /* Type scale. Display sizes are fluid; the article measure is fixed at ~68ch. */
  --step-quote: clamp(30px, 4.6vw, 64px);
  /* Sized for a genuinely long quote (30+ words): the previous 50px max read
     as oversized once beat 3 started sourcing a real athlete quote of that
     length rather than a short placeholder. */
  --step-quote-long: clamp(19px, 2.6vw, 34px);
  --step-title: clamp(30px, 4.4vw, 52px);
  --step-section: clamp(22px, 2.6vw, 34px);
  --step-body: 19px;
  --step-meta: 13px;

  --leading-tight: 1.01;
  --leading-body: 1.72;
  --tracking-display: -0.035em;

  --measure: 68ch;
  --gutter: 8vw;
}
/*
 * Layout primitives (Design Contract v2 Stage C7, Handoff #442). Opt-in only: a page uses
 * them when it is migrated (C8), so adding this file changes no existing page.
 *
 * Three composition canvases, not one site-wide max-width:
 *   .canvas--reading    sustained text: article body, legal, FAQ answers, method notes
 *   .canvas--editorial  composed chapters: home, coaching, plans, case studies, contact
 *   .canvas--data       tools with tables, charts and forms: RI result, finder, calendar
 * Each canvas centres on the same axis at every width; past its max the extra space is
 * the ground colour. Nothing scales whitespace in vw beyond the clamped gutter.
 *
 * Full-bleed exception: photographic openings, the home pull quote, quiet closing CTAs and
 * RI course photography span the viewport (.canvas-bleed) and put their text back on a canvas.
 */
:root {
  --canvas-reading: 1240px;
  --canvas-editorial: 1440px;
  --canvas-data: 1240px;
  --canvas-gutter: clamp(20px, 4vw, 64px);
  --canvas-gutter-reading: clamp(20px, 5vw, 64px);
  /*
   * Reading measure for 19px body-face prose. In this face 1ch (the width of "0") is wider
   * than an average letter, so the ch value is not the line length: 68ch set about 80
   * characters. C6 calibrated articles at 50ch and legal at 54ch, both 60-68 characters
   * set. This token is checked on rendered lines (scripts/lib/reading-measure.mjs, run by
   * check-layout-primitives.mjs); a page that sets prose in another face or size must
   * re-measure rather than reuse it.
   */
  --reading-measure: 52ch;
  /* One layout owner sets each boundary once (no stacked padding + margin). Bigger space only
     where the topic really changes. */
  /* Inline padding that puts a full-bleed chapter's text back on the Editorial canvas. */
  --bleed-inset: max(var(--canvas-gutter), calc((100vw - var(--canvas-editorial)) / 2));
  --chapter-gap: clamp(56px, 8vh, 112px);
  --section-gap: calc(var(--chapter-gap) / 2);
}

.canvas {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--canvas-max) + 2 * var(--canvas-pad));
  margin-inline: auto;
  padding-inline: var(--canvas-pad);
  min-width: 0;
}

.canvas--reading { --canvas-max: var(--canvas-reading); --canvas-pad: var(--canvas-gutter-reading); }
.canvas--editorial { --canvas-max: var(--canvas-editorial); --canvas-pad: var(--canvas-gutter); }
.canvas--data { --canvas-max: var(--canvas-data); --canvas-pad: var(--canvas-gutter); }

.canvas-bleed { width: 100%; max-width: none; margin-inline: 0; }

.reading-measure { max-width: var(--reading-measure); }


/* Tables and wide charts scroll inside their own region, never the page. */
.data-region { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
/*
 * Cross-document view transitions, CSS only. Spec §8 asks for native View
 * Transitions between routes; this is the native form and costs no JavaScript,
 * which is what lets article pages stay script-free. Browsers without support
 * navigate instantly, which §8 names as the accepted fallback.
 */
@view-transition { navigation: auto; }

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

html {
  background: var(--ground);
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  /* The site has no light mode (tokens.css's --ground is pure black by
     deliberate design, spec §5), so telling the UA that up front keeps
     native chrome — scrollbars, form controls, the browser's own dark/light
     heuristics — in the same dark register as the page around it. */
  color-scheme: dark;
}

/* Fixed product header: in-page navigation must never land underneath it. */
[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--type);
  font-family: var(--font-display), system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; }

/*
 * touch-action: manipulation drops the double-tap-to-zoom delay some mobile
 * browsers still add before honouring a tap on these; every one of them is
 * already a real button/link/control with its own tap target, never a zoom
 * surface. The default translucent tap highlight is disabled deliberately,
 * not silently: every one of these elements already carries its own
 * hover/active/focus-visible feedback, and the default highlight is a light
 * flash that reads wrong against this site's all-black ground.
 */
a, button, input, select, textarea, summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  translate: 0 -160%; padding: 10px 14px;
  background: var(--type); color: var(--ground); border-radius: 999px;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: translate .18s ease;
}

.skip-link:focus-visible { translate: 0; }

/*
 * Every "Book an intro call" control is a <button> (Cal.com's popup embed
 * attaches to data-cal-link elements; there is no href to navigate once the
 * script has taken over), styled to read exactly like the <a> it replaced.
 * Each one's own component styles still set border, colour and spacing —
 * this only strips the UA button chrome those styles don't already cover.
 */
.cal-trigger {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; text-align: inherit;
  -webkit-appearance: none; appearance: none;
}

:focus-visible {
  outline: 2px solid var(--type);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}/*
 * Retro-magazine presentation (Queue #539, owner-accepted v1.1, 3 Nov 2026).
 *
 * Everything here is scoped by html[data-design="magazine"], which Base.astro
 * sets on public pages by default. The public Lab beta retains its existing
 * presentation. Same markup, same scripts, same contracts:
 * this is a look, not a second site.
 *
 * Palette: Sense crimson (--accent-solid / --accent from tokens.css) plus a
 * neutral monochrome family. No other hue. The neutrals are achromatic
 * and are registered here so
 * each addition is a decision, not drift. Type is the site's own Archivo,
 * heavy and tightly set; no new font.
 */
html[data-design="magazine"] {
  --mag-ink: #121212;
  --mag-ink-raised: #282828;
  --mag-line: #444444;
  --mag-rule: #5C5C5C;
  --mag-dim: #A7A7A7;
  --mag-soft: #CDCDCD;
  --mag-bone: #FFFFFF;
  --mag-paper: #FFFFFF;
  --mag-bone-line: #B9B9B9;
  --mag-bone-text: #343434;
  --mag-bone-quiet: #5C5C5C;
  /* The text axis of a full-bleed band on the Editorial canvas (layout.css): nav, headings and footer line up. */
  --mag-gutter: var(--bleed-inset);

  /* The shell colours the whole page, including Race Intelligence, which
     reads --ground and --surface-* for its own dark ground. */
  --ground: var(--mag-ink);
  --type: var(--mag-bone);
  --text-quiet: var(--mag-dim);

  --mag-display: var(--font-display), "Arial Narrow", system-ui, sans-serif;
  --mag-body: var(--font-body), system-ui, sans-serif;

  background: var(--mag-ink);
  scroll-padding-top: 96px;
}
html[data-design="magazine"] body { background: var(--mag-ink); color: var(--mag-bone); }
html[data-design="magazine"] [id] { scroll-margin-top: 96px; }
html[data-design="magazine"] :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
html[data-design="magazine"] .skip-link { background: var(--mag-bone); color: var(--mag-ink); border-radius: 0; }

/* Chrome overrides double the attribute selector: Astro scopes Nav/Footer rules with
   attributes on every compound selector, which otherwise outranks these. */
/* ----- masthead (Nav.astro markup, restyled) ----- */
html[data-design="magazine"][data-design] .site-header {
  position: sticky; top: 0; inset-inline: 0; height: 76px;
  background: var(--mag-ink); backdrop-filter: none;
  border-bottom: 1px solid var(--mag-line);
}
html[data-design="magazine"][data-design] .site-nav { gap: 24px; }
html[data-design="magazine"][data-design] .brand { gap: 14px; }
html[data-design="magazine"][data-design] .brand svg { width: 52px; }
html[data-design="magazine"][data-design] .brand span {
  display: block; font-family: var(--mag-display); font-size: 21px; line-height: .86;
  font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; max-width: 8ch;
}
html[data-design="magazine"][data-design] .desktop-links a { color: var(--mag-bone); font-size: 14px; font-weight: 600; }
html[data-design="magazine"][data-design] .desktop-links a:hover,
html[data-design="magazine"][data-design] .desktop-links a:focus-visible { color: var(--mag-bone); text-decoration: underline; text-underline-offset: 7px; }
html[data-design="magazine"][data-design] .panel { background: var(--mag-ink-raised); border: 1px solid var(--mag-line); border-radius: 0; box-shadow: none; }
html[data-design="magazine"][data-design] .panel a { color: var(--mag-bone); }
html[data-design="magazine"][data-design] .panel a:hover { background: var(--mag-ink); text-decoration: none; }
html[data-design="magazine"][data-design] .nav-cta {
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 0;
  background: var(--mag-bone); color: var(--mag-ink); font-weight: 750; font-size: 14px;
}
html[data-design="magazine"][data-design] .nav-cta:hover { background: var(--accent-solid); color: #fff; }
html[data-design="magazine"][data-design] .mobile-sheet { background: var(--mag-ink); }
html[data-design="magazine"][data-design] .mobile-sheet > a:not(.mobile-brand) { border-bottom-color: var(--mag-line); font-family: var(--mag-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; font-size: 28px; }
html[data-design="magazine"][data-design] .mgroup { border-bottom-color: var(--mag-line); }
html[data-design="magazine"][data-design] .mgroup a { color: var(--mag-soft); }
html[data-design="magazine"][data-design] .mobile-menu summary span { background: var(--mag-bone); height: 2px; }
html[data-design="magazine"][data-design] .mobile-brand svg { width: 48px; }
@media (max-width: 920px) {
  html[data-design="magazine"][data-design] .site-header { height: 68px; }
  html[data-design="magazine"][data-design] .brand span { font-size: 18px; }
  html[data-design="magazine"][data-design] .brand svg { width: 44px; }
}
@media (max-width: 520px) {
  /* The stacked wordmark stays visible on phones (identity), the mark gets smaller. */
  html[data-design="magazine"][data-design] .brand span { display: block; font-size: 15px; }
  html[data-design="magazine"][data-design] .brand svg { width: 36px; }
  html[data-design="magazine"][data-design] .nav-cta { min-height: 44px; padding-inline: 12px; font-size: 12px; }
}
@media (max-width: 360px) {
  html[data-design="magazine"][data-design] .site-nav { gap: 6px; }
  html[data-design="magazine"][data-design] .brand { gap: 6px; }
  html[data-design="magazine"][data-design] .brand svg { width: 28px; flex-shrink: 0; }
  html[data-design="magazine"][data-design] .brand span { font-size: 11px; }
  html[data-design="magazine"][data-design] .nav-cta { margin-right: 42px; padding-inline: 8px; font-size: 11px; }
}

/* ----- footer (Footer.astro markup, restyled) ----- */
html[data-design="magazine"][data-design] footer { margin-top: 0; border-top: 1px solid var(--mag-line); padding: 36px 0 56px; }
html[data-design="magazine"][data-design] footer nav { font-size: 14px; gap: 6px 30px; }
html[data-design="magazine"][data-design] footer a, html[data-design="magazine"][data-design] footer button { color: var(--mag-soft); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--mag-rule); }
html[data-design="magazine"][data-design] footer a:hover, html[data-design="magazine"][data-design] footer button:hover { opacity: 1; color: var(--mag-bone); }
html[data-design="magazine"][data-design] .colophon { color: var(--mag-dim); font-size: 13px; }

/* ----- Race Intelligence shell ----- */
/* RI pads its top to clear production's fixed header. The magazine masthead is sticky and
   already occupies that space, so take the compensation back without editing RI's own CSS. */
html[data-design="magazine"] .race-page { padding-top: clamp(24px, 4vh, 48px); }

/* ----- Neutral surface tones for every magazine page ----- */
/* Existing components read --surface-* and --grey for panels and hairlines. Derive them from the
   ink and white (computed, so no extra hex values to register). */
html[data-design="magazine"] {
  --surface-1: color-mix(in srgb, var(--mag-ink) 96%, var(--mag-bone));
  --surface-2: color-mix(in srgb, var(--mag-ink) 93%, var(--mag-bone));
  --surface-3: color-mix(in srgb, var(--mag-ink) 90%, var(--mag-bone));
  --surface-4: color-mix(in srgb, var(--mag-ink) 87%, var(--mag-bone));
  --surface-5: color-mix(in srgb, var(--mag-ink) 80%, var(--mag-bone));
  --surface-6: color-mix(in srgb, var(--mag-ink) 70%, var(--mag-bone));
  --grey: var(--surface-5);
}

/* ----- No arrow glyphs on links and buttons (header included) ----- */
html[data-design="magazine"][data-design] :is(a, button) > span[aria-hidden="true"]:not(.sort-arrow) { display: none; }

/* ----- Shared layer for pages without a bespoke composition ----- */
/* Pages with their own magazine composition set `composed` on Base and skip this. Everything else
   (plans, coach, contact, FAQ, case studies, legal, calculator, calendar, Race Intelligence) gets the
   same type voice, flat controls and no decorative labels, without per-page rewrites. */
html[data-design="magazine"][data-design]:not([data-composed]) :is(p.eyebrow, p.section-label, p.page-kicker, p.panel-label, p.window-label, p.fit-label):not(.case-study .eyebrow) { display: none; }
html[data-design="magazine"][data-design]:not([data-composed]) main :is(h1, h2):not(.doc h2, .sec h2) {
  font-family: var(--mag-display); font-weight: 850; text-transform: uppercase; letter-spacing: -.04em; line-height: .92;
  text-wrap: balance; overflow-wrap: break-word;
}
html[data-design="magazine"][data-design]:not([data-composed]) main h1 { color: var(--mag-paper); }
html[data-design="magazine"][data-design]:not([data-composed]) .doc h1,
html[data-design="magazine"][data-design]:not([data-composed]) .page h1 { font-family: var(--mag-display); font-weight: 850; text-transform: uppercase; letter-spacing: -.04em; line-height: .92; }
html[data-design="magazine"][data-design]:not([data-composed]) :is(button, input, select, textarea, summary) { border-radius: 0; }
html[data-design="magazine"][data-design]:not([data-composed]) main a:is(.editorial-link, .quiet-link, .text-link) {
  border-bottom: 0; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}

/* ----- Long-form reading surfaces: bone, like the article reading column ----- */
/* The background bleeds edge to edge with a box-shadow, so the page layout (canvas axis) is untouched. */
html[data-design="magazine"][data-design] :is(.page:has(> .doc), .method) {
  --type: var(--mag-ink); --text-soft: var(--mag-bone-text); --text-muted: var(--mag-bone-text); --text-dim: var(--mag-bone-text);
  --surface-1: var(--mag-bone); --surface-2: var(--mag-bone); --surface-3: var(--mag-bone); --surface-4: var(--mag-bone);
  --text-quiet: var(--mag-bone-quiet); --surface-5: var(--mag-bone-line); --surface-6: var(--mag-rule); --grey: var(--mag-bone-line);
  background: var(--mag-bone); color: var(--mag-ink);
  box-shadow: 0 0 0 100vmax var(--mag-bone); clip-path: inset(0 -100vmax);
}
html[data-design="magazine"][data-design] :is(.page:has(> .doc), .method) :is(h1, h2) { color: var(--mag-ink); }
html[data-design="magazine"][data-design] :is(.page:has(> .doc), .method) a { text-decoration-color: var(--mag-ink); }
html[data-design="magazine"][data-design] .method .method-next .button { background: var(--accent-solid); color: #fff; }
html[data-design="magazine"][data-design]:not([data-composed]) main h1 { line-height: .95; }
html[data-design="magazine"][data-design]:not([data-composed]) main :is(h1, h2):not(.doc h2, .sec h2) { line-height: .98; }

/* ----- Race Intelligence hero and result ----- */
/* Hero.astro pads its top to clear production's fixed header; the sticky masthead already occupies it. */
html[data-design="magazine"][data-design] .journey-opening .hero { padding-top: clamp(28px, 5svh, 48px); }
/* A finish-time range ("4:12 to 4:40") must keep its units in lower case. */
html[data-design="magazine"][data-design]:not([data-composed]) main #prediction-result-heading { text-transform: none; letter-spacing: -.02em; }
/* Uppercase 850 is wider than the sentence-case 700 the race hero was sized for; step the headline down so
   the opening still fits the first screen. */
html[data-design="magazine"][data-design] .journey-opening h1 { font-size: clamp(36px, 5.9vw, 80px); line-height: .94; letter-spacing: -.045em; }
@media (max-width: 700px) {
  html[data-design="magazine"][data-design] .journey-opening h1 { font-size: clamp(32px, 8.4vw, 50px); }
}

/* Small screens: the heavy uppercase face is wider than the sentence case it replaced. */
@media (max-width: 520px) {
  html[data-design="magazine"][data-design]:not([data-composed]) main :is(h1, h2):not(.doc h2, .sec h2, .journey-opening h1) { font-size: min(8.8vw, 38px); overflow-wrap: anywhere; }
  html[data-design="magazine"][data-design]:not([data-composed]) main h1:not(.journey-opening h1) { font-size: min(11.5vw, 56px); }
}

/* The legal pages hard-code light greys for a dark ground; on the bone reading surface use readable ink. */
html[data-design="magazine"][data-design] .page:has(> .doc) :is(p, li, dd, dt, address) { color: var(--mag-bone-text); }
html[data-design="magazine"][data-design] .page:has(> .doc) :is(.toc a, .updated, time) { color: var(--mag-bone-quiet); }
html[data-design="magazine"][data-design] .page:has(> .doc) .sec p a { text-decoration-color: var(--mag-ink); }

/* ----- Load-profile bars: tint from the surrounding text colour so they read on ink and on paper ----- */
html[data-design="magazine"][data-design] .bars i { background: color-mix(in srgb, var(--type) 30%, transparent); }
html[data-design="magazine"][data-design] .bars i.taper { background: color-mix(in srgb, var(--type) 12%, transparent); }
html[data-design="magazine"][data-design] .bars { border-bottom-color: color-mix(in srgb, var(--type) 40%, transparent); }
html[data-design="magazine"][data-design] .bars i.lit { background: color-mix(in srgb, var(--type) 62%, transparent); }
html[data-design="magazine"][data-design] .bars i.test { background: color-mix(in srgb, var(--type) 14%, transparent); border-top-color: color-mix(in srgb, var(--type) 55%, transparent); }

/* Accessible foregrounds for controls and small calendar dates. */
html[data-design="magazine"] .journey-page .race-card-submit,
html[data-design="magazine"] .journey-primary { background: var(--accent-solid); color: #fff; }
html[data-design="magazine"] .journey-page .race-card-submit:hover,
html[data-design="magazine"] .journey-primary:hover { background: var(--accent-solid); color: #fff; }
html[data-design="magazine"] .races .datebox .m { color: var(--mag-soft); }

/* Owner review, 10 Nov 2026 — use the magazine's typography, rule and spacing
   grammar on the practical race/calendar/fuelling surfaces, without changing data
   behaviour. The coaching method/pricing sections are editorial bands, not white
   boxed cards. */

html[data-design="magazine"] .page:has(> .coaching-opening) > :is(.method, .involvement) {
  --type: var(--mag-bone);
  --text-soft: var(--mag-soft);
  --text-quiet: var(--mag-dim);
  background: var(--mag-ink);
  color: var(--mag-bone);
  box-shadow: none;
  clip-path: none;
}
html[data-design="magazine"] .page:has(> .coaching-opening) > :is(.method, .involvement) .section-heading h2 {
  color: var(--mag-paper);
}
html[data-design="magazine"] .page:has(> .coaching-opening) > .method .start-grid p,
html[data-design="magazine"] .page:has(> .coaching-opening) > .involvement :is(.tier-for, .tier li) {
  color: var(--mag-soft);
}
html[data-design="magazine"] .page:has(> .coaching-opening) > .involvement .tier {
  border-color: var(--mag-rule);
}
html[data-design="magazine"] .page:has(> .coaching-opening) > .involvement :is(.tcap, .tnote, .tprice span) {
  color: var(--mag-dim);
}

/* Race Intelligence catalogue: a typographic editorial index with flat filters. */
html[data-design="magazine"] .page:has(> .finder-hero) .finder-hero {
  border-bottom-color: var(--mag-rule);
}
/* The extra editorial air starts at tablet width: on a phone the first race must stay on the
   opening screen (scripts/check-race-pages.mjs), so mobile keeps the catalogue's own spacing. */
@media (min-width: 761px) {
  html[data-design="magazine"] .page:has(> .finder-hero) {
    padding-top: clamp(28px, 4vw, 56px);
  }
  html[data-design="magazine"] .page:has(> .finder-hero) .finder-hero {
    padding-bottom: clamp(34px, 4vw, 60px);
  }
}
html[data-design="magazine"] .page:has(> .finder-hero) .finder-hero h1 {
  max-width: 12ch;
  font: 850 clamp(48px, 6.5vw, 108px)/.92 var(--mag-display);
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-wrap: balance;
}
html[data-design="magazine"] .page:has(> .finder-hero) .finder-hero .intro {
  max-width: 60ch;
}
@media (min-width: 761px) {
  html[data-design="magazine"] .page:has(> .finder-hero) .finder-hero .intro {
    font: clamp(17px, 1.4vw, 20px)/1.65 var(--mag-body);
  }
}
html[data-design="magazine"] .page:has(> .finder-hero) :is(.chip, .show-more) {
  border-radius: 0;
}
html[data-design="magazine"] .page:has(> .finder-hero) .race-results {
  border-top-color: var(--mag-rule);
}

/* Calendar: remove the generic software-card gradient and use the same open,
   ruled editorial structure as the catalogue. */
html[data-design="magazine"] .page[data-calendar-version] {
  padding-top: clamp(28px, 4vw, 56px);
}
html[data-design="magazine"] .page[data-calendar-version] .hero h1 {
  max-width: 13ch;
  font: 850 clamp(48px, 6.5vw, 108px)/.92 var(--mag-display);
  letter-spacing: -.045em;
  text-transform: uppercase;
}
html[data-design="magazine"] .page[data-calendar-version] .intro {
  font: clamp(17px, 1.4vw, 20px)/1.65 var(--mag-body);
  max-width: 60ch;
}
html[data-design="magazine"] .page[data-calendar-version] .find {
  background: transparent;
  border-width: 1px 0;
  border-color: var(--mag-rule);
  padding-inline: 0;
}
html[data-design="magazine"] .page[data-calendar-version] .races {
  border-inline: 0;
  border-color: var(--mag-rule);
}
html[data-design="magazine"] .page[data-calendar-version] .guide {
  border-top: 1px solid var(--mag-rule);
  padding-top: clamp(36px, 5vw, 72px);
}

/* Fuelling: practical form and live results remain side by side, but sit in
   the site's editorial rhythm instead of a standalone calculator dashboard. */
html[data-design="magazine"] .page:has(> .tool-hero) {
  padding-top: clamp(28px, 4vw, 56px);
}
html[data-design="magazine"] .page:has(> .tool-hero) .tool-hero {
  border-bottom: 1px solid var(--mag-rule);
  padding-bottom: clamp(36px, 5vw, 72px);
  margin-bottom: 12px;
}
html[data-design="magazine"] .page:has(> .tool-hero) .tool-hero h1 {
  max-width: 12ch;
  font: 850 clamp(48px, 6.5vw, 108px)/.92 var(--mag-display);
  letter-spacing: -.045em;
  text-transform: uppercase;
}
html[data-design="magazine"] .page:has(> .tool-hero) .tool-hero .intro {
  font: clamp(17px, 1.4vw, 20px)/1.65 var(--mag-body);
}
html[data-design="magazine"] .page:has(> .tool-hero) .workspace {
  border-color: var(--mag-rule);
  /* The hero's bottom rule already opens the workspace; keep one rule, not two. */
  border-top-width: 0;
}
html[data-design="magazine"] .page:has(> .tool-hero) .result-col {
  border-color: var(--mag-rule);
}
html[data-design="magazine"] .page:has(> .tool-hero) .field :is(label, .field-legend) {
  color: var(--mag-soft);
  font: 650 15px/1.5 var(--mag-body);
  letter-spacing: 0;
}
html[data-design="magazine"] .page:has(> .tool-hero) .input {
  border-bottom-color: var(--mag-rule);
}
@media (min-width: 761px) {
  html[data-design="magazine"] .page:has(> .tool-hero) .form-col {
    padding-left: 0;
  }
  html[data-design="magazine"] .page:has(> .tool-hero) .result-col {
    padding-right: 0;
  }
}
.site-header[data-astro-cid-wpvy4v7s] {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: 64px;
  border-bottom: 1px solid color-mix(in srgb, var(--type) 12%, transparent);
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(18px) saturate(130%);
}

.site-nav[data-astro-cid-wpvy4v7s] {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}

.brand[data-astro-cid-wpvy4v7s], .mobile-brand[data-astro-cid-wpvy4v7s] {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  text-decoration: none;
}

.brand[data-astro-cid-wpvy4v7s] svg, .mobile-brand[data-astro-cid-wpvy4v7s] svg {
  width: 38px;
  height: auto;
  color: var(--type);
}

.brand[data-astro-cid-wpvy4v7s] span[data-astro-cid-wpvy4v7s], .mobile-brand[data-astro-cid-wpvy4v7s] span[data-astro-cid-wpvy4v7s] {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.desktop-links[data-astro-cid-wpvy4v7s] {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 32px);
}

.desktop-links[data-astro-cid-wpvy4v7s] a[data-astro-cid-wpvy4v7s], .nav-cta[data-astro-cid-wpvy4v7s] {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.desktop-links[data-astro-cid-wpvy4v7s] a[data-astro-cid-wpvy4v7s] {
  color: var(--text-quiet);
  text-decoration: none;
  transition: color .16s;
}

.desktop-links[data-astro-cid-wpvy4v7s] a[data-astro-cid-wpvy4v7s]:hover, .desktop-links[data-astro-cid-wpvy4v7s] a[data-astro-cid-wpvy4v7s]:focus-visible {
  color: var(--type);
}

.menu[data-astro-cid-wpvy4v7s] {
  position: relative;
}

.menu[data-astro-cid-wpvy4v7s]:after {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: 100%;
  height: 18px;
}

.panel[data-astro-cid-wpvy4v7s] {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  translate: -50%;
  display: none;
  min-width: 230px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface-1) 96%, transparent);
  border: 1px solid var(--surface-5);
  box-shadow: 0 24px 64px #0000007a;
}

.panel[data-astro-cid-wpvy4v7s] a[data-astro-cid-wpvy4v7s] {
  display: block;
  padding: 10px 11px;
  color: var(--text-muted);
}

.panel[data-astro-cid-wpvy4v7s] a[data-astro-cid-wpvy4v7s]:hover {
  color: var(--type);
  background: var(--surface-3);
}

.menu[data-astro-cid-wpvy4v7s]:hover .panel[data-astro-cid-wpvy4v7s], .menu[data-astro-cid-wpvy4v7s]:focus-within .panel[data-astro-cid-wpvy4v7s] {
  display: block;
}

.nav-cta[data-astro-cid-wpvy4v7s] {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--surface-6);
  border-radius: 8px;
  background: var(--type);
  color: var(--ground);
  transition: background .16s, color .16s;
}

.nav-cta[data-astro-cid-wpvy4v7s]:hover {
  background: var(--accent-solid);
  color: #fff;
}

.mobile-menu[data-astro-cid-wpvy4v7s] {
  display: none;
}

@media (width <= 920px) {
  .site-nav[data-astro-cid-wpvy4v7s] {
    grid-template-columns: 1fr auto;
  }

  .desktop-links[data-astro-cid-wpvy4v7s] {
    display: none;
  }

  .nav-cta[data-astro-cid-wpvy4v7s] {
    margin-right: 50px;
  }

  .mobile-menu[data-astro-cid-wpvy4v7s] {
    display: block;
    position: fixed;
    top: 10px;
    right: 14px;
    z-index: 42;
  }

  .mobile-menu[data-astro-cid-wpvy4v7s] summary[data-astro-cid-wpvy4v7s] {
    width: 44px;
    height: 44px;
    display: grid;
    place-content: center;
    gap: 6px;
    list-style: none;
    cursor: pointer;
  }

  .mobile-menu[data-astro-cid-wpvy4v7s] summary[data-astro-cid-wpvy4v7s]::-webkit-details-marker {
    display: none;
  }

  .mobile-menu[data-astro-cid-wpvy4v7s] summary[data-astro-cid-wpvy4v7s] span[data-astro-cid-wpvy4v7s] {
    width: 21px;
    height: 1px;
    background: var(--type);
    transition: transform .18s;
  }

  .mobile-menu[data-astro-cid-wpvy4v7s][open] summary[data-astro-cid-wpvy4v7s] {
    position: fixed;
    top: 10px;
    right: 14px;
    z-index: 44;
  }

  .mobile-menu[data-astro-cid-wpvy4v7s][open] summary[data-astro-cid-wpvy4v7s] span[data-astro-cid-wpvy4v7s]:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .mobile-menu[data-astro-cid-wpvy4v7s][open] summary[data-astro-cid-wpvy4v7s] span[data-astro-cid-wpvy4v7s]:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .mobile-sheet[data-astro-cid-wpvy4v7s] {
    position: fixed;
    inset: 0;
    z-index: 43;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 24px 48px;
    background: var(--ground);
  }

  .mobile-brand[data-astro-cid-wpvy4v7s] {
    min-height: 44px;
    margin-bottom: 28px;
  }

  .mobile-sheet[data-astro-cid-wpvy4v7s] > a[data-astro-cid-wpvy4v7s]:not(.mobile-brand) {
    padding: 14px 0;
    border-bottom: 1px solid var(--surface-5);
    font-size: 22px;
    text-decoration: none;
  }

  .mgroup[data-astro-cid-wpvy4v7s] {
    padding: 18px 0;
    border-bottom: 1px solid var(--surface-5);
    display: grid;
    gap: 12px;
  }

  .mgroup-label[data-astro-cid-wpvy4v7s] {
    margin: 0 0 4px;
    color: var(--text-quiet);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .mgroup[data-astro-cid-wpvy4v7s] a[data-astro-cid-wpvy4v7s] {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-muted);
    font-family: var(--font-body), system-ui, sans-serif;
    font-size: 15px;
    text-decoration: none;
  }
}

@media (width <= 520px) {
  .brand[data-astro-cid-wpvy4v7s] span[data-astro-cid-wpvy4v7s] {
    display: none;
  }

  .nav-cta[data-astro-cid-wpvy4v7s] {
    padding-inline: 12px;
    font-size: 12px;
  }

  .nav-cta[data-astro-cid-wpvy4v7s] span[data-astro-cid-wpvy4v7s] {
    display: none;
  }
}
footer[data-astro-cid-jo6i4kqk] {
  border-top: 1px solid var(--grey);
  margin-top: 12vh;
  padding: 40px 0 60px;
}

.footer-inner[data-astro-cid-jo6i4kqk] {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-bar[data-astro-cid-jo6i4kqk] {
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 4vw, 64px);
}

.footer-bar[data-astro-cid-jo6i4kqk] nav[data-astro-cid-jo6i4kqk] {
  flex: auto;
  min-width: 0;
}

.instagram-link[data-astro-cid-jo6i4kqk] {
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.instagram-link[data-astro-cid-jo6i4kqk] svg[data-astro-cid-jo6i4kqk] {
  display: block;
  width: 20px;
  height: 20px;
}

@media (width <= 640px) {
  .footer-bar[data-astro-cid-jo6i4kqk] {
    gap: 12px;
  }

  .footer-bar[data-astro-cid-jo6i4kqk] nav[data-astro-cid-jo6i4kqk] {
    gap: 2px 18px;
  }
}

footer[data-astro-cid-jo6i4kqk] nav[data-astro-cid-jo6i4kqk] {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 13px;
}

footer[data-astro-cid-jo6i4kqk] button[data-astro-cid-jo6i4kqk] {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

footer[data-astro-cid-jo6i4kqk] button[data-astro-cid-jo6i4kqk]:focus-visible {
  outline: 2px solid var(--type);
  outline-offset: 4px;
}

footer[data-astro-cid-jo6i4kqk] a[data-astro-cid-jo6i4kqk], footer[data-astro-cid-jo6i4kqk] button[data-astro-cid-jo6i4kqk] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  padding: 0;
  margin: 0;
}

footer[data-astro-cid-jo6i4kqk] a[data-astro-cid-jo6i4kqk]:hover {
  opacity: .72;
}

.colophon[data-astro-cid-jo6i4kqk] {
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-quiet);
  margin: 0;
  max-width: 62ch;
}
.cookie-consent[data-astro-cid-kror3uvh] {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: #0a0a0af5;
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--surface-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}

.cookie-consent[data-astro-cid-kror3uvh][hidden], .cookie-consent[data-astro-cid-kror3uvh] button[data-astro-cid-kror3uvh][hidden] {
  display: none;
}

.cookie-status[data-astro-cid-kror3uvh] {
  margin: 0;
  padding: 0 var(--gutter);
  color: var(--text-soft);
  font-size: 14px;
}

.cookie-status[data-astro-cid-kror3uvh]:empty {
  display: none;
}

.cookie-consent[data-astro-cid-kror3uvh] button[data-astro-cid-kror3uvh]:focus-visible {
  outline: 2px solid var(--type);
  outline-offset: 4px;
}

.cookie-consent[data-astro-cid-kror3uvh] p[data-astro-cid-kror3uvh] {
  margin: 0;
  max-width: 62ch;
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
}

.cookie-consent[data-astro-cid-kror3uvh] a[data-astro-cid-kror3uvh] {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-color: var(--text-quiet);
}

.cookie-consent[data-astro-cid-kror3uvh] a[data-astro-cid-kror3uvh]:hover {
  text-decoration-color: var(--type);
}

.cookie-actions[data-astro-cid-kror3uvh] {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-consent[data-astro-cid-kror3uvh] button[data-astro-cid-kror3uvh] {
  font-family: var(--font-display), system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  min-height: 44px;
  padding: .65em 1.2em;
}

.cookie-decline[data-astro-cid-kror3uvh] {
  background: none;
  color: var(--type);
  border: 1px solid #f4f4f373;
}

.cookie-decline[data-astro-cid-kror3uvh]:hover {
  border-color: var(--type);
}

.cookie-accept[data-astro-cid-kror3uvh] {
  background: color-mix(in srgb, var(--accent) 75%, var(--ground));
  color: var(--type);
  border: 1px solid color-mix(in srgb, var(--accent) 75%, var(--ground));
}

.cookie-accept[data-astro-cid-kror3uvh]:hover {
  opacity: .88;
}

@media (width <= 640px) {
  .cookie-consent[data-astro-cid-kror3uvh] {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions[data-astro-cid-kror3uvh] {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .cookie-consent[data-astro-cid-kror3uvh] {
    padding: 14px 16px;
    gap: 10px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .cookie-consent[data-astro-cid-kror3uvh] p[data-astro-cid-kror3uvh] {
    min-height: 0;
  }
}
