/* ==========================================================================
   ScriptureLayer — styles.css
   Static site, no build step. Sections:
   1. Fonts   2. Tokens   3. Base   4. Layout & type   5. Controls
   6. Header & menu   7. Hero   8. Research preview   9. Who it's for
   10. Sources & review   11. How it works   12. Developers & API
   13. Roadmap   14. Vision   15. FAQ   16. Footer   17. Motion
   18. Responsive   19. Print
   ========================================================================== */

/* 1. Fonts — self-hosted (SIL Open Font License; see fonts/). If the fonts
   folder is missing, the fallback stacks below take over. */
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-roman.woff2") format("woff2");
  font-weight: 380 640;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 380 640;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens */
:root {
  --vellum: #f4f5f8;
  --paper: #ffffff;
  --paper-2: #fafbfd;
  --ink: #101826;
  --ink-2: #2a3445;
  --night: #0b1422;
  --navy-2: #16233a;
  --powder: #a8cfff;
  --powder-2: #c6dfff;
  --mist: #eaf1fc;
  --mist-2: #dce8fa;
  --lapis: #2451b3;
  --lapis-deep: #1b3f8f;
  --slate: #4b5668;
  --rule: #dde2ea;
  --rule-soft: #e8ecf2;
  --on-dark: #e8eef7;
  --on-dark-2: #c4cfde;
  --on-dark-muted: #a9b7cb;
  --line-dark: rgba(168, 207, 255, 0.16);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-3: clamp(1.625rem, 1.3rem + 1.1vw, 2.125rem);
  --step-4: clamp(2.125rem, 1.45rem + 2.5vw, 3.375rem);
  --step-hero: clamp(2.5rem, 1.55rem + 3.6vw, 4.5rem);

  --gutter: clamp(20px, 4vw, 48px);
  --container: 1200px;
  --header-h: 72px;
  --radius-xl: 28px;
  --radius-l: 20px;
  --radius-m: 12px;
  --shadow-window: 0 1px 2px rgba(16, 24, 38, 0.05), 0 28px 64px -28px rgba(16, 24, 38, 0.32);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --focus: var(--lapis);
}

/* 3. Base */
*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--vellum);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 500; }

a { color: inherit; }
button { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); }
svg { flex-shrink: 0; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
main:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* 4. Layout & type */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section { padding-block: clamp(84px, 10vw, 136px); }

.section-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-title {
  font-family: var(--serif);
  font-size: var(--step-4);
  line-height: 1.08;
  letter-spacing: -0.018em;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}

/* section-head-columns */
@media (min-width: 960px) {
  .section-head:not(.section-head--stack) {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: end;
    column-gap: 64px;
  }
}

.section-lede {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--slate);
  max-width: 60ch;
}

.section-head__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

/* 5. Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--small { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }

.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #1f2e48; }

.btn--powder { background: var(--powder); color: var(--ink); }
.btn--powder:hover { background: var(--powder-2); }

.btn--outline-light { border-color: rgba(232, 238, 247, 0.34); color: var(--on-dark); }
.btn--outline-light:hover { border-color: rgba(232, 238, 247, 0.6); background: rgba(232, 238, 247, 0.07); }

.btn--quiet { background: var(--paper); border-color: var(--rule); color: var(--ink); }
.btn--quiet:hover:not(:disabled) { border-color: var(--lapis); color: var(--lapis); }

.btn--text { background: transparent; color: var(--slate); padding-inline: 12px; }
.btn--text:hover:not(:disabled) { color: var(--lapis); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  justify-self: start;
}
.tag--prepared { background: var(--mist); border-color: #cddcf3; color: var(--lapis-deep); }
.tag--planned { border-color: #c9d1dd; color: var(--slate); }
.tag--now { background: var(--ink); color: #fff; }
.tag--next { background: var(--mist); border-color: #c4d6f2; color: var(--lapis-deep); }
.tag--later { border: 1px dashed #aab5c6; color: var(--slate); }
.tag--reviewed { background: var(--ink); color: #fff; }
.tag--on-dark { border-color: rgba(168, 207, 255, 0.36); background: rgba(168, 207, 255, 0.08); color: var(--powder); }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.chip-btn:hover { border-color: var(--lapis); color: var(--lapis); }
.chip-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-btn.is-done { border-color: var(--lapis); color: var(--lapis); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(168, 207, 255, 0.26);
  border-radius: 999px;
  background: transparent;
  color: var(--on-dark);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.copy-btn:hover { border-color: var(--powder); background: rgba(168, 207, 255, 0.08); }
.copy-btn.is-done { border-color: var(--powder); color: var(--powder); }

/* 6. Header & menu */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(244, 245, 248, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); background: rgba(244, 245, 248, 0.94); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--vellum); }
}

