/* aerais site stylesheet. Single file, no build step. Fonts: /assets/fonts/fonts.css (self-hosted Inter + JetBrains Mono).
   Direction: precise, evidence-minded, editorial-technical. Mist canvas, Slate Ink text, Horizon Azure accent, hairline grid rules,
   heavy tight Inter display, mono uppercase tracked labels, numbered control labels, one obsidian band per page, no glass blur.
   Motion: one subtle reveal (<300 ms) and slow ambient motion in diagrams; everything off for prefers-reduced-motion. */

:root {
  --ink: #1B2027;          /* Slate Ink: text, marks */
  --ink-2: #525b6b;        /* secondary text (AA on Mist and white) */
  --ink-3: #5c6675;        /* muted labels (AA on Mist and surface-2) */
  --paper: #F3F5F6;        /* Mist: primary canvas */
  --surface: #FFFFFF;
  --surface-2: #E9ECEE;
  --line: #D8DCDF;         /* hairline */
  --line-2: #AEB4BB;       /* Platinum: structural rule */
  --accent: #1E7FE0;       /* Horizon Azure: rules, graphics, large type */
  --accent-text: #1769C4;  /* Azure tuned for small text on light (AA) */
  --accent-ink: #2E8BEA;   /* Azure on dark surfaces */
  --obsidian: #111418;
  --slate-elev: #1B2027;
  --dark-line: #2E3642;
  --on-dark: #F3F5F6;
  --on-dark-muted: #AEB4BB;
  --emerald: #10B981;      /* validated signal, diagrams only */
  --amber: #F59E0B;        /* drift / review, diagrams only */
  --breach: #E63946;       /* breach, diagrams only */
  --radius: 2px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 68px;
  --icon-a: #F3F5F6;
  --icon-b: #E9ECEE;
  --lane-a: #FFFFFF;
  --lane-b: #F3F5F6;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* legacy names kept so older svg and snippets still resolve */
  --navy: var(--obsidian); --navy-2: var(--slate-elev); --navy-3: var(--slate-elev);
  --blue: var(--accent); --blue-deep: var(--accent-text); --azure: var(--accent); --sky: var(--accent-ink); --cyan: var(--accent-ink);
  --tint: var(--paper); --line-strong: var(--line-2); --muted: var(--ink-2); --soft: var(--ink-3); --white: var(--surface);
  --line-dark: var(--dark-line); --accent-on-dark: var(--accent-ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.62; font-weight: 400;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
svg { display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); margin: 0 0 0.5em; }
h1 { font-size: clamp(38px, 5.2vw, 68px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 600; }
h4 { font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 1px; }
::selection { background: rgba(30, 127, 224, 0.24); }

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 12px 18px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--paper); }
.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 ---------- */
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 28px; }
.container-narrow { width: 100%; max-width: 780px; margin-inline: auto; padding-inline: 28px; }
.section { padding: clamp(64px, 8.5vw, 116px) 0; background: var(--paper); }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section.dark { background: var(--obsidian); color: var(--on-dark); border: 0; --icon-a: #1B2027; --icon-b: #1B2027; --lane-a: #1B2027; --lane-b: #161B21; }
.section.dark h1, .section.dark h2, .section.dark h3, .section.dark h4 { color: var(--on-dark); }
.section.dark p, .section.dark .lede { color: var(--on-dark-muted); }
.section.dark .eyebrow { color: var(--on-dark-muted); }
.section.dark .eyebrow::before { background: var(--accent-ink); }
.section.dark a:not(.btn):not(.card):not(.row):not(.chain-row) { color: var(--accent-ink); }
.section.dark a:not(.btn):not(.card):not(.row):not(.chain-row):hover { color: #fff; }
.section:not(.alt):not(.dark) + .section:not(.alt):not(.dark), .section.alt + .section.alt { padding-top: 0; }
.stack > * + * { margin-top: 20px; }

.grid { display: grid; gap: 28px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(40px, 7vw, 112px); align-items: start; }
.split-head h2 { margin-bottom: 0; }
.split-body > :last-child { margin-bottom: 0; }
@media (max-width: 1000px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
  .container, .container-narrow { padding-inline: 20px; }
}

/* ---------- Text ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0 0 22px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.4;
  color: var(--ink-3);
}
.eyebrow::before { content: ""; flex: none; width: 24px; height: 1px; background: var(--accent); }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 640px; margin: 0 0 1.2em; font-weight: 400; }
.section-head { max-width: 720px; margin: 0 0 clamp(36px, 5vw, 60px); }
.section-head h2 { margin-bottom: 16px; }
.section-head .lede { margin-bottom: 0; }
.section-head.center { margin-inline: auto; text-align: left; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 24px; }
.meta > * + *::before { content: "/"; margin-right: 18px; color: var(--line-2); }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent); padding: 20px 24px; margin: 28px 0; font-size: 16px; line-height: 1.6; color: var(--ink); }
.callout > :last-child { margin-bottom: 0; }
.callout strong:first-child { color: var(--ink); font-weight: 700; }
.section.alt .callout { background: var(--paper); }
.section.dark .callout { background: var(--slate-elev); border-color: var(--dark-line); border-left-color: var(--accent-ink); color: var(--on-dark); }
.kicker-list, .checklist { list-style: none; padding: 0; margin: 0 0 1.2em; }
.kicker-list li { position: relative; padding: 6px 0 6px 24px; line-height: 1.55; }
.kicker-list li::before { content: ""; position: absolute; left: 0; top: 16px; width: 12px; height: 1px; background: var(--accent); }
.checklist li { position: relative; padding: 14px 0 14px 28px; border-top: 1px solid var(--line); line-height: 1.55; }
.checklist li:last-child { border-bottom: 1px solid var(--line); }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 23px; width: 8px; height: 8px; border: 1.5px solid var(--accent); }
.section.dark .kicker-list li::before { background: var(--accent-ink); }
.section.dark .checklist li { border-color: var(--dark-line); }
.badge { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line-2); padding: 4px 10px; margin-bottom: 14px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; align-items: center; }
.pill { border: 1px solid var(--line-2); padding: 7px 14px; font-size: 15px; color: var(--ink); background: var(--surface); }
.disclaimer { font-size: 14px; color: var(--ink-2); margin-top: 28px; }
.section.dark .disclaimer { color: var(--on-dark-muted); }
.more-link { margin-top: 36px; }
.more-link a, .text-link { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.more-link a::after { content: " \2192"; }
.ico { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
.accent { color: var(--accent-text); }
.section.dark .accent { color: var(--accent-ink); }

/* numbered control labels: R-01, LOOP-01, DG-1, CTL-07, 01 / Assess */
.ctl {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); padding: 5px 8px; white-space: nowrap; vertical-align: middle;
}
.ctl.is-accent { color: var(--accent-text); border-color: var(--accent); }
.section.dark .ctl { color: var(--on-dark-muted); background: transparent; border-color: var(--dark-line); }
.section.dark .ctl.is-accent { color: var(--accent-ink); border-color: var(--accent-ink); }

/* ---------- Prose ---------- */
.container.prose, .container-narrow.prose { max-width: 780px; }
.prose h2 { font-size: clamp(25px, 2.6vw, 32px); margin: 2.2em 0 0.6em; }
.prose h3 { margin: 1.8em 0 0.5em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { color: #2b323c; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0.4em 0; }
.prose li::marker { color: var(--accent-text); }
.prose a { font-weight: 600; }
.prose blockquote { margin: 1.8em 0; padding: 2px 0 2px 24px; border-left: 2px solid var(--accent); color: var(--ink); font-size: 1.15em; font-weight: 500; letter-spacing: -0.01em; line-height: 1.5; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--surface); border: 1px solid var(--line); padding: 1px 5px; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.prose table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; border-bottom-color: var(--line-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; line-height: 1; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 16px 24px; border-radius: 0; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn::after { content: "\2192"; font-size: 1.15em; transition: transform 0.2s ease; }
.btn:hover::after { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent-text); border-color: var(--accent-text); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost::after { content: none; }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }
.section.dark .btn-primary, .cta-band:not(.is-light) .btn-primary { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--obsidian); }
.section.dark .btn-primary:hover, .cta-band:not(.is-light) .btn-primary:hover { background: var(--paper); border-color: var(--paper); color: var(--obsidian); }
.section.dark .btn-ghost, .cta-band:not(.is-light) .btn-ghost { color: var(--on-dark); border-color: rgba(243, 245, 246, 0.36); }
.section.dark .btn-ghost:hover, .cta-band:not(.is-light) .btn-ghost:hover { color: #fff; border-color: #fff; }

/* ---------- Header (light, solid, hairline) ---------- */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: var(--paper); border-bottom: 1px solid var(--line); transition: border-color 0.2s ease; }
.site-header.is-scrolled { border-bottom-color: var(--line-2); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; width: 24px; height: 24px; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.primary-nav { display: flex; align-items: center; gap: 4px; }
.nav-list { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list a.nav-link, .nav-list .sub-toggle {
  display: inline-flex; align-items: center; padding: 10px 13px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; line-height: 1.2; background: none; border: 0;
}
.nav-list a.nav-link:hover, .nav-list .sub-toggle:hover { color: var(--ink); }
.nav-list a.nav-link[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.has-sub { display: flex; align-items: center; }
.has-sub > a.nav-link { padding-right: 3px; }
.sub-toggle { cursor: pointer; padding: 10px 8px 10px 2px !important; }
.sub-toggle svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub-menu {
  position: absolute; left: 0; top: calc(100% + 4px); min-width: 230px; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-2);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu, .has-sub.open .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.sub-menu a:hover { background: var(--paper); color: var(--accent-text); }
.sub-menu a[aria-current] { color: var(--accent-text); }
.sub-menu .sub-all { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.nav-cta { margin-left: 14px; padding: 13px 18px; font-size: 12px; white-space: nowrap; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 1px solid var(--line-2); color: var(--ink); cursor: pointer; }
.menu-toggle svg { width: 24px; height: 24px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }

@media (max-width: 1040px) {
  .menu-toggle { display: inline-flex; }
  .no-js .menu-toggle { display: none; }
  .sub-menu::before { display: none; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line-2);
    padding: 8px 20px 24px; max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .js .primary-nav { display: none; }
  .js .primary-nav.open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a.nav-link { padding: 16px 2px; border-bottom: 1px solid var(--line); font-size: 17px; width: 100%; box-shadow: none !important; }
  .nav-list a.nav-link[aria-current] { color: var(--accent-text); }
  .has-sub { flex-wrap: wrap; }
  .has-sub > a.nav-link { flex: 1; padding-right: 4px; }
  .sub-toggle { padding: 16px 8px !important; border-bottom: 1px solid var(--line) !important; }
  .sub-menu { position: static; flex-basis: 100%; min-width: 0; border: 0; background: transparent; padding: 0 0 6px 14px; display: none; opacity: 1; visibility: visible; transform: none; }
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: none; }
  .has-sub.open .sub-menu { display: block; }
  .no-js .sub-menu, .no-js .has-sub:hover .sub-menu { display: block; }
  .no-js .sub-toggle { display: none; }
  .sub-menu a { padding: 12px 2px; font-size: 16px; }
  .nav-cta { margin: 20px 0 0; width: 100%; padding: 16px; font-size: 12.5px; }
}
@media (max-width: 380px) { .brand-name { font-size: 19px; } }

/* ---------- Breadcrumbs ---------- */
.crumb-wrap { background: var(--paper); }
.breadcrumbs { padding: 20px 0 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before { content: "/"; margin: 0 10px; color: var(--line-2); }
.breadcrumbs a { color: var(--ink-3); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-text); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); }

/* ---------- Page hero (light, hairline grid) ---------- */
.hero-page { position: relative; isolation: isolate; padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 7.5vw, 100px); background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-page::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px), linear-gradient(180deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px; background-position: -1px -1px; opacity: 0.55;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%); mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
}
.hero-page h1 { max-width: 15em; margin-bottom: 24px; }
.hero-page .lede { max-width: 620px; margin-bottom: 0; }
.hero-page .actions { margin-top: 36px; }
.hero-page:first-child { padding-top: clamp(56px, 7vw, 96px); }
.hero-page.has-art > .container { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-page .hero-art { width: 100%; max-width: 400px; justify-self: end; }
.hero-page .hero-art.has-illo { max-width: 520px; }
.hero-art svg { width: 100%; height: auto; }
@media (max-width: 860px) {
  .hero-page.has-art > .container { grid-template-columns: minmax(0, 1fr); }
  .hero-page .hero-art { display: none; }
}

/* Home hero: same light surface, larger display type, chain illustration right */
.hero-page.hero-home { padding: clamp(56px, 8vw, 112px) 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding-bottom: clamp(48px, 6vw, 80px); }
.hero-home h1 { font-size: clamp(40px, 5.4vw, 76px); line-height: 1; letter-spacing: -0.035em; max-width: 11em; margin-bottom: 26px; }
.hero-home .lede { max-width: 32em; font-size: clamp(18px, 1.6vw, 21px); }
.hero-home .actions { margin-top: 36px; }
.hero-visual, .hero-illo { position: relative; width: 100%; }
.hero-illo svg, .hero-visual > svg { width: 100%; height: auto; }
.hero-visual .art .a-plate { fill: transparent; stroke: none; }
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero-visual { order: 2; max-width: 560px; }
}

/* alignment strip (home hero foot) */
.align-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 18px 0; border-top: 1px solid var(--line-2); }
.align-label { margin: 0; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.align-list { display: flex; flex-wrap: wrap; gap: 6px 0; list-style: none; margin: 0; padding: 0; }
.align-list li { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); padding: 0 16px; border-left: 1px solid var(--line-2); }
.align-list li:first-child { padding-left: 0; border-left: 0; }
.align-note { margin: 0 0 0 auto; font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 920px) { .align-note { margin-left: 0; flex-basis: 100%; } }

/* ---------- Cards ---------- */
.card {
  position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; color: var(--ink); text-decoration: none; transition: border-color 0.2s ease, background-color 0.2s ease;
}
.section.alt .card { background: var(--paper); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 16px; margin-bottom: 0; }
.card p + p { margin-top: 0.8em; }
.card .eyebrow { margin-bottom: 14px; font-size: 11px; }
.card.link:hover { color: var(--ink); border-color: var(--accent); }
.card.link:focus-visible { outline-offset: 4px; }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 20px; color: var(--accent-text); }
.card-icon svg { width: 28px; height: 28px; }
.card-link { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.card-link::after { content: "\2192"; transition: transform 0.2s ease; }
.card.link:hover .card-link::after { transform: translateX(4px); }
.section.dark .card { background: var(--slate-elev); border-color: var(--dark-line); color: var(--on-dark); }
.section.dark .card p { color: var(--on-dark-muted); }
.section.dark .card-icon, .section.dark .card-link { color: var(--accent-ink); }
.section.dark .card.link:hover { border-color: var(--accent-ink); }

.step { position: relative; padding: 22px 0 0; border-top: 1px solid var(--ink); }
.step-num { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 16px; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: 16px; margin: 0; }
.section.dark .step { border-top-color: rgba(243, 245, 246, 0.5); }
.section.dark .step-num { color: var(--accent-ink); }
.related .card h3 { font-size: 18px; }
.related .card p { font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq details:first-of-type { border-top: 1px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.4; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px; background:
    linear-gradient(var(--accent-text), var(--accent-text)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--accent-text), var(--accent-text)) center / 1.5px 14px no-repeat;
}
.faq details[open] summary::after { background: linear-gradient(var(--accent-text), var(--accent-text)) center / 14px 1.5px no-repeat; }
.faq summary:hover { color: var(--accent-text); }
.faq .faq-a { padding: 0 40px 28px 0; color: #2b323c; max-width: 680px; }
.faq .faq-a p { margin: 0; }

/* ---------- CTA band (the page's obsidian band unless the page already has a dark section) ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; color: var(--on-dark); padding: clamp(64px, 8vw, 104px) 0; background: var(--obsidian); }
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(90deg, var(--dark-line) 1px, transparent 1px), linear-gradient(180deg, var(--dark-line) 1px, transparent 1px);
  background-size: 96px 96px; opacity: 0.45;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 100%); mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
}
.cta-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 48px; flex-wrap: wrap; }
.cta-band .eyebrow { color: var(--on-dark-muted); }
.cta-band .eyebrow::before { background: var(--accent-ink); }
.cta-band h2 { color: var(--on-dark); margin: 0 0 16px; font-size: clamp(28px, 3.6vw, 46px); max-width: 15em; }
.cta-band p { color: var(--on-dark-muted); margin: 0; max-width: 520px; font-size: 18px; }
.cta-band .cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cta-band.is-light { background: var(--surface-2); color: var(--ink); border-top: 1px solid var(--line-2); }
.cta-band.is-light::before { background-image: linear-gradient(90deg, var(--line-2) 1px, transparent 1px), linear-gradient(180deg, var(--line-2) 1px, transparent 1px); opacity: 0.3; }
.cta-band.is-light .eyebrow { color: var(--ink-3); }
.cta-band.is-light .eyebrow::before { background: var(--accent); }
.cta-band.is-light h2 { color: var(--ink); }
.cta-band.is-light p { color: var(--ink-2); }

/* ---------- Footer (light) ---------- */
.site-footer { background: var(--paper); color: var(--ink-2); font-size: 15px; padding: clamp(48px, 6vw, 72px) 0 36px; border-top: 1px solid var(--line-2); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)); gap: 36px 32px; }
.footer-brand p { color: var(--ink-2); max-width: 260px; margin: 18px 0 0; }
.site-footer h2 { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; line-height: 1.4; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 10px; line-height: 1.4; }
.site-footer li a { color: var(--ink); text-decoration: none; transition: color 0.15s ease; }
.site-footer li a:hover { color: var(--accent-text); text-decoration: underline; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 40px; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.footer-bottom p { margin: 0; }
.footer-disclaimer { max-width: 640px; }
.footer-disclaimer a { color: var(--ink); }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Editorial parts: statement, rows, principles ---------- */
.pos-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(40px, 7vw, 112px); border-top: 1px solid var(--ink); padding-top: 28px; }
.section.dark .pos-grid { border-top-color: rgba(243, 245, 246, 0.5); }
.pos-grid .eyebrow { margin: 4px 0 0; }
.pos-text { margin: 0 0 1em; max-width: 22em; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; color: var(--ink); }
.pos-text strong { font-weight: 700; color: var(--accent-text); }
.pos-body { max-width: 560px; color: var(--ink-2); font-size: 18px; }
.pos-body p:last-child { margin-bottom: 0; }
.section.dark .pos-text { color: var(--on-dark); }
.section.dark .pos-text strong { color: var(--accent-ink); }
@media (max-width: 820px) { .pos-grid { grid-template-columns: minmax(0, 1fr); } }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.rows li { border-bottom: 1px solid var(--line-2); }
.row { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.1fr) 40px; gap: 12px 32px; align-items: baseline; padding: clamp(26px, 3vw, 40px) 0; color: var(--ink); text-decoration: none; transition: padding-left 0.25s ease; }
.row-n { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.12em; color: var(--ink-3); }
.row-t { margin: 0; font-size: clamp(25px, 2.8vw, 38px); letter-spacing: -0.03em; line-height: 1.08; font-weight: 700; transition: color 0.2s ease; }
.row-d { margin: 0; max-width: 28em; font-size: 17px; color: var(--ink-2); }
.row-go { justify-self: end; font-size: 22px; color: var(--accent-text); transition: transform 0.25s ease; }
a.row:hover { color: var(--ink); padding-left: 10px; }
a.row:hover .row-t { color: var(--accent-text); }
a.row:hover .row-go { transform: translateX(4px); }
a.row:focus-visible { outline-offset: -3px; }
.rows.static .row { padding-left: 0; }
.rows.slim .row { grid-template-columns: 72px minmax(0, 1fr) 40px; padding: 24px 0; }
.rows.slim .row-t { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; }
.section.dark .rows { border-top-color: rgba(243, 245, 246, 0.5); }
.section.dark .rows li { border-bottom-color: var(--dark-line); }
.section.dark .row, .section.dark a.row:hover { color: var(--on-dark); }
.section.dark .row-d { color: var(--on-dark-muted); }
.section.dark a.row:hover .row-t, .section.dark .row-go { color: var(--accent-ink); }
@media (max-width: 820px) {
  .row { grid-template-columns: 44px minmax(0, 1fr) 32px; }
  .row-d { grid-column: 2 / -1; grid-row: 2; }
  .row-go { grid-row: 1; grid-column: 3; }
  .rows.slim .row { grid-template-columns: 44px minmax(0, 1fr) 32px; }
}

