/* =========================================================================
   Paperfort — paper/legal-filing aesthetic
   Source Serif 4 throughout, IBM Plex Mono for metadata
   ========================================================================= */

:root {
  /* Paper & ink */
  --paper: #F4EEE2;            /* cream */
  --paper-2: #EDE4D2;          /* slightly deeper cream for bands */
  --paper-edge: #E4D8BE;       /* page edge / tab */
  --ink: #11223A;              /* deep navy */
  --ink-2: #2A3B55;            /* secondary ink */
  --ink-mute: #5C6B82;         /* muted ink / captions */
  --rule: #C9B48A;             /* kraft hairline */
  --rule-soft: #D9CBAA;

  /* Accent — burgundy seal by default (tweakable) */
  --accent: #7A2E2A;
  --accent-ink: #F4EEE2;

  /* Typography */
  --serif: "Source Serif 4", "Source Serif Pro", "Charter", "Iowan Old Style", "Georgia", "Times New Roman", serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale */
  --maxw: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "onum" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== Scroll-reveal primitives ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal--left { transform: translateX(-30px); }
.reveal--left.is-in { transform: none; }
.reveal--right { transform: translateX(30px); }
.reveal--right.is-in { transform: none; }
.reveal--scale { transform: scale(0.96); }
.reveal--scale.is-in { transform: none; }
.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.stagger.is-in > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0ms; }
.stagger.is-in > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 100ms; }
.stagger.is-in > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 200ms; }
.stagger.is-in > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 300ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--left, .reveal--right, .reveal--scale, .stagger > * { opacity: 1 !important; transform: none !important; }
}

/* Hero headline kinetic letters */
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .word { display: inline-block; transform: translateY(110%); opacity: 0; animation: wordIn 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
.hero h1 .word:nth-child(1) { animation-delay: 0.15s; }
.hero h1 .word:nth-child(2) { animation-delay: 0.3s; }
.hero h1 .word:nth-child(3) { animation-delay: 0.55s; }
.hero h1 .word:nth-child(4) { animation-delay: 0.7s; }
@keyframes wordIn { to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero h1 .word { animation: none; transform: none; opacity: 1; }
}

/* Floating stamp rotation keyframe reserved via JS */
@keyframes stampPress {
  0% { transform: rotate(-28deg) scale(2.2); opacity: 0; }
  60% { transform: rotate(-6deg) scale(0.92); opacity: 1; }
  78% { transform: rotate(-10deg) scale(1.04); }
  100% { transform: rotate(-8deg) scale(1); opacity: 0.92; }
}
@keyframes sealPress {
  0% { transform: scale(0.2) rotate(-50deg); opacity: 0; }
  60% { transform: scale(1.1) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes scanSweep {
  0% { top: -140px; opacity: 0; }
  8% { opacity: 1; }
  45% { opacity: 1; }
  55% { opacity: 0; top: 520px; }
  100% { top: 520px; opacity: 0; }
}
@keyframes fanBack { 0%, 60% { transform: translate(0,0) rotate(1.5deg); } 85% { transform: translate(42px,-8px) rotate(7deg); } 100% { transform: translate(36px,-6px) rotate(6.5deg); } }
@keyframes fanBack2 { 0%, 65% { transform: translate(0,0) rotate(3deg); } 88% { transform: translate(78px,-12px) rotate(13deg); } 100% { transform: translate(72px,-10px) rotate(12deg); } }
@keyframes findingsIn {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: none; }
}

/* Subtle paper grain — layered radial+linear noise, very light */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(17,34,58,0.018) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(17,34,58,0.022) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(122,46,42,0.016) 0 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px, 13px 13px;
  mix-blend-mode: multiply;
}

main, header, footer, section { position: relative; z-index: 1; }

/* Focus rings — visible, burgundy underline-style */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(42px, 6.2vw, 84px); line-height: 1.02; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; }
h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.25; }
h4 { font-size: 18px; line-height: 1.3; }

