/* Cairn marketing site — a long-scroll technical field guide.
   Brand tokens lifted from web/styles.css: warm paper, ink, terracotta accent,
   serif display. No external fonts, scripts, or CDNs; light + dark themes. */

:root {
  color-scheme: light;
  --code-k: rgba(33, 30, 24, 0.55);
  --code-s: rgba(33, 30, 24, 0.6);
  --code-v: var(--plate-ink);
  --code-h: var(--plate-ink);
  --code-c: var(--plate-muted-3);
  --paper: #f7f4ed;
  --paper-2: #f1ece2;
  --surface: #fdfbf6;
  --surface-2: #f4efe4;
  --ink: #211e18;
  --ink-2: #4a4438;
  --ink-3: #6f6759;
  --line: #e4ded0;
  --line-strong: #d4ccba;
  --accent: #b3542b;
  --accent-strong: #974321;
  --accent-soft: #f4e3d7;
  --accent-ink: #7d3818;
  --accent-contrast: #fff8f0;
  --moss: #43694f;
  --gold: #9a7420;
  --danger: #a33a32;
  --blue: #376a94;
  --plum: #705a97;
  --olive: #5c7838;

  --plate: #e5e0d2;
  --plate-2: #f0ebdd;
  --plate-line: rgba(33, 30, 24, 0.14);
  --plate-moss: #43694f;
  --plate-ink: #1f1c17;
  --plate-muted: rgba(33, 30, 24, 0.85);
  --plate-muted-2: rgba(33, 30, 24, 0.5);
  --plate-muted-3: rgba(33, 30, 24, 0.6);
  --plate-accent: #b3542b;

  --shadow-sm: 0 1px 2px rgba(28, 24, 18, 0.05), 0 4px 12px -6px rgba(28, 24, 18, 0.08);
  --shadow-md: 0 12px 32px -12px rgba(28, 24, 18, 0.18), 0 2px 6px rgba(28, 24, 18, 0.05);
  --shadow-lg: 0 32px 80px -24px rgba(28, 24, 18, 0.28), 0 8px 24px -12px rgba(28, 24, 18, 0.12);

  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 13px;
  --r-lg: 18px;
  --r-xl: 24px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-ui: "Aptos", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;

  --container: 1180px;
  --gutter: clamp(20px, 4.5vw, 48px);
  --section: clamp(88px, 10vw, 148px);
  --header-h: 72px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --code-k: #d9a880;
  --code-s: #b8c99a;
  --code-v: #9fbad4;
  --code-h: #f1ece1;
  --code-c: rgba(241, 236, 225, 0.34);
  --paper: #14120f;
  --paper-2: #100e0c;
  --surface: #1b1814;
  --surface-2: #221e18;
  --ink: #f1ece1;
  --ink-2: #c9c1b2;
  --ink-3: #9a9182;
  --line: #302b23;
  --line-strong: #3d372d;
  --accent: #df8154;
  --accent-strong: #ef9569;
  --accent-soft: #3a2519;
  --accent-ink: #f0a37d;
  --accent-contrast: #1b120c;
  --moss: #82b696;
  --gold: #d3ab5b;
  --danger: #e08279;
  --blue: #89a7c9;
  --plum: #ae97d1;
  --olive: #a4bf7c;

  --plate: #0d0b09;
  --plate-2: #15120f;
  --plate-line: rgba(241, 236, 225, 0.16);
  --plate-moss: #82b696;
  --plate-ink: #f1ece1;
  --plate-muted: rgba(241, 236, 225, 0.7);
  --plate-muted-2: rgba(241, 236, 225, 0.45);
  --plate-muted-3: rgba(241, 236, 225, 0.34);
  --plate-accent: #ef9569;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px -6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 14px 36px -12px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 36px 90px -28px rgba(0, 0, 0, 0.7), 0 8px 24px -12px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg { max-width: 100%; }

img { height: auto; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 500;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

code, pre, kbd {
  font-family: var(--font-mono);
}

code {
  font-size: 0.86em;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border-radius: 4px;
  padding: 0.12em 0.36em;
}

kbd {
  font-size: 0.74em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.1em 0.34em;
  background: var(--surface);
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 2px;
}

.plate :focus-visible {
  outline-color: var(--plate-accent);
}

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

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.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;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.skip-link:focus { transform: translateY(0); }

.wrap {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--section);
}

.section-tint {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 16%, transparent);
}

.section-head {
  max-width: 900px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
}

.h-muted { color: var(--ink-3); }

.lede {
  max-width: 64ch;
  margin-top: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.lede code { color: var(--ink); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--paper); }
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand img {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(28, 24, 18, 0.16);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.38rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-version {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-inline: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.site-nav a:hover {
  background: var(--surface);
  color: var(--ink);
}

.site-nav a[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.icon-btn:hover {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.text-btn:hover { background: var(--surface); color: var(--ink); }
.text-btn .icon { width: 16px; height: 16px; }

.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease), transform 0.12s var(--ease), box-shadow 0.18s var(--ease);
}

.btn .icon { width: 17px; height: 17px; }

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ink-3);
  background: var(--paper);
}

