/*
 * Thier - marketing site design system
 * v2 - 2026-05-08 rebuild
 *
 * Tokens are derived from the iOS app's `SpanTheme.swift`:
 *   primary teal (0.06, 0.58, 0.54)  → #0F948B
 *   accent amber (0.98, 0.72, 0.22)  → #FAB838
 *   secondary lavender                → #9F85EB
 *   ink (deep ink, primary text)     → #0B1A1A
 *
 * Typography is the system font stack (-apple-system / SF Pro
 * Display) which matches the app exactly on iOS and gives
 * native-feeling text on every other platform.
 */

/* Domine — the editorial serif (iOS SpanTheme.serif). Every sheet
 * already routes serif surfaces through var(--serif, "Domine", …),
 * but the font files were never shipped, so the whole register
 * rendered Georgia until Elevation B1 self-hosted this variable
 * woff2 (latin subset, wght 400–700, 28KB — one file serves 500 +
 * 700). Reserved for editorial registers per DESIGN_LANGUAGE L2.3:
 * greetings, headlines, pull-quotes, the bio-age numeral — never
 * data surfaces. */
@font-face {
  font-family: "Domine";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/domine-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand
   *
   * 2026-05-08 design pass - slightly desaturated teal so it
   * doesn't fight the cream background, plus a warm-cream
   * neutral palette that reads more "Levels Health" / less
   * "Bootstrap default". The teal-700 (deep) is now the
   * primary text-on-brand and CTA fill; teal-500 reserved for
   * accents and rings. teal-100 is whisper-soft (used for
   * tinted surfaces, not as a brand mark).
   */
  --teal-50:  #F2F8F6;
  --teal-100: #DDEEEA;
  --teal-200: #B7DDD4;
  --teal-300: #74C7BA;
  --teal-500: #0E8479;          /* accent */
  --teal-600: #0A6A61;
  --teal-700: #07564F;          /* primary text-on-brand + CTAs */
  --teal-800: #06453F;

  --amber-500: #F2A93B;
  --lavender-500: #8E73DE;
  --crimson-500: #C9343A;

  /* Neutrals - warm cream / cool ink, optimised for clinical-
   * credible read. Pure-white hot-spots are reserved for cards
   * that need to feel "lifted" off the cream. */
  --ink:    #0E1E1E;
  --ink-2:  #1F2D2D;
  --ink-3:  #4A5757;
  --ink-4:  #768181;
  --ink-5:  #A6AEAE;

  --line:        rgba(14, 30, 30, 0.08);
  --line-strong: rgba(14, 30, 30, 0.14);

  --bg:    #FAFAF6;          /* warm cream background */
  --bg-2:  #F3F1EA;          /* secondary cream */
  --bg-3:  #EBE8DD;          /* tertiary stripe */
  --surface:      #FFFFFF;
  --surface-tint: rgba(255, 255, 255, 0.86);

  /* Effects - softer + warmer; less dramatic than v1 */
  --shadow-xs: 0 1px 1px rgba(14, 30, 30, 0.04);
  --shadow-sm: 0 1px 2px rgba(14, 30, 30, 0.04), 0 2px 6px rgba(14, 30, 30, 0.04);
  --shadow-md: 0 6px 18px rgba(14, 30, 30, 0.06), 0 18px 40px rgba(14, 30, 30, 0.05);
  --shadow-lg: 0 24px 60px rgba(14, 30, 30, 0.10), 0 60px 120px rgba(14, 30, 30, 0.08);
  --shadow-glow: 0 0 0 1px rgba(7, 86, 79, 0.06);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 40px;
  --r-full: 999px;

  /* Layout */
  --container: 1200px;
  --container-wide: 1320px;
  --gutter: clamp(16px, 4vw, 36px);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* iter63 — brand aliases so every page can use the same identity
     variables the homepage hero uses inline. Without this, sub-pages
     that reference var(--display), var(--teal), var(--teal-deep),
     var(--sans), var(--ink-mute) fall through to browser defaults. */
  --sans: var(--font-sans);
  --display: var(--font-sans);
  --serif: "Domine", "Georgia", "Times New Roman", serif;
  --teal:       var(--teal-500);
  --teal-deep:  var(--teal-700);
  --teal-soft:  var(--teal-100);
  --ink-mute:   var(--ink-3);
  --rule:        var(--line);
  --rule-soft:   rgba(14, 30, 30, 0.05);
  --bg-soft:     var(--bg-2);
  --side:        clamp(20px, 5vw, 64px);

  /* Three surface registers (DESIGN_LANGUAGE L7.9) — Elevation B1.
     1 canvas (page background) · 2 resting card (content at rest) ·
     3 elevated instrument (interactive / live objects). Page sheets
     should route card surfaces through these instead of hardcoding
     #FFFFFF, so B2's dark mode can flip every register in one place. */
  --canvas:          var(--bg);
  --card:            var(--surface);
  --card-line:       var(--line);
  --card-shadow:     var(--shadow-sm);
  --elevated:        var(--surface);
  --elevated-shadow: var(--shadow-md);

  /* --mk-* text tokens are consumed by every page group (B2
     tokenized the old #15161A/#4A5071 literals against them), so
     they live HERE, not just in marketing.css — blog/legal/tools
     pages don't load that sheet. */
  --mk-ink: #15161A;
  --mk-muted: #4A5071;
}

/* Theme history: 2026-05-08 shipped light-only (the auto-dark of
   the day produced a low-contrast read). 2026-07-09 Steven reversed
   it for a REAL dark theme: light remains the default brand canvas;
   dark is a full token set (see the Dark mode block at the end of
   this file) applied via data-theme="dark" (toggle in the shared
   chrome, boot in /lib/theme-boot.js) or OS preference when no
   explicit choice is stored. The landing page stays light by
   explicit data-theme="light" (artwork exemption). */

/* ───── Reset ───── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-600); text-decoration: none; transition: color 120ms ease; }
a:hover { color: var(--teal-700); }
button { font: inherit; }

/* iter72 — brand text-selection colour. Was inline on the homepage
   only; hoisted here so every page that loads main.css picks it up.
   Steven: "When you highlight text on the homepage it's green, our
   brand colour. I like it, add it to all pages." */
::selection      { background: var(--teal); color: #fff; }
::-moz-selection { background: var(--teal); color: #fff; }
hr { border: 0; height: 1px; background: var(--line); margin: 24px 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ───── Type scale
 *
 * 2026-05-08 design pass - round weights (400/500/600/700)
 * because system fonts render those crispest. Tighter
 * letter-spacing on display sizes for editorial feel. The
 * lead text is darker (var(--ink-2)) so the body→display
 * hierarchy is clear at first glance.
 */
.h-display {
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.45em;
}
.h1 {
  font-size: clamp(1.9rem, 4.2vw, 3.05rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5em;
}
.h2 {
  font-size: clamp(1.45rem, 2.7vw, 2rem);
  line-height: 1.16;
  letter-spacing: -0.022em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
}
.h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.4em;
}
.lead {
  font-size: clamp(1.08rem, 1.55vw, 1.275rem);
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  font-weight: 400;
  max-width: 56ch;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-700);
  font-weight: 600;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}
.muted { color: var(--ink-4); }
.text-gradient {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ───── Layout
 *
 * 2026-05-08 design pass - wider default container so
 * sections breathe at typical desktop widths. Section
 * padding bumped 56→72 min, 120→160 max - more editorial.
 */
.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin: 0 auto;
}
.container-wide {
  width: min(var(--container-wide), 100% - var(--gutter) * 2);
  margin: 0 auto;
}
.section {
  padding: clamp(72px, 10vw, 160px) 0;
}
.section-tight { padding: clamp(48px, 6vw, 88px) 0; }
.skip-link {
  position: absolute;
  top: -100px; left: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  z-index: 1000;
}
.skip-link:focus { top: 8px; }
:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ───── Buttons
 *
 * 2026-05-08 design pass - primary CTA fills with deep teal
 * (was near-black). Reads more clearly as the brand action,
 * plays better on the cream bg, and subtly elevates on hover
 * via translate + deeper shadow.
 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal-700);
  color: #FFFFFF;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset,
              0 6px 16px rgba(7, 86, 79, 0.20),
              0 2px 4px rgba(7, 86, 79, 0.10);
}
.btn-primary:hover {
  background: var(--teal-800);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset,
              0 10px 24px rgba(7, 86, 79, 0.26),
              0 3px 6px rgba(7, 86, 79, 0.14);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: 0 1px 1px rgba(14, 30, 30, 0.04);
}
.btn-secondary:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--ink-4);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--bg-2); }
.btn-lg { height: 54px; padding: 0 26px; font-size: 1.025rem; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-md);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.appstore-badge:hover { background: var(--ink-2); color: var(--bg); }

/* Generic Apple-glyph used both in the appstore-badge and as a
 * decorative leading mark on primary "Get the app" CTAs. Pure
 * CSS - uses an inline SVG mask so it inherits the button's
 * current foreground color. */
