/* PTOfis — site styles (home page with the feature tour, invite page, legal pages).
   Colors are the same as the "Deep Sea" palette in packages/theme/tokens.ts; fonts come from there too
   (Big Shoulders headings, Figtree body, JetBrains Mono for times and numbers inside the drawn screens).
   No build step: this file is served as is.

   The page's one recurring motif is the logo's track: the "o" is a tartan track and the dot on it an
   athlete. On the home page the track appears once at full width (the "flow" band) and the coral dot
   runs along it as the visitor scrolls. Every other movement answers a user action or plays once on load. */

:root {
  --ink: #122641;
  --ink-soft: #5F7186;
  --ground: #F2F5F8;
  --card: #FFFFFF;
  --line: #D2DBE5;
  --navy: #1D4E89;
  --navy-soft: #DFE9F5;
  --coral: #F26D5B;
  --coral-deep: #D9573F;
  --coral-soft: #FCE6E1;
  --coral-hover: #F58A7A;
  /* Text on a coral fill: white is 2.95:1 (fails WCAG AA), dark navy is 5.16:1; constant in both themes. */
  --on-coral: #122641;
  --ok: #1F8A4C;
  --ok-soft: #DDF1E4;
  --band: #122641;        /* the dark track band on the home page */
  --band-ink: #E4EAF2;
  --band-soft: #A7B9CE;
  --band-lane: #1D4E89;
  --focus: #1D4E89;

  --display: "Big Shoulders", "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 48px);
  --lane: 8px; /* track thickness: the page equivalent of the 9/100 ratio in the logo */
  --r-ui: 18px;   /* drawn app screens */
  --r-card: 14px; /* the form card */
  --r-el: 10px;   /* buttons, inputs, rows inside screens */
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E4EAF2;
    --ink-soft: #A7B9CE;
    --ground: #101927;
    --card: #182335;
    --line: #3A506B;
    --navy: #5E8FD1;
    --navy-soft: #1D3352;
    --coral: #F08A76;
    --coral-deep: #F26D5B;
    --coral-soft: #3A2521;
    --coral-hover: #F7A091;
    --ok: #5CB884;
    --ok-soft: #1B3328;
    --band: #0B1320;
    --band-ink: #E4EAF2;
    --band-soft: #A7B9CE;
    --band-lane: #24395A;
    --focus: #5E8FD1;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--coral-deep); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 12px;
  background: var(--card); color: var(--ink); padding: 8px 12px; border-radius: 6px; z-index: 30;
}
.skip:focus { left: 12px; }

/* ---------- Top strip ---------- */
.site-head { padding: 16px 0; }
.home .site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.home .site-head.is-stuck { border-bottom-color: var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.01em;
}
.logo:hover { color: var(--ink); }
.logo-mark { width: 40px; height: auto; display: block; }
.logo-mark .track-stroke { stroke: var(--navy); }
.logo-mark .runner-dot { fill: var(--coral); }

.head-nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.head-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.9375rem; padding: 6px 0; }
.head-nav a:hover, .head-nav a.is-active { color: var(--ink); }
.head-nav a.is-active { box-shadow: inset 0 -2px 0 var(--coral); }

/* Menu button: only on narrow screens (see the 1040px rule). Three bars that cross into an X when open. */
.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--ink);
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.head-link { font-weight: 600; font-size: 0.9375rem; }
.head-actions { display: inline-flex; align-items: center; gap: 12px; }

