/* ─────────────────────────────────────────────────────────────────────
   AI Pulse — design system (v2, static build)
   Palette: deep navy ink, warm off-white paper, pine/signal greens,
   one alert red. Type: Georgia (serif display) · platform UI sans (body) ·
   IBM Plex Mono (labels/sources). All fonts self-hosted.
   ───────────────────────────────────────────────────────────────────── */

:root {
  --paper: #f6f3ed;
  --paper-deep: #ede9e0;
  --card: #fdfcf9;
  --ink: #0f2b3c;
  --ink-soft: #47606e;
  --teal: #14454f;
  --pine: #1d6b52;
  --signal: #2e8b62;
  --alert: #b4432e;
  --amber: #c48a18;
  --night: #0a1620;
  --night-2: #0f2230;
  --night-3: #16303f;
  --line: #ddd7ca;
  --line-soft: #e7e2d6;

  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1320px;
  --gutter: clamp(20px, 4vw, 44px);
}

/* ── reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* belt-and-braces: wide content scrolls in .scroll-x */
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 300; }
p { margin: 0; }
a { color: var(--teal); }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
figure { margin: 0; }
blockquote { margin: 0; }

::selection { background: rgba(29, 107, 82, 0.18); }

/* visible keyboard focus — WCAG */
:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--night); color: var(--paper);
  padding: 10px 18px; z-index: 100; font-size: 14px;
}
.skip-link:focus { left: 8px; top: 8px; }

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

/* ── layout shells ─────────────────────────────────────────────────── */
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 880px; }

.band { padding-block: clamp(72px, 8.5vw, 124px); }
.band--deep { background: var(--paper-deep); border-block: 1px solid var(--line); }
.band--night {
  background: var(--night); color: var(--paper);
  border-block: 1px solid var(--night-3);
}

.split > * { min-width: 0; }
.split { display: grid; gap: clamp(36px, 4.5vw, 64px); margin-top: clamp(36px, 4vw, 56px); }
@media (min-width: 960px) {
  .split { grid-template-columns: 7fr 5fr; align-items: start; }
  .split--reverse { grid-template-columns: 5fr 7fr; }
  .split--reverse .split-side { order: -1; }
}
.cards { display: grid; gap: 24px; margin-top: clamp(36px, 4vw, 56px); }
@media (min-width: 700px) { .cards--two, .cards--four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .cards--two { grid-template-columns: repeat(2, 1fr); }
  .cards--three { grid-template-columns: repeat(3, 1fr); }
  .cards--four { grid-template-columns: repeat(4, 1fr); }
}

.center-note { text-align: center; max-width: 56em; margin: clamp(36px, 4vw, 56px) auto 0; }
.center-link { text-align: center; margin-top: clamp(32px, 4vw, 48px); }

/* ── type ──────────────────────────────────────────────────────────── */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(71, 96, 110, 0.78);
  margin-bottom: 22px;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pine); flex-shrink: 0; }
.eyebrow-num { color: var(--pine); }
.band--night .eyebrow, .hero--night .eyebrow { color: rgba(246, 243, 237, 0.55); }
.band--night .eyebrow-num { color: var(--signal); }
.band--night .eyebrow-dot, .hero--night .eyebrow-dot { background: var(--signal); }

.h-display {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 20em;
}
.h-display--light { color: var(--paper); }

.h-section {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.8vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 24em;
}
.h-section--light { color: var(--paper); }

.h-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.28;
  margin-top: 40px;
}
.prose-flow .h-sub:first-child { margin-top: 0; }
.prose-flow .prose { margin-top: 14px; }

.lede {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 42em;
  margin-top: 24px;
}
.lede--light { color: rgba(246, 243, 237, 0.7); }