.header-cta {
  min-height: 38px;
  padding: 0 15px;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* ------------------------------------------------------------------- cmd */

.cmd {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 8px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  box-shadow: var(--shadow-sm);
}

.cmd code {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-size: 1em;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cmd-prompt {
  color: var(--accent);
  font-weight: 700;
  user-select: none;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-3);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.copy-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line-strong);
}

.copy-btn .icon { width: 13px; height: 13px; }
.copy-btn .icon-done { display: none; }

.copy-btn.is-copied { color: var(--moss); border-color: color-mix(in srgb, var(--moss) 40%, var(--line)); }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-done { display: block; }

.cmd-dark {
  background: var(--plate-2);
  border-color: var(--plate-line);
  color: var(--plate-ink);
  box-shadow: none;
}

.cmd-dark code { color: var(--plate-ink); }
.cmd-dark .cmd-prompt { color: var(--plate-accent); }

.copy-btn-dark {
  background: rgba(241, 236, 225, 0.06);
  border-color: var(--plate-line);
  color: var(--plate-muted);
}

.copy-btn-dark:hover {
  background: rgba(241, 236, 225, 0.11);
  border-color: rgba(241, 236, 225, 0.28);
  color: var(--plate-ink);
}

.cmd .code-multi {
  white-space: pre;
  line-height: 1.65;
  padding-block: 4px;
}

.cmd:has(.code-multi) { align-items: flex-start; }
.cmd .code-multi + .copy-btn { margin-top: 2px; }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: clip;
  padding-top: clamp(48px, 7vw, 84px);
  padding-bottom: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
  mask-image: linear-gradient(115deg, transparent 8%, #000 42%, transparent 88%);
  -webkit-mask-image: linear-gradient(115deg, transparent 8%, #000 42%, transparent 88%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -140px;
  right: -120px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
}

.hero-copy { max-width: 640px; }

.hero h1 {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 5.5vw, 4.9rem);
  font-weight: 400;
  line-height: 0.99;
  letter-spacing: -0.028em;
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
  letter-spacing: -0.03em;
}

.hero-lede {
  max-width: 56ch;
  margin-top: 24px;
  font-size: 1.1rem;
  line-height: 1.68;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.cmd-hero {
  max-width: 360px;
  margin-top: 24px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 27px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero-facts li { display: inline-flex; align-items: center; }

.hero-facts li + li::before {
  content: "·";
  margin: 0 10px;
  color: var(--line-strong);
}

.hero-visual {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.frame {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 13px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-3);
}

.frame-dots { display: flex; gap: 5px; flex-shrink: 0; }

.frame-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.frame-dots i:first-child { background: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); }

.frame-address {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame-tag {
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.58rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 6px;
}

.frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1440 / 1000;
  object-fit: cover;
  object-position: top center;
}

.shot-dark { display: none; }
.frame img.shot-dark { display: none; }
[data-theme="dark"] .frame img.shot-light { display: none; }
[data-theme="dark"] .frame img.shot-dark { display: block; }

.note-peek {
  position: absolute;
  left: -40px;
  bottom: -26px;
  width: 280px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.note-peek-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.note-peek-kind {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.status-pill {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
}

.status-accepted {
  color: var(--moss);
  background: color-mix(in srgb, var(--moss) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--moss) 28%, transparent);
}

.note-peek-title {
  margin: 9px 0 6px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.note-peek-body {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.note-peek-path {
  margin: 11px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clients-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: clamp(64px, 8vw, 104px);
  padding-block: 22px 34px;
  border-top: 1px solid var(--line);
}

.clients-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex-shrink: 0;
}

.clients-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.clients-list li {
  font-size: 0.8rem;
  color: var(--ink-2);
}

.clients-list li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  vertical-align: 2px;
}

/* -------------------------------------------------------------- reveal */

.has-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.has-reveal .reveal.is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.is-theme-switching *,
.is-theme-switching *::before,
.is-theme-switching *::after {
  transition: none !important;
}

/* ------------------------------------------------------------ why / ledger */

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.compare-col { padding: clamp(22px, 3vw, 38px); }

.compare-before { border-right: 1px solid var(--line); }

.compare-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.compare-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
}

.compare-after .compare-badge {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

.compare-head h3 {
  margin-top: 13px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  letter-spacing: -0.015em;
}

.ledger { margin-top: 6px; }

.ledger li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px dashed var(--line);
}

.ledger li:last-child { border-bottom: 0; padding-bottom: 0; }

.ledger-mark {
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
}

.compare-after .ledger-mark {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.ledger strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.ledger p {
  margin: 4px 0 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-3);
}

.compare-before strong { color: var(--ink-2); }
.compare-after strong { color: var(--ink); }

.pull {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: end;
  gap: clamp(24px, 5vw, 72px);
  margin-top: clamp(52px, 6vw, 88px);
  padding-top: clamp(30px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

.pull-line {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.024em;
}

.pull-body p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------- loop */

.loop {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.loop-step {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--surface);
}

.loop-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  padding-top: 5px;
  border-top: 2px solid var(--accent);
  align-self: start;
}

.loop-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.loop-body p {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
}

.tool-chips code {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 0.68rem;
}

.loop-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 2px solid var(--moss);
  background: color-mix(in srgb, var(--moss) 5%, transparent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.loop-note-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss);
  white-space: nowrap;
}

/* ------------------------------------------------------------- arch plate */

.plate {
  background: var(--plate);
  color: var(--plate-ink);
}

.plate .section-head h2 { color: var(--plate-ink); }
.plate .lede { color: var(--plate-muted); }
.plate .lede code {
  background: rgba(241, 236, 225, 0.09);
  color: var(--plate-ink);
}

.plate-eyebrow { color: var(--plate-accent); }
.plate-muted { color: var(--plate-muted); }

.arch {
  margin: 0;
  border: 1px solid var(--plate-line);
  border-radius: var(--r-lg);
  background: var(--plate-2);
  overflow: hidden;
}

.arch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--plate-line);
  background: color-mix(in srgb, var(--plate-ink) 2.5%, transparent);
}