.lang {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px;
  background: var(--card);
}
.lang button {
  font: inherit; font-family: var(--body); font-weight: 600; font-size: 0.875rem;
  color: var(--ink-soft); background: none; border: 0; border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px;
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; line-height: 1;
  color: var(--on-coral); background: var(--coral); border: 0; border-radius: var(--r-el); cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--coral-hover); color: var(--on-coral); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-small { padding: 10px 16px; font-size: 1.0625rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 6vw, 80px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  gap: clamp(32px, 6vw, 72px); align-items: center;
}
.hero h1 {
  font-size: clamp(3.4rem, 7vw, 6.2rem);
  font-weight: 800;
  line-height: 0.92;
  max-width: 13ch;
}
.hero .lead {
  margin-top: 28px; max-width: 48ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .note { margin-top: 20px; color: var(--ink-soft); max-width: 48ch; font-size: 0.9375rem; }

/* The drawn demo: the trainer's member list. Not a phone frame; a panel with a lane on top in the
   role's color (coral = trainer; the same code used across the page). */
.demo {
  display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start;
  font-size: 0.875rem; line-height: 1.35;
}
.phone {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ui);
  padding: 16px 14px 18px;
  border-top: var(--lane) solid var(--navy);
  min-height: 300px;
}
.phone-trainer { border-top-color: var(--coral); min-height: 0; padding-bottom: 40px; }
.demo-solo { max-width: 400px; justify-self: end; width: 100%; }
.demo-solo .req { margin-top: 12px; }
.ph-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.ph-role { font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.ph-sub { color: var(--ink-soft); font-size: 0.8125rem; }

.req {
  padding: 12px; border-radius: var(--r-el); border: 1px solid var(--line); background: var(--ground);
}
.req-who { display: grid; gap: 2px; }
.req-who strong { font-weight: 700; }
.req-who span { color: var(--ink-soft); font-size: 0.8125rem; }
.req-actions { display: grid; margin-top: 12px; }
.req-btn, .req-done { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; border-radius: 8px; font-weight: 700; font-size: 0.875rem; }
.req-btn { background: var(--coral); color: var(--on-coral); font-family: var(--display); font-size: 1.0625rem; letter-spacing: 0.02em; }
.req-done { background: var(--ok-soft); color: var(--ok); }
.req-done::before { content: "✓ "; }

.toast {
  position: absolute; left: 10px; right: 10px; bottom: -14px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--ink); color: var(--ground); font-size: 0.8125rem; font-weight: 600; line-height: 1.3;
  box-shadow: 0 10px 24px -12px rgba(18, 38, 65, 0.5);
}
.toast::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); margin-right: 8px; vertical-align: 1px; }

/* The sequence (plays once): the member taps 18:00 → "request sent" → it lands in the trainer's inbox →
   "Approve" → both screens show approved and get a notification. Delays are absolute, from page load. */
@keyframes demo-hide { to { opacity: 0; } }
@keyframes demo-show { from { opacity: 0; } to { opacity: 1; } }
@keyframes demo-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes demo-pressbtn { 0% { transform: none; } 50% { transform: scale(0.96); background: var(--coral-hover); } 100% { transform: none; } }

.req { opacity: 0; animation: demo-rise 0.5s ease 2.1s both; }
.req-btn { animation: demo-pressbtn 0.35s ease 3.6s both, demo-hide 0.25s ease 4.0s both; }
.req-done { opacity: 0; animation: demo-show 0.3s ease 4.1s both; }
.toast { opacity: 0; animation: demo-rise 0.45s ease 5.0s both; }
.toast-trainer { animation-delay: 5.25s; }

@media (prefers-reduced-motion: reduce) {
  .req, .req-btn, .req-done, .toast { animation: none; }
  .req-btn { opacity: 0; }
  .req, .req-done, .toast { opacity: 1; transform: none; }
}

/* ---------- The track band ---------- */
.flow { background: var(--band); color: var(--band-ink); padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 104px); position: relative; overflow: hidden; }
.flow-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(24px, 5vw, 72px); align-items: end; }
.flow h2 { font-size: clamp(2.6rem, 5.5vw, 4.5rem); font-weight: 800; line-height: 0.95; }
.flow-head p { color: var(--band-soft); max-width: 40ch; font-size: 1.0625rem; }