.apple-mark {
  display: inline-block;
  width: 14px; height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M19.32 16.79c-.31.71-.68 1.36-1.11 1.96-.59.81-1.07 1.37-1.44 1.69-.58.5-1.2.76-1.86.78-.48 0-1.05-.13-1.72-.41-.67-.27-1.29-.4-1.86-.4-.59 0-1.22.13-1.91.4-.69.28-1.24.42-1.66.44-.64.03-1.27-.24-1.9-.79-.4-.34-.9-.92-1.49-1.74C2.5 17.86 1.96 16.84 1.5 15.7 1 14.49.75 13.32.75 12.18c0-1.31.28-2.43.85-3.39.45-.76 1.04-1.36 1.79-1.8.74-.45 1.55-.68 2.42-.69.51 0 1.18.16 2.02.46.84.31 1.38.46 1.62.46.18 0 .77-.18 1.78-.55.95-.34 1.76-.48 2.42-.42 1.79.14 3.13.84 4.03 2.1-1.6 1-2.4 2.39-2.39 4.18.01 1.39.51 2.55 1.5 3.47.45.42.95.75 1.51.97-.12.34-.25.66-.39.97zM14.86 1.7c0 .98-.36 1.89-1.07 2.74-.86 1.01-1.9 1.59-3.03 1.5-.01-.12-.02-.24-.02-.37 0-.94.41-1.94 1.13-2.77.36-.42.83-.77 1.39-1.04.56-.27 1.09-.42 1.59-.45.01.13.01.26.01.39z'/></svg>") center/14px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M19.32 16.79c-.31.71-.68 1.36-1.11 1.96-.59.81-1.07 1.37-1.44 1.69-.58.5-1.2.76-1.86.78-.48 0-1.05-.13-1.72-.41-.67-.27-1.29-.4-1.86-.4-.59 0-1.22.13-1.91.4-.69.28-1.24.42-1.66.44-.64.03-1.27-.24-1.9-.79-.4-.34-.9-.92-1.49-1.74C2.5 17.86 1.96 16.84 1.5 15.7 1 14.49.75 13.32.75 12.18c0-1.31.28-2.43.85-3.39.45-.76 1.04-1.36 1.79-1.8.74-.45 1.55-.68 2.42-.69.51 0 1.18.16 2.02.46.84.31 1.38.46 1.62.46.18 0 .77-.18 1.78-.55.95-.34 1.76-.48 2.42-.42 1.79.14 3.13.84 4.03 2.1-1.6 1-2.4 2.39-2.39 4.18.01 1.39.51 2.55 1.5 3.47.45.42.95.75 1.51.97-.12.34-.25.66-.39.97zM14.86 1.7c0 .98-.36 1.89-1.07 2.74-.86 1.01-1.9 1.59-3.03 1.5-.01-.12-.02-.24-.02-.37 0-.94.41-1.94 1.13-2.77.36-.42.83-.77 1.39-1.04.56-.27 1.09-.42 1.59-.45.01.13.01.26.01.39z'/></svg>") center/14px no-repeat;
  flex-shrink: 0;
}
.appstore-badge .apple-mark {
  width: 22px; height: 22px;
  -webkit-mask-size: 22px;
          mask-size: 22px;
  margin-bottom: 0;
}
.appstore-badge .badge-line { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore-badge .badge-line .small { font-size: 0.68rem; opacity: 0.78; }
.appstore-badge .badge-line .big { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }

/* ───── Pills + tags ───── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--teal-700);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.pill .pill-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(14, 132, 121, 0.16);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--bg-3);
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
}

/* ───── Cards ───── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.card-flat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card .card-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--teal-100);
  color: var(--teal-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.25rem;
}

/* ───── Grids ───── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 880px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ───── Nav
 *
 * 2026-05-08 design pass - taller bar (72px), more
 * generous logo size, refined nav-link hover that's a thin
 * underline tick rather than a pilled background. Reads
 * editorial / premium.
 */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.022em;
  font-size: 1.15rem;
}
.nav-logo:hover { color: var(--ink); }
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  color: var(--ink-3);
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--r-sm);
  transition: color 160ms ease;
  position: relative;
}
.nav-link:hover { color: var(--ink); background: transparent; }
.nav-link.is-active { color: var(--ink); background: transparent; }
.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: -22px;
  height: 2px;
  background: var(--teal-700);
  border-radius: 2px;
}

/* Nav dropdown - used when a NAV_LINKS entry has children.
   Renders as a button trigger + a panel that toggles via
   `[data-dropdown].is-open`. The trigger itself looks
   identical to a regular .nav-link plus a chevron glyph. */
.nav-link-dropdown {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link-dropdown[aria-expanded="true"] { color: var(--ink); }
.nav-link-dropdown[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}
.nav-chevron {
  transition: transform 200ms ease;
  color: var(--ink-4);
}
.nav-has-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 60;
}
.nav-dropdown.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.nav-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-subitem {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--ink);
  transition: background 160ms ease;
}
.nav-subitem:hover { background: var(--bg-2); color: var(--ink); }
.nav-sublabel-title {
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}
.nav-sublabel {
  font-size: 0.83rem;
  color: var(--ink-4);
  line-height: 1.3;
}

/* Mobile menu - flatten dropdowns into a labelled group */
.mobile-group {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.mobile-group-label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
  padding: 8px 0 4px;
}
.mobile-group-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-cta { margin-left: 8px; }

/* ───── Nav-right auth slot
 *
 * 2026-05-09 sub-agent rebuild - replaces the v2 cosmetic
 * text-swap. Layout:
 *
 *   [logo] [---nav-links---]    [Home] [Avatar▾]   <- signed in
 *   [logo] [---nav-links---]    [Sign in] [Get the app]   <- signed out
 *
 * The .nav-right wrapper holds whichever slot is appropriate;
 * `chrome.js` decides which markup to inject. */
.nav-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
@media (max-width: 720px) {
  .nav-right { display: none; }
}

.nav-auth-link {
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-full);
  color: var(--ink-2);
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 160ms ease, background 160ms ease;
}
.nav-auth-link:hover {
  color: var(--ink);
  background: var(--bg-2);
}

.nav-home-link {
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-full);
  color: var(--ink-2);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 1px rgba(14, 30, 30, 0.04);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 140ms ease;
}
.nav-home-link:hover {
  color: var(--ink);
  border-color: var(--ink-4);
  transform: translateY(-1px);
}
.nav-home-link:active { transform: translateY(0); }
.nav-home-icon { color: var(--teal-700); }

/* Avatar button - round, 40×40, identity at-a-glance.
 * Image fills if avatar_url; gradient + initial otherwise. */
.nav-account-wrap { position: relative; display: inline-block; }
.nav-avatar {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, var(--teal-200), var(--teal-500));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: box-shadow 160ms ease, transform 140ms ease, border-color 160ms ease;
}
.nav-avatar:hover {
  box-shadow: 0 6px 14px rgba(7, 86, 79, 0.18);
  border-color: var(--teal-500);
  transform: translateY(-1px);
}
.nav-avatar:active { transform: translateY(0); }
.nav-avatar:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
}
.nav-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.nav-avatar-seed {
  display: inline-block;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}
.nav-avatar[aria-expanded="true"] {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(14, 132, 121, 0.18);
}

/* Account menu - opens below avatar, right-aligned. */
.nav-account-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 8px;
  z-index: 60;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.nav-account-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.nav-account-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.nav-account-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-200), var(--teal-500));
  color: #fff; font-weight: 700; font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.nav-account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav-account-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nav-account-name {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-account-handle {
  color: var(--ink-4);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-account-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-account-links li:not(.nav-menu-divider) > a,
.nav-account-links li > .nav-menu-signout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 140ms ease, color 140ms ease;
}
.nav-account-links li > a:hover,
.nav-account-links li > .nav-menu-signout:hover {
  background: var(--bg-2);
  color: var(--ink);
}
.nav-account-links svg {
  flex-shrink: 0;
  color: var(--ink-4);
}
.nav-account-links li > a:hover svg,
.nav-account-links li > .nav-menu-signout:hover svg {
  color: var(--teal-700);
}
.nav-menu-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}
.nav-menu-signout {
  color: var(--crimson-500) !important;
}
.nav-menu-signout:hover {
  background: rgba(201, 52, 58, 0.08) !important;
  color: var(--crimson-500) !important;
}
.nav-menu-signout:hover svg {
  color: var(--crimson-500) !important;
}

/* Condensed nav state - kicks in past 32px scroll. Tighter
 * height + a more pronounced glass background so the bar
 * separates from page content. */
.nav.nav-condensed {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom-color: var(--line-strong);
  box-shadow: 0 4px 14px rgba(14, 30, 30, 0.04);
}
.nav.nav-condensed .nav-inner {
  height: 64px;
}

/* Mobile account block - appears in the slide-in menu when the
 * user is signed in. */
.mobile-account {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.mobile-account-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.mobile-account-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-200), var(--teal-500));
  color: #fff; font-weight: 700; font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.mobile-account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mobile-account-meta {
  display: flex;
  flex-direction: column;
}
.mobile-account-meta strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.04rem;
}
.mobile-account-meta span {
  color: var(--ink-4);
  font-size: 0.86rem;
}
.mobile-account-rows {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}
.mobile-account-rows a,
.mobile-account-rows .mobile-account-signout {
  display: block;
  text-align: left;
  padding: 14px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  font: inherit;
  color: var(--ink);
  font-weight: 500;
  font-size: 1.05rem;
  cursor: pointer;
}
.mobile-account-signout {
  color: var(--crimson-500) !important;
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background 160ms ease, border-color 160ms ease;
}
.nav-toggle:hover { background: var(--bg-2); }
.nav-toggle:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}
.nav-toggle span {
  position: relative;
  width: 16px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: background 200ms ease;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: top 200ms ease, transform 200ms ease;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }
/* Open-state: hamburger morphs into an X */
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle.is-open span::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}

.mobile-menu {
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 16px var(--gutter) 24px;
  z-index: 49;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu a {
  display: block;
  padding: 14px 4px;
  color: var(--ink);
  font-weight: 500;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { margin-top: 16px; }

/* ───── Footer ─────────────────────────────────────────
 * iter63 — unified with the homepage's .colophon so every page
 * (homepage + sub-pages via chrome.js) shares the same dark
 * editorial footer with social icons + brand-teal hover.
 * Marketing.css used to ship a separate `.footer` shell; chrome.js
 * now emits .colophon markup that resolves against these styles. */
footer.colophon {
  /* Literal, not var(--ink): --ink flips to #E9EEEA in dark mode, which
     turned this "dark editorial footer" pale grey under its own pale
     text (1.2-1.7:1 on every sub-page for OS-dark visitors, audit F190
     sweep). #0E1E1E is the light-theme --ink, so light is unchanged. */
  background: #0E1E1E;
  color: #B8BAC0;
  padding: 64px var(--side) 48px;
  margin: 0;
}
footer.colophon a {
  color: #B8BAC0;
  text-decoration: none;
  transition: color 180ms ease;
}
footer.colophon a:hover { color: var(--teal-soft); }
footer.colophon .grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px;
  max-width: 1200px; margin: 0 auto;
}
@media (max-width: 880px) { footer.colophon .grid { grid-template-columns: 1fr 1fr; } }
footer.colophon .brand-col .brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-weight: 800; font-size: 22px;
  color: #fff; letter-spacing: -0.02em;
  margin-bottom: 14px;
  text-decoration: none;
}
footer.colophon .brand-col .brand img {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: block;
}
footer.colophon .brand-col p {
  font-size: 14px; max-width: 30ch; line-height: 1.55; margin-bottom: 20px;
}
footer.colophon .brand-col .socials {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0; padding: 0; list-style: none;
}
footer.colophon .brand-col .socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  color: #B8BAC0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: color 200ms ease, background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
footer.colophon .brand-col .socials a:hover {
  color: var(--teal-soft);
  background: rgba(15,148,139,0.14);
  border-color: rgba(191,227,224,0.3);
  transform: translateY(-2px);
}
footer.colophon .brand-col .socials svg {
  width: 17px; height: 17px;
  display: block;
}
footer.colophon h5 {
  font-family: var(--display);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: #fff; margin: 0 0 16px;
}
footer.colophon ul {
  display: grid; gap: 10px;
  font-size: 14px;
  list-style: none; padding: 0; margin: 0;
}
footer.colophon .legal {
  max-width: 1200px; margin: 56px auto 0;
  padding-top: 32px; border-top: 1px solid #2A2C33;
  display: flex; justify-content: space-between;
  font-size: 12px; color: #6E707A; flex-wrap: wrap; gap: 16px;
}