p { text-wrap: pretty; margin: 0 0 1em; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

/* Monospace metadata */
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.rule { height: 1px; background: var(--rule); border: 0; }
.rule-thick { height: 2px; background: var(--ink); border: 0; }
.rule-dotted { height: 1px; background-image: linear-gradient(to right, var(--rule) 50%, transparent 50%); background-size: 8px 1px; border: 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

/* ============ Header ============ */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.wordmark {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 10px;
}
.wordmark__dot {
  width: 10px; height: 10px;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-2px);
  border-radius: 1px;
}
.wordmark__sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-left: 1px solid var(--rule);
  padding-left: 10px;
  margin-left: 4px;
  font-weight: 400;
}
.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-2);
}
.nav a:hover { color: var(--accent); }
.nav__cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none !important;
}
.nav__cta:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 720px) {
  .nav { gap: 14px; }
  .nav a:not(.nav__cta) { display: none; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 17px;
  padding: 14px 22px;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { background: #000; color: var(--paper); transform: translateY(-1px); }
.btn--secondary {
  background: transparent;
  color: var(--ink);
}
.btn--secondary:hover { background: var(--ink); color: var(--paper); }
.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn--accent:hover { background: #5e2320; color: var(--accent-ink); }
.btn__caret {
  font-family: var(--mono);
  font-size: 14px;
  transform: translateY(-1px);
}

/* ============ Hero ============ */
.hero {
  padding: 56px 0 0;
  border-bottom: 1px solid var(--rule);
  --p: 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -2px 0 0;
  background-image:
    radial-gradient(1200px 400px at 10% 0%, rgba(122,46,42,0.05), transparent 60%),
    radial-gradient(900px 500px at 90% 100%, rgba(17,34,58,0.05), transparent 60%);
  pointer-events: none;
}
.hero__marginalia {
  position: absolute;
  right: 14px; top: 140px;
  width: 14px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0.5;
  pointer-events: none;
  z-index: 2;
  display: none;
  white-space: nowrap;
}
@media (min-width: 1280px) { .hero__marginalia { display: block; } }
.hero__top {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 20px;
  border-bottom: 1px dotted var(--rule);
  margin-bottom: 40px;
  gap: 16px; flex-wrap: wrap;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: start;
  padding-bottom: 72px;
}
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; gap: 40px; } }

/* Auto-loop animation: no pinning, normal flow */
.hero--animated { padding-bottom: 56px; }
.hero__scroll-track { position: relative; }
.hero__pin { position: relative; padding: 0; }
.hero__pin .container { width: 100%; }
.hero__pin .hero__grid { padding-bottom: 0; align-items: center; }

/* Stage indicator on left column */
.hero__stages {
  margin-top: 36px;
  display: grid;
  gap: 10px;
  counter-reset: stage;
}
.hero__stage {
  counter-increment: stage;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dotted var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: color 0.3s ease;
  align-items: center;
}
.hero__stage:last-child { border-bottom: 1px dotted var(--rule); }
.hero__stage::before {
  content: counter(stage, decimal-leading-zero);
  color: var(--ink-mute);
  font-size: 10px;
  transition: color 0.3s ease;
}
.hero__stage__label { color: inherit; }
.hero__stage__tick { font-family: var(--serif); font-size: 14px; opacity: 0; transition: opacity 0.3s ease; }
.hero__stage.is-active { color: var(--accent); }
.hero__stage.is-active::before { color: var(--accent); }
.hero__stage.is-done { color: var(--ink); }
.hero__stage.is-done::before { color: var(--ink); }
.hero__stage.is-done .hero__stage__tick { opacity: 1; color: var(--accent); }

/* Scroll progress rail on right of viewport */
.hero__progress {
  position: absolute;
  right: 16px; top: 0; bottom: 0;
  width: 2px;
  background: var(--rule);
  display: none;
}
@media (min-width: 1100px) { .hero__progress { display: block; } }
.hero__progress::after {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0;
  height: calc(var(--p, 0) * 100%);
  background: var(--accent);
  transition: height 0.15s linear;
}

/* After pinned segment, normal flow content */
.hero__tail {
  padding: 48px 0 72px;
  border-top: 1px solid var(--rule);
}

@media (prefers-reduced-motion: reduce) {
  .hero { --p: 1 !important; }
  .scanline { display: none; }
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero__eyebrow::before {
  content: "§ ";
  color: var(--ink-mute);
}
.hero h1 .amp {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero__sub {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  margin: 28px 0 36px;
  max-width: 52ch;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__cta-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-left: 4px;
}

.hero__legal {
  margin-top: 40px;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  background: rgba(122,46,42,0.04);
  font-size: 14px;
  color: var(--ink-2);
  max-width: 56ch;
}

/* ============ PDF hero mockup ============ */
.pdf-stack { position: relative; padding: 8px 0 24px; }

/* --- Scroll-driven stages ---
   Stage 0 (p 0-.25):  Blank form arrives; scanning line sweeps
   Stage 1 (p .25-.5): Findings type in; severity tags stamp on
   Stage 2 (p .5-.75): "Defensible Documentation" stamp rotates in + wax seal
   Stage 3 (p .75-1):  Document filed — secondary docs fan out behind
*/

/* Document: floats gently while progress plays */
.pdf-stack .doc {
  transform: translateY(calc(sin(var(--t, 0) * 6.2832) * 4px));
  opacity: 1;
  transition: box-shadow 0.3s ease;
  will-change: transform;
}

/* Scanning line during stage 0 -> 1 */
.scanline {
  position: absolute;
  left: 8px; right: 8px;
  height: 140px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(122,46,42,0.08) 40%,
    rgba(122,46,42,0.22) 50%,
    rgba(122,46,42,0.08) 60%,
    transparent 100%);
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  pointer-events: none;
  opacity: calc(1 - max(0, (var(--p) - 0.45) * 4));
  /* Move from top to bottom across full doc as p goes 0 → 0.5 */
  top: calc(-70px + min(1, var(--p) * 2.2) * 520px);
  z-index: 3;
  mix-blend-mode: multiply;
}
.scanline::after {
  content: "§ SCANNING · axe-core 4.10";
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--paper);
  padding: 2px 6px;
  border: 1px solid var(--accent);
}

/* Findings reveal — fade/slide each row as p passes 0.28..0.52 */
.doc__findings > * {
  --row: 0;
  opacity: calc(min(1, max(0, (var(--p) - 0.28 - var(--row) * 0.05) * 12)));
  transform: translateY(calc((1 - min(1, max(0, (var(--p) - 0.28 - var(--row) * 0.05) * 12))) * 8px));
  transition: none;
}
.doc__findings > *:nth-child(1),
.doc__findings > *:nth-child(2),
.doc__findings > *:nth-child(3) { --row: 0; }
.doc__findings > *:nth-child(4),
.doc__findings > *:nth-child(5),
.doc__findings > *:nth-child(6) { --row: 1; }
.doc__findings > *:nth-child(7),
.doc__findings > *:nth-child(8),
.doc__findings > *:nth-child(9) { --row: 2; }
.doc__findings > *:nth-child(10),
.doc__findings > *:nth-child(11),
.doc__findings > *:nth-child(12) { --row: 3; }

/* Severity badges punch-in effect */
.sev {
  transform: scale(calc(1 + (1 - min(1, max(0, (var(--p) - 0.3) * 10))) * 0.4));
}

.doc {
  background: #FCFAF3;
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 0 #E8DEC4 inset,
    0 20px 40px -24px rgba(17,34,58,0.22),
    0 2px 6px -2px rgba(17,34,58,0.08);
  position: relative;
  padding: 28px 32px 32px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}
.doc__corner {
  position: absolute; top: 10px; right: 14px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.12em; color: var(--ink-mute);
  text-transform: uppercase;
}
.doc__running {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
  text-transform: uppercase;
  display: flex; justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 22px;
}
.doc h4 {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 6px;
}
.doc__title {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 6px 0 4px;
}
.doc__title-2 {
  font-size: 14px;
  color: var(--ink-mute);
  font-style: italic;
  margin-bottom: 18px;
}

.doc__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-transform: uppercase;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
}
.doc__meta dt { color: var(--ink-mute); }
.doc__meta dd { margin: 0; color: var(--ink); }

.doc__findings {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px 14px;
  font-size: 12px;
  padding-bottom: 16px;
}
.doc__findings .sev {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid currentColor;
  align-self: center;
  width: fit-content;
}
.sev--crit { color: #7A2E2A; }
.sev--high { color: #8B5E12; }
.sev--med { color: var(--ink-2); }
.doc__findings .ref {
  font-family: var(--mono); font-size: 10px; color: var(--ink-mute);
  align-self: center; text-align: right;
}
.doc__finding { align-self: center; }
.doc__finding b { font-weight: 600; }
.doc__finding small { display: block; color: var(--ink-mute); font-size: 11px; margin-top: 2px; font-style: italic; }

.doc__footer {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  margin-top: 8px;
}

/* Stamp — animated in at stage 2 (p 0.55 -> 0.72) */
.stamp {
  position: absolute;
  right: -14px; top: 30px;
  /* stamp progress */
  --sp: min(1, max(0, (var(--p) - 0.55) * 6));
  transform: rotate(calc(-18deg + var(--sp) * 10deg)) scale(calc(2.2 - var(--sp) * 1.2));
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(122,46,42,0.02);
  opacity: calc(var(--sp) * 0.92);
  text-align: center;
  line-height: 1.3;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(122,46,42,0.2);
  transition: none;
}
.stamp small { display: block; font-size: 8px; letter-spacing: 0.12em; color: var(--accent); opacity: 0.8; margin-top: 2px;}

/* Wax seal — appears at stage 2 end (p 0.65 -> 0.8) */
.wax-seal {
  position: absolute;
  left: -22px; bottom: 30px;
  width: 72px; height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #9A3D38 0%, #7A2E2A 45%, #5A1F1C 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 10px;
  color: var(--paper);
  text-align: center; line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  --wp: min(1, max(0, (var(--p) - 0.65) * 7));
  opacity: var(--wp);
  transform: scale(calc(0.3 + var(--wp) * 0.7)) rotate(calc((1 - var(--wp)) * -40deg));
  box-shadow:
    inset 0 2px 6px rgba(255,255,255,0.18),
    inset 0 -3px 8px rgba(0,0,0,0.3),
    0 4px 10px -4px rgba(0,0,0,0.35);
  z-index: 3;
}
.wax-seal::before {
  content: "";
  position: absolute; inset: 6px;
  border: 1px dashed rgba(244,238,226,0.5);
  border-radius: 50%;
}
.wax-seal span {
  position: relative; z-index: 2;
  font-size: 9px;
}
.wax-seal small {
  display: block;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
  opacity: 0.85;
  margin-top: 2px;
}

/* Secondary docs — fan out at stage 3 (p 0.78 -> 1)
   They represent Doc 2 (statement page) and Doc 3 (VPAT) */
.doc--back, .doc--back-2 {
  position: absolute;
  background: #F7F0DC;
  border: 1px solid var(--rule);
  box-shadow: 0 18px 30px -22px rgba(17,34,58,0.18);
  padding: 18px 20px;
  font-size: 9px;
  color: var(--ink-mute);
  overflow: hidden;
  transition: none;
}
.doc--back {
  left: 40px; right: -20px; top: 36px; bottom: -12px;
  z-index: -1;
  --fp: min(1, max(0, (var(--p) - 0.78) * 5));
  transform:
    translate(calc(var(--fp) * 36px), calc(var(--fp) * -6px))
    rotate(calc(1.5deg + var(--fp) * 5deg));
}
.doc--back-2 {
  left: 70px; right: -40px; top: 56px; bottom: -24px;
  z-index: -2;
  background: #EEE3C6;
  box-shadow: 0 20px 30px -22px rgba(17,34,58,0.18);
  --fp: min(1, max(0, (var(--p) - 0.82) * 5));
  transform:
    translate(calc(var(--fp) * 72px), calc(var(--fp) * -10px))
    rotate(calc(3deg + var(--fp) * 9deg));
}
.doc--back::before,
.doc--back-2::before {
  content: attr(data-label);
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.doc--back::after {
  content: "yourstore.com / accessibility";
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink);
}
.doc--back-2::after {
  content: "VPAT 2.5 · Form PF-C";
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink);
}

/* "The system" workflow ribbon underneath — subtle labels Crawl → Audit → Stamp → Deliver */
.workflow {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: rgba(244,238,226,0.6);
}
.workflow__step {
  padding: 12px 10px;
  border-right: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  transition: color 0.3s ease, background 0.3s ease;
}
.workflow__step:last-child { border-right: 0; }
.workflow__step::before {
  content: attr(data-n);
  color: var(--rule);
  font-size: 10px;
}
.workflow__step.is-active {
  color: var(--accent);
  background: rgba(122,46,42,0.06);
}
.workflow__step.is-active::before { color: var(--accent); }
.workflow__step.is-done { color: var(--ink); }
.workflow__step.is-done::before { color: var(--ink); }

/* ============ Section shell ============ */
.section { padding: 96px 0; border-bottom: 1px solid var(--rule); }
.section--cream { background: var(--paper-2); }
.section__head { display: grid; grid-template-columns: 180px 1fr; gap: 40px; margin-bottom: 56px; align-items: start; }
@media (max-width: 760px) { .section__head { grid-template-columns: 1fr; gap: 8px; } }
.section__label {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 10px;
  border-top: 2px solid var(--ink);
}
.section__title { max-width: 22ch; }
.section__lede { color: var(--ink-2); max-width: 60ch; margin-top: 18px; font-size: 19px; }

/* ============ Three documents ============ */
.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 960px) { .three { grid-template-columns: 1fr; } }

.three__card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0;
  display: flex; flex-direction: column;
}
.three__card__thumb {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--rule);
  background: #FCFAF3;
  padding: 20px;
  overflow: hidden;
  position: relative;
}
.three__card__body { padding: 24px 24px 28px; }
.three__no {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.three__card h3 { margin-bottom: 10px; font-size: 24px; }
.three__card p { font-size: 15.5px; color: var(--ink-2); margin-bottom: 18px; }
.three__spec {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute);
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px;
  padding-top: 16px; border-top: 1px dotted var(--rule);
}
.three__spec dt { color: var(--ink-mute); }
.three__spec dd { margin: 0; color: var(--ink); }