.flow-track { position: relative; margin: clamp(32px, 5vw, 56px) 0 26px; height: calc(var(--lane) * 3 + 20px); }
.flow-lane { display: block; height: var(--lane); border-radius: 999px; background: var(--band-lane); margin-bottom: 10px; }
.flow-lane:nth-child(2) { margin-left: 2%; margin-right: 1%; }
.flow-lane:nth-child(3) { margin-left: 1%; margin-right: 3%; }
.flow-runner {
  position: absolute; top: calc(var(--lane) / 2 - 9px); left: calc(var(--p, 0) * 100%); margin-left: calc(var(--p, 0) * -18px);
  width: 18px; height: 18px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 4px var(--band);
  transition: left 0.12s linear, margin-left 0.12s linear;
}
@media (prefers-reduced-motion: reduce) { .flow-runner { transition: none; } }

.stations { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px 18px; }
.stations li { position: relative; padding-top: 6px; }
.st-no {
  display: block; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1;
  color: var(--coral); margin-bottom: 8px;
}
.stations h3 { font-size: 1.5rem; color: var(--band-ink); }
.stations p { margin-top: 8px; color: var(--band-soft); font-size: 0.9375rem; line-height: 1.5; }
.stations li.is-passed .st-no { color: var(--band-ink); }

/* ---------- Spotlight pair under the hero: the trainer card is the wide one ---------- */
.spot { padding: 0 0 clamp(8px, 2vw, 24px); }
.spot-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(16px, 2.5vw, 28px); }
.spot-trainer { --role: var(--coral); }
.spot-member { --role: var(--navy); }
.spot-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: clamp(20px, 3vw, 32px); background: var(--card); color: var(--ink); text-decoration: none;
  border-top: var(--lane) solid var(--role); border-radius: 0 0 var(--r-el) var(--r-el);
}
.spot-card:hover { color: var(--ink); }
.spot-card .kicker { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.spot-card h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); font-weight: 800; line-height: 1; }
.spot-card p { max-width: 54ch; }
.spot-link { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.spot-card:hover .spot-link { color: var(--coral-deep); }

/* ---------- Role sections and feature rows ---------- */
.role { padding: clamp(48px, 7vw, 96px) 0 0; }
.role-member { --role: var(--navy); --role-soft: var(--navy-soft); }
.role-trainer { --role: var(--coral); --role-soft: var(--coral-soft); }
.role-shared { --role: var(--ink); --role-soft: var(--line); }

.role-head { max-width: 30ch; margin-bottom: clamp(8px, 2vw, 24px); }
.kicker {
  display: inline-block; font-weight: 700; font-size: 1rem; color: var(--role);
  padding-bottom: 6px; border-bottom: var(--lane) solid var(--role); margin-bottom: 18px;
}
.role-shared .kicker { border-image: linear-gradient(90deg, var(--navy) 50%, var(--coral) 50%) 1; }
.role h2 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; line-height: 0.95; }

.feat {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line);
}
.feat:first-of-type { border-top: 0; }
.feat:nth-of-type(even) .feat-ui { order: -1; }
.feat h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); max-width: 18ch; }
.feat-copy > p { margin-top: 16px; max-width: 52ch; color: var(--ink); }
.feat-copy ul { list-style: none; margin: 18px 0 0; padding: 0; max-width: 52ch; }
.feat-copy li { position: relative; padding: 7px 0 7px 22px; color: var(--ink-soft); }
.feat-copy li::before {
  content: ""; position: absolute; left: 0; top: 16px; width: 10px; height: 4px; border-radius: 999px; background: var(--role);
}
.role-shared .feat-copy li::before { background: var(--coral); }

/* ---------- Drawn app screens (.ui) ----------
   One visual language for all of them: a card with a lane on top in the role's color, rows the size of a
   thumb, mono for times and numbers. Nothing in here is a screenshot; all of it is HTML. */
.ui {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ui);
  border-top: var(--lane) solid var(--role);
  padding: 20px 20px 22px; font-size: 0.9375rem; line-height: 1.35;
  max-width: 480px; width: 100%; justify-self: center; position: relative;
}
.role-shared .ui { border-top-color: var(--navy); }
.role-shared .ui-ev { border-top-color: var(--coral); }
.ui-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 700; margin-bottom: 12px; }
.ui-sub { color: var(--ink-soft); font-weight: 700; font-size: 0.8125rem; margin: 16px 0 6px; }
.ui-sub:first-child { margin-top: 0; }
.ui .small { font-size: 0.875rem; color: var(--ink-soft); }
.ui .mono { font-family: var(--mono); font-weight: 500; font-size: 0.8125rem; color: var(--ink); }
.mono-big { font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; letter-spacing: 0.01em; color: var(--ink); }

