/* Fonts served from the site itself (never Google Fonts), subset to Latin: see README.md. */
@font-face { font-family: "Archivo"; src: url("fonts/archivo-latin.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("fonts/kalam-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("fonts/kalam-700-latin.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* Layout: alternating night and ceramic bands; each feature is a tall "scene" whose
   sticky frame plays forward as you scroll (--p, 0 to 1), Apple-style. One committed look. */
:root {
  --night: #081a2e;        /* deeper than Deep Blue, for the cinematic bands */
  --deep: #103151;         /* PAIR Deep Blue */
  --deep-2: #17436e;
  --purple: #6365b8;       /* PAIR Purple: the Copilot, calm accents */
  --purple-ink: #4e51a3;
  --lilac: #8e99e7;
  --lilac-tint: #e4e6f8;
  --biscay: #a0caf0;       /* Biscay Bay */
  --cynogen: #a2fcf5;      /* Cynogen: "Reviewed" */
  --cyn-tint: #ddfdfa;
  --ceramic: #f1f1eb;      /* the app's ground */
  --paper: #ffffff;
  --tint: #f8f8f5;
  --line: #e6e6e6;
  --corridor: #dcd7d3;
  --ink: #103151;
  --ink-2: #4a5a73;
  --ink-3: #5b677a;
  --on-night: #f1f1eb;
  --on-night-2: #a9b8cc;
  --amber: #f2a22c;        /* fills only, never text */
  --amber-tint: #fff1c2;
  --ai-tint: #ffe6cf;      /* "AI-read" */
  --ai-ink: #8a3a0c;
  --ok: #1f6b4f;
  --err: #b0302a;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --nav-h: 56px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ceramic);
  color: var(--ink);
  font: 400 17px/1.5 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--purple-ink); outline-offset: 3px; border-radius: 6px; }
/* On the dark bands and the nav, a light ring: 3:1 or more against what is around it */
:is(.night, .nav) :focus-visible { outline-color: var(--cynogen); }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }

/* Type scale */
.xl { font-size: clamp(42px, 6.6vw, 100px); font-weight: 800; font-stretch: 118%; line-height: 0.92; letter-spacing: -0.035em; }
.lg { font-size: clamp(34px, 5.2vw, 72px); font-weight: 750; font-stretch: 112%; line-height: 0.98; }
.md { font-size: clamp(26px, 3.2vw, 40px); font-weight: 700; font-stretch: 108%; line-height: 1.05; }
.lede { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.night .lede { color: var(--on-night-2); }
.eyebrow { font-size: 13px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple-ink); }
.night .eyebrow { color: var(--lilac); }
.small { font-size: 14px; color: var(--ink-3); }
.night .small { color: var(--on-night-2); }
.night :is(.card, .ecard, .paper) .small { color: var(--ink-3); }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  background: rgba(8, 26, 46, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(160, 202, 240, 0.12);
  color: var(--on-night);
}
.nav-in { max-width: 1180px; margin: 0 auto; height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 20px; letter-spacing: -0.02em; }
.brand-mark { width: 28px; height: 28px; }
.wm { font-weight: 800; font-stretch: 100%; letter-spacing: -0.01em; color: var(--cynogen); }
.wm b { font-weight: 800; color: var(--paper); }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--on-night); }
.nav-links a:hover { color: var(--cynogen); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0;
  font: 650 15px/1 var(--display); text-decoration: none; cursor: pointer;
}
.btn-light { background: var(--cynogen); color: var(--night); }
.btn-dark { background: var(--deep); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--on-night); box-shadow: inset 0 0 0 1px rgba(241, 241, 235, 0.35); }
.nav .btn { min-height: 34px; padding: 0 14px; font-size: 13px; }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--read, 0)); background: linear-gradient(90deg, var(--lilac), var(--cynogen)); }
@media (max-width: 1100px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* Bands and scenes */
.band { padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.night { background: var(--night); color: var(--on-night); }
.wrap { max-width: 1180px; margin: 0 auto; }
.scene { position: relative; height: var(--len, 300vh); }
.stick {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 16px);
  padding-bottom: 24px;
}
.split {
  max-width: 1180px; height: 100%; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); grid-template-rows: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 72px); align-items: center;
}
.split > * { min-width: 0; }
.visual { position: relative; height: min(640px, 100%); display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
/* Each picture is scaled to fit its visual (site.js sets --fit), so a phone shows all of it */
.visual > * { scale: var(--fit, 1); }
.measuring * { transition: none !important; }
@media (max-width: 820px) {
  .split { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 16px; align-items: start; }
  .visual { height: 100%; }
}

/* Steps: a stack of captions in one cell; the scene's data-step picks one */
.steps { display: grid; }
.step { grid-area: 1 / 1; display: grid; gap: 14px; align-content: start; transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.scene[data-step] .step { opacity: 0; transform: translateY(18px); pointer-events: none; }
.scene[data-step="0"] .step[data-i="0"], .scene[data-step="1"] .step[data-i="1"],
.scene[data-step="2"] .step[data-i="2"], .scene[data-step="3"] .step[data-i="3"] { opacity: 1; transform: none; pointer-events: auto; }
.dots { display: flex; gap: 6px; margin-top: 8px; }
.dots i { width: 22px; height: 4px; border-radius: 2px; background: currentColor; opacity: .18; transition: opacity .4s, width .4s; }
.scene[data-step="0"] .dots i:nth-child(1), .scene[data-step="1"] .dots i:nth-child(2),
.scene[data-step="2"] .dots i:nth-child(3), .scene[data-step="3"] .dots i:nth-child(4) { opacity: .9; width: 40px; }

/* Shared pieces from the app */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.tag-ai { background: var(--ai-tint); color: var(--ai-ink); }
.tag-rev { background: var(--cyn-tint); color: var(--ok); }
.tag-written { background: var(--lilac-tint); color: var(--purple-ink); }
.tag-alert { background: var(--amber-tint); color: #6b4500; }
.card { color: var(--ink); background: var(--paper); border-radius: 18px; box-shadow: 0 12px 30px -16px rgba(16, 49, 81, 0.35), 0 1px 0 rgba(16, 49, 81, 0.06); }
.paper { color: var(--ink); background: var(--paper); border-radius: 6px; box-shadow: 0 18px 40px -18px rgba(8, 26, 46, 0.55), 0 0 0 1px rgba(16, 49, 81, 0.06); }
.ln { display: block; height: 7px; border-radius: 4px; background: var(--line); }
.hand { font-family: var(--hand); color: #20375a; }

/* Phone */
.phone {
  position: relative; width: var(--pw, clamp(230px, 24vw, 300px)); aspect-ratio: 9 / 19; max-width: 100%;
  border-radius: calc(var(--pw, 280px) * 0.15); padding: 10px;
  background: linear-gradient(145deg, #2a3a50, #0c1522);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), inset 0 0 0 1.5px rgba(255,255,255,0.12);
}
.screen { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background: var(--ceramic); color: var(--ink); font-size: 11px; }
.notch { position: absolute; top: 8px; left: 50%; width: 30%; height: 20px; transform: translateX(-50%); background: #05080d; border-radius: 12px; z-index: 3; }
.app { position: absolute; inset: 0; padding: 38px 12px 12px; display: grid; gap: 8px; align-content: start; }
.app h4 { margin: 0; font-size: 18px; font-weight: 750; font-stretch: 110%; letter-spacing: -0.02em; }
.app .sub { font-size: 10px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mini { background: var(--paper); border-radius: 12px; padding: 8px; display: grid; gap: 2px; box-shadow: 0 1px 0 rgba(16,49,81,.06); }
.mini b { font-size: 11px; }
.mini span { color: var(--ink-3); font-size: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 3px 8px; border-radius: 999px; background: var(--lilac-tint); color: var(--purple-ink); font-size: 10px; font-weight: 600; }
.row { background: var(--paper); border-radius: 12px; padding: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.row .tag { font-size: 9px; padding: 2px 6px; }

/* ---------- Hero ---------- */
#hero { --len: 230vh; }
#hero .stick { display: grid; place-items: center; padding-bottom: 0; }
.hero-copy { position: absolute; left: 0; right: 0; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(24px, 6vh, 64px)); text-align: center; display: grid; gap: 18px; justify-items: center; padding-inline: var(--gutter-l) var(--gutter-r); z-index: 4; }
.hero-copy .xl span { display: block; }
.hero-copy .xl .soft { background: linear-gradient(90deg, var(--biscay), var(--cynogen) 55%, var(--lilac)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-stage { position: absolute; inset: 0; display: grid; place-items: end center; }
.hero-glow { position: absolute; left: 50%; bottom: -30vh; width: 120vmax; height: 80vh; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(99, 101, 184, 0.45), rgba(8, 26, 46, 0) 70%); pointer-events: none; }
.hero-phone { --pw: clamp(220px, 21vw, 280px); position: relative; margin-bottom: calc(-1 * var(--pw) * 1.62); transform: translateY(var(--rise, 0px)); z-index: 2; }
.doc { position: absolute; left: 50%; top: 50%; width: clamp(96px, 10vw, 136px); aspect-ratio: 3 / 4; padding: 10px; display: grid; gap: 6px; align-content: start; color: var(--ink); will-change: transform, opacity; z-index: 3; }
.doc b { font-size: 10px; font-weight: 700; line-height: 1.15; }
.doc em { font-style: normal; font-size: 9px; color: var(--ink-3); }
.doc .bar { height: 5px; border-radius: 3px; }
.doc .hand { font-size: 12px; line-height: 1.1; }
.screen-layer { position: absolute; inset: 0; transition: opacity .4s; }
.drop { margin-top: 8px; border: 1.5px dashed var(--lilac); border-radius: 14px; height: 120px; display: grid; place-items: center; text-align: center; color: var(--purple-ink); font-weight: 600; padding: 10px; }
@media (max-width: 640px) {
  .doc { width: 88px; padding: 8px; }
  .hero-phone { --pw: 190px; margin-bottom: calc(-1 * var(--pw) * 1.9); }
  .hero-copy { gap: 14px; }
  .hero-copy .lede { font-size: 16px; }
}
.hero-after { position: absolute; left: 0; right: 0; bottom: 6vh; text-align: center; z-index: 4; padding-inline: var(--gutter-l) var(--gutter-r); }
.hero-after p { display: inline-block; padding: 10px 18px; border-radius: 999px; background: rgba(8, 26, 46, 0.7); backdrop-filter: blur(10px); color: var(--on-night); font-weight: 600; }
.scroll-cue { font-size: 13px; color: var(--on-night-2); display: flex; gap: 8px; align-items: center; }
.scroll-cue i { width: 18px; height: 28px; border: 1.5px solid currentColor; border-radius: 10px; position: relative; }
.scroll-cue i::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: currentColor; animation: cue 1.8s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Statement ---------- */
#statement { --len: 190vh; }
#statement .stick { display: grid; place-items: center; }
.statement { max-width: 1040px; font-size: clamp(30px, 4.6vw, 64px); font-weight: 720; font-stretch: 110%; line-height: 1.08; letter-spacing: -0.03em; text-wrap: pretty; }
.statement .w { opacity: var(--o, 0.16); transition: opacity .25s linear; }
.statement .hl { color: var(--deep); }
.statement .hl.on { background: linear-gradient(90deg, var(--purple), var(--deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Upload ---------- */
#upload { --len: 320vh; }
.pages { position: relative; width: min(520px, 100%); height: min(460px, 100%); }
.pg { position: absolute; left: 50%; top: 50%; width: clamp(110px, 13vw, 150px); aspect-ratio: 3 / 4; margin: calc(clamp(110px, 13vw, 150px) * -0.666) 0 0 calc(clamp(110px, 13vw, 150px) * -0.5); padding: 12px; display: grid; gap: 7px; align-content: start; transition: transform .9s cubic-bezier(.2,.75,.2,1), box-shadow .6s; }
.pg .num { position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: var(--ink-3); font-weight: 600; }
.pg .title { font-size: 10px; font-weight: 700; }
.pg.photo { filter: saturate(.9); }
#upload[data-step="0"] .pg1 { transform: translate(-70%, 6%) rotate(-9deg); }
#upload[data-step="0"] .pg2 { transform: translate(0%, -6%) rotate(2deg); }
#upload[data-step="0"] .pg3 { transform: translate(70%, 8%) rotate(10deg); }
#upload[data-step="1"] .pg1 { transform: translate(-108%, 0) rotate(0); }
#upload[data-step="1"] .pg2 { transform: translate(0, 0) rotate(0); }
#upload[data-step="1"] .pg3 { transform: translate(108%, 0) rotate(0); }
#upload[data-step="2"] .pg1, .no-js #upload .pg1 { transform: translate(-128%, -4%) rotate(-2deg); }
#upload[data-step="2"] .pg2, .no-js #upload .pg2 { transform: translate(-58%, 4%) rotate(2deg); }
#upload[data-step="2"] .pg3, .no-js #upload .pg3 { transform: translate(110%, 0) rotate(1deg); }
.pdf-frame { position: absolute; left: 50%; top: 50%; width: calc(clamp(110px, 13vw, 150px) * 3.5); height: calc(clamp(110px, 13vw, 150px) * 1.62); max-width: 100%; transform: translate(-50%, -50%); border-radius: 14px; border: 2px dashed var(--lilac); opacity: 0; transition: opacity .5s; }
#upload[data-step="1"] .pdf-frame { opacity: 1; }
.frame-label { position: absolute; left: 50%; transform: translateX(-50%); top: -34px; white-space: nowrap; font-size: 13px; font-weight: 650; color: var(--purple-ink); background: var(--ceramic); padding: 2px 10px; border-radius: 999px; }
.kinds { position: absolute; inset: auto 0 2% 0; display: flex; justify-content: space-between; gap: 12px; opacity: 0; transform: translateY(12px); transition: opacity .5s .3s, transform .6s .3s; }
#upload[data-step="2"] .kinds, .no-js #upload .kinds { opacity: 1; transform: none; }
.kinds .card { padding: 8px 12px; font-size: 13px; font-weight: 650; }
.status-pill { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--paper); box-shadow: 0 10px 24px -14px rgba(16,49,81,.4); font-size: 14px; font-weight: 600; white-space: nowrap; }
.status-pill .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--lilac-tint); border-top-color: var(--purple); animation: spin 1s linear infinite; }
#upload[data-step="2"] .status-pill .spin, .no-js #upload .status-pill .spin { animation: none; border-color: var(--ok); background: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }
.status-pill .st { display: none; }
#upload[data-step="0"] .st0, #upload[data-step="1"] .st1, #upload[data-step="2"] .st2, .no-js #upload .st2 { display: inline; }

/* ---------- Read ---------- */
#read { --len: 300vh; }
.read-vis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; width: 100%; }
.rx { position: relative; padding: 22px 22px 26px; min-height: 380px; overflow: hidden; }
.rx-head { display: flex; justify-content: space-between; gap: 10px; border-bottom: 2px solid var(--deep); padding-bottom: 8px; margin-bottom: 12px; }
.rx-head b { font-size: 14px; font-stretch: 110%; }
.rx-head span { font-size: 11px; color: var(--ink-3); text-align: right; }
.rx .big { font-family: var(--hand); font-size: 30px; font-weight: 700; color: var(--deep); line-height: 1; }
.rx .l { font-family: var(--hand); font-size: clamp(16px, 1.6vw, 20px); line-height: 1.35; padding: 4px 6px; margin: 2px -6px; border-radius: 6px; color: #20375a; transition: background .3s; }
.rx .l.lit, .no-js .rx .l { background: rgba(162, 252, 245, 0.55); }
.scan { position: absolute; left: 0; right: 0; height: 3px; top: calc(var(--scan, 0) * 100%); background: var(--purple); box-shadow: 0 0 24px 6px rgba(99, 101, 184, 0.45); opacity: var(--scan-o, 1); }
.facts { display: grid; gap: 10px; }
.fact { padding: 12px 14px; display: grid; gap: 4px; opacity: .14; transform: translateX(-14px) scale(.98); transition: opacity .45s, transform .55s cubic-bezier(.2,.75,.2,1); }
.fact.on, .no-js .fact { opacity: 1; transform: none; }
.fact .k { font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.fact b { font-size: 15px; }
.fact span { font-size: 13px; color: var(--ink-2); }
.fact .tag-rev { display: none; }
#read.reviewed .fact .tag-ai, .no-js #read .fact .tag-ai { display: none; }
#read.reviewed .fact .tag-rev, .no-js #read .fact .tag-rev { display: inline-flex; }
@media (max-width: 820px) {
  .read-vis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .rx { padding: 12px; min-height: 0; }
  .rx .l { font-size: 13px; }
  .rx .big { font-size: 22px; }
  .rx-head b { font-size: 11px; } .rx-head span { display: none; }
  .fact { padding: 8px 10px; } .fact b { font-size: 12px; } .fact span { font-size: 11px; } .fact .k { font-size: 9px; }
}

/* ---------- Story (horizontal) ---------- */
#story { --len: 420vh; }
#story .stick { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: clamp(16px, 4vh, 40px); }
.story-head { max-width: 1180px; width: 100%; margin: 0 auto; display: grid; gap: 12px; }
.story-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.story-chips span { padding: 6px 12px; border-radius: 999px; background: var(--lilac-tint); color: var(--purple-ink); font-size: 13px; font-weight: 600; }
.track-wrap { position: relative; align-self: stretch; display: grid; grid-template-rows: minmax(0, 1fr); align-items: center; min-height: 0; }
.track-wrap .track { scale: var(--fit, 1); transform-origin: 0 50%; }
.track { display: flex; gap: 18px; width: max-content; transform: translateX(var(--tx, 0px)); will-change: transform; padding-left: max(0px, calc((100vw - 1180px) / 2)); }
/* Through the month dots (34px down the track) of the track as it is centred and scaled (site.js sets --track-h) */
.rail { position: absolute; left: 0; right: 0; top: calc(50% - var(--fit, 1) * (var(--track-h, 68px) / 2 - 34px)); height: 2px; background: var(--corridor); }
.no-js .rail { top: 34px; }
.rail i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--purple); }
.month { display: grid; gap: 14px; align-content: start; }
.month h3 { font-size: 15px; font-weight: 700; letter-spacing: 0; display: flex; align-items: center; gap: 10px; height: 68px; }
.month h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ceramic); box-shadow: 0 0 0 3px var(--purple); }
.month-cards { display: flex; gap: 14px; }
.visit { width: clamp(240px, 24vw, 300px); padding: 16px; display: grid; gap: 10px; align-content: start; }
.visit .when { font-size: 13px; font-weight: 650; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.visit b { font-size: 17px; font-stretch: 105%; line-height: 1.2; }
.visit ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.visit li { display: flex; gap: 8px; }
.visit li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--lilac); }
.visit .doc-line { border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; color: var(--ink-3); }

/* ---------- Medicines ---------- */
#medicines { --len: 380vh; }
.med-vis { position: relative; width: min(560px, 100%); height: min(520px, 100%); }
.med-layer { position: absolute; inset: 0; display: grid; place-content: center; gap: 16px; transition: opacity .5s, transform .6s cubic-bezier(.2,.75,.2,1); }
.med-written { padding: 26px 28px; display: grid; gap: 18px; }
.written-line { font-family: var(--hand); font-size: clamp(22px, 2.6vw, 34px); color: #20375a; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; line-height: 1.1; }
.code { position: relative; padding: 0 4px; border-radius: 6px; transition: background .4s; }
#medicines[data-step="1"] .code, #medicines[data-step="2"] .code, #medicines[data-step="3"] .code, .no-js #medicines .code { background: var(--amber-tint); }
.decoded { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.decoded div { padding: 10px 12px; border-radius: 12px; background: var(--tint); display: grid; gap: 2px; opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .5s; }
.decoded div:nth-child(2) { transition-delay: .1s; } .decoded div:nth-child(3) { transition-delay: .2s; }
.decoded small { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.decoded b { font-size: 15px; }
#medicines[data-step="1"] .decoded div, #medicines[data-step="2"] .decoded div, #medicines[data-step="3"] .decoded div, .no-js #medicines .decoded div { opacity: 1; transform: none; }
.check-row { display: flex; gap: 10px; flex-wrap: wrap; }
.check-row .btn { min-height: 38px; font-size: 14px; }
.check-row .btn-soft { background: var(--lilac-tint); color: var(--purple-ink); }
.layer-a { opacity: 1; }
#medicines[data-step="2"] .layer-a, #medicines[data-step="3"] .layer-a, .no-js #medicines .layer-a { opacity: 0; transform: translateY(-30px) scale(.96); pointer-events: none; }
.layer-b { place-content: end center; padding-bottom: 8px; opacity: 0; transform: translateY(30px); pointer-events: none; }
#medicines[data-step="2"] .layer-b, #medicines[data-step="3"] .layer-b, .no-js #medicines .layer-b { opacity: 1; transform: none; pointer-events: auto; }
.doses { padding: 18px; display: grid; gap: 12px; width: min(440px, 100%); }
.doses-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.doses-head b { font-size: 18px; font-stretch: 108%; }
.slot { display: grid; gap: 6px; }
.slot-t { font-size: 12px; font-weight: 650; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.dose { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--tint); }
.dose .nm { flex: 1; min-width: 0; }
.dose .nm b { display: block; font-size: 14px; }
.dose .nm span { font-size: 12px; color: var(--ink-3); }
.tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--corridor); display: grid; place-items: center; color: var(--paper); flex: none; }
.tick.done { background: var(--ok); border-color: var(--ok); }
.ring { --v: .6; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(var(--purple) calc(var(--v) * 360deg), var(--lilac-tint) 0); display: grid; place-items: center; flex: none; }
.ring span { width: 34px; height: 34px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; font-size: 10px; font-weight: 700; line-height: 1; text-align: center; }
.lock { position: absolute; left: 50%; top: 0; width: min(380px, 94%); transform: translate(-50%, -140%); opacity: 0; transition: transform .7s cubic-bezier(.2,.8,.2,1.1), opacity .4s; z-index: 4; padding: 14px; border-radius: 22px; background: rgba(255,255,255,0.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 24px 50px -20px rgba(8,26,46,.5); display: grid; gap: 10px; }
#medicines[data-step="3"] .lock { transform: translate(-50%, 0); opacity: 1; }
.lock-top { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-3); }
.lock-top .app-ico { width: 22px; height: 22px; border-radius: 6px; background: var(--deep); display: grid; place-items: center; }
.lock-top .app-ico svg { width: 14px; height: 14px; }
.lock b { font-size: 15px; }
.lock-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lock-actions span { text-align: center; padding: 8px 4px; border-radius: 10px; background: rgba(16,49,81,.07); font-size: 13px; font-weight: 600; }

/* ---------- Recovery ---------- */
#recovery { --len: 280vh; }
.rec-vis { display: grid; gap: 14px; width: min(560px, 100%); }
.day-big { display: flex; align-items: baseline; gap: 14px; }
.day-big .n { font-size: clamp(88px, 14vw, 180px); font-weight: 800; font-stretch: 120%; line-height: .85; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, var(--cynogen), var(--biscay)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.day-big .t { font-size: clamp(18px, 2vw, 24px); font-weight: 650; color: var(--on-night-2); }
.rec-card { background: rgba(160, 202, 240, 0.08); border: 1px solid rgba(160, 202, 240, 0.18); border-radius: 18px; padding: 14px 16px; display: grid; gap: 6px; }
.rec-card .k { font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--lilac); }
.rec-card .row2 { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.rec-card b { font-size: 17px; }
.rec-card .togo { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--cynogen); white-space: nowrap; }
.rec-card .pg-ref { font-size: 13px; color: var(--on-night-2); }
.warn { background: var(--amber-tint); color: #3d2a00; border-radius: 18px; padding: 14px 16px; display: grid; gap: 10px; }
.warn p { font-weight: 600; font-size: 15px; }
.warn ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: 14px; }
.warn .calls { display: flex; gap: 8px; flex-wrap: wrap; }
.warn .calls span { padding: 8px 14px; border-radius: 999px; background: var(--deep); color: var(--paper); font-size: 13px; font-weight: 650; }
.warn .calls span + span { background: var(--err); }

/* ---------- Vitals ---------- */
#vitals { --len: 260vh; }
.chart-card { padding: 18px; width: min(560px, 100%); display: grid; gap: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart-head b { font-size: 18px; font-stretch: 108%; }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--tint); font-size: 12px; font-weight: 650; }
.seg span { padding: 4px 10px; border-radius: 999px; color: var(--ink-3); }
.seg span.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(16,49,81,.15); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--ink-3); font: 600 11px var(--display); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ln-sys, .chart .ln-dia { fill: none; stroke: var(--purple); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .ln-dia { stroke-dasharray: none; opacity: .55; }
.chart .pt { fill: var(--paper); stroke: var(--purple); stroke-width: 2.5; transition: opacity .3s; }
.chart .pt-d { fill: var(--purple); stroke: none; }
.reading-line { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.reading-line span { color: var(--ink-3); }
.quote { padding: 14px 16px; border-radius: 14px; background: var(--lilac-tint); display: grid; gap: 4px; }
.quote small { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--purple-ink); }
.quote q { font-size: 16px; font-weight: 600; }
.quote span { font-size: 13px; color: var(--purple-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Copilot ---------- */
#copilot { --len: 340vh; }
.chat { width: min(520px, 100%); padding: 16px; display: grid; gap: 10px; align-content: start; background: var(--paper); }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.chat-head .orb { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--cynogen), var(--purple) 60%, var(--deep)); box-shadow: 0 0 0 4px var(--lilac-tint); }
.chat-head b { font-size: 15px; }
.chat-head span { font-size: 12px; color: var(--ink-3); display: block; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; min-height: 1.45em; transition: opacity .3s; }
.msg[data-empty] { opacity: 0; }
/* What is still to type keeps its room, so the chat never grows as it types */
.msg .rest { visibility: hidden; }
.msg.me { justify-self: end; background: var(--deep); color: var(--paper); border-bottom-right-radius: 4px; }
.msg.ai { justify-self: start; background: var(--tint); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.ref { justify-self: stretch; max-width: none; background: var(--amber-tint); color: #3d2a00; border-radius: 14px; }
.msg.ref strong { display: block; font-size: 11px; letter-spacing: .08em; margin-bottom: 2px; }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px; background: currentColor; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sharing with my doctor ---------- */
#sharing { --len: 400vh; }
.share-vis { position: relative; width: min(560px, 100%); height: min(560px, 100%); }
.sh { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .5s, transform .6s cubic-bezier(.2,.75,.2,1); opacity: 0; transform: translateY(24px) scale(.98); pointer-events: none; }
#sharing[data-step="0"] .sh0, #sharing[data-step="1"] .sh1, #sharing[data-step="2"] .sh2, #sharing[data-step="3"] .sh3, .no-js #sharing .sh3 { opacity: 1; transform: none; pointer-events: auto; }
.code-pair { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: center; }
.monitor { padding: 18px; display: grid; gap: 10px; justify-items: center; background: var(--paper); border-radius: 16px; box-shadow: 0 24px 60px -30px rgba(8,26,46,.6); }
.monitor small { font-size: 12px; color: var(--ink-3); }
.qr { width: 150px; height: 150px; }
.qr path { fill: var(--deep); }
.code-text { font: 800 26px/1 var(--display); font-stretch: 115%; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.scanner { --pw: 170px; }
.scanner .app { place-content: center; justify-items: center; background: #0b1420; color: var(--on-night); }
.reticle { width: 110px; height: 110px; border-radius: 18px; position: relative; box-shadow: 0 0 0 2px var(--cynogen); overflow: hidden; }
.reticle::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--cynogen); box-shadow: 0 0 12px 3px var(--cynogen); animation: sweep 1.8s ease-in-out infinite alternate; }
@keyframes sweep { from { top: 6px; } to { top: calc(100% - 8px); } }
.consent { padding: 20px; width: min(420px, 100%); display: grid; gap: 12px; }
.consent b { font-size: 18px; font-stretch: 108%; }
.opt { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px; background: var(--tint); font-weight: 600; font-size: 14px; }
.opt i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--corridor); flex: none; }
.opt.on { background: var(--lilac-tint); color: var(--purple-ink); }
.opt.on i { border: 5px solid var(--purple); }
.thread { width: min(420px, 100%); padding: 14px; display: grid; gap: 10px; }
.em-banner { background: var(--amber-tint); color: #3d2a00; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.bubble { max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: 14px; }
.bubble.me { justify-self: end; background: var(--deep); color: var(--paper); border-bottom-right-radius: 4px; }
.bubble.dr { justify-self: start; background: var(--tint); border-bottom-left-radius: 4px; }
.bubble small { display: block; font-size: 11px; opacity: .75; margin-top: 2px; }
.booking { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.booking b { font-size: 14px; display: block; }
.booking span { font-size: 12px; color: var(--ink-3); }
.booking .btn { min-height: 34px; padding: 0 14px; font-size: 13px; }
.viewed { width: min(420px, 100%); padding: 18px; display: grid; gap: 10px; }
.viewed b { font-size: 18px; font-stretch: 108%; }
.vrow { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--tint); font-size: 14px; }
.vrow span { font-size: 12px; color: var(--ink-3); }
.end-btn { justify-self: start; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--err); color: var(--err); font-weight: 650; font-size: 14px; }

/* ---------- Family ---------- */
#family { --len: 240vh; }
.fam-vis { width: min(520px, 100%); display: grid; gap: 14px; }
.switcher { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 999px; background: var(--deep); color: var(--paper); }
.switcher .who { flex: 1; min-width: 0; position: relative; height: 22px; overflow: hidden; }
.switcher .who span { position: absolute; inset: 0; font-weight: 650; transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .4s; white-space: nowrap; }
.switcher .who .b { transform: translateY(110%); opacity: 0; }
#family[data-step="1"] .switcher .who .a, .no-js #family .switcher .who .a { transform: translateY(-110%); opacity: 0; }
#family[data-step="1"] .switcher .who .b, .no-js #family .switcher .who .b { transform: none; opacity: 1; }
.switcher .role { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(162, 252, 245, 0.18); color: var(--cynogen); font-weight: 650; }
.switcher .sw { font-size: 13px; font-weight: 650; padding: 6px 12px; border-radius: 999px; background: var(--paper); color: var(--deep); }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-card { padding: 16px; display: grid; gap: 8px; align-content: start; transition: box-shadow .4s, transform .4s; }
.role-card b { font-size: 17px; font-stretch: 106%; }
.role-card p { font-size: 14px; color: var(--ink-2); }
#family[data-step="1"] .role-card.help, .no-js #family .role-card.help { box-shadow: 0 0 0 2px var(--purple), 0 18px 40px -20px rgba(99,101,184,.6); transform: translateY(-4px); }
.stamp { padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.stamp span { color: var(--ink-3); font-size: 13px; }

/* ---------- Emergency ---------- */
#emergency { --len: 230vh; }
/* The card stands up in its own frame, which site.js scales to fit */
.ecard-fit { width: min(460px, 100%); perspective: 1400px; }
.ecard-wrap { transform-style: preserve-3d; transform: rotateX(calc((1 - var(--e, 1)) * 58deg)) scale(calc(0.86 + var(--e, 1) * 0.14)); transform-origin: 50% 100%; }
.ecard { background: var(--paper); color: #0b1f36; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); }
.ecard-top { background: var(--err); color: var(--paper); padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ecard-top b { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.ecard-body { padding: 16px 18px 18px; display: grid; gap: 12px; }
.who-row { display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.who-row b { font-size: 22px; font-stretch: 108%; }
.blood { text-align: center; padding: 6px 12px; border-radius: 12px; border: 2px solid #0b1f36; }
.blood small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.blood b { font-size: 26px; }
.esec { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.esec small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.esec p { font-size: 15px; font-weight: 600; }
.ha { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: #0b1f36; color: var(--paper); font-size: 11px; font-weight: 700; vertical-align: 1px; }


/* Generic layers: a visual's states, each shown for the steps in its data-on */
.lyr { position: absolute; inset: 0; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .6s cubic-bezier(.2,.75,.2,1); pointer-events: none; }
.scene[data-step="0"] .lyr[data-on~="0"], .scene[data-step="1"] .lyr[data-on~="1"],
.scene[data-step="2"] .lyr[data-on~="2"], .scene[data-step="3"] .lyr[data-on~="3"] { opacity: 1; transform: none; pointer-events: auto; }
/* Without JavaScript, each visual shows its last state (a rule of its own: a browser without :has() drops only this) */
.no-js .lyr:not(:has(~ .lyr)) { opacity: 1; transform: none; pointer-events: auto; }
.person { width: 100%; height: 100%; }
.person circle, .person path { fill: rgba(255, 255, 255, 0.55); }

/* ---------- Reminders ---------- */
#reminders { --len: 340vh; }
.home-phone { --pw: clamp(220px, 22vw, 290px); }
.home-screen { background: radial-gradient(120% 70% at 20% 0%, #4e51a3 0%, #17436e 45%, #081a2e 100%); color: var(--paper); }
.hs-clock { position: absolute; top: 34px; left: 0; right: 0; text-align: center; display: grid; transition: opacity .4s; }
.hs-clock b { font-size: 44px; font-weight: 600; font-stretch: 100%; letter-spacing: -0.02em; line-height: 1; }
.hs-clock span { font-size: 11px; opacity: .8; }
.widget { position: absolute; left: 10px; right: 10px; top: 108px; padding: 10px; border-radius: 20px; background: var(--paper); color: var(--ink); display: grid; gap: 8px; transition: transform .6s cubic-bezier(.2,.75,.2,1), box-shadow .6s, opacity .5s; transform-origin: 50% 0; }
.w-head { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 650; color: var(--ink-3); }
.w-ico { width: 16px; height: 16px; border-radius: 4px; background: var(--lilac); overflow: hidden; }
.w-ico img { width: 100%; height: 100%; display: block; }
.w-count { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 6px; }
.w-count b { font-size: 30px; font-weight: 750; line-height: 1; }
.w-count span { font-size: 11px; color: var(--ink-2); }
.w-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tile { border-radius: 12px; padding: 7px 8px; display: grid; gap: 1px; background: var(--tint); }
.tile small { font-size: 9px; color: var(--ink-3); font-weight: 600; }
.tile b { font-size: 11px; display: flex; align-items: center; gap: 4px; }
.tile.now { background: var(--purple); color: var(--paper); }
.tile.now small { color: var(--lilac-tint); }
.tile.done b { color: var(--ok); }
.tk { width: 14px; height: 14px; border-radius: 50%; background: var(--ok); color: var(--paper); display: grid; place-items: center; }
.tk svg { width: 9px; height: 9px; }
.w-reading { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 10px; color: var(--ink-3); }
.w-reading b { display: block; font-size: 11px; color: var(--ink); }
.w-reading svg { width: 18px; height: 18px; fill: none; stroke: var(--purple); stroke-width: 2; flex: none; }
.wb { display: none !important; }
#reminders:not([data-step="0"]) .wa { display: none !important; }
#reminders:not([data-step="0"]) .wb { display: revert !important; animation: fadein .5s 1s both; }
#reminders:not([data-step="0"]) .tile.wb { display: grid !important; }
@keyframes fadein { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.hs-icons { position: absolute; left: 14px; right: 14px; bottom: 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; transition: opacity .5s; }
.hs-icons i { aspect-ratio: 1; border-radius: 12px; background: rgba(255, 255, 255, 0.14); }
.nt { padding: 9px 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--ink); display: grid; gap: 3px; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6); }
.nt b { font-size: 11px; line-height: 1.25; }
.nt > span { font-size: 10px; color: var(--ink-2); }
.nt-top { display: flex; gap: 6px; align-items: center; font-size: 8.5px; color: var(--ink-3); letter-spacing: .04em; }
.nt-ico { width: 14px; height: 14px; border-radius: 3.5px; background: var(--lilac); overflow: hidden; }
.nt-ico img { width: 100%; height: 100%; display: block; }
.nt-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 3px; }
.nt-actions span { text-align: center; padding: 6px 2px; border-radius: 8px; background: rgba(16, 49, 81, .08); font-size: 9.5px; font-weight: 650; transition: background .3s, color .3s; }
.nt-med { position: absolute; left: 8px; right: 8px; top: 38px; z-index: 3; transform: translateY(-160%); opacity: 0; transition: transform .7s cubic-bezier(.2,.8,.2,1.1), opacity .4s; }
#reminders[data-step="0"] .nt-med { transform: none; opacity: 1; }
#reminders[data-step="1"] .nt-med { transform: none; opacity: 1; animation: dismiss .6s .7s both; }
#reminders[data-step="1"] .nt-med .took { background: var(--ok); color: var(--paper); }
@keyframes dismiss { to { transform: translateY(-160%); opacity: 0; } }
#reminders[data-step="2"] .widget { transform: scale(1.06); box-shadow: 0 0 0 3px var(--cynogen), 0 24px 50px -20px rgba(162, 252, 245, .5); }
#reminders[data-step="2"] .hs-icons { opacity: .25; }
.nt-stack { position: absolute; left: 8px; right: 8px; top: 34px; z-index: 3; display: grid; gap: 6px; }
.nt-stack .nt { opacity: 0; transform: translateY(-20px) scale(.96); transition: opacity .4s, transform .5s cubic-bezier(.2,.8,.2,1.1); }
#reminders[data-step="3"] .nt-stack .nt, .no-js #reminders .nt-stack .nt { opacity: 1; transform: none; }
#reminders[data-step="3"] .nt-stack .nt:nth-child(2) { transition-delay: .12s; }
#reminders[data-step="3"] .nt-stack .nt:nth-child(3) { transition-delay: .24s; }
#reminders[data-step="3"] .nt-stack .nt:nth-child(4) { transition-delay: .36s; }
#reminders[data-step="3"] .widget, #reminders[data-step="3"] .hs-clock, .no-js #reminders .widget, .no-js #reminders .hs-clock { opacity: 0; }

/* ---------- Video consultations ---------- */
#video { --len: 400vh; }
.duo { position: relative; width: min(600px, 100%); padding-bottom: 30px; }
.laptop { width: 80%; }
.lap-screen { position: relative; aspect-ratio: 16 / 10.4; border-radius: 12px 12px 0 0; border: 8px solid #0c1522; border-bottom-width: 12px; background: var(--ceramic); overflow: hidden; font-size: 11px; }
.lap-base { height: 12px; margin: 0 -5%; border-radius: 0 0 14px 14px; background: linear-gradient(#c9ced6, #9aa3b0); }
.lap-bar { display: flex; gap: 14px; align-items: center; padding: 6px 12px; background: var(--deep); color: var(--on-night-2); font-size: 10px; }
.lap-bar b { color: var(--paper); font-stretch: 112%; margin-right: 6px; }
.lap-body { position: absolute; inset: 28px 0 0 0; }
.lp { padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.lp-who { font-size: 13px; font-weight: 700; }
.lp-tabs { display: flex; gap: 10px; font-size: 10px; color: var(--ink-3); border-bottom: 1px solid var(--line); padding-bottom: 6px; flex-wrap: wrap; }
.lp-tabs .on { color: var(--deep); font-weight: 700; box-shadow: 0 7px 0 -5px var(--purple); }
.lp-card { background: var(--paper); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; box-shadow: 0 1px 0 rgba(16,49,81,.06); }
.lp-card > b { font-size: 12px; }
.lp-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lp-fields span { border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; font-weight: 600; display: grid; }
.lp-fields small, .lp-seg small { font-size: 9px; color: var(--ink-3); font-weight: 600; }
.lp-seg { display: flex; align-items: center; gap: 5px; }
.lp-seg span { padding: 3px 9px; border-radius: 999px; background: var(--tint); font-weight: 650; }
.lp-seg span.on { background: var(--deep); color: var(--paper); }
.lp-btn { justify-self: start; padding: 7px 14px; border-radius: 999px; background: var(--deep); color: var(--paper); font-weight: 650; font-size: 11px; }
.lp-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.lp-row > span:first-child { display: grid; color: var(--ink-3); }
.lp-row b { color: var(--ink); font-size: 12px; }
.lp-note { font-size: 10.5px; color: var(--ink-2); }
.lp-dl { font-weight: 650; color: var(--purple-ink); white-space: nowrap; }
.lp-year { grid-template-columns: repeat(3, 1fr); }
.lp-year span { display: grid; } .lp-year b { font-size: 15px; } .lp-year small { font-size: 9px; color: var(--ink-3); }
.call { background: #0b1420; padding: 0; }
.call .tile-big { position: absolute; inset: 22px 0 30px 0; background: radial-gradient(circle at 50% 30%, #2f5a86, #0f2238 70%); display: grid; place-items: end center; overflow: hidden; }
.call .tile-big svg { width: 46%; height: auto; }
.tile-big span, .tile-cg span, .tile-me span { position: absolute; left: 8px; bottom: 6px; font-size: 9.5px; color: var(--paper); background: rgba(0,0,0,.45); padding: 2px 6px; border-radius: 6px; }
.call .tile-cg, .call .tile-me { position: absolute; width: 22%; aspect-ratio: 4 / 3; right: 8px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1.5px rgba(255,255,255,.3); display: grid; place-items: end center; }
.call .tile-cg { top: 30px; background: radial-gradient(circle at 50% 30%, #6365b8, #2a2c6b); animation: none; }
.call .tile-me { bottom: 38px; background: radial-gradient(circle at 50% 30%, #3b6e64, #13312c); }
.call .tile-cg svg, .call .tile-me svg { width: 60%; height: auto; }
.call-banner { position: absolute; top: 0; left: 0; right: 0; height: 22px; background: var(--amber-tint); color: #3d2a00; font-size: 10px; font-weight: 650; display: flex; align-items: center; padding: 0 10px; }
.call-toast { position: absolute; left: 50%; top: 36px; transform: translateX(-50%); background: rgba(255,255,255,.92); color: var(--ink); font-size: 10px; font-weight: 650; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.call-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: #0b1420; display: flex; justify-content: space-between; align-items: center; padding: 0 10px; font-size: 10px; color: var(--on-night); }
.cb-check { display: flex; align-items: center; gap: 6px; }
.cb-check i, .rxf-tick i, .rxf-pt i, .signed i, .sig i, .v-badge i { width: 14px; height: 14px; border-radius: 4px; background: var(--ok); color: var(--paper); display: inline-grid; place-items: center; flex: none; }
.cb-check svg, .rxf-tick svg, .rxf-pt svg, .signed svg, .sig svg, .v-badge svg { width: 9px; height: 9px; }
.cb-end { background: var(--err); color: var(--paper); padding: 4px 10px; border-radius: 999px; font-weight: 650; }
.duo-phone { --pw: clamp(128px, 13vw, 168px); position: absolute; right: 0; bottom: 0; padding: 6px; }
.duo-phone .screen { border-radius: 20px; font-size: 9px; }
.duo-phone .notch { height: 13px; top: 5px; }
.ps { padding: 24px 8px 8px; display: grid; gap: 6px; align-content: start; }
.ps-head { font-size: 12px; font-weight: 750; }
.ps-em { background: var(--amber-tint); color: #3d2a00; padding: 4px 6px; border-radius: 6px; font-size: 8.5px; font-weight: 600; }
.ps-card { background: var(--paper); border-radius: 10px; padding: 7px; display: grid; gap: 3px; box-shadow: 0 1px 0 rgba(16,49,81,.06); }
.ps-card b { font-size: 9.5px; line-height: 1.25; }
.ps-card span { color: var(--ink-3); font-size: 8.5px; }
.ps-card .tag { justify-self: start; font-size: 8px; padding: 2px 6px; }
.ps-btn { text-align: center; padding: 5px; border-radius: 999px; background: var(--lilac-tint); color: var(--purple-ink) !important; font-weight: 650; font-size: 8.5px; }
.ps-btn.dark { background: var(--deep); color: var(--paper) !important; }
.sheet { background: rgba(8, 26, 46, 0.45); align-content: end; padding-bottom: 6px; }
.ps-sheet { background: var(--paper); border-radius: 14px; padding: 9px; display: grid; gap: 5px; }
.ps-sheet b { font-size: 10px; line-height: 1.25; }
.ps-sheet > span:not(.ps-btn) { font-size: 8.5px; color: var(--ink-3); }
.ps-pay { display: flex; gap: 4px; }
.ps-pay span { flex: 1; text-align: center; padding: 4px; border-radius: 6px; border: 1px solid var(--line); font-weight: 650; }
.ps-pay span.on { border-color: var(--purple); color: var(--purple-ink); }
.vcall { background: #0b1420; padding: 0; }
.vcall .tile-big { position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, #4e51a3, #141a3a 75%); display: grid; place-items: end center; overflow: hidden; }
.vcall .tile-big svg { width: 70%; height: auto; }
.vcall .tile-big span { bottom: 38px; }
.vcall .tile-me { position: absolute; right: 6px; top: 26px; width: 34%; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #3b6e64, #13312c); display: grid; place-items: end center; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.vcall .tile-me svg { width: 80%; height: auto; }
.vcall .ps-em { position: absolute; left: 6px; right: 6px; top: 22px; width: 52%; }
.ps-leave { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: var(--err); color: var(--paper); padding: 5px 14px; border-radius: 999px; font-weight: 650; }

/* ---------- Written prescriptions ---------- */
#prescriptions { --len: 400vh; }
.rx-stage { position: relative; width: min(540px, 100%); height: min(560px, 100%); }
.rx-stage > .lyr { display: grid; place-items: center; }
.rxf { width: min(440px, 100%); padding: 16px; display: grid; gap: 10px; font-size: 13px; }
.rxf-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rxf-head b { font-size: 16px; font-stretch: 106%; }
.rxf-pt { display: flex; flex-wrap: wrap; gap: 6px; }
.rxf-pt span { display: inline-flex; gap: 5px; align-items: center; padding: 4px 8px; border-radius: 999px; background: var(--tint); font-size: 12px; font-weight: 600; }
.rxf-line { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.rxf-line > b { font-size: 15px; letter-spacing: .03em; }
.rxf-line > span { color: var(--ink-3); font-size: 12px; }
.rxf-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rxf-times span { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-weight: 700; font-size: 14px; display: grid; text-align: center; }
.rxf-times small { font-size: 9px; font-weight: 600; color: var(--ink-3); }
.rxf-meta { font-size: 12px; color: var(--ink-2); }
.rxf-meta em { display: block; font-style: normal; color: var(--purple-ink); font-weight: 600; }
.rxf-line.blocked { border-color: var(--err); background: #fff5f4; }
.rxf-line.blocked > span { color: var(--err); font-weight: 600; }
.rxf-tick { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
.esign { position: relative; width: min(520px, 100%); height: 100%; display: grid; place-items: center; }
.otp-card { position: absolute; left: 0; top: 4%; width: min(270px, 62%); padding: 16px; display: grid; gap: 10px; z-index: 2; }
.otp-card > b { font-size: 16px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.otp span { aspect-ratio: 3 / 4; border-radius: 8px; border: 1.5px solid var(--corridor); display: grid; place-items: center; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.otp span.f { border-color: var(--purple); }
.signed { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 650; color: var(--ok); opacity: 0; transition: opacity .4s; }
#prescriptions.is-signed .signed, .no-js #prescriptions .signed { opacity: 1; }
.rxpdf { position: absolute; right: 0; bottom: 0; width: min(300px, 66%); padding: 14px; display: grid; gap: 6px; font-size: 10.5px; transform: rotate(2deg); }
.pdf-head { display: grid; gap: 1px; border-bottom: 2px solid var(--deep); padding-bottom: 6px; }
.pdf-head b { font-size: 13px; }
.pdf-head span { color: var(--ink-3); font-size: 9px; line-height: 1.3; }
.pdf-pt { font-weight: 600; }
.pdf-rx { font-family: var(--hand); font-weight: 700; font-size: 18px; line-height: 1; }
.pdf-ln { font-weight: 700; }
.pdf-ln span { font-weight: 400; color: var(--ink-2); }
.pdf-foot { display: flex; justify-content: space-between; align-items: end; margin-top: 4px; }
.qr-mini { width: 52px; height: 52px; }
.qr-mini path { fill: var(--deep); }
.sig { display: inline-flex; gap: 6px; align-items: center; padding: 5px 8px; border: 1.5px solid var(--ok); border-radius: 8px; color: var(--ok); font-weight: 650; font-size: 9.5px; line-height: 1.2; opacity: .2; transition: opacity .4s; }
#prescriptions.is-signed .sig, .no-js #prescriptions .sig { opacity: 1; }
.rx-phone { --pw: clamp(220px, 21vw, 260px); }
.rx-phone .ps-card b { font-size: 11px; } .rx-phone .ps-card span { font-size: 10px; } .rx-phone .ps-btn { font-size: 10px; padding: 7px; }
.verify { width: min(440px, 100%); overflow: hidden; }
.verify-body { padding: 18px; display: grid; gap: 12px; }
.v-badge { justify-self: start; display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--cyn-tint); color: var(--ok); font-size: 20px; font-weight: 750; }
.v-badge i { width: 24px; height: 24px; border-radius: 50%; }
.v-badge svg { width: 14px; height: 14px; }
.verify dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; font-size: 14px; }
.verify dt { color: var(--ink-3); }
.verify dd { margin: 0; font-weight: 600; }
.verify .fp { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
@media (max-width: 820px) {
  /* The laptop and phone keep their own layout, at a set width, and site.js scales them to fit */
  html:not(.no-js) .duo { width: 500px; }
  .home-phone { --pw: 200px; }
  .rxf { padding: 12px; gap: 8px; }
  .rxf-line { padding: 8px; }
  .rx-phone { --pw: 190px; }
  .otp-card { width: 70%; top: 2%; }
  .rxpdf { width: 72%; bottom: 0; }
}

/* ---------- Static bands ---------- */
.section { padding-block: clamp(80px, 12vw, 160px); }
.promise-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 48px; }
.promise { padding: 22px; border-radius: 20px; background: rgba(160, 202, 240, 0.07); border: 1px solid rgba(160, 202, 240, 0.16); display: grid; gap: 10px; align-content: start; }
.promise svg { width: 28px; height: 28px; stroke: var(--cynogen); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.promise b { font-size: 19px; font-stretch: 106%; line-height: 1.2; }
.promise p { color: var(--on-night-2); font-size: 15px; }
.doctors { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.doctors > * { min-width: 0; }
.dash { padding: 0; overflow: hidden; }
.dash-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.dash-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--corridor); }
.dash-body { padding: 16px; display: grid; gap: 10px; }
.dash-body > b { font-size: 20px; font-stretch: 108%; }
.prow { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; font-size: 14px; }
.prow .nm { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.prow .nm b { font-size: 16px; }
.prow span { color: var(--ink-3); font-size: 13px; }
.prow .new { color: var(--purple-ink); font-weight: 600; font-size: 13px; }
.feature-list { display: grid; gap: 14px; margin-top: 28px; padding: 0; list-style: none; }
.feature-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-size: 16px; color: var(--ink-2); }
.feature-list li b { color: var(--ink); }
.feature-list svg { width: 22px; height: 22px; stroke: var(--purple); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
@media (max-width: 820px) { .doctors { grid-template-columns: minmax(0, 1fr); } .roles { grid-template-columns: minmax(0, 1fr); } }
.get { text-align: center; display: grid; gap: 22px; justify-items: center; }
.get .stores { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.store { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 16px; background: var(--paper); color: var(--deep); text-decoration: none; text-align: left; min-width: 220px; }
.store svg { width: 26px; height: 26px; fill: var(--deep); }
.store small { display: block; font-size: 12px; color: var(--ink-3); }
.store b { font-size: 17px; }
.store-item { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.store-soon { cursor: default; }
/* Each link's QR code, to scan with a phone: shown only on screens wider than a phone. */
.store-qr { display: none; width: 132px; height: 132px; padding: 8px; border-radius: 12px; background: var(--paper); }
.store-qr path { fill: var(--deep); }
@media (min-width: 768px) { .store-qr { display: block; } }
.footer { padding-block: 48px; border-top: 1px solid rgba(160,202,240,.14); font-size: 14px; color: var(--on-night-2); }
.footer .wrap { display: grid; gap: 16px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.footer a { color: var(--on-night); }

/* Phones: tighter type so each scene's frame fits one screen */
@media (max-width: 820px) {
  .lg { font-size: clamp(28px, 8vw, 40px); }
  .scene .lede { font-size: 15px; }
  .day-big .n { font-size: 72px; }
  .rec-vis { gap: 8px; }
  .rec-card { padding: 10px 12px; }
  .rec-card b { font-size: 14px; }
  .warn { padding: 10px 12px; gap: 6px; }
  .warn p, .warn ul { font-size: 13px; }
  .chat { padding: 12px; gap: 6px; }
  .msg { font-size: 12.5px; padding: 7px 10px; }
  .chat-head { padding-bottom: 6px; }
  .scanner { display: none; }
  .ecard-body { padding: 12px 14px; gap: 7px; }
  .esec { padding-top: 6px; }
  .esec p { font-size: 13px; }
  .who-row b { font-size: 18px; }
  .blood b { font-size: 20px; }
  .chart-card { padding: 12px; gap: 8px; }
  .chart text { font-size: 15px; } /* the viewBox is drawn at about half size on a phone */
  .quote q { font-size: 14px; }
}

/* Reduced motion, and the page before its script runs (or without JavaScript): every scene
   is an ordinary section showing its final frame and every caption. site.js removes the
   root's no-js class, and adds still when the reader asks for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
:is(.no-js, .still) .scene { height: auto !important; }
:is(.no-js, .still) .stick { position: relative; height: auto; min-height: 0; overflow: visible; padding-block: 72px; }
:is(.no-js, .still) .split { height: auto; align-items: start; }
:is(.no-js, .still) .visual { height: min(560px, 80vh); }
/* Without the script nothing is scaled: a picture taller than that makes its own room */
.no-js .visual { height: auto; min-height: min(560px, 80vh); }
:is(.no-js, .still) .scene .step { opacity: 1; transform: none; position: relative; grid-area: auto; pointer-events: auto; }
:is(.no-js, .still) .steps { gap: 28px; }
:is(.no-js, .still) .dots, :is(.no-js, .still) .scroll-cue { display: none; }
:is(.no-js, .still) .track-wrap { overflow-x: auto; }
:is(.no-js, .still) #hero .stick { display: grid; justify-items: center; gap: 40px; padding-top: calc(var(--nav-h) + 48px); }
:is(.no-js, .still) .hero-copy, :is(.no-js, .still) .hero-stage, :is(.no-js, .still) .hero-after { position: relative; inset: auto; top: auto; bottom: auto; }
:is(.no-js, .still) .hero-glow, :is(.no-js, .still) .doc { display: none; }
:is(.no-js, .still) .hero-phone { margin-bottom: 0; transform: none; }
:is(.no-js, .still) [data-layer="before"] { opacity: 0 !important; }
:is(.no-js, .still) [data-layer="after"] { opacity: 1 !important; }
:is(.no-js, .still) .hero-after { opacity: 1 !important; }
:is(.no-js, .still) #statement .stick { min-height: 0; }
.no-js .scan { display: none; }
.no-js .statement .w { opacity: 1; }