.arch-figure-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plate-muted);
}

.arch-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--plate-muted);
}

.arch-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  display: inline-block;
  width: 18px;
  border-top: 1.5px solid var(--plate-accent);
}

.legend-line.is-dashed {
  border-top-style: dashed;
  border-top-color: var(--plate-muted-2);
}

.arch-stack { padding: clamp(14px, 2.2vw, 24px); }

.arch-layer {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: clamp(12px, 2vw, 24px);
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid var(--plate-line);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--plate-ink) 3.5%, transparent);
}

.arch-layer-vault {
  background: rgba(224, 138, 94, 0.07);
  border-color: rgba(224, 138, 94, 0.3);
}

.arch-index {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

.arch-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--plate-accent);
  letter-spacing: 0.08em;
}

.arch-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--plate-muted);
}

.arch-layer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 7px;
}

.arch-layer-head h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--plate-ink);
}

.arch-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--plate-muted);
  border: 1px solid var(--plate-line);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.arch-badge-truth {
  color: var(--plate-accent);
  border-color: rgba(224, 138, 94, 0.4);
  background: rgba(224, 138, 94, 0.08);
}

.arch-content > p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--plate-muted);
  max-width: 84ch;
}

.arch-content > p strong { color: var(--plate-ink); font-weight: 600; }

.arch-content code {
  background: color-mix(in srgb, var(--plate-ink) 7%, transparent);
  color: var(--plate-ink);
}

.arch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.arch-chips li {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--plate-muted);
  border: 1px solid var(--plate-line);
  border-radius: 4px;
  padding: 2px 7px;
}

.arch-chips-mono li { color: var(--plate-muted); }

.arch-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}

.arch-cell {
  padding: 13px 14px;
  border: 1px solid var(--plate-line);
  border-radius: var(--r-sm);
  background: rgba(15, 13, 10, 0.35);
}

.arch-cell-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--plate-muted);
  margin-bottom: 5px;
}

.arch-cell h4 {
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--plate-ink);
}

.arch-cell p {
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--plate-muted);
}

.arch-cell .path {
  display: block;
  margin-top: 9px;
  font-size: 0.6rem;
  color: var(--plate-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arch-tree {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.7;
  color: var(--plate-ink);
  white-space: pre;
  overflow-x: auto;
  scrollbar-width: thin;
}

.arch-fineprint {
  margin-top: 13px !important;
  padding-top: 11px;
  border-top: 1px dashed var(--plate-line);
  font-size: 0.72rem !important;
  color: var(--plate-muted) !important;
}

.arch-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding-left: 22px;
}

.arch-link::before {
  content: "";
  position: absolute;
  left: 48px;
  top: 0;
  bottom: 0;
  border-left: 1.5px solid rgba(224, 138, 94, 0.5);
}

.arch-link::after {
  content: "";
  position: absolute;
  left: 45px;
  bottom: 12px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--plate-accent);
  border-bottom: 1.5px solid var(--plate-accent);
  transform: rotate(45deg);
}

.arch-link span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--plate-muted);
  text-align: center;
  max-width: 52ch;
}

.arch-link.is-derived::before {
  border-left-style: dashed;
  border-left-color: rgba(241, 236, 225, 0.3);
}

.arch-link.is-derived::after {
  border-color: rgba(241, 236, 225, 0.4);
}

.arch figcaption {
  padding: 14px 18px;
  border-top: 1px solid var(--plate-line);
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--plate-muted);
}

.arch-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
  margin-top: clamp(36px, 4vw, 52px);
}

.arch-notes article { border-top: 1px solid var(--plate-line); padding-top: 16px; }

.arch-note-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--plate-accent);
  letter-spacing: 0.08em;
}

.arch-notes h3 {
  margin-top: 7px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--plate-ink);
}

.arch-notes p {
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--plate-muted);
}

.arch-quote {
  margin: clamp(40px, 5vw, 64px) auto 0;
  max-width: 44ch;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--plate-ink);
}

.arch-quote span { color: var(--plate-accent); }

/* ------------------------------------------------------------ note kinds */

