/* MediTrace.ai · landing D, after the reference clinia.com
   Layout: nav · hero + stage · sources · pillars · pieces · how · try · field · security · faq · access · close · footer */

/* ---------- typefaces, served from this host (tools/fetch_fonts.py) ---------- */
/* fonts:start */
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('assets/fonts/inter-tight-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('assets/fonts/inter-tight-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; } /* taste-skill-ignore: the app's label face, see --label */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } /* taste-skill-ignore: the app's label face, see --label */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 300 500; font-display: swap; src: url('assets/fonts/newsreader-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 300 500; font-display: swap; src: url('assets/fonts/newsreader-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* fonts:end */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --field: #f4f3f0;          /* hero band, large panels */
  --panel: #f4f3f0;          /* cards on the page ground */
  --raise: #e6e4df;          /* one step above a field: buttons, switches */
  --chip: #e9e7e2;
  --ink: #17181c;
  --ink-2: #44464d;
  --ink-3: #65676f;
  --tone: #3f6fa8;           /* the second voice of a headline */
  --accent: #0b66c2;         /* the brand blue: the action */
  --accent-ink: #0b66c2;
  --accent-soft: #dbe8f7;
  --trace: rgba(11, 102, 194, 0.42);
  --frag: #ffffff;           /* fragment surface */
  --frag-2: #f1f0ed;
  --frag-line: rgba(23, 24, 28, 0.13);
  --head-bg: #17181c;        /* fragment header bar: the theme inverted */
  --head-ink: #f4f3f0;
  --head-ink-2: #a9aab0;
  --blue-card: #0b5fb4;
  --on-blue: #ffffff;
  --on-blue-2: #dbe9f8;
  --trace-on-blue: rgba(255, 255, 255, 0.34);
  --green-card: #dcefe3;
  --on-green: #17181c;
  --on-green-2: #3c4a43;
  --art-b: #dfeaf7;
  --art-c: #e2efe6;
  /* the app's citation families */
  --pm: #1b4a9c; --ct: #1f6e4a; --gn: #95431a; --fd: #6b3a91; --kb: #4a5567;
  --ok: #176f48; --ok-soft: #dcefe3; --warn: #8f5612; --warn-soft: #f6e6cf;
  --mark: rgba(11, 102, 194, 0.16);

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --label: 'JetBrains Mono', ui-monospace, monospace; /* taste-skill-ignore: the app's own label face, used as in the reference */

  --fs-h1: clamp(2.125rem, 1.2rem + 3.5vw, 4.25rem);
  --fs-h2: clamp(1.75rem, 1.1rem + 2vw, 2.875rem);
  --fs-h3: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem);
  --fs-lead: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  --fs-body: 1.125rem;
  --fs-small: 1rem;
  --fs-label: 0.875rem;
  --fs-micro: 0.8125rem;

  --pad: clamp(20px, 5.55vw, 80px);
  --pad-nav: clamp(20px, 2.8vw, 40px);
  --gap: clamp(88px, 11vw, 160px);
  --nav-h: 70px;
  --r: 8px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17181c;
  --field: #26282e;
  --panel: #1f2126;
  --raise: #3a3c44;
  --chip: #32343b;
  --ink: #ffffff;
  --ink-2: #cdccc6;
  --ink-3: #a1a09a;
  --tone: #8fb3e0;
  --accent-ink: #6aaaf2;
  --accent-soft: #1d3a5e;
  --trace: rgba(106, 170, 242, 0.5);
  --frag: #17181c;
  --frag-2: #212329;
  --frag-line: rgba(255, 255, 255, 0.15);
  --head-bg: #ece9e2;
  --head-ink: #17181c;
  --head-ink-2: #5d5f66;
  --blue-card: #153a66;
  --on-blue-2: #c4d6ec;
  --trace-on-blue: rgba(255, 255, 255, 0.26);
  --green-card: #1c4636;
  --on-green: #ffffff;
  --on-green-2: #c8dbd1;
  --art-b: #1a2c45;
  --art-c: #1b3229;
  --pm: #7fa9ee; --ct: #5fc194; --gn: #d39160; --fd: #b08fdd; --kb: #b9b8b2;
  --ok: #62c798; --ok-soft: #1c3d30; --warn: #e7ab5c; --warn-soft: #43321a;
  --mark: rgba(106, 170, 242, 0.24);
}

/* Without script the page follows the system's scheme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #17181c; --field: #26282e; --panel: #1f2126; --raise: #3a3c44; --chip: #32343b;
    --ink: #ffffff; --ink-2: #cdccc6; --ink-3: #a1a09a; --tone: #8fb3e0;
    --accent-ink: #6aaaf2; --accent-soft: #1d3a5e; --trace: rgba(106, 170, 242, 0.5);
    --frag: #17181c; --frag-2: #212329; --frag-line: rgba(255, 255, 255, 0.15);
    --head-bg: #ece9e2; --head-ink: #17181c; --head-ink-2: #5d5f66;
    --blue-card: #153a66; --on-blue-2: #c4d6ec; --trace-on-blue: rgba(255, 255, 255, 0.26);
    --green-card: #1c4636; --on-green: #ffffff; --on-green-2: #c8dbd1; --art-b: #1a2c45; --art-c: #1b3229;
    --pm: #7fa9ee; --ct: #5fc194; --gn: #d39160; --fd: #b08fdd; --kb: #b9b8b2;
    --ok: #62c798; --ok-soft: #1c3d30; --warn: #e7ab5c; --warn-soft: #43321a; --mark: rgba(106, 170, 242, 0.24);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 var(--fs-body) / 1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: 500; color: var(--ink); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--pad-nav); top: -60px; z-index: 30; padding: 10px 14px; border-radius: 4px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 12px; }

.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--pad); }
main > section { padding-top: var(--gap); }

/* The label face: navigation, buttons, chips, fragment headers, identifiers (the reference's voice, and the app's) */
.eyebrow, .btn, .nav-links a, .menu a, .chips li, .dcard-head, .gnode, .gtag, .rail-tab, .rail-pause, .sources-label, .layer-k, .layer-link, .ctx-list, .cite, .scard-k, .state-v, .demo-k, .demo-examples button, .src-list li, .reftable th, .reftable td:nth-child(-n+2), .verify-k, .crumb, .field > span, .mail-k, .foot-k, .terms-label, .demo h4, code { font-family: var(--label); } /* taste-skill-ignore: see --label */