.prose { font-size: 15.5px; line-height: 1.8; color: var(--ink-soft); max-width: 44em; }
.prose + .prose, .prose + .source-line, .source-line + .prose { margin-top: 16px; }
.prose--lead { font-size: 17px; color: var(--ink); }
.prose--small { font-size: 14px; line-height: 1.7; }
.prose--light { color: rgba(246, 243, 237, 0.72); }
.prose--light strong { color: var(--paper); }
.band--night .prose { color: rgba(246, 243, 237, 0.72); }
.band--night .prose strong { color: var(--paper); }
.band--night .prose a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(71, 96, 110, 0.62);
}

.source-line {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: rgba(71, 96, 110, 0.62);
  margin-top: 20px;
  max-width: 56em;
}
.band--night .source-line, .hero--night .source-line { color: rgba(246, 243, 237, 0.42); }

.link-arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pine);
  border-bottom: 1px solid rgba(29, 107, 82, 0.35);
  padding-bottom: 3px;
  transition: border-color 0.3s ease;
}
.link-arrow:hover { border-color: var(--pine); }
@media (max-width: 700px) {
  .link-arrow { display: inline-block; margin-top: 12px; }
  /* footer targets: 13.5px text in a 9px-gap grid is a small thing to hit */
  .site-footer nav a { display: block; padding-block: 7px; }
  .site-footer ul { gap: 2px; }
}
.band--night .link-arrow, .hero--night .link-arrow { color: var(--signal); border-color: rgba(46, 139, 98, 0.4); }