.row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-child, .ui-sub + .row, .ui-top + .row, .chips + .row { border-top: 0; }
.row.between { justify-content: space-between; }
.row.lane { border-top: 0; padding: 10px 12px; border-radius: var(--r-el); background: var(--ground); margin-top: 8px; border-left: var(--lane) solid var(--navy); }
.row.lane-coral { border-left-color: var(--coral); }
.row.lane-water { border-left-color: #5E8FD1; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); background: var(--ground);
}
.chip.is-on { background: var(--ink); color: var(--ground); border-color: var(--ink); }

.pill { padding: 4px 10px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-weight: 700; font-size: 0.75rem; }
.tag { padding: 3px 8px; border-radius: 6px; background: var(--ground); border: 1px solid var(--line); font-size: 0.75rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.tag-coral { background: var(--coral-soft); border-color: transparent; color: var(--coral-deep); }
.tag-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }

.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--navy-soft); color: var(--navy); font-weight: 700; font-size: 0.75rem;
}
.avatar-alt { background: var(--coral-soft); color: var(--coral-deep); }
.avatar-ghost { background: transparent; border: 2px dashed var(--line); color: var(--ink-soft); }
.person-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.person-text strong { font-weight: 700; }
.person-text span { color: var(--ink-soft); font-size: 0.8125rem; }
.person-side { display: grid; justify-items: end; gap: 2px; }
.rating { font-weight: 700; font-size: 0.875rem; }
.rating i { font-style: normal; color: var(--coral); }
.heart {
  position: absolute; right: 18px; top: 14px; width: 14px; height: 14px; background: var(--coral);
  transform: rotate(45deg) scale(0.9); border-radius: 0 0 2px 0;
}
.heart::before, .heart::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--coral); }
.heart::before { left: -7px; top: 0; }
.heart::after { top: -7px; left: 0; }

/* calendar */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 10px; }
.day { display: grid; gap: 4px; padding: 8px 4px 10px; border-radius: 8px; background: var(--ground); justify-items: stretch; }
.day span { font-size: 0.6875rem; font-weight: 700; color: var(--ink-soft); text-align: center; margin-bottom: 2px; }
.day i { display: block; height: 7px; border-radius: 999px; }
.day i.b { background: var(--navy); }
.day i.f { background: transparent; border: 1px solid var(--line); }
.day i.p { background: var(--coral); }
.day.is-today { box-shadow: inset 0 0 0 2px var(--navy); }
.day.is-off { opacity: 0.5; }

/* program */
.row.ex { gap: 10px; }
.row.ex > span:first-of-type { flex: 1; }
.chk { flex: none; width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--line); display: inline-grid; place-items: center; }
.is-done .chk { background: var(--navy); border-color: var(--navy); }
.is-done .chk::after { content: ""; width: 5px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(45deg); }
.is-done > span:first-of-type { color: var(--ink-soft); }
.macros { margin-top: 14px; display: grid; gap: 8px; }
.macro { display: grid; grid-template-columns: 8.5em 1fr auto; align-items: center; gap: 10px; font-size: 0.8125rem; font-weight: 600; }
.macro i { display: block; height: var(--lane); border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.macro i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--coral); border-radius: 999px; }

/* progress */
.bignum { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 8px; }
.bignum .unit { color: var(--ink-soft); font-weight: 700; }
.delta { color: var(--ok); font-weight: 700; font-size: 0.875rem; }
.chart { display: block; width: 100%; height: 110px; margin: 0 0 8px; overflow: visible; }
.chart-area { fill: var(--navy-soft); }
.chart-line { fill: none; stroke: var(--navy); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--coral); stroke: var(--card); stroke-width: 3; }

/* today */
.ui-greet { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin-bottom: 6px; }

