/* JeetLo landing v2, the home page while LANDING_V2 = "1" (JL-3483; design JL-3457, bsk-opus, content version 3dbd76a17dc7c92a).
   Tokens: jeetlo-brand v3 cinema-light (paper) and cinema (dark), copied unchanged from the approved-for-review prototype.
   Body: one family (Inter). Headlines (h1, h2, h3): Space Grotesk, the brand display face. Both self-hosted from
   /fonts/v3/ (the same files as the prototype, byte for byte), SIL OFL. No third-party font.
   Fix round 2 (JL-3484, ported in JL-3493 from content version 0ebf3e98df687b43): the guess is the first screen's only
   action (the primary moves to after the result), a quiet header link, two columns from 1024 px, balanced headings, and
   no green on the chosen answer (ink and neutral). */
@font-face { font-family: "Inter"; src: url("/fonts/v3/inter.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/v3/space-grotesk.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f1e9dc; --surface: #f7f1e6; --surface-2: #ece2d1;
  --ink: #141a2a; --ink-2: #2d3446; --muted: #6a6352;
  --line: #ddd1bd; --hair: rgba(20, 26, 42, 0.14);
  --brand: #e2550f; --brand-fill: #af4616; --brand-text: #a44317; --on-brand: #fff8f0;
  --physics: #1f5fd6; --good: #186b3e; --bad: #b3261e;
  --head: #af4616; --chest: #1f5fd6;
  --drop: 31, 95, 214; --drop-a: 0.30;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --col: 640px; --wide: 960px; --page: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0c0f; --surface: #10141a; --surface-2: #161b23;
    --ink: #f1f3f4; --ink-2: #c9ced6; --muted: #8b95a3;
    --line: #232a35; --hair: rgba(241, 243, 244, 0.12);
    --brand: #ff8c1a; --brand-fill: #ff8c1a; --brand-text: #ff8c1a; --on-brand: #1a0f00;
    --physics: #4d8dff; --good: #22c55e; --bad: #f87171;
    --head: #ff8c1a; --chest: #4d8dff;
    --drop: 77, 141, 255; --drop-a: 0.34;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

/* The rain: the reel's model, falling across the page behind everything (drawn by v2.js). */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bar, main, .foot { position: relative; z-index: 1; }

.bar { max-width: var(--wide); margin: 0 auto; padding: var(--s4) var(--s5); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.bar .home { display: inline-flex; align-items: center; min-height: 48px; line-height: 0; }
/* The quiet way in for people ready now: a text link, not a button (ruling 2). */
.bar-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s1); color: var(--ink-2); font-weight: 600; text-decoration: underline; text-decoration-color: var(--hair); }
.bar-link:hover { color: var(--ink); text-decoration-color: currentColor; }
.bar .home img { height: 28px; width: auto; display: block; }

main { max-width: var(--wide); margin: 0 auto; padding: 0 var(--s5); }
main > section, main > .answer, main > .next, .top > .hero { max-width: var(--col); }

h1, h2, h3 { font-family: var(--display); }
h1 {
  font-size: clamp(40px, 9.2vw, 76px); line-height: 1.02; font-weight: 600; letter-spacing: -0.03em;
  margin: var(--s7) 0 var(--s4); text-wrap: balance; max-width: 14ch;
}
h2 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 var(--s5); text-wrap: balance; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 600; margin: 0 0 var(--s2); text-wrap: balance; }
p { margin: 0 0 var(--s3); }
.lede { font-size: 20px; line-height: 1.45; color: var(--ink-2); margin-bottom: var(--s6); max-width: 30ch; }
.muted, .src, .note, .hint { color: var(--muted); }
.tag { display: inline-block; color: var(--muted); border: 1px solid var(--hair); border-radius: 6px; padding: 0 var(--s2); line-height: 1.6; }
.kicker { display: flex; gap: var(--s2); align-items: center; color: var(--muted); margin-bottom: var(--s3); font-weight: 600; }
.kicker .tag { font-weight: 400; }

