/* ============================================================================
   PsyFi Scribe — marketing site styles
   Built on the PsyFi design tokens (colors_and_type.css). Light, airy, medical
   brand foundation with a dark glowing-wave hero to match the product promo.
   ============================================================================ */
@import url('colors_and_type.css');

/* ---- Dark hero palette (extends the brand, stays in the blue family) ---- */
:root {
  --ink-900: #060d18;   /* deepest navy */
  --ink-800: #0a1424;   /* hero base */
  --ink-700: #0e1c30;   /* hero panels */
  --ink-600: #15263d;   /* hero raised */
  --ink-line: rgba(120, 170, 220, .14);
  --on-dark:   #eaf2fb;
  --on-dark-2: rgba(216, 230, 246, .72);
  --on-dark-3: rgba(190, 210, 235, .50);
  --glow:      rgba(0, 133, 219, .55);

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--fg2);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  margin: 0;
  text-wrap: balance;
  letter-spacing: -.012em;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
  color: var(--primary);
  margin: 0;
}
.eyebrow.on-dark { color: var(--psyfi-blue-400); }

.section { padding-block: clamp(72px, 9vw, 128px); }
.section-head { max-width: 680px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
  margin-bottom: 16px;
}
.section-head p {
  font-size: clamp(1rem, .96rem + .3vw, 1.18rem);
  color: var(--fg3);
  line-height: var(--lh-normal);
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: .95rem;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn i { font-size: 1.15em; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 22px -8px rgba(var(--primary-rgb), .8);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(var(--primary-rgb), .9); }
.btn-primary:active { background: var(--primary-active); transform: translateY(0); }
.btn-ghost-dark {
  background: rgba(255,255,255,.06);
  color: var(--on-dark);
  border-color: rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
}
.btn-ghost-dark:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--primary); background: var(--primary-subtle); }
.btn-lg { padding: 17px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  color: var(--primary);
}
.btn-link i { transition: transform var(--dur) var(--ease); }
.btn-link:hover i { transform: translateX(4px); }

/* Chrome store glyph in primary button */
.chrome-dot { width: 18px; height: 18px; border-radius: 50%;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0 100%);
  position: relative; flex: none; }
.chrome-dot::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: 72px;
  display: flex; align-items: center;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 32px; height: 32px; }
.brand .name { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 1.18rem; letter-spacing: -.01em; }
.brand .name b { font-weight: var(--fw-extra); }
.brand .wordmark { height: 21px; width: auto; display: block; flex: none; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--font-display); font-weight: var(--fw-medium); font-size: .92rem;
  padding: 9px 14px; border-radius: var(--r-sm);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* over the dark hero */
.nav[data-mode="dark"] {
  color: var(--on-dark);
  background: rgba(10, 20, 36, .92);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom-color: var(--ink-line);
}
.nav[data-mode="dark"] .name { color: var(--on-dark); }
.nav[data-mode="dark"] .nav-links a { color: var(--on-dark-2); }
.nav[data-mode="dark"] .nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav[data-mode="dark"] .signin { color: var(--on-dark); }

/* scrolled / light */
.nav[data-mode="light"] {
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}
.nav[data-mode="light"] .name { color: var(--ink); }
.nav[data-mode="light"] .nav-links a { color: var(--fg2); }
.nav[data-mode="light"] .nav-links a:hover { color: var(--primary); background: var(--primary-subtle); }
.nav[data-mode="light"] .signin { color: var(--fg2); }

.signin { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: .92rem; padding: 9px 12px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; font-size: 1.5rem; color: inherit; padding: 6px; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  background: var(--ink-800);
  color: var(--on-dark);
  padding-top: 132px;
  padding-bottom: clamp(80px, 9vw, 140px);
  overflow: hidden;
  isolation: isolate;
}
.hero::before { /* glow blooms */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 78% 8%, rgba(52,164,230,.30), transparent 70%),
    radial-gradient(50% 60% at 8% 95%, rgba(0,133,219,.28), transparent 70%),
    radial-gradient(90% 80% at 50% -10%, rgba(20,60,110,.40), transparent 70%);
}
.hero-waves { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .9; }
.hero-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(120,170,220,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,170,220,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 75%);
}

.hero .wrap { position: relative; }
.hero-layout {
  display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy { max-width: 560px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: var(--fw-medium); font-size: .8rem;
  padding: 7px 14px 7px 9px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: var(--on-dark-2); margin-bottom: 26px; backdrop-filter: blur(8px);
}
.hero-badge .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(0,206,182,.18); }
.hero-badge b { color: #fff; font-weight: var(--fw-semibold); }

.hero h1 {
  color: #fff;
  font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  font-weight: var(--fw-extra);
  margin-bottom: 22px;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--psyfi-blue-400), #7cc6f2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem);
  color: var(--on-dark-2); line-height: 1.5; margin-bottom: 34px; max-width: 500px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--on-dark-3); }