h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1, h2, .panel-copy h3, .bigcard-copy h3 { font-family: var(--serif); font-weight: 350; letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
.tone { color: var(--tone); }
.lead { font-size: var(--fs-lead); line-height: 1.45; text-wrap: pretty; }
.note { font-size: var(--fs-label); line-height: 1.45; color: var(--ink-3); }

.eyebrow { margin-bottom: 22px; font-size: var(--fs-label); line-height: 1.25; text-transform: uppercase; color: var(--ink); } /* taste-skill-ignore: the reference's label above a title */

.head { max-width: 780px; margin-inline: auto; text-align: center; }
.head .lead { max-width: 34em; margin: 22px auto 0; }

/* the traces: the name's own motif, a question's path drawn as thin arcs */
.traces { position: absolute; z-index: -1; pointer-events: none; overflow: visible; }
.traces circle { fill: none; stroke: var(--trace); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 40px; padding: 7px 7px 7px 12px;
  border: 0; border-radius: 4px; background: transparent; color: var(--ink);
  font-size: var(--fs-label); line-height: 1.2; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.btn--primary { background: var(--raise); }
.btn--text { padding-left: 0; }
.btn-box { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 3px; background: var(--raise); color: var(--ink); }
.btn--primary .btn-box { background: var(--accent); color: #fff; }
.btn-box svg { transition: transform var(--t-ui) var(--ease-out); }
.btn:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--chip); }
  .btn:hover .btn-box svg { transform: translateX(2px); }
}

/* ---------- navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--nav-h); padding-inline: var(--pad-nav);
  background: var(--field);
}
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; color: var(--ink); text-decoration: none; font: 500 1.5rem/1 var(--serif); letter-spacing: -0.015em; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a, .menu a:not(.btn) { color: var(--ink); font-size: var(--fs-label); text-transform: uppercase; text-decoration: none; }
.nav-links a { padding: 8px 0; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.4em; transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { text-decoration-color: currentColor; } }
.nav-end { display: flex; align-items: center; gap: 16px; justify-self: end; }
.burger { display: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 4px; background: transparent; }
.burger-bars, .burger-bars::before, .burger-bars::after { display: block; width: 24px; height: 2px; margin-inline: auto; border-radius: 2px; background: var(--ink); content: ""; transition: transform var(--t-ui) var(--ease-out); }
.burger-bars::before { transform: translateY(-7px); }
.burger-bars::after { transform: translateY(5px); }
.burger[aria-expanded="true"] .burger-bars { background: transparent; }
.burger[aria-expanded="true"] .burger-bars::before { transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger-bars::after { transform: translateY(-2px) rotate(-45deg); }
.menu { position: absolute; inset: var(--nav-h) 0 auto; display: grid; align-content: start; gap: 4px; min-height: calc(100dvh - var(--nav-h)); padding: 12px var(--pad-nav) 28px; background: var(--field); }
.menu[hidden] { display: none; }
.menu a:not(.btn) { padding: 14px 0; }
.menu .btn { justify-self: start; margin-top: 12px; }

.theme { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; flex: none; width: 72px; height: 30px; padding: 2px; border: 0; border-radius: 999px; background: var(--raise); color: var(--ink); }
.theme::before { content: ""; position: absolute; top: 2px; left: 2px; width: 34px; height: 26px; border-radius: 999px; background: var(--bg); transition: transform var(--t-ui) var(--ease-out); }
[data-theme="dark"] .theme::before { transform: translateX(34px); }
.theme-opt { position: relative; display: grid; place-items: center; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: clip; padding: calc(var(--nav-h) + clamp(36px, 5vw, 66px)) var(--pad) 44px; background: var(--field); }
main > .hero { padding-top: calc(var(--nav-h) + clamp(36px, 5vw, 66px)); }
.traces--hero { inset: 0; width: 100%; height: 100%; }
.hero-copy { max-width: 800px; margin-inline: auto; text-align: center; }
.hero .lead { max-width: 33em; margin: 24px auto 0; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* ---------- the stage: one question in four steps ---------- */
.stage { max-width: 1040px; margin: clamp(32px, 4.2vw, 60px) auto 0; }
.stage-view { display: grid; gap: 28px; align-items: center; }
.js .stage-view { min-height: 468px; }
.js .step { grid-area: 1 / 1; }
.js .step:not(.is-on) { display: none; }

[data-fam="pm"] { --fam: var(--pm); }
[data-fam="ct"] { --fam: var(--ct); }
[data-fam="gn"] { --fam: var(--gn); }
[data-fam="fd"] { --fam: var(--fd); }
[data-fam="kb"] { --fam: var(--kb); }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--fam, var(--accent-ink)); }