/* tiny thumbnails */
.thumb-pdf, .thumb-browser, .thumb-vpat {
  width: 100%; height: 100%; display: block; position: relative;
}
.thumb-pdf {
  background: #FCFAF3;
  border: 1px solid var(--rule);
  padding: 14px 14px 10px;
  font-size: 7px; line-height: 1.4;
  color: var(--ink);
}
.thumb-pdf .t-title { font-family: var(--serif); font-size: 11px; font-weight: 600; margin-bottom: 4px;}
.thumb-pdf .t-hr { height: 1px; background: var(--rule); margin: 6px 0;}
.thumb-pdf .t-line { height: 3px; background: #E6D9B8; margin: 3px 0; }
.thumb-pdf .t-line.s { width: 60%; }
.thumb-pdf .t-line.m { width: 85%; }
.thumb-pdf .t-footer { position: absolute; bottom: 6px; left: 14px; right: 14px; display:flex; justify-content:space-between; font-family: var(--mono); font-size: 6px; color: var(--ink-mute); letter-spacing: 0.1em; text-transform: uppercase;}

.thumb-browser { background: #FCFAF3; border: 1px solid var(--rule); padding: 0; display:flex; flex-direction:column;}
.thumb-browser .chrome { height: 18px; background: var(--paper-2); border-bottom: 1px solid var(--rule); display: flex; align-items: center; padding: 0 8px; gap: 3px;}
.thumb-browser .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--rule); }
.thumb-browser .url { margin-left: 8px; font-family: var(--mono); font-size: 6px; color: var(--ink-mute); letter-spacing: 0.05em; }
.thumb-browser .page { padding: 12px 14px; flex: 1; font-size: 7px; line-height: 1.5; }
.thumb-browser .page h5 { font-family: var(--serif); font-size: 10px; margin: 0 0 4px;}
.thumb-browser .page .t-line { height: 2.5px; background: #E6D9B8; margin: 2px 0; }
.thumb-browser .page .t-line.s { width: 50%;}
.thumb-browser .page .t-line.m { width: 75%;}

.thumb-vpat { background: #FCFAF3; border: 1px solid var(--rule); padding: 14px; font-size: 7px; position: relative; }
.thumb-vpat .v-num { font-family: var(--mono); font-size: 7px; color: var(--ink-mute); letter-spacing: 0.1em; text-transform: uppercase;}
.thumb-vpat .v-title { font-family: var(--serif); font-size: 12px; font-weight: 600; margin: 10px 0 4px; line-height: 1.1;}
.thumb-vpat .v-sub { font-family: var(--serif); font-size: 7px; color: var(--ink-mute); font-style: italic;}
.thumb-vpat table { width: 100%; margin-top: 12px; border-collapse: collapse; }
.thumb-vpat th, .thumb-vpat td { border: 1px solid var(--rule); padding: 3px 4px; font-size: 6px; text-align: left; font-family: var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2);}
.thumb-vpat th { background: var(--paper-2); font-weight: 600;}
.thumb-vpat .seal { position: absolute; bottom: 12px; right: 12px; width: 34px; height: 34px; border: 2px double var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 6px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; line-height: 1; padding: 3px;}

/* ============ Not an overlay ============ */
.overlay-callout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
}
@media (max-width: 820px) { .overlay-callout { grid-template-columns: 1fr; } }
.overlay-callout__col { padding: 36px 36px 40px; position: relative;}
.overlay-callout__col + .overlay-callout__col { border-left: 1px solid var(--rule); }
@media (max-width: 820px) { .overlay-callout__col + .overlay-callout__col { border-left: 0; border-top: 1px solid var(--rule); } }
.overlay-callout__col--cross { background: var(--paper-2); }
.overlay-callout__head {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.overlay-callout__col--cross .overlay-callout__head { color: var(--accent); }
.overlay-callout__col--check .overlay-callout__head { color: var(--ink); }
.overlay-callout__head .mark {
  font-family: var(--serif); font-size: 14px; line-height: 1;
  width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid currentColor;
}
.overlay-callout h3 { font-size: 28px; margin-bottom: 14px; letter-spacing: -0.01em; }
.overlay-callout ul { list-style: none; padding: 0; margin: 0; }
.overlay-callout li {
  padding: 14px 0;
  border-top: 1px dotted var(--rule);
  font-size: 16px;
  display: grid; grid-template-columns: 24px 1fr; gap: 12px;
  color: var(--ink-2);
}
.overlay-callout li::before {
  content: "";
  display: inline-block;
}
.overlay-callout__col--cross li::before {
  content: "×"; color: var(--accent); font-size: 20px; line-height: 1; font-family: var(--serif);
}
.overlay-callout__col--check li::before {
  content: "§"; color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.2;
}

/* ============ Why exists ============ */
.why {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .why { grid-template-columns: 1fr; gap: 32px; } }
.why__lead {
  font-size: 28px; line-height: 1.25; font-family: var(--serif);
  color: var(--ink); letter-spacing: -0.01em;
}
.why__lead .pull { color: var(--accent); font-style: italic; }
.why__body p { font-size: 17px; color: var(--ink-2); line-height: 1.6; margin-bottom: 14px;}
.citation {
  margin-top: 24px; padding: 20px 22px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink);
  font-size: 14px; color: var(--ink-2);
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px;
}
.citation dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); padding-top: 2px;}
.citation dd { margin: 0 0 4px; }
.citation a { color: var(--ink); }

