/* Evensplit launch site. Tokens are the app's own, plus --track, --lane-line and --ink. */
:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-sunken: #eef0eb;
  --text: #15191c;
  --text-muted: #59616a;
  --border: #d9ddd5;
  --border-strong: #b9bfb6;
  --accent: #c63d0f; /* tartan-track orange */
  --accent-hover: #a8330c;
  --accent-soft: #fde9df;
  --accent-text: #ffffff; /* text on an --accent fill */
  --success: #1d7a46;
  --success-soft: #e2f4e9;
  --warning: #8f5a00;
  --focus-ring: #2463eb;
  --track: #e9d3c7; /* lane surface in the hero drawing */
  --lane-line: #ffffff; /* lane lines drawn over --track */
  --ink: #15191c; /* the pace band's printed type */

  /* Site-only helpers built from the tokens above. */
  --paper: var(--surface);
  --paper-accent: #c63d0f; /* the band is always a white printout, so it keeps the light accent */
  --paper-success: #1d7a46;
  --shadow:
    0 1px 2px rgb(21 25 28 / 0.08), 0 18px 40px -12px rgb(198 61 15 / 0.28);
  --band-shadow: drop-shadow(0 1px 2px rgb(21 25 28 / 0.08))
    drop-shadow(0 14px 18px rgb(198 61 15 / 0.22));
  --shadow-md: 0 1px 2px rgb(21 25 28 / 0.05), 0 6px 20px rgb(21 25 28 / 0.06);
  --radius-lg: 1.25rem;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --wrap: 72rem;
  --gutter: 1.5rem;
  --section-gap: 7rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1214;
    --surface: #181c1f;
    --surface-sunken: #121517;
    --text: #eef1ee;
    --text-muted: #a2abb3;
    --border: #2c3338;
    --border-strong: #475058;
    --accent: #ff7a45;
    --accent-hover: #ff9466;
    --accent-soft: #3a1d10;
    --accent-text: #1a0b03;
    --success: #4cc883;
    --success-soft: #12301f;
    --warning: #f2b544;
    --focus-ring: #7ea6ff;
    --track: #2a1a13;
    --lane-line: #4a3329;
    --ink: #15191c; /* the pace band stays paper-white in dark mode: it is a printout */

    --paper: #fbfaf7;
    --band-shadow: drop-shadow(0 2px 3px rgb(0 0 0 / 0.45))
      drop-shadow(0 18px 24px rgb(0 0 0 / 0.55));
    --shadow-md: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 20px rgb(0 0 0 / 0.3);
  }
}

@media (max-width: 479px) {
  :root {
    --gutter: 1.25rem;
  }
}

@media (max-width: 719px) {
  :root {
    --section-gap: 4.5rem;
  }
}

/* ---------- Base ---------- */

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

html {
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 100%;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

main:focus {
  outline: none;
}

.wrap {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.label,
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent);
  margin-bottom: 0.875rem;
}