.dcard { overflow: hidden; border-radius: var(--r); background: var(--frag); }
[data-ui].dcard, [data-ui].reftable, [data-ui].request { border: 1px solid var(--frag-line); }
.dcard-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--head-bg); color: var(--head-ink); font-size: var(--fs-micro); line-height: 1.3; text-transform: uppercase; }
.dcard-head .dot { background: var(--fam, var(--accent)); }
.dcard-meta { margin-left: auto; color: var(--head-ink-2); }
.dcard-body { display: grid; gap: 12px; padding: 18px 18px 20px; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 3px 7px; border-radius: 2px; background: var(--chip); color: var(--ink-2); font-size: var(--fs-micro); line-height: 1.35; text-transform: uppercase; }
.chips .chip--on { background: var(--accent); color: #fff; }
.chips .chip--warn { background: var(--warn-soft); color: var(--warn); }
.chips--terms li { padding: 5px 9px; border-radius: 3px; background: var(--accent-soft); color: var(--ink); text-transform: none; }

.cite { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 3px; background: var(--chip); color: var(--ink); font-size: var(--fs-micro); line-height: 1.5; white-space: nowrap; vertical-align: 0.06em; }
.cite--ok { background: var(--ok-soft); color: var(--ok); }
.cites { display: flex; flex-wrap: wrap; gap: 8px; }
.cites .cite { padding: 3px 8px; }

/* step 1 · the question and the words that leave */
.step--question { position: relative; display: grid; justify-items: center; align-content: center; gap: 30px; padding-block: 34px; }
.dots { position: absolute; inset: 0; z-index: -1; }
.dots span { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--fam, var(--ink-3)); opacity: var(--o, 0.7); }
.qcard { width: min(100%, 580px); }
.qcard-text { padding: 18px 18px 20px; font-size: var(--fs-body); line-height: 1.45; color: var(--ink); }
mark { padding: 1px 4px; border-radius: 3px; background: var(--mark); color: inherit; }
.terms { display: grid; justify-items: center; gap: 12px; }
.terms-label { font-size: var(--fs-micro); text-transform: uppercase; color: var(--ink-2); }
.terms .chips { justify-content: center; max-width: 780px; }
.chips--terms li { font-size: var(--fs-label); }