.hero-trust i { color: var(--psyfi-blue-400); font-size: 1.05rem; }

/* =========================================================================
   EXTENSION MOCK (hero visual)
   ========================================================================= */
.browser {
  position: relative;
  border-radius: 14px;
  background: #1b2a3f;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.03);
  overflow: hidden;
  transform: perspective(1600px) rotateY(-9deg) rotateX(3deg);
  transform-style: preserve-3d;
}
.browser-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: #16243a; border-bottom: 1px solid rgba(255,255,255,.07);
}
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.lights i:nth-child(1){ background:#ff5f57; } .lights i:nth-child(2){ background:#febc2e; } .lights i:nth-child(3){ background:#28c840; }
.omnibox {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #0e1a2c; border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--r-pill); padding: 7px 14px; font-size: .76rem; color: var(--on-dark-3);
}
.omnibox i { font-size: .9rem; color: var(--success); }
.ext-pin { width: 26px; height: 26px; border-radius: 7px; background: rgba(0,133,219,.18);
  display: grid; place-items: center; border: 1px solid rgba(52,164,230,.3); }
.ext-pin img { width: 16px; height: 16px; }

.browser-body { position: relative; height: 470px; background:
  linear-gradient(180deg, #0c1626, #0a1322);
  background-image:
    radial-gradient(40% 30% at 85% 10%, rgba(0,133,219,.12), transparent 70%);
}
/* faux page behind */
.faux-page { position: absolute; inset: 0; padding: 26px 30px; opacity: .5; }
.faux-line { height: 9px; border-radius: 5px; background: rgba(180,205,235,.10); margin-bottom: 13px; }
.faux-line.t { height: 16px; width: 46%; background: rgba(180,205,235,.16); margin-bottom: 22px; }
.faux-line.s { width: 88%; } .faux-line.s2 { width: 72%; } .faux-line.s3 { width: 80%; }

/* the extension popup */
.ext {
  position: absolute; top: 16px; right: 18px; width: 318px;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 60px -16px rgba(0,0,0,.6);
  color: var(--ink); font-size: 13px;
}
.ext-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ext-head .mk { width: 30px; height: 30px; border-radius: 9px; background: var(--primary-subtle); display: grid; place-items: center; }
.ext-head .mk img { width: 19px; height: 19px; }
.ext-head .ttl { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px; color: var(--ink); line-height: 1.1; }
.ext-head .sub { font-size: 11px; color: var(--fg3); }
.ext-head .menu { margin-left: auto; color: var(--fg4); }

.ext-rec { padding: 14px 16px; }
.rec-card {
  background: linear-gradient(135deg, var(--primary), var(--psyfi-blue-400));
  border-radius: 12px; padding: 14px; color: #fff;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 10px 22px -10px rgba(var(--primary-rgb), .8);
}
.rec-card .reci { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.2);
  display: grid; place-items: center; flex: none; position: relative; }
.rec-card .reci::after { content:""; position:absolute; inset:-4px; border-radius:50%; border:2px solid rgba(255,255,255,.35); animation: pulse 2s var(--ease) infinite; }
.rec-card .reci i { font-size: 19px; }
.rec-meta { line-height: 1.25; }
.rec-meta .rt { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px; }
.rec-meta .rs { font-size: 11px; opacity: .85; display:flex; align-items:center; gap:6px; }
.rec-meta .rs .rdot { width:7px; height:7px; border-radius:50%; background:#fff; animation: blink 1.4s steps(2) infinite; }
.rec-time { margin-left: auto; font-family: var(--font-mono); font-weight: 600; font-size: 15px; }

.wave { display: flex; align-items: center; gap: 3px; height: 30px; margin: 14px 2px 6px; }
.wave span { flex: 1; background: var(--primary); border-radius: 3px; opacity: .85;
  animation: wv 1.1s var(--ease) infinite alternate; }
@keyframes wv { from { height: 14%; } to { height: 100%; } }

.ext-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg3); font-weight: 600; padding: 6px 16px 8px; display:flex; align-items:center; gap:7px; }
.ext-label .lk { width:5px; height:5px; border-radius:50%; background: var(--success); }