.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-stretch: 75%;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.section {
  padding-block: calc(var(--section-gap) / 2);
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 0;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 120ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--small {
  min-height: 44px;
  padding: 0 1.125rem;
  font-size: 0.9375rem;
}

.btn--large {
  min-height: 52px;
  padding: 0 1.625rem;
  font-size: 1.0625rem;
}

.btn .arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.btn--quiet {
  padding: 0 0.75rem;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.25em;
}

.btn--quiet:hover {
  text-decoration-color: currentColor;
}

.btn--quiet:active {
  color: var(--text-muted);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    backdrop-filter 200ms ease;
}

.site-header[data-scrolled="true"] {
  background-color: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
}

.logo {
  width: 28px;
  height: 28px;
  flex: none;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.wordmark span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav ul {
  display: flex;
  margin: 0 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.site-nav ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.site-nav ul a:hover {
  color: var(--text);
}

.site-nav ul a:active {
  background: var(--surface-sunken);
}

@media (max-width: 719px) {
  .site-nav ul {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: center;
  gap: 2rem;
  min-height: min(88vh, 52rem);
}

.hero h1 {
  font-size: clamp(2.75rem, 1.6rem + 5vw, 5.25rem);
  line-height: 0.98;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 34ch;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}

.hero-note {
  margin-top: 1.5rem;
  color: var(--text-muted);
}

.hero-art {
  position: relative;
  align-self: stretch;
  min-height: 34rem;
}

.plane {
  position: absolute;
}

.plane--track {
  inset: 0 -8% 0 -6%;
}

.track {
  width: 100%;
  height: 100%;
  display: block;
  mask-image: radial-gradient(
    ellipse 55% 55% at 55% 50%,
    #000 55%,
    transparent 100%
  );
}

.track-surface {
  fill: var(--track);
}

.lane-lines path,
.start-line line {
  fill: none;
  stroke: var(--lane-line);
  stroke-width: 2;
}

.start-line line {
  stroke-width: 4;
}

.lane-numbers text {
  fill: var(--lane-line);
  fill-opacity: 0.7;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  text-anchor: middle;
  dominant-baseline: central;
}

.plane--band {
  top: 12%;
  right: 12%;
  width: 15rem;
  z-index: 1;
}

.plane--chip {
  top: 52%;
  left: 26%;
  z-index: 2;
}

.tilt {
  transform: perspective(900px) rotateX(calc(var(--ty, 0) * -2deg))
    rotateY(calc(var(--tx, 0) * 2deg));
  transition: transform 400ms var(--ease);
}

.enter--band {
  filter: var(--band-shadow);
}

/* The paper strip shared by the hero band and the printing band. */
.band {
  background: var(--paper);
  color: var(--ink);
  padding: 1.25rem 1.125rem 1.25rem;
  /* Perforated top edge: 6 px half circles bitten out of the paper. */
  mask: radial-gradient(circle at 8px 0, transparent 6px, #000 6.5px) 0 0 / 16px
    100% repeat-x;
}

.band--hero {
  transform: rotate(-5deg);
  padding-bottom: 2.5rem;
  mask:
    radial-gradient(circle at 8px 0, transparent 6px, #000 6.5px) 0 0 / 16px
      100% repeat-x,
    linear-gradient(#000 62%, transparent 97%);
  mask-composite: intersect;
}

.band table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-stretch: 75%;
  font-size: 1.0625rem;
}

.band th,
.band td {
  padding: 0.3rem 0;
  text-align: right;
  border-bottom: 1px dotted rgb(21 25 28 / 0.18);
}

.band th:first-child {
  text-align: left;
}

.band tbody th {
  font-weight: 700;
}

.band thead th {
  font-family: var(--font-body);
  font-stretch: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(21 25 28 / 0.62);
  border-bottom: 1.5px solid var(--ink);
}

.band thead .band-title th {
  color: var(--ink);
  border-bottom: 0;
  padding-bottom: 0.5rem;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 1rem 1.25rem 1.125rem;
}

.chip .label {
  color: var(--text-muted);
}

.chip-pace {
  line-height: 0.95;
  margin-top: 0.25rem;
  white-space: nowrap;
}

.chip-pace .num {
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(3.5rem, 8vw, 6rem);
  color: var(--accent);
  letter-spacing: -0.01em;
}

.chip-pace .unit {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.chip-more {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (max-width: 899px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 2.5rem 1rem;
  }

  .hero-art {
    min-height: 22rem;
    height: 22rem;
    overflow: clip;
    margin-inline: calc(var(--gutter) * -1);
  }

  .plane--track {
    inset: 0;
  }

  .track {
    mask-image: radial-gradient(
      ellipse 70% 70% at 50% 50%,
      #000 50%,
      transparent 100%
    );
  }

  .plane--band {
    top: 1rem;
    right: 6%;
    width: 12rem;
  }

  .band--hero table {
    font-size: 0.9375rem;
  }

  .band--hero {
    padding: 1rem 0.875rem 2rem;
  }

  .plane--chip {
    top: auto;
    bottom: 1.25rem;
    left: var(--gutter);
  }

  .chip {
    padding: 0.75rem 1rem 0.875rem;
  }

  .chip-pace .num {
    font-size: 3.5rem;
  }

  .chip-more {
    font-size: 0.8125rem;
  }
}

/* ---------- Proof strip ---------- */

.proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 2rem 0 0;
  padding: 1.75rem 0;
  list-style: none;
  border-block: 1px solid var(--border);
}

.proof li {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.25rem 1.5rem;
  border-left: 1px solid var(--border);
}

.proof li:first-child {
  border-left: 0;
  padding-left: 0;
}

.proof-figure {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.proof .label {
  color: var(--text-muted);
}

@media (max-width: 719px) {
  .proof {
    grid-template-columns: 1fr 1fr;
    row-gap: 1.25rem;
  }

  .proof li,
  .proof li:first-child {
    padding: 0.25rem 1rem;
  }

  .proof li:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
}

/* ---------- How it works ---------- */

.steps-wrap {
  position: relative;
  margin-top: 3rem;
}

.lane--across {
  position: absolute;
  top: 21px;
  left: 22px;
  right: 22px;
  width: calc(100% - 44px);
  height: 2px;
  overflow: visible;
}

.lane--across line {
  stroke: var(--border-strong);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.step h3 {
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-muted);
  max-width: 32ch;
}

kbd {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-sunken);
  color: var(--text);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-stretch: 75%;
  font-weight: 600;
  font-size: 0.9375rem;
}

@media (max-width: 719px) {
  .lane--across {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .steps::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 22px;
    bottom: 22px;
    border-left: 2px solid var(--border-strong);
  }

  .step {
    position: relative;
    padding-left: 64px;
  }

  .step-num {
    position: absolute;
    left: 0;
    top: 0;
  }

  .step h3 {
    padding-top: 0.5rem;
  }
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.feature--flip .feature-copy {
  order: 2;
}

.feature-copy p:not(.eyebrow) {
  margin-top: 1.25rem;
  color: var(--text-muted);
  max-width: 44ch;
}

.feature-figure {
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
}

@media (max-width: 899px) {
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature--flip .feature-copy {
    order: 0;
  }

  .card {
    padding: 1.25rem;
  }
}

/* 4a. Pace demo */

.pace-demo .label {
  color: var(--text-muted);
}

.pace-goal {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 0.25rem;
}

.slider-wrap {
  display: none;
  margin-top: 0.75rem;
}

.js .slider-wrap {
  display: block;
}

.slider {
  --fill: 28.5714%;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) var(--fill),
    var(--surface-sunken) var(--fill)
  );
  box-shadow: inset 0 0 0 1px var(--border);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 1px 4px rgb(21 25 28 / 0.3);
}

.slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-sunken);
  box-shadow: inset 0 0 0 1px var(--border);
}

.slider::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 1px 4px rgb(21 25 28 / 0.3);
}

.slider:hover::-webkit-slider-thumb {
  background: var(--accent-hover);
}

.slider:active::-webkit-slider-thumb {
  transform: scale(0.96);
}

.slider-ends {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.pace-outputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.pace-outputs p {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pace-outputs output {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
}

.pace-outputs .label {
  color: var(--text-muted);
}

/* 4b. Splits: the printing pace band */

.printer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.printer-slot {
  width: min(26rem, 100%);
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  box-shadow: 0 3px 10px 1px rgb(21 25 28 / 0.35);
  position: relative;
  z-index: 1;
}

.printer-paper {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0 1.5rem 3rem;
  filter: var(--band-shadow);
}

.band--print {
  width: min(22rem, 100%);
  padding-top: 1.5rem;
}

.band--print .fast td:nth-child(2) {
  color: var(--paper-accent);
  font-weight: 700;
}

.band .tag {
  font-family: var(--font-body);
  font-stretch: 100%;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(21 25 28 / 0.6);
}

.band .halfway th {
  position: relative;
  padding: 0.75rem 0;
  text-align: center;
  border-bottom: 0;
}

.band .halfway th::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px dashed var(--paper-accent);
  transform-origin: left center;
}

.halfway-pill {
  position: relative;
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--paper-accent);
  color: #ffffff;
  font-family: var(--font-body);
  font-stretch: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.band tfoot th,
.band tfoot td {
  border-top: 3px double var(--ink);
  border-bottom: 0;
  padding-top: 0.5rem;
  font-weight: 800;
}

.band .adds-up {
  font-family: var(--font-body);
  font-stretch: 100%;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--paper-success);
}

.total th,
.total td {
  transform-origin: center;
}

@media (max-width: 899px) {
  .printer-paper {
    padding: 0 0 1.5rem;
  }
}

@media (max-width: 479px) {
  .band--print {
    padding-inline: 0.875rem;
  }

  .band--print table {
    font-size: 0.9375rem;
  }
}

/* 4c. Week */

.week-head {
  color: var(--text-muted);
}

.bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 0;
}

.bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 13rem;
  min-width: 0;
}