/* step 2 · the search, drawn as a graph */
.graph { position: relative; height: 440px; max-width: 940px; margin-inline: auto; }
.graph-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.graph-lines line { stroke: var(--ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.js .graph-lines line { vector-effect: none; } /* script lays the lines out in pixels */
.gnode { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 6px; background: var(--bg); color: var(--ink); font-size: var(--fs-label); line-height: 1.2; text-transform: uppercase; white-space: nowrap; }
.gnode--core { flex-direction: column; gap: 4px; padding: 14px 20px; background: var(--head-bg); color: var(--head-ink); text-align: center; }
.gnode-v { color: var(--head-ink-2); font-size: var(--fs-micro); }
.gnode-n { margin-left: 2px; color: var(--ink-3); }
.gnode--empty { color: var(--ink-3); }
.gnode--empty .dot { border: 2px solid var(--fam); background: none; }
.gtag { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); padding: 2px 7px; border-radius: 2px; background: var(--field); color: var(--fam, var(--ink)); font-size: var(--fs-micro); line-height: 1.4; white-space: nowrap; }

/* step 3 · the context on the Mac, and the synthesis being written */
.step--synth { display: grid; grid-template-columns: minmax(0, 390px) 84px minmax(0, 450px); justify-content: center; align-items: center; }
.ctx-list { display: grid; gap: 2px; padding: 10px; font-size: var(--fs-micro); line-height: 1.3; color: var(--ink-2); }
.ctx-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; }
.ctx-list .is-read { background: var(--accent-soft); color: var(--ink); }
.synth-link { position: relative; height: 20px; margin-inline: 8px; }
.synth-link svg { width: 100%; height: 100%; }
.synth-link line { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.synth-link::before, .synth-link::after { content: ""; position: absolute; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.synth-link::before { left: -3px; }
.synth-link::after { right: -3px; }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; border-radius: 1px; background: var(--accent-ink); vertical-align: -0.16em; }

/* step 4 · the citations, checked */
.dcard--verify { width: min(100%, 620px); margin-inline: auto; }
.verify-k { font-size: var(--fs-micro); line-height: 1.3; text-transform: uppercase; color: var(--ink-3); }
.verify-note { margin-top: 6px; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }

/* the rail under the stage */
.rail { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 28px; max-width: 760px; margin: 32px auto 0; }
.js .stage:not(.is-ready) .rail, html:not(.js) .rail { display: none; }
.rail-tabs { display: grid; grid-template-columns: repeat(4, 1fr); }
.rail-tab, .rail-pause { justify-self: start; min-height: 40px; padding: 8px 12px 8px 0; border: 0; background: none; color: var(--ink-3); font-size: var(--fs-micro); line-height: 1.2; text-transform: uppercase; text-align: left; transition: color var(--t-hover) ease; }
.rail-tab[aria-selected="true"] { color: var(--ink); }
.rail-pause { grid-row: 1 / span 2; grid-column: 2; align-self: center; padding: 8px 12px; border-radius: 4px; background: var(--raise); color: var(--ink); transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.rail-track { position: relative; grid-column: 1; height: 8px; }
.rail-track svg { position: absolute; inset: 3px 0 auto; width: 100%; height: 2px; }
.rail-track line { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.rail-dot { position: absolute; inset: 0 8px 0 0; }
.rail-dot::before { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
@media (hover: hover) and (pointer: fine) { .rail-tab:hover { color: var(--ink); } }
.stage-note { max-width: 34em; min-height: 3em; margin: 16px auto 0; font-size: var(--fs-small); text-align: center; color: var(--ink-2); }
html:not(.js) .stage-note, html:not(.js) .demo-examples { display: none; }

/* ---------- sources ---------- */
main > .sources { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(28px, 6vw, 96px); max-width: 1440px; margin-inline: auto; padding: 46px var(--pad) 0; }
.sources-label { font-size: var(--fs-label); font-weight: 400; line-height: 1.35; text-transform: uppercase; letter-spacing: 0; color: var(--ink); }
.marquee { display: flex; overflow: hidden; }
.marquee-track { display: flex; flex: none; gap: 56px; padding-right: 56px; }
.marquee-track li { font: 400 var(--fs-h3)/1.2 var(--serif); letter-spacing: -0.01em; color: var(--ink-3); white-space: nowrap; }

/* ---------- pillars ---------- */
.pillars-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.pillar { position: relative; isolation: isolate; overflow: clip; min-height: 150px; padding: 28px 24px 30px; border-radius: var(--r); background: var(--panel); }
.pillar h3 { margin-bottom: 18px; font: 500 1.25rem/1.2 var(--sans); }
.pillar p { max-width: 27em; font-size: var(--fs-small); }
.pillar .traces { right: 0; top: 0; width: 220px; height: 150px; }
.pillar--blue { background: var(--blue-card); color: var(--on-blue-2); }
.pillar--blue h3 { color: var(--on-blue); }
.pillar--blue .traces circle { stroke: var(--trace-on-blue); }
.pillar--green { background: var(--green-card); color: var(--on-green-2); }
.pillar--green h3 { color: var(--on-green); }

/* ---------- pieces: one answer, piece by piece ---------- */
.pieces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.piece { display: flex; flex-direction: column; overflow: clip; border-radius: var(--r); background: var(--panel); }
.piece-media { position: relative; overflow: clip; aspect-ratio: 3 / 2; background: #0d1d36; }
.piece-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.piece-media::after { content: ""; position: absolute; inset: 0; background: rgba(12, 13, 16, 0.5); }
.piece-media--plain::after { background: rgba(12, 13, 16, 0.14); }
.piece-media--plain .fig-l { max-width: 11em; }
.piece-media figcaption { position: absolute; inset: auto 24px 20px; z-index: 1; display: grid; gap: 8px; color: #fff; }
.fig-n { font: 350 var(--fs-h2)/1 var(--serif); letter-spacing: -0.02em; }
.fig-n small { font-size: var(--fs-lead); letter-spacing: -0.01em; }
.fig-l { font-size: var(--fs-small); line-height: 1.3; }
.piece-body { display: grid; align-content: start; gap: 12px; padding: 24px 24px 28px; }
.piece-body h3 { font: 500 1.25rem/1.25 var(--sans); }
.piece-sub { margin-top: -8px; font-size: var(--fs-label); color: var(--ink-3); }
.piece-body > p:last-child { margin-top: 4px; font-size: var(--fs-small); }
@media (hover: hover) and (pointer: fine) { .piece:hover .piece-media img { transform: scale(1.03); } }

/* ---------- how it works ---------- */
.layers { display: grid; grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr) 104px minmax(0, 1fr); align-items: center; margin-top: 64px; }
.layer { display: grid; gap: 4px; justify-items: center; padding: 20px 18px 22px; border-radius: var(--r); background: var(--panel); text-align: center; }
.layer--on { background: var(--field); }
.layer-k { font-size: var(--fs-micro); text-transform: uppercase; color: var(--ink-3); }
.layer-v { font: 500 1.25rem/1.25 var(--sans); color: var(--ink); }
.layer-s { font-size: var(--fs-label); color: var(--ink-3); }
.layer-link { display: grid; gap: 5px; justify-items: center; padding-inline: 10px; font-size: var(--fs-micro); line-height: 1.2; text-transform: uppercase; color: var(--ink-3); }
.layer-link svg { width: 100%; height: 12px; }
.layer-link line { stroke: var(--accent-ink); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }

.tabs { display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 72px auto 0; padding: 6px; border-radius: 10px; background: var(--panel); }
.tab { padding: 14px 18px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: var(--fs-body); line-height: 1.2; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.tab[aria-selected="true"] { background: var(--bg); color: var(--ink); }
[data-theme="dark"] .tab[aria-selected="true"] { background: var(--raise); }
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--ink); } }

.panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); margin-top: 32px; }
.js .panel:not(.is-on) { display: none; }
html:not(.js) .tabs { display: none; }
html:not(.js) .panel + .panel { margin-top: 72px; }
.panel-copy { display: flex; flex-direction: column; gap: 14px; padding: 40px 0 8px; }
.panel-copy h3 { margin-bottom: 8px; font-size: var(--fs-h3); }
.panel-copy p { max-width: 30em; }
.panel-name { margin-top: 6px; font-weight: 500; color: var(--ink); }
.ticks { display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; background: var(--accent-ink); }
.panel-copy .btn { align-self: flex-start; margin-top: auto; }
.panel-copy .ticks + p { margin-bottom: 28px; }
.panel-art { display: grid; place-items: center; min-height: 540px; padding: clamp(20px, 3.4vw, 48px); border-radius: var(--r); background: var(--field); }
.panel-art--b { background: var(--art-b); }
.panel-art--c { background: var(--art-c); }
.art { display: grid; justify-items: center; width: min(100%, 520px); }
.art > .dcard { width: 100%; }
.art--check > .dcard { width: min(100%, 420px); }
.art-text { padding: 14px 16px 16px; font-size: var(--fs-small); line-height: 1.5; color: var(--ink); }
.art-lines { width: 100%; height: 64px; }
.art-lines path { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.art-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; align-items: start; }
.art-code { display: block; padding: 12px 14px 14px; font-size: var(--fs-micro); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.art-trio { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; width: 100%; }
.scard { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: center; padding: 12px; border-radius: 6px; background: var(--frag); }
.scard-k { font-size: var(--fs-micro); line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.scard-v { grid-column: 2; font-size: var(--fs-label); line-height: 1.3; color: var(--ink-3); }
.states { display: grid; gap: 2px; padding: 8px; }
.state { display: grid; gap: 2px; padding: 9px 10px; border-radius: 4px; }
.state-k { font-size: 0.9375rem; line-height: 1.3; }
.state-v { font-size: var(--fs-micro); color: var(--ink-3); }
.state--ok { background: var(--ok-soft); }
.state--ok .state-k { color: var(--ok); }

/* ---------- try it ---------- */
.bigcard { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); max-width: 1160px; margin: 56px auto 0; padding: clamp(20px, 3vw, 40px); border-radius: var(--r); background: var(--field); }
.bigcard + .bigcard { margin-top: 20px; }
.bigcard--alt { background: var(--panel); }
.bigcard-copy { display: grid; align-content: start; gap: 16px; padding-top: 8px; }
.bigcard-copy h3 { font-size: var(--fs-h3); }

.demo, .reftable { overflow: hidden; border-radius: var(--r); background: var(--frag); }
.demo { align-self: start; }
.demo textarea { display: block; width: 100%; min-height: 96px; padding: 16px 16px 8px; border: 0; background: transparent; color: var(--ink); font-size: var(--fs-body); line-height: 1.45; resize: none; }
.demo textarea:focus-visible { outline-offset: -3px; }
.demo-examples { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 16px; }
.demo-examples button { min-height: 32px; padding: 5px 10px; border: 0; border-radius: 3px; background: var(--chip); color: var(--ink-2); font-size: var(--fs-micro); line-height: 1.3; text-transform: uppercase; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.demo-examples button[aria-pressed="true"] { background: var(--head-bg); color: var(--head-ink); }
.demo-examples button:active, .tab:active, .rail-pause:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .demo-examples button:not([aria-pressed="true"]):hover { background: var(--raise); color: var(--ink); }
  .rail-pause:hover { background: var(--chip); }
}
.demo-out { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.demo-col { display: grid; align-content: start; gap: 10px; padding: 18px 16px 22px; }
.demo-col--stay { background: var(--frag-2); }
.demo h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: var(--fs-micro); font-weight: 500; line-height: 1.3; text-transform: uppercase; color: var(--ink); }
.demo h4::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); }
.demo-col--stay h4::before { background: var(--ok); }
.demo-k { margin-top: 8px; font-size: var(--fs-micro); line-height: 1.3; text-transform: uppercase; color: var(--ink-3); }
#demo-requests { display: grid; gap: 10px; }
#demo-requests[hidden] { display: none; }
.demo code { display: block; padding: 10px 12px; border-radius: 4px; background: var(--frag-2); color: var(--ink); font-size: var(--fs-micro); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.src-list { display: flex; flex-wrap: wrap; gap: 5px; }
.src-list li { padding: 3px 7px; border-radius: 2px; background: var(--frag-2); color: var(--ink-3); font-size: var(--fs-micro); line-height: 1.35; }
.src-list .is-on { background: var(--accent-soft); color: var(--ink); }
.demo-empty { padding: 12px; border-radius: 4px; background: var(--ok-soft); color: var(--ok); font-size: 0.9375rem; }
.demo-stay { font-size: 1rem; line-height: 1.6; color: var(--ink); }
.demo-legend { font-size: 0.875rem; line-height: 1.45; color: var(--ink-3); }
.demo-keeps { display: grid; gap: 6px; font-size: 0.9375rem; color: var(--ink-2); }
.demo-keeps li { position: relative; padding-left: 16px; }
.demo-keeps li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; background: var(--ok); }

