/* ============================================================
   PENDIO — promotional site
   Light theme, matched to the Pendio app design tokens.
   Two semantic accents only: orange = up/strain, blue = down.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- shared scale ---------- */
:root {
  --maxw: 1160px;
  --pad: clamp(20px, 5vw, 64px);
  --r: 18px;
  --r-lg: 26px;
  --tab: tabular-nums;
}

/* ============================================================
   THEME — light (matches the Pendio app)
   ============================================================ */
:root {
  --bg: #F2F2F7;
  --bg2: #FFFFFF;
  --surface: #FFFFFF;
  --surface2: #ECECF1;
  --ink: #101013;
  --muted: rgba(60,60,67,0.60);
  --faint: rgba(60,60,67,0.34);
  --line: rgba(60,60,67,0.13);
  --line-strong: rgba(60,60,67,0.22);
  --hairline: rgba(60,60,67,0.29);
  --fill: rgba(118,118,128,0.12);
  /* the accents and chart tints follow the app (design system tokens) */
  --climb: #C4501A;
  --climb-deep: #8C3812;
  --descent: #3F6DC2;
  --descent-deep: #2B4D8F;
  --climb-soft: rgba(196,80,26,0.14);
  --descent-soft: rgba(63,109,194,0.14);
  --climb-fill: rgba(196,80,26,0.26);
  --descent-fill: rgba(63,109,194,0.26);
  --climb-wash: rgba(196,80,26,0.08);
  --descent-wash: rgba(63,109,194,0.08);
  --terrain-fill: #E7E7EE;
  --terrain-line: #6F6F78;
  --card-shadow: 0 1px 3px rgba(20,20,30,0.05), 0 14px 36px -18px rgba(20,30,50,0.16);
  --frame-border: 1px solid rgba(60,60,67,0.12);
  --frame-glow: 0 18px 50px -24px rgba(20,30,50,0.22);
  --btn-bg: var(--climb);
  --btn-ink: #ffffff;
  --topo-color: rgba(60,80,120,0.05);
  --hero-vignette: radial-gradient(120% 90% at 70% 0%, rgba(196,80,26,0.06), transparent 55%), radial-gradient(90% 80% at 10% 100%, rgba(63,109,194,0.06), transparent 60%);
  --eyebrow-ink: var(--climb);
  --h1: clamp(2.7rem, 6.4vw, 5.4rem);
  --h2: clamp(2rem, 4.2vw, 3.4rem);
  --lead: clamp(1.12rem, 1.7vw, 1.4rem);
}

/* ============================================================
   TYPE
   ============================================================ */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--eyebrow-ink);
  margin: 0 0 1.1rem;
  display: inline-flex; align-items: center; gap: 0.55em;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: currentColor; opacity: .8;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; line-height: 1.04; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); line-height: 1.06; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.15; }
.lead { font-size: var(--lead); line-height: 1.5; color: var(--muted); margin: 1.3rem 0 0; max-width: 40ch; text-wrap: pretty; }
p { line-height: 1.55; }
.tnum { font-variant-numeric: tabular-nums; }
.up { color: var(--climb); }
.down { color: var(--descent); }



/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
section { position: relative; }
.section-pad { padding-top: clamp(72px, 11vw, 150px); padding-bottom: clamp(72px, 11vw, 150px); }

/* topo background texture */
.topo {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    repeating-radial-gradient(circle at 30% 20%, transparent 0 38px, var(--topo-color) 38px 39px);
  opacity: 1; -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand svg { display: block; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn, .nav-links a.btn:hover { color: var(--btn-ink); }
@media (max-width: 960px) { .nav-links { gap: 1.1rem; } }
/* below this the six section links no longer fit beside the brand: only Sign in and the button stay */
@media (max-width: 760px) {
  .nav-links a.navlink:not(.keep) { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font: inherit; font-weight: 600; font-size: 0.98rem;
  padding: 0.72em 1.3em; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-ink);
  text-decoration: none; letter-spacing: -0.01em;
  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
  box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--climb) 70%, transparent);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong); box-shadow: none;
}
.btn.ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.btn.sm { padding: 0.55em 1.05em; font-size: 0.92rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; padding-top: clamp(40px, 7vw, 80px); padding-bottom: clamp(56px, 9vw, 120px); }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-vignette); pointer-events: none; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(36px, 5vw, 64px); align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.02fr 1.18fr; } }
.hero-copy { max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; align-items: center; }
.hero-note { margin: 1rem 0 0; font-size: 0.86rem; color: var(--faint); }