.site-header__inner {
  height: 100%;
  width: min(1280px, 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.brand__name {
  font-family: var(--serif);
  font-size: 1.4375rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1;
}
.brand__light { font-weight: 400; }

.site-nav { margin-left: auto; }
.site-nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--lapis); }
.site-nav a[aria-current="true"] { color: var(--ink); }
.site-nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--lapis);
}

.site-header__cta { margin-left: 6px; flex: none; }

.menu { display: none; position: relative; flex: none; }
.menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.menu__toggle::-webkit-details-marker { display: none; }
.menu__toggle::marker { content: ""; }
.menu__icon--close { display: none; }
.menu[open] .menu__icon--open { display: none; }
.menu[open] .menu__icon--close { display: block; }
.menu[open] .menu__toggle { border-color: var(--ink); }

.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(320px, calc(100vw - 2 * var(--gutter)));
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 28px 56px -20px rgba(16, 24, 38, 0.34);
}
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.menu__list a:hover { background: var(--mist); color: var(--lapis-deep); }
/* menu-current */
.menu__list a[aria-current="true"] { background: var(--mist); color: var(--lapis-deep); }

/* 7. Hero */
.hero { position: relative; }

.hero__panel {
  --focus: var(--powder);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 6px clamp(8px, 1.25vw, 20px) 0;
  border-radius: var(--radius-xl);
  color: var(--on-dark);
  background:
    radial-gradient(900px 540px at 92% 0%, rgba(58, 98, 176, 0.34), transparent 62%),
    radial-gradient(760px 520px at 0% 115%, rgba(36, 81, 179, 0.2), transparent 62%),
    linear-gradient(180deg, #111a2a 0%, #0c1424 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Ruled lines, like the lines of a manuscript page, fading in from the left */
.hero__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, rgba(168, 207, 255, 0.055) 0 1px, transparent 1px 34px);
  -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 62%, transparent 100%);
  mask-image: linear-gradient(100deg, transparent 18%, #000 62%, transparent 100%);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
  padding-block: clamp(56px, 7vw, 104px) clamp(128px, 12vw, 176px);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 15px 6px 12px;
  border: 1px solid rgba(168, 207, 255, 0.3);
  border-radius: 999px;
  background: rgba(168, 207, 255, 0.08);
  color: var(--powder);
  font-size: 0.875rem;
  font-weight: 500;
}
.status-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--powder);
  box-shadow: 0 0 0 4px rgba(168, 207, 255, 0.16);
}

.hero__title {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: var(--step-hero);
  line-height: 1.03;
  letter-spacing: -0.022em;
  font-weight: 460;
  color: #f6f8fc;
  text-wrap: balance;
}

.hero__line { display: block; }