.reftable { align-self: start; }
.reftable table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.35; color: var(--ink-2); }
.reftable th { padding: 12px 14px 8px; font-size: var(--fs-micro); font-weight: 400; text-align: left; text-transform: uppercase; color: var(--ink-3); }
.reftable td { padding: 9px 14px; border-top: 1px solid var(--frag-line); vertical-align: top; }
.reftable td:nth-child(-n+2) { font-size: var(--fs-micro); line-height: 1.55; white-space: nowrap; }
.reftable td:first-child { text-transform: uppercase; color: var(--ink-3); }
.reftable td:first-child .dot { display: inline-block; margin-right: 9px; }
.reftable td:nth-child(2) { color: var(--ink); }
.reftable-disclaimer { padding: 14px; background: var(--frag-2); font-size: 0.875rem; line-height: 1.45; color: var(--ink-3); }
@media (min-width: 1101px) { .bigcard--alt .bigcard-copy { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; } }

/* ---------- in production ---------- */
.field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 56px; }
.statement { position: relative; isolation: isolate; overflow: clip; grid-row: span 2; display: flex; flex-direction: column; gap: 1.1em; min-height: 520px; padding: clamp(24px, 3vw, 40px); border-radius: var(--r); background: var(--blue-card); color: var(--on-blue); font: 350 var(--fs-h3)/1.22 var(--serif); letter-spacing: -0.015em; }
.statement p { max-width: 17em; text-wrap: pretty; }
.statement .statement-by { margin-top: auto; padding-top: 48px; font: 400 var(--fs-small)/1.4 var(--sans); letter-spacing: 0; color: var(--on-blue-2); }
.nb { white-space: nowrap; }
.statement .traces { inset: 0; width: 100%; height: 100%; }
.statement .traces circle { stroke: var(--trace-on-blue); }
.shutter { overflow: clip; border-radius: var(--r); background: var(--panel); }
.field-photo .shutter { aspect-ratio: 7 / 4; }
.field-photo img { width: 100%; height: 100%; object-fit: cover; }
figcaption { font-size: var(--fs-label); line-height: 1.45; color: var(--ink-3); }
.field-photo figcaption, .faq-media figcaption { margin-top: 10px; max-width: 46em; }
.measures { display: grid; align-content: center; padding: clamp(24px, 3vw, 40px); border-radius: var(--r); background: var(--panel); }
.measures dl { display: grid; gap: 20px; }
.measures dt { font: 350 var(--fs-h3)/1.1 var(--serif); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.measures dd { margin-top: 6px; max-width: 34em; font-size: var(--fs-small); }

/* ---------- security ---------- */
.split-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split-head .lead { max-width: 30em; margin-bottom: 26px; color: var(--ink); }
.guards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto auto auto; gap: 12px clamp(20px, 2.4vw, 36px); margin-top: 72px; }
.guard { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; min-width: 0; }
.guard h3 { margin-top: 10px; font: 500 1.25rem/1.25 var(--sans); }
.guard > p { font-size: var(--fs-small); }
.crumb { display: grid; align-content: start; padding: 4px 14px; border-radius: 6px; background: var(--panel); font-size: var(--fs-micro); line-height: 1.4; color: var(--ink); }
.crumb p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 42px; padding-block: 8px; }
[data-ui].crumb p + p { border-top: 1px solid var(--frag-line); }
.crumb-k { flex: none; min-width: 4.4em; color: var(--ink-3); }
.crumb p > span:nth-child(2) { margin-right: auto; }
.crumb p > .crumb-btn { margin-inline: auto 0; }
.crumb .crumb-stack { display: grid; gap: 2px; }
.crumb-stack > span:nth-child(2) { overflow-wrap: anywhere; }
[data-ui] .crumb-btn { flex: none; padding: 4px 9px; border: 1px solid var(--frag-line); border-radius: 4px; background: var(--bg); white-space: nowrap; }
[data-ui] .crumb-btn--danger { color: var(--warn); }
.crumb-tag { padding: 2px 7px; border-radius: 2px; background: var(--ok-soft); color: var(--ok); }
[data-ui] .crumb-radio, [data-ui] .crumb-box { flex: none; width: 16px; height: 16px; border: 1px solid var(--ink-3); background: var(--bg); }
[data-ui] .crumb-radio { border-radius: 50%; }
[data-ui] .crumb-radio--on { border: 5px solid var(--accent-ink); }
[data-ui] .crumb-box { align-self: start; margin-top: 2px; border-radius: 3px; }
.crumb .crumb-check { flex-wrap: nowrap; align-items: start; }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.faq-aside { display: grid; gap: 40px; }
.faq-media { max-width: 440px; }
.faq-media video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); background: #2b2c2a; }
.clip-toggle { padding: 0; border: 0; background: none; color: var(--ink-2); text-decoration: underline; text-underline-offset: 0.2em; }
.faq-list { display: grid; gap: 8px; }
.faq-list details { border-radius: var(--r); background: var(--panel); transition: background-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .faq-list details:not([open]):hover { background: var(--field); }
  .mode:not(:has(input:checked)):hover { background: var(--raise); }
  .theme:hover { background: var(--chip); }
}
.faq-list summary { position: relative; padding: 20px 60px 20px 24px; font: 500 1.25rem/1.3 var(--sans); color: var(--ink); cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 14px; height: 2px; margin-top: -1px; border-radius: 1px; background: var(--ink); transition: transform var(--t-ui) var(--ease-out); }
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }
.faq-list details p { max-width: 58ch; padding: 0 24px 24px; }

