/* Pulse Lab Intelligence — marketing site
   Palette and type follow the app's DESIGN.md ("The Quiet Chart Room"). */

:root {
  --bg: #050b10;
  --header-grid-line: color-mix(in srgb, #283b44 22%, transparent);
  --header-grid-node: color-mix(in srgb, #283b44 48%, transparent);
  --surface: #09151c;
  --panel: #0e1a22;
  --panel-2: #111f29;
  --field: #0b171f;
  --well: #16242d;
  --border: #20313c;
  --border-soft: rgba(143, 162, 171, 0.14);
  --grid: #283b44;
  --text: #f4f8f8;
  --text-soft: #cbd8dd;
  --muted: #8fa2ab;
  --mint: #6fffd2;
  --mint-hover: #8bffdd;
  --cyan: #52c7f5;
  --coral: #ff7b6e;
  --amber: #ffca72;
  --violet: #b39dff;
  --ink: #06130f;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --radius: 12px;
  --radius-lg: 20px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-soft);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--mint); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Type ---------- */

h1, h2, h3, h4 { color: var(--text); margin: 0; font-weight: 700; letter-spacing: -0.02em; }

.display {
  font-size: clamp(44px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.display em, .h2 em {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  background: linear-gradient(92deg, var(--mint) 0%, var(--cyan) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.06em;
}
.h2 em { display: inline; }

.h2 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.04; letter-spacing: -0.035em; }
.h3 { font-size: 20px; line-height: 1.25; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.7; }

.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-soft); max-width: 60ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
/* Join the beta: a glossy, lit-from-above button (the treatment tryhemo uses), in the
   mint of the app's Add PDF button, ringed in the signal's resting red like that button is. */
.btn-primary, .btn-beta {
  color: var(--ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(#6fffd2 0%, #6fffd2 58%, #2fd6a3 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(154, 50, 39, 0.55),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.18),
    0 4px 14px rgba(111, 255, 210, 0.28);
  transition: transform 0.15s, filter 0.15s;
}
.btn-primary:hover, .btn-beta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active, .btn-beta:active { transform: translateY(0); filter: brightness(0.97); }
.btn-ghost { border-color: var(--border); color: var(--text); background: rgba(14, 26, 34, 0.6); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }

.link-arrow { color: var(--mint); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform 0.2s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Header ----------
   Copied from the app's AppHeader (myquest-analysis/app/globals.css): the grid bar
   with the ECG signal, deep red at rest and green where it's alive. */

.app-header {
  position: sticky; top: 0; z-index: 50; height: 64px;
  display: grid; grid-template-columns: 230px minmax(0, 1fr);
  background-color: rgba(0, 13, 15, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background-image:
    repeating-linear-gradient(0deg, var(--header-grid-line) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--header-grid-line) 0 1px, transparent 1px 40px),
    radial-gradient(circle .6px at 0 0, var(--header-grid-node) .6px, transparent .8px);
  background-size: 40px 40px;
  border-bottom: 1px solid var(--border);
}
.app-header > .brand, .app-header > .app-header-main { position: relative; z-index: 1; }
.app-header .brand { display: flex; align-items: center; height: 100%; padding: 0 20px; color: var(--text); }
.app-header .brand-lockup { display: block; height: 40px; width: auto; flex: 0 0 auto; }
.app-header-main {
  width: 100%; max-width: calc(1830px - 230px); min-width: 0; height: 100%; margin: 0 auto; padding: 0 38px;
  display: flex; align-items: center; justify-content: flex-end;
}

.header-signal { position: absolute; inset: 0; height: 64px; z-index: 0; overflow: hidden; contain: paint; pointer-events: none; }
html, body { overflow-x: clip; }
.header-signal svg { position: absolute; left: 0; top: 50%; width: 200%; height: 100%; overflow: visible; transform: translate3d(0, -50%, 0); animation: header-signal-travel 12s linear infinite; }
.header-signal use { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.header-signal-rail { stroke: #2e0d0a; stroke-width: 1; opacity: .58; }
.header-signal-flow { stroke: #9a3227; stroke-width: 1.35; opacity: .48; }
.header-signal-scan { stroke: #80ffb3; stroke-width: 2; stroke-dasharray: .055 .945; animation: header-signal-scan 5.4s linear infinite, header-signal-pulse 3.6s cubic-bezier(.22, 1, .36, 1) infinite; }
.header-signal-dot { fill: none; stroke: #80ffb3; stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.header-signal-dot-moving { animation: header-signal-dot-blink 1.2s steps(2, end) infinite; }
.header-signal-dot-static { display: none; opacity: .55; }
@keyframes header-signal-travel { to { transform: translate3d(-50%, -50%, 0); } }
@keyframes header-signal-scan { to { stroke-dashoffset: -1; } }
@keyframes header-signal-pulse {
  0%, 16%, 23%, 31%, 38%, 100% { opacity: .16; }
  19% { opacity: .5; }
  34% { opacity: .36; }
}
@keyframes header-signal-dot-blink {
  0%, 42%, 100% { opacity: .28; }
  50%, 76% { opacity: 1; }
}

.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav-links a:not(.upload-button) { color: var(--muted); transition: color 0.2s; }
.nav-links a:not(.upload-button):hover, .nav-links a[aria-current="page"] { color: var(--text); }
/* The app's header button: mint gone semi-transparent so the trace shows through,
   with a hairline in the signal's resting red. */
.upload-button {
  min-height: 34px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap;
}

.nav-toggle {
  display: none; width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--border); background: rgba(9, 21, 28, 0.85); cursor: pointer;
}
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text); margin: 4px auto; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 820px) {
  .app-header { min-height: 56px; height: 56px; grid-template-columns: minmax(0, 1fr) auto; padding: 0 16px; }
  .header-signal { height: 56px; }
  .app-header .brand { height: 56px; padding: 0; }
  .app-header .brand-lockup { height: 34px; }
  .app-header-main { width: auto; max-width: none; height: 56px; margin: 0; padding: 0; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 56px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(5, 11, 16, 0.98); border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 20px; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.25s var(--ease);
  }
  .nav-links a:not(.upload-button) { padding: 14px 0; border-bottom: 1px solid var(--border-soft); font-size: 16px; }
  .nav-links .upload-button { margin-top: 16px; min-height: 44px; font-size: 12px; }
  .nav-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .header-signal svg { animation: none !important; transform: translate3d(0, -50%, 0) !important; }
  .header-signal-scan { animation: none !important; opacity: .28; }
  .header-signal-dot-moving { display: none; }
  .header-signal-dot-static { display: block; opacity: .55; }
}

/* ---------- Sections ---------- */

section { position: relative; }
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head .h2 { margin: 16px 0 18px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::after { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.7; }
.divider { border-top: 1px solid var(--border-soft); }

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 9vw, 110px) 0 0; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 900px; z-index: -1;
  background:
none;
}
/* The page-top grid: a static colour-graded dot lattice, faded in under the header
   and out again further down the page (drawn by js/main.js). */
.bg-grid {
  position: absolute; top: 0; left: 0; right: 0; height: 2854px; z-index: -1; pointer-events: none;
  mask-image: linear-gradient(transparent 0%, rgba(0,0,0,.2) 8%, rgba(0,0,0,.7) 16%, #000 24%, #000 58%, rgba(0,0,0,.7) 70%, rgba(0,0,0,.35) 82%, rgba(0,0,0,.1) 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(transparent 0%, rgba(0,0,0,.2) 8%, rgba(0,0,0,.7) 16%, #000 24%, #000 58%, rgba(0,0,0,.7) 70%, rgba(0,0,0,.35) 82%, rgba(0,0,0,.1) 92%, transparent 100%);
}
.bg-grid canvas { width: 100%; height: 100%; display: block; }
main { position: relative; isolation: isolate; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
  padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(14, 26, 34, 0.7); font-size: 13px; color: var(--text-soft);
}
.hero .pill b {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink);
  background: var(--mint); padding: 3px 8px; border-radius: 999px;
}
.hero .lede { margin: 26px auto 36px; }
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ---------- App mockup ---------- */

.mock-stage { position: relative; margin: clamp(56px, 8vw, 88px) auto 0; max-width: 1080px; padding: 0 var(--gutter); }
.mock-stage::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 45%;
  background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none;
}
.mock {
  position: relative; border-radius: 16px 16px 0 0; border: 1px solid var(--border); border-bottom: 0;
  background: linear-gradient(180deg, var(--surface), var(--bg));
  box-shadow: 0 -30px 120px -40px rgba(111, 255, 210, 0.25), 0 0 0 1px rgba(255,255,255,0.02) inset;
  text-align: left; overflow: hidden;
}
.mock-bar {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-bottom: 1px solid var(--border); background: rgba(9, 21, 28, 0.9);
}
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--well); }
.mock-bar .url {
  margin: 0 auto; font-family: var(--mono); font-size: 11px; color: var(--muted);
  background: var(--field); border: 1px solid var(--border); border-radius: 6px; padding: 3px 12px;
}
.mock-body { display: grid; grid-template-columns: 190px 1fr; min-height: 470px; }
.mock-side { border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.mock-side .logo { display: flex; align-items: center; gap: 8px; padding: 0 8px 16px; color: var(--text); font-weight: 700; font-size: 14px; }
.mock-side .logo img { width: 22px; height: 22px; }
.mock-side a {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding: 8px 10px; border-radius: 8px; display: flex; align-items: center; gap: 9px;
}
.mock-side a::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--grid); }
.mock-side a.on { color: var(--mint); background: var(--panel); }
.mock-side a.on::before { background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.mock-main { padding: 22px; display: grid; gap: 14px; grid-template-columns: 1.6fr 1fr; align-content: start; }
.mock-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.mock-head h4 { font-size: 20px; letter-spacing: -0.01em; }
.mock-head .date {
  font-family: var(--mono); font-size: 11px; color: var(--text-soft);
  border: 1px solid var(--border); background: var(--field); border-radius: 8px; padding: 6px 10px;
}
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.panel-label { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat b { display: block; font-family: var(--mono); font-size: 22px; color: var(--text); margin-top: 6px; letter-spacing: -0.02em; }
.stat small { font-size: 11px; color: var(--muted); }
.stat .up { color: var(--coral); }
.stat .ok { color: var(--mint); }
.chart-panel .chart-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.chart-panel .chart-top b { font-family: var(--mono); color: var(--text); font-size: 13px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .band { fill: rgba(111, 255, 210, 0.07); stroke: rgba(111, 255, 210, 0.25); stroke-dasharray: 3 4; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; opacity: 0.5; }
.chart .line { fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { fill: url(#chartFill); }
.chart .dot { fill: var(--bg); stroke: var(--cyan); stroke-width: 2; }
.chart .dot.hi { stroke: var(--coral); fill: var(--coral); filter: drop-shadow(0 0 6px rgba(255,123,110,0.8)); }
.chart .dot.last { fill: var(--mint); stroke: var(--mint); filter: drop-shadow(0 0 8px rgba(111,255,210,0.9)); }
.chart text { font-family: var(--mono); font-size: 9px; fill: var(--muted); }
.flag-list { display: grid; gap: 8px; margin-top: 10px; }
.flag {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
  padding: 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border);
  font-size: 12px; color: var(--text);
}
.flag .tag { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; padding: 3px 7px; border-radius: 5px; }
.tag-hi { color: var(--coral); background: rgba(255, 123, 110, 0.12); }
.tag-imp { color: var(--mint); background: rgba(111, 255, 210, 0.1); }
.tag-new { color: var(--amber); background: rgba(255, 202, 114, 0.12); }
.gauge { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: var(--well); position: relative; }
.gauge::before { content: ""; position: absolute; left: 22%; right: 22%; top: 0; bottom: 0; background: rgba(111, 255, 210, 0.3); border-radius: 4px; }
.gauge i { position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--text); box-shadow: 0 0 0 3px var(--panel-2); }

.float-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; font-size: 13px; color: var(--text);
  background: rgba(14, 26, 34, 0.88); border: 1px solid var(--border);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.8); backdrop-filter: blur(10px);
  animation: bob 6s ease-in-out infinite;
}
.float-chip .dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.float-chip.left { left: -8px; top: 58%; }
.float-chip.right { right: -8px; top: 16%; animation-delay: -3s; }
.float-chip.right .dotc { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
@keyframes bob { 50% { transform: translateY(-8px); } }

@media (max-width: 900px) {
  .mock-body { grid-template-columns: 1fr; }
  .mock-side { display: none; }
  .mock-main { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .float-chip { display: none; }
}

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  position: relative; padding: 28px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel), rgba(14, 26, 34, 0.4));
  border: 1px solid var(--border); overflow: hidden;
}
.step .num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--mint); }
.step h3 { margin: 14px 0 10px; font-size: 22px; }
.step p { margin: 0; color: var(--muted); }
.step-visual { height: 150px; margin: -4px -4px 24px; border-radius: 14px; background: var(--field); border: 1px solid var(--border); position: relative; overflow: hidden; }
.sv-files { display: flex; align-items: center; justify-content: center; height: 100%; }
.sv-files span {
  width: 64px; height: 82px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border);
  margin: 0 -10px; display: grid; place-items: end center; padding-bottom: 10px;
  font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 0.1em;
  box-shadow: 0 10px 20px -10px #000; transition: transform 0.4s var(--ease);
}
.sv-files span:nth-child(1) { transform: rotate(-10deg) translateY(6px); }
.sv-files span:nth-child(2) { transform: translateY(-4px); z-index: 2; border-color: rgba(111,255,210,0.5); color: var(--mint); }
.sv-files span:nth-child(3) { transform: rotate(10deg) translateY(6px); }
.step:hover .sv-files span:nth-child(1) { transform: rotate(-16deg) translate(-12px, 6px); }
.step:hover .sv-files span:nth-child(3) { transform: rotate(16deg) translate(12px, 6px); }
.sv-changes { padding: 18px; display: grid; gap: 8px; }
.sv-changes div { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-soft); padding: 7px 10px; background: var(--panel-2); border-radius: 8px; border: 1px solid var(--border); }
.sv-ask { padding: 18px; display: grid; gap: 8px; }
.sv-ask p { margin: 0; font-size: 12px; color: var(--text-soft); padding: 9px 11px; border-radius: 10px 10px 10px 3px; background: var(--panel-2); border: 1px solid var(--border); }
.sv-ask p:nth-child(2) { margin-left: 18px; }
.sv-ask p b { color: var(--mint); font-family: var(--mono); font-weight: 600; }

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