.kinds {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kind {
  --kind-color: var(--ink-3);
  padding: 20px 21px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.kind:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.kind-decision { --kind-color: var(--moss); }
.kind-change { --kind-color: var(--accent); }
.kind-insight { --kind-color: var(--plum); }
.kind-question { --kind-color: var(--gold); }
.kind-answer { --kind-color: var(--blue); }
.kind-spec { --kind-color: var(--blue); }
.kind-risk { --kind-color: var(--danger); }
.kind-task { --kind-color: var(--olive); }

.kind-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kind-color, var(--ink-3));
  flex-shrink: 0;
}

.kind-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kind-head h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.kind-status {
  margin: 7px 0 0;
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.02em;
  color: var(--kind-color);
  opacity: 0.95;
}

.kind > p:last-child {
  margin-top: 9px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.kinds-extra {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.kinds-extra > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 9px;
  padding: 15px 18px;
  background: var(--paper-2);
}

.kinds-extra .kind-dot { margin-top: 7px; }
.kinds-extra strong { font-size: 0.82rem; font-weight: 600; }
.kinds-extra p {
  grid-column: 2;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.kind-message { --kind-color: var(--accent); }
.kind-handoff { --kind-color: var(--moss); }
.kind-session { --kind-color: var(--ink-3); }
.kind-note { --kind-color: var(--ink-3); }

.edges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(32px, 4vw, 48px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.edge-group { padding: clamp(20px, 3vw, 30px); background: var(--surface); }

.edge-group h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -0.012em;
}

.edge-group > p {
  margin: 6px 0 18px;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.edge-list li {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px dashed var(--line);
}

.edge-list code {
  background: none;
  padding: 0;
  color: var(--accent-ink);
  font-size: 0.72rem;
}

.edge-list span {
  font-size: 0.79rem;
  color: var(--ink-2);
  line-height: 1.5;
}

/* --------------------------------------------------------------- specimen */

.specimen {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 0;
  margin-top: clamp(40px, 5vw, 64px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.specimen-code { min-width: 0; background: var(--plate); }

.code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px 0 14px;
  border-bottom: 1px solid var(--plate-line);
  background: var(--plate-2);
}

.code-dots { display: flex; gap: 5px; flex-shrink: 0; }

.code-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(241, 236, 225, 0.18);
}

.code-dots i:first-child { background: rgba(224, 138, 94, 0.6); }

.code-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--plate-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code-block {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.72;
  color: var(--plate-ink);
  scrollbar-width: thin;
}

.code-block code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.code-block .c { color: var(--plate-muted-3); }
.code-block .k { color: var(--code-k); }
.code-block .s { color: var(--code-s); }
.code-block .v { color: var(--code-v); }
.code-block .h { color: var(--code-h); font-weight: 600; }

.specimen-notes {
  padding: clamp(20px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.specimen-note {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.specimen-note:last-of-type { border-bottom: 0; padding-bottom: 0; }

.specimen-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
  padding-top: 3px;
}

.specimen-note h3 {
  font-size: 0.86rem;
  font-weight: 600;
}

.specimen-note p {
  margin-top: 4px;
  font-size: 0.79rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.specimen-callout {
  margin-top: auto;
  padding: 13px 15px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  line-height: 1.55;
}

.specimen-callout code {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: inherit;
}

/* ------------------------------------------------------------------- MCP */

.contract {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.contract > div { padding: clamp(20px, 2.6vw, 28px); background: var(--surface); }

.contract-step {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.contract h3 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.contract p {
  margin-top: 6px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.tool-group { margin-top: clamp(36px, 4vw, 52px); }

.tool-group-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 8px 28px;
  margin-bottom: 14px;
}

.tool-group-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tool-group-head h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.015em;
}

.group-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 8px;
}

.tool-group-head > p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-3);
  text-align: right;
  justify-self: end;
  max-width: 54ch;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  scrollbar-width: thin;
}

.table-scroll:focus-visible { outline-offset: 4px; }

.tool-table,
.plain-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.tool-table th,
.tool-table td,
.plain-table th,
.plain-table td {
  padding: 13px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.tool-table thead th,
.plain-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.tool-table tbody tr:last-child th,
.tool-table tbody tr:last-child td,
.plain-table tbody tr:last-child th,
.plain-table tbody tr:last-child td { border-bottom: 0; }

.tool-table tbody tr:hover,
.plain-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 3%, transparent); }

.tool-table th[scope="row"] { width: 21%; min-width: 190px; }
.tool-table td:first-of-type { width: 48%; }
.tool-table td,
.tool-table th {
  line-height: 1.6;
  color: var(--ink-2);
}

.tool-name {
  background: none;
  padding: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-ink);
  white-space: nowrap;
}

.tool-table td code,
.plain-table td code { font-size: 0.74rem; }

.resources {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(40px, 5vw, 56px);
}

.resources-copy { align-self: center; padding-right: 12px; }

.resources-copy h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -0.015em;
}

.resources-copy p {
  margin-top: 7px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--ink-3);
}

.resource-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.resource-card > code {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--accent-ink);
  font-size: 0.7rem;
}

.resource-card p {
  margin: 10px 0 0;
  font-size: 0.79rem;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ----------------------------------------------------------------- trace */

.trace {
  margin-top: clamp(40px, 5vw, 60px);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--plate);
  border: 1px solid var(--plate-line);
  box-shadow: var(--shadow-md);
}