/* ---------- access ---------- */
.access-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 40px; }
.request { overflow: hidden; border-radius: var(--r); background: var(--panel); }
.request-body { display: grid; gap: 20px; padding: clamp(18px, 2.4vw, 28px); }
.field { display: grid; gap: 8px; }
.field > span { font-size: var(--fs-micro); text-transform: uppercase; color: var(--ink-3); }
.field input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--frag-line); border-radius: 4px; background: var(--bg); color: var(--ink); font-size: var(--fs-body); }
.field input::placeholder { color: var(--ink-3); opacity: 1; }
.mail { display: grid; gap: 8px; padding: 14px; border-radius: 4px; background: var(--bg); font-size: 0.9375rem; line-height: 1.45; color: var(--ink); }
.mail p { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
.mail-k { font-size: var(--fs-micro); line-height: 1.7; text-transform: uppercase; color: var(--ink-3); }
.request-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.modes { display: contents; }
.mode { position: relative; isolation: isolate; overflow: clip; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 300px; padding: 24px; border-radius: var(--r); background: var(--field); color: var(--ink-2); cursor: pointer; transition: background-color var(--t-ui) ease, color var(--t-ui) ease; }
.mode .traces { inset: 0; width: 100%; height: 100%; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode-mark { position: absolute; left: 24px; top: 24px; width: 20px; height: 20px; border-radius: 50%; background: var(--raise); }
.mode-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; opacity: 0; transform: scale(0.5); transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui) ease; }
.mode-name { font: 500 1.25rem/1.25 var(--sans); color: var(--ink); }
.mode-text { font-size: var(--fs-small); line-height: 1.45; }
.mode:has(input:checked) { background: var(--blue-card); color: var(--on-blue-2); }
.mode:has(input:checked) .mode-name { color: var(--on-blue); }
.mode:has(input:checked) .mode-mark { background: var(--accent-ink); }
[data-theme="light"] .mode:has(input:checked) .mode-mark { background: #1a3f73; }
.mode:has(input:checked) .mode-mark::after { opacity: 1; transform: scale(1); }
.mode:has(input:checked) .traces circle { stroke: var(--trace-on-blue); }
.mode:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 3px; }