/* office */
.row.attn { gap: 12px; }
.count {
  flex: none; width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center;
  background: var(--coral-soft); color: var(--coral-deep); font-family: var(--display); font-weight: 800; font-size: 1.125rem;
}
.hours { flex: none; width: 110px; height: var(--lane); border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.hours i { position: absolute; top: 0; bottom: 0; left: var(--a); right: calc(100% - var(--b)); background: var(--coral); border-radius: 999px; }

/* members + invite */
.invite {
  margin-top: 16px; padding: 14px; border-radius: var(--r-el); background: var(--ground); border: 1px dashed var(--line);
  display: grid; gap: 8px; justify-items: start;
}
.invite .ui-sub { margin: 0; }
.code { font-family: var(--mono); font-weight: 500; font-size: 1.5rem; letter-spacing: 0.12em; color: var(--navy); }
.ui-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border-radius: 8px;
  background: var(--coral); color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.02em; line-height: 1;
}
.ui-btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }

/* ledger */
.neg { color: var(--coral-deep); }
.pos { color: var(--ok); }
.row.is-due { font-weight: 700; }
.row.is-due .mono { color: var(--coral-deep); }

/* templates */
.lib-item { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.lib-sil { width: 28px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, var(--navy) 50%, var(--navy-soft) 50%); }

/* showcase */
.meter { height: var(--lane); border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 8px; }
.meter i { display: block; height: 100%; width: var(--v); background: var(--coral); border-radius: 999px; }
.meter-thin { height: 5px; margin: 10px 0 6px; }
.row.chk-row { padding: 8px 0; }

/* reports */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { padding: 14px; border-radius: var(--r-el); background: var(--ground); display: grid; gap: 4px; font-size: 0.8125rem; color: var(--ink-soft); font-weight: 600; }

/* messages */
.sysnote { text-align: center; font-size: 0.75rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 12px; }
.bubble { max-width: 82%; padding: 10px 12px; border-radius: 14px; margin-top: 8px; font-size: 0.9375rem; }
.bubble.them { background: var(--ground); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.me { background: var(--navy); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.typing { display: flex; align-items: center; gap: 4px; margin-top: 12px; color: var(--ink-soft); font-size: 0.75rem; font-weight: 600; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); opacity: 0.5; }
.typing i:nth-child(2) { opacity: 0.75; }
.typing i:nth-child(3) { opacity: 1; }
.typing span { margin-left: 6px; }

/* events */
.ev-art { height: 96px; border-radius: 12px; background: linear-gradient(180deg, #DFE9F5 0 62%, #1D4E89 62%); position: relative; overflow: hidden; margin-bottom: 14px; }
.ev-sun { position: absolute; left: 22%; top: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--coral); }
.ev-sea { position: absolute; left: 0; right: 0; top: 62%; height: 3px; background: #5E8FD1; opacity: 0.7; }
.ev-title { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin: 10px 0 2px; }

/* library */
.shelves { display: flex; gap: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.shelf { padding: 6px 0 10px; font-weight: 700; font-size: 0.875rem; color: var(--ink-soft); }
.shelf.is-on { color: var(--ink); box-shadow: inset 0 -3px 0 var(--coral); }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.lib-card { display: block; aspect-ratio: 3 / 4; border-radius: 10px; }
.lib-card.c1 { background: linear-gradient(160deg, var(--navy) 0 55%, var(--navy-soft) 55%); }
.lib-card.c2 { background: linear-gradient(20deg, var(--coral) 0 40%, var(--coral-soft) 40%); }
.lib-card.c3 { background: repeating-linear-gradient(90deg, var(--navy-soft) 0 10px, var(--card) 10px 20px); border: 1px solid var(--line); }

/* ---------- Trust band ---------- */
.trust { margin-top: clamp(48px, 7vw, 96px); padding: clamp(48px, 6vw, 80px) 0; background: var(--navy-soft); }
.trust-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.trust h2 { font-size: clamp(2.2rem, 4.2vw, 3.25rem); }
.trust-inner > div > p { margin-top: 16px; max-width: 40ch; }
.trust-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.trust-list li { break-inside: avoid; padding: 10px 0 10px 24px; position: relative; }
.trust-list li::before {
  content: ""; position: absolute; left: 0; top: 18px; width: 12px; height: 12px; border-radius: 50%;
  border: 3px solid var(--navy); background: var(--ground);
}

/* ---------- Feature index ---------- */
.index { padding: clamp(48px, 7vw, 96px) 0 0; }
.index h2 { font-size: clamp(2.2rem, 4.2vw, 3.25rem); }
.index-lead { margin-top: 12px; color: var(--ink-soft); }
.index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); margin-top: 28px; }
.index-col h3 { font-size: 1.5rem; padding-bottom: 10px; border-bottom: var(--lane) solid var(--navy); }
.col-trainer h3 { border-bottom-color: var(--coral); }
.col-shared h3 { border-image: linear-gradient(90deg, var(--navy) 50%, var(--coral) 50%) 1; }
.index-col ul { list-style: none; margin: 0; padding: 0; }
.index-col li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink); line-height: 1.45; }
.index-col li:last-child { border-bottom: 0; }