/* ---------- Marquee ---------- */

.marquee {
  position: relative; overflow: hidden; padding: 8px 0;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 14px; width: max-content; animation: scroll 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee.reverse .marquee-track { animation-direction: reverse; animation-duration: 46s; }
.doc-chip {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--border); white-space: nowrap;
}
.doc-chip .ic { width: 30px; height: 36px; border-radius: 5px; background: var(--well); border: 1px solid var(--grid); position: relative; }
.doc-chip .ic::after { content: ""; position: absolute; left: 6px; right: 6px; top: 9px; height: 14px; background: repeating-linear-gradient(var(--grid) 0 2px, transparent 2px 5px); }
.doc-chip b { display: block; color: var(--text); font-size: 14px; font-weight: 600; }
.doc-chip small { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--muted); }
.doc-chip.ok .ic { border-color: rgba(111,255,210,0.5); }
@keyframes scroll { to { transform: translateX(calc(-50% - 7px)); } }

/* ---------- Split ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split .h2 { margin: 16px 0 20px; }
.checks { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 18px; }
.checks li { display: grid; grid-template-columns: 28px 1fr; gap: 4px 14px; }
.checks li::before {
  content: ""; grid-row: span 2; width: 28px; height: 28px; border-radius: 8px;
  background: rgba(111, 255, 210, 0.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236fffd2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat;
  border: 1px solid rgba(111, 255, 210, 0.25);
}
.checks b { color: var(--text); font-weight: 600; }
.checks span { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.merge-visual { padding: 24px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--border); }
.merge-row { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; gap: 10px; margin-bottom: 10px; }
.merge-row .src { font-size: 13px; padding: 10px 12px; border-radius: 9px; background: var(--field); border: 1px dashed var(--grid); color: var(--text-soft); }
.merge-row .src small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--muted); }
.merge-row .arrow { color: var(--mint); text-align: center; font-family: var(--mono); }
.merge-row .dst { font-size: 13px; padding: 10px 12px; border-radius: 9px; background: rgba(111,255,210,0.07); border: 1px solid rgba(111,255,210,0.3); color: var(--text); font-weight: 600; }
.merge-foot { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* ---------- Feature grid ---------- */

