/* =============================================================
   Medichive — Marketing site
   Built on the product's green-overlay design system, scaled up
   for the web: bigger type, generous rhythm, more air.
   Newsreader serif · Hanken Grotesk UI · Geist Mono data.
   ============================================================= */

:root {
  color-scheme: light;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* surfaces */
  --bg: #F6F9F7;
  --surface: #FFFFFF;
  --surface-2: #F1F7F3;
  --tint: #EAF3EE;
  --tint-strong: #DEEBE4;

  /* ink — deep green-black */
  --ink: #0C3527;
  --ink-soft: #25493B;
  --body: #45574E;
  --muted: #7A8E84;
  --faint: #9BACA3;

  /* lines */
  --border: #DBE7E0;
  --border-strong: #C6D8CE;

  /* brand greens */
  --accent: #11875A;
  --accent-deep: #0B6A45;
  --accent-bright: #36C781;
  --accent-wash: rgba(54,199,129,0.13);
  --accent-wash-2: rgba(54,199,129,0.22);

  /* navy — from the logo heart */
  --navy: #16385F;
  --navy-deep: #0E2746;

  /* AI accent — blue, for Claude-generated content */
  --ai: #2563EB;
  --ai-deep: #1D4ED8;
  --ai-bright: #3B82F6;
  --ai-wash: rgba(37,99,235,0.10);

  /* deep chrome */
  --green-900: #0C7A4F;
  --green-850: #109063;
  --green-800: #15A271;
  --on-green: #F1FBF6;
  --on-green-dim: #C6EAD8;
  --on-green-faint: #93D0B2;

  /* status */
  --rose: #C7395B;
  --rose-wash: #FBEAEE;
  --amber: #B07414;
  --amber-wash: #FBF1DF;

  --glow: rgba(54,199,129,0.30);
  --shadow-xs: 0 1px 2px rgba(8,48,31,0.05);
  --shadow-sm: 0 1px 2px rgba(8,48,31,0.04), 0 4px 12px -6px rgba(8,48,31,0.12);
  --shadow-card: 0 1px 2px rgba(8,48,31,0.04), 0 18px 40px -22px rgba(8,48,31,0.22);
  --shadow-float: 0 40px 90px -45px rgba(8,48,31,0.45);

  --r-xs: 8px;
  --r-sm: 11px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
html { overflow-x: hidden; overflow-x: clip; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-wash-2); color: var(--ink); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.08; letter-spacing: -0.02em; font-weight: 600; }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.025em; }
.mono { font-family: var(--mono); }

/* =============================================================
   Layout primitives
   ============================================================= */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
main [id] { scroll-margin-top: 84px; }
.section { padding: clamp(76px, 11vw, 144px) 0; position: relative; }
.section.tight { padding: clamp(56px, 8vw, 96px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-wash);
  padding: 6px 13px 6px 11px; border-radius: 100px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); }
.eyebrow.ai { color: var(--ai); background: var(--ai-wash); }
.eyebrow.ai::before { background: var(--ai-bright); }

.section-head { max-width: 720px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head h2 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.03em;
  font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; color: var(--ink);
  margin-top: 20px;
}
.section-head .lead {
  font-size: clamp(17px, 1.4vw, 20px); color: var(--body); margin-top: 18px;
  max-width: 600px; text-wrap: pretty;
}
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 26px -12px var(--accent); }
.btn-primary:hover { background: var(--accent-deep); box-shadow: 0 18px 34px -14px var(--accent); transform: translateY(-1px); }
.btn-dark { background: var(--green-900); color: var(--on-green); }
.btn-dark:hover { background: var(--navy); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink-soft); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn-soft { background: var(--accent-wash); color: var(--accent); }
.btn-soft:hover { background: var(--accent-wash-2); }
.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 13px; }
.btn-sm { padding: 9px 15px; font-size: 13.5px; border-radius: 10px; }
.btn-link { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn-link svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.btn-link:hover svg { transform: translateX(3px); }
/* inline prose link */
.tlink { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: var(--accent-wash-2); transition: text-decoration-color 0.15s var(--ease); }
.tlink:hover { text-decoration-color: var(--accent); }

/* =============================================================
   Top navigation
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-color: var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 34px; height: 34px; }
.brand b { font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--body);
  padding: 8px 14px; border-radius: 10px; transition: color 0.16s, background 0.16s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Desktop nav dropdowns (pure CSS: hover + :focus-within; the mobile menu
   replaces these below the breakpoint). The hidden state uses opacity, not
   display/visibility, so the links stay keyboard-focusable and tabbing into
   a menu reveals it. The ::before strip bridges the hover gap. */
.nav-links .dd { position: relative; }
.nav-links .dd > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-links .caret { width: 12px; height: 12px; opacity: 0.55; transition: transform 0.18s var(--ease); }
.dd-menu {
  position: absolute; top: calc(100% + 8px); left: 8px; min-width: 260px;
  display: flex; flex-direction: column; padding: 8px; z-index: 90;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-card);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}
.dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.dd:hover .caret, .dd:focus-within .caret { transform: rotate(180deg); }
.nav-links .dd-menu a { display: block; padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink); }
.dd-menu a .ds { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.dd-sep { height: 1px; background: var(--border); margin: 6px 10px; }
@media (prefers-reduced-motion: reduce) { .dd-menu, .nav-links .caret { transition: none; } }

/* mobile menu */
.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 11px; flex: none;
  border: 1px solid var(--border-strong); background: var(--surface);
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.25s var(--ease), opacity 0.2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-menu { display: none; border-top: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-card); }
.nav-menu.open { display: block; animation: menuIn 0.25s var(--ease); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav-menu { max-height: calc(100dvh - 72px); overflow-y: auto; }
.nav-menu nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; padding: 10px var(--pad) 6px; }
.nav-menu nav a { display: block; padding: 12px 2px; font-size: 15.5px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--border); }
.nav-menu nav a:nth-last-child(-n+2) { border-bottom: none; }
.nav-menu nav a:active { background: var(--surface-2); }
.nav-menu-cta { display: flex; gap: 10px; padding: 12px var(--pad) 20px; }
.nav-menu-cta .btn { flex: 1; }

/* =============================================================
   Hero
   ============================================================= */
.hero { position: relative; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(64px, 9vw, 120px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -200px 0 auto 0; height: 720px; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 78% 18%, var(--glow), transparent 62%),
              radial-gradient(46% 46% at 8% 6%, rgba(22,56,95,0.07), transparent 60%);
  opacity: 0.85;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.04fr 0.96fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy { max-width: 600px; }
.hero h1 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.035em;
  font-size: clamp(44px, 6.4vw, 86px); line-height: 0.99; color: var(--ink);
  margin-top: 22px; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead {
  font-size: clamp(18px, 1.5vw, 21px); color: var(--ink-soft); margin-top: 24px;
  max-width: 520px; text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.hero-trust { display: flex; align-items: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.hero-trust .ht { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 16px; height: 16px; color: var(--accent); }
.hero-trust .sep { width: 1px; height: 16px; background: var(--border-strong); }

/* =============================================================
   Product vignettes (authentic UI, built from the app system)
   ============================================================= */
.device {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-float);
  overflow: hidden;
}
.device-bar {
  display: flex; align-items: center; gap: 7px; padding: 13px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.device-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.device-bar .url {
  margin-left: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 100px;
  padding: 4px 14px; flex: 1; max-width: 280px;
}
.device-body { padding: 22px; background: var(--bg); }

/* mini app cards */
.mini-greet { font-family: var(--serif); font-weight: 500; font-size: 25px; color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.mini-sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-xs); }
.card-pad { padding: 18px 20px; }

.ring-row { display: flex; align-items: center; gap: 18px; }
.ring { width: 92px; height: 92px; flex-shrink: 0; }
.ring-info .rk { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.ring-info .rv { font-family: var(--serif); font-size: 34px; font-weight: 500; color: var(--ink); line-height: 1; margin-top: 4px; }
.ring-info .rv small { font-size: 16px; color: var(--accent); }
.ring-info .rd { font-size: 12.5px; color: var(--accent); font-weight: 600; margin-top: 5px; display: inline-flex; align-items: center; gap: 5px; }

.vrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vchip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 13px; }
.vchip .vl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.vchip .vv { font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--ink); margin-top: 6px; line-height: 1; }
.vchip .vv small { font-size: 11px; color: var(--muted); font-family: var(--sans); }
.src-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-left: auto; }
.src-dot.clinical { background: var(--accent); }
.src-dot.wearable { background: var(--accent-bright); }

