/* TeraThreshold promotional site
   Dark canvas modelled on linear.app's layout language (hairlines, product-as-hero,
   split section heads, mono figure labels); feature rows follow the MIT-licensed
   Tailark "Dusk" pattern. The four pillar colours come from logo.svg.
   Fonts (Google Fonts, loaded in each page): Barlow Semi Condensed for headlines,
   Barlow for copy, JetBrains Mono for figure labels and numbers, and Archivo
   (ExtraBold Italic at 125% width, subset to the letters of "TeraThreshold") for the
   wordmark only: the wide forward lean echoes the chevrons in the mark. */

/* Fonts, self-hosted (SIL Open Font License; licences in assets/fonts/) */
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/barlow-semi-condensed-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/barlow-semi-condensed-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/barlow-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/barlow-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(../assets/fonts/jetbrains-mono-nl.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: italic; font-weight: 800; font-stretch: 125%; font-display: swap; src: url(../assets/fonts/archivo-wordmark.woff2) format("woff2"); }

:root {
  color-scheme: dark;

  /* canvas */
  --bg: #08090A;
  --bg-2: #0F1011;
  --bg-3: #16171A;
  --text: #F7F8F8;
  --text-2: #9A9FA7;
  --text-3: #7C8189;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);

  /* the four chevrons, plus lighter cuts for small text on black */
  --red: #E51E29;
  --amber: #FCB017;
  --green: #73BF44;
  --blue: #4374BA;
  --red-text: #FF5A62;
  --green-text: #8FD163;
  --blue-text: #7FA6E3;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --font-brand: "Archivo", var(--font-display);
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;

  --max: 1200px;
  --max-wide: 1320px;
  --gutter: 24px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.04; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(40px, 5.4vw, 72px); letter-spacing: -0.02em; line-height: 1.02; }
h2 { font-size: clamp(28px, 3.1vw, 42px); }
h3 { font-size: 19px; letter-spacing: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-wide { width: min(var(--max-wide), 100% - 2 * var(--gutter)); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 8px;
  font-family: var(--font); font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--text); background: transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  cursor: pointer;
}
.btn:hover { background: rgba(255,255,255,.06); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: #fff; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn-ghost { background: rgba(255,255,255,.04); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8,9,10,.72);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-brand); font-style: italic; font-weight: 800; font-stretch: 125%; font-size: 17px; letter-spacing: -.005em; color: var(--text); }
.nav .brand { flex: none; }
.brand img { width: 22px; height: 26px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; color: var(--text-2); }
.nav-links a { transition: color .15s; }
.nav .nav-legal { display: flex; } /* legal pages keep their three links on every width */
.nav-links a:hover { color: var(--text); }
.nav .btn { height: 34px; padding: 0 14px; font-size: 14px; }
.cta-short { display: none; }
.nav-toggle { display: none; flex: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 8px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 5px auto; border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 3vw, 44px) 0 0; overflow: hidden; }
.eyebrow { color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; margin: 0 0 20px; }
.hero h1 { max-width: 17ch; }
.hero-sub { margin-top: 24px; max-width: 60ch; }
.lede { font-size: clamp(17px, 1.3vw, 19px); color: var(--text-2); max-width: 56ch; margin: 0; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { font-size: 13px; color: var(--text-3); margin: 16px 0 0; }

/* the stage: three real screens on running-track lanes, fading into the page */
.stage { position: relative; margin: 40px auto 0; height: 560px; overflow: hidden; }
.stage::before { content: ""; position: absolute; left: 50%; top: 40px; width: 900px; height: 600px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,255,255,.045), transparent); pointer-events: none; }
.stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 180px; background: linear-gradient(to bottom, rgba(8,9,10,0), var(--bg) 90%); pointer-events: none; z-index: 3; }
.lanes { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent); }
.stage-phones { position: relative; z-index: 2; display: flex; justify-content: center; align-items: flex-start; gap: 40px; padding-top: 24px; }
.stage-side { margin-top: 64px; }
.stage-side:first-child { transform: translateX(24px); }
.stage-side:last-child { transform: translateX(-24px); }

/* hero status link above the headline */
.eyebrow-link { display: inline-flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px 0 10px; margin: 0 0 22px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; color: var(--text-2); transition: color .15s ease, border-color .15s ease; }
.eyebrow-link .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(115,191,68,.18); }
.eyebrow-link .arrow { color: var(--text-3); transition: transform .15s ease, color .15s ease; }
.eyebrow-link:hover { color: var(--text); border-color: var(--text-3); }
.eyebrow-link:hover .arrow { color: var(--text); transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .eyebrow-link, .eyebrow-link .arrow { transition: none; } }

/* ---------- devices: Rotato renders (iPhone 17 Pro Max), trimmed PNG/WebP ---------- */
/* --w is the render's width in CSS px at full size; --k scales every device together */
.device { display: block; flex: none; width: calc(var(--w) * var(--k, 1)); }
.device img { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,.45)); }

/* crossfading sequences of renders that share one camera: the first frame sets the size */
.device-seq { position: relative; flex: none; width: calc(var(--w) * var(--k, 1)); }
.device-seq > .device { width: 100%; opacity: 0; transition: opacity .9s ease; }
.device-seq > .device + .device { position: absolute; inset: 0; }
.device-seq > .device.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .device-seq > .device { transition: none; } }

/* ---------- sections ---------- */
/* one fluid step between sections: 48px on phones, 72px at 1440 (the divider already separates, so the space stays well under two block gaps) */
.section { padding: clamp(48px, 5vw, 80px) 0; border-top: 1px solid var(--line); }
.answers + .section { border-top: 0; }
.split-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: start; margin-bottom: 44px; }
.split-head h2 { max-width: 18ch; }
.split-head > p { color: var(--text-2); font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55; margin: 0; max-width: 52ch; padding-top: 6px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; margin-bottom: 14px; }
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* how it works: a real sequence, so the numbers stay */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: step; border-top: 1px solid var(--line); }
.step { padding: 24px 32px 0; border-left: 1px solid var(--line); }
.step:first-child { border-left: 0; padding-left: 0; }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); margin-bottom: 20px; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--text-2); font-size: 16px; margin: 0; max-width: 34ch; }

/* pillars: copy list beside a card that crops the phone (Tailark Dusk pattern) */
.pillar { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: stretch; }
.pillar.flip .pillar-card { order: -1; }
.pillar.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.pillar-copy { align-self: center; }
.checks { border-top: 1px solid var(--line); }
.checks li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; color: var(--text); }
.checks li span { color: var(--text-2); }
.pillar-card {
  position: relative; min-height: 440px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px;
  background:
    radial-gradient(60% 50% at 50% 100%, rgba(255,255,255,.035), transparent 75%),
    var(--bg-2);
}
/* the render is positioned, so the card's height comes from the copy beside it, never from the phone */
.pillar-card > .device, .pillar-card > .device-seq { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); }
.pillar-card::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(to bottom, rgba(15,16,17,0), var(--bg-2)); pointer-events: none; z-index: 1; }
/* the body map sits low on its screen, so that phone hangs from the card's bottom and the fade flips to the top */
#body .pillar-card > .device-seq { top: auto; bottom: -40px; }
#body .pillar-card::after { inset: 0 0 auto 0; background: linear-gradient(to top, rgba(15,16,17,0), var(--bg-2)); }