.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.principles li { border-top: 1px solid var(--ink); padding-top: 22px; }
.principles h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.principles p { margin: 0; color: var(--ink-2); font-size: 16px; }
.section.dark .principles li { border-top-color: rgba(243, 245, 246, 0.5); }
@media (max-width: 820px) { .principles { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

.routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.route { padding: clamp(28px, 3.4vw, 44px); min-height: 260px; display: flex; flex-direction: column; }
.route h3 { font-size: clamp(25px, 2.6vw, 34px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 14px; }
.route p { font-size: 17px; }
.route .card-link { margin-top: auto; padding-top: 28px; }
@media (max-width: 720px) { .routes { grid-template-columns: minmax(0, 1fr); } .route { min-height: 0; } }

/* risk list: R-01 style rows */
.risk-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.risk-list li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line-2); font-size: 17px; line-height: 1.5; }
.risk-list .ctl { justify-self: start; }
.section.dark .risk-list { border-top-color: rgba(243, 245, 246, 0.5); }
.section.dark .risk-list li { border-bottom-color: var(--dark-line); color: var(--on-dark); }

/* chain row: data plane -> the seam -> AI plane */
.chain-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.chain-cell { position: relative; padding: 28px 28px 30px 0; }
.chain-cell + .chain-cell { padding-left: 28px; border-left: 1px solid var(--line-2); }
.chain-cell:not(:last-child)::after { content: "\2192"; position: absolute; right: -11px; top: 26px; width: 22px; height: 22px; display: grid; place-items: center; background: var(--paper); color: var(--accent-text); font-size: 15px; line-height: 1; z-index: 1; }
.chain-cell h3 { font-size: clamp(20px, 2vw, 25px); font-weight: 700; letter-spacing: -0.025em; margin: 14px 0 10px; }
.chain-cell p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.chain-cell.is-seam h3 { color: var(--accent-text); }
.section.dark .chain-row { color: var(--on-dark); border-top-color: rgba(243, 245, 246, 0.5); border-bottom-color: var(--dark-line); }
.section.dark .chain-cell + .chain-cell { border-left-color: var(--dark-line); }
.section.dark .chain-cell:not(:last-child)::after { background: var(--obsidian); color: var(--accent-ink); }
.section.dark .chain-cell h3 { color: var(--on-dark); }
.section.dark .chain-cell p { color: var(--on-dark-muted); }
.section.dark .chain-cell.is-seam h3 { color: var(--accent-ink); }
a.chain-row:hover .chain-cell h3 { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
@media (max-width: 820px) {
  .chain-row { grid-template-columns: minmax(0, 1fr); }
  .chain-cell, .chain-cell + .chain-cell { padding: 24px 0; border-left: 0; }
  .chain-cell + .chain-cell { border-top: 1px solid var(--line-2); }
  .section.dark .chain-cell + .chain-cell { border-top-color: var(--dark-line); }
  .chain-cell:not(:last-child)::after { content: "\2193"; right: auto; left: 0; top: auto; bottom: -11px; }
}

/* method line: four steps on one hairline */
.method-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--ink); }
.method-line li { position: relative; padding: 22px 0 0; }
.method-line li::before { content: ""; position: absolute; left: 0; top: -1px; width: 40px; height: 3px; background: var(--accent); }
.method-line .ctl { margin-bottom: 14px; }
.method-line p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.section.dark .method-line { border-top-color: rgba(243, 245, 246, 0.5); }
.section.dark .method-line li::before { background: var(--accent-ink); }
@media (max-width: 820px) { .method-line { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; } }
@media (max-width: 480px) { .method-line { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* tag line: one line of links (sectors) */
.tag-line { display: flex; flex-wrap: wrap; gap: 10px 8px; list-style: none; margin: 0; padding: 0; }
.tag-line a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; transition: border-color 0.2s ease, color 0.2s ease; }
.tag-line a:hover { border-color: var(--accent); color: var(--accent-text); }
.section.dark .tag-line a { background: transparent; border-color: var(--dark-line); color: var(--on-dark); }
.section.dark .tag-line a:hover { border-color: var(--accent-ink); color: var(--accent-ink); }

/* specimen: illustrative evidence record */
.specimen { background: var(--surface); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12.5px; line-height: 1.5; letter-spacing: 0.02em; }
.specimen-head { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.specimen dl { margin: 0; }
.specimen .spec-row { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.specimen .spec-row:last-child { border-bottom: 0; }
.specimen dt { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; padding-top: 1px; }
.specimen dd { margin: 0; color: var(--ink); word-break: break-all; }
.specimen .is-ok { color: #0b7a55; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--line-2); border-top: 2px solid var(--ink); padding: clamp(24px, 3.4vw, 44px); }
.form-card h2 { font-size: 28px; margin-bottom: 8px; }
.form-card > p { color: var(--ink-2); }
.field { margin: 0 0 22px; }
.field label, .field .label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-2); border-radius: 0; padding: 14px 14px; line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B2027' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-text); background: var(--surface); box-shadow: 0 0 0 3px rgba(30, 127, 224, 0.2); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-error { min-height: 0; margin: 4px 0 0; font-size: 14px; color: #b3261e; }
.field-error:empty { margin: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.field-hint { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.consent { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 4px; font-size: 15px; line-height: 1.5; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent-text); }
.consent label { font-weight: 400; margin: 0; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { font-size: 14px; color: var(--ink-2); margin: 18px 0 0; }
.form-status { min-height: 28px; margin: 14px 0 0; font-size: 16px; }
.form-status.is-success { color: #14633a; background: #e8f6ee; border: 1px solid #bfe3cd; padding: 14px 16px; }
.form-status.is-error { color: #8e1b14; background: #fdeeed; border: 1px solid #f2c4c0; padding: 14px 16px; }
.form-submit { margin-top: 18px; }
.form-submit .btn { min-width: 220px; }
.side-card { border-top: 1px solid var(--ink); padding: 22px 0 0; }
.side-card + .side-card { margin-top: 40px; }
.side-card h2, .side-card h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.side-card p { color: var(--ink-2); font-size: 16px; }
.side-card .big-mail { font-size: 20px; font-weight: 600; word-break: break-word; }
.next-steps { list-style: none; counter-reset: ns; padding: 0; margin: 0; }
.next-steps li { counter-increment: ns; position: relative; padding: 0 0 18px 48px; font-size: 16px; color: #2b323c; }
.next-steps li strong { font-weight: 700; }
.next-steps li::before { content: "0" counter(ns); position: absolute; left: 0; top: 2px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em; color: var(--accent-text); }
@media (max-width: 920px) { .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
@media (max-width: 560px) { .form-card { padding: 22px 18px; } .field-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Legal and 404 ---------- */
.page-legal .hero-page { padding-bottom: 48px; }
.page-legal .prose h2 { font-size: 24px; margin-top: 1.8em; }
.notfound .big { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.14em; color: var(--accent-text); }

/* ---------- Generated art (tools/art.py) ---------- */
.art { display: block; width: 100%; height: auto; max-width: none; }
.art .a-plate { fill: var(--surface); stroke: var(--line-2); stroke-width: 1; }
.art .a-dot { fill: var(--accent); fill-opacity: 0.2; }
.art .a-tick { fill: none; stroke: var(--accent); stroke-opacity: 0.5; stroke-width: 1.5; stroke-linecap: round; }
.art .a-line { fill: none; stroke: var(--accent); stroke-opacity: 0.34; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.art .a-dash { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 4 10; animation: dash 7s linear infinite; }
.art .a-ring { fill: none; stroke: var(--accent); stroke-opacity: 0.28; stroke-width: 1.2; }
.art .a-arc { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.art .a-arc2 { stroke: var(--ink); }
.art .a-spin { animation: spin var(--d, 90s) linear infinite; animation-direction: var(--dir, normal); animation-duration: calc(var(--d, 40s) * 2.5); }
.art .a-node { fill: var(--surface); stroke: var(--accent); stroke-width: 1.8; }
.art .a-halo { fill: var(--accent); opacity: 0.2; transform-box: fill-box; transform-origin: center; animation: halo 9s ease-in-out infinite; animation-delay: var(--dl, 0s); }
.art .a-card { fill: var(--surface); stroke: var(--line-2); stroke-width: 1; }
.art .a-skel { fill: var(--line); }
.art .a-navy { fill: var(--obsidian); }
.art .a-glyph { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-opacity: 0.95; }
.art .a-check { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art .a-check-lg { stroke-width: 9; }
.art .a-grid { fill: none; stroke: var(--accent); stroke-opacity: 0.18; stroke-dasharray: 3 6; }
.art .a-axis { fill: none; stroke: var(--accent); stroke-opacity: 0.4; stroke-width: 1.4; }
.art .a-trend { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.art .a-bar { transform-box: fill-box; transform-origin: 50% 100%; }
.art .a-pk, .field .f-pk { opacity: 0; offset-rotate: 0deg; }
.art .a-pk { fill: var(--accent); stroke: var(--accent); stroke-opacity: 0.3; stroke-width: 5; }
@supports (offset-path: path("M0 0L1 1")) {
  .art .a-pk, .field .f-pk { animation: packet var(--d, 3s) linear infinite; animation-duration: calc(var(--d, 3s) * 2.4); animation-delay: var(--dl, 0s); }
}
.is-idle, .is-idle *, .is-idle::before, .is-idle::after { animation-play-state: paused !important; }
@media (max-width: 920px) { .field .f-pk { display: none; } }

/* Dark node field (available via {{art:field}}) */
.field { display: block; }
svg.field, .hero-home .field, .cta-band .field { pointer-events: none; }
form .field { pointer-events: auto; }
.field .f-link { fill: none; stroke: var(--accent-ink); stroke-opacity: 0.34; stroke-width: 1; }
.field .f-lit { stroke-opacity: 0.45; stroke-dasharray: 3 7; animation: dash 9s linear infinite; }
.field .f-node { fill: var(--obsidian); stroke: var(--accent-ink); stroke-opacity: 0.9; stroke-width: 1.6; }
.field .f-core { fill: #cfe3fb; }
.field .f-halo { fill: var(--accent-ink); opacity: 0.3; transform-box: fill-box; transform-origin: center; animation: halo 10s ease-in-out infinite; animation-delay: var(--dl, 0s); }
.field .f-pk { fill: #dbe9fb; stroke: var(--accent-ink); stroke-opacity: 0.3; stroke-width: 6; }

/* Card header glyph strips */
.glyph { position: relative; display: block; overflow: hidden; background: var(--obsidian); }
.glyph-svg { display: block; width: 100%; height: 100%; max-width: none; }
.glyph-svg .a-plate, .glyph-svg .a-tick { display: none; }
.glyph-svg .a-line { stroke: #fff; stroke-opacity: 0.35; }
.glyph-svg .a-ring { stroke: #fff; }
.glyph-svg .a-node { fill: var(--obsidian); stroke: var(--accent-ink); }
.glyph-svg .a-card { fill: rgba(255, 255, 255, 0.1); stroke: rgba(255, 255, 255, 0.28); }
.glyph-svg .a-skel { fill: rgba(255, 255, 255, 0.35); }
.glyph-svg .a-axis, .glyph-svg .a-grid { stroke: #fff; }
.glyph-svg .a-navy { fill: #fff; }
.glyph-svg .a-pk { display: none; }
.glyph-svg .a-dash, .glyph-svg .a-spin, .glyph-svg .a-halo { animation: none; }
.card-media { display: block; height: 104px; margin: -30px -30px 24px; }

/* ---------- Diagrams ---------- */
.diagram { margin: 0; }
.diagram > svg { width: 100%; height: auto; }
.diagram-section { padding: clamp(40px, 5vw, 64px) 0 0; }
.section.diagram-section + .section { padding-top: clamp(48px, 6vw, 80px) !important; }
.diagram-section .diagram { padding: clamp(18px, 2.4vw, 32px); background: var(--surface); border: 1px solid var(--line-2); }
.dg { display: block; width: 100%; height: auto; color: var(--accent-text); overflow: visible; }
.dg text { font-family: var(--font); }
.dg-narrow { display: none; }
@media (max-width: 760px) {
  .dg-wide { display: none; }
  .dg-narrow { display: block; max-width: 420px; margin-inline: auto; }
  .diagram-section .diagram { padding: 14px 8px 12px; }
}
.dg .dg-node { fill: var(--surface); stroke: var(--line-2); stroke-width: 1; }
.dg .dg-lane { stroke: var(--line-2); stroke-width: 1; }
.dg .dg-icobg { stroke: var(--line); stroke-width: 1; }
.dg .dg-label { fill: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.dg .dg-sub { fill: var(--ink-2); font-weight: 400; }
.dg .dg-badge-t { fill: #fff; font-family: var(--mono); font-weight: 500; }
.dg .dg-lane-t { fill: #fff; font-weight: 600; letter-spacing: -0.01em; }
.dg .dg-lane-n { fill: var(--accent-ink); font-family: var(--mono); font-weight: 500; letter-spacing: 0.06em; }
.dg .dg-onDark { color: var(--accent-ink); }
.dg .dg-chip { fill: var(--surface); stroke: var(--line-2); stroke-width: 1; }
.dg .dg-chip-t { fill: var(--ink); font-weight: 500; }
.dg .dg-arrow { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; opacity: 0.9; }
.dg .dg-arrow.fb { stroke: var(--accent); stroke-dasharray: 6 7; animation: dg-dash 6s linear infinite; opacity: 1; }
.dg .dg-head { fill: var(--accent); }
.dg .dg-head.fb { fill: var(--accent); }
.dg .dg-ring { fill: none; stroke: var(--line-2); stroke-width: 1.2; stroke-dasharray: 3 8; }
.dg .dg-center { color: var(--accent-text); opacity: 0.85; }
.section.dark .diagram-section .diagram, .section.dark .diagram { background: var(--slate-elev); border-color: var(--dark-line); }
.section.dark .dg .dg-node, .section.dark .dg .dg-lane { fill: var(--slate-elev); stroke: var(--dark-line); }
.section.dark .dg .dg-label, .section.dark .dg .dg-chip-t { fill: var(--on-dark); }
.section.dark .dg .dg-sub { fill: var(--on-dark-muted); }
.section.dark .dg .dg-chip { fill: var(--obsidian); stroke: var(--dark-line); }
.section.dark .dg .dg-icobg { stroke: var(--dark-line); }
.section.dark .dg .dg-arrow { stroke: var(--accent-ink); }
.section.dark .dg .dg-head { fill: var(--accent-ink); }
.diagram figcaption, .ra-figure > figcaption { margin: 18px 0 0; font-size: 14.5px; color: var(--ink-2); max-width: 640px; }
.section.dark .diagram figcaption { color: var(--on-dark-muted); }
.fig-n { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; color: var(--accent-text); margin-right: 10px; }
.section.dark .fig-n { color: var(--accent-ink); }
.prose figure > svg { width: 100%; height: auto; }
@keyframes dg-dash { to { stroke-dashoffset: -26; } }

/* ---------- Spacing utilities (keep last so they win over component margins) ---------- */
.mt-md { margin-top: clamp(24px, 3vw, 36px); }
.mt-lg { margin-top: clamp(40px, 5vw, 64px); }

/* ---------- Header scroll state, reveal, motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes halo { 0%, 100% { opacity: 0.1; transform: scale(0.85); } 50% { opacity: 0.4; transform: scale(1.4); } }
@keyframes dash { to { stroke-dashoffset: -28; } }
@keyframes packet { 0% { offset-distance: 0%; opacity: 0; } 12% { opacity: 0.9; } 88% { opacity: 0.9; } 100% { offset-distance: 100%; opacity: 0; } }

/* .reveal is added by site.js only, so content is always visible without JS (total < 300 ms) */
.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.22s var(--ease), transform 0.22s var(--ease); transition-delay: calc(var(--i, 0) * 16ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media print {
  .site-header, .cta-band, .menu-toggle, .skip-link { display: none !important; }
  .site-footer { background: none; color: #000; padding: 24px 0; }
  .section, .section.dark { padding: 24px 0; background: none; color: #000; }
  .hero-page, .hero-page.hero-home { background: none; color: #000; padding: 16px 0; }
  .hero-page::before, .field { display: none; }
}

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

/* larger home hero illustration: tight frame, extends toward the right edge on desktop */
.hero-page.hero-home { overflow-x: clip; }
@media (min-width: 1001px) { .hero-illo { max-width: none; width: 128%; margin-left: -6%; margin-right: -22%; } }
@media (max-width: 1000px) { .hero-illo { max-width: 560px; width: 100%; margin: 0 auto; } }