/* ============ Pricing ============ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
}
@media (max-width: 1040px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }
.price {
  padding: 32px 28px 34px;
  border-right: 1px solid var(--rule);
  position: relative;
  display: flex; flex-direction: column;
}
.price:last-child { border-right: 0; }
@media (max-width: 1040px) {
  .price:nth-child(2n) { border-right: 0; }
  .price:nth-child(1), .price:nth-child(2) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .price { border-right: 0; border-bottom: 1px solid var(--rule);}
  .price:last-child { border-bottom: 0;}
}

.price__tag {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
  display: flex; justify-content: space-between;
}
.price__name { font-family: var(--serif); font-size: 22px; margin-bottom: 6px; }
.price__p { display: flex; align-items: baseline; gap: 4px; margin: 10px 0 4px;}
.price__amt { font-family: var(--serif); font-size: 54px; line-height: 1; letter-spacing: -0.02em;}
.price__per { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-mute); text-transform: uppercase;}
.price__blurb { font-size: 14.5px; color: var(--ink-2); margin: 12px 0 20px; min-height: 3.6em;}
.price__feat { list-style: none; padding: 0; margin: 0 0 22px; }
.price__feat li { font-size: 14px; padding: 8px 0; border-top: 1px dotted var(--rule); color: var(--ink-2);}
.price__feat li::before { content: "§ "; color: var(--ink-mute); font-family: var(--serif);}
.price__cta { margin-top: auto; }
.price__cta .btn { width: 100%; justify-content: center;}

.price--bundle {
  background: var(--paper-2);
}
.price--bundle .price__name { color: var(--accent); }
.price--bundle .price__amt { color: var(--accent); }
.price--bundle .seal {
  position: absolute; top: 18px; right: 18px;
  width: 56px; height: 56px;
  border: 2px double var(--accent);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 8px; letter-spacing: 0.1em;
  color: var(--accent); text-align: center;
  text-transform: uppercase;
  line-height: 1.15;
  padding: 6px;
}
.price--bundle .seal strong { font-size: 10px; letter-spacing: 0.14em;}

.pricing-disclaimer {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  display: grid; grid-template-columns: auto 1fr; gap: 14px;
  font-size: 14px; color: var(--ink-2);
}
.pricing-disclaimer::before {
  content: "§";
  font-family: var(--serif); font-size: 24px; color: var(--accent); line-height: 1;
}

/* ============ Contact ============ */
.contact {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--rule);
}
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.contact__tile {
  padding: 28px 28px 30px;
  border-right: 1px solid var(--rule);
  background: var(--paper);
}
.contact__tile:last-child { border-right: 0;}
@media (max-width: 820px) {
  .contact__tile { border-right: 0; border-bottom: 1px solid var(--rule);}
  .contact__tile:last-child { border-bottom: 0;}
}
.contact__label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 10px;}
.contact__email { font-family: var(--serif); font-size: 22px; text-decoration: none; color: var(--ink); display: block; margin-bottom: 8px;}
.contact__email:hover { color: var(--accent);}
.contact__blurb { font-size: 14px; color: var(--ink-2); margin: 0;}