.hero__lede {
  margin-top: 26px;
  max-width: 56ch;
  font-size: var(--step-1);
  line-height: 1.65;
  color: var(--on-dark-2);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__art { justify-self: end; width: 100%; max-width: 500px; }
.art { display: block; width: 100%; height: auto; overflow: visible; }
.hero__caption { margin-top: 16px; font-size: 0.875rem; color: var(--on-dark-muted); }

.art-q__text { font-family: var(--sans); font-size: 16px; font-weight: 500; fill: #e8eef7; }
.art-q__tag { font-family: var(--sans); font-size: 12.5px; font-weight: 600; fill: var(--powder); }
.art-head { font-family: var(--serif); font-size: 15px; font-weight: 600; fill: #4b5668; }
.art-drop { font-family: var(--serif); font-size: 70px; font-weight: 400; fill: #101826; }
.art-verse { font-family: var(--serif); font-size: 21px; font-weight: 400; fill: #101826; }
.art-verse--muted { fill: #687386; }
.art-vnum { font-family: var(--sans); font-size: 12px; font-weight: 600; fill: #2451b3; }
.art-sup { font-family: var(--serif); font-style: italic; font-size: 15px; font-weight: 480; fill: #2451b3; }
.art-pin { font-family: var(--serif); font-style: italic; font-size: 14.5px; font-weight: 480; fill: #fff; }
.art-ref { font-family: var(--sans); font-size: 14.5px; font-weight: 600; fill: #101826; }
.art-quote { font-family: var(--serif); font-size: 16px; font-weight: 400; fill: #1c2637; }

/* Workflow band — a real sequence, so it is numbered */
.steps {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: calc(-1 * clamp(72px, 8vw, 104px)) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(16, 24, 38, 0.06);
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: var(--shadow-window);
}
.step { position: relative; padding: 28px 28px 30px; }
.step + .step { border-left: 1px solid var(--rule-soft); }
.step + .step::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 40px;
  width: 11px;
  height: 11px;
  border-top: 1px solid #cfd6e1;
  border-right: 1px solid #cfd6e1;
  background: var(--paper);
  transform: rotate(45deg);
}
.step__num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--lapis);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1;
}
.step__title { margin-top: 14px; font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.step p { margin-top: 6px; font-size: 1rem; line-height: 1.55; color: var(--slate); }

/* 8. Research preview */
.section--preview { padding-top: clamp(80px, 9vw, 128px); }

.preview {
  overflow: hidden;
  border: 1px solid rgba(16, 24, 38, 0.08);
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: var(--shadow-window);
}

.preview__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--rule-soft);
}
.preview__app { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 0.9375rem; }
.preview__count { margin-left: auto; font-size: 0.875rem; color: var(--slate); }

.preview__notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #d4e2f6;
  background: var(--mist);
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.55;
}
.preview__notice strong { color: var(--ink); font-weight: 600; }
.preview__notice-icon { margin-top: 2px; color: var(--lapis); }

.preview__questions { padding: 20px 20px 22px; border-bottom: 1px solid var(--rule-soft); }
.preview__label { margin-bottom: 12px; font-size: 0.875rem; font-weight: 600; color: var(--slate); }

.question-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.question {
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 100%;
  padding: 15px 18px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.question:hover { border-color: #b4c3da; background: var(--paper-2); }
.question[aria-selected="true"] { border-color: var(--lapis); background: var(--mist); box-shadow: inset 0 0 0 1px var(--lapis); }
.question__title { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.question__topics { font-size: 0.875rem; color: var(--slate); }

.preview__body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.preview__main { min-width: 0; padding: clamp(22px, 3vw, 36px) clamp(20px, 3.2vw, 40px) clamp(28px, 3.4vw, 44px); }
.preview__rail {
  display: grid;
  align-content: start;
  gap: 30px;
  padding: 30px 24px;
  border-left: 1px solid var(--rule-soft);
  background: var(--paper-2);
}

.view-switch { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 20px; }
.view-switch__label { font-size: 0.875rem; font-weight: 500; color: var(--slate); }
.view-switch__group { display: inline-flex; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--vellum); }
.view-switch__btn {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--slate);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.view-switch__btn:hover { color: var(--ink); }
.view-switch__btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 38, 0.14); }

/* Without JavaScript every example is listed in turn */
.example + .example { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--rule); }
.preview.is-enhanced .example + .example { margin-top: 0; padding-top: 0; border-top: 0; }

.example__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule-soft);
}
.example__question { font-size: 1rem; font-weight: 500; color: var(--ink-2); }
.example__question-label {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--vellum);
  color: var(--slate);
  font-size: 0.8125rem;
  font-weight: 600;
}
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.topics li { padding: 2px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--slate); font-size: 0.8125rem; }

.example__kicker { font-size: 0.875rem; font-weight: 600; color: var(--lapis); }
.example__title {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.findings { max-width: 66ch; margin-top: 18px; font-size: 1.0625rem; line-height: 1.8; color: var(--ink-2); }
.finding {
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color 0.25s;
}
.finding.is-active { background: var(--mist-2); }

.marker {
  position: relative;
  display: inline-block;
  margin-left: 1px;
  padding: 0 2px;
  border-radius: 4px;
  color: var(--lapis);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 480;
  font-size: 0.86em;
  line-height: 1;
  vertical-align: super;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.marker::after { content: ""; position: absolute; inset: -11px -7px; }
.marker:hover,
.marker.is-linked { background: var(--mist-2); color: var(--lapis-deep); }
.marker--static::after { display: none; }

.guidance {
  display: flex;
  align-items: baseline;
  gap: 12px;
  max-width: 66ch;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--vellum);
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.6;
}
.guidance__label { flex: none; font-size: 0.8125rem; font-weight: 600; color: var(--slate); }

.passages__title { margin-top: 34px; font-family: var(--sans); font-size: 0.875rem; font-weight: 600; color: var(--slate); }
.passages { margin: 10px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }

.passage {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
  scroll-margin-top: calc(var(--header-h) + 48px);
}
.passage::before {
  content: "";
  position: absolute;
  inset: 0 -14px;
  z-index: 0;
  border-radius: 12px;
  background: var(--mist);
  opacity: 0;
  transition: opacity 0.45s;
}
.passage.is-linked::before,
.passage.is-flash::before { opacity: 1; }
.passage > * { position: relative; z-index: 1; }

.passage__marker {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  border: 1.5px solid var(--lapis);
  border-radius: 50%;
  background: var(--paper);
  color: var(--lapis);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1;
}
.passage__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 34px; }
.passage__ref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: var(--lapis);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
.passage__ref:hover { text-decoration: underline; text-underline-offset: 3px; }
.passage__actions { display: flex; flex-wrap: wrap; gap: 6px; }

.passage__text {
  max-width: 62ch;
  margin: 8px 0 8px;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--ink);
}
.passage__text p { margin: 0; }
.passage__context {
  justify-self: start;
  color: var(--slate);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-decoration-color: #b6c0cf;
  text-underline-offset: 3px;
}
.passage__context:hover { color: var(--lapis); text-decoration-color: currentColor; }