/* ── header — always fully opaque (hard rule) ──────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper); /* opaque at all times */
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.site-header.is-scrolled { box-shadow: 0 14px 30px -22px rgba(15, 43, 60, 0.35); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-block: 13px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-name { font-family: var(--font-serif); font-size: 20px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.brand-sub {
  display: block; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(71, 96, 110, 0.6); margin-top: 2px;
}

.nav-primary { display: none; }
.nav-primary ul { display: flex; align-items: center; gap: 24px; }
.nav-primary a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-soft); text-decoration: none;
  position: relative; padding-block: 6px;
}
.nav-primary a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-primary a:hover::after, .nav-primary a[aria-current="page"]::after { transform: scaleX(1); }
.nav-primary a[aria-current="page"] { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.btn {
  display: inline-block; border-radius: 3px; padding: 13px 26px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  border: 1px solid transparent; text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn--primary { background: var(--teal); color: var(--paper); }
.btn--primary:hover { background: var(--pine); color: var(--paper); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--teal); }
.btn--ghost-light { border-color: rgba(246, 243, 237, 0.3); color: var(--paper); background: transparent; }
.btn--ghost-light:hover { border-color: var(--signal); color: var(--signal); }
.btn--small { padding: 9px 18px; font-size: 13px; }
@media (max-width: 560px) { .nav-actions .btn { display: none; } }

.nav-toggle {
  position: relative;
  display: grid; place-items: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: 0; padding: 0;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px; background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span {
  position: absolute; top: 50%; left: 50%; width: 22px; margin: -0.75px 0 0 -11px;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

.nav-mobile { display: none; border-top: 1px solid var(--line); background: var(--paper); }
.nav-mobile.is-open { display: block; }
.nav-mobile ul { display: grid; gap: 2px; padding: 14px var(--gutter) 22px; }
.nav-mobile a {
  display: block; color: var(--ink); text-decoration: none;
  font-size: 15px; padding-block: 9px;
  border-bottom: 1px solid var(--line-soft);
}
.nav-mobile li:last-child a { border-bottom: 0; color: var(--pine); font-weight: 500; }
@media (min-width: 1080px) {
  .nav-primary { display: block; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ── heroes ────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(72px, 9vw, 132px) clamp(64px, 7vw, 104px); }
.hero--page { padding-block: clamp(64px, 8vw, 110px) clamp(48px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.hero--night { background: var(--night); color: var(--paper); border-bottom-color: var(--night-3); }

.hero-grid { display: grid; gap: clamp(40px, 5vw, 72px); align-items: center; }
.hero-grid > * { min-width: 0; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 6fr 5fr; } }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-ctas--center { justify-content: center; }
.hero-note { margin-top: 26px; }
.hero--night .hero-note { color: rgba(246, 243, 237, 0.45); }

.hero-figure {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden;
}
.hero-figure svg, .hero-figure img { display: block; width: 100%; height: auto; border-radius: 6px 6px 0 0; }
.figure img { display: block; width: 100%; height: auto; }

.fig-cap {
  display: grid; gap: 4px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.6; color: var(--ink-soft);
}
.figure { background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
/* Wide diagrams hold 1:1 (see _floor_svg_scale) and scroll rather than
   shrinking their labels out of legibility on narrow columns and phones. */
.figure.has-scroll .fig-cap .mono-label::after { content: " · scroll →"; color: var(--pine); }
.band--night .figure.has-scroll .fig-cap .mono-label::after { color: rgba(246, 243, 237, 0.55); }
.fig-scroll:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
.brand-mark { display: block; }
.fig-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.fig-scroll::-webkit-scrollbar { height: 6px; }
.fig-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.figure svg { display: block; width: 100%; max-width: 100%; height: auto; }
.figure--wide { margin-top: clamp(40px, 5vw, 64px); }
.band--night .figure, .band--night .hero-figure { border-color: rgba(246, 243, 237, 0.14); background: var(--night-2); }
.band--night .fig-cap { border-top-color: rgba(246, 243, 237, 0.1); color: rgba(246, 243, 237, 0.55); }
.band--night .fig-cap .mono-label { color: rgba(246, 243, 237, 0.4); }

.section-head { max-width: 100%; }

/* ── timeline ──────────────────────────────────────────────────────── */
.timeline {
  position: relative; display: grid; gap: 26px;
  padding-left: 22px; border-left: 1px solid rgba(246, 243, 237, 0.18);
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -27px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--signal);
}
.timeline-item--next::before { background: var(--amber); }
.timeline-item p { font-size: 14px; line-height: 1.65; color: rgba(246, 243, 237, 0.72); margin-top: 6px; }
.timeline-date { color: var(--signal); }
.timeline-item--next .timeline-date { color: var(--amber); }
.timeline .source-line { margin-top: 8px; }

/* ── evidence & stats ──────────────────────────────────────────────── */
.evidence-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; }
.big-stat {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(2.25rem, 3vw, 3.25rem); line-height: 1;
  color: var(--alert); letter-spacing: -0.02em;
}

.callout {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--alert);
  border-radius: 0 5px 5px 0;
  padding: 20px 24px;
  margin-top: 28px;
}
.callout--tint { background: rgba(180, 67, 46, 0.07); }
.callout p { font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.callout-figure {
  font-family: var(--font-serif); font-size: 2rem; font-weight: 300;
  color: var(--alert) !important; line-height: 1; margin-bottom: 8px;
}
.callout-figure--small { font-size: 1.4rem; font-family: var(--font-serif); }
.callout--night { background: var(--night-2); border-color: rgba(246, 243, 237, 0.12); border-left-color: var(--signal); margin-top: 0; }
.callout--night p { color: rgba(246, 243, 237, 0.7); }
.callout--night .callout-figure { color: var(--signal) !important; }
.callout--night .source-line { color: rgba(246, 243, 237, 0.42); }
.callout a { text-decoration: underline; text-underline-offset: 3px; }

.pull-quote {
  border-left: 2px solid var(--teal);
  background: var(--card);
  border-radius: 0 6px 6px 0;
  padding: clamp(24px, 3vw, 36px);
}
.pull-quote p {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.5; color: var(--ink);
}
.pull-quote footer {
  margin-top: 18px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.pull-quote cite { font-style: normal; }

.metric-strip { display: grid; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--card); margin: 0; }
.metric {
  display: grid; gap: 6px; padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.metric:last-child { border-bottom: 0; }
.metric dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(71, 96, 110, 0.62); }
.metric dd { margin: 0; font-family: var(--font-serif); font-size: 1.7rem; font-weight: 300; color: var(--teal); line-height: 1; }
.split-side .metric-strip + .source-line { margin-top: 12px; }
.split-side .source-line + .prose { margin-top: 14px; }

/* ── provenance chips ──────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 20px; }
.chip {
  display: inline-flex; align-items: center;
  border-radius: 3px; padding: 4px 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.chip--live { background: rgba(46, 139, 98, 0.12); color: var(--pine); }
.chip--derived { background: rgba(20, 69, 79, 0.1); color: var(--teal); }
.chip--assumption { background: rgba(196, 138, 24, 0.14); color: #7c5c0e; }
.chip--na { background: rgba(71, 96, 110, 0.1); color: var(--ink-soft); }

/* ── ledger card ───────────────────────────────────────────────────── */
.ledger {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(22px, 2.6vw, 30px);
}
.ledger-title { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 400; margin-bottom: 16px; }
.ledger ul { display: grid; }
.ledger li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding-block: 11px; border-bottom: 1px solid var(--line-soft);
}
.ledger li:last-child { border-bottom: 0; }
.ledger li span { font-size: 13.5px; color: var(--ink-soft); }
.ledger li strong {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  color: var(--ink); text-align: right; white-space: nowrap;
}
.ledger-note { margin-top: 16px; }
/* Architecture page: component table and the open-core note. */
.comp-origin {
  display: block; margin-top: 3px; font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 400; color: var(--ink-soft); white-space: normal;
}
.blast {
  display: inline-block; font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 10px;
  border-radius: 3px; border: 1px solid currentColor; white-space: nowrap;
}
.blast--high { color: var(--alert); }
.blast--med  { color: var(--amber); }
.blast--low  { color: var(--pine); }
.note-block {
  margin-top: 26px; padding: 18px 22px; border-radius: 6px;
  background: var(--card); border: 1px solid var(--line);
}
.note-block p:last-child { margin-bottom: 0; }

.ledger .source-line { margin-top: 16px; }

/* ── cards ─────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(24px, 2.8vw, 34px);
  display: flex; flex-direction: column; gap: 14px;
}
.card h3 { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 400; line-height: 1.25; }
.card .prose { flex: 1; }
.card .btn { align-self: flex-start; margin-top: 6px; }
.card-kicker { color: var(--pine); }
.card--night { background: var(--night-2); border-color: rgba(246, 243, 237, 0.12); }
.card--night h3 { color: var(--paper); }
.card--night .card-kicker { color: var(--signal); }
.card--night .tick-list li { color: rgba(246, 243, 237, 0.72); border-color: rgba(246, 243, 237, 0.1); }
.card--night .tick-list li::before { color: var(--signal); }

.tick-list { display: grid; }
.tick-list li {
  position: relative; padding: 9px 0 9px 24px;
  font-size: 14px; line-height: 1.55; color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
}
.tick-list li:last-child { border-bottom: 0; }
.tick-list li::before {
  content: ""; position: absolute; left: 2px; top: 15px;
  width: 10px; height: 5px;
  border-left: 1.6px solid var(--pine); border-bottom: 1.6px solid var(--pine);
  transform: rotate(-45deg);
}

/* pills */
.pill-row { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 6px 14px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.pill--on::before { background: var(--signal); }
.pill--soon::before { background: var(--amber); }
/* Planned: a visible but deliberately quiet marker, so an undated roadmap
   row never reads as a committed one. */
.pill--planned::before { background: var(--line-strong, #c9cfd4); }

/* plans */
.card--plan .plan-price {
  font-family: var(--font-serif); font-size: 1.3rem; color: var(--teal);
  border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px;
}

/* ── comparison & ledger tables ────────────────────────────────────── */
.scroll-hint {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--pine); margin: 0 0 10px;
}
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 6px; }
.scroll-x > * { min-width: 620px; }
.compare-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); }
.compare-table th, .compare-table td {
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
  vertical-align: top; font-size: 14px; line-height: 1.65; text-align: left;
}
.compare-table thead th {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 400;
  background: var(--paper-deep); border-bottom: 1px solid var(--line);
}
.compare-table tbody th {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(71, 96, 110, 0.7);
  font-weight: 500; width: 170px; padding-top: 19px;
}
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }
.table-source {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
  color: rgba(71, 96, 110, 0.6); margin-top: 8px;
}

/* ── faq ───────────────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 22px 0;
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: 400; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: var(--pine);
  transition: transform 0.25s ease;
}
.faq-icon::before { left: 0; top: 6px; width: 14px; height: 1.5px; }
.faq-icon::after { left: 6px; top: 0; width: 1.5px; height: 14px; }
.faq-item[open] .faq-icon::after { transform: rotate(90deg); }
.faq-body { padding-bottom: 24px; max-width: 48em; }

/* ── steps ─────────────────────────────────────────────────────────── */
.steps { display: grid; gap: 20px; margin-top: clamp(36px, 4vw, 52px); counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.step {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 24px 26px;
}
.step-num {
  font-family: var(--font-serif); font-size: 1.9rem; font-weight: 300;
  color: var(--pine); line-height: 1; flex-shrink: 0; width: 34px;
}
.step h3 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 400; margin-bottom: 8px; }

/* ── forms ─────────────────────────────────────────────────────────── */
.cards--demo { align-items: start; }
.form {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(24px, 3vw, 36px);
  display: grid; gap: 20px;
}
.field { display: grid; gap: 7px; }
.field label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 3px;
  background: var(--paper);
  padding: 12px 15px; font: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20, 69, 79, 0.12);
}
.field textarea { resize: vertical; }
.form-note { text-align: center; }
.demo-aside { display: grid; gap: 22px; }
.demo-aside .h-sub { margin-top: 0; }