.bar-km {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.bar-fill {
  width: 100%;
  max-width: 2.75rem;
  height: calc(var(--h) * 9rem);
  border-radius: 8px 8px 2px 2px;
  transform-origin: bottom;
}

.bar--long .bar-fill {
  background: var(--accent);
}

.bar--workout .bar-fill {
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}

.bar--easy .bar-fill {
  background: var(--border-strong);
}

.bar--rest .bar-fill {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.bar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-strong);
  width: 100%;
  font-weight: 600;
  line-height: 1.2;
}

.bar-type {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.meter {
  margin-top: 1.5rem;
}

.meter-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.meter-text strong {
  font-size: 1.375rem;
  color: var(--text);
}

.meter-track {
  position: relative;
  height: 10px;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: var(--surface-sunken);
  box-shadow: inset 0 0 0 1px var(--border);
}

.meter-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--success);
  transform: scaleX(var(--v));
  transform-origin: left;
}

.meter-cap {
  position: absolute;
  right: -1px;
  top: -6px;
  bottom: -6px;
  border-left: 2px dashed var(--text-muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.875rem;
  font-weight: 600;
}

@media (max-width: 479px) {
  .bars {
    gap: 0.25rem;
  }

  .bar-type {
    font-size: 0.6875rem;
  }

  .bar-km {
    font-size: 0.875rem;
  }
}

/* 4d. Build-up */

.stairs {
  position: relative;
  padding-top: 1.75rem;
}

.goal-line {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1.75rem;
  color: var(--text-muted);
  text-align: right;
}

.goal-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1.5px dashed var(--text-muted);
}