/* ───── Hero
 *
 * 2026-05-08 design pass - softer warm ambient glow (no
 * neon orbs), more breathing room top + bottom, the hero
 * meta strip is now a 3-up grid with subtle dividers
 * instead of a casual flex line.
 */
.hero {
  position: relative;
  padding: clamp(72px, 11vw, 144px) 0 clamp(56px, 9vw, 120px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(116, 199, 186, 0.16), transparent 70%),
    radial-gradient(50% 40% at 10% 90%, rgba(242, 169, 59, 0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-bg-orb {
  /* legacy orbs kept as no-op so existing markup doesn't break */
  display: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 7vw, 80px);
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-art { order: -1; max-width: 320px; margin: 0 auto; }
}
.hero-copy .pill { margin-bottom: 28px; }
.hero-copy .lead { margin-bottom: 36px; max-width: 50ch; }
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-meta {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 0.88rem;
  color: var(--ink-3);
}
.hero-meta span {
  flex: 1 1 120px;
  padding-right: 18px;
  position: relative;
}
.hero-meta span + span {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.hero-meta strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  margin-bottom: 2px;
  line-height: 1;
}

/* Real-screenshot iPhone frame - used in hero + app pages.
 *
 * 2026-05-08 design pass - refined chrome to read as a real
 * Apple device shot. Tight 7px bezel (was 12px), gradient
 * runs near-black to graphite, two layered insets for the
 * screen-edge highlight, deeper softer shadow stack so the
 * phone "lifts" off the cream background.
 */
.phone-real {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  background: linear-gradient(150deg, #2A3232 0%, #161D1D 50%, #0A1010 100%);
  border-radius: 48px;
  padding: 7px;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.08) inset,
    0 1px 0 rgba(255, 255, 255, 0.10) inset,
    0 0 0 1px rgba(14, 30, 30, 0.06),
    0 20px 50px -10px rgba(14, 30, 30, 0.18),
    0 40px 90px -20px rgba(14, 30, 30, 0.14);
}
.phone-real img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 41px;
  background: var(--surface);
}
@media (max-width: 920px) {
  .phone-real { width: min(100%, 280px); border-radius: 42px; padding: 6px; }
  .phone-real img { border-radius: 36px; }
}

/* Phone mock - hand-built, no image required */
.phone {
  position: relative;
  width: min(100%, 360px);
  margin: 0 auto;
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(150deg, #1A2A2A, #0B1414);
  border-radius: 44px;
  padding: 14px;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.10) inset,
    var(--shadow-lg);
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 32px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4FAF7 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  gap: 14px;
}
.phone-notch {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 24px;
  background: #0B1414;
  border-radius: 14px;
  z-index: 1;
}
.phone .pill { background: rgba(15, 148, 139, 0.12); color: var(--teal-700); font-size: 0.7rem; padding: 4px 10px; }
.phone-section-label { font-size: 0.7rem; color: var(--ink-4); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }

.phone-ring {
  position: relative;
  width: 132px; height: 132px;
  margin: 6px auto 4px;
  border-radius: 999px;
  background: conic-gradient(from 200deg, var(--teal-500), var(--teal-300), var(--teal-500));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 14px var(--surface);
}
.phone-ring::after {
  content: '';
  position: absolute; inset: 14px;
  border-radius: 999px;
  background: var(--surface);
}
.phone-ring-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.05;
}
.phone-ring-inner small { display: block; color: var(--ink-4); font-size: 0.65rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.phone-ring-inner strong { font-size: 1.6rem; font-weight: 660; letter-spacing: -0.02em; color: var(--teal-700); }
.phone-ring-inner .delta { color: var(--teal-600); font-size: 0.72rem; margin-top: 2px; display: block; font-weight: 500; }

.phone-tile {
  background: var(--bg-2);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
}
.phone-tile .label { color: var(--ink-4); font-size: 0.72rem; }
.phone-tile .value { font-weight: 660; color: var(--ink); letter-spacing: -0.01em; }
.phone-tile-row { display: flex; gap: 8px; }
.phone-tile-row > * { flex: 1; }
.phone-progress {
  height: 6px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.phone-progress > span {
  display: block;
  height: 100%;
  width: 78%;
  background: linear-gradient(90deg, var(--teal-500), var(--teal-300));
  border-radius: 999px;
}

/* ───── Logo bar
 *
 * 2026-05-08 design pass - replaced the text-only span list
 * with monochrome SVG wordmarks under `web/logos/`. Each
 * mark is `currentColor`-filled, sized to a 32px row, faded
 * to ~50% opacity so it reads as a "supports these brands"
 * strip instead of a logo gallery. Hover lifts to full
 * opacity for a moment of brand-recognition reward.
 */
.logobar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 16px 0;
  color: var(--ink-3);
}
.logobar-label {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-5);
  font-weight: 600;
}
.logobar-marks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 28px 56px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.logobar-marks li {
  display: inline-flex;
  align-items: center;
}
.logobar-marks img {
  height: 28px;
  width: auto;
  display: block;
  /* Default: brightness(0) collapses every brand colour to
     pure black, then opacity fades it to a uniform muted
     grey across all seven marks regardless of their native
     hue. Hover removes the filter so each mark snaps to
     its real brand colour. */
  filter: brightness(0);
  opacity: 0.42;
  transition: opacity 240ms ease, filter 240ms ease, transform 240ms ease;
}
.logobar-marks li {
  cursor: default;
}
.logobar-marks li:hover img {
  opacity: 1;
  filter: none;
  transform: translateY(-1px);
}
@media (max-width: 720px) {
  .logobar-marks { gap: 22px 36px; }
  .logobar-marks img { height: 24px; }
}

/* ───── Pillars
 *
 * 2026-05-08 design pass - softer default card (subtle
 * shadow always, more lift on hover), bigger pillar number
 * with teal-700 fill (was teal-100 wash), more refined text
 * sizing.
 */
.pillar-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-xs);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 220ms ease,
              border-color 220ms ease;
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.pillar-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--teal-700);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 22px;
  letter-spacing: -0.012em;
  box-shadow: 0 4px 10px rgba(7, 86, 79, 0.20);
}
.pillar-card h3 { margin-bottom: 12px; font-size: 1.225rem; letter-spacing: -0.018em; }
.pillar-card p { color: var(--ink-3); font-size: 0.96rem; line-height: 1.55; margin: 0 0 22px; }
.pillar-card .pillar-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

/* ───── Trust strip
 *
 * 2026-05-08 design pass - surface (white) cards on the
 * cream section bg so the content sits forward; thin line
 * + subtle shadow so it reads precise, not floppy.
 */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(32px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 220ms ease, transform 220ms ease;
}
.trust-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.trust-card .h3 { font-size: 1.4rem; letter-spacing: -0.022em; line-height: 1.18; }
.trust-card p {
  color: var(--ink-3);
  margin: 6px 0 18px;
  line-height: 1.55;
  font-size: 1rem;
}
.link-arrow {
  color: var(--teal-700);
  font-weight: 600;
  text-decoration: none;
  margin-top: auto;
  font-size: 0.93rem;
  letter-spacing: -0.005em;
  transition: color 160ms ease, transform 160ms ease;
  display: inline-flex;
  gap: 4px;
}
.link-arrow:hover { color: var(--teal-800); transform: translateX(2px); }
@media (max-width: 760px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ───── Stats row
 *
 * 2026-05-08 design pass - drop the boxed background,
 * bigger numbers, hairline dividers between cells. Reads
 * as editorial proof points instead of a dashboard tile.
 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 32px 0;
  background: transparent;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats > div {
  padding: 8px 24px;
  position: relative;
  text-align: left;
}
.stats > div + div::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 1px;
  background: var(--line);
}
.stat-num {
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: 0.84rem; color: var(--ink-4); }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ───── Testimonials
 *
 * 2026-05-08 - replaced the placeholder dashed-border slot
 * with a 2x2 testimonial grid. Each card has the quote
 * (largest element), then a horizontal author row with
 * a circular avatar mark + name + role.
 *
 * Avatar uses CSS attr() to render the initials from the
 * data-avatar attribute on the span. No image dependency.
 */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 880px) {
  .testimonials-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(28px, 3.5vw, 40px);
  margin: 0;
  box-shadow: var(--shadow-xs);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 220ms ease,
              border-color 220ms ease;
  position: relative;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.testimonial-card blockquote {
  font-size: 1.075rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
  position: relative;
}
.testimonial-card blockquote::before {
  content: '\201C';
  position: absolute;
  top: -32px;
  left: -4px;
  font-size: 4rem;
  font-weight: 700;
  color: var(--teal-200);
  line-height: 1;
  pointer-events: none;
}
.testimonial-card blockquote em { font-style: italic; }

.testimonial-card figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(7, 86, 79, 0.18);
}
.testimonial-avatar::before {
  content: attr(data-avatar);
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.testimonial-name {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.testimonial-role {
  font-size: 0.86rem;
  color: var(--ink-4);
  letter-spacing: -0.005em;
}

/* ───── CTA banner ───── */
.cta {
  text-align: center;
  padding: clamp(64px, 9vw, 120px) 0;
  position: relative;
  background:
    radial-gradient(circle at 30% 20%, var(--teal-100), transparent 50%),
    radial-gradient(circle at 70% 80%, color-mix(in srgb, var(--lavender-500) 25%, transparent), transparent 55%),
    var(--bg);
}
.cta-inner { max-width: 720px; margin: 0 auto; }
.cta .h-display { margin-bottom: 16px; }
.cta .lead { margin: 0 auto 32px; }
.cta-cta-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ───── Learn page ───── */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 980px) { .learn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .learn-grid { grid-template-columns: 1fr; } }
.track-card {
  display: block;
  position: relative;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  color: var(--ink);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  overflow: hidden;
}
.track-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); color: var(--ink); }
.track-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
  color: white;
}
.track-card h3 { margin-bottom: 6px; }
.track-card p { color: var(--ink-3); font-size: 0.92rem; margin: 0 0 16px; }
.track-card .track-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.82rem;
  color: var(--ink-4);
}
.track-card .track-arrow {
  position: absolute;
  top: 24px; right: 24px;
  color: var(--ink-5);
  font-size: 1rem;
  transition: transform 200ms ease, color 200ms ease;
}
.track-card:hover .track-arrow { color: var(--teal-600); transform: translate(2px, -2px); }

.learn-toc {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 32px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  font-size: 0.78rem;
  color: var(--ink-4);
}
.learn-toc strong { color: var(--ink); display: block; font-size: 0.86rem; margin-bottom: 2px; }
@media (max-width: 880px) { .learn-toc { grid-template-columns: repeat(2, 1fr); } }

.learn-section {
  margin-bottom: 56px;
}
.learn-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.learn-section-head h2 { margin: 0; }
.learn-section-head .count { color: var(--ink-4); font-size: 0.86rem; }