.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.feature {
  grid-column: span 2; position: relative; padding: 26px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--border); overflow: hidden;
  transition: border-color 0.25s, transform 0.3s var(--ease);
}
.feature:hover { border-color: rgba(111, 255, 210, 0.35); transform: translateY(-2px); }
.feature.wide { grid-column: span 3; }
.feature .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(111, 255, 210, 0.08); border: 1px solid rgba(111, 255, 210, 0.22); color: var(--mint);
}
.feature .ico svg { width: 20px; height: 20px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.feature .fv { margin-top: 22px; }
.mini-bars { display: flex; align-items: end; gap: 6px; height: 64px; }
.mini-bars i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(var(--cyan), rgba(82,199,245,0.15)); }
.mini-bars i.hi { background: linear-gradient(var(--coral), rgba(255,123,110,0.15)); }
.buckets { display: flex; flex-wrap: wrap; gap: 6px; }
.buckets span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--field); }
@media (max-width: 960px) { .feature, .feature.wide { grid-column: span 3; } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } .feature, .feature.wide { grid-column: auto; } }

/* ---------- Library ---------- */

.library { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.library-list {
  max-height: 520px; overflow-y: auto; padding-right: 8px;
  mask-image: linear-gradient(to bottom, transparent, #000 4%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 4%, #000 92%, transparent);
  scrollbar-width: thin; scrollbar-color: var(--grid) transparent;
}
.library-list h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint); margin: 24px 0 10px; }
.library-list h4:first-child { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 13px; padding: 6px 11px; border-radius: 8px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); color: var(--text-soft);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.chip:hover, .chip.is-active { border-color: var(--mint); color: var(--text); background: rgba(111,255,210,0.06); }
.marker-card {
  position: sticky; top: 100px; padding: 28px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--border);
}
.marker-card .panel-label { color: var(--mint); }
.marker-card h3 { font-size: 28px; margin: 10px 0 6px; letter-spacing: -0.02em; }
.marker-card .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.marker-card p { color: var(--text-soft); margin: 18px 0 22px; }
.range-viz { position: relative; height: 36px; margin-top: 6px; }
.range-viz .track { position: absolute; left: 0; right: 0; top: 14px; height: 8px; border-radius: 5px; background: var(--well); }
.range-viz .ok { position: absolute; top: 14px; height: 8px; left: 20%; right: 20%; border-radius: 5px; background: rgba(111,255,210,0.35); }
.range-viz .lbl { position: absolute; top: 28px; font-family: var(--mono); font-size: 10px; color: var(--muted); transform: translateX(-50%); }
.marker-card .hint { margin-top: 30px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
@media (max-width: 900px) { .library { grid-template-columns: 1fr; } .marker-card { position: relative; top: 0; order: -1; } .library-list { max-height: 380px; } }

/* ---------- Privacy ---------- */

.privacy-card {
  position: relative; border-radius: 28px; padding: clamp(32px, 6vw, 72px); overflow: hidden;
  background: radial-gradient(700px 400px at 85% 0%, rgba(82,199,245,0.14), transparent 60%), var(--surface);
  border: 1px solid var(--border);
}
.vault {
  position: relative; aspect-ratio: 1; max-width: 360px; margin: 0 auto; display: grid; place-items: center;
}
.vault .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--border); }
.vault .ring:nth-child(2) { inset: 14%; border-color: rgba(82,199,245,0.3); border-style: dashed; animation: spin 40s linear infinite; }
.vault .ring:nth-child(3) { inset: 28%; border-color: rgba(111,255,210,0.4); }
.vault .core {
  position: relative; width: 38%; aspect-ratio: 1; border-radius: 26px; display: grid; place-items: center;
  background: linear-gradient(160deg, #13303a, var(--panel)); border: 1px solid rgba(111,255,210,0.45);
  box-shadow: 0 0 60px -10px rgba(111,255,210,0.5);
}
.vault .core svg { width: 44%; color: var(--mint); }
.vault .tagc {
  position: absolute; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--text-soft);
  padding: 5px 9px; border-radius: 6px; background: var(--panel); border: 1px solid var(--border); white-space: nowrap;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Ranges ---------- */

.range-demo { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--border); }
.range-demo .rd-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.range-demo .rd-head b { color: var(--text); font-size: 18px; }
.rd-bar { position: relative; height: 54px; }
.rd-bar .track { position: absolute; left: 0; right: 0; top: 20px; height: 14px; border-radius: 8px; background: linear-gradient(90deg, rgba(255,123,110,0.25), var(--well) 18%, var(--well) 82%, rgba(255,123,110,0.25)); }
.rd-bar .printed { position: absolute; top: 20px; height: 14px; left: 18%; right: 18%; border-radius: 8px; background: rgba(82,199,245,0.25); border: 1px solid rgba(82,199,245,0.5); }
.rd-bar .reading { position: absolute; top: 12px; width: 4px; height: 30px; border-radius: 3px; background: var(--text); box-shadow: 0 0 12px rgba(244,248,248,0.6); transform: translateX(-50%); transition: left 0.8s var(--ease); }
.rd-bar .reading::after { content: attr(data-v); position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; color: var(--text); white-space: nowrap; background: var(--panel-2); border: 1px solid var(--border); padding: 3px 8px; border-radius: 6px; }
.rd-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 6px; }
.rd-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; font-size: 13px; color: var(--muted); }
.rd-legend span { display: inline-flex; align-items: center; gap: 8px; }
.rd-legend i { width: 14px; height: 8px; border-radius: 3px; display: inline-block; }
.rd-steps { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.rd-steps button { cursor: pointer; font-family: var(--mono); font-size: 11px; padding: 6px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--field); color: var(--muted); }
.rd-steps button.is-active { color: var(--ink); background: var(--mint); border-color: var(--mint); }
.rd-read { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--field); border: 1px solid var(--border); font-size: 14px; color: var(--text-soft); min-height: 54px; }

