/* Layout: a race course. Hero = start corral with the bot's chat as the "bib";
   "How it works" runs as a course line with mile markers; finish tape closes the page.
   Deliberately single light theme (the owner prefers light). */
:root {
  color-scheme: light;
  --paper: #FAFAF7;        /* page ground, faint warm-neutral */
  --paper-2: #F0F1EC;      /* banded sections */
  --ink: #15202B;          /* text, road asphalt */
  --ink-2: #4A5561;        /* secondary text */
  --line: #D9DCD4;         /* hairlines */
  --bib: #E5432F;          /* race-bib red: the one loud color */
  --bib-ink: #FFFFFF;
  --lane: #2D5BA6;         /* water / info */
  --go: #2E8B57;           /* progress, "down" */
  --chat: #FFFFFF;
  --chat-me: #E4F1FF;

  --f-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --f-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;

  --s-1: clamp(15px, 1vw + 11px, 17px);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--s-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lane); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-bib {
  font-family: var(--f-display); font-weight: 900; font-size: 15px; letter-spacing: .02em;
  background: var(--bib); color: var(--bib-ink); padding: 3px 7px 2px; border-radius: 4px; line-height: 1.1;
}
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 24px; letter-spacing: .01em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.link { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav a.link:hover { color: var(--ink); }
@media (max-width: 760px) { .nav a.link { display: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-body); font-weight: 700; font-size: 16px; text-decoration: none;
  padding: 12px 20px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: #000; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-block: 64px 72px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 40px 56px; } }
.hero-copy { min-width: 0; }
.eyebrow {
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--bib); }
h1 {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(52px, 8.2vw, 104px); line-height: .9; letter-spacing: -.005em;
  margin: 18px 0 22px; text-wrap: balance;
}
h1 .strike { position: relative; color: var(--ink-2); white-space: nowrap; }
h1 .strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: .09em; background: var(--bib);
  transform: rotate(-2deg);
}
.lede { font-size: clamp(18px, 1.2vw + 12px, 21px); color: var(--ink-2); max-width: 34em; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { font-size: 14px; color: var(--ink-2); margin-top: 16px; }
.hero-note b { color: var(--ink); font-weight: 600; }

/* Chat mock styled as a race bib pinned on */
.bib-card {
  position: relative; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 18px;
  padding: 0 0 14px; box-shadow: 8px 8px 0 var(--ink); max-width: 440px; justify-self: center; width: 100%;
}
.bib-head {
  background: var(--bib); color: var(--bib-ink); border-radius: 15px 15px 0 0;
  display: flex; justify-content: space-between; align-items: center; padding: 10px 16px;
  border-bottom: 2px solid var(--ink);
}
.bib-head .bot { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; line-height: 1.2; }
.bib-head .bot small { display: block; font-weight: 500; opacity: .85; font-size: 12.5px; }
.bib-head .num { font-family: var(--f-display); font-weight: 900; font-size: 34px; line-height: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--bib-ink); color: var(--bib); display: grid; place-items: center; font-family: var(--f-display); font-weight: 900; font-size: 16px; flex: none; }
.pin { position: absolute; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.pin.l { left: -1px; transform: translateX(-50%); } .pin.r { right: -1px; transform: translateX(50%); }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 16px 14px 4px; }
.msg {
  max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.45;
  background: var(--chat); border: 1px solid var(--line);
}
.msg.me { align-self: flex-end; background: var(--chat-me); border-color: color-mix(in srgb, var(--lane) 25%, var(--line)); font-family: var(--f-mono); font-size: 14px; }
.msg.bot { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg .down { color: var(--go); font-weight: 600; }
.msg .bar { font-family: var(--f-mono); letter-spacing: -.5px; color: var(--lane); }
.msg time { display: block; text-align: right; font-size: 11px; color: var(--ink-2); margin-top: 2px; font-family: var(--f-mono); }

/* ---------- Section scaffolding ---------- */
section { scroll-margin-top: 70px; }
.band { background: var(--paper-2); border-block: 1px solid var(--line); }
.sec .wrap { padding-block: 80px; }
@media (max-width: 700px) { .sec .wrap { padding-block: 56px; } }
.sec-head { max-width: 680px; margin-bottom: 44px; }
h2 {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(38px, 4.6vw, 60px); line-height: .95; margin: 12px 0 14px; text-wrap: balance;
}
.sec-head p { color: var(--ink-2); margin: 0; max-width: 36em; }
h3 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: 1; margin: 0 0 10px; letter-spacing: .01em; }