.trace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  height: 42px;
  border-bottom: 1px solid var(--plate-line);
  background: var(--plate-2);
}

.trace-title {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--plate-muted);
}

.trace-lights { display: flex; gap: 5px; }

.trace-lights i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(241, 236, 225, 0.16);
}

.trace-lights i:first-child { background: rgba(224, 138, 94, 0.55); }

.trace-badge {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--plate-muted);
  border: 1px solid var(--plate-line);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.trace-body {
  padding: 8px clamp(14px, 2vw, 24px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
}

.trace-row {
  padding: 13px 0;
  border-bottom: 1px dashed var(--plate-line);
}

.trace-row:last-child { border-bottom: 0; }

.trace-call {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
  color: var(--plate-ink);
}

.trace-prompt { color: var(--plate-accent); }

.trace-tool {
  color: var(--plate-accent);
  font-weight: 600;
}

.trace-args {
  color: var(--ink-3);
  word-break: break-word;
}

.trace-result {
  margin: 5px 0 0;
  padding-left: 16px;
  color: var(--ink-2);
  word-break: break-word;
}

.trace-ok { color: var(--moss); margin-right: 4px; }

.trace-id {
  color: var(--ink);
  border-bottom: 1px dotted var(--line-strong);
}

.trace-foot {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--plate-line);
  background: rgba(33, 30, 24, 0.02);
  font-size: 0.66rem;
  line-height: 1.55;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- install */

.prereq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 0.78rem;
  color: var(--ink-2);
}

.prereq-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 3px 7px;
}

.prereq code { font-size: 0.72rem; }
.prereq-arrow { color: var(--ink-3); }
.prereq-div { width: 1px; height: 16px; background: var(--line); }
.prereq span:last-child code { font-size: 0.72rem; }

.install-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.install-steps > li {
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.4vw, 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  color: var(--accent);
}

.install-steps h3 {
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

.install-steps p {
  margin: 7px 0 16px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.install-steps .cmd { margin-top: auto; }

.cmd .copy-btn { align-self: center; }

.install-tabs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: clamp(32px, 4vw, 44px);
  border-top: 1px solid var(--line);
}

.install-tabs-head h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -0.018em;
}

.install-tabs-head p {
  margin-top: 5px;
  font-size: 0.86rem;
  color: var(--ink-3);
  max-width: 62ch;
}

.tab-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-3);
}

.tab-legend li { display: inline-flex; align-items: center; gap: 6px; }

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: transparent;
}

.legend-dot.is-auto {
  background: var(--moss);
  border-color: var(--moss);
}

.tabs {
  margin-top: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 7px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.tablist [role="tab"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  font-size: 0.79rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.tablist [role="tab"]:hover {
  background: var(--surface);
  color: var(--ink);
}

.tablist [role="tab"][aria-selected="true"] {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(28, 24, 18, 0.06);
}

.tab-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  flex-shrink: 0;
}

.tab-dot.is-auto { background: var(--moss); border-color: var(--moss); }

.tab-panel {
  padding: clamp(20px, 3vw, 32px);
}

.tab-panel[hidden] { display: none; }

.tab-panel:focus-visible { outline-offset: -2px; }

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-head h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.panel-head p {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--ink-3);
  max-width: 66ch;
}

.panel-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px 9px;
}