/* ============ Reserved slots ============ */
.reserved {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 760px) { .reserved { grid-template-columns: 1fr; } }
.reserved__slot {
  padding: 28px 28px 30px;
  border: 1px dashed var(--rule);
  background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(17,34,58,0.02) 8px 9px);
}
.reserved__label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 12px;}
.reserved__placeholder { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); }

/* ============ Footer ============ */
.site-footer {
  background: var(--ink);
  color: #D6CDB8;
  padding: 72px 0 32px;
  border-top: 1px solid var(--ink);
}
.site-footer a { color: #D6CDB8; text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline;}
.site-footer__grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid #2A3B55;
}
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px;} }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr;} }
.site-footer__brand .wordmark { color: var(--paper);}
.site-footer__brand .wordmark__sub { color: #8A9AB5; border-color: #2A3B55;}
.site-footer__brand p { font-size: 13px; color: #8A9AB5; max-width: 36ch; margin-top: 18px;}
.site-footer h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #8A9AB5; margin-bottom: 14px; font-weight: 400;}
.site-footer ul { list-style: none; padding: 0; margin: 0;}
.site-footer li { padding: 5px 0; font-size: 14px;}
.site-footer__bar {
  margin-top: 28px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #8A9AB5;
}
.site-footer__disclaimer {
  grid-column: 1 / -1;
  font-size: 12px; color: #8A9AB5; max-width: 82ch;
  padding-top: 28px; border-top: 1px solid #2A3B55;
  margin-top: 24px;
}
.site-footer__trust {
  grid-column: 1 / -1;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #C9B48A; max-width: 82ch; margin-top: 8px;
}

/* ============ Document/article page ============ */
.doc-page { display: grid; grid-template-columns: 260px 1fr; gap: 56px; padding: 56px 0 96px; }
@media (max-width: 900px) { .doc-page { grid-template-columns: 1fr; gap: 32px;} }
.doc-sidebar { position: sticky; top: 32px; align-self: start;}
.doc-sidebar__label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); padding-bottom: 10px; border-bottom: 1px solid var(--ink); margin-bottom: 14px;}
.doc-sidebar ol { list-style: none; padding: 0; margin: 0; counter-reset: toc;}
.doc-sidebar li { counter-increment: toc; padding: 7px 0; border-bottom: 1px dotted var(--rule); font-size: 14px; display: flex; justify-content: space-between; gap: 12px;}
.doc-sidebar li::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 10px; color: var(--ink-mute); letter-spacing: 0.08em;}
.doc-sidebar a { text-decoration: none; color: var(--ink); flex: 1; }
.doc-sidebar a:hover { color: var(--accent);}
.doc-sidebar__leader { flex: 1; border-bottom: 1px dotted var(--rule); align-self: end; margin-bottom: 5px; }
.doc-sidebar__page { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); letter-spacing: 0.08em;}