/* ---------- Principles ---------- */

.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.principle {
  padding: 30px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--border);
  display: grid; grid-template-columns: auto 1fr; gap: 6px 20px;
}
.principle .n { grid-row: span 2; font-family: var(--serif); font-style: italic; font-size: 46px; line-height: 1; color: var(--mint); opacity: 0.85; }
.principle h3 { font-size: 20px; }
.principle p { margin: 0; color: var(--muted); }
.principle blockquote { grid-column: 2; margin: 14px 0 0; padding: 12px 14px; border-left: 2px solid var(--mint); background: var(--field); border-radius: 0 8px 8px 0; font-family: var(--mono); font-size: 12.5px; color: var(--text-soft); }
@media (max-width: 820px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Formats / MCP ---------- */

.format-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 36px; }
.format { padding: 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); text-align: center; }
.format b { display: block; color: var(--text); font-size: 15px; }
.format small { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
@media (max-width: 820px) { .format-grid { grid-template-columns: repeat(2, 1fr); } }

.terminal {
  border-radius: var(--radius-lg); background: #050c10; border: 1px solid var(--border); overflow: hidden;
  font-family: var(--mono); font-size: 13px; box-shadow: 0 30px 80px -40px rgba(82,199,245,0.4);
}
.terminal .mock-bar { background: var(--surface); }
.terminal-body { padding: 22px; display: grid; gap: 14px; min-height: 300px; }
.terminal .q { color: var(--text); }
.terminal .q::before { content: "› "; color: var(--mint); }
.terminal .tool { color: var(--muted); font-size: 11.5px; }
.terminal .tool b { color: var(--cyan); font-weight: 500; }
.terminal .a { color: var(--text-soft); line-height: 1.7; padding-left: 14px; border-left: 1px solid var(--border); }
.terminal .a em { color: var(--amber); font-style: normal; }
.terminal .a strong { color: var(--mint); font-weight: 500; }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--mint); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Roadmap ---------- */