.panel-badge.is-auto {
  color: var(--moss);
  border-color: color-mix(in srgb, var(--moss) 35%, transparent);
  background: color-mix(in srgb, var(--moss) 7%, transparent);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.panel-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.file-list li {
  display: block;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}

.file-list li:first-child { border-top: 0; padding-top: 0; }

.file-list code {
  display: inline-block;
  margin-right: 3px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.7rem;
}

.file-list > li > span:not(.file-list-plain) {
  display: block;
  margin-top: 3px;
  font-size: 0.77rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.file-list-plain {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-ink);
}

.panel-note {
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background: var(--paper-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.panel-note p {
  font-size: 0.81rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.panel-note p + p { margin-top: 9px; }

.snippet {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  overflow: hidden;
}

.snippet summary {
  padding: 11px 15px;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.snippet summary::-webkit-details-marker { display: none; }

.snippet summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-3);
  flex-shrink: 0;
}

.snippet[open] summary::after { content: "−"; }

.snippet summary:hover { background: var(--surface-2); color: var(--ink); }

.snippet .cmd { margin: 0 10px 10px; }
.snippet > p { padding: 0 15px 13px; font-size: 0.8rem; line-height: 1.6; color: var(--ink-2); }
.snippet > p:first-of-type { padding-top: 2px; }

.snippet-quiet { margin-top: 12px; }

.install-extra {
  display: grid;
  gap: 16px;
  margin-top: clamp(36px, 4vw, 52px);
}

.install-block {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.install-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.install-block-head h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.018em;
}

.install-block-head p {
  margin-top: 5px;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 68ch;
}

.cmd-inline { min-height: 38px; padding: 5px 5px 5px 11px; font-size: 0.74rem; box-shadow: none; }
.cmd-inline .copy-btn { min-height: 26px; }

.rule-skill {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.rule-skill article { padding: 20px; background: var(--paper-2); }
.rule-skill h4 { margin-top: 7px; font-family: var(--font-display); font-size: 1.2rem; }
.rule-skill p { margin-top: 6px; font-size: 0.82rem; line-height: 1.6; color: var(--ink-2); }

.path-line { font-size: 0.7rem !important; color: var(--ink-3) !important; line-height: 1.7 !important; }
.path-line code { font-size: 0.67rem; }

.install-fineprint {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 0.76rem !important;
  line-height: 1.6;
  color: var(--ink-3) !important;
}

.plain-table th[scope="row"] {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.plain-table th[scope="row"] code { font-size: 0.78rem; }

.row-note {
  display: inline-block;
  margin-left: 5px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 1px 5px;
  vertical-align: 1px;
}

.flags-table th[scope="row"] { width: 32%; }

.env-table th[scope="row"] { width: 25%; }
.env-table td:nth-child(2) { white-space: nowrap; }

/* --------------------------------------------------------------- workspace */

.workspace-hero { margin: 0; }

.workspace-hero .frame { box-shadow: var(--shadow-lg); }

.workspace-hero figcaption {
  margin-top: 14px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 92ch;
}

.workspace-hero figcaption strong { color: var(--ink-2); font-weight: 600; }

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(44px, 5vw, 64px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.features article {
  padding: clamp(18px, 2.5vw, 26px);
  background: var(--surface);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--accent-ink);
}

.feature-icon .icon { width: 17px; height: 17px; }

.features h3 { font-size: 0.95rem; font-weight: 600; }

.features p {
  margin-top: 6px;
  font-size: 0.81rem;
  line-height: 1.6;
  color: var(--ink-3);
}

.features kbd { font-size: 0.68rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 20px);
  margin-top: clamp(44px, 5vw, 64px);
  align-items: start;
}

.gallery-item {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.span-7 { grid-column: span 6; }
.span-5 { grid-column: span 6; }

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1440 / 1000;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.gallery-item figcaption {
  padding: 13px 16px 15px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-3);
}

.gallery-item figcaption strong { color: var(--ink); font-weight: 600; }

.detail-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 22px 16px 0;
  background:
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 65%),
    var(--surface);
}

.phone-frame {
  width: min(250px, 100%);
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: var(--ink);
  box-shadow: var(--shadow-md);
}

.phone-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top center;
  border: 0;
  border-radius: 20px;
}

.detail-phone figcaption {
  padding: 16px 6px 18px;
  max-width: 46ch;
  text-align: center;
}

.workspace-note {
  margin-top: 24px;
  font-size: 0.83rem;
  color: var(--ink-3);
  text-align: center;
}

/* --------------------------------------------------------------- security */

.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.security-aside h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.018em;
  color: var(--plate-ink);
}

.security-aside > p {
  margin-top: 7px;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--plate-muted);
}

.vault-tree {
  margin: 16px 0;
  padding: 16px 17px;
  background: rgba(15, 13, 10, 0.55);
  border: 1px solid var(--plate-line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.75;
  color: rgba(241, 236, 225, 0.74);
  overflow-x: auto;
  scrollbar-width: thin;
}

.tree-note { color: rgba(241, 236, 225, 0.38); }

.code-multi-wrap { align-items: flex-start; background: var(--plate-2); }
.code-multi-wrap .code-multi { padding-block: 4px; }

.security-fineprint {
  margin-top: 10px;
  font-size: 0.72rem !important;
  line-height: 1.6;
  color: var(--plate-muted) !important;
}

.ownership-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  border: 1px solid var(--plate-line);
  background: var(--plate-line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.ownership-list li {
  display: block;
  padding: 12px 13px;
  background: var(--plate-2);
}

.ownership-list strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--plate-accent);
}

.ownership-list span {
  display: block;
  margin-top: 4px;
  font-size: 0.73rem;
  line-height: 1.5;
  color: var(--plate-muted);
}

.ownership-list code,
.guarantee code {
  background: color-mix(in srgb, var(--plate-ink) 7%, transparent);
  color: var(--plate-ink);
  font-size: 0.7rem;
}

.guarantees { display: grid; gap: 1px; background: var(--plate-line); border: 1px solid var(--plate-line); border-radius: var(--r-md); overflow: hidden; }

.guarantee {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 15px;
  padding: 20px 22px;
  background: var(--plate-2);
}

.guarantee-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--plate-line);
  border-radius: 8px;
  color: var(--plate-accent);
  background: rgba(224, 138, 94, 0.06);
}

.guarantee-icon .icon { width: 16px; height: 16px; }

.guarantee h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--plate-ink);
}

.guarantee p {
  margin-top: 5px;
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--plate-muted);
}

.guarantee code {
  background: color-mix(in srgb, var(--plate-ink) 7%, transparent);
  color: var(--plate-ink);
  font-size: 0.74rem;
}

.honesty {
  margin-top: clamp(32px, 4vw, 48px);
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(224, 138, 94, 0.32);
  border-radius: var(--r-md);
  background: rgba(224, 138, 94, 0.06);
}