/* ---------- The course (how it works) ---------- */
.course { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.course::before {
  content: ""; position: absolute; left: 0; right: 0; top: 27px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 22px, transparent 22px 34px);
  opacity: .9;
}
.stage { position: relative; min-width: 0; }
.marker {
  position: relative; z-index: 1; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink);
  font-family: var(--f-display); font-weight: 900; line-height: .9; margin-bottom: 18px;
}
.marker small { font-family: var(--f-mono); font-weight: 600; font-size: 9.5px; letter-spacing: .08em; }
.marker span { font-size: 21px; }
.stage.finish .marker { background: var(--bib); color: var(--bib-ink); }
.stage p { margin: 0 0 10px; color: var(--ink-2); }
code, .kbd {
  font-family: var(--f-mono); font-size: .86em; background: var(--paper); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; color: var(--ink); white-space: nowrap;
}
.band code { background: var(--paper); }
@media (max-width: 860px) {
  .course { grid-template-columns: 1fr; gap: 26px; padding-left: 4px; }
  .course::before { left: 31px; right: auto; top: 0; bottom: 0; width: 6px; height: auto;
    background: repeating-linear-gradient(180deg, var(--ink) 0 22px, transparent 22px 34px); }
  .stage { display: grid; grid-template-columns: 60px 1fr; gap: 18px; align-items: start; }
  .marker { margin-bottom: 0; }
}

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.feat {
  min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 6px;
}
.feat p { margin: 0; color: var(--ink-2); }
.feat .stat { font-family: var(--f-display); font-weight: 900; font-size: 44px; line-height: 1; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.feat .stat small { font-family: var(--f-body); font-weight: 600; font-size: 15px; color: var(--ink-2); margin-left: 6px; }
.feat .tag { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.f-weight { grid-column: span 7; }
.f-water  { grid-column: span 5; }
.f-ideal  { grid-column: span 5; }
.f-steps  { grid-column: span 7; }
.f-weight .stat { color: #2F7D3A; }   /* weight lost is good news: green */
.f-water .stat { color: var(--lane); }
@media (max-width: 860px) { .f-weight, .f-water, .f-ideal, .f-steps { grid-column: span 12; } }

/* Mini weight chart */
.spark { width: 100%; height: auto; max-width: 100%; margin-top: 14px; display: block; }
.spark .grid { stroke: var(--line); stroke-width: 1; }
.spark .lineP { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: color-mix(in srgb, var(--go) 14%, transparent); }
.spark .goal { stroke: var(--bib); stroke-width: 1.5; stroke-dasharray: 5 5; }
.spark text { font-family: var(--f-mono); font-size: 11px; fill: var(--ink-2); }
.spark .end { fill: var(--bib); stroke: var(--paper); stroke-width: 2; }

/* Water formula */
.formula { margin-top: 14px; display: grid; gap: 8px; }
.formula .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.formula .row span:first-child { color: var(--ink-2); }
.formula .row span:last-child { font-family: var(--f-mono); font-weight: 600; }

/* BMI scale */
.scale { margin-top: 16px; }
.scale-bar { display: grid; grid-template-columns: 18.5fr 6.4fr 5fr 10fr; height: 12px; border-radius: 6px; overflow: hidden; border: 1px solid var(--ink); }
.scale-bar i:nth-child(1) { background: var(--paper-2); }
.scale-bar i:nth-child(2) { background: var(--go); }
.scale-bar i:nth-child(3) { background: color-mix(in srgb, var(--bib) 35%, var(--paper)); }
.scale-bar i:nth-child(4) { background: color-mix(in srgb, var(--bib) 65%, var(--paper)); }
.scale-labels { display: grid; grid-template-columns: 18.5fr 6.4fr 5fr 10fr; font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); margin-top: 6px; }
.scale-labels span:nth-child(2) { color: var(--go); font-weight: 600; }

/* Steps week */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 120px; margin-top: 16px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.week b { width: 100%; max-width: 36px; border-radius: 6px 6px 2px 2px; background: var(--ink); display: block; }
.week b.hit { background: var(--go); }
.week span { font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); }

/* ---------- Commands cheat sheet ---------- */
.cmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.cmd { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cmd code { background: transparent; border: 0; padding: 0; font-size: 15px; font-weight: 600; color: var(--bib); white-space: normal; }
.cmd p { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.faq .qa { border-bottom: 1px solid var(--line); padding: 22px 0 6px; }
.faq .qa h3 { margin: 0 0 8px; font-family: var(--f-body); font-weight: 700; font-size: 18px; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.faq .qa p { margin: 0 0 18px; color: var(--ink-2); max-width: 62ch; }

/* ---------- Privacy ---------- */
.privacy { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px; }
.privacy div { min-width: 0; }
.privacy p { margin: 0; color: var(--ink-2); }
.privacy h3 { font-size: 22px; }
.contact { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--ink-2); }
.contact .addr { font-family: var(--f-mono); color: var(--ink); background: var(--paper); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; user-select: all; }
.copy { font: 600 13px var(--f-body); background: transparent; border: 1px solid var(--ink); color: var(--ink); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.copy:hover { background: var(--ink); color: var(--paper); }

/* ---------- Finish ---------- */
.finish-band { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.finish-band .wrap { padding-block: 84px 92px; display: grid; gap: 24px; justify-items: start; }
.tape {
  position: absolute; left: -5%; right: -5%; top: 34px; height: 30px; transform: rotate(-2.2deg);
  background: repeating-linear-gradient(90deg, var(--bib) 0 40px, var(--paper) 40px 80px);
  border-block: 2px solid var(--ink);
}
.finish-band h2 { color: var(--paper); margin-top: 28px; }
.finish-band p { color: color-mix(in srgb, var(--paper) 78%, var(--ink)); margin: 0; max-width: 34em; }
.finish-band .btn { background: var(--bib); border-color: var(--bib); color: var(--bib-ink); font-size: 18px; padding: 14px 24px; }
.finish-band .btn:hover { background: color-mix(in srgb, var(--bib) 85%, #000); }

footer .wrap { padding-block: 36px 44px; display: grid; gap: 14px; font-size: 14px; color: var(--ink-2); }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
footer p { margin: 0; max-width: 80ch; }
/* ---------- Brand v3: plum + hot pink, from the silhouette logo ---------- */
:root {
  --paper: #FFFCFA;        /* warm white */
  --paper-2: #FDF0F5;      /* blush band */
  --ink: #21092F;          /* deep plum from "Slim" and the silhouette */
  --ink-2: #5E4D6B;
  --line: #F1DCE5;         /* pink-tinted hairline */
  --bib: #DA0A4B;          /* hot pink from "Marathon" (white text 5.1:1) */
  --bib-ink: #FFFFFF;
  --pink-soft: #F9C9DA;
  --forest: #21092F;       /* plum: headings, outlines, finish band */
  --leaf: #EE0A52;         /* swoosh pink (decorative only) */
  --go: #2F7D3A;           /* semantic: weight down / healthy range */
  --lane: #2D6FA8;
  --chat: #FFFFFF;
  --chat-me: #FCE4EE;
  --f-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}
body::before { background: var(--paper); }
.top { background: color-mix(in srgb, var(--paper) 92%, transparent); }

/* Logo */
.brand { display: inline-flex; align-items: center; }
.brand { flex: none; }
.logo { display: block; position: relative; line-height: 0; }
.logo img { display: block; height: 96px; width: auto; max-width: none; }
footer .logo img { height: 84px; }

/* The shine runs on its own layer, cut to the logo's shape. The image itself is never masked,
   so the logo always shows even if a browser can't do masks. */
.logo .glint {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: url("logo.png"); -webkit-mask-size: 100% 100%; -webkit-mask-repeat: no-repeat;
  mask-image: url("logo.png"); mask-size: 100% 100%; mask-repeat: no-repeat;
}

/* Type: heavy rounded sans to match the logo */
h1 { font-weight: 800; text-transform: none; font-size: clamp(38px, 5.4vw, 68px); line-height: 1.05; letter-spacing: -.025em; color: var(--forest); }
h1 .strike { color: var(--ink-2); }
h2 { font-weight: 800; text-transform: none; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -.02em; color: var(--forest); }
h3 { font-weight: 800; text-transform: none; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; color: var(--forest); }
.page-hero h1 { font-size: clamp(30px, 5vw + 14px, 60px); overflow-wrap: break-word; }
.prose h2 { font-size: clamp(26px, 2.8vw, 34px); }
.prose h3 { font-size: 19px; }
.feat .stat { font-weight: 800; font-size: 38px; letter-spacing: -.02em; }
.marker span { font-size: 17px; font-weight: 800; }
.finish-band h2 { color: #FFFFFF; }
.notfound .big { font-weight: 900; letter-spacing: -.04em; }

/* Buttons: warm pink primary */
.btn { background: var(--bib); border-color: var(--bib); color: var(--bib-ink); }
.btn:hover { background: #B8083F; border-color: #B8083F; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Chat card */
.bib-card { border-color: var(--forest); box-shadow: 8px 8px 0 var(--pink-soft); background: #FFFFFF; }
.bib-head { border-bottom-color: var(--forest); }
.pin { border-color: var(--forest); }
.avatar { color: var(--bib); }

/* Course */
.course::before { background: repeating-linear-gradient(90deg, var(--leaf) 0 22px, transparent 22px 34px); }
@media (max-width: 860px) { .course::before { background: repeating-linear-gradient(180deg, var(--leaf) 0 22px, transparent 22px 34px); } }
.marker { border-color: var(--forest); color: var(--forest); }
.stage.finish .marker { background: var(--bib); border-color: var(--bib); color: #FFFFFF; }

/* Cards and sheets */
.feat { background: #FFFFFF; }
.cmds { border-color: var(--forest); background: #FFFFFF; }
.spark .lineP { stroke: var(--forest); }
.spark .area { fill: color-mix(in srgb, var(--leaf) 18%, transparent); }
.week b { background: color-mix(in srgb, var(--forest) 80%, #FFFFFF); }
.week b.hit { background: var(--leaf); }
.scale-bar { border-color: var(--forest); }
.scale-bar i:nth-child(2) { background: var(--go); }
.faq { border-top-color: var(--forest); }
.callout { border-color: var(--forest); background: #FFFFFF; }
.copy { border-color: var(--ink); color: var(--ink); }

/* Finish band in logo plum */
.finish-band { background: var(--forest); }
.finish-band p { color: #EBDDF0; }
.tape { background: repeating-linear-gradient(90deg, var(--bib) 0 40px, #FFFFFF 40px 80px); border-block-color: var(--forest); }
.finish-band .btn { background: var(--bib); border-color: var(--bib); }


/* Small phones: let the chat example shrink instead of widening the page */
.bib-head .bot { min-width: 0; }
.bib-head .bot > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.msg { overflow-wrap: anywhere; }

/* ---------- Menu button: a plain hamburger (three lines) that turns into an X ---------- */
.top .wrap { position: relative; }
.menu-btn {
  -webkit-appearance: none; appearance: none; border: 0; margin: 0; padding: 0; font: inherit; cursor: pointer;
  background: transparent; flex: none; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 14px; color: var(--ink);
  transition: color .15s ease, background .15s ease; -webkit-tap-highlight-color: transparent;
}
.menu-btn:hover { color: var(--bib); }
.menu-btn:focus-visible { outline: 3px solid var(--lane); outline-offset: 2px; }
.menu-btn[aria-expanded="true"] { color: var(--bib); }
.menu-btn .hb-burger { position: relative; display: block; width: 30px; height: 22px; }
.menu-btn .hb-burger span {
  position: absolute; left: 0; right: 0; height: 3.5px; border-radius: 3px; background: currentColor;
  transition: top .22s ease, transform .22s ease, opacity .18s ease;
}
.menu-btn .hb-burger span:nth-child(1) { top: 0; }
.menu-btn .hb-burger span:nth-child(2) { top: calc(50% - 1.75px); }
.menu-btn .hb-burger span:nth-child(3) { top: calc(100% - 3.5px); }
.menu-btn[aria-expanded="true"] .hb-burger span:nth-child(1) { top: calc(50% - 1.75px); transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .hb-burger span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .hb-burger span:nth-child(3) { top: calc(50% - 1.75px); transform: rotate(-45deg); }
@media (max-width: 480px) {
  .top .logo img { height: 72px; }
  .menu-btn { width: 48px; height: 48px; margin-right: -8px; }
  .menu-btn .hb-burger { width: 28px; height: 20px; }
}
@media (max-width: 374px) { .top .logo img { height: 64px; } }
@media (max-width: 340px) { .top .logo img { height: 58px; } }
/* gentle "lub-dub" pulse, used by the loading screen */
@keyframes sm-beat { 0%, 45%, 100% { transform: scale(1); } 10% { transform: scale(1.1); } 20% { transform: scale(.97); } 30% { transform: scale(1.07); } }

.site-menu {
  position: absolute; top: calc(100% - 4px); right: max(16px, env(safe-area-inset-right, 0px)); z-index: 30;
  width: min(300px, calc(100vw - 32px)); padding: 10px;
  background: #FFFFFF; border: 2px solid var(--forest); border-radius: 20px; box-shadow: 8px 8px 0 var(--pink-soft);
  transform-origin: top right; animation: sm-menu-in .18s ease-out;
}
.site-menu nav { display: grid; gap: 2px; }
.site-menu a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; text-decoration: none;
  font: 800 17px/1.2 var(--f-display); letter-spacing: -.01em; color: var(--ink);
}
.site-menu nav a::after { content: "→"; color: var(--bib); font-weight: 800; transition: transform .15s ease; }
.site-menu a:hover, .site-menu a:focus-visible { background: var(--paper-2); color: var(--bib); outline: none; }
.site-menu nav a:hover::after, .site-menu nav a:focus-visible::after { transform: translateX(3px); }
.site-menu a[aria-current="page"] { color: var(--bib); }
.menu-legal { display: flex; flex-wrap: wrap; gap: 4px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.menu-legal a { font: 600 14px var(--f-body); color: var(--ink-2); padding: 8px 12px; }
@keyframes sm-menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* ---------- Loading screen: the silhouette fills with colour, then fades ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--paper); transition: opacity .5s ease, visibility .5s ease;
  animation: sm-loader-failsafe .01s linear 6s forwards;   /* never stays up if the script can't run */
}
.loader.done { opacity: 0; visibility: hidden; }
.no-loader .loader { display: none; }
@keyframes sm-loader-failsafe { to { opacity: 0; visibility: hidden; } }
.loader-fig { position: relative; width: 118px; aspect-ratio: 234 / 420; transform-origin: 50% 60%; animation: sm-beat 1.6s ease-in-out infinite; }
.loader-fig img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.loader-fig .ghost { opacity: .13; filter: grayscale(1); }
.loader-fig .fill { clip-path: inset(100% 0 0 0); animation: sm-loader-fill 1.5s cubic-bezier(.55,0,.3,1) infinite; }
.loader.done .fill { animation: none; clip-path: inset(0 0 0 0); }
@keyframes sm-loader-fill { 0% { clip-path: inset(100% 0 0 0); } 72%, 100% { clip-path: inset(0 0 0 0); } }
.loader-gloss {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.loader-gloss::after {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: -70%; width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.65), transparent); transform: skewX(-18deg);
  animation: sm-shine 1.5s cubic-bezier(.4,0,.2,1) .5s infinite;
}
.loader-note { margin: 0; font: 500 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) {
  .loader-fig, .loader-gloss::after { animation: none; }
  .loader-fig .fill { animation: none; clip-path: inset(0 0 0 0); }
  .site-menu { animation: none; }
}

/* ---------- Shine: a glossy light sweep ---------- */
.btn:not(.ghost), .bib-head, .stage.finish .marker { position: relative; overflow: hidden; isolation: isolate; }
.btn:not(.ghost)::after, .logo .glint::after, .bib-head::after, .stage.finish .marker::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.08) 25%, rgba(255,255,255,.6) 50%, rgba(255,255,255,.08) 75%, transparent 100%);
  transform: skewX(-22deg); pointer-events: none; z-index: 2;
  animation: sm-shine 3.6s cubic-bezier(.4,0,.2,1) infinite;
}
.logo .glint::after { animation-delay: .6s; width: 22%; }
.bib-head::after { animation-duration: 4.8s; animation-delay: 1.2s; width: 30%; }
.stage.finish .marker::after { animation-delay: 1.8s; }
.btn:not(.ghost):hover::after { animation-duration: 1.1s; }
@keyframes sm-shine { 0% { left: -60%; } 38%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  .btn:not(.ghost)::after, .logo .glint::after, .bib-head::after, .stage.finish .marker::after { animation: none; display: none; }
}
/* Feature cards: one gentle sweep on load, again on hover */
.feat { position: relative; overflow: hidden; isolation: isolate; }
.feat::after {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: -50%; width: 30%; pointer-events: none; z-index: 2;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.75), transparent);
  transform: skewX(-22deg); animation: sm-sweep 1.4s cubic-bezier(.4,0,.2,1) .4s 1 both;
}
.f-water::after { animation-delay: .6s; } .f-ideal::after { animation-delay: .8s; } .f-steps::after { animation-delay: 1s; }
.feat:hover::after { animation: sm-sweep 1s cubic-bezier(.4,0,.2,1) 1 both; }
@keyframes sm-sweep { from { left: -50%; } to { left: 130%; } }
/* Finish tape: a glint running along the ribbon */
.tape { overflow: hidden; }
.tape::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -20%; width: 14%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  animation: sm-tape 4.2s ease-in-out 1s infinite;
}
@keyframes sm-tape { 0% { left: -20%; } 45%, 100% { left: 110%; } }
@media (prefers-reduced-motion: reduce) { .feat::after, .tape::after { animation: none; display: none; } }


/* about */
.about { padding-top: 64px; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pillar { background: var(--paper, #FFFCFA); border: 1px solid rgba(33,9,47,.10); border-radius: 18px; padding: 22px 20px; }
.pillar .ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #FDF0F5; font-size: 24px; margin-bottom: 12px; }
.pillar h3 { font-size: 18px; margin: 0 0 6px; }
.pillar p { margin: 0; font-size: 15px; line-height: 1.5; opacity: .85; }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pillars { grid-template-columns: minmax(0, 1fr); } }

/* join form */
.join-form { width: 100%; max-width: 560px; display: grid; gap: 14px; }
.jf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.join-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: rgba(255,255,255,.85); }
.join-form input { font-family: inherit; font-size: 16px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; outline: none; width: 100%; box-sizing: border-box; }
.join-form input:focus { border-color: #FF5C8A; background: rgba(255,255,255,.12); }
.join-form input.bad { border-color: #FF5C8A; }
.join-form .btn { justify-self: start; border: 0; cursor: pointer; }
.join-form .btn[disabled] { opacity: .6; cursor: default; }
.jf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.jf-msg { margin: 0; min-height: 1.4em; font-weight: 600; }
.jf-msg.ok { color: #9BE58F; } .jf-msg.err { color: #FF8FB0; }
.jf-note { margin: 0; font-size: 13px; color: rgba(255,255,255,.6); }
.jf-note a { color: rgba(255,255,255,.85); }
@media (max-width: 520px) { .jf-row { grid-template-columns: 1fr; } }

/* ---------- Multi-page additions ---------- */
.nav a.link[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--bib); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.page-hero { border-bottom: 1px solid var(--line); }
.page-hero .wrap { padding-block: 56px 40px; }
.page-hero h1 { font-size: clamp(46px, 6.5vw, 84px); margin: 14px 0 12px; }
.page-hero p { color: var(--ink-2); margin: 0; max-width: 40em; font-size: clamp(17px, 1vw + 12px, 20px); }
.page-hero .meta { font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); margin-top: 14px; }

.doc .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-block: 48px 88px; align-items: start; }
@media (max-width: 900px) { .doc .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.prose code { white-space: normal; overflow-wrap: anywhere; }
.prose td code { white-space: nowrap; display: inline-block; margin-bottom: 2px; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); display: grid; gap: 4px; font-size: 15px; }
.toc b { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.toc a { text-decoration: none; color: var(--ink-2); padding: 3px 0 3px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); border-left-color: var(--bib); }
@media (max-width: 900px) { .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); } }

.prose { max-width: 70ch; min-width: 0; }
.prose h2 { font-size: clamp(30px, 3.2vw, 40px); margin: 52px 0 14px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 22px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 6px; }
.prose strong { color: var(--ink); }
.prose a { color: var(--lane); text-underline-offset: 3px; }
.callout { border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 20px; background: var(--paper-2); margin: 0 0 24px; }
.callout p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 6px 0 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
@media (max-width: 560px) { table { font-size: 14.5px; } th, td { padding: 10px 11px; } }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; background: var(--paper-2); }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; color: var(--bib); font-weight: 600; background: transparent; border: 0; padding: 0; }
td:first-child { font-weight: 600; color: var(--ink); }
td:last-child { color: var(--ink-2); }

.notfound .wrap { padding-block: 96px 120px; display: grid; gap: 18px; justify-items: start; }
.notfound .big { font-family: var(--f-display); font-weight: 900; font-size: clamp(110px, 20vw, 220px); line-height: .8; color: var(--bib); }
.notfound p { color: var(--ink-2); margin: 0; max-width: 34em; }

.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--ink); }