/* AI card (blue) */
.ai-card { background: linear-gradient(180deg, var(--surface), #FBFCFE); border: 1px solid #DCE6FA; border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-xs); position: relative; overflow: hidden; }
.ai-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--ai-bright), var(--ai), transparent); }
.ai-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.ai-head .aic { width: 30px; height: 30px; border-radius: 9px; background: var(--ai-wash); color: var(--ai); display: flex; align-items: center; justify-content: center; }
.ai-head .aic svg { width: 16px; height: 16px; }
.ai-head .at { font-size: 13px; font-weight: 700; color: var(--ink); }
.ai-head .au { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.ai-body { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.ai-body b { color: var(--ink); font-weight: 600; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 100px; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.green { background: var(--accent-wash); color: var(--accent); }
.pill.amber { background: var(--amber-wash); color: var(--amber); }
.pill.rose { background: var(--rose-wash); color: var(--rose); }
.pill.blue { background: var(--ai-wash); color: var(--ai); }

/* floating chips over the hero device */
.float {
  position: absolute; z-index: 3; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-card);
  padding: 12px 15px; display: flex; align-items: center; gap: 11px; white-space: nowrap;
}
.float .fi { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.float .fi svg { width: 18px; height: 18px; }
.float .ft { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.float .fs { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.float-a { top: -26px; left: -30px; }
.float-b { bottom: 24px; right: -26px; }

/* =============================================================
   Logo / trust strip
   ============================================================= */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.strip-in { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 26px 0; }
.strip-label { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.strip-items { display: flex; align-items: center; gap: clamp(20px, 4vw, 46px); flex-wrap: wrap; }
.strip-items .si { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.strip-items .si svg { width: 18px; height: 18px; color: var(--accent); }

/* =============================================================
   Surfaces (three modes)
   ============================================================= */
.surfaces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.surface-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px 26px 26px; box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  overflow: hidden;
}
.surface-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--border-strong); }
.surface-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; opacity: 0.9; }
.surface-card.personal::after { background: linear-gradient(90deg, var(--rose), transparent); }
.surface-card.clinical::after { background: linear-gradient(90deg, var(--accent-bright), transparent); }
.surface-card.admin::after { background: linear-gradient(90deg, var(--amber), transparent); }
.surface-ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.surface-ic svg { width: 24px; height: 24px; }
.surface-card.personal .surface-ic { background: var(--rose-wash); color: var(--rose); }
.surface-card.clinical .surface-ic { background: var(--accent-wash); color: var(--accent); }
.surface-card.admin .surface-ic { background: var(--amber-wash); color: var(--amber); }
.surface-card h3 { font-family: var(--serif); font-weight: 500; font-size: 25px; letter-spacing: -0.02em; }
.surface-card .role { font-size: 12px; font-family: var(--mono); color: var(--muted); margin-top: 4px; }
.surface-card p { font-size: 14.5px; color: var(--body); margin-top: 12px; line-height: 1.58; }
.surface-card ul { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.surface-card li { font-size: 13.5px; color: var(--ink-soft); display: flex; align-items: flex-start; gap: 9px; }
.surface-card li svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }

/* =============================================================
   Feature split rows
   ============================================================= */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 84px); align-items: center; }
.split.flip .split-media { order: -1; }
.split-copy h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -0.03em; line-height: 1.05; margin-top: 18px; }
.split-copy .lead { font-size: 18px; color: var(--body); margin-top: 18px; max-width: 480px; text-wrap: pretty; }
.feat-list { margin-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.feat { display: flex; gap: 14px; }
.feat .fic { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-wash); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feat .fic svg { width: 19px; height: 19px; }
.feat.ai .fic { background: var(--ai-wash); color: var(--ai); }
.feat .ft { font-size: 16px; font-weight: 600; color: var(--ink); }
.feat .fd { font-size: 14px; color: var(--body); margin-top: 3px; line-height: 1.55; }

/* tabs (personal four-tab) */
.tabs { display: flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; padding: 5px; }
.tab { flex: 1; padding: 9px 8px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; transition: all 0.2s var(--ease); }
.tab svg { width: 15px; height: 15px; }
.tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-xs); }
.tab-panel { display: none; margin-top: 16px; }
.tab-panel.active { display: block; animation: fade 0.4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* timeline mini */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -19px; top: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent-bright); box-shadow: 0 0 0 3px var(--bg); }
.tl-item.dx::before { border-color: var(--amber); }
.tl-item.allergy::before { border-color: var(--rose); }
.tl-item.ai::before { border-color: var(--ai); }
.tl-t { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.tl-t .tm { margin-left: auto; font-size: 11px; font-family: var(--mono); color: var(--faint); }
.tl-d { font-size: 12.5px; color: var(--body); margin-top: 2px; }

/* SOAP mini */
.soap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-xs); }
.soap-row { display: grid; grid-template-columns: 64px 1fr; border-bottom: 1px solid var(--border); }
.soap-row:last-child { border-bottom: none; }
.soap-key { background: var(--surface-2); padding: 13px 12px; border-right: 1px solid var(--border); }
.soap-key .k { font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--accent); line-height: 1; }
.soap-key .kl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 3px; }
.soap-val { padding: 13px 15px; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.soap-val .icd { font-family: var(--mono); font-size: 10.5px; color: var(--accent); background: var(--accent-wash); padding: 1px 6px; border-radius: 5px; }

/* recorder mini */
.rec { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }
.rec-orb { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--rose-wash); color: var(--rose); position: relative; }
.rec-orb svg { width: 28px; height: 28px; z-index: 1; }
.rec-orb::before, .rec-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--rose); animation: ping 2.4s var(--ease) infinite; }
.rec-orb::after { animation-delay: 1.2s; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.65; } 100% { transform: scale(1.7); opacity: 0; } }
.rec-timer { font-family: var(--mono); font-size: 22px; color: var(--ink); margin-top: 14px; font-variant-numeric: tabular-nums; }
.wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 40px; margin-top: 12px; }
.wave i { width: 3px; border-radius: 3px; background: var(--accent-bright); animation: waveAnim 1.1s ease-in-out infinite; }
@keyframes waveAnim { 0%, 100% { height: 8px; } 50% { height: 30px; } }

/* chart */
.chart-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow-xs); }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.lg { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--body); }
.lg .ln { width: 18px; height: 0; }
.lg .ln.c { border-top: 3px solid var(--accent); }
.lg .ln.w { border-top: 2px dashed var(--accent-bright); }