.transcript { padding: 0 16px 12px; max-height: 92px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg,#000 60%,transparent); mask-image: linear-gradient(180deg,#000 60%,transparent); }
.tline { display: flex; gap: 8px; margin-bottom: 9px; font-size: 12px; line-height: 1.4; }
.tline .sp { font-weight: var(--fw-bold); color: var(--primary); flex: none; font-size:11px; }
.tline.them .sp { color: var(--secondary); }
.tline p { color: var(--fg2); }

.ext-note { margin: 4px 12px 14px; background: var(--bg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.note-top { display:flex; align-items:center; gap:8px; margin-bottom: 10px; }
.note-top .soap { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 12px; color: var(--ink); }
.note-top .pill { margin-left:auto; font-family: var(--font-mono); font-size:9px; letter-spacing:.08em; text-transform:uppercase; color: var(--success); background: var(--success-subtle); padding: 3px 8px; border-radius: var(--r-pill); font-weight:700; }
.note-row { margin-bottom: 9px; }
.note-row .k { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 10px; letter-spacing:.04em; color: var(--primary); margin-bottom: 3px; }
.note-row .v { font-size: 11.5px; line-height: 1.45; color: var(--fg2); }
.note-row .v.short { height: 8px; border-radius: 4px; background: var(--border); width: 90%; }
.note-row .v.short.s2 { width: 75%; margin-top: 5px; }

@keyframes pulse { 0%{ transform: scale(1); opacity:.8;} 70%,100%{ transform: scale(1.5); opacity:0; } }
@keyframes blink { 0%{opacity:1;} 50%{opacity:.2;} }

/* floating chips around mock */
.float-chip {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 9px;
  background: rgba(20,34,54,.78); backdrop-filter: blur(12px);
  border: 1px solid rgba(120,170,220,.22); border-radius: var(--r-pill);
  padding: 9px 15px 9px 11px; color: var(--on-dark); font-size: .82rem; font-weight: 500;
  box-shadow: 0 16px 34px -14px rgba(0,0,0,.6);
}
.float-chip .ci { width: 26px; height: 26px; border-radius: 50%; display:grid; place-items:center; flex:none; }
.float-chip .ci.blue { background: rgba(0,133,219,.22); color: var(--psyfi-blue-400); }
.float-chip .ci.teal { background: rgba(0,206,182,.2); color: var(--success); }
.float-chip.one { top: 18%; left: -6%; animation: floaty 6s ease-in-out infinite; }
.float-chip.two { bottom: 12%; left: -2%; animation: floaty 7s ease-in-out infinite .8s; }
@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }

.hero-visual { position: relative; }

/* =========================================================================
   LOGO / TRUST STRIP
   ========================================================================= */
.strip { background: var(--bg-surface); border-bottom: 1px solid var(--border); }
.strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 26px; flex-wrap: wrap; }
.strip .lbl { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--fg3); font-weight: 600; flex: none; }
.strip .marks { display: flex; align-items: center; gap: clamp(20px,4vw,48px); flex-wrap: wrap; }
.strip .marks span { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 1rem; color: var(--fg4); letter-spacing: -.01em; }

/* =========================================================================
   HOW IT WORKS
   ========================================================================= */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step {
  position: relative; background: var(--bg-surface); border-radius: var(--r-xl);
  padding: 32px 28px; box-shadow: var(--shadow-card); text-align: center;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step .num {
  font-family: var(--font-mono); font-size: .8rem; font-weight: 700; color: var(--primary);
  letter-spacing: .1em; margin-bottom: 18px;
}
.step .ic { width: 54px; height: 54px; border-radius: var(--r-md); background: var(--primary-subtle);
  display: grid; place-items: center; color: var(--primary); font-size: 26px; margin: 0 auto 18px; }
.step h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step p { color: var(--fg3); font-size: .95rem; }
.step .connector { position: absolute; top: 58px; right: -16px; color: var(--border-strong); font-size: 20px; z-index: 2; }
.steps .step:last-child .connector { display: none; }

/* =========================================================================
   FEATURE — split / bento
   ========================================================================= */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,6vw,88px); align-items: center; }
.feature-split.reverse .fs-media { order: 2; }
.fs-copy .eyebrow { margin-bottom: 16px; }
.fs-copy h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); margin-bottom: 18px; }
.fs-copy > p { font-size: 1.08rem; color: var(--fg3); margin-bottom: 26px; }
.fs-list { display: grid; gap: 16px; margin-bottom: 30px; }
.fs-item { display: flex; gap: 14px; align-items: flex-start; }
.fs-item .ti { width: 30px; height: 30px; border-radius: 9px; background: var(--primary-subtle);
  color: var(--primary); display: grid; place-items: center; font-size: 17px; flex: none; margin-top: 1px; }
.fs-item h3 { font-size: 1rem; margin-bottom: 3px; color: var(--ink); }
.fs-item p { font-size: .92rem; color: var(--fg3); }

.fs-media { position: relative; }
.media-card {
  background: var(--bg-surface); border-radius: var(--r-xl); box-shadow: var(--shadow-card);
  border: 1px solid var(--border); overflow: hidden;
}