/* every run */
.runs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.run-card { border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); overflow: hidden; display: flex; flex-direction: column; }
.run-card-head { padding: 24px 24px 0; }
.run-card-head .label { display: block; color: var(--text-3); text-transform: uppercase; margin-bottom: 12px; }
.run-card-head p { color: var(--text-2); font-size: 15px; margin: 0; max-width: 48ch; min-height: 3em; }
.run-card-phone { position: relative; height: 400px; overflow: hidden; display: flex; justify-content: center; padding-top: 24px; }
.run-card-phone::after { content: ""; position: absolute; inset: auto 0 0 0; height: 110px; background: linear-gradient(to bottom, rgba(15,16,17,0), var(--bg-2)); }
.run-card-phone .device, .run-card-phone .device-seq { --k: .9; }
.run-card-head { min-height: 0; }

/* trust */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.trust div { padding: 24px 32px 0; border-left: 1px solid var(--line); }
.trust div:first-child { border-left: 0; padding-left: 0; }
.trust svg { width: 24px; height: 24px; margin-bottom: 18px; color: var(--text-2); fill: currentColor; }
.trust h3 { font-size: 20px; margin-bottom: 8px; }
.trust p { color: var(--text-2); font-size: 15px; margin: 0; max-width: 32ch; }

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.plan { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; padding: 28px; background: var(--bg-2); }
.plan-head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.plan h3 { font-size: 22px; font-weight: 600; color: var(--text); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--line-2); }
.plan .price { color: var(--text-2); font-size: 15px; padding: 16px 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.plan .price b { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-weight: 600; font-size: 48px; line-height: 1; color: var(--text); letter-spacing: -0.02em; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.plan .price b small { font-family: var(--font); font-size: 16px; font-weight: 400; color: var(--text-2); letter-spacing: 0; }
.plan .price span { display: block; }
.plan ul { display: grid; gap: 12px; margin-bottom: 28px; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; font-size: 15.5px; line-height: 1.45; color: var(--text); }
.plan li svg { width: 18px; height: 18px; margin-top: 1px; fill: currentColor; color: var(--text-3); }
.plan-cta { margin-top: auto; width: 100%; }
/* Pro: same card, one step brighter */
.plan-pro { border-color: var(--line-2); background: var(--bg-3); }
.plan-pro li svg { color: var(--text-2); }
.pricing-note { color: var(--text-3); font-size: 14px; margin: 20px 0 0; max-width: 70ch; }

/* faq */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px; align-items: start; }
.faq h2 { position: sticky; top: 104px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 18px 40px 18px 0; font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.005em; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-family: var(--font-mono); font-size: 20px; color: var(--text-3); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { color: var(--text-2); margin: 0 0 24px; max-width: 62ch; font-size: 16px; }

/* final cta */
.get { padding: 96px 0 88px; border-top: 1px solid var(--line); text-align: center; position: relative; overflow: hidden; }
.get::before { content: ""; position: absolute; left: 50%; top: 0; width: 900px; height: 500px; transform: translate(-50%, -45%); background: radial-gradient(closest-side, rgba(255,255,255,.045), transparent); pointer-events: none; }
.get-inner { display: flex; flex-direction: column; align-items: center; position: relative; }
.get-mark { width: 48px; height: 55px; margin-bottom: 24px; }
.get h2 { font-size: clamp(32px, 4.2vw, 52px); max-width: 16ch; }
.get p { color: var(--text-2); max-width: 48ch; margin: 16px 0 28px; font-size: 17px; }

.faq-list details p a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.faq-list details p a:hover { color: var(--text); text-decoration-color: var(--text); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 40px; font-size: 14px; color: var(--text-3); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px 40px; align-items: start; }
.footer-col .footer-h { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 12px; letter-spacing: 0; }
.footer-col a { display: block; padding: 4px 0; transition: color .15s; }
.footer-col a:hover, .footer-links a:hover { color: var(--text); }
.footer-col a.brand { display: inline-flex; padding: 0; }
.footer .brand { font-size: 16px; }
.footer .brand img { width: 20px; height: 23px; }
.footer .tagline { margin-top: 12px; max-width: 34ch; line-height: 1.5; }
.footer .copy { grid-column: 1 / -1; display: block; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stage-phones { gap: 24px; }
  .stage-side { display: none; }
  .lanes { width: 160%; left: -30%; }
  .stage-side + .stage-main, .stage-main { margin-top: 0; }
}
@media (max-width: 1024px) {
  .pillar, .pillar.flip { gap: 40px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav .nav-cta { order: 2; margin-left: auto; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .nav-toggle { display: block; margin-left: 0; order: 3; }
  .nav.open .nav-links { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 16px var(--gutter) 20px; gap: 14px; font-size: 17px; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .stage { margin-top: 32px; height: 480px; }
  .split-head, .pillar, .pillar.flip, .runs-grid, .plans, .faq { grid-template-columns: 1fr; }
  .split-head { gap: 16px; margin-bottom: 32px; }
  .pillar.flip .pillar-card { order: 0; }
  .pillar-card { min-height: 420px; }
  .steps, .trust { grid-template-columns: 1fr; }
  .step, .trust div { border-left: 0; padding-left: 0; padding-right: 0; }
  .step, .trust div { padding-top: 24px; padding-bottom: 24px; }
  .step + .step, .trust div + div { border-top: 1px solid var(--line); }
  .trust div:last-child { padding-bottom: 0; }
  .step::before { margin-bottom: 16px; }
  .trust svg { margin-bottom: 16px; }
  .faq { gap: 32px; }
  .faq h2 { position: static; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .stage { height: 440px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .device, .device-seq { --k: .84; }
  .run-card-phone .device, .run-card-phone .device-seq { --k: .78; }
  .run-card-head, .names-defs { padding-left: 20px; padding-right: 20px; }
  .plan { padding: 26px; }
  .plan .price b { font-size: 44px; }
  .get { padding: 72px 0 64px; }
  .nav-inner { gap: 16px; }
  .nav .brand { font-size: clamp(14px, 4vw, 17px); }
  .nav .nav-legal { gap: 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .nav-links a, .faq-list summary::after { transition: none; }
}

/* ---------- content components (richer sections) ---------- */

/* the four answers after every run: an index to the four sections */
.answers { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; z-index: 4; background: var(--bg); }
.answers-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.answer { display: flex; flex-direction: column; gap: 10px; padding: 28px 28px 30px; border-left: 1px solid var(--line); transition: background .15s ease; }
.answer:first-child { border-left: 0; padding-left: 0; }
.answer .label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.answer .label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.answer b { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.15; color: var(--text); }
.answer p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.answer .more { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--text-3); transition: color .15s ease; }
.answer:hover .more, .answer:focus-visible .more { color: var(--text); }

/* a titled block inside a section, below the headline row */
.block { margin-top: 48px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.block-head h3 { font-size: 19px; }
.block-head p { margin: 0; color: var(--text-3); font-size: 14px; }

/* charts: a plate with a reading, then bands drawn from custom properties. Set --lo/--hi on
   .plot (--u is computed there); each li spans --a..--b; the pin sits at --at. Labels layer
   left over right (z-index), so a label that runs long masks the next boundary line. */
:root { --caution: #FFCC00; --orange: #FF8C33; --pain: #FF4D4D; --num: ui-rounded, var(--font-display); }
.plate { margin: 0; padding: 22px 24px 16px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(rgba(255,255,255,.025), transparent 45%) var(--bg-2); container-type: inline-size; }
.read { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 24px; color: var(--text-3); font-size: 14px; line-height: 1.4; text-wrap: pretty; }
.read b { font: 600 46px/.8 var(--num); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.lvl { display: inline-flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 6px; font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text); background: color-mix(in srgb, var(--c) 16%, transparent); }
.lvl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.plot { --lo: 0; --hi: 100; --h: 44px; --u: calc(100% / (var(--hi) - var(--lo))); position: relative; }
.band { position: relative; height: calc(var(--h) + var(--lh, 50px)); }
ol.band li { position: absolute; top: 0; bottom: 0; left: calc((var(--a) - var(--lo)) * var(--u)); width: calc((var(--b) - var(--a)) * var(--u)); z-index: calc(200 - var(--a)); display: block; padding: calc(var(--h) + 12px) 0 0 7px; border: 0; border-left: 1px dashed var(--line-2); font: 11px/1.4 var(--font-mono); color: var(--text-3); white-space: nowrap; text-shadow: 0 0 3px var(--bg-2), 0 0 3px var(--bg-2); }
ol.band li:first-child { border-color: transparent; }
.band li::before, .band li::after { content: ""; position: absolute; left: 1px; right: 2px; }
.band li::before { top: 0; height: var(--h); background: linear-gradient(0deg, color-mix(in srgb, var(--c) 8%, transparent), transparent 60%); }
.band li::after { top: calc(var(--h) - 2px); height: 4px; border-radius: 2px; background: var(--c); }
.band .on::before { background: linear-gradient(0deg, color-mix(in srgb, var(--c) 30%, transparent), transparent 90%); }
ol.band li b { display: block; margin: 0; font: 600 13px/1.35 var(--font); color: var(--text-2); }
ol.band .on b { color: var(--text); }
ol.band .al { border-left: 1px solid rgba(255,255,255,.5); }
.band .fl::before, .band .fl::after { mask-image: linear-gradient(90deg, transparent, #000 80%); }
.band .fr::before, .band .fr::after { mask-image: linear-gradient(270deg, transparent, #000 80%); }
.bell { position: absolute; left: -7px; top: -17px; width: 13px; height: 13px; fill: var(--text-2); }
/* the pin ends a full-width rail, so it moves by transform alone */
.pin { position: absolute; left: 0; right: 0; top: 0; z-index: 300; height: var(--h); pointer-events: none; transform: translateX(calc((var(--at) - var(--lo)) * var(--u) - 100%)); }
.pin::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 1px; background: var(--text); }
.pin::after { content: ""; position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px var(--bg-2), 0 0 14px 2px color-mix(in srgb, var(--c) 55%, transparent); }
.pin b { position: absolute; left: 100%; top: 0; padding: 4px 7px 4px 6px; border-radius: 0 6px 6px 0; background: var(--text); color: var(--bg); font: 600 12px/1 var(--font-mono); }
/* Form: the example run's sub-scores at their weights, stepping across the same axis to the pin */
.wf { position: absolute; left: 0; right: 0; top: 26px; z-index: 250; }
.wf li { --x: calc((var(--a) - var(--lo)) * var(--u)); --w: calc((var(--b) - var(--a)) * var(--u)); position: relative; height: 25px; padding-left: var(--x); font: 600 13px/1 var(--font); white-space: nowrap; text-shadow: 0 0 4px var(--bg-2), 0 0 2px var(--bg-2); }
.wf i { font-style: normal; }
.wf span { margin-left: 6px; font: 11px/1 var(--font-mono); color: var(--text-2); text-shadow: 0 0 2px var(--bg-2), 0 0 4px var(--bg-2), 0 0 6px var(--bg-2), 0 0 6px var(--bg-2); }
.wf .r { padding: 0 calc(100% - var(--x) + 8px) 0 0; text-align: right; }
.wf li::before { content: ""; position: absolute; left: var(--x); width: var(--w); bottom: 3px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,.8)); }
.wf li + li::after { content: ""; position: absolute; left: var(--x); bottom: 3px; height: 33px; border-left: 1px solid rgba(255,255,255,.22); }
/* Body: what one mark adds, on 0 to the check-in cap of 50 */
.cap { margin: 0 0 12px; font: 11px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); text-wrap: balance; }
.wts { margin-top: 20px; }
.wt { --pad: 20px; width: 100%; border-collapse: collapse; }
.wt th, .wt td { padding: 11px 0 11px var(--pad); text-align: left; vertical-align: bottom; border-top: 1px solid var(--line); }
.wt thead * { padding-top: 0; border: 0; font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.wt thead th::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--c); }
.wt tbody th { padding-left: 0; font: 400 14px/1.35 var(--font); color: var(--text-2); vertical-align: middle; }
.wt th span { font: 11px var(--font-mono); color: var(--text-3); }
.wt td { width: 22%; font: 600 22px/1 var(--num); font-variant-numeric: tabular-nums; }
.wt td::after { content: ""; display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: linear-gradient(var(--c), var(--c)) 0 / calc(var(--v) * 2%) 100% no-repeat, rgba(255,255,255,.07); }
.wt tr > :nth-child(2) { --c: var(--caution); }
.wt tr > :nth-child(3) { --c: var(--orange); }
.wt tr > :nth-child(4) { --c: var(--pain); position: relative; }
.wt td:nth-child(4)::before { content: ""; position: absolute; left: calc(var(--pad) + (100% - var(--pad)) * .7); bottom: 7px; height: 14px; border-left: 1px solid var(--text); }
/* #runs: heart-rate zones under the Heart rate row */
.hr { margin: 16px 0 0; container-type: inline-size; }
@container (width < 640px) {
  ol.band li b { font-size: 12px; }
  .st { --lh: 86px; }
  ol.st li:nth-child(even) { padding-top: calc(var(--h) + 48px); }
}
@container (width < 440px) {
  .wt { --pad: 12px; }
  .wt td { font-size: 19px; }
  .wt tbody th { font-size: 13px; }
}
@container (width < 300px) {
  .wf li { font-size: 12px; }
  .wf span { margin-left: 4px; font-size: 10px; }
}
@container (width < 260px) {
  .wf i { display: none; }
}
@container (width < 380px) {
  .st2 { --lh: 86px; }
  ol.st2 li:nth-child(even) { padding-top: calc(var(--h) + 48px); }
}

/* definition grid: term and one-line meaning */
.defs { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.defs > div { padding: 18px 24px 4px 0; }
.defs > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.defs dt { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--text); margin-bottom: 6px; }
.defs dt .mono { font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--text-3); letter-spacing: .04em; }
.defs dd { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }

/* durability patterns: four quarter scores per pattern (illustrative shapes, no values) */
.patterns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.patterns li { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 16px 16px 18px; }
.patterns svg { display: block; width: 100%; max-width: 320px; height: auto; margin-bottom: 6px; overflow: visible; }
.patterns svg .base { stroke: var(--line-2); stroke-width: 1; fill: none; }
.patterns svg .line { stroke: var(--accent); stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.patterns .tol { fill: rgba(255,255,255,.045); stroke: rgba(255,255,255,.42); stroke-dasharray: 240 18; }
.patterns .area { fill: url(#qa); }
.patterns circle { fill: var(--bg-2); stroke: var(--accent); stroke-width: 1.75; }
.patterns .k { fill: var(--accent); stroke-opacity: .22; stroke-width: 10; }
.patterns .qx { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 320px; margin: 0 0 12px; font: 10px/1 var(--font-mono); color: var(--text-3); text-align: center; }
.patterns b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.patterns p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }

/* one run, read top to bottom: label, value, what it means */
.anatomy { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.anatomy li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.anatomy .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding-top: 4px; }
.anatomy b { display: block; font-weight: 600; color: var(--text); font-size: 16px; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.anatomy p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }

/* plain inline lists (areas, workout names) */
.inline-list { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14.5px; }
.inline-list li:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--text-3); }


@media (max-width: 1024px) {
  .answers-grid { grid-template-columns: 1fr 1fr; }
  .answer:nth-child(3) { border-left: 0; padding-left: 0; }
  .answer:nth-child(n+3) { border-top: 1px solid var(--line); }
  .patterns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .defs { --cols: 2 !important; }
  .defs > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .defs > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .answers-grid { grid-template-columns: 1fr; }
  .answer, .answer:nth-child(3) { border-left: 0; padding: 22px 0; }
  .answer + .answer { border-top: 1px solid var(--line); }
  .block { margin-top: 36px; }
  .block-head { flex-direction: column; gap: 4px; }
  .patterns { grid-template-columns: 1fr 1fr; }
  .anatomy li { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 480px) {
  .defs { --cols: 1 !important; }
  .defs > div, .defs > div + div { padding-left: 0; border-left: 0; }
  .defs > div + div { border-top: 1px solid var(--line); }
  .patterns { grid-template-columns: 1fr; }
  .plate { padding: 18px 16px 12px; }
  .read b { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .answer, .answer .more { transition: none; }
}

/* notes under a block */
.block-note { margin: 14px 0 0; color: var(--text-3); font-size: 14px; max-width: 80ch; }

/* example findings, laid out like the app's cards: pathway, title, detail, action */
.findings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.findings li { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 12px; background: var(--bg-2); padding: 16px 18px 18px; }
.findings .mono { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.findings b { font-weight: 600; font-size: 16px; color: var(--text); line-height: 1.35; }
.findings p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.findings em { font-style: normal; color: var(--green-text); font-size: 14px; line-height: 1.45; }


@media (max-width: 860px) {
  .findings { grid-template-columns: 1fr; }
}

/* how it works: four steps, and what is read */
.steps.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.reads { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.reads .label { margin: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

/* every session */
.anatomy-label { margin: 0 0 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
#runs .pillar { margin-bottom: 24px; }
#runs .pillar-card { min-height: 560px; }
.names-defs { margin: 0; padding: 4px 24px 24px; display: grid; grid-template-columns: 1fr; }
.names-defs > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.names-defs dt { font-weight: 600; color: var(--text); font-size: 14.5px; }
.names-defs dd { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }

@media (max-width: 1024px) {
  .steps.steps-4 { grid-template-columns: 1fr 1fr; }
  .steps.steps-4 .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .steps.steps-4 .step:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 8px; }
}
@media (max-width: 860px) {
  .steps.steps-4 { grid-template-columns: 1fr; }
  .steps.steps-4 .step:nth-child(n+3) { margin-top: 0; }
  #runs .pillar-card { min-height: 460px; }
  .names-defs > div { grid-template-columns: 1fr; gap: 2px; }
}

/* method: the algorithms behind the numbers */
.method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.method-grid li { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 18px 18px 20px; }
.method-grid .mono { font-size: 11px; letter-spacing: .06em; color: var(--text-3); }
.method-grid h3 { font-size: 18px; }
.method-grid p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
#method .kicker::before { background: var(--text-2); }
@media (max-width: 1024px) { .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .method-grid { grid-template-columns: 1fr; } }


/* touch: iPhone tap targets and small screens */
a, button, summary { -webkit-tap-highlight-color: transparent; }
.eyebrow-link { position: relative; }
.eyebrow-link::after { content: ""; position: absolute; inset: -7px -4px; }
.pillar-card > .device, .pillar-card > .device-seq, .run-card-phone > .device, .run-card-phone > .device-seq { max-width: calc(100% - 24px); }
@media (max-width: 860px) {
  .nav .nav-cta { height: 40px; position: relative; }
  .nav .nav-cta::after { content: ""; position: absolute; inset: -2px 0; }
  .footer-col a { padding: 11px 0; }
  .nav.open .nav-links a { padding: 6px 0; }
}
@media (max-width: 360px) {
  .nav-inner { gap: 10px; }
  .nav .nav-cta { padding: 0 10px; font-size: 13px; }
}

/* ---------- tour page (/tour) ---------- */
.btn-play svg { width: 14px; height: 14px; margin-left: -2px; }
.tour { padding: clamp(28px, 3vw, 44px) 0 104px; }
.tour-head { max-width: 960px; margin: 0 auto 36px; text-align: center; }
.tour-head .eyebrow { margin-bottom: 16px; }
.tour-head h1 { font-size: clamp(40px, 4.6vw, 64px); }
.tour-head .lede { margin: 16px auto 0; }
.player { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 36px; }
.player::before { content: ""; position: absolute; z-index: -1; top: -60px; left: 50%; width: min(820px, 100%); aspect-ratio: 1; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,255,255,.055), transparent); pointer-events: none; }
.player-frame { position: relative; width: min(400px, 100%); aspect-ratio: 9 / 16; border: 1px solid var(--line-2); border-radius: 32px; overflow: hidden; background: var(--bg); box-shadow: 0 60px 120px -60px rgba(0,0,0,.95); }
.player-frame video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.player-big, .player-toggle { position: absolute; display: grid; place-items: center; border-radius: 50%; color: var(--text); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.player-big { left: 50%; top: 50%; width: 76px; height: 76px; border: 1px solid rgba(255,255,255,.3); background: rgba(8,9,10,.55); transform: translate(-50%, -50%); transition: opacity .2s ease, transform .2s ease, background .15s ease; }
.player-big svg { width: 30px; height: 30px; margin-left: 4px; }
.player-big:hover { background: rgba(22,23,26,.82); }
.player-toggle { right: 14px; bottom: 14px; width: 44px; height: 44px; border: 1px solid var(--line-2); background: rgba(8,9,10,.62); opacity: 0; visibility: hidden; transition: opacity .2s ease, background .15s ease; }
.player-toggle svg { width: 18px; height: 18px; }
.player-toggle:hover { background: rgba(22,23,26,.88); }
.player.is-playing .player-big { opacity: 0; visibility: hidden; transform: translate(-50%, -50%) scale(.9); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.player.is-playing .player-toggle { opacity: 1; visibility: visible; }
.chapters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; width: min(920px, 100%); margin: 0; padding: 0; list-style: none; }
.chapters button { display: grid; grid-template-areas: "bar" "time" "name"; gap: 10px; width: 100%; padding: 0 0 6px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ch-bar { grid-area: bar; display: block; height: 3px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.ch-bar i { display: block; width: 100%; height: 100%; background: var(--c); transform: scaleX(var(--p, 0)); transform-origin: left; }
.ch-time { grid-area: time; color: var(--text-3); font-size: 12px; }
.ch-name { grid-area: name; color: var(--text-2); font-size: 15px; line-height: 1.3; transition: color .15s ease; }
.chapters button:hover .ch-name, .chapters button[aria-current="true"] .ch-name { color: var(--text); }
.chapters button[aria-current="true"] .ch-time { color: var(--text-2); }
.tour-cta { display: flex; flex-direction: column; align-items: center; margin-top: 56px; text-align: center; }
.tour-cta .hero-actions { justify-content: center; margin-top: 0; }
@media (min-width: 641px) {
  /* the whole player fits in the window on arrival: 300-400px wide */
  .player-frame { width: clamp(300px, calc((100vh - 360px) * 9 / 16), 400px); }
}
@media (max-width: 640px) {
  .tour { padding-bottom: 72px; }
  .tour-head { margin-bottom: 28px; }
  .player { gap: 24px; }
  .chapters { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); }
  .chapters li { border-bottom: 1px solid var(--line); }
  .chapters button { grid-template-columns: 3.4em minmax(0, 1fr); grid-template-areas: "time name" "bar bar"; column-gap: 12px; row-gap: 12px; align-items: baseline; padding: 14px 0 12px; }
  .ch-name { font-size: 16px; }
  .tour-cta { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .player-big, .player-toggle, .ch-name { transition: none; }
}

/* ---------- legal / document pages ---------- */
.doc { padding: 72px 0 112px; }
.doc-inner { max-width: 72ch; }
.doc h1 { font-size: clamp(40px, 5vw, 64px); margin-bottom: 12px; }
.doc .meta { color: var(--text-3); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 28px; margin: 48px 0 12px; }
.doc h3 { font-size: 19px; margin: 24px 0 8px; font-family: var(--font); font-weight: 600; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; color: var(--text-2); }
.doc strong { color: var(--text); }
.doc ul { list-style: disc; padding-left: 22px; margin: 0 0 1em; }
.doc ol { list-style: decimal; padding-left: 22px; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: var(--text); }
.doc .summary { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 32px; }
.doc .summary p { margin: 0; font-size: 16px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 8px 0 20px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.doc th { font-weight: 600; color: var(--text); font-size: 14px; }

@media (max-width: 640px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { display: none; }
  .doc tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; background: var(--bg-2); }
  .doc td { border: 0; padding: 4px 0; }
  .doc td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--text-3); font-weight: 600; }
}


/* ---------- sequential diagrams ----------
   The finished diagram is the default. Motion is native CSS scroll-driven animation
   (view timelines), switched on only where supported and wanted; everyone else sees
   the complete static drawing. Always write animation-timeline after the animation
   shorthand (the shorthand resets it). Never put a diagram inside an overflow:hidden
   box: that box becomes the scroller and the timeline stops moving. */
:root { --edge: rgba(255,255,255,.40); --node-line: rgba(255,255,255,.22); --flow-fill: var(--text-2); }
@keyframes flow-x    { from { transform: scaleX(0); } }
@keyframes flow-y    { from { transform: scaleY(0); } }
@keyframes flow-pop  { from { transform: scale(0); } }
@keyframes flow-draw { from { stroke-dashoffset: 1; } }
@keyframes flow-fade { from { opacity: 0; } }
@keyframes flow-num  { from { color: var(--text-3); } }
@keyframes flow-go-x { from { transform: translateX(-100%); } }
@keyframes flow-go-y { from { transform: translateY(-100%); } }
@keyframes map-node  { from { stroke: var(--line); } }
@keyframes map-title { from { fill: var(--text-3); } }

/* shared rail: a node, a filled line to the next node, an optional phase label */
.rail { display: none; background: linear-gradient(var(--line-2), var(--line-2)) 4px 9px / 1px calc(100% - 9px) no-repeat; }
.rail::after { content: ""; position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.rail > i { position: absolute; left: 4px; top: 9px; bottom: 0; width: 1px; background: var(--flow-fill); transform-origin: 50% 0; }
.rail[data-phase]::before { content: attr(data-phase); position: absolute; left: 28px; white-space: nowrap; font: 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

/* sketches above each step */
.sketch { display: block; width: 120px; height: 40px; overflow: visible; margin: 0 0 16px; color: var(--text-3); }
.sketch .b { fill: none; stroke: var(--line-2); }
.sketch .l, .sketch .h { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sketch .cut { fill: none; stroke: var(--line-2); stroke-dasharray: 2 3; }
.sketch .dot, .sketch .bars rect { transform-box: fill-box; }
.sketch .dot { transform-origin: center; }
.sketch .bars rect { fill: var(--text-3); transform-origin: 50% 100%; }

/* PART A/C: the step rail (desktop: one horizontal line with nodes) */
.flow { position: relative; }
.flow .steps { border-top: 0; }
.flow .step::before { color: var(--text); }
.rail-line { position: relative; height: 1px; margin-top: 30px; }
.rail-line .track { position: absolute; inset: 0; background: var(--line); }
.rail-line .fill { position: absolute; inset: 0; background: var(--flow-fill); transform-origin: 0 50%; }
.flow[data-flow="how"] .rail-line .fill { right: 25%; }
.flow[data-flow="how"] .rail-line .track { -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); }
.rail-line .node { position: absolute; left: var(--x); top: -4px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--bg); }
.rail-line .node:first-of-type { margin-left: 0; }
.rail-line .node::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.rail-line .phase { position: absolute; left: calc(var(--x) + var(--o, 0px)); bottom: 12px; font: 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.flow-join .dash { position: absolute; left: 0; width: 25%; top: 0; height: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 4px, transparent 4px 8px); }
.flow-join .rail-line .track { left: 25%; -webkit-mask-image: linear-gradient(90deg, #000 66%, transparent); mask-image: linear-gradient(90deg, #000 66%, transparent); }
.flow-join .rail-line .fill { left: 25%; right: auto; width: 50%; }
.node.go::after { background: var(--green); box-shadow: 0 0 0 3px rgba(115,191,68,.18); }
.rail-line .env-track { position: absolute; left: 20px; width: calc(25% - 36px); top: -8px; height: 16px; }
.env { position: absolute; right: 0; top: 0; width: 16px; height: 16px; color: var(--text-2); }
.flow .ok { display: none; position: absolute; left: -5px; top: -5px; width: 19px; height: 19px; max-width: none; fill: currentColor; color: var(--green); }
.is-requested .ok { display: block; }
.is-requested .rail-line .node:first-of-type::after, .is-requested .step:first-child > .rail::after { opacity: 0; }
.is-requested .step:first-child::before { content: "0" counter(step) " · Application received"; color: var(--green-text); }

/* phones and tablets: one column, each step has its own node and line */
@media (max-width: 1024px) {
  .flow .rail-line { display: none; }
  .flow .steps.steps-4 { grid-template-columns: minmax(0, 1fr); }
  .flow .steps.steps-4 > .step { position: relative; margin: 0; padding: 24px 0 24px 28px; border: 0; }
  .flow .steps.steps-4 > .step:has(> .rail[data-phase]) { padding-top: 50px; }
  .flow .step > .rail { display: block; position: absolute; left: 0; top: 29px; bottom: -29px; width: 9px; }
  .flow .step:has(> .rail[data-phase]) > .rail { top: 55px; }
  .flow .step:has(+ .step > .rail[data-phase]) > .rail { bottom: -55px; }
  .flow .step > .rail[data-phase]::before { top: -26px; }
  .flow .step:last-child > .rail { bottom: 0; -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent); }
  /* TestFlight: a dashed wait for the invite under step 01, the envelope travelling down it */
  .flow-join .steps.steps-4 > .step:first-child:has(> .rail) { padding-top: 24px; padding-bottom: 88px; }
  .flow.flow-join .step:first-child > .rail { top: 29px; bottom: -29px; background: repeating-linear-gradient(180deg, var(--line-2) 0 4px, transparent 4px 8px) 4px 9px / 1px calc(100% - 9px) no-repeat; }
  .flow-join .step:first-child > .rail > i { display: none; }
  .flow-join .step:first-child > .rail[data-phase]::before { top: auto; bottom: 56px; }
  .flow-join .step:first-child .env-track { position: absolute; left: -4px; width: 16px; bottom: 16px; height: 64px; }
  .flow-join .step:first-child .env { top: auto; bottom: 0; right: auto; left: 0; }
  .flow-join .step:last-child > .rail { bottom: auto; height: 9px; -webkit-mask-image: none; mask-image: none; }
  .flow-join .step:last-child > .rail::after { background: var(--green); box-shadow: 0 0 0 3px rgba(115,191,68,.18); }
}
@media (min-width: 700px) and (max-width: 1024px) {
  .flow[data-flow="how"] .steps.steps-4 > .step { display: grid; grid-template-columns: 120px minmax(0, 52ch); grid-template-rows: auto 1fr; column-gap: 48px; }
  .flow[data-flow="how"] .step::before { grid-area: 1 / 1; }
  .flow[data-flow="how"] .step > .sketch { grid-area: 2 / 1; margin: 0; }
  .flow[data-flow="how"] .step > h3 { grid-area: 1 / 2; }
  .flow[data-flow="how"] .step > p { grid-area: 2 / 2; max-width: none; }
  .flow-join .steps.steps-4 > .step { display: grid; grid-template-columns: 200px minmax(0, 52ch); grid-template-rows: auto 1fr; column-gap: 48px; align-content: start; }
  .flow-join .step::before { grid-area: 1 / 1; }
  .flow-join .step > h3 { grid-area: 2 / 1; }
  .flow-join .step > p { grid-area: 2 / 2; max-width: none; }
}

/* PART B: Method, numbered in processing order, with a run map (desktop), in/out lines (tablet) and a rail (phone) */
.method-grid { counter-reset: m; }
.method-grid > li > .mono:first-child::before { counter-increment: m; content: "0" counter(m) " · "; color: var(--text-2); }
.method-grid .ports { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line); font: 11px/1.4 var(--font-mono); color: var(--text-3); }
.method-grid .ports i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--c); vertical-align: 1px; }
.run-map { display: none; margin: 0 0 40px; }
.run-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.run-map figcaption { margin-top: 16px; max-width: 72ch; font: 12px/1.5 var(--font-mono); color: var(--text-3); }
.run-map .n rect { fill: var(--bg-2); stroke: var(--node-line); }
.run-map .mk, .run-map .lbl, .run-map .o, .run-map .pill text { font: 400 11px var(--font-mono); fill: var(--text-3); }
.run-map .t { font: 600 15px var(--font-display); fill: var(--text); }
.run-map .pill text { fill: var(--text-2); }
.run-map .pill rect { fill: none; stroke: var(--line-2); }
.run-map .e { fill: none; stroke: var(--edge); stroke-width: 1.5; }
.run-map .e.d { stroke-dasharray: 3 4; }
.run-map .h { fill: none; stroke: var(--edge); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.run-map .amber { stroke: var(--amber); }
.run-map .lbl { paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
@media (min-width: 1200px) {
  .run-map { display: block; }
  .method-grid .ports { display: none; }
}
@media (min-width: 561px) and (max-width: 1199px) {
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .method-grid { padding-left: 24px; }
  .method-grid > li { position: relative; }
  .method-grid .rail { display: block; position: absolute; left: -24px; top: 22px; bottom: -34px; width: 9px; }
  .method-grid > li:nth-child(7) { margin-top: 36px; }
  .method-grid > li:nth-child(6) .rail { bottom: -70px; }
  .method-grid .rail[data-phase]::before { top: -50px; left: 24px; text-transform: none; letter-spacing: 0; }
  .method-grid > li:last-child .rail { bottom: auto; height: 9px; }
}

@media (forced-colors: active) {
  .rail-line .fill, .rail-line .node::after, .rail::after, .rail > i { forced-color-adjust: none; background: CanvasText; }
  .flow-join .dash { forced-color-adjust: none; background: repeating-linear-gradient(90deg, CanvasText 0 4px, transparent 4px 8px); }
  .flow.flow-join .step:first-child > .rail { forced-color-adjust: none; background: repeating-linear-gradient(180deg, CanvasText 0 4px, transparent 4px 8px) 4px 9px / 1px calc(100% - 9px) no-repeat; }
  .run-map .e, .run-map .h, .run-map .pill rect { stroke: CanvasText; }
  .run-map .n rect { fill: Canvas; stroke: CanvasText; }
  .run-map svg text { fill: CanvasText !important; }
  .run-map .lbl { stroke: Canvas; }
  .sketch .b, .sketch .l, .sketch .h, .sketch .cut, .sketch .bars rect, .patterns svg .line, .patterns circle { stroke: CanvasText; }
  .band li::after, .wf li::before, .pin::before, .pin::after { forced-color-adjust: none; background: CanvasText; }
  .wt td::after { forced-color-adjust: none; }
  .patterns .tol { fill: none; stroke: GrayText; }
  .patterns svg .base { stroke: GrayText; }
  .wt tbody td::after { background: linear-gradient(CanvasText, CanvasText) 0 / calc(var(--v) * 2%) 100% no-repeat, Canvas; box-shadow: inset 0 0 0 1px GrayText; }
}
@media (prefers-reduced-motion: reduce) {
  .flow .ok, .rail-line .node::after, .rail::after { transition: none; }
}

/* ---------- beta application (/testflight#apply) ----------
   One page in four numbered sections, so it works as a plain form post without JS.
   Everything is namespaced .ap- (the home teaser uses .get-crit / .get-note).
   Reuses the site tokens and the .read / .lvl / .plot / .band / .pin chart parts. */
.ap-page { padding: clamp(28px, 3vw, 44px) 0 88px; }
.ap-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.ap-intro { align-self: stretch; }
.ap-intro h1 { font-size: clamp(40px, 4.4vw, 60px); max-width: 12ch; }
.ap-intro .lede { margin-top: 20px; }
.ap-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* what we look for: static criteria that tick as the form is filled (visual only) */
.ap-crit-box { margin-top: 40px; }
.ap-crit-h { margin: 0 0 12px; font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ap-crit { border-top: 1px solid var(--line); }
.ap-crit li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; column-gap: 16px; padding: 14px 0 15px; border-bottom: 1px solid var(--line); }
.ap-crit li::before { content: ""; grid-row: 1 / span 2; width: 9px; height: 9px; margin: 7px 0 0 1px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-3); transition: background .2s ease, box-shadow .2s ease; }
.ap-crit b { grid-column: 2; font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--text); }
.ap-crit span { grid-column: 2; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.ap-crit .ap-crit-v { grid-column: 3; grid-row: 1; align-self: start; padding-top: 3px; font: 12px/1.2 var(--font-mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--text-3); white-space: nowrap; }
.ap-crit li[data-state="met"]::before { background: var(--green); box-shadow: 0 0 0 3px rgba(115,191,68,.18); }
.ap-crit li[data-state="met"] .ap-crit-v { color: var(--green-text); }
.ap-crit li[data-state="below"]::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(252,176,23,.16); }
.ap-crit li[data-state="below"] .ap-crit-v { color: var(--amber); }
@media (min-width: 1025px) and (min-height: 700px) {
  .ap-crit-box { position: sticky; top: 104px; }
}

/* the card */
.ap-card { position: relative; padding: 36px 40px 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); container-type: inline-size; scroll-margin-top: 88px; }
.ap-head { margin-bottom: 28px; }
.ap-head h2 { font-size: 30px; }
.ap-head p { margin: 8px 0 0; font-size: 15px; color: var(--text-2); }

/* sections: a floated legend flows like a heading (no border notch) */
.ap-sec { min-width: 0; margin: 0; padding: 28px 0 0; border: 0; border-top: 1px solid var(--line); }
.ap-sec + .ap-sec { margin-top: 36px; }
.ap-sec > legend { float: left; width: 100%; display: flex; align-items: baseline; gap: 12px; margin: 0; padding: 0 0 18px; font: 600 21px/1.2 var(--font-display); color: var(--text); }
.ap-sec > legend .mono { color: var(--text-3); font-weight: 400; }
.ap-sec > legend + * { clear: both; }
.ap-sec-sub { margin: -8px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-2); max-width: 56ch; }
.ap-sec > .ap-field, .ap-sec > .ap-row, .ap-sec > .ap-rf, .ap-sec > .ap-reveal { margin-top: 22px; }
.ap-sec > legend + .ap-field, .ap-sec > legend + .ap-row { margin-top: 0; }

/* fields */
.ap-field { min-width: 0; scroll-margin-top: 104px; }
.ap-label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--text); }
.ap-opt { font-weight: 400; color: var(--text-3); }
.ap-hint { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--text-3); }
.ap-js .ap-nojs { display: none; }
.ap-input {
  display: block; width: 100%; height: 48px; padding: 0 14px; margin: 0;
  font: 16px/1.2 var(--font); color: var(--text); /* 16px keeps iOS from zooming on focus */
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ap-input::placeholder { color: var(--text-3); opacity: 1; }
.ap-input:hover { border-color: rgba(255,255,255,.24); }
.ap-input:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 3px rgba(255,255,255,.1); }
.ap-input[aria-invalid="true"] { border-color: var(--red-text); }
.ap-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(255,90,98,.2); }
.ap-time { font-family: var(--font-mono); font-size: 16px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
textarea.ap-input { height: auto; min-height: 108px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
select.ap-input { padding-right: 40px; cursor: pointer; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239A9FA7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 15px center / 12px 8px; }
select.ap-input:invalid { color: var(--text-3); }
select.ap-input option, select.ap-input optgroup { color: var(--text); background: var(--bg-3); }
.ap-err { display: flex; gap: 8px; margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: var(--red-text); }
.ap-err:empty { display: none; }
.ap-err::before { content: "!"; flex: none; display: grid; place-items: center; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; background: var(--red-text); color: var(--bg); font: 700 11px/1 var(--font); }
.ap-soft { margin: 10px 0 0; padding-left: 12px; border-left: 2px solid var(--amber); font-size: 14px; line-height: 1.45; color: var(--text-2); }
.ap-soft:empty { display: none; }

/* rows: two or three fields side by side once the card is wide enough */
.ap-row { display: grid; gap: 22px 16px; }
.ap-row > .ap-field { margin: 0; }
.ap-row-time { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ap-row-time .ap-f-bib { grid-column: 1 / -1; max-width: calc(50% - 8px); }
@container (min-width: 520px) {
  .ap-row-time { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, .9fr); }
  .ap-row-time .ap-f-bib { grid-column: auto; max-width: none; }
}
@container (max-width: 279px) {
  .ap-row-time { grid-template-columns: minmax(0, 1fr); }
  .ap-row-time .ap-f-bib { max-width: none; }
}
/* the race date: native picker, text left-aligned like the other fields (iOS centers it) */
.ap-date { min-width: 0; line-height: 46px; }
.ap-date::-webkit-date-and-time-value { text-align: left; }
.ap-date::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }

/* the Other certified marathon follow-up */
.ap-reveal { padding: 18px 18px 20px; border: 1px dashed var(--line-2); border-radius: 12px; }
.ap-reveal-h { margin: 0 0 16px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.ap-reveal > .ap-field + .ap-field { margin-top: 18px; }

/* live Race Fitness readout. No container-type here: nested in the card's container, Chrome
   skipped laying out its contents after a JS update (the box collapsed to its padding). */
.ap-rf { --lv: var(--text-3); padding: 18px 20px 4px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(rgba(255,255,255,.025), transparent 60%) var(--bg); }
.ap-rf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.ap-rf-k { font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ap-rf-src { font: 12px/1 var(--font-mono); color: var(--text-3); font-variant-numeric: tabular-nums; }
.ap-rf .read { margin: 0 0 16px; }
.ap-rf .read b { font-size: 44px; min-width: 1.2ch; }
.ap-rf[data-state="empty"] .read b { color: var(--text-3); }
.ap-rf .lvl { --c: var(--lv); }
.ap-rf .plot { --lo: 42; --hi: 70; --h: 26px; }
.ap-rf .band { --lh: 44px; }
.ap-rf ol.band li { padding-top: calc(var(--h) + 10px); }
.ap-rf .pin { transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .2s ease; }
.ap-rf .pin::after { box-shadow: 0 0 0 3px var(--bg), 0 0 14px 2px color-mix(in srgb, var(--lv) 55%, transparent); }
.ap-rf[data-state="empty"] .pin, .ap-rf[data-off] .pin { opacity: 0; }
.ap-rf-note { margin: 12px 0 18px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.ap-rf[data-state="below"] .ap-rf-note { padding-left: 12px; border-left: 2px solid var(--amber); }

/* weekly distance: a number and a mi/km switch */
.ap-dist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-dist .ap-input { flex: 0 1 180px; min-width: 0; }
.ap-seg { display: inline-flex; flex: none; min-width: 0; margin: 0; padding: 1px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); }
.ap-seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ap-seg label { position: relative; display: block; padding: 2px; cursor: pointer; } /* 44px target around a 40px pill */
.ap-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ap-seg span { display: grid; place-items: center; min-width: 52px; height: 40px; padding: 0 12px; border-radius: 6px; font: 500 14px/1 var(--font-mono); color: var(--text-3); transition: background .15s ease, color .15s ease; }
.ap-seg input:checked + span { background: rgba(255,255,255,.1); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.ap-seg input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 1px; }
.ap-conv { margin: 0 0 0 4px; font: 13px/1.4 var(--font-mono); color: var(--text-3); font-variant-numeric: tabular-nums; }
.ap-conv:empty { display: none; }

/* checkboxes: the whole row is the target */
.ap-checks { border-top: 1px solid var(--line); }
.ap-sec > legend + .ap-checks { margin-top: 0; }
.ap-f-check { padding: 4px 0; border-bottom: 1px solid var(--line); }
.ap-check { display: flex; gap: 14px; align-items: flex-start; min-height: 44px; padding: 10px 0; cursor: pointer; font-size: 16px; line-height: 1.45; color: var(--text); }
.ap-check input {
  flex: none; width: 22px; height: 22px; margin: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  border: 1.5px solid var(--text-3); border-radius: 6px; background: var(--bg) no-repeat center / 14px 14px;
  transition: background-color .15s ease, border-color .15s ease;
}
.ap-check input:hover { border-color: var(--text-2); }
.ap-check input:checked { border-color: var(--text); background-color: var(--text); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4l3.1 3.1 6.5-7' fill='none' stroke='%2308090A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ap-check input:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.ap-check input[aria-invalid="true"] { border-color: var(--red-text); }
.ap-check small { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--text-3); }
.ap-check a, .ap-fine a, .ap-done a, .get-note a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.ap-check a:hover, .ap-fine a:hover, .ap-done a:hover, .get-note a:hover { text-decoration-color: var(--text); }
.ap-f-check .ap-err { margin: 0 0 10px 36px; }

/* error summary: appears on submit, lists what to fix, links jump to the field */
.ap-summary { margin: 0 0 28px; padding: 16px 18px 8px; border: 1px solid rgba(255,90,98,.4); border-left: 3px solid var(--red-text); border-radius: 10px; background: rgba(229,30,41,.07); scroll-margin-top: 96px; }
.ap-summary:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,90,98,.22); }
.ap-summary h3 { margin: 0 0 4px; font-size: 19px; color: var(--text); }
.ap-summary a { display: flex; align-items: center; min-height: 44px; padding: 6px 0; font-size: 15px; line-height: 1.35; color: var(--red-text); text-decoration: underline; text-decoration-color: rgba(255,90,98,.45); text-underline-offset: 3px; }
.ap-summary a:hover { text-decoration-color: var(--red-text); }
.ap-summary li + li { border-top: 1px solid rgba(255,90,98,.14); }

/* send */
.ap-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ap-captcha { margin-top: 20px; }
.ap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.ap-submit { height: 48px; padding: 0 24px; font-size: 16px; }
.ap-submit:disabled { opacity: .6; cursor: progress; }
.ap-fine { flex: 1 1 240px; margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-3); }
.ap-msg { margin: 16px 0 0; font-size: 14px; line-height: 1.45; color: var(--red-text); }
.ap-msg:empty { display: none; }
.ap-status { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
@container (max-width: 519px) {
  .ap-submit { width: 100%; }
}

/* sent */
.ap-done:focus { outline: none; }
.ap-done-k { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--green-text); }
.ap-done-k::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(115,191,68,.18); }
.ap-done h2 { font-size: 34px; }
.ap-done-lede { margin: 12px 0 24px; font-size: 17px; line-height: 1.55; color: var(--text-2); max-width: 54ch; }
.ap-done-lede strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.ap-recap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.ap-recap > div { min-width: 0; padding: 14px 16px 16px; }
.ap-recap > div + div { border-left: 1px solid var(--line); }
.ap-recap dt { margin-bottom: 8px; font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ap-recap dd { margin: 0; font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ap-recap dd span { display: block; font-weight: 400; font-size: 14px; color: var(--text-2); }
.ap-done-h { margin: 0 0 14px; font-size: 19px; }
.ap-steps { display: grid; gap: 12px; font-size: 15.5px; line-height: 1.45; color: var(--text-2); }
.ap-steps li { display: flex; gap: 14px; align-items: baseline; }
.ap-steps .mono { flex: none; color: var(--text-3); }
.ap-steps b { color: var(--text); font-weight: 600; }
.ap-done .ap-fine { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
@container (max-width: 519px) {
  .ap-recap { grid-template-columns: minmax(0, 1fr); }
  .ap-recap > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .ap-done h2 { font-size: 30px; }
}

@media (max-width: 1024px) {
  .ap-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ap-intro h1 { max-width: 16ch; }
  .ap-crit-box { margin-top: 32px; max-width: 640px; }
  .ap-card { max-width: 760px; }
}
@media (max-width: 860px) {
  .ap-page { padding-bottom: 56px; }
  .ap-card { padding: 28px 28px 32px; }
}
@media (max-width: 480px) {
  .ap-card { padding: 24px 18px 28px; border-radius: 14px; }
  .ap-head h2 { font-size: 26px; }
  .ap-rf { padding: 16px 16px 2px; }
  .ap-reveal { padding: 16px 14px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-input, .ap-check input, .ap-seg span, .ap-rf .pin, .ap-crit li::before { transition: none; }
}
@media (forced-colors: active) {
  .ap-crit li::before { forced-color-adjust: none; box-shadow: inset 0 0 0 1.5px CanvasText; }
  .ap-crit li[data-state]:not([data-state=""])::before { background: CanvasText; }
  .ap-check input { forced-color-adjust: auto; -webkit-appearance: checkbox; appearance: auto; }
}

/* home: the #get teaser that points to /testflight#apply */
.get-crit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(760px, 100%); margin: 4px 0 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
.get-crit li { padding: 20px 22px 22px; }
.get-crit li + li { border-left: 1px solid var(--line); }
.get-crit b { display: block; margin-bottom: 8px; font: 600 32px/1 var(--font-display); letter-spacing: -.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.get-crit span { display: block; font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.get .get-note { margin: 16px 0 0; font-size: 14px; color: var(--text-3); }
@media (max-width: 640px) {
  .get-crit { grid-template-columns: minmax(0, 1fr); }
  .get-crit li { padding: 16px 0 18px; }
  .get-crit li + li { border-left: 0; border-top: 1px solid var(--line); }
  .get-inner > .btn-lg { width: 100%; }
}