/* wearables grid */
.wear-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wear { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-xs); }
.wear .wl { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--ink-soft); flex-shrink: 0; }
.wear .wn { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.wear .ws { font-size: 11.5px; color: var(--muted); }
.wear .wc { margin-left: auto; }

/* =============================================================
   Security band (dark forest)
   ============================================================= */
.band { background: var(--navy-deep); color: var(--on-green); border-radius: var(--r-xl); overflow: hidden; position: relative; }
.band::before { content: ""; position: absolute; inset: 0 0 auto auto; width: 60%; height: 100%; background: radial-gradient(80% 80% at 100% 0%, rgba(54,199,129,0.18), transparent 60%); pointer-events: none; }
.band-in { position: relative; padding: clamp(40px, 6vw, 72px) clamp(28px, 5vw, 64px); }
.band .eyebrow { background: rgba(54,199,129,0.16); color: var(--accent-bright); }
.band .eyebrow::before { background: var(--accent-bright); }
.band h2 { color: #fff; font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -0.03em; margin-top: 18px; }
.band .lead { color: var(--on-green-dim); font-size: 18px; margin-top: 16px; max-width: 560px; }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 46px; }
.sec-item { padding: 22px 20px; border-radius: var(--r); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.sec-item .sic { width: 40px; height: 40px; border-radius: 11px; background: rgba(54,199,129,0.16); color: var(--accent-bright); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.sec-item .sic svg { width: 20px; height: 20px; }
.sec-item h4 { color: #fff; font-size: 15.5px; }
.sec-item p { color: var(--on-green-dim); font-size: 13px; margin-top: 6px; line-height: 1.55; }
.sec-item ul { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.sec-item li { color: var(--on-green-dim); font-size: 12.5px; line-height: 1.45; display: flex; align-items: flex-start; gap: 9px; }
.sec-item li::before { content: ""; width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; background: var(--accent-bright); flex: none; }
.sec-note { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 26px; }
.band-foot { text-align: center; color: var(--on-green-faint); font-size: 13px; margin-top: 26px; }

/* audit row mini */
.audit { margin-top: 26px; border-radius: var(--r); overflow: hidden; border: 1px solid rgba(255,255,255,0.12); }
.audit-row { display: grid; grid-template-columns: 120px 1fr 110px; gap: 14px; padding: 11px 16px; font-size: 12.5px; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); }
.audit-row:last-child { border-bottom: none; }
.audit-row .act { font-family: var(--mono); font-size: 11px; color: var(--accent-bright); }
.audit-row .who { color: #fff; }
.audit-row .ts { font-family: var(--mono); font-size: 10.5px; color: var(--on-green-faint); text-align: right; }

/* =============================================================
   Platform / apps
   ============================================================= */
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.plat { padding: 26px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.plat .pic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-wash); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.plat .pic svg { width: 22px; height: 22px; }
.plat h4 { font-size: 17px; }
.plat .ps { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.plat p { font-size: 14px; color: var(--body); margin-top: 11px; line-height: 1.55; }
/* clickable plat card */
a.plat { display: block; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease); }
a.plat:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--border-strong); }
a.plat .btn-link { margin-top: 12px; }
a.plat:hover .btn-link svg { transform: translateX(3px); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat-b { text-align: center; }
.stat-b .sv { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 5vw, 60px); color: var(--ink); letter-spacing: -0.03em; line-height: 1; }
.stat-b .sv .u { color: var(--accent); }
.stat-b .sl { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* =============================================================
   CTA
   ============================================================= */
.cta { text-align: center; position: relative; }
.cta-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: clamp(48px, 7vw, 88px) clamp(28px, 5vw, 56px); box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
}
.cta-box::before { content: ""; position: absolute; inset: auto 0 -40% 0; height: 80%; background: radial-gradient(60% 100% at 50% 100%, var(--glow), transparent 70%); opacity: 0.7; pointer-events: none; }
.cta-box .inner { position: relative; z-index: 1; }
.cta-box h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.6vw, 56px); letter-spacing: -0.03em; line-height: 1.03; }
.cta-box .lead { font-size: 19px; color: var(--body); margin-top: 18px; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 13px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.cta-note { font-size: 13px; color: var(--muted); margin-top: 20px; }

/* ---- Beta access ---- */
.btn-block { width: 100%; }
.beta-box {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 56px); box-shadow: var(--shadow-card);
}
.beta-copy h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.6vw, 44px); margin-top: 16px; }
.beta-copy .lead { font-size: 17px; color: var(--body); margin-top: 16px; line-height: 1.55; }
.beta-copy .lead a { color: var(--accent); font-weight: 600; }
.beta-points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.beta-points li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-soft); }
.beta-points svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.beta-form { display: flex; flex-direction: column; gap: 12px; }
.beta-form input, .beta-form select {
  width: 100%; padding: 14px 16px; font-size: 15px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.beta-form select { color: var(--ink); }
.beta-form select:invalid { color: var(--muted); }
.beta-form textarea {
  width: 100%; padding: 14px 16px; font-size: 15px; color: var(--ink); line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  resize: vertical; min-height: 92px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.beta-form input::placeholder, .beta-form textarea::placeholder { color: var(--muted); }
.beta-form input:focus, .beta-form select:focus, .beta-form textarea:focus { outline: none; border-color: var(--accent-bright); background: var(--surface); }
.beta-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.beta-form .form-error { margin: 0; color: #b4321f; font-size: 13.5px; }
.beta-form .btn { margin-top: 4px; }
.beta-fine { font-size: 12.5px; color: var(--muted); text-align: center; margin: 4px 0 0; }
/* app-store download */
.store-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 26px; }
.store-badge { display: inline-flex; border-radius: 12px; transition: transform 0.2s var(--ease), filter 0.2s var(--ease); }
.store-badge img { height: 58px; width: auto; max-width: 100%; display: block; }
.store-badge:hover { transform: translateY(-2px); filter: brightness(1.07); }
.store-badge:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
.store-free { font-family: var(--mono); font-size: 12px; letter-spacing: 0.01em; color: var(--muted); }
/* iOS TestFlight form header */
.beta-form-head { margin-bottom: 6px; }
.beta-form-head .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); }
.beta-form-head h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; color: var(--ink); margin-top: 7px; }
.beta-form-head p { font-size: 13.5px; color: var(--body); margin-top: 7px; line-height: 1.5; }
@media (max-width: 760px) {
  .beta-box { grid-template-columns: 1fr; }
}

/* =============================================================
   Footer
   ============================================================= */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: var(--muted); max-width: 280px; line-height: 1.6; }
.footer-col h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 700; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14.5px; color: var(--body); padding: 6px 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.footer-bot .fl { display: flex; gap: 20px; flex-wrap: wrap; }