/* The guess: one row, Linear-precise segments. The first tap commits. */
.guess { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s2); margin: 0 0 var(--s3); }
.guess.stack { grid-auto-flow: row; }
@media (min-width: 768px) { .guess.stack { grid-template-columns: 1fr 1fr; } }
.pick {
  appearance: none; min-height: 56px; padding: var(--s3) var(--s4); border-radius: 12px; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--hair);
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em; text-align: center;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.guess.stack .pick { text-align: left; font-size: 16px; }
.pick:hover:not(:disabled) { border-color: var(--ink-2); }
.pick:active:not(:disabled) { transform: scale(0.98); }
.pick:disabled { cursor: default; }
.pick[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* Fix round 2 (ruling 7): no green. The right answer gets an ink frame and a tick; the chosen one stays ink. */
.pick.right { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.guess:not(.stack) .pick { padding-left: var(--s2); padding-right: var(--s2); white-space: nowrap; } /* "Day 29" plus its tick stays on one line at 390 */
.pick .ok { display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.35em; vertical-align: -0.05em; stroke: currentColor; }
.hint { margin: 0 0 var(--s6); min-height: 1.6em; }
.hint strong, strong { color: var(--ink); font-weight: 600; }

/* One primary action: Get early access. Nothing is sticky over content. */
.act { margin: 0 0 var(--s4); }
.primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 var(--s5);
  border: 0; border-radius: 12px; background: var(--brand-fill); color: var(--on-brand);
  font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), filter 160ms var(--ease);
}
.primary:hover { filter: brightness(1.06); }
.primary:active { transform: scale(0.98); }
.quiet {
  appearance: none; background: none; border: 1px solid var(--hair); border-radius: 12px; min-height: 48px;
  padding: 0 var(--s4); font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
}

/* The street: scrolling is the model's clock. Fix round 1 (JL-3471): no sticky stage and no empty scroll band.
   The clock runs while the whole street is on screen, from the moment its bottom edge comes into view until its
   top reaches the top of the screen, so at every scroll position the street, its counters and the clock rail show. */
.hero { padding-bottom: var(--s6); }
.street { max-width: none !important; position: relative; padding: 0 0 var(--s6); }
.stage { position: static; padding: var(--s4) 0 0; }
.timer { margin: 0 0 var(--s4); }
.timer-top { min-height: 1.6em; display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; font-variant-numeric: tabular-nums; margin: 0 0 var(--s2); }
.timer-top .now { font-weight: 600; color: var(--ink); }
.timer-top .of { color: var(--muted); }
.rail { position: relative; height: 6px; border-radius: 3px; background: var(--hair); overflow: hidden; }
.rail i { position: absolute; inset: 0; background: var(--brand-fill); transform-origin: 0 50%; transform: scaleX(0); }
.rail b { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bg); }
.clock { color: var(--muted); margin: var(--s2) 0 0; font-variant-numeric: tabular-nums; }