/* ───── Science page ───── */
.science-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
  padding: 0 0 80px;
}
@media (max-width: 880px) {
  .science-shell { grid-template-columns: 1fr; gap: 32px; }
  .science-toc { position: static; max-height: none; }
}
.science-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-size: 0.86rem;
}
.science-toc h4 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--ink-4);
  margin: 0 0 12px;
  font-weight: 600;
}
.science-toc a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: 0.88rem;
  margin-bottom: 2px;
  border-left: 2px solid transparent;
}
.science-toc a:hover { background: var(--bg-2); color: var(--ink); }
.science-toc a.is-current { background: var(--bg-2); border-left-color: var(--teal-500); color: var(--ink); }

.science-body { max-width: 720px; line-height: 1.65; }
.science-body h2 {
  margin-top: 64px;
  padding-top: 16px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.018em;
}
.science-body h2:first-of-type { margin-top: 0; padding-top: 0; }
.science-body h3 {
  margin-top: 32px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.science-body p { color: var(--ink-2); margin: 12px 0; }
.science-body ul, .science-body ol { color: var(--ink-2); padding-left: 18px; }
.science-body li { margin-bottom: 6px; }
.science-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}
.science-body th, .science-body td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.science-body th {
  background: var(--bg-2);
  font-weight: 600;
  font-size: 0.84rem;
}
.science-body code {
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.86em;
}
.science-body blockquote.cite {
  margin: 16px 0;
  padding: 14px 18px;
  background: var(--bg-2);
  border-left: 3px solid var(--teal-500);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 0.9rem;
  color: var(--ink-3);
  font-style: normal;
}
.science-body blockquote.cite strong { color: var(--ink); font-weight: 600; }

.science-key {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 48px;
}
.science-key .key-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.science-key .key-num {
  font-size: 1.75rem;
  font-weight: 660;
  color: var(--teal-700);
  letter-spacing: -0.02em;
  line-height: 1;
}
.science-key .key-label { font-size: 0.85rem; color: var(--ink-4); margin-top: 6px; }
@media (max-width: 720px) {
  .science-key { grid-template-columns: 1fr; }
}

/* ───── App page ───── */
.app-hero {
  padding: clamp(64px, 9vw, 100px) 0 0;
}
.app-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) {
  .app-hero-grid { grid-template-columns: 1fr; }
}
.system-req {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  padding: 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.system-req dt { color: var(--ink-4); font-size: 0.86rem; margin-bottom: 4px; }
.system-req dd { margin: 0 0 4px; font-weight: 500; color: var(--ink); }

.screenshot-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 24px 0;
  align-items: start;
}
.screenshot-strip .phone-real {
  margin: 0;
  width: 100%;
}
.screenshot-strip .phone-real img {
  width: 100%;
}
.screenshot-strip figcaption {
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-4);
  text-align: center;
}
@media (max-width: 1080px) {
  .screenshot-strip { grid-template-columns: repeat(3, 1fr); }
  .screenshot-strip .phone-real:nth-child(n+4) { display: none; }
}
@media (max-width: 720px) {
  .screenshot-strip { grid-template-columns: 1fr 1fr; gap: 20px; }
  .screenshot-strip .phone-real:nth-child(n+3) { display: none; }
}
/* Legacy screenshot-shell preserved in case any page still references it */
.screenshot-shell {
  aspect-ratio: 9 / 19.5;
  background: var(--bg-2);
  border: 1.5px dashed var(--line-strong);
  border-radius: 30px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.screenshot-shell small {
  color: var(--ink-4);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ───── FAQ ───── */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink-4);
  transition: transform 160ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.95rem;
}

/* ───── Util ───── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 24px; }
.mb-6 { margin-bottom: 36px; }
.mt-4 { margin-top: 24px; }
.mt-6 { margin-top: 36px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

/* Basic fade-in once visible */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ───── Hero tertiary links - quiet text-link row under the
 *  primary CTAs. Used on the homepage to expose Science +
 *  Community without crowding the headline-CTAs. */
.hero-tertiary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 0;
  color: var(--ink-4);
  font-size: 0.92rem;
}
.hero-tertiary a {
  color: var(--teal-700);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}
.hero-tertiary a:hover {
  color: var(--teal-800);
  border-bottom-color: var(--teal-700);
}
@media (max-width: 720px) {
  .hero-tertiary { justify-content: center; }
}

/* ───── Try-it strip on the homepage
 *
 * 2026-05-09 cross-tab pass - three bright, clickable surfaces
 * pointing at /bio-age, /what-if, and /feed so anonymous
 * visitors have an obvious "do something with this" path
 * besides "Get the app". Each card has a hover lift, a colored
 * top accent border that hints which surface it's pointing at,
 * and a clearly-marked CTA. */
.try-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}
@media (max-width: 880px) {
  .try-grid { grid-template-columns: 1fr; }
}
.try-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  text-decoration: none;
  color: var(--ink);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  overflow: hidden;
}
.try-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal-500), var(--teal-700));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.try-card-bioage::before { background: linear-gradient(90deg, var(--teal-500), var(--teal-700)); }
.try-card-whatif::before { background: linear-gradient(90deg, var(--lavender-500), var(--teal-500)); }
.try-card-feed::before   { background: linear-gradient(90deg, var(--amber-500), var(--lavender-500)); }
.try-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.try-card-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--teal-700);
  font-weight: 700;
  margin-bottom: 4px;
}
.try-card h3 {
  margin: 0 0 4px;
  font-size: 1.18rem;
  letter-spacing: -0.018em;
  color: var(--ink);
}
.try-card p {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.96rem;
  line-height: 1.5;
}
.try-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--teal-700);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.005em;
  transition: color 160ms ease, transform 160ms ease;
}
.try-card:hover .try-card-cta {
  color: var(--teal-800);
  transform: translateX(2px);
}

/* ───── Cross-tab "next move" callouts
 *
 * Used inside auth-protected surfaces (home, doctor, trends, etc.)
 * to point at related surfaces. Solid background, prominent
 * arrow, hover-lift. */
.crosslink-strip {
  display: grid;
  gap: 12px;
  margin: 28px 0 4px;
}
@media (min-width: 720px) {
  .crosslink-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .crosslink-strip-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.crosslink-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--ink);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.crosslink-tile:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.crosslink-tile-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  background: var(--teal-100);
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.crosslink-tile-copy {
  flex: 1;
  min-width: 0;
}
.crosslink-tile-title {
  display: block;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.crosslink-tile-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  color: var(--ink-4);
}
.crosslink-tile-arrow {
  color: var(--ink-4);
  flex-shrink: 0;
  transition: transform 200ms ease, color 200ms ease;
}
.crosslink-tile:hover .crosslink-tile-arrow {
  color: var(--teal-700);
  transform: translateX(3px);
}

/* ───── Skeleton primitives (used by /home, /streak, /trends)
 *
 * Same shape across surfaces - replaces the mix of spinners and
 * plain "Loading…" text the audit flagged. */
@keyframes skel-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skel {
  display: block;
  background:
    linear-gradient(90deg,
      rgba(14, 30, 30, 0.05) 0%,
      rgba(14, 30, 30, 0.10) 50%,
      rgba(14, 30, 30, 0.05) 100%);
  background-size: 200% 100%;
  border-radius: var(--r-md);
  animation: skel-shimmer 1.5s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; background: rgba(14, 30, 30, 0.06); }
}
.skel-pill { border-radius: var(--r-full); height: 12px; }
.skel-line { height: 14px; }
.skel-block { border-radius: var(--r-lg); }

/* ───── Empty-state component (shared across surfaces) */
/* Global `[hidden]` reset. The web overhaul agent added a number
   of `.empty-state` / `.home-error` / `.home-loading` / etc.
   sections that ship with `display: grid` rules. Without this
   reset, the HTML `hidden` attribute (which is supposed to be
   equivalent to `display: none`) gets overridden by the more-
   specific class rule, and every state section renders at the
   same time. Symptom: "Couldn't load your home" error card
   showing on every fresh load even when init() has explicitly
   hidden it. !important is fine here because `hidden` is the
   absolute "do not render" semantic. */
[hidden] { display: none !important; }

.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 56px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
.empty-state-art {
  width: 96px; height: 96px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-100), var(--bg-2));
  color: var(--teal-700);
}
.empty-state h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  letter-spacing: -0.018em;
}
.empty-state p {
  margin: 0 0 22px;
  color: var(--ink-3);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 44ch;
}
.empty-state-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ────────────────────────────────────────────────────────────────
   2026-05-15 design pass 1/3 - type + rhythm refinements
   ────────────────────────────────────────────────────────────────

   The existing system is already strong. This pass tightens four
   things the audit flagged:
     1. Body line-height bumped 1.55 -> 1.625 on long-form paragraphs
        for easier scanning (matches the .lead 1.5 and gives more
        breathing room in legal / blog / FAQ content).
     2. Display sizes get tighter optical letter-spacing (-0.045em on
        h-display) so headlines read editorial, not corporate.
     3. A .measure utility (45ch / 65ch / 75ch) for content containers
        that need to cap their text width without inline styles.
     4. The .reveal transition gets a softer cubic-bezier and a small
        translate-Y so entrance feels intentional, not generic-fade.
*/

/* Long-form paragraph rhythm - kicks in inside .legal-copy,
   .blog-card-excerpt, .faq, .lead context, and any element that
   gets the explicit .prose class. Doesn't touch UI text in tiles
   / pills / labels. */
.prose, .legal-copy, .faq details > p, .blog-card-excerpt,
.changelog-body, .blog-list .blog-card p {
  line-height: 1.625;
}
.prose p, .legal-copy p { margin-bottom: 1em; }
.prose p:last-child, .legal-copy p:last-child { margin-bottom: 0; }

/* Tighter display letter-spacing on the biggest type - only
   touches h-display so the existing h1 / h2 / h3 / lead hierarchy
   stays the same. Reads as more editorial at full clamp size. */
.h-display { letter-spacing: -0.045em; }

/* Content-width utility - pairs nicely with .lead (already capped
   at 56ch). Use .measure / .measure-tight / .measure-wide on any
   block that should respect a readable measure. */
.measure        { max-width: 65ch; }
.measure-tight  { max-width: 45ch; }
.measure-wide   { max-width: 75ch; }

/* Reveal - softer entrance, slightly more travel. Uses the same
   cubic-bezier as the pillar-card hover (consistency). */
.reveal {
  transition: opacity 720ms cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: translateY(14px);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Stagger helper - when several .reveal siblings are inside the
   same section, the second / third / fourth child each gets a
   small entrance delay so the section feels composed rather than
   strobing all-at-once. */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal-stagger > .reveal { transition-delay: 0ms; }
}

/* Hero meta strip - slightly taller numerals so they earn the
   border-top divider above them. */
.hero-meta strong { font-size: 1.65rem; letter-spacing: -0.028em; }

/* Footer - slightly more air at the top so the section above
   doesn't feel pushed-up against the cream. */