/* hero glass cube — large translucent cube tumbling slowly behind the hero */
.glass-cube {
  position: absolute; z-index: 0; pointer-events: none;
  width: 480px; height: 480px; right: -70px; top: -20px;
  perspective: 1700px;
  --gz: 240px;
}
.glass-cube .box {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(-24deg) rotateY(38deg);
  animation: glassTumble 44s linear infinite;
}
@keyframes glassTumble {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}
.glass-cube .gf {
  position: absolute; inset: 0; border-radius: 30px;
  border: 1.5px solid rgba(54,199,129,0.26);
  background: linear-gradient(150deg, rgba(255,255,255,0.2), rgba(54,199,129,0.05) 55%, rgba(22,56,95,0.06));
  box-shadow: inset 0 0 70px rgba(54,199,129,0.08);
}
.glass-cube .g1 { transform: rotateY(0deg) translateZ(var(--gz)); }
.glass-cube .g2 { transform: rotateY(90deg) translateZ(var(--gz)); }
.glass-cube .g3 { transform: rotateY(180deg) translateZ(var(--gz)); }
.glass-cube .g4 { transform: rotateY(-90deg) translateZ(var(--gz)); }
.glass-cube .g5 { transform: rotateX(90deg) translateZ(var(--gz)); }
.glass-cube .g6 { transform: rotateX(-90deg) translateZ(var(--gz)); }
@media (max-width: 960px) {
  .glass-cube { width: 320px; height: 320px; --gz: 160px; right: -80px; top: -30px; opacity: 0.6; }
}
@media (prefers-reduced-motion: reduce) {
  .glass-cube .box { animation: none; }
}

/* floating back-to-top */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 70;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), background 0.2s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--accent-deep); }
.to-top svg { width: 20px; height: 20px; }

/* =============================================================
   Motion — hero load sequence + scroll transitions
   ============================================================= */
@keyframes heroRise { from { opacity: 0; transform: translateY(26px); } }
@keyframes heroMediaIn { from { opacity: 0; transform: translateY(36px) scale(0.97); } }
@keyframes floatPop { from { opacity: 0; transform: translateY(12px) scale(0.88); } }
.hero-copy > * { animation: heroRise 0.7s var(--ease) backwards; }
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.27s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.38s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.49s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.6s; }
.hero-media { animation: heroMediaIn 0.9s var(--ease) 0.3s backwards; }
.hero-media .float-a { animation: floatPop 0.55s var(--ease) 1.05s backwards; }
.hero-media .float-b { animation: floatPop 0.55s var(--ease) 1.2s backwards; }

/* Reveal on scroll — sections slide in as they enter the viewport.
   Split rows slide directionally (copy and media from opposite sides);
   grids cascade via a JS-set transition-delay on same-batch reveals. */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); will-change: opacity, transform; }
.band.reveal { transform: translateY(30px) scale(0.985); }
@media (min-width: 961px) {
  .split .split-copy.reveal { transform: translateX(-46px); }
  .split .split-media.reveal { transform: translateX(46px); }
  .split.flip .split-copy.reveal { transform: translateX(46px); }
  .split.flip .split-media.reveal { transform: translateX(-46px); }
  .split .split-copy.reveal.in, .split .split-media.reveal.in { transform: none; }
}
.reveal.in { opacity: 1; transform: none; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; }
  .surfaces { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.flip .split-media { order: 0; }
  .band-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-ghost { display: none; }
}
@media (max-width: 600px) {
  /* header: brand + hamburger only — the CTAs live in the menu */
  .nav-cta .btn-primary { display: none; }
  .nav-in { height: 62px; gap: 14px; }
  .nav-menu { max-height: calc(100dvh - 62px); }
  main [id] { scroll-margin-top: 74px; }
  /* trust strip: compact centered wrap (no horizontal scrolling on mobile) */
  .strip-label { display: none; }
  .strip-in { justify-content: center; padding: 18px 0; }
  .strip-items { justify-content: center; gap: 10px 20px; }
  .strip-items .si { font-size: 13px; white-space: nowrap; }
  .strip-items .si svg { width: 16px; height: 16px; }
  /* shorter page: desktop-scale padding was most of the scroll length */
  .section { padding: 54px 0; }
  .section.tight { padding: 44px 0; }
  .hero { padding-top: 30px; padding-bottom: 46px; }
  .hero h1 { font-size: clamp(36px, 10.5vw, 44px); }
  .hero .lead { font-size: 17px; margin-top: 18px; }
  .hero-actions { margin-top: 26px; }
  .section-head h2 { font-size: clamp(27px, 8vw, 32px); }
  .split-copy h2 { font-size: clamp(25px, 7.5vw, 30px); }
  .split { gap: 26px; }
  .feat-list { gap: 14px; margin-top: 20px; }
  .surfaces { gap: 14px; margin-top: 36px; }
  .platform-grid { gap: 14px; margin-top: 36px; }
  .stats { gap: 22px; }
  .cta-box { padding: 44px 22px; }
}
@media (max-width: 560px) {
  .wear-grid { grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: 1fr; }
  .float-a { left: -8px; top: 8px; }
  .float-b { right: -8px; bottom: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .audit-row { grid-template-columns: 1fr; gap: 4px; }
  .audit-row .ts { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---- Guideline-body chips (clinicians page) ---- */
.guideline-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.guideline-chips .gc {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.01em;
  color: var(--navy); background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 5px 11px; line-height: 1;
}
.guideline-chips .gc:last-child { color: var(--accent); border-color: var(--accent-wash); background: var(--accent-wash); }

/* ---- Pre-consult chat bubbles (clinicians page) ---- */
.chat .bub {
  font-size: 13px; line-height: 1.45; padding: 9px 13px; border-radius: 14px; max-width: 86%;
}
.chat .bub.ai { background: var(--ai-wash); color: var(--ink); border-bottom-left-radius: 5px; align-self: flex-start; }
.chat .bub.me { background: var(--navy); color: var(--on-green); border-bottom-right-radius: 5px; align-self: flex-end; margin-left: auto; }

/* =============================================================
   Check-ins vignette (clinicians page) — pain map + mood meter
   ============================================================= */
.checkin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.checkin-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.checkin-head .ct { font-size: 13px; font-weight: 700; color: var(--ink); }
.checkin-head .cu { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.checkin-sum { font-size: 12.5px; color: var(--body); margin-top: 12px; line-height: 1.5; }
.checkin-sum b { color: var(--ink); font-weight: 600; }

.bodymap-fig { display: flex; justify-content: center; padding: 4px 0; }
.bodymap-fig svg { width: auto; height: 218px; }
.bodymap-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.bodymap-legend .bl { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--border); border-radius: 100px; padding: 4px 10px; }
.bodymap-legend .bl i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
@keyframes painPulse { 0% { opacity: 0.5; transform: scale(1); } 100% { opacity: 0; transform: scale(2); } }
.painring { transform-origin: center; transform-box: fill-box; animation: painPulse 2.2s var(--ease) infinite; }

.mood {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(115% 115% at 0% 0%, rgba(199,57,91,0.72), transparent 62%),
    radial-gradient(115% 115% at 100% 0%, rgba(252,199,72,0.8), transparent 62%),
    radial-gradient(115% 115% at 0% 100%, rgba(59,130,246,0.62), transparent 62%),
    radial-gradient(115% 115% at 100% 100%, rgba(54,199,129,0.72), transparent 62%),
    var(--surface);
}
.mood::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.35) 0 1px, transparent 1px calc(100% / 6)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.35) 0 1px, transparent 1px calc(100% / 6));
}
.mood .mk {
  position: absolute; width: 22px; height: 22px; border-radius: 50%; transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.35); border: 2.5px solid #fff; box-shadow: 0 2px 10px rgba(8,48,31,0.35);
}
.mood-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9.5px; color: var(--faint); margin-top: 7px; text-transform: uppercase; letter-spacing: 0.05em; }