/* Drawings from each reel's own model. Text keeps its page size at any width (font sizes divide by --k). */
.reel svg { --k: 1; display: block; width: 100%; height: auto; overflow: visible; }
.reel svg text { text-rendering: geometricPrecision; font-variant-numeric: tabular-nums; }
.reel svg [hidden] { display: none; }
.reel .lane-label { font: 600 calc(16px / var(--k)) var(--font); fill: var(--ink-2); }
.reel .num { font: 600 calc(28px / var(--k)) var(--font); fill: var(--ink); letter-spacing: -0.02em; }
.reel .unit, .reel .tick { font: 400 calc(16px / var(--k)) var(--font); fill: var(--muted); }
.reel .val { font: 600 calc(16px / var(--k)) var(--font); fill: var(--ink); }
.reel .axis { stroke: var(--line); stroke-width: 2; }
.reel .edge { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
.reel .drop { stroke: var(--physics); stroke-opacity: 0.45; stroke-width: 2; stroke-linecap: round; }
.reel .person { fill: var(--ink); }
.reel .person .legs { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.reel .seg-head { fill: var(--head); }
.reel .seg-chest { fill: var(--chest); }
.reel .k-head { fill: var(--head); font-weight: 600; }
.reel .k-front { fill: var(--chest); font-weight: 600; }
.reel .car { fill: var(--ink); }
.reel .shape { fill: var(--ink); stroke: var(--ink); }
.reel .shape.ring { fill: none; }
.reel .book { fill: var(--surface-2); stroke: var(--ink-2); stroke-width: 1.5; }
.reel .table { fill: var(--line); }
.reel .reach { stroke: var(--ink); stroke-width: 1.5; fill: none; }
/* Fix round 3 (JL-3502, lead's ruling): the covered pond is ink, not green, so no fourth hue appears (ink, orange, blue). */
.reel .cell { fill: var(--ink); }
.reel .water { fill: var(--physics); fill-opacity: 0.10; }
.reel .speck { fill: var(--ink); }
.reel .pond { fill: none; stroke: var(--line); stroke-width: 2; }
.reel .pond-cap { display: flex; justify-content: space-between; gap: var(--s3); margin: var(--s2) 0 0; font: 400 16px/1.4 var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.reel .pond-day { font-weight: 600; color: var(--ink); }
.reel .ml { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; fill: none; }
.reel .fin { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; fill: none; transition: opacity 600ms var(--ease); }
.reel .rule { stroke: var(--brand); stroke-width: 2; }
.reel .rule-t { font: 600 calc(16px / var(--k)) var(--font); fill: var(--brand-text); }

.answer { padding: 0 0 var(--s6); }
.answer .verdict { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; margin-bottom: var(--s4); text-wrap: balance; }
.next { margin: 0 0 var(--s7); }
.answer .said { font-weight: 600; }
.reveal-in { animation: rise 520ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* After the rain answer (fix round 1, audience findings): the wind, how it works, the share card. */
.more { padding: 0 0 var(--s7); max-width: var(--col); }
.more > * + * { margin-top: var(--s6); }
.wind h3, .card h3 { font-size: 20px; }
.wind label { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; font-weight: 600; margin: 0 0 var(--s1); }
.wind output { font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wind input[type="range"] { width: 100%; height: 48px; margin: 0; accent-color: var(--brand-fill); cursor: pointer; }
.wind .ends { display: flex; justify-content: space-between; color: var(--muted); margin: 0 0 var(--s4); }
.wind .reel { margin: 0 0 var(--s3); }
.wind .says { font-weight: 600; }
.reel .curve { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.reel .grid { stroke: var(--hair); stroke-width: 1; }
.reel .dot { stroke: var(--bg); stroke-width: 2; }
.reel .dot.walk { fill: var(--muted); }
.reel .dot.run { fill: var(--chest); }
.reel .dot.best { fill: var(--brand); }
.reel .k-best { fill: var(--brand-text); font-weight: 600; }
.how summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; color: var(--ink); }
.how .formula { font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--hair); border-radius: 12px; padding: var(--s3) var(--s4); overflow-x: auto; }
.how dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--s1) var(--s3); margin: var(--s3) 0; }
.how dt { font-weight: 600; font-variant-numeric: tabular-nums; }
.how dd { margin: 0; color: var(--ink-2); }
.card { border: 1px solid var(--hair); border-radius: 16px; padding: var(--s5); background: color-mix(in srgb, var(--surface) 90%, transparent); }
.card .brandline { display: flex; align-items: center; gap: var(--s2); color: var(--muted); margin: 0 0 var(--s3); }
.card .brandline img { height: 20px; width: auto; }
.card .called { font-family: var(--display); font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 var(--s2); text-wrap: balance; }
.card .act { margin: var(--s4) 0 0; }

.idea, .why, .proof, .join { border-top: 1px solid var(--hair); padding: var(--s8) 0 var(--s7); }
.idea .reel { margin: 0 0 var(--s5); }
.why p { max-width: 58ch; }
.why .src { display: block; margin-top: var(--s1); }
.proof .big { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; margin-bottom: var(--s3); text-wrap: balance; }
.proof .n { font-variant-numeric: tabular-nums; }
.proof .src a { padding-block: 3px; } /* 26 px tall as a one-line link (WCAG 2.5.8's 24 px); wrapped, it is an inline link in a sentence */

/* The form: name and email, one optional choice. */
.field { margin: 0 0 var(--s5); border: 0; padding: 0; }
.field > label, legend { display: block; font-weight: 600; margin-bottom: var(--s2); padding: 0; }
legend .muted { font-weight: 400; }
input[type="text"], input[type="email"] {
  width: 100%; min-height: 52px; padding: 0 var(--s4); border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-size: 16px;
}
input[type="text"]:focus-visible, input[type="email"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--bad); }
.err { color: var(--bad); margin: var(--s2) 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--hair); border-radius: 999px; }
.chips input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
/* The age box: a 48 px tap target (anti-slop G04) drawn as a 24 px box, as in the first draft: a 12 px transparent
   border, a 2 px frame (padding box) and a 20 px face (content box). */