/* Structured data view */
.data-card { overflow: hidden; border-radius: 14px; background: var(--night); color: #dbe5f3; --focus: var(--powder); }
.data-card__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 52px;
  padding: 8px 10px 8px 18px;
  border-bottom: 1px solid var(--line-dark);
  color: var(--on-dark-2);
  font-size: 0.875rem;
  font-weight: 500;
}
.data-card pre,
.code pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
  color: #dfe7f3;
}
.data-card pre { max-height: 560px; }
.data-card__note {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line-dark);
  color: var(--on-dark-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.data-card__note code { color: var(--powder); font-size: 0.9em; }
.j-key { color: #a8cfff; }
.j-str { color: #e4ebf5; }
.j-lit { color: #f1cfa4; }

/* Rail */
.rail-block__title { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.rail-block > p { margin-top: 8px; color: var(--slate); font-size: 1rem; line-height: 1.6; }
/* rail-legend */
.rail-block > .rail-block__legend { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }

.notes__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notes__head .rail-block__title:focus { outline: none; }
.notes__count {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
}
.notes__count[data-zero] { background: var(--rule); color: var(--slate); }
.notes__list { display: grid; gap: 10px; max-height: 440px; margin: 14px 0 0; padding: 0; overflow: auto; list-style: none; }
.note-item {
  position: relative;
  padding: 12px 46px 13px 14px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
}
.note-item__ref { font-size: 0.875rem; font-weight: 600; color: var(--lapis); }
.note-item__text { margin-top: 3px; font-family: var(--serif); font-size: 1rem; line-height: 1.5; color: var(--ink); }
.note-item__remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
}
.note-item__remove:hover { background: var(--vellum); color: var(--ink); }
.notes__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.notes__fine { margin-top: 12px; color: var(--slate); font-size: 0.875rem; line-height: 1.55; }

.preview__principle { max-width: 62ch; margin-top: 28px; color: var(--slate); font-size: 1.0625rem; line-height: 1.6; }

/* 9. Who it's for */
.section--uses { background: var(--paper); }
.uses__header,
.use {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 270px;
  gap: 32px;
}
.uses__header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
  color: var(--slate);
  font-size: 0.8125rem;
  font-weight: 600;
}
.uses__list { margin: 0; padding: 0; list-style: none; }
.use { align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.use__who { font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.01em; }
.use__what { max-width: 60ch; color: var(--ink-2); }
.use__keep { padding-left: 14px; border-left: 2px solid var(--powder); color: var(--lapis-deep); font-size: 1rem; font-weight: 500; }

/* 10. Sources & review */
.sources {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.principles { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.principle {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.principle::before {
  content: "";
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  margin-top: 10px;
  border: 2px solid var(--lapis);
  border-radius: 50%;
}
.principle__title { font-family: var(--serif); font-size: 1.375rem; line-height: 1.3; }
.principle p { max-width: 56ch; color: var(--slate); }

.anatomy {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(16, 24, 38, 0.08);
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: var(--shadow-window);
}
.anatomy__title {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
}
.anatomy__chain { position: relative; margin: 0; padding: 0; list-style: none; }
.anatomy__chain::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 30px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--lapis), var(--powder));
  transform-origin: top;
}
.anatomy__node { position: relative; padding: 0 0 24px 36px; }
.anatomy__node::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--lapis);
  border-radius: 50%;
  background: var(--paper);
}
.anatomy__node--review::before { border-color: var(--ink); background: var(--ink); }
.anatomy__label { margin-bottom: 6px; color: var(--slate); font-size: 0.8125rem; font-weight: 600; }
.anatomy__statement { color: var(--ink-2); font-size: 1.0625rem; }
.anatomy__ref { color: var(--lapis); font-size: 0.9375rem; font-weight: 600; }
.anatomy__quote { margin-top: 4px; font-family: var(--serif); font-size: 1.1875rem; line-height: 1.6; color: var(--ink); }
.anatomy__links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.anatomy__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  color: var(--lapis);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(36, 81, 179, 0.35);
  text-underline-offset: 3px;
}
.anatomy__links a:hover { text-decoration-color: currentColor; }
.anatomy__review { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--ink-2); }
.anatomy__note { margin-top: 2px; color: var(--slate); font-size: 0.875rem; }