/* =============================================================
   Medication reminders vignette (homepage)
   ============================================================= */
.notif { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-card); overflow: hidden; }
.notif-top { display: flex; align-items: center; gap: 8px; padding: 11px 16px 9px; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.notif-top .napp { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; }
.notif-top .napp img { width: 14px; height: 14px; }
.notif-top .nts { margin-left: auto; font-family: var(--mono); font-size: 10px; }
.notif-title { padding: 13px 16px 0; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.notif-meds { padding: 8px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.notif-med { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.notif-med .nm { font-weight: 600; color: var(--ink); }
.notif-med .nf { color: var(--muted); font-size: 12px; }
.notif-med .nt { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--accent); }

.slot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 100px; padding: 7px 14px;
}
.slot-chip svg { width: 14px; height: 14px; }
.slot-chip.on { color: var(--accent-deep); background: var(--accent-wash); border-color: var(--accent-wash-2); }
.slot-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

/* =============================================================
   FAQ (homepage)
   ============================================================= */
.faq { max-width: 760px; margin: 46px auto 0; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px; padding: 17px 20px; font-size: 16px; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--accent); line-height: 1; transition: transform 0.25s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .fa { padding: 0 20px 18px; font-size: 14.5px; color: var(--body); line-height: 1.62; max-width: 640px; }
.faq .fa a { color: var(--accent); font-weight: 600; }

/* =============================================================
   Product tour (demo page)
   ============================================================= */
.seg-row { display: flex; gap: 10px 12px; flex-wrap: wrap; align-items: center; justify-content: center; }
.seg { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 4px; box-shadow: var(--shadow-xs); }
.seg button {
  padding: 8px 16px; border-radius: 100px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease); white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg.aud button[aria-pressed="true"] { background: var(--accent); }

.tour-stage { display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
.tframe { position: relative; background: linear-gradient(160deg, #17352A, #081711); box-shadow: 0 24px 60px -24px rgba(8,48,31,0.5), inset 0 0 0 1.5px rgba(255,255,255,0.07); }
.tframe .screen { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0B1512; }
.tframe .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity 0.35s var(--ease); }
.tframe .screen img.show { opacity: 1; }
.tframe.phone { width: 284px; max-width: 78vw; aspect-ratio: 1080 / 2340; border-radius: 38px; padding: 11px; }
.tframe.phone::before { content: ""; position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 104px; height: 20px; background: #05100B; border-radius: 0 0 13px 13px; z-index: 3; }
.tframe.phone .screen { border-radius: 28px; }
.tframe.ipad { width: 384px; max-width: 86vw; aspect-ratio: 834 / 1194; border-radius: 30px; padding: 16px; }
.tframe.ipad::after { content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; border-radius: 50%; background: #2C4A3C; z-index: 3; }
.tframe.ipad .screen { border-radius: 16px; }
.tframe.laptop { width: min(780px, 94vw); aspect-ratio: 1440 / 872; border-radius: 14px 14px 0 0; padding: 0; overflow: hidden; }
.tframe.laptop .bar { height: 38px; background: #10261D; display: flex; align-items: center; gap: 8px; padding: 0 14px; }
.tframe.laptop .bar i { width: 11px; height: 11px; border-radius: 50%; }
.tframe.laptop .bar i:nth-child(1) { background: #FF5F57; } .tframe.laptop .bar i:nth-child(2) { background: #FEBC2E; } .tframe.laptop .bar i:nth-child(3) { background: #28C840; }
.tframe.laptop .bar .url { margin-left: 10px; flex: 1; max-width: 340px; height: 22px; border-radius: 100px; background: #0B1512; color: #7FA391; font-family: var(--mono); font-size: 10.5px; display: flex; align-items: center; padding: 0 14px; }
.tframe.laptop .screen { height: calc(100% - 38px); }
.tframe.laptop .screen img { object-position: top left; }
.laptopwrap { display: flex; flex-direction: column; align-items: center; }
.laptopwrap .base { width: min(840px, 99vw); height: 14px; background: linear-gradient(#CBD8D0, #A9BCB1); border-radius: 0 0 12px 12px; box-shadow: 0 12px 26px -10px rgba(8,48,31,0.3); }

.tour-panel { max-width: 52ch; }
.tour-step { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.tour-step::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); }
.tour-panel h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.025em; font-size: clamp(24px, 3.2vw, 32px); margin-top: 10px; }
.tour-panel .cap { font-size: 16px; color: var(--body); margin-top: 8px; text-wrap: pretty; }
.tour-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.tour-dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.tour-dots button { width: 9px; height: 9px; border-radius: 50%; padding: 0; background: var(--border-strong); transition: background 0.15s var(--ease), transform 0.15s var(--ease); }
.tour-dots button.active { background: var(--accent); transform: scale(1.3); }
.tour-dots button:hover { background: var(--accent-deep); }

.tour-video { max-width: 800px; margin: 0 auto; }
.tour-video details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; text-align: left; }
.tour-video summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-size: 15px; font-weight: 600; color: var(--ink); }
.tour-video summary::-webkit-details-marker { display: none; }
.tour-video summary .vic { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-wash); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.tour-video summary .vic svg { width: 16px; height: 16px; }
.tour-video summary .chev { margin-left: auto; color: var(--muted); font-size: 18px; transition: transform 0.2s var(--ease); }
.tour-video details[open] summary .chev { transform: rotate(90deg); }
.tour-video video { width: 100%; display: block; background: #000; max-height: 76vh; }
.tour-video .vnote { padding: 12px 20px 16px; color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
  .checkin-grid { grid-template-columns: 1fr; }
}

/* =============================================================
   3D interactions — pointer tilt, hive lattice, 3D body
   ============================================================= */
/* pointer-follow tilt: JS sets --rx/--ry on [data-tilt] elements */
[data-tilt] {
  transform: perspective(var(--tilt-persp, 1100px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* pain-map depth layers: markers float above the figure */
.bodymap-fig { transform-style: preserve-3d; }
.bodymap-stack { position: relative; transform-style: preserve-3d; }
.bodymap-stack svg { width: auto; height: 218px; }
.bodymap-markers { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateZ(34px); pointer-events: none; }
.bodymap-markers svg { width: 100%; height: 100%; }

/* Three.js body viewer (progressive upgrade over the SVG figure) */
.body3d { position: relative; height: 252px; cursor: grab; touch-action: pan-y; }
.body3d:active { cursor: grabbing; }
.body3d canvas { display: block; width: 100%; height: 100%; }
.b3d-hint {
  position: absolute; right: 4px; bottom: 2px; pointer-events: none;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border); border-radius: 100px; padding: 3px 9px;
}

/* Hive Intelligence lattice — CSS 3D honeycomb on a dark hive panel */
.hive-panel {
  position: relative; background: var(--navy-deep); border-radius: var(--r-xl);
  padding: 34px 16px 26px; transform-style: preserve-3d; --tilt-persp: 820px;
  box-shadow: var(--shadow-card);
}
.hive-panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 32%, rgba(54,199,129,0.22), transparent 68%);
}
.hive3d { display: flex; align-items: center; justify-content: center; transform-style: preserve-3d; }
.hive-fit { transform: translateZ(90px); transform-style: preserve-3d; }
.hive-osc { position: relative; width: 340px; height: 330px; transform-style: preserve-3d; animation: hiveSway 4.8s ease-in-out infinite alternate; }
@keyframes hiveSway {
  from { transform: rotateY(-26deg) rotateX(9deg); }
  to { transform: rotateY(26deg) rotateX(-8deg); }
}
.hive-cell {
  position: absolute; width: 100px; height: 115px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(165deg, rgba(255,255,255,0.14), rgba(255,255,255,0.055));
  display: flex; align-items: center; justify-content: center;
  color: var(--on-green-dim);
}
/* the glow is an opacity-only overlay — animating filter/background on
   3D-positioned, clipped cells makes browsers drop them mid-animation */
.hive-cell::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(165deg, rgba(54,199,129,0.66), rgba(54,199,129,0.24));
  opacity: 0;
  animation: cellGlow 4.8s ease-in-out infinite;
}
.hive-cell svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.hive-cell.core {
  background: linear-gradient(165deg, rgba(59,130,246,0.5), rgba(59,130,246,0.2));
  color: #fff;
  transform: translateZ(92px);
}
.hive-cell.core::before {
  background: radial-gradient(62% 62% at 50% 45%, rgba(147,183,255,0.7), rgba(59,130,246,0.12));
  animation: coreGlow 2.4s ease-in-out infinite;
}
.hive-cell.core svg { width: 30px; height: 30px; }
@keyframes cellGlow { 0%, 18%, 100% { opacity: 0; } 8% { opacity: 1; } }
@keyframes coreGlow { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.75; } }
/* true honeycomb: core + NW·NE·E·SE·SW·W (340×330 box, cell 100×115) */
.hive-cell:nth-child(1) { left: 120px; top: 107px; }                                   /* core */
.hive-cell:nth-child(2) { left: 68px;  top: 17px;  transform: translateZ(52px); }
.hive-cell:nth-child(3) { left: 172px; top: 17px;  transform: translateZ(16px); }
.hive-cell:nth-child(4) { left: 224px; top: 107px; transform: translateZ(60px); }
.hive-cell:nth-child(5) { left: 172px; top: 197px; transform: translateZ(22px); }
.hive-cell:nth-child(6) { left: 68px;  top: 197px; transform: translateZ(48px); }
.hive-cell:nth-child(7) { left: 16px;  top: 107px; transform: translateZ(12px); }
.hive-cell:nth-child(3)::before { animation-delay: 0.8s; }
.hive-cell:nth-child(4)::before { animation-delay: 1.6s; }
.hive-cell:nth-child(5)::before { animation-delay: 2.4s; }
.hive-cell:nth-child(6)::before { animation-delay: 3.2s; }
.hive-cell:nth-child(7)::before { animation-delay: 4.0s; }
.hive-tag {
  position: relative; z-index: 2; display: block; text-align: center; margin-top: 20px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--on-green-dim);
}
@media (max-width: 480px) {
  .hive-fit { transform: translateZ(90px) scale(0.74); }
  .hive-panel { padding: 12px 6px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-tilt] { transform: none; }
  .hive-osc { animation: none; }
  .hive-cell::before { animation: none; opacity: 0; }
}

/* ============================================================
   Grounding v2 + demo-patient + go-bold (added 2026-07-07)
   ============================================================ */

/* Inline footnote citation chips in AI cards */
sup.cite {
  font-family: var(--mono, monospace);
  font-size: .62em;
  font-weight: 600;
  color: var(--ai);
  background: color-mix(in srgb, var(--ai) 12%, transparent);
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: 2px;
  vertical-align: super;
  line-height: 1;
}
.cite-src {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: var(--ai);
  opacity: .9;
}

/* Interactive "answers with sources" mock — tap a [n] to reveal its source */
.gm {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(9,44,84,.05), 0 18px 40px rgba(9,44,84,.07);
}
.gm-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.gm-head .aic { width:30px; height:30px; border-radius:9px; background: color-mix(in srgb, var(--ai) 12%, transparent); color: var(--ai); display:flex; align-items:center; justify-content:center; }
.gm-head b { font-family: var(--serif); font-weight:600; font-size:16px; color: var(--ink); }
.gm-head .grounded { margin-left:auto; font-family: var(--mono, monospace); font-size:12px; color: var(--accent); }
.gm-body { font-size:15px; line-height:1.55; color: var(--ink-soft, var(--ink)); }
.gm-cite {
  cursor: pointer;
  font-family: var(--mono, monospace);
  font-size: .68em; font-weight:600;
  color: var(--ai);
  background: color-mix(in srgb, var(--ai) 12%, transparent);
  border: none; border-radius:4px; padding:1px 5px; margin-left:2px;
  vertical-align: super; line-height:1;
  transition: background .15s ease, transform .12s ease;
}
.gm-cite:hover, .gm-cite:focus-visible { background: color-mix(in srgb, var(--ai) 22%, transparent); transform: translateY(-1px); outline: none; }
.gm-cite[aria-expanded="true"] { background: var(--ai); color:#fff; }
.gm-sources { list-style:none; margin:16px 0 0; padding:14px 0 0; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; gap:8px 18px; }
.gm-sources li { font-family: var(--mono, monospace); font-size:12.5px; color: var(--muted); transition: color .2s ease, background .2s ease; border-radius:6px; padding:2px 6px; }
.gm-sources li.lit { color: var(--ai); background: color-mix(in srgb, var(--ai) 10%, transparent); }
.gm-sources li b { color: var(--ai); font-weight:700; }

/* "Meet your demo patient" flip cards for clinicians / psychologists */
.dp-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap:18px; margin-top:24px; }
.dp {
  border: 1px solid var(--line); border-radius:18px; padding:22px 24px; background: var(--surface);
  box-shadow: 0 1px 3px rgba(9,44,84,.05), 0 16px 36px rgba(9,44,84,.06);
  transition: box-shadow .3s ease, border-color .3s ease;
}
.dp:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 1px 3px rgba(9,44,84,.06), 0 22px 50px rgba(9,44,84,.12); }
.dp-dept { font-family: var(--mono, monospace); font-size:11px; letter-spacing:.06em; text-transform:uppercase; color: var(--accent); }
.dp-name { font-family: var(--serif); font-size:22px; color: var(--ink); margin:6px 0 2px; }
.dp-tell { font-size:13.5px; color: var(--muted); }
.dp-trend { display:flex; align-items:flex-end; gap:5px; height:44px; margin:16px 0 6px; }
.dp-trend span { flex:1; background: color-mix(in srgb, var(--accent) 26%, transparent); border-radius:3px 3px 0 0; }
.dp-trend span:last-child { background: var(--coral, #E4572E); }
.dp-foot { font-family: var(--mono, monospace); font-size:11.5px; color: var(--ai); }

@media (prefers-reduced-motion: reduce) {
  .gm-cite, .dp { transition: none; }
}