.roadmap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: rm; }
.rm { position: relative; padding: 22px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); }
.rm::before { counter-increment: rm; content: "0" counter(rm); font-family: var(--mono); font-size: 12px; color: var(--mint); letter-spacing: 0.1em; }
.rm h3 { font-size: 16px; margin: 12px 0 6px; }
.rm p { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 960px) { .roadmap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .roadmap { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font-size: 18px; font-weight: 600; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--mint); font-family: var(--mono); font-size: 18px; font-weight: 400;
  transition: transform 0.25s var(--ease), background 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: rgba(111,255,210,0.08); }
.faq .ans { padding: 0 50px 24px 0; color: var(--muted); }
.faq .ans p { margin: 0 0 12px; }
.faq .ans p:last-child { margin: 0; }
.faq-group { margin-bottom: 56px; }
.faq-group > h2 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--mint); margin-bottom: 6px; }

/* ---------- CTA ---------- */

.cta {
  position: relative; text-align: center; border-radius: 32px; padding: clamp(56px, 9vw, 110px) var(--gutter);
  background:
    radial-gradient(500px 260px at 50% 0%, rgba(111,255,210,0.18), transparent 70%),
    radial-gradient(500px 260px at 50% 110%, rgba(82,199,245,0.12), transparent 70%),
    var(--surface);
  border: 1px solid var(--border); overflow: hidden;
}
.cta .display { font-size: clamp(38px, 6.4vw, 76px); }
.cta .lede { margin: 22px auto 34px; }
.waitlist { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.waitlist input {
  flex: 1; min-width: 0; height: 50px; padding: 0 16px; border-radius: 10px; font: inherit; font-size: 15px;
  background: var(--field); border: 1px solid var(--border); color: var(--text);
}
.waitlist input::placeholder { color: var(--muted); }
.waitlist input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(111,255,210,0.15); }
.waitlist .btn { height: 50px; }
.form-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.form-msg { margin-top: 14px; font-size: 14px; color: var(--mint); min-height: 1.4em; }
.form-msg.err { color: var(--coral); }
.badge-free { display: inline-block; margin-bottom: 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink); background: var(--mint); padding: 5px 10px; border-radius: 6px; }
@media (max-width: 520px) { .waitlist { flex-direction: column; } }

/* ---------- Footer ---------- */

.site-footer { padding: 72px 0 40px; margin-top: clamp(60px, 9vw, 120px); border-top: 1px solid var(--border-soft); font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
.footer-top img { height: 38px; width: auto; margin-bottom: 16px; }
.footer-top p { color: var(--muted); max-width: 34ch; margin: 0; }
.footer-top h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-top a { color: var(--muted); transition: color 0.2s; }
.footer-top a:hover { color: var(--mint); }
.disclaimer { margin-top: 48px; padding: 18px 20px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 28px; color: var(--muted); font-size: 13px; }
@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-top > div:first-child { grid-column: 1 / -1; } }

/* ---------- Subpage hero ---------- */

.page-hero { padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); text-align: center; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: -40% 0 auto; height: 600px; z-index: -1; background: none; }
.page-hero .h2 { font-size: clamp(40px, 6vw, 72px); margin: 18px auto 20px; max-width: 16ch; }
.page-hero .lede { margin: 0 auto; }

/* Feature detail rows */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--border-soft); }
.detail:nth-of-type(even) .detail-visual { order: -1; }
.detail h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 14px 0 16px; }
.detail ul { padding-left: 18px; color: var(--muted); margin: 18px 0 0; }
.detail li { margin-bottom: 8px; }
.detail li::marker { color: var(--mint); }
.detail-visual { padding: 24px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--border); }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } .detail:nth-of-type(even) .detail-visual { order: 0; } }

