@font-face { font-family: "Unbounded"; src: url("/fonts/Unbounded-wght.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("/fonts/Rubik-wght.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("/fonts/Rubik-Italic-wght.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
/* ==========================================================================
   Runqo web — site.css
   One stylesheet for every page of runqo.app and discover.runqo.app.

   1. Design-system tokens   copied from the Runqo design system's tokens.json.
                             Regenerate from that file; never edit by hand.
                             Last synced 13 Nov 2026 (system version 1794576707-2c7e).
   2. Web-only tokens        live here, not in the design system (its tokens.json
                             feeds the app's code generator).
   3. Base, layout, components, pages.

   Theme:  follows prefers-color-scheme. [data-theme] forces one theme on an
           element and its children: the design canvas uses it to show both
           themes side by side, and the site uses it on .stage-ui, which always
           shows the app's light theme because every screenshot is light.
   Launch: one flag on <html>, data-store="soon" | "live". Elements marked
           .when-soon / .when-live show only in their state. The build can
           instead emit only one state's markup; the classes still apply.
   Breakpoints are container queries on .site, which is the full page width,
   so they behave exactly like media queries: md = 48rem, lg = 64rem
   (Tailwind's md: and lg:).
   ========================================================================== */

/* ---------- 1. Design-system tokens ---------- */
:root {
  --font-display: "Unbounded", "Rubik", system-ui, sans-serif;
  --font-text: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;

  --accent: #0B7A42;
  --on-accent: #FFFFFF;
  --on-accent-soft: #E7F2EC;
  --on-accent-line: #60A984;

  --radius-card: 20px;
  --radius-hero: 24px;
  --radius-inner: 16px;
  --radius-day: 14px;
  --radius-pill: 999px;
}

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F4F0;
  --surface: #FFFFFF;
  --surface-2: #E7E9E3;
  --line: #E1E3DD;
  --ink: #15171B;
  --ink-2: #4F555E;
  --ink-3: #626973;
  --ink-fill: #15171B;
  --on-ink: #FFFFFF;
  --on-ink-soft: #B8BCC4;
  --accent-ink: #0A6A39;
  --accent-mark: #0B7A42;
  --tint: #DAEBE3;
  --danger: #B42318;
  --image-slot: #D9DCD6;
  --map-land: #ECEEE8;
  --focus-ring: 0 0 0 2px #F3F4F0, 0 0 0 4px #15171B;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101311;
    --surface: #1A1E1B;
    --surface-2: #262B28;
    --line: #2C322E;
    --ink: #F3F5F2;
    --ink-2: #BFC6C1;
    --ink-3: #8E968F;
    --ink-fill: #F3F5F2;
    --on-ink: #15171B;
    --on-ink-soft: #4F555E;
    --accent-ink: #6DAF8E;
    --accent-mark: #6DAF8E;
    --tint: #163826;
    --danger: #F08C84;
    --image-slot: #2E3430;
    --map-land: #1F2420;
    --focus-ring: 0 0 0 2px #101311, 0 0 0 4px #F3F5F2;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101311;
  --surface: #1A1E1B;
  --surface-2: #262B28;
  --line: #2C322E;
  --ink: #F3F5F2;
  --ink-2: #BFC6C1;
  --ink-3: #8E968F;
  --ink-fill: #F3F5F2;
  --on-ink: #15171B;
  --on-ink-soft: #4F555E;
  --accent-ink: #6DAF8E;
  --accent-mark: #6DAF8E;
  --tint: #163826;
  --danger: #F08C84;
  --image-slot: #2E3430;
  --map-land: #1F2420;
  --focus-ring: 0 0 0 2px #101311, 0 0 0 4px #F3F5F2;
}
/* .stage-ui sits on ink-fill, which is light in the dark theme: keep it light. */
.stage-ui[data-theme="light"] { --focus-ring: 0 0 0 2px #F3F4F0, 0 0 0 4px #15171B; }

/* ---------- 2. Web-only tokens ---------- */
:root {
  /* Display type, fluid from 390 to 1440. Unbounded. */
  --fs-display-xl: clamp(2.25rem, 1.2rem + 4cqi, 4.5rem);      /* 36 → 72  hero h1, final band */
  --fs-display-l:  clamp(1.75rem, 1.1rem + 2.6cqi, 3.5rem);    /* 28 → 55  section h2, page h1 */
  --fs-display-m:  clamp(1.375rem, 1.1rem + 1.1cqi, 2rem);     /* 22 → 32  band and card headings, facts */
  --fs-display-s:  clamp(1.125rem, 1rem + 0.45cqi, 1.375rem);  /* 18 → 22  legal h2, contact addresses */
  --fs-numeral-xl: clamp(3rem, 2.2rem + 3.4cqi, 5.25rem);      /* 48 → 84  404 numeral */
  /* Text, Rubik */
  --fs-lead:  clamp(1rem, 0.95rem + 0.35cqi, 1.25rem);         /* 16 → 20  hero and section intros */
  --fs-prose: clamp(1rem, 0.96rem + 0.15cqi, 1.0625rem);       /* 16 → 17  legal text */
  /* On accent, display text only (24px and up): accent 75% toward white, 3.78:1 */
  --on-accent-2: #C2DED0;

  /* Widths */
  --w-page: 75rem;        /* 1200  content column */
  --w-wide: 86rem;        /* 1376  hero and bands */
  --w-measure: 42rem;     /* 672   legal text, about 70 characters a line */
  --w-copy: 32rem;        /* 512   intro paragraphs */

  /* Spacing */
  --gutter: clamp(1rem, 0.25rem + 2.6cqi, 3rem);               /* 16 → 41 */
  --space-section: clamp(4rem, 2.5rem + 6cqi, 8rem);           /* 64 → 126 between home sections */
  --space-block: clamp(1.5rem, 1rem + 2cqi, 2.5rem);           /* 24 → 40  inside a section */
  --radius-band: clamp(24px, 1rem + 1.6cqi, 40px);             /* 24 → 39  hero, stages, bands */

  /* Device frame around a screenshot (screens are 720 × 1568) */
  --device-bezel: #15171B;

  /* Event page (discover.runqo.app) */
  --fs-event-name: clamp(1.75rem, 1.3rem + 1.9cqi, 3rem);      /* 28 → 48  event name (h1), runs full */
  --w-rail: 24rem;        /* 384   event page: sticky right column from lg */
  --w-event: 44rem;       /* 704   event page: single column, md and no-rail desktop */
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.site {
  container: site / inline-size;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
.site main { flex: 1 0 auto; }
.site img { max-width: 100%; height: auto; display: block; }
/* Zero specificity, so a link styled by one class keeps that class's colour
   (.btn-primary, .text-link, .skip). As `.site a` this reset outranked them. */
:where(.site a) { color: inherit; }
.site h1, .site h2, .site h3, .site p { margin: 0; }

.site :focus-visible {
  outline: 2px solid transparent; /* shows in forced-colors mode */
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}
.site .btn:focus-visible, .site .chip:focus-visible, .site .card-link:focus-visible { border-radius: var(--radius-pill); }
.site .card-link:focus-visible { border-radius: var(--radius-card); }

.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: 12px; z-index: 10;
  transform: translateY(-200%);
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  border-radius: var(--radius-pill); background: var(--ink-fill); color: var(--on-ink);
  font-weight: 700; font-size: 15px; text-decoration: none;
}
.skip:focus { transform: none; }

/* launch flag */
[data-store="soon"] .when-live,
[data-store="live"] .when-soon { display: none !important; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--w-page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-wide { max-width: calc(var(--w-wide) + 2 * var(--gutter)); }
.section { margin-top: var(--space-section); }

/* ---------- Type ---------- */
.display-xl { font: 800 var(--fs-display-xl)/1.02 var(--font-display); letter-spacing: -0.04em; text-wrap: balance; }
.display-l  { font: 700 var(--fs-display-l)/1.06 var(--font-display); letter-spacing: -0.03em; text-wrap: balance; }
.display-m  { font: 700 var(--fs-display-m)/1.15 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.display-s  { font: 600 var(--fs-display-s)/1.25 var(--font-display); letter-spacing: -0.015em; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); max-width: var(--w-copy); text-wrap: pretty; }
.meta { font-size: 13px; line-height: 18px; color: var(--ink-3); }

/* ---------- Logo ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; color: var(--ink); text-decoration: none; flex: none;
}
.brand-mark { width: 40px; height: 29px; flex: none; display: block; }
.wordmark { font: 700 19px/1 var(--font-display); letter-spacing: -0.02em; }

/* ---------- Buttons, pills, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border: 0; border-radius: var(--radius-pill);
  font: 700 15px/20px var(--font-text); white-space: nowrap; text-decoration: none;
  cursor: pointer; transition: box-shadow 150ms;
}
.btn:active { transition: none; box-shadow: inset 0 0 0 999px color-mix(in srgb, currentColor 14%, transparent); }
.btn-primary { height: 56px; background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: none; color: var(--ink); border: 2px solid var(--ink); }
.btn-sm { height: 44px; padding: 0 18px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.status {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--ink);
  font: 700 14px/1 var(--font-text); white-space: nowrap;
}

.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px; border-radius: var(--radius-pill);
  background: var(--surface); color: var(--ink); border: 1px solid var(--ink-3);
  font: 600 14px/1 var(--font-text); white-space: nowrap; text-decoration: none;
}
.chip svg { width: 16px; height: 16px; }
.chip-on { background: var(--ink-fill); color: var(--on-ink); border-color: var(--ink-fill); }
.chip-browse { height: 44px; padding: 0 18px; background: var(--surface-2); font-size: 15px; }

/* Store badges: the official artwork, unmodified, both 48px tall, side by side */
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge-link { display: inline-block; border-radius: 9px; line-height: 0; }
.badge-link img { height: 48px; width: auto; }
.badge-ph { /* placeholder until the official files are dropped in */
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; border-radius: 9px; background: #000; color: #fff;
  border: 1px solid #A6A6A6; font: 600 13px/1 var(--font-text);
}
.badge-ph-apple { width: 144px; }
.badge-ph-google { width: 162px; }

/* ---------- Header ---------- */
.hdr-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.nav { display: none; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: var(--radius-pill); color: var(--ink-2); text-decoration: none;
  font: 600 15px/20px var(--font-text);
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); }
.hdr-cta { margin-left: auto; display: flex; align-items: center; }
.hdr-cta .long { display: none; }
@container site (min-width: 48rem) {
  .hdr-in { min-height: 76px; }
  .hdr-cta .long { display: inline; }
}
@container site (min-width: 64rem) {
  .nav { display: block; margin-left: auto; }
  .nav + .hdr-cta { margin-left: 8px; }
}

/* ---------- Device frame ---------- */
.device {
  --dw: 300px;
  width: var(--dw);
  padding: calc(var(--dw) * 0.03);
  border-radius: calc(var(--dw) * 0.085);
  background: var(--device-bezel);
  flex: none;
}
.device img { width: 100%; height: auto; border-radius: calc(var(--dw) * 0.052); }
.shot-crop { overflow: hidden; flex: none; }

/* ---------- Home: hero ---------- */
.hero { margin-top: 4px; }
.hero-card {
  display: grid;
  background: var(--accent); color: var(--on-accent);
  border-radius: var(--radius-band);
  overflow: hidden;
  padding: clamp(28px, 1rem + 3cqi, 80px) clamp(20px, 0.5rem + 3.6cqi, 80px) 0;
  gap: 36px;
}
.hero-title .l2 { display: block; color: var(--on-accent-2); }
.hero-title .l1 { display: block; }
.hero .lead { color: var(--on-accent-soft); margin-top: 20px; max-width: 34rem; }
.hero-cta { margin-top: 32px; }
.soon-block { display: flex; flex-direction: column; gap: 6px; }
.soon-title { font: 600 clamp(1.125rem, 1rem + 0.5cqi, 1.375rem)/1.3 var(--font-display); letter-spacing: -0.015em; }
.soon-note { font-size: 15px; line-height: 22px; color: var(--on-accent-soft); }
.badges + .soon-note { margin-top: 12px; }
.hero-shot { justify-self: center; align-self: end; height: 360px; }
.hero-shot .device { --dw: 252px; }
@container site (min-width: 48rem) {
  .hero-shot { height: 470px; }
  .hero-shot .device { --dw: 300px; }
}
@container site (min-width: 64rem) {
  .hero-card { grid-template-columns: minmax(0, 1fr) auto; column-gap: 56px; min-height: 660px; }
  .hero-copy { align-self: center; padding-bottom: clamp(28px, 1rem + 3cqi, 80px); }
  .hero-shot { height: 600px; }
  .hero-shot .device { --dw: 330px; }
}

/* ---------- Home: features ---------- */
.feature { display: grid; gap: var(--space-block); align-items: center; }
.feature .lead { margin-top: 16px; }
.feature .note { margin-top: 16px; font-size: 15px; line-height: 22px; color: var(--ink-3); max-width: var(--w-copy); }
.stage {
  margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  background: var(--ink-fill);
  border-radius: var(--radius-band);
  overflow: hidden;
  padding: 20px 20px 0;
}
.stage-ui {
  width: 100%; max-width: 22rem;
  display: flex; flex-direction: column; gap: 12px;
  color: var(--ink); font-size: 15px; line-height: 22px;
}
.stage-shot { height: 380px; }
.stage-shot .device { --dw: 236px; }
.stage-ui .hide-sm { display: none; }
@container site (min-width: 48rem) {
  .stage-ui .hide-sm { display: flex; }
  .stage { flex-direction: row-reverse; justify-content: center; align-items: center; gap: 32px; padding: 40px; }
  .stage-ui { width: auto; flex: 1 1 18rem; max-width: 20rem; }
  .stage-shot { height: auto; }
  .stage-shot .device { --dw: 256px; }
}
@container site (min-width: 64rem) {
  .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 64px; }
  .stage { min-height: 620px; }
}

/* live components, after the design system's bundle.css */
.ui-card { background: var(--surface); border-radius: var(--radius-card); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ui-h3 { font: 600 17px/22px var(--font-display); letter-spacing: -0.01em; }
.ui-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ui-countdown { background: var(--accent); color: var(--on-accent); border-radius: var(--radius-card); padding: 18px 20px; display: flex; align-items: center; gap: 18px; }
.ui-countdown-num { display: block; font: 800 68px/68px var(--font-display); letter-spacing: -0.04em; }
.ui-countdown-unit { display: block; font: 600 14px/18px var(--font-text); color: var(--on-accent-soft); }
.ui-countdown-facts { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 19px; border-left: 1px solid var(--on-accent-line); padding-left: 18px; }
.ui-dpills { display: flex; flex-wrap: wrap; gap: 8px; }
.ui-dpill { height: 36px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--ink-fill); color: var(--on-ink); display: inline-flex; align-items: center; font: 600 13px/1 var(--font-display); }
.ui-cats { font: 500 14px/20px var(--font-text); color: var(--ink-2); }
.ui-race { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.ui-race + .ui-race { border-top: 1px solid var(--line); }
.ui-race-dist { width: 76px; flex: none; display: flex; align-items: baseline; gap: 3px; }
.ui-race-num { font: 700 21px/28px var(--font-display); letter-spacing: -0.03em; }
.ui-race-unit { font: 600 12px/16px var(--font-text); color: var(--ink-3); }
.ui-race-name { display: block; font: 700 16px/20px var(--font-text); }
.ui-race-meta { display: block; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.ui-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ui-action { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: var(--radius-inner); background: var(--surface-2); font: 600 12px/16px var(--font-text); text-align: center; }
.ui-action svg { width: 22px; height: 22px; }
.ui-sticky { display: flex; flex-direction: column; gap: 8px; }
.ui-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: var(--radius-pill); font: 700 15px/20px var(--font-text); }
.ui-btn svg { width: 20px; height: 20px; }
.ui-btn-primary { background: var(--accent); color: var(--on-accent); }
.ui-btn-saved { background: var(--tint); color: var(--accent-ink); }
.ui-footnote { font-size: 13px; line-height: 18px; color: var(--ink-2); text-align: center; }
.ui-footnote b { color: var(--accent-ink); }
.ui-myrow { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.ui-myrow + .ui-myrow { border-top: 1px solid var(--line); }
.ui-myblock { width: 56px; height: 56px; flex: none; border-radius: var(--radius-inner); background: var(--ink-fill); color: var(--on-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ui-myblock-num { font: 700 20px/24px var(--font-display); }
.ui-myblock-lbl { font: 700 11px/13px var(--font-text); letter-spacing: 0.06em; text-transform: uppercase; }
.ui-myrow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ui-name { font: 700 16px/20px var(--font-text); }
.ui-dist { font: 700 14px/20px var(--font-text); }
.ui-heart { color: var(--accent-ink); flex: none; width: 22px; height: 22px; }

/* ---------- Home: stay updated ---------- */
.updates-head { display: grid; gap: 16px; }
.updates { list-style: none; margin: var(--space-block) 0 0; padding: 0; display: grid; gap: 12px; }
.update { background: var(--surface); border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.update .pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; margin-bottom: 8px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--ink); font: 700 13px/1 var(--font-text); white-space: nowrap;
}
.update .pill-tint { background: var(--tint); color: var(--accent-ink); }
.update .pill svg { width: 14px; height: 14px; }
.update-name { font: 700 16px/21px var(--font-text); overflow-wrap: anywhere; }
.update-text { font-size: 14px; line-height: 20px; color: var(--ink-2); }
@container site (min-width: 48rem) {
  .updates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container site (min-width: 64rem) {
  .updates-head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 64px; align-items: end; }
  .updates-head .lead { margin: 0; }
  .updates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Home: facts ---------- */
.facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border-radius: var(--radius-card); overflow: hidden;
}
.facts li {
  background: var(--surface); padding: clamp(20px, 1rem + 1cqi, 32px);
  font: 700 var(--fs-display-m)/1.15 var(--font-display); letter-spacing: -0.02em;
  display: flex; align-items: center; min-height: clamp(96px, 4rem + 4cqi, 140px);
  text-wrap: balance;
}
@container site (min-width: 64rem) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Home: organizers ---------- */
.org {
  background: var(--surface); border-radius: var(--radius-card);
  padding: clamp(24px, 1rem + 2.4cqi, 56px);
  display: grid; gap: 20px; justify-items: start;
}
.org .lead { margin-top: 10px; }
@container site (min-width: 48rem) {
  .org { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 40px; }
}

/* ---------- Home: final band ---------- */
.band {
  background: var(--accent); color: var(--on-accent);
  border-radius: var(--radius-band);
  padding: clamp(32px, 1rem + 4cqi, 88px) clamp(20px, 0.5rem + 4cqi, 88px);
  display: grid; gap: 28px;
}
.band .lockup { color: var(--on-accent); }
.band .soon-note { margin-top: 0; }
@container site (min-width: 64rem) {
  .band { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 64px; }
  .band-cta { padding-bottom: 6px; }
}

/* ---------- Footer ---------- */
.ftr { margin-top: var(--space-section); border-top: 1px solid var(--line); }
.ftr-in { display: grid; gap: 20px; padding-block: 32px 40px; }
.ftr-about { display: flex; flex-direction: column; gap: 8px; }
.ftr-tag { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.ftr-links { list-style: none; margin: 0 0 0 -10px; padding: 0; display: flex; flex-wrap: wrap; }
.ftr-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--ink); text-decoration: none; font: 600 15px/20px var(--font-text);
}
.ftr-links a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.ftr-copy { font-size: 13px; line-height: 18px; color: var(--ink-3); }
@container site (min-width: 64rem) {
  .ftr-in { grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 40px; }
  .ftr-copy { grid-column: 1 / -1; }
}

/* ---------- Page heads (legal, contact, 404) ---------- */
.page-head { padding-top: clamp(24px, 1rem + 2.4cqi, 64px); }
.page-head .lead { margin-top: 14px; }

/* ---------- Legal template ---------- */
.legal { display: grid; padding-top: clamp(16px, 0.5rem + 1.6cqi, 40px); }
.legal-aside { display: none; min-width: 0; }
.legal-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.legal-main .prose { margin-top: 8px; }
.doc-tabs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.doc-tabs a { position: relative; }
.doc-tabs a::after { content: ""; position: absolute; inset: -2px 0; } /* 44px hit area */
.doc-tabs a[aria-current="page"] { background: var(--ink-fill); color: var(--on-ink); border-color: var(--ink-fill); }

.toc-m { background: var(--surface); border-radius: var(--radius-inner); }
.toc-m summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 16px; cursor: pointer; list-style: none;
  font: 700 15px/20px var(--font-text);
}
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary svg { width: 20px; height: 20px; color: var(--ink-3); transition: transform 150ms; }
.toc-m[open] summary svg { transform: rotate(180deg); }
.toc-m ol { margin: 0; padding: 0 16px 12px; border-top: 1px solid var(--line); }
.toc ol, .toc-m ol { list-style: none; }
.toc ol { margin: 0; padding: 0; }
.toc a, .toc-m a {
  display: flex; align-items: center; min-height: 44px; padding: 4px 0;
  color: var(--ink-2); text-decoration: none; font: 500 14px/20px var(--font-text);
}
.toc a:hover, .toc-m a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.toc-title { font: 700 13px/18px var(--font-text); color: var(--ink-3); margin-bottom: 4px; }
.toc { display: none; }

@container site (min-width: 64rem) {
  .legal { grid-template-columns: 15rem minmax(0, var(--w-measure)); column-gap: clamp(48px, 2rem + 4cqi, 120px); justify-content: center; }
  .legal-aside { display: block; position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; padding: 4px; margin: -4px; }
  .legal-main { gap: 40px; }
  .legal-main .prose { margin-top: 0; }
  .toc-m { display: none; }
  .toc { display: block; }
  .toc a { min-height: 32px; padding: 2px 0; } /* pointer-sized on desktop so all 20 entries fit */
}

/* The legal document: plain Markdown HTML, no classes inside .prose */
.prose { min-width: 0; max-width: var(--w-measure); font-size: var(--fs-prose); line-height: 1.65; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose h1 { font: 700 var(--fs-display-l)/1.06 var(--font-display); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.prose h1 + p { margin-top: 14px; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.prose h1 + p strong { color: inherit; font-weight: 600; }
.prose h1 + p + p { margin-top: 28px; font-size: var(--fs-lead); line-height: 1.55; }
.prose h2 {
  margin: 2.5em 0 0; padding-top: 1.25em; border-top: 1px solid var(--line);
  font: 700 var(--fs-display-s)/1.3 var(--font-display); letter-spacing: -0.015em; color: var(--ink);
  scroll-margin-top: 24px; text-wrap: balance;
}
.prose h3 { margin: 1.75em 0 0; font: 600 17px/22px var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
.prose p, .prose ul, .prose ol, .prose table { margin: 0.85em 0 0; }
.prose h2 + p, .prose h3 + p { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-top: 0.45em; padding-left: 0.2em; }
.prose li::marker { color: var(--ink-3); }
.prose ol li::marker { font-weight: 600; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a {
  color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.2em; overflow-wrap: anywhere;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border-radius: var(--radius-inner); overflow: hidden;
  font-size: 14px; line-height: 20px; margin-top: 1.25em;
}
.prose th, .prose td { padding: 12px; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.prose th { font: 600 12px/16px var(--font-text); color: var(--ink-3); padding-block: 14px 10px; border-bottom: 1px solid var(--line); }
.prose td:first-child { min-width: 7.5rem; }
.prose td { border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--ink); font-weight: 600; }
@container site (min-width: 48rem) {
  .prose table { font-size: 15px; line-height: 22px; }
  .prose th, .prose td { padding-inline: 16px; }
}

/* ---------- Contact ---------- */
.contacts { list-style: none; margin: var(--space-block) 0 0; padding: 0; display: grid; gap: 12px; }
.card-link {
  height: 100%; display: flex; flex-direction: column; gap: 8px;
  padding: clamp(20px, 1rem + 1cqi, 32px);
  background: var(--surface); border-radius: var(--radius-card);
  color: var(--ink); text-decoration: none;
}
.card-link .disc { width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.card-link .disc svg { width: 20px; height: 20px; }
.card-link .addr { font: 600 var(--fs-display-s)/1.3 var(--font-display); letter-spacing: -0.015em; color: var(--accent-ink); overflow-wrap: anywhere; }
.card-link .purpose { font-size: 15px; line-height: 22px; color: var(--ink-2); }
.card-link:hover .addr { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.contact-after { margin-top: 24px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.contact-after a { color: var(--accent-ink); font-weight: 600; text-underline-offset: 0.2em; }
@container site (min-width: 48rem) { .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 404 ---------- */
.nf { display: grid; gap: 28px; justify-items: start; padding-top: clamp(24px, 1rem + 4cqi, 96px); }
.nf-tile {
  width: clamp(140px, 5rem + 11cqi, 240px); aspect-ratio: 56 / 64;
  border-radius: clamp(28px, 1rem + 1.8cqi, 52px);
  background: var(--ink-fill); color: var(--on-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nf-num { font: 800 var(--fs-numeral-xl)/1 var(--font-display); letter-spacing: -0.05em; }
.nf-lbl { font: 700 clamp(11px, 0.5rem + 0.5cqi, 15px)/1 var(--font-text); letter-spacing: 0.1em; text-transform: uppercase; }
.nf .lead { margin-top: 14px; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@container site (min-width: 48rem) {
  .nf { grid-template-columns: auto minmax(0, 36rem); column-gap: clamp(40px, 1rem + 4cqi, 96px); align-items: center; justify-content: center; }
}

/* ---------- Share-link fallback (discover.runqo.app) ---------- */
.share-main { flex: 1 0 auto; display: grid; place-items: center; padding: 48px var(--gutter); }
.share-box { width: 100%; max-width: 26rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.lockup-lg { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.lockup-lg .brand-mark { width: 72px; height: 52px; }
.lockup-lg .wordmark { font-size: 28px; letter-spacing: -0.025em; }
.share-msg { display: flex; flex-direction: column; gap: 6px; }
.share-text { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); text-wrap: balance; }
.share-cta { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.share-cta .badges { justify-content: center; }
.text-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--accent-ink); font: 700 15px/20px var(--font-text); text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.text-link svg { width: 18px; height: 18px; }
.share-ftr { padding: 0 var(--gutter) 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; }
.share-ftr a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 13px; color: var(--ink-3); text-decoration: none; }
.share-ftr a:hover { text-decoration: underline; }
@container site (min-width: 48rem) {
  .lockup-lg .brand-mark { width: 96px; height: 69px; }
  .lockup-lg .wordmark { font-size: 36px; }
  .share-box { max-width: 30rem; gap: 32px; }
}

/* ---------- Event page (discover.runqo.app/events/{id}) ----------
   The app's event page on the web, built from the design system's components
   (DayBlock, StatusPill, DistancePills, NoticeCard, Button, MapBlock, RaceRow
   with FactsGrid labels, ImageSlot, OrganizerCard). Prefix ev-.
   Source order is the phone order: hero, rail (official race site, where),
   main (races, about, image, organizer), app block. From lg the rail is a sticky
   right column and the app block a full-width band.
   Every block is optional except the day block, the pill, the name and the
   place. Spacing is `gap` on the parent, so a block that is left out leaves no
   hole. Rules are written under a parent class so they outrank the .site resets. */
.ev { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 28px; padding-top: 4px; padding-bottom: 28px; }
.ev > * { min-width: 0; }

/* hero: when, name, place, distances */
.ev-hero { display: flex; flex-direction: column; gap: 16px; }
.ev-head { display: flex; flex-direction: column; gap: 14px; }
.ev-when { display: flex; align-items: center; gap: 12px; }
.ev-when-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ev-day {
  width: 56px; height: 64px; flex: none; border-radius: var(--radius-day);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.ev-day-weekend { background: var(--ink-fill); color: var(--on-ink); }
.ev-day-weekday { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.ev-day-today { background: var(--accent); color: var(--on-accent); }
.ev-day-past { background: var(--surface-2); color: var(--ink-2); }
.ev-day-off { background: var(--surface-2); color: var(--ink); } /* cancelled: the calendar-x glyph alone */
.ev-day-num { font: 800 26px/28px var(--font-display); }
.ev-day-wd { font: 700 11px/14px var(--font-text); letter-spacing: 0.08em; text-transform: uppercase; }
.ev-day svg { width: 22px; height: 22px; }
.ev-pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 6px 14px; border-radius: 15px; /* a pill on one line, a rounded box when it wraps */
  background: var(--tint); color: var(--accent-ink);
  font: 700 13px/18px var(--font-text); overflow-wrap: anywhere;
}
.ev-pill svg { width: 14px; height: 14px; flex: none; }
.ev-pill-neutral { background: var(--surface-2); color: var(--ink); }
.ev-status { display: flex; align-items: center; gap: 5px; font: 700 13px/18px var(--font-text); color: var(--ink); overflow-wrap: anywhere; }
.ev-status svg { width: 14px; height: 14px; flex: none; }
.ev-title { display: flex; flex-direction: column; gap: 8px; }
.ev-name { font: 700 var(--fs-event-name)/1.22 var(--font-display); letter-spacing: -0.025em; overflow-wrap: anywhere; text-wrap: balance; }
.ev-place { display: flex; align-items: flex-start; gap: 6px; font-size: 1rem; line-height: 22px; color: var(--ink-2); overflow-wrap: anywhere; }
.ev-place svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ink-3); }
.ev-dist { display: flex; flex-direction: column; gap: 10px; }
.ev-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ev-pills li {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border-radius: var(--radius-pill); background: var(--ink-fill); color: var(--on-ink);
  font: 600 13px/1 var(--font-display); white-space: nowrap;
}
.ev-cats { font: 500 14px/20px var(--font-text); color: var(--ink-2); overflow-wrap: anywhere; }
.ev-jump { /* race link: jumps to the marked row */
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px; border-radius: 22px;
  background: var(--tint); color: var(--accent-ink);
  font: 700 14px/20px var(--font-text); text-decoration: none; overflow-wrap: anywhere;
}
.ev-jump svg { width: 16px; height: 16px; flex: none; }
.site .ev-jump:focus-visible { border-radius: 22px; }
.ev-notice { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: var(--surface); border-radius: var(--radius-card); }
.ev-notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.ev-notice-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ev-notice-title { font: 700 15px/20px var(--font-text); }
.ev-notice-text { font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* buttons on the event page grow with their label instead of clipping it */
.ev .btn { height: auto; min-height: 52px; padding-block: 10px; white-space: normal; text-align: center; }
.ev .btn-primary { min-height: 56px; }

/* rail: official race site, where */
.ev-rail { display: flex; flex-direction: column; gap: 28px; }
.ev-cta { display: flex; flex-direction: column; gap: 8px; }
.ev-cta .btn, .ev-card .btn { width: 100%; }
.ev-cta-note { font-size: 13px; line-height: 18px; color: var(--ink-2); text-align: center; overflow-wrap: anywhere; }
.ev-sec { display: flex; flex-direction: column; gap: 12px; }
.ev-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); border-radius: var(--radius-card); }
.ev-map { margin: 0; aspect-ratio: 326 / 176; border-radius: var(--radius-day); overflow: hidden; background: var(--map-land); }
.ev-map picture { display: block; height: 100%; }
.ev-map img, .ev-map svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.ev-addr { font: 700 15px/22px var(--font-text); overflow-wrap: anywhere; }

/* main: races, about, image, organizer */
.ev-main { display: flex; flex-direction: column; gap: 28px; }
.ev-races { list-style: none; margin: 0; padding: 4px 16px; background: var(--surface); border-radius: var(--radius-card); }
.ev-race {
  display: grid; grid-template-columns: 80px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: center;
  padding: 12px 0; scroll-margin-top: 16px;
}
.ev-race + .ev-race { border-top: 1px solid var(--line); }
.ev-race-dist { grid-row: 1 / span 2; display: flex; align-items: baseline; gap: 3px; }
.ev-race-num { font: 700 21px/28px var(--font-display); letter-spacing: -0.03em; }
.ev-race-num-sm { font-size: 17px; } /* a relay: 4×10.5, no unit */
.ev-race-unit { font: 600 12px/16px var(--font-text); color: var(--ink-3); }
.ev-race-body { grid-column: 2; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-race-flag { font: 700 12px/16px var(--font-text); color: var(--accent-ink); }
.ev-race-name { font: 700 16px/20px var(--font-text); overflow-wrap: anywhere; }
.ev-race-facts { /* flex here and in .ev-fact, so white space in the markup never shows */
  grid-column: 2; display: flex; flex-wrap: wrap; column-gap: 0.3em;
  font-size: 13px; line-height: 18px; color: var(--ink-3); overflow-wrap: anywhere;
}
.ev-fact { display: inline-flex; column-gap: 0.25em; }
.ev-fact + .ev-fact::before { content: "·"; margin-right: 0.05em; }
/* read by assistive tech only */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.ev-fact-k-quiet { /* read out, not shown: "+120 m" says it is elevation */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.ev-race[aria-current="true"] { /* /events/{id}/races/{raceId}: this race's row */
  margin-inline: -8px; padding-inline: 8px; border-radius: var(--radius-day);
  background: var(--tint); border-top-color: transparent;
}
.ev-race[aria-current="true"] + .ev-race { border-top-color: transparent; }
.ev-race[aria-current="true"] .ev-race-unit,
.ev-race[aria-current="true"] .ev-race-facts,
.ev-race[aria-current="true"] .ev-fact-k { color: var(--ink-2); } /* ink-3 is not used on tint */
.ev-about {
  display: flex; flex-direction: column; gap: 0.75em; max-width: var(--w-measure);
  font-size: var(--fs-prose); line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere;
}
.ev-image { /* whole, never cropped: posters carry text. The slot hugs the image, so no bars beside a portrait one */
  margin: 0; width: fit-content; max-width: 100%;
  border-radius: var(--radius-card); overflow: hidden; background: var(--image-slot);
}
.ev .ev-image img { width: auto; max-width: 100%; height: auto; max-height: 26rem; }
.ev-org {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--surface); border-radius: var(--radius-card); text-decoration: none;
}
.ev-org-k { display: block; font: 600 12px/16px var(--font-text); color: var(--ink-3); }
.ev-org-v { display: block; font: 600 15px/22px var(--font-text); color: var(--ink); overflow-wrap: anywhere; }
a.ev-org .ev-org-v { color: var(--accent-ink); }
a.ev-org:hover .ev-org-v { text-decoration: underline; text-underline-offset: 0.2em; }
.ev-org svg { width: 20px; height: 20px; flex: none; color: var(--ink-3); }
.site .ev-org:focus-visible { border-radius: var(--radius-card); }

/* app block: takes the place of the app's sticky interest bar */
.ev-app {
  display: grid; gap: 20px;
  padding: clamp(24px, 1rem + 2.4cqi, 56px) clamp(20px, 0.5rem + 3cqi, 56px);
  background: var(--ink-fill); color: var(--on-ink); border-radius: var(--radius-band);
}
.ev-app .brand { min-height: 0; color: var(--on-ink); }
.ev-app .ev-app-title { margin-top: 16px; font: 700 var(--fs-display-m)/1.15 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.ev-app .ev-app-text { margin-top: 8px; max-width: var(--w-copy); font-size: 15px; line-height: 22px; color: var(--on-ink-soft); }
.ev-app-get { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ev-app .status {
  height: auto; min-height: 36px; padding-block: 8px; white-space: normal; line-height: 1.3;
  background: color-mix(in srgb, var(--on-ink) 14%, transparent); color: var(--on-ink);
}
.ev-app .meta { color: var(--on-ink-soft); }
.site .ev-app :focus-visible { box-shadow: 0 0 0 2px var(--ink-fill), 0 0 0 4px var(--on-ink); } /* the ring, inverted for ink-fill */

@container site (min-width: 48rem) {
  .ev { padding-top: 16px; padding-bottom: 40px; }
  .ev > * { width: 100%; max-width: var(--w-event); margin-inline: auto; }
}
@container site (min-width: 64rem) {
  .ev {
    grid-template-columns: minmax(0, 1fr) var(--w-rail);
    column-gap: clamp(40px, 1rem + 3.4cqi, 72px); row-gap: 40px; padding-top: 24px;
  }
  .ev > * { max-width: none; margin-inline: 0; }
  .ev-hero { grid-column: 1; grid-row: 1; gap: 20px; }
  .ev-rail { grid-column: 2; grid-row: 1 / span 2; align-self: start; position: sticky; top: 24px; }
  .ev-main { grid-column: 1; grid-row: 2; gap: 40px; }
  .ev-app { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 64px; }
  .ev:not(:has(.ev-rail)) > :not(.ev-app) { max-width: var(--w-event); } /* no rail: one readable column */
  .ev-card { padding: 20px; }
  .ev-races { padding: 8px 20px; }
  /* race rows become a table: distance, name, then label-over-value facts in fixed columns */
  .ev-race { grid-template-columns: 96px minmax(0, 1fr) auto; row-gap: 0; padding: 14px 0; }
  .ev-race-dist { grid-row: auto; }
  .ev-race-facts { grid-column: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 7.5rem)); column-gap: 16px; }
  .ev-fact { display: flex; flex-direction: column; gap: 0; min-width: 0; }
  .ev-fact + .ev-fact::before { content: none; }
  .ev-fact-start { grid-column: 1; }
  .ev-fact-elev { grid-column: 2; }
  .ev-races:has(.ev-fact-day) .ev-race-facts { grid-template-columns: repeat(3, minmax(0, 7.5rem)); }
  .ev-fact-day { grid-column: 1; }
  .ev-races:has(.ev-fact-day) .ev-fact-start { grid-column: 2; }
  .ev-races:has(.ev-fact-day) .ev-fact-elev { grid-column: 3; }
  .ev-fact-k { font: 600 12px/16px var(--font-text); }
  .ev-fact-k-quiet { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .ev-fact-v { font: 700 15px/20px var(--font-text); color: var(--ink); }
}

/* ---------- Event not found (discover.runqo.app) ---------- */
.ev-none { flex: 1 0 auto; display: grid; place-items: center; padding: 24px var(--gutter) 64px; }
.ev-none-box { width: 100%; max-width: 26rem; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ev-none-disc {
  width: 64px; height: 64px; margin-bottom: 8px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.ev-none-disc svg { width: 28px; height: 28px; }
.ev-none .lead { max-width: none; text-wrap: balance; }
.ev-none .btn { margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  .btn, .toc-m summary svg { transition: none; }
}