/* ---------- No fee ---------- */
.free { padding: clamp(56px, 8vw, 112px) 0 0; }
.free-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.free h2 { font-size: clamp(3rem, 7vw, 6rem); font-weight: 800; line-height: 0.9; }
.free-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.free-col h3 { font-size: 1.5rem; padding-bottom: 10px; border-bottom: var(--lane) solid var(--navy); }
.free-col p { margin-top: 12px; color: var(--ink); }

/* ---------- Get the app ---------- */
.join { padding: clamp(56px, 8vw, 112px) 0 0; }
.get {
  max-width: 640px; margin: 0 auto; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(24px, 4vw, 40px);
}
.get h2 { font-size: clamp(2.1rem, 4.2vw, 3.25rem); }
.get .sub { margin: 10px auto 0; max-width: 46ch; color: var(--ink-soft); }
.get-stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.get-stores .btn { flex: 1 1 240px; }

/* Status line (invite page: copy result) */
.status { margin-top: 12px; font-size: 0.9375rem; min-height: 1.4em; }
.status.is-ok { color: var(--navy); font-weight: 600; }
.status.is-err { color: var(--coral-deep); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq { padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 7vw, 96px); }
.faq h2 { font-size: clamp(2.1rem, 4.2vw, 3.25rem); }
.faq-list { margin-top: 20px; max-width: 72ch; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 700; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 0 18px; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--ink-soft); font-size: 0.9375rem; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { color: var(--ink-soft); }
.foot-links a:hover { color: var(--coral-deep); }
.foot-bottom { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 22px; }

/* ---------- Invite page (invite.html) ----------
   One job: show the code, let it be copied. The code is the biggest element on the page — enough to hold out
   the phone and have it read; the card is narrow and centered, the buttons full width (for the thumb). */
.invite-page { padding: clamp(24px, 5vw, 64px) 0 clamp(48px, 8vw, 96px); }
.invite-inner { max-width: 480px; margin: 0 auto; }
.invite-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ui);
  padding: clamp(24px, 5vw, 36px);
}
.invite-card .btn { width: 100%; margin-top: 14px; }
.invite-eyebrow { color: var(--ink-soft); font-weight: 600; font-size: 0.9375rem; }
.invite-card h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); margin-top: 8px; }
.invite-code {
  margin-top: 20px; padding: 22px 12px; text-align: center;
  font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 11vw, 3.6rem);
  letter-spacing: 0.12em; line-height: 1; color: var(--navy);
  background: var(--navy-soft); border-radius: 14px;
  -webkit-user-select: all; user-select: all;
}
.btn-secondary { background: transparent; color: var(--navy); border: 2px solid var(--navy); text-decoration: none; }
.btn-secondary:hover { background: var(--navy-soft); color: var(--navy); }
.invite-steps { margin: 24px 0 0; padding-left: 22px; color: var(--ink); }
.invite-steps li + li { margin-top: 8px; }
.invite-note { margin-top: 18px; color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.5; }
.invite-warn { font-weight: 600; }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(24px, 5vw, 64px) 0 clamp(48px, 8vw, 96px); }
.legal-inner { max-width: 72ch; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); margin-top: 12px; }
.legal h2 { font-size: 1.5rem; margin-top: 36px; }
.legal h2 + p, .legal h2 + ul { margin-top: 10px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; margin: 0; }
.legal li { margin: 6px 0; }
.legal .date { color: var(--ink-soft); font-size: 0.9375rem; margin-top: 10px; }
.legal .draft {
  margin-top: 24px; padding: 14px 16px; border-left: var(--lane) solid var(--coral);
  background: var(--card); border-radius: 0 10px 10px 0; font-size: 0.9375rem;
}