/* 11. How it works */
.section--how { background: var(--paper); padding-bottom: clamp(56px, 7vw, 88px); }

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.stage { position: relative; padding-right: 22px; }
.stage:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 46px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lapis), var(--powder));
  transform-origin: left;
}
.stage__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--lapis);
  border-radius: 50%;
  background: var(--paper);
  color: var(--lapis);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1;
}
.stage--people .stage__num { border-color: var(--ink); background: var(--ink); color: #fff; }
.stage__title { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-family: var(--serif); font-size: 1.375rem; line-height: 1.2; }
.stage__title svg { color: var(--slate); }
.stage p { margin-top: 8px; color: var(--slate); font-size: 1rem; line-height: 1.55; }

.outputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 52px; }
.output { padding: 24px 26px; border: 1px solid var(--rule-soft); border-radius: var(--radius-m); background: var(--vellum); }
.output__when { color: var(--lapis); font-size: 0.8125rem; font-weight: 600; }
.output__title { margin-top: 4px; font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.output__title + p { margin-top: 6px; color: var(--slate); }

.commitments {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.commitments__title { color: var(--ink); font-size: 1rem; font-weight: 600; }
.commitments__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; }
.commitments h4 { font-family: var(--serif); font-size: 1.25rem; line-height: 1.25; }
.commitments p { margin-top: 6px; color: var(--slate); font-size: 1rem; }

/* 12. Developers & API */
.section--developers { padding-top: 0; background: var(--paper); }

.dev {
  --focus: var(--powder);
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(32px, 4vw, 56px);
  padding: clamp(28px, 4.5vw, 56px);
  border-radius: var(--radius-xl);
  color: var(--on-dark);
  background:
    radial-gradient(760px 460px at 100% 0%, rgba(58, 98, 176, 0.3), transparent 62%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.section-title--light { margin-top: 18px; color: #f6f8fc; font-size: clamp(2rem, 1.45rem + 1.9vw, 2.875rem); }
.dev__intro > p { margin-top: 16px; color: var(--on-dark-2); }
.dev__intro > .dev__status {
  margin-top: 22px;
  padding-left: 14px;
  border-left: 2px solid rgba(168, 207, 255, 0.55);
  color: var(--on-dark);
  font-size: 1rem;
}
.btn--download { margin-top: 28px; }
.dev__intro > .dev__file { margin-top: 10px; color: var(--on-dark-muted); font-size: 0.875rem; }

.api { min-width: 0; }
.api__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.endpoint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 3px 10px;
  height: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid rgba(168, 207, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--on-dark);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.endpoint:hover { border-color: rgba(168, 207, 255, 0.4); background: rgba(168, 207, 255, 0.05); }
.endpoint[aria-selected="true"] { border-color: var(--powder); background: rgba(168, 207, 255, 0.11); }
.method {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--powder);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.method--post { background: #e8eef7; }
.endpoint__path { min-width: 0; color: var(--on-dark); font-family: var(--mono); font-size: 0.8125rem; overflow-wrap: anywhere; }
.endpoint__desc { grid-column: 1 / -1; color: var(--on-dark-muted); font-size: 0.875rem; }

.api-panel + .api-panel { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line-dark); }
.api.is-enhanced .api-panel + .api-panel { margin-top: 0; padding-top: 0; border-top: 0; }
.api-panel__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  color: var(--on-dark);
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.api-panel__desc { margin-top: 8px; color: var(--on-dark-2); font-size: 1rem; }

.code { margin-top: 14px; overflow: hidden; border: 1px solid rgba(168, 207, 255, 0.12); border-radius: 12px; background: var(--night); }
.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 4px 6px 4px 16px;
  border-bottom: 1px solid rgba(168, 207, 255, 0.1);
  color: var(--on-dark-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}
.code pre { max-height: 380px; }
.code--request pre { max-height: none; }

/* 13. Roadmap */
.roadmap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.roadmap__head { position: sticky; top: calc(var(--header-h) + 40px); }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, #c3cddb 0 6px, transparent 6px 12px);
}
.milestone { position: relative; padding: 0 0 40px 50px; }
.milestone:last-child { padding-bottom: 0; }
.milestone::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 16px;
  height: 16px;
  border: 2px solid #9aa8bc;
  border-radius: 50%;
  background: var(--vellum);
}
.milestone--now::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 20px;
  bottom: -6px;
  width: 2px;
  background: linear-gradient(var(--ink), var(--lapis));
  transform-origin: top;
}
.milestone--now::before { border-color: var(--ink); background: var(--ink); box-shadow: 0 0 0 5px rgba(16, 24, 38, 0.1); }
.milestone--next::before { border-color: var(--lapis); background: var(--paper); box-shadow: 0 0 0 5px rgba(36, 81, 179, 0.13); }
.milestone__title { margin-top: 10px; font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; }
.milestone p { max-width: 58ch; margin-top: 6px; color: var(--slate); }

/* 14. Vision */
.section--vision { background: var(--mist); }
.vision { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.vision__statement {
  max-width: 24ch;
  margin-top: 28px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
  font-weight: 450;
  line-height: 1.3;
  text-wrap: pretty;
}
.vision__body > p { max-width: 60ch; color: var(--ink-2); }
.vision__body > p + p { margin-top: 16px; }
.sustain { margin-top: 36px; padding: 24px 26px; border: 1px solid #d3e1f5; border-radius: var(--radius-m); background: var(--paper); }
.sustain__title { color: var(--ink); font-size: 1rem; font-weight: 600; }
.sustain__list { display: grid; gap: 14px; margin-top: 14px; }
.sustain__list dt { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; line-height: 1.3; }
.sustain__list dd { margin-top: 2px; color: var(--slate); }
.sustain__note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule-soft); color: var(--slate); font-size: 0.9375rem; }

/* 15. FAQ */
.section--faq { background: var(--paper); }
.faq-layout { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__item { border-top: 1px solid var(--rule); }
.faq__item:last-child { border-bottom: 1px solid var(--rule); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 16px 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::marker { content: ""; }
.faq__item summary::after {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 12px no-repeat,
    var(--paper);
  transition: transform 0.25s var(--ease-out), border-color 0.2s;
}
.faq__item summary:hover::after { border-color: var(--lapis); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__answer { max-width: 64ch; padding: 0 0 24px; color: var(--ink-2); }

/* 16. Footer */
.site-footer {
  --focus: var(--powder);
  padding: clamp(80px, 9vw, 120px) 0 40px;
  background: var(--ink);
  color: var(--on-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.closing { max-width: 820px; }
.closing__title {
  color: #f6f8fc;
  font-family: var(--serif);
  font-size: var(--step-4);
  font-weight: 460;
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.closing__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.closing__note { margin-top: 18px; color: var(--on-dark-muted); font-size: 1rem; }

.site-footer__bottom {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px 40px;
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
}
.brand--light { color: #f6f8fc; --mark-front: #f4f5f8; --mark-lines: #101826; --mark-dot: #2451b3; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 4px; margin: 0; padding: 0; list-style: none; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--on-dark-2);
  font-size: 0.9375rem;
  text-decoration: none;
}
.footer-nav a:hover { color: #fff; }
.site-footer__meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
  color: var(--on-dark-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* 17. Motion — one orchestrated load moment in the hero, then reveals that show
   connections being made. Everything is visible without JavaScript. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .art-q { animation: sl-rise 0.7s var(--ease-out) 0.1s both; }
  .art-page { animation: sl-rise 0.8s var(--ease-out) 0.25s both; }
  .art-layer--a { animation: sl-layer 0.95s var(--ease-out) 0.75s both; }
  .art-layer--b { animation: sl-layer 0.95s var(--ease-out) 0.9s both; }
  .art-sup { animation: sl-fade 0.4s ease-out 1.35s both; }
  .art-link { stroke-dasharray: 160; stroke-dashoffset: 160; animation: sl-draw 0.7s ease-out 1.5s forwards; }

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

  /* Pipeline: stages arrive in order and each connector draws to the next */
  .reveal--pipeline { opacity: 1; transform: none; }
  .reveal--pipeline .stage { opacity: 0; transform: translateY(10px); transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out); }
  .reveal--pipeline .stage::after { transform: scaleX(0); transition: transform 0.45s ease-out; }
  .reveal--pipeline.is-in .stage { opacity: 1; transform: none; }
  .reveal--pipeline.is-in .stage::after { transform: scaleX(1); }
  .reveal--pipeline.is-in .stage:nth-child(1)::after { transition-delay: 0.3s; }
  .reveal--pipeline.is-in .stage:nth-child(2) { transition-delay: 0.32s; }
  .reveal--pipeline.is-in .stage:nth-child(2)::after { transition-delay: 0.62s; }
  .reveal--pipeline.is-in .stage:nth-child(3) { transition-delay: 0.64s; }
  .reveal--pipeline.is-in .stage:nth-child(3)::after { transition-delay: 0.94s; }
  .reveal--pipeline.is-in .stage:nth-child(4) { transition-delay: 0.96s; }
  .reveal--pipeline.is-in .stage:nth-child(4)::after { transition-delay: 1.26s; }
  .reveal--pipeline.is-in .stage:nth-child(5) { transition-delay: 1.28s; }
  .reveal--pipeline.is-in .stage:nth-child(5)::after { transition-delay: 1.58s; }
  .reveal--pipeline.is-in .stage:nth-child(6) { transition-delay: 1.6s; }

  /* Anatomy: the chain from statement to review is traced top to bottom */
  .reveal--trace { opacity: 1; transform: none; }
  .reveal--trace .anatomy__chain::before { transform: scaleY(0); transition: transform 1.3s ease-in-out 0.2s; }
  .reveal--trace .anatomy__node { opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
  .reveal--trace.is-in .anatomy__chain::before { transform: scaleY(1); }
  .reveal--trace.is-in .anatomy__node { opacity: 1; transform: none; }
  .reveal--trace.is-in .anatomy__node:nth-child(2) { transition-delay: 0.4s; }
  .reveal--trace.is-in .anatomy__node:nth-child(3) { transition-delay: 0.8s; }
  .reveal--trace.is-in .anatomy__node:nth-child(4) { transition-delay: 1.2s; }

  /* Roadmap: milestones settle in order; the "now" segment draws toward "next" */
  .reveal--timeline { opacity: 1; transform: none; }
  .reveal--timeline .milestone { opacity: 0; transform: translateY(10px); transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out); }
  .reveal--timeline .milestone--now::after { transform: scaleY(0); transition: transform 0.6s ease-out 0.35s; }
  .reveal--timeline.is-in .milestone { opacity: 1; transform: none; }
  .reveal--timeline.is-in .milestone--now::after { transform: scaleY(1); }
  .reveal--timeline.is-in .milestone:nth-child(2) { transition-delay: 0.15s; }
  .reveal--timeline.is-in .milestone:nth-child(3) { transition-delay: 0.3s; }
  .reveal--timeline.is-in .milestone:nth-child(4) { transition-delay: 0.45s; }
  .reveal--timeline.is-in .milestone:nth-child(5) { transition-delay: 0.6s; }

  /* Responses to the reader's own actions */
  .example.is-entering,
  .api-panel.is-entering { animation: sl-panel 0.38s var(--ease-out); }
  .note-item { animation: sl-panel 0.32s var(--ease-out); }
  .faq__item[open] .faq__answer { animation: sl-fade 0.3s ease-out; }
}

@keyframes sl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sl-layer { from { opacity: 0; transform: translateX(-72px); } to { opacity: 1; transform: none; } }
@keyframes sl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sl-draw { to { stroke-dashoffset: 0; } }
@keyframes sl-panel { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 18. Responsive */
@media (pointer: coarse) {
  .chip-btn,
  .copy-btn,
  .view-switch__btn,
  .passage__ref { min-height: 44px; }
  .anatomy__links a { min-height: 44px; }
  .passage__context { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 1180px) {
  .site-nav { display: none; }
  .menu { display: block; }
  .site-header__cta { margin-left: auto; }
}

@media (max-width: 1080px) {
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .stage:nth-child(3n)::after { display: none; }
  .commitments { grid-template-columns: 1fr; gap: 20px; }
  .uses__header,
  .use { grid-template-columns: 170px minmax(0, 1fr) 220px; gap: 24px; }
  .api__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__art { justify-self: center; max-width: 480px; }
  .hero__title { max-width: 16ch; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step + .step { border-left: 0; }
  .step + .step::before { display: none; }
  .step:nth-child(even) { border-left: 1px solid var(--rule-soft); }
  .step:nth-child(n + 3) { border-top: 1px solid var(--rule-soft); }

  .preview__body { grid-template-columns: 1fr; }
  .preview__rail { border-left: 0; border-top: 1px solid var(--rule-soft); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }

  .sources { grid-template-columns: 1fr; }
  .anatomy { position: relative; top: auto; }

  .dev { grid-template-columns: 1fr; }

  .roadmap { grid-template-columns: 1fr; gap: 8px; }
  .roadmap__head { position: static; }

  .vision,
  .faq-layout { grid-template-columns: 1fr; gap: 36px; }

  .uses__header { display: none; }
  .use { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .use__keep { margin-top: 4px; }

  .site-footer__bottom { grid-template-columns: 1fr; }
  .footer-nav ul { justify-content: flex-start; margin-left: -10px; }
  .site-footer__meta { text-align: left; }
}

@media (max-width: 720px) {
  .question-list { grid-template-columns: 1fr; gap: 8px; }
  .preview__rail { grid-template-columns: 1fr; }
  .outputs { grid-template-columns: 1fr; }
  .commitments__list { grid-template-columns: 1fr; gap: 22px; }
  .view-switch { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .step,
  .step:nth-child(even) { border-left: 0; padding: 22px 22px 24px; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 16px; }
  .step:nth-child(n + 2) { border-top: 1px solid var(--rule-soft); }
  .step__num { grid-row: span 2; }
  .step__title { margin-top: 2px; font-size: 1.375rem; }

  .pipeline { grid-template-columns: 1fr; row-gap: 0; }
  .stage { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 18px; padding: 0 0 28px; }
  .stage__num { grid-row: span 2; }
  .stage__title { margin-top: 4px; }
  .stage:nth-child(3n)::after { display: block; }
  .stage:not(:last-child)::after {
    top: 44px;
    bottom: 6px;
    left: 17px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(var(--lapis), var(--powder));
    transform-origin: top;
  }
  .reveal--pipeline .stage::after { transform: scaleY(0); }
  .reveal--pipeline.is-in .stage::after { transform: scaleY(1); }

  .preview__bar { padding: 12px 16px; }
  .preview__notice,
  .preview__questions { padding-inline: 16px; }
  .passage { grid-template-columns: 1fr; }
  .passage__marker { grid-row: auto; margin-bottom: 8px; }
  .guidance { flex-direction: column; gap: 4px; }
  .example__head { align-items: flex-start; }
  .api__list { grid-template-columns: 1fr; }
  .endpoint { min-height: 56px; }
  .dev { border-radius: var(--radius-l); }
  .hero__panel { border-radius: 22px; }
  .faq__item summary { font-size: 1.1875rem; }
}

@media (max-width: 560px) {
  .site-header__cta { display: none; }
  .menu { margin-left: auto; }
  .brand__name { font-size: 1.3125rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .closing__actions .btn { flex: 1 1 100%; }
  .preview__count { margin-left: 0; width: 100%; }
}

@media (max-width: 380px) {
  :root { --gutter: 16px; }
  .preview__main { padding-inline: 16px; }
  .preview__rail { padding: 24px 16px; }
  .dev { padding: 24px 18px; }
}

/* 19. Print */
@media print {
  .site-header,
  .skip-link,
  .hero__art,
  .steps,
  .view-switch,
  [data-js-only],
  .notes,
  .api__list,
  .closing__actions,
  .footer-nav,
  .copy-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .hero__panel,
  .dev,
  .site-footer { margin: 0; border-radius: 0; background: #fff !important; color: #000 !important; }
  .hero__title,
  .section-title--light,
  .closing__title,
  .hero__lede,
  .dev__intro > p,
  .api-panel__title,
  .api-panel__desc { color: #000 !important; }
  .code pre,
  .data-card pre { max-height: none; color: #000; }
  .code,
  .data-card { background: #f4f5f8; }
  .j-key,
  .j-str,
  .j-lit { color: #000; }
  .example[hidden],
  .api-panel[hidden] { display: block !important; }
  .reveal,
  .reveal * { opacity: 1 !important; transform: none !important; }
  .preview,
  .anatomy { box-shadow: none; }
  .section { padding-block: 32px; }
  .anatomy,
  .roadmap__head { position: static; }
}