/* Biomarker table page */
.bm-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; position: sticky; top: 64px; z-index: 5; padding: 14px 0; background: rgba(7,16,22,0.92); backdrop-filter: blur(10px); }
.bm-tools input { flex: 1 1 260px; height: 44px; padding: 0 14px; border-radius: 10px; font: inherit; background: var(--field); border: 1px solid var(--border); color: var(--text); }
.bm-tools input:focus { outline: none; border-color: var(--mint); }
.bm-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.bm-filters button { cursor: pointer; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 14px; }
.bm-filters button.is-active { border-color: var(--mint); color: var(--text); background: rgba(111,255,210,0.07); }
.bm-group { margin-bottom: 44px; }
.bm-group h2 { font-size: 22px; display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.bm-group h2 small { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 500; }
.bm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.bm { padding: 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.bm h3 { font-size: 16px; margin-bottom: 4px; }
.bm .meta { font-family: var(--mono); font-size: 11px; color: var(--mint); margin-bottom: 8px; }
.bm p { margin: 0; font-size: 14px; color: var(--muted); }
.bm-empty { text-align: center; color: var(--muted); padding: 40px 0; display: none; }

/* Prose (privacy) */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 26px; margin: 48px 0 14px; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--mint); }
.prose code { font-family: var(--mono); font-size: 0.88em; padding: 2px 6px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.flow { display: grid; gap: 10px; margin: 28px 0; }
.flow div { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding: 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.flow b.n { font-family: var(--mono); color: var(--ink); background: var(--mint); width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; }
.flow p { margin: 0; }
.flow p strong { color: var(--text); }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

.btn-lg { height: 56px; padding: 0 44px; font-size: 16px; border-radius: 12px; }

/* Primary buttons: the app's Trend-button cyan (#52c7f5), with no border or ring. */
.btn-primary, .btn-beta, .app-header .btn-beta {
  border: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(#52c7f5 0%, #52c7f5 58%, #2ea6dc 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.18),
    0 4px 14px rgba(82, 199, 245, 0.28);
}

/* The big trend line behind the hero mockup: a lab value rising, peaking and
   settling back. Drawn in left to right on load. */
.bg-trend {
  position: absolute; z-index: 0; pointer-events: none;
  left: 50%; width: 100vw; max-width: 1600px; transform: translateX(-50%);
  top: clamp(-200px, -14vw, -110px); height: clamp(260px, 32vw, 460px);
  overflow: visible;
}
.mock-stage .mock { z-index: 1; }
.mock-stage .float-chip { z-index: 3; }
.bg-trend-area { fill: url(#bgTrendFill); opacity: 0; animation: bg-trend-fade 1.4s 1.2s var(--ease) forwards; }
.bg-trend-line {
  fill: none; stroke: rgba(82, 199, 245, 0.55); stroke-width: 2; vector-effect: non-scaling-stroke;
  stroke-linejoin: round; stroke-linecap: round;
}
.bg-trend-reveal { transform: scaleX(0); transform-origin: 0 0; transform-box: view-box; animation: bg-trend-draw 2.4s 0.3s var(--ease) forwards; }
.bg-trend-dots { opacity: 0; animation: bg-trend-fade 0.6s 2.2s var(--ease) forwards; }
.bg-trend-dots path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bg-trend-dots .o { stroke: rgba(111, 255, 210, 0.6); stroke-width: 10; }
.bg-trend-dots .i { stroke: #071a20; stroke-width: 6; }
@keyframes bg-trend-draw { to { transform: scaleX(1); } }
@keyframes bg-trend-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .bg-trend-reveal { transform: none; }
  .bg-trend-area, .bg-trend-dots { opacity: 1; }
}

/* Compact hero: headline, lede and buttons sit closer to the header and to each other. */
.hero { padding-top: clamp(28px, 4.5vw, 56px); }
.hero .display { font-size: clamp(38px, 6vw, 68px); }
.hero .lede { margin: 16px auto 22px; font-size: clamp(16px, 1.4vw, 18px); max-width: 56ch; }
.hero .btn-lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: 10px; }
.hero .btn-ghost { height: 46px; }
.hero-note { margin-top: 10px; }
.mock-stage { margin-top: clamp(40px, 6vw, 64px); }

/* Header edge: a 1px line fading from cyan on the left through teal to near-black,
   over a dark inner shadow, in place of the flat border. */
.app-header { border-bottom-color: transparent; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.65); }
.app-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(82, 199, 245, 0.45) 0%, rgba(82, 199, 245, 0.32) 18%, rgba(42, 143, 160, 0.22) 55%, #03242b 100%);
}

/* A soft teal glow spreading down from under the header. */
main::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1100px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(42, 143, 160, 0.2), transparent 60%),
    radial-gradient(50% 40% at 50% 55%, rgba(26, 107, 122, 0.1), transparent 62%);
}

/* Desktop: logo and nav sit in the same 1160px centred column as the page content,
   leaving wide margins on large screens. The grid and signal still run full width. */
@media (min-width: 821px) {
  .app-header {
    grid-template-columns: auto minmax(0, 1fr);
    padding-inline: max(32px, calc((100% - 1160px) / 2));
  }
  .app-header .brand { padding: 0; }
  .app-header-main { max-width: none; margin: 0; padding: 0; }
}

/* Privacy policy */
.prose h3 { font-size: 18px; margin: 28px 0 8px; color: var(--text); }
.prose h2 { scroll-margin-top: 88px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a:not(.link-arrow) { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px; margin: 8px 0 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.toc a { font-size: 13px; color: var(--text-soft); padding: 6px 10px; border-radius: 8px; background: var(--field); border: 1px solid var(--border); }
.toc a:hover { color: var(--text); border-color: var(--cyan); }
.table-scroll { overflow-x: auto; margin: 18px 0; border-radius: 12px; border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.data-table th { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--panel); font-weight: 600; }
.data-table td { color: var(--text-soft); background: rgba(14, 26, 34, .5); }
.data-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }

.dataflow { margin: 28px 0 8px; padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); }
.dataflow .panel-label { display: block; margin-bottom: 14px; color: var(--cyan); }
.df-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.df-step { padding: 14px; border-radius: 12px; background: var(--field); border: 1px solid var(--border); }
.df-step b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.df-step span { color: var(--muted); font-size: 13px; line-height: 1.45; display: block; }
.df-server { border-color: rgba(82, 199, 245, .45); }
.df-arrow { align-self: center; color: var(--cyan); font-family: var(--mono); }
@media (max-width: 760px) { .df-steps { grid-template-columns: 1fr; } .df-arrow { transform: rotate(90deg); justify-self: center; } }