.stairs-cols {
  display: grid;
  grid-template-columns: repeat(5, 4.5rem);
  justify-content: center;
  align-items: end;
  gap: 0.75rem;
  height: 17rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  height: calc(var(--h) * 100%);
  padding: 0.75rem 0.25rem;
  border-radius: 12px 12px 4px 4px;
  background: var(--border-strong);
  color: var(--text);
  transform-origin: bottom;
}

.step-col strong {
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.1;
}

.step-col .wk {
  color: inherit;
  opacity: 0.75;
}

.col-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.step-col--cut {
  background: repeating-linear-gradient(
    135deg,
    var(--surface-sunken) 0 6px,
    color-mix(in srgb, var(--border-strong) 45%, var(--surface-sunken)) 6px 8px
  );
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.step-col--goal {
  background: var(--accent);
  color: var(--accent-text);
}

.step-col--goal .col-tag {
  color: inherit;
}

@media (max-width: 479px) {
  .stairs-cols {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    height: 15rem;
  }

  .step-col strong {
    font-size: 1rem;
  }

  .col-tag {
    font-size: 0.625rem;
  }
}

/* ---------- Try it ---------- */

.try-line {
  margin-top: 1rem;
  color: var(--text-muted);
}

.tabs {
  display: none;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.js .tabs {
  display: flex;
}

.tab {
  min-height: 44px;
  min-width: 44px;
  padding: 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 600 0.9375rem/1 var(--font-body);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.tab:hover {
  border-color: var(--border-strong);
}

.tab:active {
  transform: translateY(1px);
}

.tab[aria-selected="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* Phone: all four tabs stay on one row. */
@media (max-width: 479px) {
  .tabs {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }

  .tab {
    flex: 1 1 auto;
    padding: 0 0.625rem;
    font-size: 0.875rem;
  }
}

.frame {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  overflow: hidden;
  box-shadow:
    0 1px 2px rgb(21 25 28 / 0.06),
    0 30px 60px -24px color-mix(in srgb, var(--accent) 12%, transparent),
    0 12px 24px -12px color-mix(in srgb, var(--accent) 12%, transparent);
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 40px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.address {
  margin-inline: auto;
  padding: 0.125rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
  transform: translateX(-24px);
}

.frame iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
  background: var(--bg);
}

@media (max-width: 639px) {
  .frame iframe {
    height: 680px;
  }

  .address {
    transform: none;
  }
}

.full-link {
  margin-top: 1rem;
}

.full-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.25em;
  border-radius: 6px;
}

.full-link a:hover {
  text-decoration-color: currentColor;
}

.full-link a:active {
  transform: translateY(1px);
}

/* ---------- Questions ---------- */

.faq-inner {
  max-width: calc(44rem + 2 * var(--gutter));
}

.faq h2 {
  margin-bottom: 1.5rem;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none;
  border-radius: 6px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text-muted);
}

.faq summary:hover::after {
  color: var(--text);
}

.faq summary:active {
  transform: translateY(1px);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding-bottom: 1.25rem;
  color: var(--text-muted);
}

/* ---------- Closing call to action ---------- */

.closing {
  position: relative;
  overflow: hidden;
  margin-top: calc(var(--section-gap) / 2);
  padding-block: 6rem;
  background: var(--accent);
  color: var(--accent-text);
}

.closing-lanes {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% + 40px);
  height: 100%;
}

.closing-lanes path {
  fill: none;
  stroke: var(--accent-text);
  stroke-opacity: 0.12;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.closing-inner {
  position: relative;
}

.closing h2 {
  font-weight: 900;
  font-size: clamp(2.5rem, 1.5rem + 5vw, 4.75rem);
  max-width: 14ch;
}

.closing p {
  margin-top: 1.25rem;
  font-size: 1.125rem;
}

.btn--inverse {
  margin-top: 2rem;
  min-height: 56px;
  padding: 0 1.75rem;
  background: var(--accent-text);
  color: var(--accent);
  font-size: 1.0625rem;
}

.btn--inverse:hover {
  background: color-mix(in srgb, var(--accent-text) 90%, var(--accent));
}

.btn--inverse:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand--small {
  justify-content: center;
}

.brand--small .logo {
  width: 22px;
  height: 22px;
}

/* ---------- Motion: only when the visitor allows it ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .btn--primary:hover .arrow {
    transform: translateX(3px);
  }

  .faq summary::after {
    transition: transform 200ms var(--ease);
  }

  /* Hero planes rise into place, 80 ms apart. Pure CSS, so it also runs without JS. */
  .track {
    animation: fade-in 600ms var(--ease) both;
  }

  .enter--band {
    animation: band-in 800ms var(--ease) 80ms both;
  }

  .enter--chip {
    animation: chip-in 700ms var(--ease) 160ms both;
  }

  /* Scroll parallax: each plane drifts at its own rate, clamped to 60 px. */
  @supports (animation-timeline: scroll()) {
    .plane {
      animation: drift linear both;
      animation-timeline: scroll(root block);
    }

    .plane--track {
      animation-range: 0px 400px; /* 0.15 x scroll */
    }

    .plane--band {
      animation-range: 0px 171px; /* 0.35 x scroll */
    }

    .plane--chip {
      animation-range: 0px 109px; /* 0.55 x scroll */
    }
  }

  /* How it works: the lane draws, then the lap markers fill one by one. */
  .motion .how .lane--across line {
    transition: stroke-dashoffset 900ms var(--ease);
  }

  .motion .how:not(.is-in) .lane--across line {
    stroke-dashoffset: 1;
  }

  .motion .how .step-num {
    transition:
      background-color 300ms ease,
      color 300ms ease;
  }

  .motion .how .step:nth-child(2) .step-num {
    transition-delay: 150ms;
  }

  .motion .how .step:nth-child(3) .step-num {
    transition-delay: 300ms;
  }

  .motion .how:not(.is-in) .step-num {
    background: var(--surface);
    color: var(--text);
  }

  /* Week: bars grow from the baseline, then the meter fills. */
  .motion .week-card .bar-fill {
    transition: transform 500ms var(--ease) calc(var(--i) * 60ms);
  }

  .motion .week-card:not(.is-in) .bar-fill {
    transform: scaleY(0);
  }

  .motion .week-card .meter-fill {
    transition: transform 700ms var(--ease) 860ms;
  }

  .motion .week-card:not(.is-in) .meter-fill {
    transform: scaleX(0);
  }

  /* Build-up: columns rise in sequence, the goal lands last with a settle. */
  .motion .stairs-card:not(.is-in) .step-col {
    opacity: 0;
    transform: scaleY(0.2);
  }

  .motion .stairs-card.is-in .step-col {
    animation: rise 520ms var(--ease) calc(var(--i) * 90ms) both;
  }

  .motion .stairs-card.is-in .step-col--goal {
    animation-name: rise-settle;
    animation-duration: 700ms;
  }

  /* Try it: the frame rises once. */
  .motion .frame {
    transition:
      opacity 600ms var(--ease),
      translate 600ms var(--ease);
  }

  .motion .frame:not(.is-in) {
    opacity: 0;
    translate: 0 24px;
  }

  /* Closing band: the lane lines slide left as it scrolls through. */
  @supports (animation-timeline: view()) {
    .closing-lanes {
      animation: lanes-slide linear both;
      animation-timeline: view();
    }
  }
}

/* Splits on phones (or narrow windows): the whole band fades in once as a block. */
@media (prefers-reduced-motion: no-preference) and (max-width: 899px) {
  /* The phone crop is only 22rem tall, so parallax would push the band's title out of the box. */
  .plane {
    animation: none;
  }

  .motion .splits .band--print {
    transition: opacity 600ms var(--ease);
  }

  .motion .splits:not(.is-in) .band--print {
    opacity: 0;
  }
}

/* Splits on desktop: the section pins and the band prints row by row with scroll. */
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .motion .splits-stage {
    min-height: 220vh;
    align-items: start;
  }

  /* The copy pins beside the band while it prints; both release when the total stamps in. */
  .motion .splits-stage .feature-copy {
    position: sticky;
    top: 30vh;
    padding-top: 0;
  }

  .motion .splits-figure {
    position: sticky;
    top: 15vh;
  }

  /* Fallback: main.js sets --p (0..1) on the section; each row reads its own slice. */
  @supports not (animation-timeline: view()) {
    .motion .splits .pr {
      --r: clamp(0, (var(--p, 0) * 100 + 12 - var(--i) * 6.5) / 8, 1);
      opacity: var(--r);
      transform: translateY(calc((1 - var(--r)) * 8px));
    }

    .motion .splits .halfway th::before {
      transform: scaleX(var(--r));
    }

    .motion .splits .total th,
    .motion .splits .total td {
      transform: scale(calc(1.04 - var(--r) * 0.04));
    }

    .motion .splits .band--print {
      transform: translateY(calc((1 - min(var(--p, 0) * 1.25, 1)) * -12px));
    }
  }

  @supports (animation-timeline: view()) {
    .motion .splits-stage {
      view-timeline: --print block;
    }

    .motion .splits .pr,
    .motion .splits .halfway th::before,
    .motion .splits .total th,
    .motion .splits .total td,
    .motion .splits .band--print {
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --print;
    }

    .motion .splits .pr {
      animation-name: row-in;
      animation-range: cover calc(18% + var(--i) * 4.5%) cover
        calc(23% + var(--i) * 4.5%);
    }

    .motion .splits .halfway th::before {
      animation-name: draw;
      animation-range: cover calc(18% + var(--i) * 4.5%) cover
        calc(23% + var(--i) * 4.5%);
    }

    .motion .splits .total th,
    .motion .splits .total td {
      animation-name: stamp;
      animation-range: cover calc(18% + var(--i) * 4.5%) cover
        calc(23% + var(--i) * 4.5%);
    }

    .motion .splits .band--print {
      animation-name: feed;
      animation-range: contain 0% contain 80%;
    }
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes band-in {
  from {
    opacity: 0;
    transform: translateY(24px) rotate(-4deg);
  }
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes drift {
  to {
    translate: 0 -60px;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: scaleY(0.2);
  }
}

@keyframes rise-settle {
  0% {
    opacity: 0;
    transform: scaleY(0.2);
  }
  70% {
    opacity: 1;
    transform: scale(1.03);
  }
  100% {
    transform: none;
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes draw {
  from {
    transform: scaleX(0);
  }
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
}

@keyframes feed {
  from {
    transform: translateY(-12px);
  }
}

@keyframes lanes-slide {
  to {
    translate: -40px 0;
  }
}