.doc-main h1 { font-size: clamp(36px, 4vw, 54px); margin-bottom: 8px; letter-spacing: -0.015em;}
.doc-main__meta { display: flex; gap: 24px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); margin: 20px 0 36px;}
.doc-main__meta span strong { color: var(--ink); font-weight: 600; margin-left: 4px; }
.doc-main .termly-embed {
  background: #FCFAF3;
  border: 1px solid var(--rule);
  padding: 40px;
  min-height: 560px;
  position: relative;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}
.doc-main .termly-embed__ribbon { position: absolute; top: -1px; right: -1px; background: var(--paper-2); border-left: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 6px 12px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: var(--ink-mute); text-transform: uppercase;}
.doc-main .termly-embed h2 { font-size: 22px; margin-top: 28px; margin-bottom: 10px;}
.doc-main .termly-embed h2:first-child { margin-top: 0; }
.doc-main .termly-embed p { margin-bottom: 14px; max-width: 66ch;}
.doc-main .termly-embed ul { padding-left: 18px;}
.doc-main .termly-embed li { margin-bottom: 6px; font-size: 13.5px;}

.breadcrumb { display: flex; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 24px;}
.breadcrumb a { color: var(--ink-mute); text-decoration: none;}
.breadcrumb a:hover { color: var(--accent);}
.breadcrumb span::after { content: " / "; margin: 0 6px; color: var(--rule);}