/* ---------- close ---------- */
main > .close { padding: var(--gap) var(--pad-nav) 0; }
.close-panel { position: relative; isolation: isolate; overflow: clip; display: grid; align-items: end; max-width: 1520px; min-height: clamp(460px, 44vw, 640px); margin-inline: auto; padding: clamp(28px, 4.4vw, 64px) calc(var(--pad) - var(--pad-nav)); border-radius: 10px; background: var(--field); }
.close-art { position: absolute; z-index: -1; right: -5%; top: 50%; width: min(51%, 760px); transform: translateY(-50%); }
.close-art img { width: 100%; }
.close-copy h2 { font-size: var(--fs-h1); }
.close-copy .btn { margin-top: 30px; }

/* ---------- footer ---------- */
.foot { padding-top: var(--gap); padding-bottom: 40px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.foot-line { font: 350 var(--fs-h3)/1.15 var(--serif); letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.foot-mid { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 0.34fr)); gap: 20px; margin-top: 72px; }
.foot-k { margin-bottom: 20px; font-size: var(--fs-label); text-transform: uppercase; color: var(--ink); }
.foot-col { display: grid; align-content: start; gap: 4px; }
.foot-col a, .foot-col p:not(.foot-k) { color: var(--ink-2); text-decoration: none; }
.foot-col a, .foot-mail { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; transition: text-decoration-color var(--t-hover) ease; }
.foot-mail { font-size: var(--fs-lead); line-height: 1.3; color: var(--ink); }
.foot-note { margin-top: 10px; font-size: var(--fs-label); color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) { .foot-col a:hover, .foot-mail:hover, .foot-credits a:hover { text-decoration-color: currentColor; } }
.foot-disclaimer { max-width: 68ch; margin-top: 80px; font-size: var(--fs-label); line-height: 1.5; color: var(--ink-3); }
.foot-company { max-width: 104ch; margin-top: 28px; font-size: var(--fs-micro); line-height: 1.5; color: var(--ink-3); }
.foot-company a { text-decoration: underline; text-underline-offset: 0.2em; }
.foot-end { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 40px; align-items: start; margin-top: 20px; }
.foot-legal { font-size: 0.875rem; color: var(--ink-3); white-space: nowrap; }
.foot-credits { max-width: 76ch; font-size: var(--fs-micro); line-height: 1.5; color: var(--ink-3); }
.foot-credits a { text-decoration-color: transparent; text-underline-offset: 0.2em; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes step-in { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; scale: 0.94; } }
@keyframes chip-in { from { opacity: 0; translate: 0 8px; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mark-in { from { background-color: transparent; } }
@keyframes drift { from { translate: var(--dx) var(--dy); opacity: 0; } 20% { opacity: var(--o, 0.7); } to { translate: 0 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes turn { from { background-color: var(--chip); color: var(--ink); text-decoration-color: transparent; } }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes open { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes settle { from { transform: scale(1.1); } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .marquee-track { animation: marquee 52s linear infinite; }
  .marquee:hover .marquee-track, .marquee.is-off .marquee-track, .is-still .marquee-track { animation-play-state: paused; }

  /* the first screen settles within a second; the title is there from the first frame */
  .js .hero [data-load] { animation: rise 600ms var(--ease-out) both; animation-delay: calc(80ms + var(--d, 0ms)); }

  /* the stage: each step plays once when it comes on */
  .js .step.is-on { animation: step-in 420ms ease both; }
  .js .step.is-on .dots span { animation: drift 5.6s var(--ease-out) both; animation-delay: var(--t, 0ms); }
  .js .step.is-on .qcard mark { animation: mark-in 500ms ease both; animation-delay: calc(500ms + var(--i) * 260ms); }
  .js .step.is-on .chips--terms li { animation: chip-in 500ms var(--ease-out) both; animation-delay: calc(760ms + var(--i) * 260ms); }
  .js .step.is-on .graph-lines line { stroke-dasharray: 1; animation: draw 700ms var(--ease-out) both; animation-delay: calc(250ms + var(--i) * 140ms); }
  .js .step.is-on .gnode:not(.gnode--core), .js .step.is-on .gtag { animation: pop 460ms var(--ease-out) both; animation-delay: calc(700ms + var(--i) * 140ms); }
  .js .step.is-on .gtag { animation-delay: calc(1700ms + var(--i) * 260ms); }
  .js .step.is-on .ctx-list li { animation: chip-in 420ms var(--ease-out) both; animation-delay: calc(150ms + var(--i) * 80ms); }
  .js .step.is-on .synth-link { animation: step-in 500ms ease 900ms both; }
  .js .step.is-on .dcard--out p { animation: chip-in 600ms var(--ease-out) both; animation-delay: calc(1300ms + var(--i) * 1300ms); }
  .js .step.is-on .caret { animation: blink 900ms steps(1) 3200ms 4; }
  .js .step.is-on .cite--ok { animation: turn 420ms ease both; animation-delay: calc(700ms + var(--i) * 300ms); }
  .js .step.is-on .cite svg { animation: pop 300ms var(--ease-out) both; animation-delay: calc(850ms + var(--i) * 300ms); }
  .js .step.is-on .verify-note { animation: chip-in 500ms var(--ease-out) both; animation-delay: calc(700ms + var(--i) * 300ms); }

  /* sections: the parts arrive in reading order, once */
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 560ms var(--ease-out), transform 760ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .piece[data-reveal] .piece-media img { transform: scale(1.08); }
  .js .piece[data-reveal].is-in .piece-media img { transform: none; }
  .js .panel.is-on .panel-copy > *, .js .panel.is-on .panel-art { animation: chip-in 520ms var(--ease-out) both; }
  .js .panel.is-on .panel-copy > :nth-child(2) { animation-delay: 60ms; }
  .js .panel.is-on .panel-copy > :nth-child(n+3) { animation-delay: 120ms; }
  .js .panel.is-on .panel-art { animation-delay: 160ms; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 1100px) {
  /* long pages under a thumb: parts dim and rise, they are never invisible */
  .js [data-reveal] { opacity: 0.4; transform: translateY(14px); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 719px) {
  /* the synthesis card stands alone on a phone: it starts writing at once */
  .js .step.is-on .dcard--out p { animation-delay: calc(250ms + var(--i) * 1100ms); }
  .js .step.is-on .caret { animation-delay: 1900ms; }
}
@media (prefers-reduced-motion: no-preference) {

  /* the one opening picture: the ribbon */
  .js [data-shutter] .shut { clip-path: inset(0 0 100% 0); }
  .js [data-shutter].is-in .shut { animation: open 1200ms var(--ease-in-out) both; }
  .js [data-shutter].is-in img { animation: settle 1500ms var(--ease-expo) both; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { display: block; }
  .marquee-track { flex-wrap: wrap; gap: 6px 28px; padding: 0; }
  .marquee-track[aria-hidden] { display: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .burger { display: block; }
  .pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guard:nth-child(n+3) { margin-top: 36px; }
  .panel { grid-template-columns: minmax(0, 1fr); }
  .panel-copy { padding: 16px 0 0; }
  .panel-copy .btn { margin-top: 4px; }
  .panel-art { min-height: 0; }
  .bigcard { grid-template-columns: minmax(0, 1fr); }
  .access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request { grid-column: 1 / -1; }
  .mode { min-height: 220px; }
  .foot-mid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 48px; }
  .foot-contact { grid-column: 1 / -1; }
  .step--synth { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.15fr); }
  .dots { display: none; }
}

@media (max-width: 860px) {
  .pillars-row { grid-template-columns: minmax(0, 1fr); }
  .pillar { min-height: 0; }
  .layers { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .layer-link { grid-template-columns: auto 60px auto; align-items: center; justify-content: center; padding: 10px 0; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .statement { grid-row: auto; min-height: 0; }
  .gtag { display: none; }
  .split-head, .faq, .foot-top { grid-template-columns: minmax(0, 1fr); }
  .faq-aside { gap: 28px; }
  main > .sources { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .marquee { display: block; }
  .marquee-track { flex-wrap: wrap; gap: 6px 24px; padding: 0; animation: none; }
  .marquee-track[aria-hidden] { display: none; }
  .marquee-track li { font-size: var(--fs-lead); }
  .tabs { flex-direction: column; width: 100%; }
  .tab { text-align: left; }
  .close-panel { align-items: start; padding-top: 0; }
  .close-art { position: relative; right: auto; top: auto; width: min(100%, 520px); margin: 0 auto 8px; transform: none; }
  .foot-end { grid-template-columns: minmax(0, 1fr) auto; }
  .foot-credits { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- phone ---------- */
@media (max-width: 719px) {
  :root { --fs-body: 1.0625rem; --nav-h: 64px; }
  .nav-cta { display: none; }
  .btn { min-height: 44px; }
  .actions { flex-direction: column; align-items: center; }
  .stage { margin-top: 28px; }
  .js .stage-view { min-height: 404px; }
  .step--question { padding-block: 0; gap: 22px; }
  .dcard--ctx, .meta-more { display: none; }
  .graph { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; height: auto; }
  .graph-lines, .gtag { display: none; }
  .gnode { position: static; transform: none; white-space: normal; font-size: var(--fs-micro); }
  .gnode--core { grid-column: 1 / -1; margin-bottom: 14px; padding-block: 18px; }
  .step--synth { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .synth-link { display: none; }
  .rail { grid-template-columns: minmax(0, 1fr); }
  .rail-pause { grid-row: auto; grid-column: 1; justify-self: center; margin-top: 10px; }
  .rail-tab { padding-right: 4px; }
  .pieces { display: flex; gap: 12px; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none; }
  .pieces::-webkit-scrollbar { display: none; }
  .piece { flex: 0 0 84%; scroll-snap-align: start; }
  .guards { grid-template-columns: minmax(0, 1fr); }
  .guard + .guard { margin-top: 36px; }
  .art-pair, .art-trio, .demo-out { grid-template-columns: minmax(0, 1fr); }
  .art-lines { height: 40px; }
  .access-grid { grid-template-columns: minmax(0, 1fr); }
  .request { grid-column: auto; }
  .mode { min-height: 0; padding-top: 64px; }
  .reftable table, .reftable tbody, .reftable tr, .reftable td { display: block; }
  .reftable thead { display: none; }
  .reftable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 11px 14px; border-top: 1px solid var(--frag-line); }
  .reftable td { padding: 0; border: 0; }
  .reftable td:nth-child(2) { justify-self: end; }
  .reftable td:nth-child(3) { grid-column: 1 / -1; }
  .foot-mid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-end { grid-template-columns: minmax(0, 1fr); }
  .foot-end .theme { justify-self: start; }
  .faq-list summary { padding: 18px 52px 18px 18px; }
  .faq-list summary::before, .faq-list summary::after { right: 18px; }
  .faq-list details p { padding: 0 18px 20px; }
}