.honesty-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  margin-bottom: 18px;
}

.honesty-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(224, 138, 94, 0.35);
  border-radius: 9px;
  color: var(--plate-accent);
}

.honesty-icon .icon { width: 18px; height: 18px; }

.honesty h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -0.015em;
  color: var(--plate-ink);
}

.honesty-head p {
  margin-top: 5px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--plate-muted);
}

.honesty-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
}

.honesty-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.79rem;
  line-height: 1.6;
  color: var(--plate-muted);
}

.honesty-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--plate-accent);
}

.honesty-list strong { display: block; color: var(--plate-ink); font-weight: 600; }

.honesty-list li code, .guarantee p code {
  background: color-mix(in srgb, var(--plate-ink) 7%, transparent);
  color: var(--plate-ink);
  font-size: 0.72rem;
}

/* ----------------------------------------------------------------- deploy */

.deploy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.deploy-code h3,
.deploy-env h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

.deploy-fine {
  margin-top: 11px;
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--ink-3);
}

.deploy-checklist {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.deploy-checklist li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 2px 10px;
  font-size: 0.79rem;
  line-height: 1.55;
  color: var(--ink-3);
}

.deploy-checklist li::before {
  content: "✓";
  grid-row: span 2;
  color: var(--moss);
  font-size: 0.72rem;
  line-height: 1.7;
}

.deploy-checklist strong {
  grid-column: 2;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.deploy-checklist span { grid-column: 2; }

.deploy-env .table-scroll { font-size: 0.75rem; }
.deploy-env .plain-table th,
.deploy-env .plain-table td { padding: 9px 12px; }
.deploy-env .plain-table code { font-size: 0.7rem; }
.deploy-env .plain-table td { font-size: 0.75rem; line-height: 1.55; }

.recipes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
}

.recipe {
  display: flex;
  flex-direction: column;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.recipe:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.recipe-kicker {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.recipe h3 {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.012em;
}

.recipe p {
  margin: 6px 0 16px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-3);
}

.recipe-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-2);
}

.recipe:hover .recipe-link { color: var(--accent-ink); }

.recipe-link .icon { width: 13px; height: 13px; transition: transform 0.18s var(--ease); }
.recipe:hover .recipe-link .icon { transform: translate(1px, -1px); }

/* -------------------------------------------------------------------- FAQ */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.faq-aside {
  position: sticky;
  top: calc(var(--header-h) + 28px);
}

.faq-aside h2 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
}

.faq-aside > p:not(.eyebrow) {
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-3);
}

.faq-links { display: grid; gap: 2px; margin-top: 22px; }

.faq-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--line);
  transition: color 0.15s var(--ease);
}

.faq-links a:hover { color: var(--accent-ink); }
.faq-links .icon { width: 13px; height: 13px; }

.faq-list { border-top: 1px solid var(--line-strong); }

.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 2px;
  font-size: 0.95rem;
  font-weight: 550;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s var(--ease);
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-3);
  transition: transform 0.2s var(--ease), color 0.15s var(--ease);
}

.faq-list details[open] summary { color: var(--accent-ink); }
.faq-list details[open] summary::after { content: "−"; color: var(--accent-ink); }
.faq-list summary:hover { color: var(--accent-ink); }

.faq-list details > p {
  padding: 0 26px 20px 2px;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 72ch;
}

/* -------------------------------------------------------------------- CTA */

.cta-section { padding-block: clamp(72px, 9vw, 120px); }

.cta-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse at 88% 10%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.cta-mark {
  grid-column: 2;
  grid-row: 1;
  width: min(100%, 280px);
  height: auto;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
}

.cta-content { grid-column: 1; grid-row: 1; max-width: 640px; }

.cta-content h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.cta-content h2 em { color: var(--accent); font-style: italic; }

.cta-content > p {
  margin-top: 16px;
  font-size: 0.96rem;
  line-height: 1.68;
  color: var(--ink-2);
  max-width: 56ch;
}

.cta-cmd { max-width: 340px; margin-top: 22px; }

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.cta-meta {
  margin-top: 18px !important;
  font-family: var(--font-mono);
  font-size: 0.63rem !important;
  letter-spacing: 0.04em;
  color: var(--ink-3) !important;
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  padding-block: clamp(44px, 5vw, 64px) 28px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 34ch;
}

.footer-brand .brand img { border-radius: 9px; }

.footer-fine {
  font-size: 0.74rem !important;
  color: var(--ink-3) !important;
}

.footer-col { display: flex; flex-direction: column; gap: 7px; }

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.82rem;
  color: var(--ink-2);
  width: fit-content;
  transition: color 0.15s var(--ease);
}