/* ============ pSEO template ============ */
.pseo-hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.pseo-hero h1 { font-size: clamp(32px, 3.4vw, 44px); max-width: 22ch; margin-bottom: 20px;}
.pseo-hero__meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute);
  padding: 14px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  margin: 24px 0 32px;
}
.pseo-tldr {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  background: var(--paper-2);
  padding: 22px 26px;
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 70ch;
}
.pseo-tldr strong { color: var(--ink);}

.pseo-body {
  display: grid; grid-template-columns: 1fr 340px; gap: 64px; padding: 64px 0 96px;
}
@media (max-width: 1040px) { .pseo-body { grid-template-columns: 1fr; gap: 40px;} }
.pseo-article h2 { font-size: 30px; margin-top: 44px; margin-bottom: 14px;}
.pseo-article h2:first-child { margin-top: 0;}
.pseo-article h3 { font-size: 20px; margin-top: 28px; margin-bottom: 10px;}
.pseo-article p { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 66ch;}
.pseo-article ul { padding-left: 0; list-style: none; max-width: 66ch;}
.pseo-article ul li { padding: 10px 0 10px 28px; border-top: 1px dotted var(--rule); position: relative; color: var(--ink-2);}
.pseo-article ul li::before { content: "§"; position: absolute; left: 0; top: 12px; color: var(--accent); font-family: var(--serif);}
.pseo-article ul li:last-child { border-bottom: 1px dotted var(--rule);}

.pseo-sidebar { position: sticky; top: 32px; align-self: start; display: flex; flex-direction: column; gap: 20px;}
.pseo-cta-card {
  border: 2px solid var(--ink);
  padding: 26px 24px;
  background: var(--paper);
}
.pseo-cta-card h3 { font-size: 22px; margin-bottom: 10px;}
.pseo-cta-card p { font-size: 14px; color: var(--ink-2); margin-bottom: 16px;}
.pseo-cta-card .btn { width: 100%; justify-content: center; font-size: 15px;}
.pseo-cta-card .price-line { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 12px; text-align: center;}
.pseo-cta-card .price-line b { color: var(--accent); font-size: 13px;}