/* ── footer ────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-deep); }
.footer-grid { display: grid; gap: 40px; padding-block: 56px 44px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand p { margin-top: 16px; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.footer-address {
  font-style: normal; margin-top: 14px;
  font-size: 13.5px; line-height: 1.7; color: var(--ink-soft);
}
.site-footer h3 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(71, 96, 110, 0.6);
  margin-bottom: 14px; font-weight: 500;
}
.site-footer ul { display: grid; gap: 9px; }
.site-footer nav a { color: var(--ink); font-size: 13.5px; text-decoration: none; }
.site-footer nav a:hover { color: var(--pine); }
.footer-fine {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  border-top: 1px solid var(--line); padding-block: 20px;
}
.footer-fine p {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em;
  color: rgba(71, 96, 110, 0.55);
}

/* ── reveal animation (progressive enhancement only) ───────────────── */
.reveal { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-inview { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* timeline compact per-item source */
.timeline-src { margin-top: 6px; color: rgba(246, 243, 237, 0.4); }
.timeline + .source-line { margin-top: 26px; }

/* ── framework coverage grid ───────────────────────────────────────── */
.framework-grid { margin-top: clamp(28px, 3vw, 40px); align-items: start; }
.framework-grid .card { padding: 22px 22px 20px; }
.framework-grid .mono-label { color: var(--accent); margin-bottom: 12px; }
.framework-grid .tick-list { gap: 7px; }
.framework-grid .tick-list li { font-size: 13px; line-height: 1.5; }
@media (max-width: 700px) { .framework-grid .card { padding: 20px 18px; } }

/* ledger rows: label and value stack rather than overflow on very narrow screens */
.ledger li > * { min-width: 0; }
@media (max-width: 460px) {
  .ledger li { flex-wrap: wrap; gap: 2px 12px; }
  .ledger li strong { flex: 1 1 100%; }
}