.footer-col a:hover { color: var(--accent-ink); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(36px, 4vw, 52px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.71rem;
  color: var(--ink-3);
}

.footer-bottom p { margin: 0; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .site-nav { gap: 0; }
  .site-nav a { padding-inline: 7px; font-size: 0.81rem; }
  .gh-link span { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { max-width: 720px; }
  .hero-visual { max-width: 860px; }
  .note-peek { left: auto; right: 18px; bottom: 18px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-item.span-7,
  .gallery-item.span-5 { grid-column: span 6; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
  .footer-brand p { margin-top: 0; }
  .footer-fine { width: 100%; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 55;
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 10px var(--gutter) 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform 0.28s var(--ease), visibility 0.28s;
  }
  .site-nav.is-open { transform: none; visibility: visible; }
  .site-nav a { min-height: 44px; padding-inline: 12px; font-size: 0.95rem; }
  .menu-toggle { display: inline-grid; }
  .header-cta { display: none; }
  .header-inner { gap: 10px; }
  .header-actions { margin-left: auto; }
  .menu-open { overflow: hidden; }

  .compare,
  .pull,
  .loop,
  .edges,
  .specimen,
  .security-grid,
  .deploy-grid,
  .faq-layout { grid-template-columns: 1fr; }

  .compare-before { border-right: 0; border-bottom: 1px solid var(--line); }
  .pull { align-items: start; }
  .security-aside { max-width: 720px; }
  .faq-aside { position: static; }
  .resources { grid-template-columns: 1fr 1fr; }
  .resources-copy { grid-column: 1 / -1; }
  .tool-group-head { grid-template-columns: 1fr; }
  .tool-group-head > p { text-align: left; justify-self: start; }
  .arch-layer { grid-template-columns: 1fr; gap: 10px; }
  .arch-index { flex-direction: row; align-items: baseline; gap: 8px; }
  .arch-cells,
  .arch-vault-cells { grid-template-columns: 1fr; }
  .arch-link::before { left: 20px; }
  .arch-link::after { left: 17px; }
  .arch-link span { text-align: left; padding-left: 8px; }
  .arch-link { justify-content: flex-start; }
  .arch-notes { grid-template-columns: 1fr; gap: 20px; }
  .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-card { grid-template-columns: 1fr; }
  .cta-mark {
    grid-column: 1;
    grid-row: 1;
    width: 96px;
    border-radius: 18px;
    transform: none;
    margin-bottom: 22px;
  }
  .cta-content { grid-column: 1; grid-row: 2; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .arch-toolbar { flex-direction: column; align-items: flex-start; }
  .arch-legend { gap: 10px; }
  .arch figcaption { font-size: 0.7rem; }
  .contract { grid-template-columns: 1fr; }
  .contract p { max-width: 60ch; }
  .install-steps { grid-template-columns: 1fr; }
  .install-steps > li { min-height: 0; }
  .install-steps .cmd { margin-top: 4px; }
  .tabs { border-radius: var(--r-md); }
  .tablist {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 6px;
  }
  .tablist [role="tab"] { flex-shrink: 0; }
  .panel-grid { grid-template-columns: 1fr; }
  .panel-head { gap: 8px; }
  .rule-skill { grid-template-columns: 1fr; }
  .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kinds-extra { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-item.span-7,
  .gallery-item.span-5 { grid-column: 1 / -1; }
  .detail-phone { padding-top: 24px; }
  .honesty-list { grid-template-columns: 1fr; }
  .resources { grid-template-columns: 1fr; }
  .recipes { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .arch-quote { max-width: 32ch; }
  .cta-card { padding: 26px 22px; border-radius: var(--r-lg); }
  .cta-actions .btn { flex: 1 1 auto; }
  .prereq { align-items: flex-start; }
  .prereq-div { display: none; }
  .prereq span:last-child { width: 100%; }
}

@media (max-width: 560px) {
  :root { --header-h: 60px; }
  .header-inner { gap: 6px; }
  .brand-version { display: none; }
  .header-actions { gap: 2px; }
  .gh-link { min-width: 38px; justify-content: center; padding-inline: 0; }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 3.2rem); }
  .hero-lede { font-size: 1rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .note-peek {
    position: static;
    width: 100%;
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
  }
  .hero-visual { display: flex; flex-direction: column; }
  .clients-strip { gap: 12px 20px; margin-top: 48px; }
  .loop-step { grid-template-columns: 1fr; gap: 12px; }
  .loop-num { justify-self: start; padding-top: 3px; }
  .loop-note { grid-template-columns: 1fr; gap: 6px; }
  .kinds { grid-template-columns: 1fr; }
  .kinds-extra { grid-template-columns: 1fr; }
  .edge-list li { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; }
  .tools-table { font-size: 0.78rem; }
  .tool-table th,
  .tool-table td { padding: 11px 12px; }
  .tool-table th[scope="row"] { min-width: 160px; }
  .features { grid-template-columns: 1fr; }
  .security-aside h3 { font-size: 1.35rem; }
  .vault-tree { font-size: 0.6rem; padding: 13px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-brand { display: block; }
  .footer-brand p { margin-top: 10px; }
  .footer-bottom { display: block; }
  .footer-bottom p + p { margin-top: 6px; }
  .gallery-item figcaption { font-size: 0.76rem; }
}

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

@media print {
  .site-header,
  .skip-link,
  .menu-toggle,
  .copy-btn,
  .hero-glow,
  .cta-mark,
  .site-footer { display: none !important; }
  .plate,
  .trace,
  .specimen-code { background: #fff !important; color: #111 !important; }
  .section { padding-block: 32px; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