/* Privacy: section links in a sticky side menu on desktop, a wrap of chips on phones. */
.policy { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.policy .prose { max-width: 760px; margin: 0; }
.policy-side { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; }
.policy-side .toc { flex-direction: column; flex-wrap: nowrap; gap: 2px; padding: 0 0 0 14px; margin: 0; background: none; border: 0; border-left: 1px solid var(--border); border-radius: 0; }
.policy-side .toc-title { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.policy-side .toc a { background: none; border: 0; padding: 6px 0 6px 12px; margin-left: -15px; border-left: 2px solid transparent; border-radius: 0; font-size: 14px; color: var(--muted); }
.policy-side .toc a:hover { color: var(--text); }
.policy-side .toc a.is-active { color: var(--text); border-left-color: var(--cyan); }
@media (max-width: 900px) {
  .policy { grid-template-columns: 1fr; gap: 8px; }
  .policy-side { position: static; max-height: none; }
  .policy-side .toc { flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
  .policy-side .toc-title { width: 100%; margin-bottom: 2px; }
  .policy-side .toc a { margin: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--field); }
  .policy-side .toc a.is-active { border-color: var(--cyan); }
}

/* Features page: alternating copy + real app screenshots */
.feat-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 30px auto 0; max-width: 820px; }
.feat-chips a { font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: rgba(14, 26, 34, .6); color: var(--text-soft); transition: border-color .2s, color .2s; }
.feat-chips a:hover { border-color: var(--cyan); color: var(--text); }
.feat-list { display: grid; gap: clamp(72px, 10vw, 130px); padding-bottom: clamp(60px, 8vw, 100px); }
.feat { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr); gap: clamp(28px, 4vw, 56px); align-items: center; scroll-margin-top: 90px; }
.feat:nth-child(even) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr); }
.feat:nth-child(even) .feat-copy { order: 2; }
.feat-copy h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.1; margin: 14px 0 14px; }
.feat-copy p { color: var(--text-soft); margin: 0; }
.feat-copy ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.feat-copy li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15px; }
.feat-copy li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 10px rgba(82, 199, 245, .6); }
.shot { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset, 0 0 60px -30px rgba(82, 199, 245, .35); }
.shot img { display: block; width: 100%; height: auto; }
.shot-pair { display: grid; grid-template-columns: 1fr; gap: 16px; }
.feat-duo { align-items: start; }
.also-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.also { padding: 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.also h3 { font-size: 16px; margin-bottom: 6px; }
.also p { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 960px) {
  .feat, .feat:nth-child(even) { grid-template-columns: 1fr; }
  .feat:nth-child(even) .feat-copy { order: 0; }
  .also-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) { .also-grid { grid-template-columns: 1fr; } }

/* Closing signup: headline + form card on the left, a visual on the right. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.closing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding: clamp(40px, 6vw, 80px) 0; }
.closing-title { font-size: clamp(38px, 5.4vw, 64px); text-align: left; }
.closing-copy .lede { margin: 18px 0 26px; }
.signup-card {
  max-width: 440px; padding: 22px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 38, 48, .75), rgba(11, 23, 31, .75));
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 60px -30px rgba(82, 199, 245, .35);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.signup-card .badge-free { margin-bottom: 16px; }
.waitlist-stack { flex-direction: column; max-width: none; margin: 0; }
.waitlist-stack input[type=email], .waitlist-stack .btn { width: 100%; }
.signup-card .form-msg { text-align: left; }
.signup-card .form-note { margin: 12px 0 0; text-align: left; }
.closing-visual { display: flex; justify-content: center; }
.visual-placeholder {
  width: 100%; max-width: 520px; aspect-ratio: 1; border-radius: 28px;
  display: grid; place-content: center; gap: 8px; text-align: center;
  border: 1.5px dashed rgba(82, 199, 245, .45);
  background: radial-gradient(60% 60% at 50% 45%, rgba(82, 199, 245, .12), transparent 70%), rgba(14, 26, 34, .45);
}
.visual-placeholder span { color: var(--cyan); font-size: 13px; letter-spacing: .16em; }
.visual-placeholder small { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
  .closing { grid-template-columns: 1fr; }
  .closing-visual { order: 2; }
  .signup-card { max-width: none; }
  .visual-placeholder { max-width: 420px; }
}

/* Desktop: the closing visual hangs down over the top of the footer. */
@media (min-width: 901px) {
  .closing { padding-bottom: 0; align-items: end; }
  .closing-copy { padding-bottom: clamp(40px, 6vw, 80px); }
  .closing-visual { position: relative; z-index: 2; margin-bottom: clamp(-220px, -14vw, -140px); }
  #join + * , main + .site-footer { position: relative; z-index: 1; }
  .site-footer { margin-top: 0; }
  .site-footer .footer-top > div:first-child { position: relative; z-index: 3; }
}

@media (min-width: 901px) {
  /* Footer links stay in the left half so the overhanging visual covers nothing. */
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; max-width: 50%; }
}

/* Closing copy: headline and lede match the signup card's width, set tighter. */
.closing-copy { max-width: 440px; }
.closing-title { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.05; letter-spacing: -0.035em; }
.closing-copy .lede { font-size: 16px; margin: 10px 0 18px; max-width: none; }

/* Page content shares the header's 1160px column, so text lines up with the logo and nav. */
.wrap { max-width: calc(1160px + 2 * var(--gutter)); }
@media (min-width: 821px) { :root { --gutter: 32px; } }

