/*
 * 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.
 */

: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;
}

/* 2026-05-08 — light-mode-only marketing site. Health products
   read as clinical-credible in light (Levels, Apple Health, Calm
   land here), not Whoop/Oura dark. Auto-switching by user OS
   preference was producing a too-dark, low-contrast read for
   most visitors on macOS dark mode. The iOS app itself still
   honours the user's system pref via SwiftUI's adaptive color
   scheme — that's the right place for it. The marketing brand
   stays light. */

/* ───── 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; }
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 ───── */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 64px 0 40px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
  .footer-brand { grid-column: 1 / -1; }
}
.footer-brand .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 660;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.footer-brand .footer-logo img { width: 28px; height: 28px; border-radius: 7px; }
.footer-brand p { color: var(--ink-3); max-width: 36ch; font-size: 0.92rem; margin: 0; }
.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 14px;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a {
  color: var(--ink-3);
  font-size: 0.92rem;
}
.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-4);
}
.footer-bottom .meta-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom .meta-links a { color: var(--ink-4); }
.footer-bottom .meta-links a:hover { color: var(--ink); }

/* ───── 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;
}