.footer { padding-top: 72px; margin-top: 96px; }

/* ────────────────────────────────────────────────────────────────
   2026-05-15 design pass 2/3 - brand presence
   ────────────────────────────────────────────────────────────────

   Three small but high-impact moves:
     1. Footer signoff gets a live-dot + "Built in Glasgow" so the
        bottom of every page carries an identity beat (rather than
        the default copyright line that every site has).
     2. .hero-now - a one-line, time-aware "right now" strip that
        sits under the hero CTAs. The text rotates client-side so
        anon visitors landing twice see different beats. (See
        chrome.js wireHeroNow().)
     3. Card hover refinement - adds a faint teal glow under the
        existing translate + shadow so the lift reads "brand"
        rather than "generic Bootstrap card."
*/

/* Footer signoff - live dot reinforces "this is shipped, this
   is real, made by someone." */
.footer-signoff {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-4);
}
.footer-signoff-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(14, 132, 121, 0.18);
  animation: signoff-pulse 4s ease-in-out infinite;
}
@keyframes signoff-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(14, 132, 121, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(14, 132, 121, 0.06); }
}
@media (prefers-reduced-motion: reduce) {
  .footer-signoff-dot { animation: none; }
}

/* Hero "now" line - rendered as a small inline strip under the
   .hero-tertiary links. Reads as a live beat without trying to
   be a notification. */
.hero-now {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 8px 14px 8px 12px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-xs);
  transition: opacity 360ms ease, transform 360ms ease;
}
.hero-now-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(14, 132, 121, 0.16);
  animation: signoff-pulse 4s ease-in-out infinite;
  flex-shrink: 0;
}
.hero-now-text { font-variant-numeric: tabular-nums; }
.hero-now.is-fading { opacity: 0; transform: translateY(-2px); }
@media (max-width: 720px) {
  .hero-now { font-size: 0.82rem; }
}

/* Card hover refinement - adds a faint teal glow under the
   existing card-flat / pillar-card hover transform so the lift
   reads "brand" rather than "generic Bootstrap card." Stacks
   with the existing :hover rules, not a replacement. */
.pillar-card:hover {
  box-shadow:
    var(--shadow-md),
    0 0 0 1px rgba(14, 132, 121, 0.04),
    0 12px 36px -16px rgba(14, 132, 121, 0.18);
}
.try-card:hover {
  box-shadow:
    var(--shadow-md),
    0 0 0 1px rgba(14, 132, 121, 0.04),
    0 12px 36px -16px rgba(14, 132, 121, 0.20);
}

/* Reading progress bar - opt-in via body[data-reading-progress="true"].
   The bar transforms scaleX(0..1) tracked to scroll position so we
   avoid expensive width writes. */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.reading-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-500), var(--teal-700));
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 80ms linear;
}
@media (prefers-reduced-motion: reduce) {
  .reading-progress > span { transition: none; }
}

/* ────────────────────────────────────────────────────────────────
   2026-05-15 design pass 3/3 - wow flourishes
   ────────────────────────────────────────────────────────────────

   Small touches that AI is "not supposed to" do well: count-up
   stats that catch the eye, an animated tardigrade mascot in
   the footer (brand-relevant - it's already the iOS mascot),
   and the per-pillar number that subtly animates in.
*/

/* Stat count-up - the stat-num element fades in slightly raised
   then settles. The text content itself is animated via JS
   (wireCountUp); this rule handles the framing. */
.stat-num {
  font-variant-numeric: tabular-nums;
  display: inline-block;
}
.stats .reveal .stat-num,
.stats.is-visible .stat-num {
  /* keeps the natural reveal behaviour; the JS just rolls the
     digits, not the layout */
}

/* Pillar number reveal - the existing pillar-num gets a small
   delayed slide in once its parent .pillar-card has .is-visible.
   Pure CSS, depends on the IntersectionObserver setting
   .is-visible on the card. */
.pillar-card.reveal .pillar-num {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 520ms cubic-bezier(0.2, 0.8, 0.2, 1) 200ms,
              transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1) 200ms;
}
.pillar-card.reveal.is-visible .pillar-num {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .pillar-card.reveal .pillar-num { transition: none; }
}

/* ─── Tardigrade easter egg ──────────────────────────────────────
   The tardigrade is the iOS app's mascot. On the marketing site
   it lives in the page footer (rendered by chrome.js
   footerMarkup -> .footer-tardigrade) and does a slow happy
   sway. Click it and it does a small bounce. Pure SVG + CSS,
   no asset. The wandering tardigrade in the corner is also
   tagged with a tiny "hello from glasgow" tooltip on hover -
   the kind of detail people post about.
*/
.footer-tardigrade {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  cursor: pointer;
  position: relative;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: tardigrade-sway 7s ease-in-out infinite;
  transform-origin: 50% 80%;
}
.footer-tardigrade:hover { transform: translateY(-2px) scale(1.08); }
.footer-tardigrade:active { transform: translateY(-1px) scale(1.04); }
.footer-tardigrade.is-bouncing {
  animation: tardigrade-bounce 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-tardigrade-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--r-full);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.footer-tardigrade:hover .footer-tardigrade-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@keyframes tardigrade-sway {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(2deg); }
}
@keyframes tardigrade-bounce {
  0%   { transform: translateY(0)    scale(1); }
  35%  { transform: translateY(-12px) scale(1.10); }
  70%  { transform: translateY(0)    scale(0.96); }
  100% { transform: translateY(0)    scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .footer-tardigrade { animation: none; }
  .footer-tardigrade.is-bouncing { animation: none; transform: scale(1.05); }
}

/* Footer love-note - sits beside the tardigrade, only on long
   pages (i.e. anywhere with data-reading-progress="true" or the
   homepage). chrome.js handles whether to render it. */
.footer-love {
  display: block;
  text-align: center;
  color: var(--ink-4);
  font-size: 0.84rem;
  font-style: italic;
  margin: 0 auto 28px;
  max-width: 38ch;
  line-height: 1.5;
}


/* ── Waitlist form (homepage hero + final CTA) ─────────────────
   Prelaunch 2026-05-17. Compact email-capture form that mirrors
   the existing .btn-primary styling so the submit button feels
   like a first-class CTA, not a secondary form widget. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.waitlist-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 520px;
  margin: 24px 0 12px;
  align-items: stretch;
}

.waitlist-input {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--border, rgba(15, 148, 139, 0.25));
  background: var(--card, #fff);
  color: #1a1a1a;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.2;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  min-width: 0;
}

.waitlist-input:focus {
  border-color: var(--accent-strong, #0F948B);
  box-shadow: 0 0 0 3px rgba(15, 148, 139, 0.18);
}

.waitlist-input::placeholder {
  color: rgba(20, 30, 35, 0.45);
}

.waitlist-submit {
  white-space: nowrap;
}

.waitlist-form-msg {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  min-height: 1.3em;
  line-height: 1.4;
  color: var(--text-secondary, #4a4a4a);
}

.waitlist-form-msg[data-state="success"] {
  color: var(--accent-strong, #0F948B);
  font-weight: 600;
}

.waitlist-form-msg[data-state="error"] {
  color: var(--danger, #fa6159);
}

.waitlist-fine-print {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-tertiary, rgba(20, 30, 35, 0.55));
  line-height: 1.4;
}

/* Dark variant for the final-CTA section (which has a dark
   background in the existing .cta block). */
.waitlist-form-dark .waitlist-input {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.4);
  color: #1a1a1a;
}

.waitlist-form-dark .waitlist-form-msg {
  color: rgba(255, 255, 255, 0.82);
}

.waitlist-form-dark .waitlist-form-msg[data-state="success"] {
  color: #b6f0c8;
}

.waitlist-form-dark .waitlist-form-msg[data-state="error"] {
  color: #ffd0c9;
}

.waitlist-form-dark .waitlist-fine-print {
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 560px) {
  .waitlist-form {
    grid-template-columns: 1fr;
  }
  .waitlist-submit {
    width: 100%;
  }
}

.cta-secondary {
  margin-top: 18px;
  font-size: 0.95rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
}

.cta-secondary a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Homepage redesign iter 1 (2026-05-17) ─────────────────────
   Steven flagged the site as "quite obviously AI". This block
   replaces the template-y hero (orbs + numbered pillars +
   counters + testimonial-grid) with a more text-driven,
   editorial layout that reads like a single person built it.

   Future iters: typography pass, asymmetric layout, custom SVG
   illustrations for each loop, scroll-driven flourishes.
   ───────────────────────────────────────────────────────────── */

.hero-v2 {
  position: relative;
  padding: clamp(72px, 11vw, 144px) 0 clamp(48px, 8vw, 96px);
  overflow: hidden;
}

.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(0,0,0,0.6) 0.4px, transparent 0.6px),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.5) 0.4px, transparent 0.6px);
  background-size: 6px 6px, 7px 7px;
  background-position: 0 0, 3px 3px;
}

.hero-rule {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line, rgba(0,0,0,0.08)) 30%, var(--line, rgba(0,0,0,0.08)) 70%, transparent);
}

.hero-v2 .hero-grid {
  position: relative;
  z-index: 1;
}

.hero-byline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  color: var(--ink-3, #4a5568);
  font-size: 0.92rem;
  letter-spacing: -0.005em;
}

.hero-tardigrade {
  width: 36px;
  height: 26px;
  color: var(--accent-strong, #0F948B);
  flex-shrink: 0;
}

.hero-byline-text {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-style: italic;
  font-size: 1rem;
}

.hero-title {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 24px;
  color: var(--ink, #1a1a1a);
  max-width: 22ch;
}

.hero-title-emph {
  font-style: italic;
  color: var(--accent-strong, #0F948B);
}

.hero-lede {
  font-size: clamp(1.05rem, 1.5vw, 1.15rem);
  line-height: 1.6;
  color: var(--ink-3, #4a5568);
  margin: 0 0 24px;
  max-width: 58ch;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface, rgba(15, 148, 139, 0.06));
  border: 1px solid var(--line, rgba(15, 148, 139, 0.18));
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--ink-2, var(--ink));
  margin: 0 0 24px;
  max-width: 56ch;
  line-height: 1.5;
}

.hero-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-strong, #0F948B);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(15, 148, 139, 0.6);
  animation: hero-status-pulse 2.4s ease-out infinite;
}
@keyframes hero-status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 148, 139, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(15, 148, 139, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 148, 139, 0); }
}