/* note preview card */
.note-doc { padding: 26px 28px; }
.note-doc .doc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.note-doc .doc-head .di { width: 42px; height: 42px; border-radius: var(--r-md); background: var(--primary-subtle); color: var(--primary); display:grid; place-items:center; font-size: 22px; }
.note-doc .doc-head h4 { font-size: 1.05rem; color: var(--ink); }
.note-doc .doc-head .meta { font-size: .8rem; color: var(--fg3); }
.note-doc .doc-head .saved { margin-left:auto; display:inline-flex; align-items:center; gap:6px; font-size:.78rem; font-weight:600; color: var(--success); }
.soap-block { margin-bottom: 18px; }
.soap-block .sk { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: .82rem; letter-spacing: .03em; color: var(--primary); margin-bottom: 6px; display:flex; align-items:center; gap:8px; }
.soap-block .sk .tag { font-family: var(--font-mono); font-size: .62rem; color: var(--fg4); font-weight: 600; }
.soap-block p { font-size: .9rem; line-height: 1.6; color: var(--fg2); }
.soap-block .hl { background: var(--primary-subtle); color: var(--primary-active); border-radius: 4px; padding: 0 3px; font-weight: 600; }

/* =========================================================================
   BENTO GRID
   ========================================================================= */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.bento .cell {
  background: var(--bg-surface); border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--shadow-card); position: relative; overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.bento .cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.bento .span-2 { grid-column: span 2; }
