/* RaceTrain — racetrain.ai
   World: the app's own (qualifier/src/lib/theme.ts). Icon field volt→green→cyan,
   race-kit gradients, heavy italic numerals set like a bib, and the pace band:
   the paper wristband every marathoner tapes their splits to. */

@font-face { font-family: "Archivo"; src: url("/fonts/archivo-vf.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-vf-italic.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap; }

:root {
  --blue: #1f74ea;
  --gold: #ffc933;
  --deep-gold: #e9a800;
  --forest: #05110e;
  --forest-2: #0e1e1a;
  --ink: #06291c;
  --ink-2: #3c5a4f;
  --ink-3: #5e7a70;
  --paper: #ffffff;
  --mist: #eef4f1;
  --line: #d6e2dc;
  --volt: #c6ff00;
  --green: #22c55e;
  --cyan: #0ea5e9;
  --red: #e11d48;
  --field: linear-gradient(135deg, #c6ff00 0%, #22c55e 50%, #0ea5e9 100%);
  --kit-run: linear-gradient(135deg, #ffe14d 0%, #ffb000 50%, #ff7a00 100%);
  --kit-bike: linear-gradient(135deg, #d4ff3a 0%, #22c55e 100%);
  --kit-swim: linear-gradient(135deg, #22d3ee 0%, #2563eb 100%);
  --kit-strength: linear-gradient(135deg, #ff4d6d 0%, #c8103b 100%);
  --kit-rest: linear-gradient(135deg, #1f4a3f 0%, #0b2620 100%);
  --kit-gold: linear-gradient(135deg, #fff6c2 0%, #ffc933 50%, #d98e04 100%);
  --stripes: linear-gradient(45deg, transparent 63%, rgba(255,255,255,.2) 63%, rgba(255,255,255,.2) 69%, transparent 69%, transparent 72%, rgba(255,255,255,.14) 72%, rgba(255,255,255,.14) 77%, transparent 77%, transparent 80%, rgba(255,255,255,.08) 80%, rgba(255,255,255,.08) 84%, transparent 84%);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1180px;
  --nav-h: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--paper);
  font-variation-settings: "wdth" 100; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--forest); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: #9fb6ad transparent; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.display { font-style: italic; font-weight: 900; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }
.num { font-style: italic; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--forest); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ═══ Buttons ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font-size: 17px; font-weight: 850; font-style: italic; letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms, box-shadow 160ms;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn--ink { background: var(--forest); color: #fff; box-shadow: 0 14px 28px -16px rgba(5,17,14,.9); }
.btn--line { border-color: rgba(6,41,28,.25); color: var(--ink); background: transparent; }
.btn--gold { background: var(--gold); color: var(--forest); box-shadow: 0 14px 30px -14px rgba(233,168,0,.8); }
@media (hover: hover) and (pointer: fine) {
  .btn--ink:hover { background: #12352a; }
  .btn--line:hover { border-color: var(--ink); }
  .btn--gold:hover { background: #ffd65c; }
}

/* ═══ Nav ═══ */
.nav {
  position: sticky; top: 0; z-index: 30; height: var(--nav-h);
  background: rgba(255,255,255,.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(6,41,28,.08);
}
.nav__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav__logo img { height: 22px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 700; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--ink-2); }
.nav__links a:not(.btn):hover { color: var(--ink); }
.nav__links .btn { min-height: 40px; padding: 0 18px; font-size: 15px; }
@media (max-width: 760px) { .nav__links a:not(.btn) { display: none; } }

/* ═══ Hero ═══ */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 8vw, 104px); }
.hero__field {
  position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: 54%;
  background: var(--field); clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}
.hero__field::after { content: ""; position: absolute; inset: 0; background: var(--stripes); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__logo { width: min(100%, 420px); height: auto; }
.hero h1 { margin-top: 28px; font-size: clamp(44px, 6.2vw, 86px); color: var(--forest); }
.hero__sub { margin-top: 20px; max-width: 34ch; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); font-weight: 520; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 700; color: var(--ink-3); }
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { width: 16px; height: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(225,29,72,.18); }

/* ═══ The pace band ═══ */
.bandstage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; min-width: 0; }
.band {
  position: relative; width: min(100%, 440px); transform: rotate(-3deg);
  background: #fff; color: var(--forest); border-radius: 10px;
  box-shadow: 0 2px 0 rgba(6,41,28,.06), 0 36px 60px -28px rgba(5,17,14,.75), 0 12px 24px -12px rgba(5,17,14,.35);
  padding: 18px 20px 16px;
}
.band::before, .band::after { /* perforated tear edges */
  content: ""; position: absolute; left: 10px; right: 10px; height: 6px;
  background: radial-gradient(circle at 3px 3px, rgba(6,41,28,.22) 1.6px, transparent 2px) 0 0 / 10px 6px repeat-x;
}
.band::before { top: 6px; }
.band::after { bottom: 6px; }
.band__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 8px 0 12px; border-bottom: 2px solid var(--forest); }
.band__head img { height: 17px; width: auto; }
.band__goal { text-align: right; line-height: 1.05; }
.band__goal b { display: block; font-size: 30px; }
.band__goal span { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.band__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: column; column-gap: 18px; margin-top: 8px; }
.band__cols.one { grid-template-columns: 1fr; }
.band__row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 6px;
  padding: 3px 0; border-bottom: 1px dashed rgba(6,41,28,.14); font-size: 14px;
  animation: printRow 420ms var(--ease-out) both;
}
.band__row b { font-style: italic; font-weight: 900; font-variant-numeric: tabular-nums; }
.band__row .m { font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.band__row .p { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 650; font-size: 13px; }
.band__row.half { background: linear-gradient(90deg, rgba(255,201,51,.35), rgba(255,201,51,0)); border-radius: 4px; }
.band__row.fin b { color: var(--blue); }
@keyframes printRow { from { opacity: 0; transform: translateY(-4px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.band__foot { margin-top: 10px; display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 750; color: var(--ink-3); }
.band__foot b { color: var(--deep-gold); font-style: normal; }

.bandctl {
  width: min(100%, 440px); background: rgba(5,17,14,.9); color: #fff; border-radius: 20px; padding: 14px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; box-shadow: 0 20px 40px -24px rgba(5,17,14,.9);
}
.bandctl__label { font-size: 13px; font-weight: 800; color: rgba(255,255,255,.72); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: rgba(255,255,255,.08); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 8px 4px; font-size: 14px; font-weight: 800; font-style: italic; color: rgba(255,255,255,.8); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--forest); }
.goalrow { display: flex; align-items: center; gap: 10px; }
.goalrow label { font-size: 13px; font-weight: 800; color: rgba(255,255,255,.72); white-space: nowrap; }
.goalrow input {
  flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06);
  padding: 0 12px; font-size: 20px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; color: #fff; caret-color: var(--gold);
}
.goalrow input:focus { outline: none; border-color: var(--gold); }
.goalrow input[aria-invalid="true"] { border-color: #ff6b81; }
.bandctl__err { font-size: 13px; color: #ffb3c0; min-height: 0; }
.bandctl__note { font-size: 12px; color: rgba(255,255,255,.55); }

/* ═══ Sections: each heading is a band row ═══ */
.sec { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.sec--mist { background: var(--mist); }
.sec--dark { background: var(--forest); color: #fff; }
.sec--field { background: var(--field); position: relative; isolation: isolate; }
.sec--field::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--stripes); }
.split {
  display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 14px 22px;
  padding-bottom: 18px; border-bottom: 3px solid currentColor; margin-bottom: clamp(32px, 4vw, 52px);
}
.split__no { font-size: clamp(54px, 7vw, 96px); line-height: .82; font-style: italic; font-weight: 900; color: var(--blue); font-variant-numeric: tabular-nums; }
.sec--dark .split__no { color: var(--gold); }
.sec--field .split__no { color: var(--forest); }
.split h2 { font-size: clamp(34px, 4.6vw, 62px); }
.split__time { grid-column: 2; font-size: 15px; font-weight: 750; color: var(--ink-3); }
.sec--dark .split__time { color: rgba(255,255,255,.62); }
.sec--field .split__time { color: rgba(6,41,28,.78); }
.two { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; max-width: 44ch; color: var(--ink-2); }
.sec--dark .lede { color: rgba(255,255,255,.78); }
.sec--field .lede { color: rgba(6,41,28,.86); }
.lede + .lede { margin-top: 16px; }
.example { margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.sec--dark .example { color: rgba(255,255,255,.5); }

/* Race search demo */
.search { background: var(--forest); color: #fff; border-radius: 24px; padding: 18px; box-shadow: 0 30px 60px -36px rgba(5,17,14,.9); }
.search__field { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-radius: 14px; background: rgba(255,255,255,.08); font-size: 18px; font-weight: 650; }
.search__field svg { width: 20px; height: 20px; color: rgba(255,255,255,.6); flex: none; }
.search__typed::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -3px; background: var(--gold); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.search__status { margin: 12px 4px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.6); min-height: 1.4em; }
.race {
  position: relative; overflow: hidden; border-radius: 20px; padding: 20px; color: #10140a; background: var(--kit-run);
  opacity: 0; transform: translateY(10px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out);
}
.race.in { opacity: 1; transform: none; }
.race::before { content: ""; position: absolute; inset: 0; background: var(--stripes); pointer-events: none; }
.race__name { position: relative; font-size: 26px; }
.race__where { position: relative; margin-top: 2px; font-weight: 750; opacity: .8; }
.race__facts { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.race__facts div { background: rgba(255,255,255,.35); border-radius: 12px; padding: 10px; }
.race__facts b { display: block; font-size: 22px; }
.race__facts span { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.race__note { position: relative; margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; font-weight: 750; font-size: 15px; }
.race__note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.distances { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.distances span { padding: 7px 13px; border-radius: 999px; background: var(--mist); font-weight: 850; font-style: italic; font-size: 14px; }

/* Week fit demo */
.weekctl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.weekctl button { border: 2px solid rgba(6,41,28,.18); background: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 800; font-size: 15px; cursor: pointer; }
.weekctl button[aria-pressed="true"] { background: var(--forest); color: #fff; border-color: var(--forest); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { display: grid; gap: 6px; }
.day__name { text-align: center; font-size: 12px; font-weight: 850; letter-spacing: .06em; color: var(--ink-3); }
.day__life { min-height: 34px; border-radius: 10px; font-size: 11px; font-weight: 800; line-height: 1.15; display: grid; place-items: center; text-align: center; padding: 4px; color: var(--ink-2); background: repeating-linear-gradient(45deg, rgba(6,41,28,.07) 0 6px, transparent 6px 12px); }
.day__life:empty { background: none; }
.sess {
  position: relative; overflow: hidden; border-radius: 14px; min-height: 104px; padding: 10px 8px; color: #10140a;
  display: grid; align-content: space-between;
}
.sess::before { content: ""; position: absolute; inset: 0; background: var(--stripes); }
.sess > * { position: relative; }
.sess b { font-size: 13px; font-weight: 900; font-style: italic; line-height: 1.1; }
.sess span { font-size: 18px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; }
.sess--run { background: var(--kit-run); }
.sess--long { background: var(--kit-gold); }
.sess--bike { background: var(--kit-bike); }
.sess--strength { background: var(--kit-strength); color: #fff; }
.sess--rest { background: var(--kit-rest); color: #fff; }
.sess--rest span { font-size: 13px; opacity: .7; }
.weeknote { margin-top: 16px; font-weight: 750; color: var(--ink-2); min-height: 1.5em; }

/* Coach chat demo */
.chat { background: var(--forest-2); border: 1px solid rgba(255,255,255,.08); border-radius: 28px; padding: 20px; display: grid; gap: 12px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9); }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 20px; font-size: 16px; line-height: 1.45; }
.msg--me { justify-self: end; background: var(--kit-gold); color: #2a1a00; border-bottom-right-radius: 6px; }
.msg--coach { justify-self: start; background: rgba(255,255,255,.07); color: #fff; border-bottom-left-radius: 6px; }
.prop { border: 1.5px solid rgba(255,201,51,.45); border-radius: 18px; padding: 14px; display: grid; gap: 10px; background: #0a1915; transition: border-color 200ms; }
.prop__what { display: flex; gap: 10px; align-items: flex-start; font-weight: 800; color: #fff; }
.prop__what svg { width: 20px; height: 20px; color: var(--gold); flex: none; margin-top: 1px; }
.prop__acts { display: flex; gap: 8px; }
.prop__acts button { flex: 1; height: 42px; border-radius: 999px; border: 0; font-weight: 850; font-style: italic; cursor: pointer; }
.prop__yes { background: var(--gold); color: var(--forest); }
.prop__no { background: rgba(255,255,255,.08); color: #fff; }
.prop__res { font-size: 14px; color: rgba(255,255,255,.7); }
.prop[data-state="applied"] { border-color: #34e07a; }
.prop[data-state="applied"] .prop__what svg { color: #34e07a; }
.prop[data-state="dismissed"] { opacity: .55; }

/* Rules */
.rules { display: grid; gap: 0; margin-top: -20px; }
.rule { display: grid; grid-template-columns: minmax(150px, 0.34fr) 1fr; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px dashed rgba(6,41,28,.25); }
.rule__n { font-size: clamp(44px, 5.4vw, 76px); line-height: .9; color: var(--blue); }
.rule h3 { font-size: clamp(20px, 2vw, 26px); font-style: italic; font-weight: 900; letter-spacing: -.015em; }
.rule p { margin-top: 4px; color: var(--ink-2); max-width: 60ch; }
.proof { margin-top: 28px; display: flex; gap: 14px; align-items: center; font-weight: 750; color: var(--ink-2); }
.proof b { color: var(--forest); font-style: italic; font-weight: 900; font-size: 22px; }

/* Watch */
.watch { width: 250px; justify-self: center; }
.watch__case { border-radius: 64px; padding: 14px; background: linear-gradient(160deg, #3b4744, #0c1311 60%); box-shadow: 0 50px 70px -40px rgba(5,17,14,.95), inset 0 1px 0 rgba(255,255,255,.18); }
.watch__screen { border-radius: 52px; background: #000; color: #fff; padding: 30px 22px 26px; text-align: center; aspect-ratio: 0.82; display: grid; align-content: center; gap: 4px; }
.watch__zone { font-size: 13px; font-weight: 900; letter-spacing: .14em; color: var(--volt); }
.watch__pace { font-size: 62px; line-height: .95; color: var(--volt); }
.watch__unit { font-size: 12px; color: rgba(255,255,255,.6); font-weight: 650; }
.watch__stats { margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.watch__stats b { display: block; font-size: 17px; font-style: italic; font-weight: 900; font-variant-numeric: tabular-nums; }
.watch__stats span { font-size: 9px; color: rgba(255,255,255,.55); font-weight: 700; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; font-weight: 850; font-style: italic; }
.flow__group { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flow__group > span { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.55); color: var(--forest); }
.flow svg { width: 18px; height: 18px; color: var(--forest); }

/* Race day */
.rd { display: grid; margin-top: -20px; }
.rd__row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px dashed rgba(6,41,28,.25); align-items: baseline; }
.rd__row h3 { font-style: italic; font-weight: 900; font-size: 22px; letter-spacing: -.015em; }
.rd__row p { color: var(--ink-2); max-width: 62ch; }

/* Finish */
.finish { background: var(--forest); color: #fff; padding: clamp(80px, 11vw, 140px) 0; position: relative; overflow: hidden; isolation: isolate; }
.finish::before { content: ""; position: absolute; inset: auto -10% -40% -10%; height: 70%; z-index: -1; background: radial-gradient(60% 60% at 50% 100%, rgba(34,197,94,.28), transparent 70%); }
.finish__grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.medal { width: clamp(160px, 20vw, 240px); }
.finish h2 { font-size: clamp(40px, 5.4vw, 72px); }
.finish .lede { color: rgba(255,255,255,.78); margin-top: 16px; }
.beta { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 620px; }
.beta label { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: rgba(255,255,255,.7); }
.beta input { height: 52px; border-radius: 14px; border: 2px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); padding: 0 14px; font-size: 17px; font-weight: 600; color: #fff; caret-color: var(--gold); }
.beta input::placeholder { color: rgba(255,255,255,.45); }
.beta input:focus { outline: none; border-color: var(--gold); }
.beta .full { grid-column: 1 / -1; }
.beta .btn { justify-self: start; }
.beta__msg { grid-column: 1 / -1; font-size: 14px; font-weight: 700; min-height: 1.4em; color: rgba(255,255,255,.75); }
.launch { margin-top: 20px; font-weight: 800; color: var(--gold); font-style: italic; }

/* Footer */
.foot { background: #020806; color: rgba(255,255,255,.7); padding: 44px 0; font-size: 14px; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot img { height: 20px; width: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { text-decoration: none; color: rgba(255,255,255,.82); }
.foot a:hover { color: #fff; text-decoration: underline; }

/* Legal pages */
.legal { padding: 56px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(40px, 6vw, 64px); color: var(--forest); }
.legal .updated { margin-top: 8px; color: var(--ink-3); font-weight: 700; }
.legal h2 { margin-top: 40px; font-size: 24px; font-style: italic; font-weight: 900; letter-spacing: -.015em; color: var(--forest); }
.legal h3 { margin-top: 22px; font-size: 18px; font-weight: 850; }
.legal p, .legal li { margin-top: 12px; color: var(--ink-2); max-width: 70ch; }
.legal ul { padding-left: 1.2em; }
.legal strong { color: var(--forest); }

/* Reveal: visible by default; only enhance when JS says motion is OK */
.js-motion [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); }
.js-motion [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .band__row, .race { animation: none !important; transition: none !important; }
  .js-motion [data-reveal] { opacity: 1; transform: none; }
}

/* ═══ Responsive ═══ */
@media (max-width: 960px) {
  .hero__grid, .two, .finish__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__field { width: 100%; top: auto; height: 62%; clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%); }
  .hero h1 { margin-top: 22px; }
  .band { transform: rotate(-2deg); }
  .finish__grid { justify-items: start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .sess { min-height: 92px; padding: 7px 5px; border-radius: 10px; }
  .sess b { font-size: 10.5px; }
  .sess span { font-size: 14px; }
  .day__life { font-size: 9px; }
  .rule, .rd__row { grid-template-columns: 1fr; gap: 6px; }
  .beta { grid-template-columns: 1fr; }
  .race__facts { grid-template-columns: 1fr 1fr; }
  .band { padding: 16px 14px 14px; }
  .band__cols { grid-template-columns: minmax(0, 1fr); grid-template-rows: none !important; grid-auto-flow: row; }
  .band__row { grid-template-columns: 38px 1fr auto; font-size: 14px; }
  .band__goal b { font-size: 24px; }
  .hero h1 { font-size: clamp(38px, 11vw, 48px); }
  .seg button { font-size: 13px; }
  .split { grid-template-columns: 1fr; }
  .split__time { grid-column: 1; }
}