/* inline email form */
.signup { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.signup input[type="email"] {
  font: inherit; font-size: 0.98rem; padding: 0.72em 1.05em; min-width: 0; flex: 1 1 220px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.signup input[type="email"]::placeholder { color: var(--faint); }
.signup input[type="email"]:focus { border-color: var(--climb); box-shadow: 0 0 0 3px var(--climb-soft); }
.signup.ok input { border-color: var(--descent); }

/* ============================================================
   PROFILE CARD (interactive hero visual)
   ============================================================ */
.profile-card {
  position: relative; background: var(--surface); border-radius: var(--r-lg);
  border: var(--frame-border); box-shadow: var(--frame-glow);
  padding: clamp(18px, 2.4vw, 26px); overflow: hidden;
}
.profile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.profile-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.profile-peak { font-size: 0.84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.profile-tools { display: flex; align-items: center; gap: 0.5rem; }
.profile-svg-wrap { position: relative; width: 100%; touch-action: pan-y; margin-top: 0.9rem; }
.profile-svg { width: 100%; height: clamp(180px, 26vw, 250px); display: block; cursor: ew-resize; overflow: visible; }
.profile-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.76rem; color: var(--faint); font-variant-numeric: tabular-nums; }

/* the replay / pause / play disc: 26 px on a 44 px target */
.disc-btn { width: 44px; height: 44px; margin: -12px -12px -12px 0; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.disc-btn .disc { width: 26px; height: 26px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; transition: transform .25s cubic-bezier(.3,.7,.4,1.2), opacity .25s; }
.disc-btn:active .disc { transform: scale(0.96); opacity: 0.85; }
.disc-btn svg { display: block; }
.ic-stroke { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { fill: var(--ink); }

/* the race chart (js/landing-chart.js): neutral ground, colour only on the hardest climb and descent */
.lc-grid { fill: none; stroke: var(--surface); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: 0.9; }
.lc-ground { fill: var(--terrain-fill); }
.lc-ridge { fill: none; stroke: var(--terrain-line); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lc-ghost { fill: none; stroke: var(--terrain-line); stroke-opacity: 0.35; stroke-width: 1.4; stroke-dasharray: 1 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lc-fill.up { fill: var(--climb-fill); }
.lc-fill.down { fill: var(--descent-fill); }
.lc-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lc-line.up { stroke: var(--climb); }
.lc-line.down { stroke: var(--descent); }
.lc-hard { transition: opacity .3s ease; }
.lc-head { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -0.5px; background: color-mix(in srgb, var(--ink) 25%, transparent); opacity: 0; transition: opacity .2s; pointer-events: none; }
.lc-head.on { opacity: 1; }
.lc-head i { position: absolute; left: -4px; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); box-sizing: border-box; }
.lc-peak { position: absolute; transform: translate(-50%, -100%); margin-top: -6px; font-size: 0.74rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; transition: opacity .3s; pointer-events: none; }
.lc-peak.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lc-hard, .lc-head, .lc-peak { transition: none; } }

/* "Try it with your race" */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gpx-drop {
  display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 18px; min-height: 64px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r); background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--muted); font-size: 0.92rem; line-height: 1.45; cursor: pointer; transition: background-color .2s, border-color .2s;
}
.gpx-drop:hover, .gpx-drop.over { background: var(--surface); border-color: var(--terrain-line); }
.gpx-drop b { color: var(--ink); font-weight: 600; }
.gpx-drop svg { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only:focus-visible + .gpx-drop { outline: 2px solid var(--climb); outline-offset: 2px; }
.gpx-status { margin: 0.6rem 0.2rem 0; min-height: 1.4em; font-size: 0.86rem; color: var(--muted); text-wrap: pretty; }
.gpx-status:empty { min-height: 0; margin: 0; }
.link-btn { padding: 0; min-height: 32px; border: 0; background: none; font: inherit; color: var(--descent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.scrub-readout {
  position: absolute; top: 6px; left: 0; transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 0.3em 0.6em; border-radius: 8px; font-size: 0.74rem; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s; box-shadow: 0 6px 18px -6px rgba(0,0,0,.5);
}
.profile-svg-wrap.active .scrub-readout { opacity: 1; }

.profile-foot { display: flex; flex-direction: column; gap: 0; margin-top: 0.5rem; }
.seg-row {
  position: relative; display: flex; align-items: center; gap: 0.7rem; min-height: 48px; padding: 0 0.5rem; margin: 0 -0.5rem;
  font-size: 0.95rem; transition: background-color .3s;
}
/* the separator spans the card's content width, like the line above the stats */
.seg-row::before { content: ""; position: absolute; left: 0.5rem; right: 0.5rem; top: 0; height: 1px; background: var(--line); }
.seg-row[hidden] { display: none; }
.seg-row .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.seg-row .label { position: relative; font-weight: 600; }
.seg-row .val { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
/* while the draw-in passes a hardest stretch, its row takes the wash and a thin rail */
.seg-row .rail { position: absolute; left: 0; top: calc(100% + 4px); width: 120px; height: 3px; border-radius: 2px; background: var(--fill); opacity: 0; transition: opacity .3s; }
.seg-row .rail i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--climb); }
.seg-row.lit-up { background: var(--climb-wash); }
.seg-row.lit-down { background: var(--descent-wash); }
.seg-row.lit-down .rail i { background: var(--descent); }
.seg-row.lit-up .rail, .seg-row.lit-down .rail { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .seg-row, .seg-row .rail { transition: none; } }
.profile-stats { display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pstat .k { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.pstat .v { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pstat .v .u { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

/* card frames */
.shot {
  display: block; border-radius: 22px; border: var(--frame-border);
  box-shadow: var(--frame-glow); background: var(--surface); overflow: hidden;
}
.shot.narrow { max-width: 360px; width: 100%; }
.shot.card-crop { max-width: 440px; width: 100%; }

/* ============================================================
   METRIC STAT STRIP
   ============================================================ */
.statstrip {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
@media (min-width: 640px) { .statstrip { grid-template-columns: repeat(4, 1fr); } }
.statstrip .cell { background: var(--surface); padding: 1.4rem 1.2rem; }
.statstrip .cell .k { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.statstrip .cell .v { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 0.3rem; }
.statstrip .cell .v .u { font-size: 0.62em; color: var(--muted); font-weight: 600; margin-left: 2px; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-head { max-width: 36ch; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; max-width: min(92vw, 680px); }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
/* statement band: a long sentence needs a real measure, not a skinny column */
.section-head.statement { max-width: min(94vw, 780px); }
.section-head.statement h2 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.05; }
.section-head.statement .lead { max-width: 42ch; }
.band { background: var(--bg2); }
.band-line { border-top: 1px solid var(--line); }

/* ============================================================
   PRIVACY
   ============================================================ */
.privacy-card {
  background: var(--surface); border: var(--frame-border); border-radius: var(--r-lg);
  box-shadow: var(--card-shadow); padding: clamp(32px, 5vw, 60px);
  display: grid; gap: clamp(28px,4vw,48px); grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 820px) { .privacy-card { grid-template-columns: auto 1fr; } }
.privacy-card .lock { width: 84px; height: 84px; border-radius: 24px; background: var(--surface2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--descent); }
.privacy-steps { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.privacy-steps .step { font-size: 0.86rem; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }
.privacy-steps .step + .step::before { content: "→"; color: var(--faint); margin-right: 0.5rem; }

/* ============================================================
   CTA / SIGNUP BLOCK
   ============================================================ */
.cta-block { text-align: center; }
.cta-block .signup { max-width: 460px; margin: 2rem auto 0; }
.cta-block .hero-note { text-align: center; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border-top: 1px solid var(--line); padding: 0.4rem 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.2rem 0; font-weight: 600; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 22px; height: 22px; position: relative; transition: transform .25s; }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; background: var(--muted); border-radius: 2px; }
.faq summary .plus::before { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }
.faq summary .plus::after { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); transition: opacity .25s; }
.faq details[open] summary .plus::after { opacity: 0; }
.faq details[open] summary .plus { transform: rotate(180deg); }
.faq .ans { color: var(--muted); line-height: 1.6; padding: 0 0 1.4rem; max-width: 64ch; font-size: 1.02rem; }
.faq .ans a { color: var(--descent); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: clamp(40px,6vw,64px) 0; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; align-items: center; justify-content: space-between; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer .links { display: flex; gap: 1.6rem; flex-wrap: wrap; font-size: 0.92rem; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
/* hidden only once js/landing.js has run (it puts .reveal-on on <html>): a
   page whose script never ran shows every section, the sign-up form included */
.reveal { transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal-on .reveal:not(.in) { opacity: 0; transform: translateY(26px); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* ============================================================
   POLISH
   ============================================================ */
::selection { background: var(--climb-soft); color: var(--ink); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--climb); outline-offset: 2px; border-radius: 6px;
}
/* tighten the very top of the hero on phones, keep the profile breathing */
@media (max-width: 600px) {
  .hero { padding-top: 18px; }
  .profile-stats { gap: 1rem 1.4rem; }
  .pstat .v { font-size: 1.25rem; }
  .nav .wrap { height: 58px; }
}

/* ============================================================
   APP CARD — live HTML rebuild of an app card (Readiness).
   Sizes/tokens follow the app's design system (pendio-tokens).
   ============================================================ */
.app-card {
  --seg-track: rgba(118,118,128,0.12);
  --seg-shadow: 0 1px 4px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.06);
  --c2: rgba(60,60,67,0.60);
  --c3: rgba(60,60,67,0.42);
  --sep: rgba(60,60,67,0.14);
  --score: var(--climb);
  padding: 18px 0 4px; color: var(--ink);
}
.app-card.ready { --score: var(--ink); }
.ac-head { padding: 0 20px; }
.ac-cap { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c2); }

/* segmented control with a sliding thumb */
.ac-seg {
  position: relative; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr);
  margin: 12px 20px 0; padding: 2px; border-radius: 9px; background: var(--seg-track);
}
.ac-seg-thumb {
  position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n, 3));
  border-radius: 7px; background: #fff; box-shadow: var(--seg-shadow);
  transform: translateX(calc(var(--seg-i, 0) * 100%));
  transition: transform .28s cubic-bezier(.3,.7,.2,1);
}
.ac-seg button {
  position: relative; z-index: 1; font: inherit; font-size: 14px; font-weight: 500;
  padding: 6px 4px; border: 0; background: none; color: var(--c2); cursor: pointer;
  border-radius: 7px; transition: color .2s; white-space: nowrap;
}
.ac-seg button[aria-checked="true"] { color: var(--ink); font-weight: 600; }
.ac-seg button:hover { color: var(--ink); }

.ac-title { padding: 14px 20px 0; font-size: 23px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; text-wrap: pretty; }
.ac-sub { padding: 6px 20px 0; font-size: 15.5px; line-height: 1.38; color: var(--c2); text-wrap: pretty; min-height: calc(3 * 1.38em); }
.ac-score { display: flex; align-items: flex-end; justify-content: space-between; padding: 14px 20px 0; color: var(--score); transition: color .3s; }
.ac-num { font-size: 76px; font-weight: 700; letter-spacing: -0.035em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.ac-of { font-size: 23px; font-weight: 500; color: var(--c3); }
.ac-word { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; padding-bottom: 8px; }
.ac-note { padding: 8px 20px 14px; font-size: 13.5px; line-height: 1.38; color: var(--c3); text-wrap: pretty; }
.ac-hr { height: 1px; background: var(--sep); margin-left: 20px; }
.ac-rows { padding: 2px 20px 0; }
.ac-row { padding: 11px 0 12px; }
.ac-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ac-row-label { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.ac-row-val { font-size: 13.5px; color: var(--c2); font-variant-numeric: tabular-nums; transition: color .3s; }
.ac-rail { margin-top: 8px; height: 7px; border-radius: 4px; background: var(--seg-track); overflow: hidden; }
.ac-rail span { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--ink); transition: width .5s cubic-bezier(.3,.7,.2,1), background-color .3s; }
.ac-row.attn .ac-row-val { color: var(--climb); }
.ac-row.attn .ac-rail span { background: var(--climb); }
@media (prefers-reduced-motion: reduce) {
  .ac-seg-thumb, .ac-rail span { transition: none; }
}

/* ---- shared bits for the other live cards ---- */
.app-card button { font: inherit; color: inherit; }
.app-card .btn { color: var(--btn-ink); }
.ac-head-row { display: flex; justify-content: space-between; align-items: baseline; }
.ac-trail { font-size: 13.5px; color: var(--c2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac-head-row { gap: 12px; }
.ac-pad { display: block; padding: 14px 20px 6px; }
.rc-axis { display: flex; justify-content: space-between; padding: 3px 20px 10px; font-size: 11.5px; color: var(--c3); font-variant-numeric: tabular-nums; }
.rc-dot { width: 9px; height: 9px; border-radius: 5px; flex: none; }
.rc-dot.up { background: var(--climb); }
.rc-dot.down { background: var(--descent); }

/* ---- climbs ---- */
.cc-list { padding-top: 4px; }
.cc-item + .cc-item { border-top: 1px solid var(--sep); margin-left: 0; }
.cc-row {
  display: block; width: 100%; padding: 12px 20px 12px; border: 0; background: none; text-align: left; cursor: pointer;
  transition: background-color .2s;
}
.cc-row:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.cc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cc-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cc-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--climb); flex: none; }
.cc-km { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.cc-cat { font-size: 11px; font-weight: 700; color: var(--climb); background: var(--climb-soft); border-radius: 5px; padding: 2px 6px; }
.cc-avg { font-size: 17px; font-weight: 600; color: var(--climb); font-variant-numeric: tabular-nums; flex: none; }
.cc-meta { display: flex; align-items: center; margin-top: 4px; padding-left: 17px; font-size: 13px; color: var(--c2); font-variant-numeric: tabular-nums; }
.cc-meta i { font-style: normal; color: var(--c3); margin: 0 6px; }
.cc-meta b { font-weight: 400; color: var(--c3); margin-right: 3px; }
.cc-chev { margin-left: auto; transition: transform .25s ease; }
.cc-chev path { fill: none; stroke: var(--c3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cc-item.open .cc-chev { transform: rotate(90deg); }
.cc-detail { padding: 2px 20px 14px 37px; }
.cc-chart svg { display: block; width: 100%; height: 56px; }
.cc-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11.5px; color: var(--c3); font-variant-numeric: tabular-nums; }
.cc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-stats span { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--c3); margin-bottom: 1px; }

/* ---- descent load ---- */
.dc-seg { margin: 0; width: 120px; flex: none; }
.dc-seg button { font-size: 12.5px; padding: 4px; }
#descent-card .ac-head-row { align-items: center; }
.dc-sub { min-height: calc(2 * 1.38em); }
.dc-chart { padding: 14px 20px 0; outline: none; }
.dc-chart:focus-visible svg { outline: 2px solid var(--climb); outline-offset: 4px; border-radius: 4px; }
.dc-chart svg { display: block; width: 100%; height: auto; }
.dc-bar { fill: var(--descent-fill); transition: fill .2s; }
.dc-bar.on { fill: var(--descent); }
.dc-hit { fill: transparent; cursor: pointer; }
.dc-guide { stroke: var(--terrain-line); stroke-width: 1; stroke-dasharray: 3 4; opacity: .8; }
.dc-guide-l { font-size: 10px; fill: var(--c3); text-anchor: end; font-variant-numeric: tabular-nums; }
.dc-race-line { stroke: rgba(60,60,67,0.18); stroke-dasharray: 1 3; }
.dc-flag-pole { stroke: var(--ink); stroke-width: 1.4; }
.dc-flag { fill: var(--ink); }
#descent-card .rc-axis { padding-top: 6px; padding-bottom: 0; }
.dc-budget { padding: 14px 20px 0; }
.dc-budget-v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dc-budget svg { display: block; width: 100%; height: auto; margin-top: 5px; }
.dc-rail { stroke: var(--sep); }
.dc-tick { stroke: var(--c3); stroke-width: 1.3; }
.dc-floor { font-size: 10px; fill: var(--c3); text-anchor: middle; font-variant-numeric: tabular-nums; }
.dc-now { fill: var(--c3); }

.web-cta { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin-top: 2.4rem; }
.web-note { text-align: center; color: var(--muted); font-size: 0.88rem; margin: 1.2rem auto 0; max-width: 60ch; }
/* ---- the web note's link ---- */
.web-note a { color: var(--descent); font-weight: 600; text-decoration: none; }

/* ============================================================
   THE IDEA — a flat 10K and a 1,000 m grind, painted from the ramp
   ============================================================ */
.cap { font-size: 11px; line-height: 13px; font-weight: 600; letter-spacing: 0.7px; text-transform: uppercase; color: var(--muted); }
.thesis { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 760px) { .thesis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.thesis-card { margin: 0; background: var(--bg); border-radius: var(--r-lg); padding: clamp(18px, 2.4vw, 26px); }
.thesis-plot { position: relative; margin-top: 14px; }
.thesis-card svg { display: block; width: 100%; height: 140px; }
.thesis-guide { position: absolute; left: 0; font-size: 11px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.ramp-guide { fill: none; stroke: var(--hairline); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.ramp.climb-deep { fill: var(--climb-deep); fill-opacity: 0.95; }
.ramp.climb { fill: var(--climb); fill-opacity: 0.9; }
.ramp.flat { fill: var(--terrain-line); fill-opacity: 0.3; }
.ramp.descent { fill: var(--descent); fill-opacity: 0.9; }
.ramp.descent-deep { fill: var(--descent-deep); fill-opacity: 0.95; }
.ramp-ridge { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.thesis-foot { display: flex; justify-content: space-between; align-items: flex-end; align-items: last baseline; gap: 12px; margin-top: 16px; }
.thesis-map { color: var(--muted); font-size: 0.95rem; }
.thesis-eq { text-align: right; }
.thesis-eq .v { display: block; margin-top: 4px; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.thesis-eq .u { font-size: 17px; font-weight: 600; color: var(--muted); }
.thesis-note { margin: 22px auto 0; max-width: 64ch; text-align: center; color: var(--muted); font-size: 0.95rem; line-height: 1.55; text-wrap: pretty; }

/* ============================================================
   RACE DAY — one course card, four steps. On tall screens the stage pins
   and the page's scroll moves through the steps (js/landing-plan.js).
   ============================================================ */
#race .section-head { max-width: 760px; }
.rd-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.rd-side { position: relative; }
.rd-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.rd-step-h {
  display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 1.32rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-align: left;
}
.rd-num {
  position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--muted);
  font-size: 13px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; transition: background-color .3s, color .3s, box-shadow .3s;
}
.rd-step.done .rd-num { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.rd-step.on .rd-num { background: var(--ink); color: var(--surface); box-shadow: none; }
.rd-step p { margin: 2px 0 0 44px; max-width: 32ch; color: var(--muted); font-size: 1rem; line-height: 1.5; text-wrap: pretty; }
.rd-link { color: var(--descent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.rd-link::after { content: " →"; }
.rd-link:hover { text-decoration: underline; }
.rd-rail { display: none; position: absolute; width: 2px; border-radius: 1px; background: var(--fill); pointer-events: none; }
.rd-rail i { display: block; width: 100%; height: calc(var(--p, 0) * 100%); border-radius: 1px; background: var(--ink); }

.rd-card { width: 100%; transform-origin: top right; }
.rd-plot { position: relative; margin: 34px 20px 0; }
.rd-svg { display: block; width: 100%; height: 130px; overflow: visible; }
.rd-pins, .rd-gels { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; }
.rd[data-step="2"] .rd-pins, .rd[data-step="4"] .rd-pins, .rd[data-step="3"] .rd-gels { opacity: 1; }
.rd[data-step="2"] .lc-hard, .rd[data-step="4"] .lc-hard { opacity: 0; }
.rd[data-step="3"] .lc-hard { opacity: 0.35; }
.rd-pin { position: absolute; top: 0; width: 0; height: 0; opacity: 0; transition: opacity .25s; }
.rd-pin.in { opacity: 1; }
.rd-pin-t { position: absolute; top: -28px; left: 0; transform: translateX(-50%); font-size: 11px; font-weight: 600; line-height: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.rd-pin.end .rd-pin-t { transform: translateX(-100%); }
.rd-pin-l { position: absolute; left: -0.5px; top: -12px; width: 1px; background: var(--ink); opacity: 0.3; }
.rd-pin i {
  position: absolute; left: -10px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: 10px; font-weight: 700; line-height: 1; color: var(--ink); background: var(--surface); border: 1.5px solid var(--ink); box-sizing: border-box;
}
.rd-pin.finish i { background: var(--ink); color: var(--surface); }
.rd-gel { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); opacity: 0; transform: scale(0.4); transition: opacity .2s, transform .2s; }
.rd-gel.in { opacity: 1; transform: none; }
.rd-card .rc-axis { margin-left: 20px; padding-left: 0; padding-bottom: 6px; border-bottom: 1px solid var(--sep); }

.rd-bodies { display: grid; grid-template-columns: minmax(0, 1fr); }
.rd-body { grid-area: 1 / 1; display: flex; flex-direction: column; padding-bottom: 6px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; }
.rd-body.on { opacity: 1; visibility: visible; transition: opacity .3s; }
.rd-intro { display: none; margin: 0; padding: 12px 20px 2px; font-size: 15px; line-height: 1.4; color: var(--c2); text-wrap: pretty; }

/* step 1 */
.rd-row { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 7px 20px; }
.rd-row { position: relative; }
.rd-row + .rd-row::before { content: ""; position: absolute; left: 40px; right: 0; top: 0; height: 1px; background: var(--sep); }
.rd-row-main { flex: 1; min-width: 0; }
.rd-row-l { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.rd-row-s { margin-top: 1px; font-size: 13px; color: var(--c2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-row-v { font-size: 13.5px; color: var(--c2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-body .ac-pad { margin-left: 20px; padding-left: 0; border-top: 1px solid var(--sep); padding-top: 12px; padding-bottom: 8px; }
.rd-body .rd-legend + .ac-pad { margin-top: 10px; }
.rd-terrain { display: flex; gap: 2px; height: 12px; margin: 0 20px; }
.rd-terrain span { flex: 1 1 0; border-radius: 6px; }
.rd-terrain .up { background: var(--climb); }
.rd-terrain .flat { background: var(--terrain-fill); }
.rd-terrain .down { background: var(--descent); }
.rd-legend { display: flex; gap: 16px; margin: 9px 20px 2px; font-size: 13px; white-space: nowrap; }
.rd-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rd-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.rd-legend i.up { background: var(--climb); }
.rd-legend i.flat { background: var(--terrain-fill); box-shadow: inset 0 0 0 1px var(--hairline); }
.rd-legend i.down { background: var(--descent); }
.rd-legend b { font-weight: 600; }
.rd-legend em { font-style: normal; color: var(--c2); font-variant-numeric: tabular-nums; }
.rc-dot.flat { background: var(--terrain-line); }
.rd-bars { display: flex; gap: 10px; height: 104px; margin: 0 20px; }
.rd-bar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rd-bar b { font-size: 12px; font-weight: 600; color: var(--c2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-bar-track { flex: 1; width: 100%; max-width: 64px; display: flex; align-items: flex-end; }
.rd-bar-track i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: var(--climb-fill); }
.rd-bar-track i.most { background: var(--climb); }
.rd-bar-k { font-size: 11px; color: var(--c3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-dplus { display: flex; flex-wrap: wrap; gap: 1px; margin: 0 20px; border-radius: 12px; overflow: hidden; background: var(--sep); border: 1px solid var(--sep); }
.rd-slice { flex: 1 1 76px; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--surface); }
.rd-slice-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c2); white-space: nowrap; }
.rd-slice-v { font-size: 15px; font-weight: 600; color: var(--climb); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-body > .rd-foot { margin-top: auto; }
.rd-note { margin: 0; padding: 10px 20px 8px; font-size: 13px; line-height: 1.4; color: var(--c3); text-wrap: pretty; }

/* step 2 */
.rd-target { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-left: 20px; padding: 8px 20px 8px 0; min-height: 56px; border-bottom: 1px solid var(--sep); }
.rd-target-l { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.rd-target-s { margin-top: 1px; font-size: 13px; color: var(--c2); font-variant-numeric: tabular-nums; }
.rd-stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.rd-stepper output { min-width: 3.4em; text-align: center; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rd-stepper button {
  position: relative; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink);
  display: grid; place-items: center; font: inherit; font-size: 18px; font-weight: 500; line-height: 1; cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.rd-stepper button::before { content: ""; position: absolute; inset: -6px; }
.rd-stepper button span { display: block; transform: translateY(-1px); }
.rd-stepper button:hover:not(:disabled) { background: rgba(118,118,128,0.22); }
.rd-stepper button:active:not(:disabled) { transform: scale(0.96); }
.rd-stepper button:disabled { opacity: .35; cursor: default; }
.rd-legs { list-style: none; margin: 0; padding: 0; }
.rd-leg, .rd-fuel { transition: opacity .25s; }
.rd-leg.later, .rd-fuel.later { opacity: 0.32; }
.rd-leg { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; column-gap: 11px; padding: 6px 20px; }
.rd-leg + .rd-leg::before { content: ""; position: absolute; left: 51px; right: 0; top: 0; height: 1px; background: var(--sep); }
.rd-glyph { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; line-height: 1; background: var(--fill); color: var(--ink); }
.rd-glyph.finish { background: var(--ink); color: var(--surface); }
.rd-leg-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rd-leg-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-cut { flex: none; padding: 1px 7px; border-radius: 6px; background: var(--fill); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-cut.late { background: rgba(179,38,30,0.12); color: #B3261E; }
.rd-leg-meta { margin-top: 1px; font-size: 12.5px; color: var(--c2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-leg-eta { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-leg-eta b { display: block; font-size: 15px; font-weight: 600; }
.rd-leg-eta span { display: block; margin-top: 1px; font-size: 12.5px; color: var(--c2); }

/* step 3 */
.rd-carbs { display: flex; align-items: baseline; gap: 8px; padding: 14px 20px 0; }
.rd-carbs-v { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.rd-carbs-u { font-size: 14px; font-weight: 500; color: var(--c2); }
.rd-fuel-sum { margin: 6px 0 0; padding: 0 20px 10px; font-size: 13.5px; line-height: 1.4; color: var(--c2); }
.rd-fuel-list { margin-left: 20px; border-top: 1px solid var(--sep); }
.rd-fuel { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.2em; align-items: baseline; column-gap: 14px; padding: 9px 20px 9px 0; }
.rd-fuel + .rd-fuel { border-top: 1px solid var(--sep); }
.rd-fuel-l { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-fuel-s { font-size: 12.5px; color: var(--c2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-fuel-v { font-size: 15px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* step 4 */
.rd-pc { width: calc(100% - 20px); margin-left: 20px; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rd-pc th { padding: 9px 8px 7px; text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--c2); white-space: nowrap; }
.rd-pc td { padding: 4px 8px; border-top: 1px solid var(--sep); white-space: nowrap; vertical-align: top; line-height: 1.25; }
.rd-pc td b { display: block; font-weight: 600; }
.rd-pc td span { display: block; font-size: 11.5px; color: var(--c2); }
.rd-pc td.late span { color: inherit; }
.rd-pc th:first-child, .rd-pc td:first-child { padding-left: 0; }
.rd-pc th:last-child, .rd-pc td:last-child { padding-right: 20px; }
.rd-pc .num { text-align: right; }
.rd-pc .late { color: #B3261E; }
.rd-pack { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-left: 20px; padding: 12px 20px 10px 0; border-top: 1px solid var(--sep); }
.rd-pack span { font-size: 13px; color: var(--c2); }

@media (min-width: 900px) {
  .rd-stage { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
  .rd-rail { display: block; }
  .rd-step { padding: 14px 0; }
  .rd-step-h { color: var(--muted); transition: color .3s; }
  .rd-step p { color: rgba(60,60,67,0.42); transition: color .3s; }
  .rd-step .rd-link { color: inherit; }
  .rd-step.on .rd-step-h, .rd-step-h:hover { color: var(--ink); }
  .rd-step.on p { color: var(--muted); }
  .rd-step.on .rd-link { color: var(--descent); }
  /* pinned: the stage holds still in the window while the page scrolls through the steps */
  .rd.is-pinned .rd-stage { position: sticky; }
}
@media (max-width: 899px) {
  /* the steps become tabs above the card; each step's sentence moves into the card */
  .rd-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 2px; border-radius: 9px; background: var(--fill); }
  .rd-step p, .rd-num, .rd-the { display: none; }
  .rd-step-h {
    width: 100%; min-height: 40px; justify-content: center; padding: 0 4px; border-radius: 7px; white-space: nowrap;
    font-size: 14px; font-weight: 500; letter-spacing: -0.01em; color: var(--muted); transition: background-color .28s, color .2s;
  }
  .rd-step-h > span:last-child { display: block; }
  .rd-step-h > span:last-child::first-letter { text-transform: uppercase; }
  .rd-step.on .rd-step-h { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.06); }
  .rd-intro { display: block; }
}
@media (max-width: 600px) {
  .rd-pin-t, .rd-pin-l { display: none; }
  .rd-plot { margin-top: 20px; }
  .rd-leg-meta { white-space: normal; }
  .rd-cap-k { display: none; }
  .rd-legend { flex-wrap: wrap; gap: 4px 12px; white-space: normal; }
  .rd-legend span { white-space: nowrap; }
  .rd-row-s { font-size: 12px; }
  .rd-row-v { font-size: 12.5px; }
  .rd-pc { font-size: 12.5px; }
  .rd-pc { width: calc(100% - 14px); margin-left: 14px; }
  /* no room for four columns: the cut-offs stay in the Plan step */
  .rd-pc th:nth-child(3), .rd-pc td:nth-child(3) { display: none; }
  .rd-pc th:last-child, .rd-pc td:last-child { padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) { .rd-body, .rd-pins, .rd-gels, .rd-step, .rd-num, .rd-pin, .rd-gel, .rd-leg, .rd-fuel { transition: none; } }

/* ============================================================
   ON THE WEB — the tools grid
   ============================================================ */
.tools {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--card-shadow);
}
@media (min-width: 640px) { .tools { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .tools { grid-template-columns: repeat(3, 1fr); } }
.tool { background: var(--surface); padding: 1.6rem 1.5rem 1.7rem; }
.tool svg { width: 26px; height: 26px; display: block; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool h3 { font-size: 1.15rem; margin: 0.95rem 0 0.35rem; }
.tool p { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.5; text-wrap: pretty; }

/* ============================================================
   TRAINING — three views behind one segmented control
   ============================================================ */
.tr-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.tr-head > div:first-child { flex: 1 1 480px; min-width: 0; }
.tr-head h2 { max-width: 20ch; }
.tr-seg { position: relative; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); width: min(100%, 440px); padding: 2px; border-radius: 9px; background: var(--fill); }
.tr-seg .ac-seg-thumb { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.06); }
.tr-seg button { position: relative; z-index: 1; min-height: 40px; padding: 0 12px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; transition: color .2s; }
.tr-seg button[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tr-panels { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: clamp(32px, 5vw, 52px); }
.tr-panels { transition: height .3s cubic-bezier(.3,.7,.2,1); }
.tr-panel { grid-area: 1 / 1; align-self: start; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; align-content: start; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; }
.tr-panel.on { opacity: 1; visibility: visible; transition: opacity .3s; }
.tr-copy p { margin: 1rem 0 0; max-width: 34ch; color: var(--muted); font-size: var(--lead); line-height: 1.5; text-wrap: pretty; }
.tr-card { display: flex; justify-content: center; }
@media (min-width: 900px) { .tr-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } .tr-copy { padding-top: 1.2rem; } .tr-card { justify-content: flex-end; } }
#training .statstrip { margin-top: clamp(40px, 6vw, 64px); }
@media (prefers-reduced-motion: reduce) { .tr-panel, .tr-panels { transition: none; } }

/* ============================================================
   JOIN + QUESTIONS
   ============================================================ */
.privacy-text { color: var(--muted); font-size: var(--lead); line-height: 1.5; margin: 1rem 0 0; max-width: 52ch; }
.faq-block { margin-top: clamp(72px, 10vw, 120px); }
.faq-title { text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.hero-note a { color: var(--descent); }

/* ============================================================
   GUIDE (guide.html)
   ============================================================ */
.nav-links a.current { color: var(--ink); }
.guide-hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); }
.guide-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-vignette); pointer-events: none; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.guide-hero .wrap { position: relative; z-index: 1; }
.guide-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
.guide-hero .lead { max-width: 52ch; }

.guide-layout { display: grid; grid-template-columns: 1fr; gap: 28px; padding-bottom: clamp(56px, 8vw, 110px); }
@media (min-width: 980px) { .guide-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 56px; } }

.toc { align-self: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 14px; font-size: 0.92rem; }
@media (min-width: 980px) {
  .toc { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; background: transparent; border: 0; padding: 4px 0 0; }
}
.toc-title { margin: 0 0 8px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.toc ol ol { margin: 2px 0 6px 12px; padding-left: 10px; border-left: 1px solid var(--line); }
@media (max-width: 979px) { .toc ol ol { display: none; } .toc > ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; } }
.toc a { display: block; padding: 4px 8px; margin-left: -8px; border-radius: 7px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.toc a.on { color: var(--ink); font-weight: 600; }
.toc ol ol a { font-size: 0.86rem; }

.guide { max-width: 740px; min-width: 0; font-size: 1.05rem; color: var(--ink); }
.guide section { padding-top: 8px; margin-bottom: clamp(48px, 6vw, 72px); scroll-margin-top: 84px; }
.guide h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin: 0 0 18px; }
.guide h3 { font-size: 1.3rem; margin: 2.2rem 0 0.7rem; scroll-margin-top: 84px; }
.guide h4 { font-size: 1.05rem; margin: 1.6rem 0 0.5rem; letter-spacing: -0.01em; }
.guide p { margin: 0 0 1rem; line-height: 1.62; color: color-mix(in srgb, var(--ink) 86%, transparent); }
.guide p.intro { font-size: 1.15rem; color: var(--ink); }
.guide p.aside { font-size: 0.95rem; color: var(--muted); }
.guide a { color: var(--climb); text-decoration: none; font-weight: 500; }
.guide a:hover { text-decoration: underline; }
.guide ul { margin: 0 0 1rem; padding-left: 1.2em; line-height: 1.6; }
.guide ul li { margin-bottom: 0.4rem; }
.guide ul li::marker { color: var(--faint); }
.guide code { font: 600 0.92em ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface2); border-radius: 6px; padding: 0.1em 0.4em; white-space: nowrap; }
.guide .eyebrow { margin-bottom: 0.7rem; }

ol.numbered { margin: 0 0 1.2rem; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 0.75rem; }
ol.numbered li { counter-increment: n; position: relative; padding-left: 40px; line-height: 1.58; }
ol.numbered li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 0.8rem; font-weight: 700; }

ol.step-cards { margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
@media (min-width: 680px) { ol.step-cards { grid-template-columns: 1fr 1fr; } }
ol.step-cards li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 15px; line-height: 1.5; font-size: 0.98rem; box-shadow: var(--card-shadow); }
ol.step-cards li::before { content: "Step " counter(s); display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--climb); margin-bottom: 4px; }
ol.step-cards b { display: block; margin-bottom: 2px; }

.callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 12px; padding: 14px 18px; margin: 0 0 1.2rem; line-height: 1.55; font-size: 0.98rem; }

dl.glossary { margin: 0 0 1.2rem; display: grid; gap: 0; border-top: 1px solid var(--line); }
dl.glossary > div { display: grid; grid-template-columns: 1fr; gap: 2px 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { dl.glossary > div { grid-template-columns: 210px 1fr; } }
dl.glossary dt { font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
dl.glossary dd { margin: 0; color: var(--muted); line-height: 1.55; font-size: 0.98rem; }
#training dl.glossary dd b { color: var(--ink); font-weight: 600; }
#training dl.glossary dd .method { display: block; margin-top: 4px; font-size: 0.85rem; }
@media (min-width: 640px) { dl.glossary.columns > div { grid-template-columns: 110px 1fr; } }
.abc { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 700; flex: none; transform: translateY(4px); }
.abc.a { background: var(--ink); color: #fff; }
.abc.b { border: 1.5px solid rgba(16,16,19,0.55); color: var(--ink); }
.abc.c { background: var(--surface2); color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 0 0 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.guide table { border-collapse: collapse; width: 100%; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.guide th, .guide td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.guide tbody tr:last-child td { border-bottom: 0; }
.guide th { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.guide .num { text-align: right; white-space: nowrap; }
table.compare td:first-child { color: var(--ink); }
table.compare td.yes { color: var(--ink); font-weight: 600; }
table.compare td.no { color: var(--faint); }
table.compare td:not(:first-child), table.compare th:not(:first-child) { text-align: center; white-space: nowrap; }
@media (max-width: 560px) {
  table.compare th, table.compare td { padding-left: 10px; padding-right: 10px; }
  table.compare td:not(:first-child), table.compare th:not(:first-child) { white-space: normal; width: 74px; padding-left: 4px; padding-right: 4px; }
  table.compare th { letter-spacing: 0.04em; }
}
table.kinds td:first-child { width: 1%; white-space: nowrap; }
table.kinds td:nth-child(2) { font-weight: 600; white-space: nowrap; }
table.kinds td:last-child { color: var(--muted); }
table.formats td:first-child { width: 1%; white-space: nowrap; }
table.formats td:last-child { color: var(--muted); }
table.example { min-width: 560px; }
table.example td:first-child { white-space: nowrap; }
table.example th, table.example td { padding-left: 10px; padding-right: 10px; }
table.example th:first-child, table.example td:first-child { padding-left: 14px; }
table.example tfoot td { font-weight: 700; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.wp { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 700; background: var(--surface2); color: var(--ink); }
.wp.aid { background: var(--descent-soft); color: var(--descent); }
.wp.cut { background: rgba(179,38,30,0.12); color: #B3261E; }
.wp.top { background: var(--climb-soft); color: var(--climb); }
.wp.end { background: var(--ink); color: var(--surface); font-size: 0.66rem; }
.pill-ok, .pill-late { font-weight: 600; font-size: 0.9em; padding: 1px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill-ok { background: var(--surface2); }
.pill-late { background: rgba(179,38,30,0.12); color: #B3261E; }

figure.factors { margin: 0.6rem 0 1.4rem; }
figure.factors figcaption, figure.shares figcaption { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; line-height: 1.45; }
.factor-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 640px) { .factor-row { grid-template-columns: repeat(6, 1fr); } }
.factor-row .f { border-radius: 10px; padding: 9px 10px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 1px; font-variant-numeric: tabular-nums; }
.factor-row .f b { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.factor-row .f span { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.factor-row .f.up span { color: var(--climb); }
.factor-row .f.down span { color: var(--descent); }

figure.shares { margin: 0.4rem 0 1.4rem; display: grid; gap: 10px; }
figure.shares figcaption { margin: 2px 0 0; }
.share-row { display: grid; grid-template-columns: 1fr; gap: 4px; }
@media (min-width: 640px) { .share-row { grid-template-columns: 170px 1fr; align-items: center; gap: 14px; } }
.share-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.share-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; gap: 2px; }
.share-bar .leg { display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; flex-grow: 0; flex-shrink: 1; min-width: 0; }
/* Leg shares of the guide's worked example (distance, then moving time). */
.share-bar .d1 { flex-basis: 25.1%; } .share-bar .d2 { flex-basis: 16.4%; } .share-bar .d3 { flex-basis: 31.0%; } .share-bar .d4 { flex-basis: 27.5%; }
.share-bar .t1 { flex-basis: 35.4%; } .share-bar .t2 { flex-basis: 23.8%; } .share-bar .t3 { flex-basis: 21.3%; } .share-bar .t4 { flex-basis: 19.5%; }
.share-bar .l1 { background: var(--climb); color: #fff; }
.share-bar .l2 { background: color-mix(in srgb, var(--climb) 55%, var(--surface)); color: #fff; }
.share-bar .l3 { background: var(--descent); color: #fff; }
.share-bar .l4 { background: color-mix(in srgb, var(--descent) 55%, var(--surface)); color: #fff; }

/* ============================================================
   PRIVACY POLICY (privacy.html) — the reading column of a blog post
   ============================================================ */
.legal { max-width: 740px; margin: 0 auto; padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(48px, 7vw, 96px); font-size: 1.06rem; }
.legal h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.08; margin: 0 0 0.9rem; }
.legal .meta { margin: 0 0 clamp(26px, 4vw, 40px); color: var(--muted); font-size: 0.95rem; }
.legal h2 { font-size: clamp(1.35rem, 2.2vw, 1.6rem); letter-spacing: -0.02em; line-height: 1.2; margin: 2.4rem 0 0.8rem; }
.legal p, .legal li { line-height: 1.66; color: color-mix(in srgb, var(--ink) 88%, transparent); }
.legal p { margin: 0 0 1.05rem; }
.legal ul { margin: 0 0 1.1rem; padding-left: 1.3em; }
.legal li { margin-bottom: 0.4rem; }
.legal li::marker { color: var(--faint); }
.legal strong { color: var(--ink); }
.legal a { color: var(--descent); text-decoration: none; font-weight: 500; }
.legal a:hover { text-decoration: underline; }
.legal .highlight { background: var(--surface); border: var(--frame-border); border-radius: var(--r); box-shadow: var(--card-shadow); padding: 22px 24px; line-height: 1.62; }