/* ---------- Narrow screens ---------- */
@media (max-width: 1040px) {
  /* Narrow header: the section links fold into a panel under the header, opened by the menu button. */
  .nav-toggle { display: inline-flex; }
  .head-inner { position: relative; }
  .head-nav {
    display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 12px);
    flex-direction: column; gap: 0; padding: 8px 18px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
    box-shadow: 0 28px 56px -30px rgba(18, 38, 65, 0.5);
  }
  .site-head.nav-open .head-nav { display: flex; animation: rise-in 0.25s ease both; }
  .head-nav a { padding: 14px 0; font-size: 1.0625rem; color: var(--ink); border-top: 1px solid var(--line); }
  .head-nav a:first-child { border-top: 0; }
  .head-nav a.is-active { box-shadow: none; color: var(--coral-deep); }
  .stations { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .spot-grid { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .demo { max-width: 560px; }
  .flow-head { grid-template-columns: 1fr; }
  .feat { grid-template-columns: 1fr; gap: 28px; }
  .feat:nth-of-type(even) .feat-ui { order: 0; }
  .ui { justify-self: start; }
  .trust-inner { grid-template-columns: 1fr; }
  .index-grid { grid-template-columns: 1fr; }
  .free-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stations { grid-template-columns: 1fr 1fr; }
  .trust-list { columns: 1; }
  .free-cols { grid-template-columns: 1fr; }
  .head-cta { display: none; }
}
@media (max-width: 480px) {
  .demo { grid-template-columns: 1fr; }
  .phone-trainer { margin-top: 18px; }
  .phone { min-height: 0; }
  .toast { position: static; margin-top: 12px; }
  .logo { font-size: 1.4rem; }
  .logo-mark { width: 34px; }
  .macro { grid-template-columns: 6.5em 1fr auto; }
  .hours { width: 70px; }
}

/* =====================================================================================================
   Depth and motion (2026-11-27). Everything below is decoration on top of the layout above: the page
   is complete without it. Two rules it keeps: (1) nothing is hidden unless the script is running
   (`html.js`, set by main.js) and (2) `prefers-reduced-motion` switches all of it off at the end.
   Hover lifts use the `translate` property so they never fight a reveal's `transform`.
   ===================================================================================================== */

/* ---------- Depth ---------- */
.phone, .ui, .spot-card, .get {
  box-shadow: 0 1px 0 rgba(18, 38, 65, 0.04), 0 28px 56px -36px rgba(18, 38, 65, 0.38);
}
.spot-card, .ui, .btn, .index-col, .free-col { transition: translate 0.28s ease, box-shadow 0.28s ease, background-color 0.2s ease; }
.spot-card:hover, .feat-ui:hover { translate: 0 -6px; box-shadow: 0 1px 0 rgba(18, 38, 65, 0.04), 0 36px 64px -34px rgba(18, 38, 65, 0.46); }
.btn:hover { translate: 0 -2px; box-shadow: 0 14px 24px -14px var(--coral-deep); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink), 0 14px 24px -16px rgba(18, 38, 65, 0.4); }
.btn:active { translate: 0 0; box-shadow: none; }
.spot-link::after { content: " \2192"; display: inline-block; transition: translate 0.25s ease; }
.spot-card:hover .spot-link::after { translate: 5px 0; }
.head-nav a { transition: color 0.2s ease, box-shadow 0.2s ease; }