/* ── Four-loops section ─── */
.container-narrow-wide {
  width: min(880px, 100% - var(--gutter, 24px) * 2);
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 56px;
  max-width: 640px;
}
.section-heading-eyebrow {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong, #0F948B);
  margin-bottom: 12px;
}
.section-heading-title {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 0;
  color: var(--ink, #1a1a1a);
}

.loops {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.loop {
  padding: 40px 0;
  border-top: 1px solid var(--line, rgba(0,0,0,0.08));
}
.loop:first-child {
  border-top: none;
  padding-top: 8px;
}
.loop:last-child {
  padding-bottom: 16px;
}

.loop-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}
.loop-marker {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.5rem;
  color: var(--accent-strong, #0F948B);
  line-height: 1;
}
.loop-title {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--ink, #1a1a1a);
}

.loop-body {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-3, #4a5568);
  margin: 0 0 12px;
  max-width: 64ch;
}
.loop-body a {
  color: var(--accent-strong, #0F948B);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.loop-body a:hover {
  border-bottom-style: solid;
}

.loop-meta {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-4, #718096);
  margin: 0;
  max-width: 64ch;
  letter-spacing: -0.005em;
}

@media (max-width: 560px) {
  .hero-title { font-size: 1.85rem; }
  .hero-lede { font-size: 1rem; }
  .loop { padding: 32px 0; }
  .loop-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── Homepage redesign iter 2 (2026-05-17) ─────────────────────
   Replaces the 3-card "How it works" grid + 2-card trust strip
   + 4-counter stats with an editorial numbered list + a
   2-paragraph "beliefs" pair. Less marketing, more first-person.
   ───────────────────────────────────────────────────────────── */
.section-alt {
  background: var(--bg-2, rgba(0, 0, 0, 0.02));
}

.setup-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.setup-steps > li {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line, rgba(0,0,0,0.08));
}
.setup-steps > li:first-child {
  border-top: none;
  padding-top: 8px;
}
.setup-step-marker {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--accent-strong, #0F948B);
  width: 56px;
  flex-shrink: 0;
  text-align: right;
  letter-spacing: -0.02em;
}
.setup-step-body {
  flex: 1;
  max-width: 64ch;
}
.setup-step-title {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
  margin: 0 0 10px;
  color: var(--ink, #1a1a1a);
}
.setup-step-body p {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-3, #4a5568);
  margin: 0;
}
.setup-step-body a {
  color: var(--accent-strong, #0F948B);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.setup-step-body a:hover { border-bottom-style: solid; }

.beliefs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 760px) {
  .beliefs { grid-template-columns: 1fr 1fr; gap: 48px; }
}
.belief {
  margin: 0;
}
.belief-eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong, #0F948B);
  margin: 0 0 14px;
}
.belief-body {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink-2, var(--ink));
  margin: 0;
  max-width: 56ch;
}
.belief-body a {
  color: var(--accent-strong, #0F948B);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.belief-body a:hover { border-bottom-style: solid; }

@media (max-width: 560px) {
  .setup-steps > li { flex-direction: column; gap: 8px; }
  .setup-step-marker { text-align: left; width: auto; font-size: 2rem; }
  .belief-body { font-size: 1rem; }
}

/* ── Homepage redesign iter 3 (2026-05-17) ─────────────────────
   Logo wall → plain text stack strip
   3-card "try it" grid → editorial play-now list
   Placeholder testimonials → honest pre-launch note
   ───────────────────────────────────────────────────────────── */

.stack-strip {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.005em;
  color: var(--ink-4, #718096);
  text-align: center;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 12px;
}
.stack-strip-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--accent-strong, #0F948B);
  margin-right: 4px;
}
.stack-strip-items {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 10px;
  color: var(--ink-3, #4a5568);
}
.stack-strip-sep {
  color: var(--ink-5, #a0aec0);
}

.play-now {
  display: flex;
  flex-direction: column;
}
.play-now-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line, rgba(0,0,0,0.08));
  text-decoration: none;
  color: var(--ink, #1a1a1a);
  transition: background 160ms ease;
}
.play-now-row:first-child {
  border-top: none;
  padding-top: 8px;
}
.play-now-marker {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent-strong, #0F948B);
  flex-shrink: 0;
  width: 32px;
  text-align: right;
  transition: transform 160ms ease;
}
.play-now-row:hover .play-now-marker {
  transform: translateX(4px);
}
.play-now-row:hover h3 {
  color: var(--accent-strong, #0F948B);
}
.play-now-body { flex: 1; max-width: 64ch; }
.play-now-body h3 {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
  margin: 0 0 6px;
  color: var(--ink, #1a1a1a);
  transition: color 160ms ease;
}
.play-now-body p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-3, #4a5568);
  margin: 0;
}

.prelaunch-note {
  max-width: 56ch;
}
.prelaunch-note p {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink-2, var(--ink));
  margin: 0 0 18px;
}
.prelaunch-note p:last-child {
  margin-bottom: 0;
}
.prelaunch-note a {
  color: var(--accent-strong, #0F948B);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.prelaunch-note a:hover { border-bottom-style: solid; }
.prelaunch-note-signature {
  margin-top: 28px !important;
  font-style: italic;
  color: var(--ink-3, #4a5568);
}

@media (max-width: 560px) {
  .play-now-row { flex-direction: column; gap: 6px; }
  .play-now-marker { text-align: left; width: auto; }
}

/* ── Homepage redesign iter 4 (2026-05-17) ─────────────────────
   FAQ centred accordion → editorial Q&A list (no accordion;
   always-open; serif Q + body A).
   Final CTA → less marketing-y headline + warmer voice.
   ───────────────────────────────────────────────────────────── */

.qa-list {
  display: flex;
  flex-direction: column;
}
.qa {
  padding: 28px 0;
  border-top: 1px solid var(--line, rgba(0,0,0,0.08));
}
.qa:first-child {
  border-top: none;
  padding-top: 8px;
}
.qa-q {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.018em;
  margin: 0 0 10px;
  color: var(--ink, #1a1a1a);
}
.qa-a {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-3, #4a5568);
  margin: 0;
  max-width: 64ch;
}
.qa-a a {
  color: var(--accent-strong, #0F948B);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.qa-a a:hover { border-bottom-style: solid; }

.cta-v2 {
  /* Keep the existing .cta dark background but tone down the
     headline + lede so it reads less marketing-launch + more
     "we're at the bottom of the page now". */
}
.cta-v2-title {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 0 0 18px;
  color: #fff;
}
.cta-v2-lede {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 56ch;
  margin: 0 auto 24px;
}
.cta-v2 .cta-inner {
  text-align: center;
}
.cta-v2 .waitlist-form {
  margin: 28px auto 0;
}

@media (max-width: 560px) {
  .qa-q { font-size: 1.1rem; }
  .cta-v2-title { font-size: 1.75rem; }
}

/* ── Chrome redesign iter 5 (2026-05-17) ───────────────────────
   Replaces the nav logo img+wordmark with the hand-drawn
   tardigrade SVG + a serif wordmark to match the homepage
   typography pass. The signature element from the hero now
   carries across every page chrome.
   ───────────────────────────────────────────────────────────── */

.nav-logo-v2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink, #1a1a1a);
}

.nav-logo-tardigrade {
  color: var(--accent-strong, #0F948B);
  flex-shrink: 0;
}

.nav-logo-wordmark {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink, #1a1a1a);
}

/* ── Science page redesign iter 6 (2026-05-17) ─────────────────
   Lifts the science page's hero + closing CTA out of the
   generic-template look ("3 numbered cards in a grid + final
   blue-banner CTA") into editorial typography matching the
   homepage redesign series. Body content (TOC, headings,
   blockquotes, tables) was already substantive and is left
   untouched - the AI-template feel was localised to the
   bookends.
   ─────────────────────────────────────────────────────────── */
.science-hero {
  position: relative;
  padding: clamp(7rem, 14vh, 9rem) 0 56px;
  background: linear-gradient(180deg, #FAFAF6 0%, #F5F2EA 60%, #FAFAF6 100%);
  border-bottom: 1px solid rgba(14, 30, 30, 0.06);
}
.science-hero-inner { max-width: 760px; }
.science-hero-eyebrow {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent-strong, #0F948B);
  text-transform: uppercase;
  margin: 0 0 22px;
}
.science-hero-title {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0 0 28px;
  color: var(--ink, #1a1a1a);
}
.science-hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent-strong, #0F948B);
}
.science-hero-byline {
  font-family: var(--serif, Georgia, serif);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink-2, #2a2a2a);
  margin: 0 0 44px;
  max-width: 660px;
}
.science-hero-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 0;
  padding: 0;
}
.science-hero-fact {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid rgba(15, 148, 139, 0.18);
}
.science-hero-fact:last-child {
  border-bottom: 1px solid rgba(15, 148, 139, 0.18);
}
.science-hero-fact dt {
  font-family: var(--serif, Georgia, serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--accent-strong, #0F948B);
  margin: 0;
  letter-spacing: -0.02em;
}
.science-hero-fact dd {
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--ink-3, #4a4a4a);
  margin: 0;
}
@media (max-width: 720px) {
  .science-hero-fact { grid-template-columns: 1fr; gap: 6px; }
  .science-hero-fact dt { font-size: 1.7rem; }
}

.science-signoff {
  padding: 88px 0 96px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
  border-top: 1px solid rgba(15, 148, 139, 0.08);
}
.science-signoff-inner { max-width: 680px; }
.science-signoff-eyebrow {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent-strong, #0F948B);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.science-signoff-title {
  font-family: var(--serif, Georgia, serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
  margin: 0 0 24px;
  color: var(--ink, #1a1a1a);
}
.science-signoff-body {
  font-family: var(--serif, Georgia, serif);
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--ink-2, #2a2a2a);
  margin: 0 0 36px;
}
.science-signoff-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 32px;
}
.science-signoff-quiet {
  font-family: var(--serif, Georgia, serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-3, #4a4a4a);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-strong, #0F948B);
  padding-bottom: 1px;
}
.science-signoff-quiet:hover {
  color: var(--accent-strong, #0F948B);
  border-bottom-style: solid;
}
.science-signoff-signature {
  font-family: var(--serif, Georgia, serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-3, #4a4a4a);
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 148, 139, 0.12);
  max-width: 80px;
}

/* ── Navbar v3 - "visually stunning" iter 8 (2026-05-17) ────────
   Per Steven: "The nav bar is boring and typical. Build a
   visually stunning navbar that goes above and beyond."
   
   What this layer adds, on top of the existing .nav:
   1. A 13-segment stratigraphic strip on top (.nav-strip).
   2. Scroll-aware glass via body.nav-is-scrolled - transparent
      at top of page, frosted on scroll.
   3. Tardigrade SVG that breathes idle + wiggles legs on hover.
   4. Hand-drawn ink underline on hover and active nav links,
      animated via background-position (left -> right reveal).
   5. Wordmark gets a serif italic flourish + dotted underline
      that fills solid on hover.
   ─────────────────────────────────────────────────────────── */

/* Base v3 overrides. The .nav-v3 class is added by chrome.js
   on every nav render so existing pages get the new chrome. */
.nav-v3 {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 280ms ease, backdrop-filter 280ms ease,
              border-color 280ms ease, box-shadow 280ms ease;
}
body.nav-is-scrolled .nav-v3 {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid rgba(15, 148, 139, 0.08);
  box-shadow: 0 4px 20px -8px rgba(15, 148, 139, 0.12);
}
.nav-v3 .nav-inner {
  height: 84px;
  transition: height 240ms ease;
}
body.nav-is-scrolled .nav-v3 .nav-inner {
  height: 68px;
}

/* The 13-segment stratigraphic top strip. Each span is one
   bio-age domain tinted band - visual brand texture, not
   decoration. Pulses subtly on scroll. */
.nav-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
}
.nav-strip > span {
  flex: 1;
  display: block;
  opacity: 0.55;
  transition: opacity 320ms ease, transform 320ms ease;
}
body.nav-is-scrolled .nav-strip > span {
  opacity: 0.85;
}
.nav-v3:hover .nav-strip > span {
  opacity: 1;
}
/* Stagger a tiny grow on the strip when nav is hovered. */
.nav-v3:hover .nav-strip > span:nth-child(1) { transform: scaleY(1.6); transition-delay: 0ms; }
.nav-v3:hover .nav-strip > span:nth-child(2) { transform: scaleY(1.6); transition-delay: 25ms; }
.nav-v3:hover .nav-strip > span:nth-child(3) { transform: scaleY(1.6); transition-delay: 50ms; }
.nav-v3:hover .nav-strip > span:nth-child(4) { transform: scaleY(1.6); transition-delay: 75ms; }
.nav-v3:hover .nav-strip > span:nth-child(5) { transform: scaleY(1.6); transition-delay: 100ms; }
.nav-v3:hover .nav-strip > span:nth-child(6) { transform: scaleY(1.6); transition-delay: 125ms; }
.nav-v3:hover .nav-strip > span:nth-child(7) { transform: scaleY(1.6); transition-delay: 150ms; }
.nav-v3:hover .nav-strip > span:nth-child(8) { transform: scaleY(1.6); transition-delay: 175ms; }
.nav-v3:hover .nav-strip > span:nth-child(9) { transform: scaleY(1.6); transition-delay: 200ms; }
.nav-v3:hover .nav-strip > span:nth-child(10) { transform: scaleY(1.6); transition-delay: 225ms; }
.nav-v3:hover .nav-strip > span:nth-child(11) { transform: scaleY(1.6); transition-delay: 250ms; }
.nav-v3:hover .nav-strip > span:nth-child(12) { transform: scaleY(1.6); transition-delay: 275ms; }
.nav-v3:hover .nav-strip > span:nth-child(13) { transform: scaleY(1.6); transition-delay: 300ms; }

/* Tardigrade signature - breathes idle, legs wiggle on hover.
   Eye blink fires every ~7s; the keyframes start at scale(1)
   so it's barely perceptible unless you're staring. */
.nav-v3 .nav-logo-v2 {
  position: relative;
  align-items: center;
  gap: 10px;
}
.nav-v3 .nav-logo-tardigrade {
  color: var(--accent-strong, #0F948B);
  flex-shrink: 0;
  animation: tardigradeBreath 3.4s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes tardigradeBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.nav-v3 .nav-logo-tardigrade .t-eye {
  transform-origin: center;
  transform-box: fill-box;
  animation: tardigradeBlink 7s ease-in-out infinite;
}
@keyframes tardigradeBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.1); }
  96% { transform: scaleY(1); }
}
/* Hover: legs wiggle one at a time, antennae perk up slightly. */
.nav-v3 .nav-logo-v2:hover .nav-logo-tardigrade {
  animation-duration: 1.6s;
}
.nav-v3 .nav-logo-v2:hover .t-leg {
  transform-origin: top center;
  transform-box: fill-box;
  animation: tardigradeLegWiggle 0.6s ease-in-out infinite;
}
.nav-v3 .nav-logo-v2:hover .t-leg-1 { animation-delay: 0ms; }
.nav-v3 .nav-logo-v2:hover .t-leg-2 { animation-delay: 80ms; }
.nav-v3 .nav-logo-v2:hover .t-leg-3 { animation-delay: 160ms; }
.nav-v3 .nav-logo-v2:hover .t-leg-4 { animation-delay: 240ms; }
@keyframes tardigradeLegWiggle {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(8deg); }
}

/* Wordmark serif + dotted underline that fills solid on hover. */
.nav-v3 .nav-logo-wordmark {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink, #1a1a1a);
  background-image: linear-gradient(currentColor, currentColor),
                    linear-gradient(currentColor, currentColor);
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(to right, var(--accent-strong, #0F948B), var(--accent-strong, #0F948B)),
    linear-gradient(to right,
      var(--accent-strong, #0F948B) 0, var(--accent-strong, #0F948B) 1px, transparent 1px, transparent 4px);
  background-size: 0% 1.5px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat, repeat-x;
  padding-bottom: 3px;
  transition: background-size 360ms ease;
}
.nav-v3 .nav-logo-v2:hover .nav-logo-wordmark {
  background-size: 100% 1.5px, 100% 1px;
}

/* Nav links - hand-drawn ink underline on hover.
   The ink is two stacked gradient backgrounds; the top one
   (the "ink" stroke) animates its width left->right via
   background-size. The bottom one is the always-on faint dot
   line. */
.nav-v3 .nav-link {
  position: relative;
  color: var(--ink-2, #2a2a2a);
  font-weight: 500;
  font-size: 0.94rem;
  letter-spacing: -0.005em;
  padding: 0 6px;
  height: 36px;
  border-radius: 0;
  background:
    linear-gradient(to right, var(--accent-strong, #0F948B), var(--accent-strong, #0F948B)) no-repeat,
    linear-gradient(to right,
      rgba(15, 148, 139, 0.18) 0, rgba(15, 148, 139, 0.18) 1px,
      transparent 1px, transparent 3px) repeat-x;
  background-size: 0% 1.5px, 100% 1px;
  background-position: 0 90%, 0 90%;
  transition: color 200ms ease, background-size 320ms ease, transform 200ms ease;
}
.nav-v3 .nav-link:hover {
  color: var(--accent-strong, #0F948B);
  background-size: 100% 1.5px, 100% 1px;
  transform: translateY(-1px);
}
.nav-v3 .nav-link.is-active {
  color: var(--accent-strong, #0F948B);
  font-weight: 600;
  background-size: 100% 2px, 100% 1px;
}
.nav-v3 .nav-link.is-active::after { display: none; } /* kill the old dash */

/* Dropdown trigger uses the same ink-underline treatment. */
.nav-v3 .nav-link-dropdown {
  color: var(--ink-2, #2a2a2a);
  font-weight: 500;
  font-size: 0.94rem;
  padding: 0 6px;
  height: 36px;
  background:
    linear-gradient(to right, var(--accent-strong, #0F948B), var(--accent-strong, #0F948B)) no-repeat,
    linear-gradient(to right,
      rgba(15, 148, 139, 0.18) 0, rgba(15, 148, 139, 0.18) 1px,
      transparent 1px, transparent 3px) repeat-x;
  background-size: 0% 1.5px, 100% 1px;
  background-position: 0 90%, 0 90%;
  transition: color 200ms ease, background-size 320ms ease, transform 200ms ease;
}
.nav-v3 .nav-link-dropdown:hover {
  color: var(--accent-strong, #0F948B);
  background-size: 100% 1.5px, 100% 1px;
  transform: translateY(-1px);
}
.nav-v3 .nav-link-dropdown[aria-expanded="true"] {
  color: var(--accent-strong, #0F948B);
  background-size: 100% 2px, 100% 1px;
}

/* Gap between links - tighter than the boxy old layout. */
.nav-v3 .nav-links {
  gap: 18px;
}

/* Sign-in: subtle, italic, dotted-underline tone (matches the
   editorial pages). */
.nav-v3 .nav-auth-link {
  font-family: var(--serif, Georgia, serif);
  font-style: italic;
  color: var(--ink-3, #4a4a4a);
  border: 0;
  background: transparent;
  border-bottom: 1px dotted var(--accent-strong, #0F948B);
  border-radius: 0;
  padding: 2px 0;
  margin-right: 14px;
  font-size: 0.96rem;
  transition: color 200ms ease, border-bottom-style 200ms ease;
}
.nav-v3 .nav-auth-link:hover {
  color: var(--accent-strong, #0F948B);
  border-bottom-style: solid;
  background: transparent;
}

/* CTA: pulsing teal dot prefix - matches the hero status dot. */
.nav-v3 .nav-cta {
  position: relative;
  padding-left: 28px;
}
.nav-v3 .nav-cta::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8);
  animation: navCtaDotPulse 2.2s ease-in-out infinite;
}
@keyframes navCtaDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
  50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); }
}

/* Reduced-motion: kill all the looped animations. */
@media (prefers-reduced-motion: reduce) {
  .nav-v3 .nav-logo-tardigrade,
  .nav-v3 .nav-logo-tardigrade .t-eye,
  .nav-v3 .nav-cta::before {
    animation: none !important;
  }
  .nav-v3 .nav-link,
  .nav-v3 .nav-link-dropdown,
  .nav-v3 .nav-logo-wordmark {
    transition: color 120ms ease;
  }
}

/* Compact mobile: drop the strip on narrow screens; nav links
   collapse into the mobile menu anyway. */
@media (max-width: 768px) {
  .nav-v3 .nav-strip { display: none; }
  .nav-v3 .nav-inner { height: 64px; }
  body.nav-is-scrolled .nav-v3 .nav-inner { height: 56px; }
}

/* ── Inline bio-age widget (homepage hero augmentation) ─────────
   Live tactile calculator below the hero. Drag sliders, watch the
   number move, see the tardigrade react. Only Thier has this
   because only Thier has the underlying bio-age engine.

   Shape: 5 inputs (4 sliders + 1 segmented control) on the left,
   big number + tardigrade on the right. Stacks on mobile.

   Gracefully hides when JS is disabled: the section starts with
   data-no-js="true"; the script removes that attribute on mount.
   ───────────────────────────────────────────────────────────── */

.inline-bio-age-section {
  padding: clamp(56px, 7vw, 96px) 0;
  position: relative;
  background:
    radial-gradient(circle at 18% 12%, rgba(15, 148, 139, 0.05), transparent 55%),
    radial-gradient(circle at 92% 88%, rgba(15, 148, 139, 0.04), transparent 50%);
}
.inline-bio-age-section[data-no-js="true"] { display: none; }

.inline-bio-age-section .section-heading {
  margin-bottom: 40px;
}

.inline-bio-age-section .iba-byline {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-3, #4a5568);
  margin: 8px 0 0;
  max-width: 56ch;
}

.iba-widget {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding: clamp(28px, 3.4vw, 44px);
  background: var(--bg, #fff);
  border: 1px solid var(--line, rgba(0,0,0,0.08));
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.02),
    0 18px 40px -28px rgba(15, 148, 139, 0.18);
  position: relative;
  overflow: hidden;
}

.iba-widget::before {
  /* Faint cross-rule that echoes hero-rule but lives inside the card. */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 148, 139, 0.25), transparent);
}

/* ── Inputs column ─── */
.iba-inputs {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.iba-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iba-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.iba-field-label {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  letter-spacing: -0.012em;
}

.iba-field-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  color: var(--accent-strong, #0F948B);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}

/* Slider - thick teal thumb, hairline track. Vendor prefixes for
   WebKit + Firefox; the appearance:none on the input wipes the
   default OS styling. */
.iba-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: grab;
  padding: 0;
  margin: 0;
}
.iba-slider:active { cursor: grabbing; }

.iba-slider::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(
    to right,
    var(--accent-strong, #0F948B) 0%,
    var(--accent-strong, #0F948B) var(--iba-fill, 0%),
    rgba(15, 148, 139, 0.15) var(--iba-fill, 0%),
    rgba(15, 148, 139, 0.15) 100%
  );
  border-radius: 2px;
}
.iba-slider::-moz-range-track {
  height: 3px;
  background: rgba(15, 148, 139, 0.15);
  border-radius: 2px;
}
.iba-slider::-moz-range-progress {
  height: 3px;
  background: var(--accent-strong, #0F948B);
  border-radius: 2px;
}
.iba-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-strong, #0F948B);
  border: 3px solid var(--bg, #fff);
  box-shadow: 0 2px 8px rgba(15, 148, 139, 0.35);
  margin-top: -10px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.iba-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-strong, #0F948B);
  border: 3px solid var(--bg, #fff);
  box-shadow: 0 2px 8px rgba(15, 148, 139, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.iba-slider:hover::-webkit-slider-thumb,
.iba-slider:focus-visible::-webkit-slider-thumb {
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(15, 148, 139, 0.45);
}
.iba-slider:hover::-moz-range-thumb,
.iba-slider:focus-visible::-moz-range-thumb {
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(15, 148, 139, 0.45);
}
.iba-slider:focus { outline: none; }
.iba-slider:focus-visible {
  outline: 2px solid var(--accent-strong, #0F948B);
  outline-offset: 6px;
  border-radius: 4px;
}

/* Segmented smoking control */
.iba-seg {
  display: inline-flex;
  border: 1px solid var(--line, rgba(0,0,0,0.12));
  border-radius: 10px;
  padding: 3px;
  background: var(--bg, #fff);
  gap: 2px;
}
.iba-seg-btn {
  flex: 1;
  padding: 8px 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-3, #4a5568);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  letter-spacing: -0.005em;
}
.iba-seg-btn:hover { color: var(--ink, #1a1a1a); }
.iba-seg-btn[aria-pressed="true"] {
  background: var(--accent-strong, #0F948B);
  color: #fff;
}
.iba-seg-btn:focus-visible {
  outline: 2px solid var(--accent-strong, #0F948B);
  outline-offset: 2px;
}

/* ── Output column ─── */
.iba-output {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 8px;
  min-height: 280px;
  text-align: center;
}

.iba-output-eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4, #768181);
  margin: 0;
}

.iba-bio-age {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: clamp(3.4rem, 7vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--ink, #1a1a1a);
  margin: 0;
  transition: color 280ms ease;
}
.iba-bio-age[data-tone="younger"] { color: #0E8479; }
.iba-bio-age[data-tone="older"]   { color: #B53A3A; }
.iba-bio-age[data-tone="matched"] { color: var(--ink, #1a1a1a); }

.iba-caption {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-3, #4a5568);
  margin: 0;
  min-height: 1.5em;
  transition: color 280ms ease;
}
.iba-caption[data-tone="younger"] { color: #0A6A61; }
.iba-caption[data-tone="older"]   { color: #8C2929; }

/* Tardigrade reaction. The hand-drawn SVG has three eye groups
   (happy / neutral / sad) and the mood attribute toggles which
   one is visible. Body color also shifts to match the mood. */
.iba-tardigrade-wrap {
  margin-top: 8px;
}
.iba-tardigrade {
  width: 120px;
  height: 84px;
  color: var(--accent-strong, #0F948B);
  transition: color 320ms ease, transform 220ms ease;
}
.iba-tardigrade[data-bio-age-mood="happy"]   { color: #0A6A61; }
.iba-tardigrade[data-bio-age-mood="sad"]     { color: #B07474; }
.iba-tardigrade[data-bio-age-mood="neutral"] { color: var(--accent-strong, #0F948B); }

.iba-tardigrade .iba-eye-happy,
.iba-tardigrade .iba-eye-neutral,
.iba-tardigrade .iba-eye-sad { display: none; }
.iba-tardigrade[data-bio-age-mood="happy"]   .iba-eye-happy   { display: block; }
.iba-tardigrade[data-bio-age-mood="neutral"] .iba-eye-neutral { display: block; }
.iba-tardigrade[data-bio-age-mood="sad"]     .iba-eye-sad     { display: block; }

.iba-tardigrade.is-wiggling {
  animation: iba-wiggle 480ms ease-out;
}
@keyframes iba-wiggle {
  0%   { transform: translateY(0) rotate(0deg); }
  20%  { transform: translateY(-3px) rotate(-2deg); }
  45%  { transform: translateY(0) rotate(2deg); }
  70%  { transform: translateY(-2px) rotate(-1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.iba-cta {
  margin-top: 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  color: var(--accent-strong, #0F948B);
  border-bottom: 1px dotted currentColor;
  text-decoration: none;
  padding-bottom: 1px;
}
.iba-cta:hover { border-bottom-style: solid; }

/* ── Responsive ─── */
@media (max-width: 720px) {
  .iba-widget {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .iba-output {
    min-height: 0;
    padding-top: 8px;
    border-top: 1px solid var(--line, rgba(0,0,0,0.08));
    margin-top: 8px;
    padding-top: 28px;
  }
  .iba-tardigrade { width: 96px; height: 68px; }
}

/* ── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .iba-tardigrade.is-wiggling { animation: none; }
  .iba-bio-age, .iba-caption, .iba-tardigrade { transition: none; }
}

/* ══════════════════════════════════════════════════════════════
   Dark mode (Elevation B2) — built from scratch on the B1 register
   tokens. Two mirrored blocks per the theme-boot contract:
   [data-theme="dark"] = explicit toggle; the prefers-color-scheme
   block covers OS-dark visitors with no stored preference (the
   :not([data-theme="light"]) guard lets a light toggle win).
   KEEP THE TWO VALUE SETS IDENTICAL. The 2026-05-08 light-only
   decision is superseded: light stays the default brand canvas,
   dark is now a real, token-complete theme (Steven, 2026-07-09).
   Register aliases (--canvas/--card/--elevated, --serif) follow
   automatically. Shadows swap toward hairline depth — shadow on
   dark barely reads. ══════════════════════════════════════════ */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink:    #E9EEEA;
  --ink-2:  #D3DAD5;
  --ink-3:  #A3ADA9;
  --ink-4:  #7C8683;
  --ink-5:  #59625F;
  --line:        rgba(233, 238, 234, 0.09);
  --line-strong: rgba(233, 238, 234, 0.16);
  --bg:    #0F1413;
  --bg-2:  #141A18;
  --bg-3:  #1A211F;
  --surface:      #161D1B;
  --surface-tint: rgba(22, 29, 27, 0.86);
  --shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.30);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45), 0 60px 120px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 1px rgba(47, 177, 162, 0.10);
  --teal-50:  #10201D;
  --teal-100: #16302B;
  --teal-200: #1D473F;
  --teal-300: #2A6E62;
  --teal-500: #2FB1A2;
  --teal-600: #3BBCAD;
  --teal-700: #0E8B7E;
  --teal-800: #0B7A6E;
  --amber-500: #F6B454;
  --lavender-500: #A48DE8;
  --crimson-500: #E0555B;
  --rule-soft: rgba(233, 238, 234, 0.06);
  --mk-ink: #E9EEEA;
  --mk-muted: #9AA4B5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink:    #E9EEEA;
    --ink-2:  #D3DAD5;
    --ink-3:  #A3ADA9;
    --ink-4:  #7C8683;
    --ink-5:  #59625F;
    --line:        rgba(233, 238, 234, 0.09);
    --line-strong: rgba(233, 238, 234, 0.16);
    --bg:    #0F1413;
    --bg-2:  #141A18;
    --bg-3:  #1A211F;
    --surface:      #161D1B;
    --surface-tint: rgba(22, 29, 27, 0.86);
    --shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.30);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45), 0 60px 120px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 0 1px rgba(47, 177, 162, 0.10);
    --teal-50:  #10201D;
    --teal-100: #16302B;
    --teal-200: #1D473F;
    --teal-300: #2A6E62;
    --teal-500: #2FB1A2;
    --teal-600: #3BBCAD;
    --teal-700: #0E8B7E;
    --teal-800: #0B7A6E;
    --amber-500: #F6B454;
    --lavender-500: #A48DE8;
    --crimson-500: #E0555B;
    --rule-soft: rgba(233, 238, 234, 0.06);
    --mk-ink: #E9EEEA;
    --mk-muted: #9AA4B5;
  }
}

/* Audit F190 — section backgrounds that predate the dark tokens. The
   /science hero and sign-off hardcode a cream / white gradient, so OS-dark
   visitors got near-white text (--ink #E9EEEA) on cream: contrast 1.1:1,
   the headline and the methodology facts invisible. Light keeps its exact
   cream; dark gets the token gradient. Same two-block contract as the
   tokens above: keep the two sets identical. */
:root[data-theme="dark"] .science-hero {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%);
  border-bottom-color: var(--line);
}
:root[data-theme="dark"] .science-signoff {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-top-color: var(--line);
}
:root[data-theme="dark"] footer.colophon { border-top: 1px solid var(--line); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) footer.colophon { border-top: 1px solid var(--line); }
  :root:not([data-theme="light"]) .science-hero {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%);
    border-bottom-color: var(--line);
  }
  :root:not([data-theme="light"]) .science-signoff {
    background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
    border-top-color: var(--line);
  }
}

/* Elevation B3p2 — anon gate on feature pages (streak first): shown
   in place of the old bounce-to-sign-in. Registers + tokens, so it
   flips with dark mode for free. */
.feature-gate {
  max-width: 560px;
  margin: 8px auto 24px;
  padding: 22px 24px;
  background: var(--card, #FFFFFF);
  border: 1px solid var(--card-line, rgba(14, 30, 30, 0.08));
  border-radius: var(--r-lg, 20px);
  box-shadow: var(--card-shadow);
  text-align: center;
}
.feature-gate .lede {
  margin: 0 0 16px;
  color: var(--ink-3, #4A5757);
}
.feature-gate-ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