.pseo-related { background: var(--paper-2); border: 1px solid var(--rule); padding: 22px 24px;}
.pseo-related h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 12px;}
.pseo-related ul { list-style: none; padding: 0; margin: 0;}
.pseo-related li { padding: 8px 0; border-top: 1px dotted var(--rule); font-size: 13.5px;}
.pseo-related li:first-child { border-top: 0; padding-top: 2px;}
.pseo-related a { color: var(--ink); text-decoration: none;}
.pseo-related a:hover { color: var(--accent);}

/* FAQ */
.faq { border-top: 2px solid var(--ink); margin-top: 44px;}
.faq details { border-bottom: 1px solid var(--rule); padding: 18px 0;}
.faq summary {
  list-style: none; cursor: pointer;
  font-family: var(--serif); font-size: 18px; font-weight: 500;
  display: grid; grid-template-columns: 1fr auto; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none;}
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 22px; color: var(--accent); line-height: 1; transition: transform 0.2s;}
.faq details[open] summary::after { content: "−";}
.faq details p { margin-top: 12px; color: var(--ink-2); font-size: 16px;}

/* ============ Page scaffolding (one doc, multiple pages stacked) ============ */
.page-divider {
  background: var(--ink);
  color: var(--paper);
  padding: 20px 0;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  display: flex; justify-content: space-between;
  position: relative;
}
.page-divider::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
  background-image: repeating-linear-gradient(90deg, transparent 0 12px, rgba(244,238,226,0.04) 12px 13px);
  pointer-events: none;
}
.page-divider__inner { display: flex; justify-content: space-between; width: 100%;}

/* ============ Tweaks panel ============ */
#tweaks {
  position: fixed; bottom: 20px; right: 20px;
  width: 260px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 10px 30px -10px rgba(17,34,58,0.3);
  padding: 0;
  z-index: 1000;
  display: none;
  font-family: var(--serif);
}
#tweaks.open { display: block; }
#tweaks__head {
  background: var(--ink); color: var(--paper);
  padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
}
#tweaks__head button {
  background: transparent; border: 0; color: var(--paper); cursor: pointer;
  font-family: var(--mono); font-size: 14px; line-height: 1;
}
#tweaks__body { padding: 16px 16px 18px;}
.tweak-row { margin-bottom: 14px;}
.tweak-row label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px;}
.swatches { display: flex; gap: 8px;}
.swatch { width: 30px; height: 30px; border: 1px solid var(--rule); cursor: pointer; position: relative;}
.swatch.active { outline: 2px solid var(--ink); outline-offset: 2px;}
.swatch--burgundy { background: #7A2E2A;}
.swatch--forest { background: #1a5d3a;}
.swatch--navy { background: #11223A;}
.swatch--ochre { background: #A86A1C;}
.font-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px;}
.font-row button { padding: 8px 6px; background: var(--paper); border: 1px solid var(--rule); cursor: pointer; font-size: 13px; font-family: var(--serif);}
.font-row button.active { background: var(--ink); color: var(--paper); border-color: var(--ink);}

/* Component spec appendix */
.spec-section { padding: 96px 0; background: var(--paper-2); border-bottom: 1px solid var(--rule);}
.spec-section pre {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 18px 22px;
  font-family: var(--mono); font-size: 12px; line-height: 1.6;
  color: var(--ink);
  overflow-x: auto;
}
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px;}
@media (max-width: 820px) { .spec-grid { grid-template-columns: 1fr;} }
.spec-card { background: var(--paper); border: 1px solid var(--rule); padding: 24px 26px;}
.spec-card h3 { font-size: 20px; margin-bottom: 10px;}
.spec-card p { font-size: 14.5px; color: var(--ink-2);}
.spec-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; margin-top: 10px;}
.spec-card dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); padding-top: 2px;}
.spec-card dd { margin: 0; color: var(--ink);}

.section__figure { margin: 0 0 56px; padding: 14px 14px 12px; background: var(--paper); border: 1px solid var(--rule); box-shadow: 0 1px 0 rgba(17,34,58,0.04); }
.section__figure picture, .section__figure img { display: block; width: 100%; height: auto; }
.section__figure img { max-width: 100%; background: var(--paper); }
.section__figure figcaption { margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); line-height: 1.5; }
.section__figure--aside { max-width: 640px; margin: 0 auto 40px; }
@media (max-width: 760px) { .section__figure { padding: 10px 10px 8px; margin-bottom: 40px; } .section__figure figcaption { font-size: 10px; } }