/* Right edge: the hero mockup and the closing visual reach the column edge too. */
.mock-stage { max-width: calc(1160px + 2 * var(--gutter)); }
.closing-visual { justify-content: flex-end; }
@media (min-width: 901px) { .visual-placeholder { max-width: none; } }

/* Signup card, matched to the tryhemo closing card's styling (Pulse cyan button). */
.signup-card {
  padding: 22px; border-radius: 18px;
  background: rgba(4, 18, 23, 0.72);
  border: 1px solid rgba(245, 250, 250, 0.08);
  box-shadow: inset 0 1px 0 rgba(245, 250, 250, 0.04);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.signup-card .badge-free {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 0; border-radius: 0;
  background: none; color: rgba(245, 250, 250, 0.42);
  font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
}
.signup-card .badge-free::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px rgba(82, 199, 245, .8); }
.signup-card .waitlist-stack { gap: 12px; }
.signup-card .waitlist-stack input[type=email] {
  height: 50px; padding: 14px 16px; border-radius: 12px; font-size: 16px;
  background: rgba(0, 13, 15, 0.55); border: 1px solid rgba(245, 250, 250, 0.12); color: var(--text);
}
.signup-card .waitlist-stack input[type=email]::placeholder { color: rgba(245, 250, 250, 0.38); }
.signup-card .waitlist-stack input[type=email]:focus { border-color: rgba(82, 199, 245, 0.6); box-shadow: 0 0 0 3px rgba(82, 199, 245, 0.15); }
.signup-card .waitlist-stack .btn { height: 50px; padding: 14px 18px; border-radius: 12px; font-size: 16px; font-weight: 600; }
.signup-card .form-msg { margin-top: 10px; font-size: 13px; min-height: 0; }
.signup-card .form-msg:empty { display: none; }
.signup-card .form-note { margin: 12px 0 0; font-size: 13px; color: rgba(245, 250, 250, 0.42); }

/* Header edge glows at both ends: cyan fading to near-black in the middle and back. */
.app-header::after {
  background: linear-gradient(90deg,
    rgba(82, 199, 245, 0.45) 0%, rgba(82, 199, 245, 0.32) 12%, rgba(42, 143, 160, 0.22) 32%, #03242b 50%,
    rgba(42, 143, 160, 0.22) 68%, rgba(82, 199, 245, 0.32) 88%, rgba(82, 199, 245, 0.45) 100%);
}

/* Signup card: a slow, blurred colour wash showing through the right side, plus a lit right edge. */
.signup-card { position: relative; isolation: isolate; }
.signup-card > *:not(.card-glow) { position: relative; z-index: 1; }
.card-glow {
  position: absolute; inset: 0; z-index: 0; border-radius: inherit; overflow: hidden; pointer-events: none;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(46% 72% at 100% 50%, #000 0%, rgba(0,0,0,.8) 26%, rgba(0,0,0,.35) 48%, rgba(0,0,0,.1) 62%, transparent 78%);
  mask-image: radial-gradient(46% 72% at 100% 50%, #000 0%, rgba(0,0,0,.8) 26%, rgba(0,0,0,.35) 48%, rgba(0,0,0,.1) 62%, transparent 78%);
}
.card-glow::before {
  content: ""; position: absolute; width: 180%; aspect-ratio: 1; left: 45%; top: 50%; translate: 0 -50%;
  background: conic-gradient(from 0deg, #52c7f5, #6fffd2, #2a8fa0, #ff7b6e, #52c7f5);
  filter: blur(22px) saturate(1.3) brightness(1.1); opacity: .48;
  animation: card-glow-spin 18s linear infinite;
}
.signup-card::after {
  content: ""; position: absolute; top: 12%; bottom: 12%; right: -1px; width: 1px; border-radius: 1px; z-index: 2; pointer-events: none;
  background: linear-gradient(transparent 0%, rgba(255,255,255,.35) 14%, rgba(255,255,255,.88) 50%, rgba(255,255,255,.35) 86%, transparent 100%);
  mix-blend-mode: soft-light; opacity: .8;
}
@keyframes card-glow-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .card-glow::before { animation: none; } }

/* Device bezel around product screenshots: a thin glassy rim like a laptop or iPad edge. */
.shot, .mock {
  padding: 6px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 6px 14px rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(255, 255, 255, 0.10),
    0 0 60px -30px rgba(82, 199, 245, 0.35);
  overflow: hidden;
}
.shot picture, .shot img { border-radius: 18px; overflow: hidden; display: block; }
.mock { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.mock > .mock-bar { border-radius: 18px 18px 0 0; }
.mock > .mock-body { border-radius: 0 0 18px 18px; background: linear-gradient(180deg, var(--surface), var(--bg)); }

/* Window controls in macOS colours: close, minimise, zoom. */
.mock-bar i { width: 12px; height: 12px; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25); }
.mock-bar i:nth-of-type(1) { background: #ff5f57; }
.mock-bar i:nth-of-type(2) { background: #febc2e; }
.mock-bar i:nth-of-type(3) { background: #28c840; }

/* Solid, glossy space-black bezel: a metallic outer edge, a dark glass rim, and a soft
   reflection across the top, like the frame of a laptop or iPad. */
.shot, .mock {
  padding: 10px;
  border-radius: 26px;
  border: 1px solid #3a3d42;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 22%, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.06) 100%),
    linear-gradient(180deg, #232529 0%, #141518 55%, #0b0c0e 100%);
  box-shadow:
    0 0 0 1px #000,
    0 0 0 2px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 24px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 70px -30px rgba(82, 199, 245, 0.3);
}
.shot picture, .shot img { border-radius: 16px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8); }
.mock { border-bottom: 1px solid #3a3d42; }
.mock > .mock-bar { border-radius: 16px 16px 0 0; }
.mock > .mock-body { border-radius: 0 0 16px 16px; }