.field > label.check, .check { position: relative; display: flex; margin-bottom: 0; gap: var(--s1); align-items: center; min-height: 48px; cursor: pointer; font-weight: 400 !important; margin-left: -12px; }
.check input {
  appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 48px; margin: 0; cursor: pointer;
  border: 12px solid transparent; padding: 2px; border-radius: 18px;
  background: linear-gradient(var(--surface), var(--surface)) content-box, linear-gradient(var(--ink-2), var(--ink-2)) padding-box;
}
.check input:checked { background: linear-gradient(var(--brand-fill), var(--brand-fill)) content-box, linear-gradient(var(--brand-fill), var(--brand-fill)) padding-box; }
.check input:focus-visible { outline-offset: -10px; }
.check .tick { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; display: none; pointer-events: none; stroke: var(--on-brand); }
.check input:checked + .tick { display: block; }
.consent { color: var(--ink-2); }
.privacy { margin-top: var(--s5); color: var(--muted); }
.privacy strong { color: var(--ink-2); }
.privacy summary { cursor: pointer; color: var(--ink-2); font-weight: 600; min-height: 48px; display: flex; align-items: center; }
.privacy details p { margin-top: var(--s2); }
.sent h3 { font-size: 28px; letter-spacing: -0.02em; margin-bottom: var(--s3); }
.after { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0 var(--s3); }

.foot { max-width: var(--wide); margin: 0 auto; padding: var(--s6) var(--s5) var(--s7); color: var(--muted); border-top: 1px solid var(--hair); }
.foot p { margin: 0 0 var(--s1); max-width: var(--col); }

@media (max-width: 767px) {
  main, .bar, .foot { padding-left: var(--s4); padding-right: var(--s4); }
  h1 { margin-top: var(--s5); }
  .act .primary { width: 100%; }
  .idea, .why, .proof, .join { padding-top: var(--s7); }
}
/* 768 to 1023 (ruling 3): one column that uses the width. Reading text keeps its measure (lede 30ch, why 58ch). */
@media (min-width: 768px) and (max-width: 1023px) {
  main > section, main > .answer, main > .next, .more, .top > .hero { max-width: none; }
  .idea h2, .proof .big, .join form, .join .sent { max-width: var(--col); }
  main p:not(.pond-cap):not(.timer-top) { max-width: 65ch; } /* reading measure (anti-slop G18) */
}
/* 1024 and up (ruling 3): the first screen is two columns, the question and guess on the left and the race on the right,
   filling the screen under the bar. The street sits low in its column, so it is whole on the first screen and the scroll
   that runs its clock has room before its top reaches the top of the screen. Below the first screen the reading column
   is centred on the page, so no side is left empty. */
@media (min-width: 1024px) {
  .bar, main, .foot { max-width: var(--page); }
  .top {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: var(--s8);
    min-height: calc(100svh - 80px); align-items: center;
  }
  /* Port (JL-3493): in preview mode (EARLY_ACCESS_MODE=demo) the server puts its strip above the bar (functions/_lib/
     landing.ts: 10 + 10 px padding, a 14 px line at 1.4, a 2 px rule), so the first-screen block gives up that height and
     the street stays whole on the first screen, as in the design. */
  .jl-demo-strip ~ main > .top { min-height: calc(100svh - 80px - (20px + 14px * 1.4 + 2px)); }
  .top > .hero { padding: 0 0 var(--s6); }
  h1 { font-size: clamp(48px, 4.4vw, 72px); margin-top: 0; }
  .lede { max-width: 26ch; }
  .street { align-self: end; padding-bottom: var(--s6); }
  .stage { padding-top: 0; }
  /* The street sits at the bottom of its column, so its height must not change while the clock runs: the phase and the
     seconds always take one line each (on one line they wrap at the end and would lift the street by a line). */
  .timer-top { flex-direction: column; gap: 0; min-height: 3.2em; }
  main > section:not(.top), main > .answer, main > .next, .more { margin-left: auto; margin-right: auto; }
  main > .next { width: 100%; }
  .foot p { margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-in { animation: none; }
  .pick, .primary, .reel .fin { transition: none; }
}

/* Wiring added in the port (JL-3483): the form's busy and error states, and the thank-you. Same tokens, no new colour. */
.form-err { color: var(--bad); margin: var(--s3) 0 0; }
.form-err:empty { display: none; }
button.primary[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sent .dup { color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