/* Each role section opens on a wash of its own colour that fades into the page. */
.role-trainer, .role-member {
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--role-soft) 60%, transparent) 150px, transparent 560px);
}

/* ---------- Hero: two slow lights behind the drawing, a lane under the headline ---------- */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0 -8%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34% 40% at 80% 46%, color-mix(in srgb, var(--coral) 26%, transparent), transparent 72%),
    radial-gradient(30% 34% at 58% 68%, color-mix(in srgb, var(--navy) 20%, transparent), transparent 72%);
  animation: hero-lights 16s ease-in-out infinite alternate;
}
@keyframes hero-lights { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-2%, 2%, 0) scale(1.05); } }
.hero h1::after {
  content: ""; display: block; height: var(--lane); width: 112px; margin-top: 22px; border-radius: 999px;
  background: var(--coral); transform-origin: left center; animation: lane-grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.55s both;
}
@keyframes lane-grow { from { transform: scaleX(0); } to { transform: none; } }

.hero-copy > * { animation: rise-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.12s; }
.hero-copy > :nth-child(3) { animation-delay: 0.24s; }
.hero-copy > :nth-child(4) { animation-delay: 0.36s; }
.demo { animation: panel-in 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }
.demo .phone { animation: panel-float 7s ease-in-out 1.4s infinite alternate; }
.demo .chips, .demo .row { animation: rise-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.demo .chips { animation-delay: 0.6s; }
.demo .row:nth-of-type(3) { animation-delay: 0.75s; }
.demo .row:nth-of-type(4) { animation-delay: 0.9s; }
.demo .row:nth-of-type(5) { animation-delay: 1.05s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(36px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes panel-float { from { translate: 0 0; } to { translate: 0 -10px; } }

/* ---------- Scroll reveals (classes are put on by main.js) ---------- */
.role, .spot, .trust, .index, .free, .join, .faq { overflow-x: clip; }
.js .rv {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms), transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms),
              translate 0.28s ease, box-shadow 0.28s ease;
}
.js .rv-l { transform: translateX(-40px); }
.js .rv-r { transform: translateX(40px); }
.js .rv.is-in { opacity: 1; transform: none; }

/* A drawn screen fills in row by row once it is on screen. */
.js .feat-ui.rv > * { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .feat-ui.rv.is-in > * { opacity: 1; transform: none; }
.js .feat-ui.rv.is-in > :nth-child(1) { transition-delay: 0.25s; }
.js .feat-ui.rv.is-in > :nth-child(2) { transition-delay: 0.33s; }
.js .feat-ui.rv.is-in > :nth-child(3) { transition-delay: 0.41s; }
.js .feat-ui.rv.is-in > :nth-child(4) { transition-delay: 0.49s; }
.js .feat-ui.rv.is-in > :nth-child(5) { transition-delay: 0.57s; }
.js .feat-ui.rv.is-in > :nth-child(6) { transition-delay: 0.65s; }
.js .feat-ui.rv.is-in > :nth-child(n+7) { transition-delay: 0.73s; }

/* The lane under a section's kicker draws itself when the header arrives. */
.js .role-head.rv .kicker { background: linear-gradient(var(--role), var(--role)) left bottom / 0 var(--lane) no-repeat; border-bottom-color: transparent; transition: background-size 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s; }
.js .role-head.rv.is-in .kicker { background-size: 100% var(--lane); }
.js .role-shared .role-head.rv .kicker { border-image: none; background-image: linear-gradient(90deg, var(--navy) 50%, var(--coral) 50%); }

@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero h1::after, .hero-copy > *, .demo, .demo .phone, .demo .chips, .demo .row { animation: none; }
  .js .rv, .js .feat-ui.rv > * { opacity: 1; transform: none; transition: none; }
  .js .role-head.rv .kicker { background-size: 100% var(--lane); transition: none; }
  .spot-card, .ui, .btn, .spot-link::after { transition: none; }
  .spot-card:hover, .feat-ui:hover, .btn:hover { translate: none; }
}