.bento .span-3 { grid-column: span 3; }
.bento .span-4 { grid-column: span 4; }
.bento .ic { width: 48px; height: 48px; border-radius: var(--r-md); display:grid; place-items:center; font-size: 24px; margin-bottom: 18px; background: var(--primary-subtle); color: var(--primary); }
.bento .ic.teal { background: var(--success-subtle); color: #009e8c; }
.bento .ic.purple { background: var(--secondary-subtle); color: var(--secondary-strong); }
.bento .ic.amber { background: var(--warning-subtle); color: #b07d00; }
.bento h3 { font-size: 1.15rem; margin-bottom: 8px; }
.bento p { font-size: .92rem; color: var(--fg3); }
.bento .cell.dark { background: var(--ink-700); color: var(--on-dark); }
.bento .cell.dark h3 { color: #fff; }
.bento .cell.dark p { color: var(--on-dark-2); }

/* =========================================================================
   SECURITY
   ========================================================================= */
.security { background: var(--ink-800); color: var(--on-dark); position: relative; overflow: hidden; }
.security::before { content:""; position:absolute; inset:0; z-index:0;
  background: radial-gradient(50% 60% at 85% 20%, rgba(0,133,219,.18), transparent 70%),
              radial-gradient(40% 50% at 10% 90%, rgba(52,164,230,.14), transparent 70%); }
.security .wrap { position: relative; z-index: 1; }
.security .section-head h2 { color: #fff; }
.security .section-head p { color: var(--on-dark-2); }
.security .section-head .eyebrow { color: var(--psyfi-blue-400); }
.sec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 40px; }
.sec-card { background: rgba(255,255,255,.04); border: 1px solid var(--ink-line); border-radius: var(--r-lg); padding: 26px 22px; backdrop-filter: blur(6px); transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.sec-card:hover { border-color: rgba(52,164,230,.4); background: rgba(255,255,255,.06); }
.sec-card .ic { width: 46px; height: 46px; border-radius: var(--r-md); background: rgba(0,133,219,.18); color: var(--psyfi-blue-400); display:grid; place-items:center; font-size: 23px; margin-bottom: 16px; }
.sec-card h3 { color: #fff; font-size: 1.02rem; margin-bottom: 7px; }
.sec-card p { color: var(--on-dark-2); font-size: .88rem; }
.sec-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.sec-badge { display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.05); border: 1px solid var(--ink-line); font-size: .85rem; font-weight: 600; color: var(--on-dark); }
.sec-badge i { color: var(--success); font-size: 1.1rem; }

/* =========================================================================
   MODALITIES
   ========================================================================= */
.mods { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.mod-pill { padding: 12px 22px; border-radius: var(--r-pill); background: var(--bg-surface); box-shadow: var(--shadow-card);
  font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: .95rem; color: var(--fg2);
  border: 1px solid transparent; transition: all var(--dur) var(--ease); cursor: default; }
.mod-pill:hover { color: var(--primary); border-color: var(--primary-subtle); transform: translateY(-3px); }
.mod-pill b { color: var(--primary); }
.note-types { display:grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-top: 8px; }
.nt { background: var(--bg-surface); border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow-card); display:flex; align-items:center; gap:12px; }
.nt i { color: var(--primary); font-size: 20px; }
.nt span { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: .92rem; color: var(--ink); }
.nt small { display:block; font-family: var(--font-body); font-weight: 400; color: var(--fg3); font-size: .78rem; }

/* =========================================================================
   iOS / coming soon
   ========================================================================= */
.ios { background: linear-gradient(135deg, var(--ink-700), var(--ink-800)); color: var(--on-dark); position: relative; overflow:hidden; border-radius: clamp(20px,3vw,32px); }
.ios-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px,5vw,60px); align-items: center; padding: clamp(40px,5vw,64px); position:relative; z-index:1; }
.ios::before { content:""; position:absolute; inset:0; background: radial-gradient(50% 70% at 80% 50%, rgba(0,133,219,.22), transparent 70%); }
.ios .badge-soon { display:inline-flex; align-items:center; gap:8px; font-family: var(--font-mono); font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; font-weight:700; color: var(--warning); background: rgba(255,185,0,.12); border:1px solid rgba(255,185,0,.3); padding:6px 12px; border-radius: var(--r-pill); margin-bottom:18px; }
.ios .badge-live { display:inline-flex; align-items:center; gap:8px; font-family: var(--font-mono); font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; font-weight:700; color: var(--success); background: var(--success-subtle); border:1px solid rgba(0,206,182,.3); padding:6px 12px; border-radius: var(--r-pill); margin-bottom:18px; }
.ios .badge-live .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(0,206,182,.18); }
.ios h2 { color:#fff; font-size: clamp(1.7rem,1.2rem+1.8vw,2.4rem); margin-bottom:14px; }
.ios p { color: var(--on-dark-2); font-size: 1.05rem; margin-bottom: 24px; max-width: 440px; }
.ios-cta { display:flex; gap:14px; flex-wrap:wrap; align-items:center; }
.ios-form { display:flex; gap:10px; max-width: 420px; flex-wrap:wrap; }
.ios-form input { flex:1; min-width: 200px; background: rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.16); border-radius: var(--r-pill); padding: 14px 20px; color:#fff; font-family: var(--font-body); font-size:.95rem; }
.ios-form input::placeholder { color: var(--on-dark-3); }
.ios-form input:focus { outline:none; border-color: var(--psyfi-blue-400); box-shadow: 0 0 0 3px rgba(52,164,230,.2); }
.ios-note { font-size:.8rem; color: var(--on-dark-3); margin-top:14px; }

/* phone */
.phone-wrap { display:flex; justify-content:center; }
.phone { width: 240px; height: 480px; background:#0c1626; border-radius: 38px; border: 8px solid #1b2a3f; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); position: relative; overflow:hidden; }
.phone .notch { position:absolute; top:0; left:50%; transform:translateX(-50%); width:120px; height:26px; background:#1b2a3f; border-radius:0 0 16px 16px; z-index:3; }
.phone-screen { position:absolute; inset:0; background: linear-gradient(180deg,#0e1c30,#0a1322); padding: 40px 18px 18px; }
.phone-rec { background: linear-gradient(135deg, var(--primary), var(--psyfi-blue-400)); border-radius: 20px; padding: 22px; text-align:center; color:#fff; margin-bottom: 14px; }
.phone-rec .mic { width:60px; height:60px; border-radius:50%; background:rgba(255,255,255,.2); display:grid; place-items:center; margin:0 auto 14px; font-size:28px; position:relative; }
.phone-rec .mic::after{ content:""; position:absolute; inset:-6px; border-radius:50%; border:2px solid rgba(255,255,255,.4); animation: pulse 2s var(--ease) infinite; }
.phone-rec .pt { font-family: var(--font-mono); font-size: 22px; font-weight:700; }
.phone-rec .ps { font-size:.75rem; opacity:.85; }
.phone-card { background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius: 14px; padding:14px; margin-bottom:10px; }
.phone-card .pl { height:7px; border-radius:4px; background: rgba(180,205,235,.18); margin-bottom:8px; }
.phone-card .pl.s{ width:70%; } .phone-card .pk { font-family: var(--font-display); font-weight:700; font-size:11px; color: var(--psyfi-blue-400); margin-bottom:8px; }

/* =========================================================================
   PRICING
   ========================================================================= */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { background: var(--bg-surface); border-radius: var(--r-xl); padding: 32px 28px; box-shadow: var(--shadow-card); border: 1.5px solid transparent; display:flex; flex-direction:column; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.plan.featured { border-color: var(--primary); box-shadow: 0 20px 50px -20px rgba(var(--primary-rgb),.4); position: relative; }
.plan.featured .tag { position:absolute; top:-13px; left:50%; transform:translateX(-50%); background: var(--primary); color:#fff; font-family: var(--font-mono); font-size:.65rem; letter-spacing:.1em; text-transform:uppercase; font-weight:700; padding:6px 14px; border-radius: var(--r-pill); }
.plan .pn { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 1.15rem; color: var(--ink); margin-bottom: 6px; }
.plan .pd { font-size: .88rem; color: var(--fg3); margin-bottom: 20px; min-height: 40px; }
.plan .price { display:flex; align-items:baseline; gap:4px; margin-bottom: 4px; }
.plan .price .amt { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: 2.6rem; color: var(--ink); letter-spacing: -.02em; }
.plan .price .per { font-size: .85rem; color: var(--fg3); }
.plan .pbilling { font-size: .78rem; color: var(--fg4); margin-bottom: 22px; }
.plan .btn { margin-bottom: 24px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.plan li { display:flex; gap:10px; align-items:flex-start; font-size: .9rem; color: var(--fg2); }
.plan li i { color: var(--success); font-size: 1.05rem; flex:none; margin-top:1px; }
.plan li.muted { color: var(--fg4); } .plan li.muted i { color: var(--fg4); }

/* =========================================================================
   FAQ
   ========================================================================= */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.qa { background: var(--bg-surface); border-radius: var(--r-md); box-shadow: var(--shadow-card); overflow: hidden; border:1px solid transparent; transition: border-color var(--dur) var(--ease); }
.qa[open] { border-color: var(--primary-subtle); }
.qa summary { list-style: none; cursor: pointer; padding: 22px 24px; display:flex; align-items:center; gap:16px; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 1.05rem; color: var(--ink); }
.qa summary::-webkit-details-marker { display:none; }
.qa summary .qi { margin-left:auto; flex:none; color: var(--primary); transition: transform var(--dur) var(--ease); font-size: 1.3rem; }
.qa[open] summary .qi { transform: rotate(45deg); }
.qa .ans { padding: 0 24px 24px; color: var(--fg3); font-size: .96rem; line-height: 1.6; }
.qa .ans p { margin-bottom: 0; }

/* =========================================================================
   CTA
   ========================================================================= */
.cta-final { background: var(--ink-800); color: var(--on-dark); position: relative; overflow: hidden; text-align: center; }
.cta-final::before { content:""; position:absolute; inset:0;
  background: radial-gradient(60% 80% at 50% 120%, rgba(0,133,219,.4), transparent 65%),
             radial-gradient(40% 50% at 20% 0%, rgba(52,164,230,.18), transparent 70%); }
.cta-final .wrap { position: relative; z-index:1; }
.cta-final h2 { color:#fff; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); margin-bottom: 18px; letter-spacing:-.02em; }
.cta-final p { color: var(--on-dark-2); font-size: 1.15rem; max-width: 540px; margin: 0 auto 34px; }
.cta-final .hero-cta { justify-content: center; }
.cta-final .hero-trust { justify-content: center; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer { background: var(--ink-900); color: var(--on-dark-2); padding-block: clamp(48px,6vw,72px) 32px; }
.footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer .brand .name { color: #fff; }
.footer .fdesc { font-size: .9rem; color: var(--on-dark-3); margin: 16px 0 20px; max-width: 280px; }
.footer .fsoc { display:flex; gap:10px; }
.footer .fsoc a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.06); display:grid; place-items:center; color: var(--on-dark-2); font-size: 1.1rem; transition: all var(--dur) var(--ease); }
.footer .fsoc a:hover { background: var(--primary); color:#fff; }
.footer h3 { color:#fff; font-family: var(--font-display); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px; font-weight: var(--fw-bold); }
.footer ul { list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.footer ul a { font-size: .9rem; color: var(--on-dark-2); transition: color var(--dur-fast) var(--ease); }
.footer ul a:hover { color: #fff; }
.footer .fbot { display:flex; align-items:center; justify-content:space-between; gap:20px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.08); flex-wrap: wrap; }
.footer .fbot p { font-size: .82rem; color: var(--on-dark-3); }
.footer .fbot .legal { display:flex; gap:20px; flex-wrap:wrap; }
.footer .fbot .legal a { font-size:.82rem; color: var(--on-dark-3); }
.footer .fbot .legal a:hover { color:#fff; }

/* =========================================================================
   SCROLL REVEAL
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .wave span, .rec-card .reci::after, .float-chip, .phone-rec .mic::after, .rec-meta .rs .rdot { animation: none !important; }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 980px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 20px; }
  .browser { transform: none; max-width: 460px; margin-inline: auto; }
  .float-chip.one { left: 2%; } .float-chip.two { left: auto; right: 2%; }
  .feature-split, .feature-split.reverse { grid-template-columns: 1fr; }
  .feature-split.reverse .fs-media { order: 0; }
  .ios-inner { grid-template-columns: 1fr; }
  .phone-wrap { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step .connector { display: none !important; }
  .sec-grid { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  .bento .cell { grid-column: span 6 !important; }
  .footer .cols { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 820px) {
  .nav-links, .nav .signin { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; padding: 12px; gap: 4px; box-shadow: var(--shadow-md); border-top: 1px solid var(--border); }
  .nav.open .nav-links a { color: var(--fg1) !important; padding: 13px 16px; }
}
@media (max-width: 560px) {
  .sec-grid { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.1rem, 8vw, 3rem); }
  .ext { width: 280px; right: 10px; }
  .float-chip { display: none; }
}

/* ============================================================================
   Doc pages — security, baa, privacy, terms, hipaa
   Editorial-clinical layout: dark header strip, two-column prose + sticky TOC.
   Reuses brand tokens; introduces no new colors.
   ============================================================================ */

/* Force-light page-level surface so .nav.dark over a non-hero header
   keeps its dark treatment without the JS toggle. */
body.doc { background: var(--bg-surface); }
body.doc .nav { background: rgba(255,255,255,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
body.doc .nav .nav-links a,
body.doc .nav .signin { color: var(--fg1); }
body.doc .nav .brand { color: var(--fg1); }

/* --- Page header strip ---------------------------------------------------- */
.doc-strip {
  background: linear-gradient(180deg, var(--ink-800) 0%, var(--ink-700) 100%);
  color: var(--on-dark);
  padding: 120px 0 64px;
  border-bottom: 1px solid rgba(0,133,219,.18);
  position: relative;
  overflow: hidden;
}
.doc-strip::before {
  /* subtle radial wash, brand blue */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 280px at 78% -10%, rgba(0,133,219,.22), transparent 60%);
}
.doc-strip .wrap { position: relative; }
.doc-strip .eyebrow {
  color: var(--psyfi-blue-400);
  font-family: var(--font-display);
  font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 14px;
}
.doc-strip h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.4vw, 3.1rem);
  line-height: 1.1; letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 14px;
  max-width: 22ch;
}
.doc-strip .doc-sub {
  font-size: 1.1rem; color: var(--on-dark-2);
  max-width: 60ch; margin: 0 0 28px;
}
.doc-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.doc-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: .82rem; font-weight: 600;
  color: var(--on-dark);
}
.doc-chip i { font-size: 1rem; color: var(--psyfi-blue-400); }

/* --- Body layout --------------------------------------------------------- */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 64px;
  padding: 64px 0 88px;
  align-items: start;
}

/* --- Sticky TOC ---------------------------------------------------------- */
.doc-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  font-family: var(--font-display);
}
.doc-toc .toc-label {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--fg3); margin-bottom: 14px;
}
.doc-toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.doc-toc li { margin: 0; }
.doc-toc a {
  display: block;
  padding: 7px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--fg2);
  font-size: .9rem; font-weight: 500;
  line-height: 1.4;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.doc-toc a:hover { color: var(--primary); }
.doc-toc a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* --- Mobile TOC (details accordion) -------------------------------------- */
.doc-toc-mobile {
  display: none;
  position: sticky;
  top: 64px;
  z-index: 10;
  margin: 0 0 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.doc-toc-mobile > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  color: var(--fg1);
  display: flex; align-items: center; justify-content: space-between;
}
.doc-toc-mobile > summary::-webkit-details-marker { display: none; }
.doc-toc-mobile > summary::after { content: "\edae"; font-family: "tabler-icons"; color: var(--fg3); transition: transform var(--dur-fast) var(--ease); }
.doc-toc-mobile[open] > summary::after { transform: rotate(180deg); }
.doc-toc-mobile ul { list-style: none; padding: 0 0 8px; margin: 0; border-top: 1px solid var(--border); }
.doc-toc-mobile a {
  display: block; padding: 11px 18px;
  font-size: .9rem; color: var(--fg2);
  border-left: 3px solid transparent;
}
.doc-toc-mobile a:hover { color: var(--primary); background: var(--bg-surface-2); }
.doc-toc-mobile a.active { color: var(--primary); border-left-color: var(--primary); font-weight: 600; }

/* --- Prose column -------------------------------------------------------- */
.doc-prose { max-width: 65ch; }
.doc-prose h2 {
  font-family: var(--font-display);
  font-size: 1.7rem; line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 800;
  margin: 56px 0 18px;
  position: relative;
  scroll-margin-top: 96px;
}
.doc-prose h2:first-child { margin-top: 0; }
.doc-prose h2::before {
  content: ""; position: absolute;
  left: 0; top: -14px;
  width: 40px; height: 3px;
  background: var(--primary); border-radius: 2px;
}
.doc-prose h2 .anchor {
  margin-left: 8px;
  opacity: 0; color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease);
}
.doc-prose h2:hover .anchor { opacity: .8; }
.doc-prose h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 32px 0 10px;
}
.doc-prose p, .doc-prose li {
  font-family: var(--font-body);
  font-size: 1.02rem; line-height: 1.75;
  color: var(--fg1);
}
.doc-prose p { margin: 0 0 16px; }
.doc-prose ul, .doc-prose ol { margin: 0 0 20px; padding-left: 24px; }
.doc-prose li { margin: 0 0 8px; }
.doc-prose li::marker { color: var(--primary); }
.doc-prose strong { color: var(--ink); font-weight: 700; }
.doc-prose a { color: var(--primary); border-bottom: 1px solid rgba(0,133,219,.25); }
.doc-prose a:hover { border-bottom-color: var(--primary); }
.doc-prose hr { border: 0; height: 1px; background: var(--border); margin: 48px 0; }

/* "Plain-English summary" callout under each H2 */
.doc-summary {
  background: var(--bg-surface-2);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 14px 20px;
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-size: .98rem; line-height: 1.65;
  color: var(--fg2);
  font-style: italic;
}
.doc-summary::before {
  content: "In plain English";
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--primary);
  margin-bottom: 4px;
}

/* --- Security: at-a-glance badge grid ------------------------------------ */
.sec-glance {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin: 0 0 36px;
}
.sec-glance .g {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  display: flex; align-items: flex-start; gap: 12px;
  transition: border-color var(--dur-fast) var(--ease);
}
.sec-glance .g:hover { border-color: rgba(0,133,219,.4); }
.sec-glance .g i {
  flex: none; width: 36px; height: 36px; border-radius: 9px;
  background: var(--primary-subtle); color: var(--primary);
  display: grid; place-items: center; font-size: 18px;
}
.sec-glance .gt {
  font-family: var(--font-display);
  font-size: .92rem; font-weight: 700; color: var(--ink);
  margin: 4px 0 2px;
}
.sec-glance .gd { font-size: .8rem; color: var(--fg3); line-height: 1.45; }

/* --- Data-flow diagram (security page) ----------------------------------- */
.doc-flow {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; align-items: stretch;
  margin: 12px 0 36px;
  padding: 28px 18px;
  background: linear-gradient(180deg, var(--ink-800), var(--ink-700));
  border-radius: var(--r-lg);
  position: relative; overflow: hidden;
}
.doc-flow::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 200px at 50% 0%, rgba(0,133,219,.22), transparent 60%);
}
.doc-flow .node {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-md);
  text-align: center;
  z-index: 1;
}
.doc-flow .node i {
  width: 44px; height: 44px; border-radius: 11px;
  background: rgba(0,133,219,.18); color: var(--psyfi-blue-400);
  display: grid; place-items: center; font-size: 22px;
}
.doc-flow .node .nl {
  font-family: var(--font-display);
  font-size: .74rem; font-weight: 700;
  color: var(--on-dark);
  letter-spacing: .04em; text-transform: uppercase;
}
.doc-flow .node .nd {
  font-size: .78rem; line-height: 1.4;
  color: var(--on-dark-2);
}
.doc-flow .arrow {
  position: absolute; top: 50%; right: -10px;
  transform: translateY(-50%);
  color: var(--psyfi-blue-400);
  font-size: 16px;
  z-index: 2;
}

/* --- Sub-processors table (security) ------------------------------------- */
.subproc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: .94rem;
  margin: 8px 0 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.subproc-table thead th {
  background: var(--bg-surface-2);
  font-family: var(--font-display);
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--fg2);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.subproc-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--fg1);
  vertical-align: top;
}
.subproc-table tbody tr:last-child td { border-bottom: 0; }
.subproc-table tbody tr:hover { background: var(--bg-surface-2); }
.subproc-table .sp-name { font-weight: 700; color: var(--ink); }
.subproc-table .sp-loc {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--primary-subtle); color: var(--primary);
  font-family: var(--font-display);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .04em;
}

/* --- Security contact CTA ----------------------------------------------- */
.doc-contact {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
}
.doc-contact .ci {
  flex: none; width: 52px; height: 52px; border-radius: 13px;
  background: var(--primary-subtle); color: var(--primary);
  display: grid; place-items: center; font-size: 26px;
}
.doc-contact .ct h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.doc-contact .ct p  { font-size: .94rem; color: var(--fg2); margin: 0; }
.doc-contact .ct strong a { color: var(--primary); }

/* --- Doc-prose tables (Q&A style for legal pages) ------------------------ */
.doc-prose dl.def {
  display: grid; grid-template-columns: 200px 1fr; gap: 10px 24px;
  margin: 12px 0 24px;
}
.doc-prose dl.def dt {
  font-family: var(--font-display);
  font-weight: 700; color: var(--ink); font-size: .94rem;
}
.doc-prose dl.def dd { margin: 0; color: var(--fg2); font-size: .98rem; line-height: 1.6; }

/* --- Mobile --------------------------------------------------------------*/
@media (max-width: 1024px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; padding: 40px 0 64px; }
  .doc-toc { display: none; }
  .doc-toc-mobile { display: block; }
  .sec-glance { grid-template-columns: 1fr 1fr; }
  .doc-flow { grid-template-columns: 1fr 1fr; }
  .doc-flow .arrow { display: none; }
  .doc-prose dl.def { grid-template-columns: 1fr; gap: 4px 0; }
  .doc-prose dl.def dt { margin-top: 14px; }
}
@media (max-width: 560px) {
  .doc-strip { padding: 100px 0 48px; }
  .doc-strip h1 { font-size: clamp(1.85rem, 7vw, 2.4rem); }
  .sec-glance { grid-template-columns: 1fr; }
  .doc-flow { grid-template-columns: 1fr; padding: 18px 14px; }
  .doc-contact { padding: 22px 22px; }
  .doc-contact .ci { width: 44px; height: 44px; font-size: 22px; }
}
