/* ============================================================
 AutoQA Foundation - calm product documentation system.
 Warm paper and ink palette, restrained accents, self-hosted type,
 and a complete light/dark theme with no runtime dependencies.
 ============================================================ */

@font-face {
 font-family: 'Fraunces';
 src: url('fonts/fraunces-var.woff2') format('woff2');
 font-weight: 100 900;
 font-style: normal;
 font-display: swap;
}
@font-face {
 font-family: 'Fraunces';
 src: url('fonts/fraunces-var-italic.woff2') format('woff2');
 font-weight: 100 900;
 font-style: italic;
 font-display: swap;
}
@font-face {
 font-family: 'Instrument Sans';
 src: url('fonts/instrument-sans-var.woff2') format('woff2');
 font-weight: 400 700;
 font-style: normal;
 font-display: swap;
}
@font-face {
 font-family: 'Instrument Sans';
 src: url('fonts/instrument-sans-var-italic.woff2') format('woff2');
 font-weight: 400 700;
 font-style: italic;
 font-display: swap;
}
@font-face {
 font-family: 'IBM Plex Mono';
 src: url('fonts/plex-mono-400.woff2') format('woff2');
 font-weight: 400;
 font-style: normal;
 font-display: swap;
}
@font-face {
 font-family: 'IBM Plex Mono';
 src: url('fonts/plex-mono-500.woff2') format('woff2');
 font-weight: 500;
 font-style: normal;
 font-display: swap;
}
@font-face {
 font-family: 'IBM Plex Mono';
 src: url('fonts/plex-mono-600.woff2') format('woff2');
 font-weight: 600;
 font-style: normal;
 font-display: swap;
}

:root {
 --ink: #1c2420;
 --ink-2: #3f4b44;
 --muted: #5a635a;
 --paper: #f4f0e7;
 --surface: #fffdf7;
 --surface-2: #e9e3d7;
 --line: rgba(28, 36, 32, .14);
 --line-strong: rgba(28, 36, 32, .27);
 --grid: rgba(28, 36, 32, .045);
 --navy: #24342f;
 --navy-2: #17231f;
 --blue: #315f72;
 --cyan: #2d746e;
 --cyan-bright: #3f9188;
 --amber: #95621e;
 --red: #9b4943;
 --green: #39735d;
 --violet: #6c5b8c;
 --glow-a: rgba(45, 116, 110, .07);
 --glow-b: rgba(149, 98, 30, .05);
 --shadow: 0 16px 42px rgba(24, 34, 30, .10);
 --shadow-soft: 0 3px 16px rgba(24, 34, 30, .055);
 --shadow-hover: 0 10px 28px rgba(24, 34, 30, .10);
 --radius: 14px;
 --radius-sm: 9px;
 --max: 1200px;
 --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
 --sans: 'Instrument Sans', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
 --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
 --ease: cubic-bezier(.22, .75, .25, 1);
 color-scheme: light;
}
html[data-theme="dark"] {
 --ink: #eee8dc;
 --ink-2: #c7cfc7;
 --muted: #9ba69d;
 --paper: #101613;
 --surface: #171e1a;
 --surface-2: #212922;
 --line: rgba(238, 232, 220, .13);
 --line-strong: rgba(238, 232, 220, .27);
 --grid: rgba(238, 232, 220, .035);
 --navy: #243a34;
 --navy-2: #0d1411;
 --blue: #8bb8c7;
 --cyan: #77b8b0;
 --cyan-bright: #8dcbc3;
 --amber: #d8a765;
 --red: #e28d85;
 --green: #80bca1;
 --violet: #b4a4d2;
 --glow-a: rgba(119, 184, 176, .055);
 --glow-b: rgba(216, 167, 101, .04);
 --shadow: 0 16px 42px rgba(0, 0, 0, .30);
 --shadow-soft: 0 3px 16px rgba(0, 0, 0, .20);
 --shadow-hover: 0 10px 28px rgba(0, 0, 0, .32);
 color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
 margin: 0;
 font-family: var(--sans);
 color: var(--ink);
 background: var(--paper);
 line-height: 1.62;
 text-rendering: optimizeLegibility;
 -webkit-font-smoothing: antialiased;
 overflow-x: clip;
 transition: background-color .35s ease, color .35s ease;
}
/* film grain over everything, barely-there */
body::after { display: none; }
html[data-theme="dark"] body::after { display: none; }
::selection { background: color-mix(in srgb, var(--cyan) 26%, transparent); }
a { color: var(--blue); text-decoration-thickness: .07em; text-underline-offset: .18em; transition: color .18s ease; }
a:hover { color: var(--cyan); }
button, input { font: inherit; }
img, svg { max-width: 100%; }
/* author display rules on cards would otherwise beat the UA [hidden] mapping,
 silently breaking the library/research filters */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
code, pre, kbd { font-family: var(--mono); }

.skip-link { position: fixed; left: 12px; top: -70px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 1001; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
 position: sticky; top: 0; z-index: 80;
 backdrop-filter: blur(16px) saturate(1.3);
 -webkit-backdrop-filter: blur(16px) saturate(1.3);
 background: color-mix(in srgb, var(--paper) 86%, transparent);
 border-bottom: 1px solid var(--line);
 transition: box-shadow .3s ease, background-color .35s ease;
}
.site-header.scrolled { box-shadow: 0 10px 34px rgba(19, 32, 52, .09); }
html[data-theme="dark"] .site-header.scrolled { box-shadow: 0 10px 34px rgba(0, 0, 0, .35); }
.header-inner { max-width: var(--max); margin: 0 auto; min-height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 150px; }
.brand-mark {
 display: grid; place-items: center;
 width: 38px; height: 38px; border-radius: 10px;
 color: #f3efe4;
 background:
 radial-gradient(120% 120% at 20% 15%, rgba(255, 255, 255, .18), transparent 45%),
 linear-gradient(150deg, #1a3d5e 0%, #14586b 55%, #157a80 100%);
 font-family: var(--serif); font-size: 15px; font-weight: 560;
 box-shadow: 0 8px 22px rgba(19, 45, 65, .28), inset 0 0 0 1px rgba(255, 255, 255, .1);
 transition: transform .25s var(--ease);
}
.brand:hover .brand-mark { transform: none; }
.brand strong, .brand small { display: block; line-height: 1.1; }
.brand strong { letter-spacing: .01em; font-weight: 650; }
.brand small { margin-top: 4px; color: var(--muted); font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .16em; }
.primary-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.primary-nav a {
 position: relative; padding: 9px 12px; border-radius: 8px;
 color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600;
 transition: color .18s ease;
}
.primary-nav a::after {
 content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
 background: var(--cyan); border-radius: 2px;
 transform: scaleX(0); transform-origin: left center;
 transition: transform .25s var(--ease);
}
.primary-nav a:hover, .primary-nav a.active { color: var(--ink); }
.primary-nav a:hover::after, .primary-nav a.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .nav-toggle { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 9px; cursor: pointer; transition: border-color .2s ease, transform .2s ease; }
.theme-toggle { width: 36px; height: 36px; display: grid; place-items: center; }
.theme-toggle span { display: inline-block; transition: transform .45s var(--ease); }
.theme-toggle:hover { border-color: var(--line-strong); }
html[data-theme="dark"] .theme-toggle span { transform: rotate(180deg); }
.nav-toggle { display: none; padding: 8px 12px; }

/* ---------- buttons ---------- */
.button {
 display: inline-flex; align-items: center; justify-content: center; gap: 8px;
 border-radius: 10px; padding: 13px 18px;
 background: var(--navy);
 color: #f3efe4; text-decoration: none;
 border: 1px solid var(--navy);
 font-weight: 650; line-height: 1.1; cursor: pointer; letter-spacing: .005em;
 box-shadow: none;
 transition: transform .2s var(--ease), box-shadow .2s ease, background-color .2s ease;
}
.button:hover { color: #fff; transform: none; background: var(--navy-2); box-shadow: none; }
.button:active { transform: translateY(0); }
html[data-theme="dark"] .button { background: var(--cyan); color: var(--navy-2); border-color: var(--cyan); box-shadow: none; }
html[data-theme="dark"] .button:hover { color: var(--navy-2); background: var(--cyan-bright); }
.button-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.button-secondary:hover { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-soft); }
html[data-theme="dark"] .button-secondary { background: transparent; color: var(--ink); }
html[data-theme="dark"] .button-secondary:hover { color: var(--ink); background: var(--surface); }
.button-quiet { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: none; }
.button-quiet:hover { color: var(--ink); border-color: var(--line-strong); }
html[data-theme="dark"] .button-quiet { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .button-quiet:hover { color: var(--ink); }
.button-small { padding: 9px 13px; font-size: 13px; }

/* ---------- layout / hero ---------- */
.page { max-width: var(--max); margin: 0 auto; padding: 0 24px 96px; }
.hero { position: relative; padding: 68px 0 48px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 48px; align-items: center; }
/* graph-paper ruling behind the hero, bleeding full width */
.hero::before, .page-hero::before, .doc-header::before {
 content: ''; position: absolute; top: -20px; bottom: -10px;
 left: 50%; width: 100vw; transform: translateX(-50%);
 pointer-events: none; z-index: -1;
 background:
 radial-gradient(80% 110% at 82% -10%, var(--glow-a), transparent 62%),
 radial-gradient(55% 90% at 8% 0%, var(--glow-b), transparent 60%);
}

.hero-kicker, .eyebrow {
 display: inline-flex; align-items: center; gap: 10px;
 color: var(--cyan); text-transform: uppercase; letter-spacing: .18em;
 font-family: var(--mono); font-weight: 600; font-size: 11.5px;
}
.hero-kicker::before, .eyebrow::before { content: ''; width: 26px; height: 1.5px; background: currentColor; }
h1, h2, h3, h4 { line-height: 1.14; letter-spacing: -.022em; margin-top: 0; }
h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.4vw, 40px); margin: 14px 0 22px; max-width: 900px; }
h2 { font-family: var(--serif); font-weight: 520; font-size: clamp(28px, 3vw, 38px); margin: 12px 0 18px; }
h3 { font-size: 19px; letter-spacing: -.01em; }
.hero-lede { color: var(--ink-2); font-size: clamp(17px, 1.7vw, 19px); line-height: 1.62; max-width: 760px; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { color: var(--muted); font-size: 13.5px; margin-top: 20px; font-style: italic; font-family: var(--serif); font-weight: 420; letter-spacing: 0; }
.hero-panel {
 position: relative; overflow: hidden;
 background:
 radial-gradient(130% 110% at 85% -20%, rgba(46, 158, 166, .28), transparent 55%),
 radial-gradient(100% 130% at -10% 110%, rgba(43, 98, 161, .3), transparent 55%),
 linear-gradient(160deg, #16283f, var(--navy-2));
 color: #f0ecdf; border-radius: 22px; padding: 32px;
 box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.hero-panel::after {
 content: ''; position: absolute; width: 220px; height: 220px;
 border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%;
 right: -70px; bottom: -90px;
 box-shadow: 0 0 0 26px rgba(255, 255, 255, .04), 0 0 0 52px rgba(255, 255, 255, .025), 0 0 0 78px rgba(255, 255, 255, .015);
}
.hero-panel .panel-label { color: #86d2d2; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .18em; font-weight: 600; }
.hero-panel blockquote { font-family: var(--serif); font-weight: 470; font-size: 24px; line-height: 1.35; letter-spacing: -.012em; margin: 18px 0 22px; position: relative; z-index: 1; }
.hero-panel p { color: rgba(240, 236, 223, .72); position: relative; z-index: 1; font-size: 15px; }

/* ---------- stat strip ---------- */
.stat-strip {
 display: grid; grid-template-columns: repeat(4, 1fr);
 border: 1px solid var(--line); border-radius: var(--radius);
 background: var(--surface); overflow: hidden; margin-bottom: 100px;
 box-shadow: var(--shadow-soft);
}
.stat-strip > div { padding: 24px; border-right: 1px solid var(--line); transition: background-color .25s ease; }
.stat-strip > div:hover { background: var(--surface-2); }
.stat-strip > div:last-child { border-right: 0; }
.stat-number { display: block; font-family: var(--serif); font-weight: 500; font-size: 31px; color: var(--cyan); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 500; }

/* ---------- sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr minmax(280px, .65fr); gap: 40px; align-items: end; margin-bottom: 40px; }
.section-head p { color: var(--ink-2); font-size: 17.5px; line-height: 1.6; margin-bottom: 6px; }
.section-narrow { max-width: 820px; }
.callout { border-left: 3px solid var(--cyan); background: color-mix(in srgb, var(--cyan) 5%, var(--surface)); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 20px 24px; }
.callout strong { color: var(--cyan); }
.callout.warning { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 6%, var(--surface)); }
.callout.warning strong { color: var(--amber); }
.callout.danger { border-color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.callout.danger strong { color: var(--red); }

/* ---------- cards (shared behavior) ---------- */
.concept-card, .evidence-card, .object-card, .research-card, .gap-card, .ba-card, .doc-card, .arch-node, .trace-panel {
 transition: transform .28s var(--ease), box-shadow .28s ease, border-color .28s ease;
}
.concept-card:hover, .evidence-card:hover, .object-card:hover, .research-card:hover, .ba-card:hover, .arch-node:hover, .doc-card:hover {
 transform: translateY(-3px);
 box-shadow: var(--shadow-hover);
 border-color: var(--line-strong);
}

.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.concept-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-height: 240px; box-shadow: var(--shadow-soft); }
.concept-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent 65%); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.concept-card:hover::before { transform: scaleX(1); }
.concept-card .concept-index { font-family: var(--mono); color: var(--cyan); font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.concept-card .concept-index::after { content: ''; display: block; width: 22px; height: 1px; background: var(--line-strong); margin-top: 10px; }
.concept-card h3 { margin: 26px 0 10px; font-family: var(--serif); font-weight: 540; font-size: 23px; }
.concept-card strong { display: block; margin-bottom: 10px; color: var(--ink); line-height: 1.45; }
.concept-card p { color: var(--ink-2); margin: 0; font-size: 14.5px; }

.equation-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.equation {
 padding: 26px; border-radius: var(--radius);
 background:
 linear-gradient(rgba(133, 196, 208, .05) 1px, transparent 1px),
 linear-gradient(90deg, rgba(133, 196, 208, .05) 1px, transparent 1px),
 linear-gradient(160deg, #16283f, var(--navy-2));
 background-size: 27px 27px, 27px 27px, auto;
 color: #e9eff7; font-family: var(--mono); font-size: 15px; line-height: 1.7; overflow: auto;
 box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.equation small { display: block; margin-top: 14px; color: rgba(233, 239, 247, .62); font-family: var(--sans); font-size: 13.5px; line-height: 1.55; }

.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ba-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-soft); }
.ba-card h3 { display: flex; justify-content: space-between; align-items: center; font-family: var(--serif); font-weight: 540; font-size: 24px; }
.ba-card ul { padding-left: 20px; color: var(--ink-2); }
.ba-card li { margin: 10px 0; }
.ba-card li::marker { color: var(--cyan); }

.badge { display: inline-flex; border-radius: 999px; padding: 5px 10px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.badge.good { color: var(--green); border-color: color-mix(in srgb, var(--green) 32%, transparent); background: color-mix(in srgb, var(--green) 9%, transparent); }
.badge.warn { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 32%, transparent); background: color-mix(in srgb, var(--amber) 9%, transparent); }
.badge.open { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 32%, transparent); background: color-mix(in srgb, var(--violet) 9%, transparent); }

.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.evidence-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden; box-shadow: var(--shadow-soft); }
.evidence-card::before { content: ''; position: absolute; top: 0; left: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--blue), transparent 80%); }
.evidence-card:has(.badge.good)::before { background: linear-gradient(90deg, var(--green), transparent 80%); }
.evidence-card:has(.badge.warn)::before { background: linear-gradient(90deg, var(--amber), transparent 80%); }
.evidence-card:has(.badge.open)::before { background: linear-gradient(90deg, var(--violet), transparent 80%); }
.evidence-card .big { font-family: var(--serif); font-weight: 460; font-size: 40px; letter-spacing: -.02em; line-height: 1; margin: 14px 0 12px; font-variant-numeric: tabular-nums; }
.evidence-card p { color: var(--ink-2); font-size: 14.5px; }
.evidence-card a { font-size: 13px; font-weight: 650; text-decoration: none; }
.evidence-card a:hover { text-decoration: underline; }

.architecture-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.arch-node { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; position: relative; }
.arch-node .num { font-family: var(--mono); color: var(--paper); background: var(--cyan); border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 600; }
html[data-theme="dark"] .arch-node .num { color: var(--navy-2); }
.arch-node h3 { font-size: 16.5px; margin: 14px 0 5px; }
.arch-node p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.arch-node:not(:nth-child(4n))::after { content: '->'; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); color: var(--cyan); font-family: var(--mono); z-index: 2; }

.decision-list { display: grid; gap: 12px; }
.decision-row { display: grid; grid-template-columns: 42px 220px 1fr; gap: 18px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.decision-row .check { width: 30px; height: 30px; border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); background: color-mix(in srgb, var(--cyan) 9%, transparent); border-radius: 50%; display: grid; place-items: center; color: var(--cyan); font-weight: 700; }
.decision-row strong { font-size: 16px; }
.decision-row p { margin: 0; color: var(--ink-2); }

.page-hero { position: relative; padding: 58px 0 42px; max-width: 880px; }
.page-hero h1 { font-size: clamp(28px, 3.4vw, 38px); }
.page-hero p { font-size: 18px; color: var(--ink-2); line-height: 1.62; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 30px; }
.filter-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.filter-button:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-button.active { color: var(--paper); background: var(--navy); border-color: var(--navy); }
html[data-theme="dark"] .filter-button.active { color: var(--navy-2); background: var(--cyan); border-color: var(--cyan); }

.research-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.research-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; min-height: 420px; box-shadow: var(--shadow-soft); }
.research-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.research-card .metric { font-family: var(--serif); font-weight: 450; font-size: 44px; letter-spacing: -.02em; line-height: 1; margin: 24px 0 14px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.research-card h3 { font-family: var(--serif); font-weight: 530; font-size: 27px; }
.research-card p { color: var(--ink-2); }
.research-card .implication { border-left: 3px solid var(--blue); padding-left: 14px; color: var(--ink); }
.research-card .caveat { font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 16px; }
.research-links { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 14px; }
.research-links a { font-size: 13px; font-weight: 650; }

.gap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gap-card { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; transition: border-color .25s ease, background-color .25s ease; }
.gap-card:hover { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 4%, transparent); }
.gap-card h3 { font-size: 18px; }
.gap-card p { color: var(--ink-2); font-size: 14px; }

.system-diagram { display: grid; gap: 12px; margin: 36px 0; }
.system-row { display: grid; grid-template-columns: 60px 230px 1fr; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease; }
.system-row:hover { transform: translateX(4px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.system-row .step { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(160deg, #1b3450, var(--navy-2)); color: #8fd0d0; font-family: var(--mono); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.system-row h3 { margin: 0; font-size: 18px; }
.system-row p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.object-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.object-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-soft); }
.object-card code { color: var(--cyan); font-size: 12px; font-weight: 500; background: color-mix(in srgb, var(--cyan) 8%, transparent); border-radius: 5px; padding: 3px 7px; }
.object-card h3 { margin-top: 14px; }
.object-card p { color: var(--ink-2); font-size: 14px; }

.trace { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trace-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-soft); }
.trace-panel h3 { margin-bottom: 16px; font-family: var(--serif); font-weight: 540; font-size: 24px; }
.quote-box { border-left: 3px solid var(--line-strong); padding-left: 16px; color: var(--ink-2); font-family: var(--serif); font-weight: 440; font-style: italic; font-size: 19px; line-height: 1.5; }
.verdict-stack { display: grid; gap: 9px; }
.verdict { display: flex; justify-content: space-between; align-items: center; padding: 13px 15px; border-radius: 10px; background: var(--surface-2); }
.verdict strong { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; }
.verdict strong.accept { color: var(--green); }
.verdict strong.rework { color: var(--amber); }

.human-ui {
 background:
 radial-gradient(120% 100% at 90% -10%, rgba(46, 158, 166, .22), transparent 55%),
 linear-gradient(160deg, #16283f, var(--navy-2));
 color: #f0ecdf; border-radius: 22px; padding: 34px;
 display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
 box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.human-ui .evidence-surface { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13); border-radius: 14px; padding: 22px; }
.human-ui .option { display: block; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; padding: 13px 15px; margin: 10px 0; transition: background-color .2s ease, border-color .2s ease, transform .2s var(--ease); cursor: default; }
.human-ui .option:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .4); transform: translateX(4px); }

.pilot-gates { display: grid; gap: 14px; counter-reset: gate; }
.pilot-gate { counter-increment: gate; display: grid; grid-template-columns: 60px 1fr 220px; gap: 18px; align-items: start; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease; }
.pilot-gate:hover { transform: translateX(4px); border-color: var(--line-strong); }
.pilot-gate::before { content: counter(gate, decimal-leading-zero); width: 42px; height: 42px; display: grid; place-items: center; background: linear-gradient(160deg, #1b3450, var(--navy-2)); color: #8fd0d0; border-radius: 50%; font-family: var(--mono); font-size: 13px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.pilot-gate h3 { margin: 0 0 6px; }
.pilot-gate p { margin: 0; color: var(--ink-2); }
.pilot-gate .exit { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 18px; }

.metric-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.metric-table th, .metric-table td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.metric-table th { background: var(--surface-2); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; color: var(--muted); }
.metric-table td { color: var(--ink-2); }
.metric-table tbody tr { transition: background-color .18s ease; }
.metric-table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }

/* ---------- library ---------- */
.library-tools { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin: 28px 0; }
.search-box { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 13px 16px; transition: border-color .2s ease, box-shadow .2s ease; }
.search-box::placeholder { color: var(--muted); }
.search-box:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 18%, transparent); }
.library-summary { color: var(--muted); font-family: var(--mono); font-size: 12px; align-self: center; }
.library-layout { display: grid; grid-template-columns: 240px 1fr; gap: 30px; }
.library-sidebar { position: sticky; top: 95px; align-self: start; }
.library-sidebar button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink-2); padding: 9px 11px; border-radius: 8px; cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.library-sidebar button.active, .library-sidebar button:hover { background: var(--surface-2); color: var(--ink); }
.library-sidebar button.active { font-weight: 650; }
.doc-list { display: grid; gap: 11px; }
.doc-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.doc-card h3 { font-size: 17px; margin: 0 0 5px; }
.doc-card p { margin: 0; color: var(--muted); font-size: 13px; }
.doc-card .doc-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.doc-card .doc-meta span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; }
.doc-actions { display: flex; align-items: center; gap: 9px; }
.doc-actions a { font-size: 12px; font-weight: 650; white-space: nowrap; }

/* ---------- document pages ---------- */
.doc-page .page { max-width: 1480px; }
.doc-header { position: relative; padding: 52px 0 26px; border-bottom: 1px solid var(--line); }
.breadcrumb { color: var(--muted); font-family: var(--mono); font-size: 12px; margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--cyan); }
.doc-header h1 { font-size: clamp(26px, 3.2vw, 36px); max-width: 1000px; }
.doc-header .doc-summary { color: var(--ink-2); font-size: 18px; max-width: 850px; }
.doc-meta-bar { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0; }
.doc-meta-bar span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.doc-layout { display: grid; grid-template-columns: minmax(0, 900px) 270px; justify-content: center; gap: 50px; padding-top: 34px; }
.doc-content { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(25px, 5vw, 60px); box-shadow: var(--shadow-soft); }
.doc-content h1 { font-family: var(--serif); font-weight: 520; font-size: 34px; }
.doc-content h2 { font-family: var(--serif); font-weight: 540; font-size: 26px; margin-top: 52px; padding-top: 14px; border-top: 1px solid var(--line); }
.doc-content h3 { margin-top: 38px; }
.doc-content p, .doc-content li { color: var(--ink-2); }
.doc-content li::marker { color: var(--cyan); }
.doc-content code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border-radius: 5px; padding: 2px 6px; }
.doc-content pre code { padding: 0; background: transparent; }
.doc-content pre { overflow: auto; padding: 18px; background: #0e1a29; color: #e6edf5; border-radius: 12px; line-height: 1.6; }
.doc-content blockquote { margin: 24px 0; border-left: 3px solid var(--cyan); padding: 10px 22px; background: color-mix(in srgb, var(--cyan) 5%, var(--surface-2)); border-radius: 0 10px 10px 0; font-family: var(--serif); font-weight: 430; font-size: 1.04em; }
.doc-content table { display: block; width: 100%; overflow: auto; border-collapse: collapse; }
.doc-content th, .doc-content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.doc-content th { background: var(--surface-2); font-family: var(--mono); font-size: .82em; text-transform: uppercase; letter-spacing: .05em; }
.doc-content hr { border: 0; border-top: 1px solid var(--line); margin: 50px 0; }
.doc-content .signal-badge { display: inline-flex; padding: 3px 8px; border-radius: 999px; color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); font-size: 10px; font-family: var(--mono); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.doc-content .evidence-note, .doc-content .source-note, .doc-content .implication-note, .doc-content .verdict-note { border-radius: 10px; padding: 14px 17px; }
.doc-content .evidence-note { background: color-mix(in srgb, var(--blue) 8%, var(--surface)); }
.doc-content .source-note { background: color-mix(in srgb, var(--violet) 8%, var(--surface)); }
.doc-content .implication-note { background: color-mix(in srgb, var(--green) 8%, var(--surface)); }
.doc-content .verdict-note { background: color-mix(in srgb, var(--amber) 8%, var(--surface)); }
.doc-toc { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 125px); overflow: auto; padding-right: 8px; }
.doc-toc h2 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
.doc-toc ol { padding-left: 0; list-style: none; border-left: 1px solid var(--line); }
.doc-toc li { margin: 0; color: var(--muted); font-size: 12.5px; }
.doc-toc li.level-3 { margin-left: 12px; }
.doc-toc li.level-4 { margin-left: 24px; }
.doc-toc a { display: block; color: var(--muted); text-decoration: none; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; transition: color .18s ease, border-color .18s ease; }
.doc-toc a:hover { color: var(--ink); }
.doc-toc a.active { color: var(--cyan); border-left-color: var(--cyan); font-weight: 600; }
.code-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--line); background: #0d1724; }
.code-wrap .highlight { min-width: max-content; }
.code-wrap table { border-collapse: collapse; width: 100%; }
.code-wrap td { padding: 0; border: 0; }
.code-wrap .linenos { user-select: none; background: #0a121c; color: #62738a; padding: 16px 10px; text-align: right; vertical-align: top; }
.code-wrap pre { margin: 0; padding: 16px; background: transparent; color: #e6edf5; line-height: 1.6; }
.csv-preview { overflow: auto; margin-bottom: 28px; }
.csv-preview table { width: 100%; border-collapse: collapse; }
.csv-preview th, .csv-preview td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; }
.csv-preview th { background: var(--surface-2); font-family: var(--mono); font-size: 12px; }

/* reading progress + back-to-top (injected by site.js) */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: linear-gradient(90deg, var(--cyan-bright), var(--blue)); transition: width .12s linear; }
.back-to-top {
 position: fixed; right: 22px; bottom: 22px; z-index: 90;
 width: 44px; height: 44px; border-radius: 50%;
 border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
 cursor: pointer; display: grid; place-items: center; font-size: 17px;
 box-shadow: var(--shadow-soft);
 opacity: 0; transform: translateY(10px); pointer-events: none;
 transition: opacity .25s ease, transform .25s var(--ease), border-color .2s ease;
}
.back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- brief / presentation ---------- */
.brief-body {
 overflow: hidden;
 background:
 radial-gradient(110% 80% at 80% -10%, rgba(46, 158, 166, .14), transparent 60%),
 radial-gradient(90% 90% at 0% 110%, rgba(43, 98, 161, .16), transparent 55%),
 linear-gradient(rgba(133, 196, 208, .035) 1px, transparent 1px),
 linear-gradient(90deg, rgba(133, 196, 208, .035) 1px, transparent 1px),
 #0d1a2b;
 background-size: auto, auto, 54px 54px, 54px 54px, auto;
 color: #f4f0e7;
}
.brief-body .site-header, .brief-body .site-footer { display: none; }
.brief-deck { height: 100vh; overflow-y: auto; scroll-snap-type: y mandatory; }
.brief-slide { min-height: 100vh; scroll-snap-align: start; display: grid; align-items: center; padding: 6vh 8vw; position: relative; }
.brief-slide-inner { max-width: 1200px; width: 100%; margin: 0 auto; }
.brief-slide h1, .brief-slide h2 { color: #fdfbf4; }
.brief-slide h1 { font-size: clamp(36px, 4.4vw, 48px); font-weight: 480; max-width: 1000px; }
.brief-slide h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 500; }
.brief-slide p { font-size: clamp(18px, 2vw, 26px); line-height: 1.5; color: rgba(255, 255, 255, .74); max-width: 900px; }
.brief-slide .eyebrow { color: #78c8c7; }
.brief-slide .brief-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 35px; }
.brief-card { border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; padding: 26px; background: rgba(255, 255, 255, .05); backdrop-filter: blur(4px); transition: border-color .25s ease, background-color .25s ease, transform .25s var(--ease); }
.brief-card:hover { border-color: rgba(134, 210, 209, .45); background: rgba(255, 255, 255, .075); transform: translateY(-3px); }
.brief-card strong { display: block; font-size: 20px; margin-bottom: 8px; color: #fdfbf4; }
.brief-card p { font-size: 16px; margin: 0; }
.brief-stat { font-family: var(--serif); font-weight: 440; font-size: clamp(40px, 4.8vw, 56px); color: #86d2d1; line-height: 1; margin: 30px 0 10px; font-variant-numeric: tabular-nums; }
.brief-nav { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 10; display: grid; gap: 9px; }
.brief-nav a { width: 9px; height: 9px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%; text-indent: -999px; overflow: hidden; transition: background-color .25s ease, transform .25s ease, border-color .25s ease; }
.brief-nav a:hover { border-color: #fff; transform: scale(1.3); }
.brief-nav a.active { background: #86d2d1; border-color: #86d2d1; transform: scale(1.25); }
.brief-close { position: fixed; top: 20px; right: 20px; z-index: 20; color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; padding: 9px 13px; text-decoration: none; font-size: 14px; background: rgba(8, 16, 27, .35); backdrop-filter: blur(8px); transition: border-color .2s ease, background-color .2s ease; }
.brief-close:hover { color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(8, 16, 27, .55); }
.brief-hint { position: absolute; bottom: 25px; left: 8vw; color: rgba(255, 255, 255, .42); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.brief-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; background: rgba(255, 255, 255, .08); }
.brief-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #86d2d1, #7fb2e6); transition: width .45s var(--ease); }

/* brief slide choreography (JS adds .is-active; requires html.js) */
html.js .brief-slide .brief-slide-inner > * { opacity: 0; transform: translateY(26px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.js .brief-slide.is-active .brief-slide-inner > * { opacity: 1; transform: none; }
html.js .brief-slide.is-active .brief-slide-inner > :nth-child(2) { transition-delay: .1s; }
html.js .brief-slide.is-active .brief-slide-inner > :nth-child(3) { transition-delay: .2s; }
html.js .brief-slide.is-active .brief-slide-inner > :nth-child(4) { transition-delay: .3s; }
html.js .brief-slide.is-active .brief-slide-inner > :nth-child(5) { transition-delay: .4s; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 46px 24px 62px; background: var(--surface); }
.footer-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 36px; }
.site-footer p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.footer-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .15em; font-weight: 600; color: var(--muted); }

/* ---------- scroll reveal (JS tags elements; requires html.js) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .65s var(--ease), transform .65s var(--ease); transition-delay: calc(var(--reveal-i, 0) * 70ms); }
html.js [data-reveal].in-view { opacity: 1; transform: none; }

/* hero load choreography */
@keyframes rise-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
html.js .hero > div > *, html.js .page-hero > * { animation: rise-in .7s var(--ease) backwards; }
html.js .hero > div > :nth-child(2), html.js .page-hero > :nth-child(2) { animation-delay: .08s; }
html.js .hero > div > :nth-child(3), html.js .page-hero > :nth-child(3) { animation-delay: .16s; }
html.js .hero > div > :nth-child(4) { animation-delay: .24s; }
html.js .hero > div > :nth-child(5) { animation-delay: .32s; }
html.js .hero-panel { animation: rise-in .8s var(--ease) .25s backwards; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
 html.js [data-reveal] { opacity: 1; transform: none; }
 html.js .brief-slide .brief-slide-inner > * { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
 .primary-nav { position: fixed; inset: 72px 0 auto 0; padding: 14px 24px 20px; background: var(--paper); border-bottom: 1px solid var(--line); display: none; flex-direction: column; align-items: stretch; }
 .primary-nav.open { display: flex; }
 .primary-nav a::after { display: none; }
 .primary-nav a:hover, .primary-nav a.active { background: var(--surface-2); }
 .nav-toggle { display: inline-flex; margin-left: auto; }
 .header-actions { margin-left: 0; }
 .brand { min-width: 0; }
 .hero { grid-template-columns: 1fr; }
 .hero-panel { max-width: 700px; }
 .concept-grid, .evidence-grid, .gap-grid, .object-grid { grid-template-columns: repeat(2, 1fr); }
 .architecture-mini { grid-template-columns: repeat(2, 1fr); }
 .arch-node:not(:nth-child(4n))::after { display: none; }
 .research-grid { grid-template-columns: 1fr; }
 .doc-layout { grid-template-columns: 1fr; }
 .doc-toc { position: static; max-height: none; order: -1; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
 .doc-toc ol { border-left: 0; }
 .library-layout { grid-template-columns: 1fr; }
 .library-sidebar { position: static; display: flex; overflow: auto; gap: 7px; }
 .library-sidebar button { width: auto; white-space: nowrap; border: 1px solid var(--line); }
 .human-ui { grid-template-columns: 1fr; }
 .pilot-gate { grid-template-columns: 50px 1fr; }
 .pilot-gate .exit { grid-column: 2; border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
 .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
 .header-inner { padding: 0 16px; gap: 10px; }
 .brand small { display: none; }
 .button-small { display: none; }
 .page { padding-left: 17px; padding-right: 17px; }
 .hero { padding-top: 58px; }
 h1 { font-size: 38px; }
 .stat-strip { grid-template-columns: repeat(2, 1fr); }
 .stat-strip > div:nth-child(2) { border-right: 0; }
 .stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
 .section-head { grid-template-columns: 1fr; }
 .concept-grid, .evidence-grid, .gap-grid, .object-grid, .equation-panel, .before-after, .trace { grid-template-columns: 1fr; }
 .architecture-mini { grid-template-columns: 1fr; }
 .system-row { grid-template-columns: 48px 1fr; }
 .system-row p { grid-column: 2; }
 .decision-row { grid-template-columns: 40px 1fr; }
 .decision-row p { grid-column: 2; }
 .doc-card { grid-template-columns: 1fr; }
 .doc-actions { justify-content: flex-start; }
 .doc-content { padding: 24px 18px; }
 .brief-slide { padding: 60px 26px; }
 .brief-slide .brief-grid { grid-template-columns: 1fr; }
 .brief-nav { display: none; }
 .back-to-top { right: 14px; bottom: 14px; }
 .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- print ---------- */
@media print {
 .skip-link, .site-header, .site-footer, .doc-toc, .hero-actions, .filter-bar, .library-sidebar,
 .reading-progress, .back-to-top, .brief-nav, .brief-close, .brief-progress { display: none !important; }
 body { background: #fff; color: #111; }
 body::after { display: none; }
 .hero::before, .page-hero::before, .doc-header::before { display: none; }
 html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
 .page, .doc-page .page { max-width: none; padding: 0; }
 .section { break-inside: avoid; }
 a { color: #111; }
}

/* ============================================================
 Evidence ledger + decision register (2026-07-15 addition)
 ============================================================ */
.claim-ref { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: var(--cyan); text-decoration: none; border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); background: color-mix(in srgb, var(--cyan) 7%, transparent); border-radius: 999px; padding: 3px 9px; vertical-align: middle; white-space: nowrap; }
.claim-ref:hover { background: color-mix(in srgb, var(--cyan) 15%, transparent); border-color: color-mix(in srgb, var(--cyan) 50%, transparent); }
.claim-ref.gap { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 30%, transparent); background: color-mix(in srgb, var(--violet) 7%, transparent); }
.claim-ref.gap:hover { background: color-mix(in srgb, var(--violet) 15%, transparent); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.verdict-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; border-radius: 999px; padding: 4px 10px; border: 1px solid var(--line); color: var(--muted); }
.verdict-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.verdict-chip.v-confirmed { color: var(--green); border-color: color-mix(in srgb, var(--green) 34%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }
.verdict-chip.v-partial { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 34%, transparent); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.verdict-chip.v-mismatch { color: var(--red); border-color: color-mix(in srgb, var(--red) 34%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }
.verdict-chip.v-none { color: var(--muted); border-style: dashed; }
.verdict-chip.v-gap { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 34%, transparent); background: color-mix(in srgb, var(--violet) 8%, transparent); }

.ledger-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 20px 22px; margin-top: 14px; scroll-margin-top: 110px; }
.ledger-item.load-bearing { border-left: 3px solid var(--cyan); }
.ledger-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ledger-id { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--navy); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
html[data-theme="dark"] .ledger-id { color: var(--ink); }
.ledger-claim { font-size: 15.5px; line-height: 1.55; color: var(--ink); margin: 0 0 10px; }
.ledger-src { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.ledger-src a { color: var(--blue); }
.ledger-item details { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.ledger-item summary { cursor: pointer; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ledger-item summary:hover { color: var(--cyan); }
.ledger-quote { border-left: 3px solid color-mix(in srgb, var(--cyan) 45%, transparent); background: color-mix(in srgb, var(--cyan) 5%, transparent); border-radius: 0 10px 10px 0; padding: 10px 14px; font-size: 13.5px; font-style: italic; color: var(--ink-2); margin: 10px 0 0; }
.ledger-kv { font-size: 13px; color: var(--ink-2); margin: 8px 0 0; line-height: 1.6; }
.ledger-kv strong { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ledger-used { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ledger-used a { font-size: 12px; color: var(--blue); text-decoration: none; border-bottom: 1px dotted color-mix(in srgb, var(--blue) 50%, transparent); }
.ledger-used a:hover { border-bottom-style: solid; }
.ledger-domain-head { margin-top: 44px; }

.decision-block { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 26px 28px; margin-top: 18px; scroll-margin-top: 110px; }
.decision-block.owner { border-left: 3px solid var(--amber); }
.decision-block.leadership { border-left: 3px solid var(--navy); }
html[data-theme="dark"] .decision-block.leadership { border-left-color: var(--cyan-bright); }
.decision-block.default-adopted { border-left: 3px solid var(--green); }
.decision-block h3 { font-size: 21px; margin: 8px 0 6px; }
.decision-why { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin: 8px 0 0; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.opt { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.opt strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 13.5px; }
.opt.recommended { border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 6%, transparent); }
.opt.recommended strong::after { content: " - recommended"; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.flip-line { display: flex; gap: 10px; align-items: baseline; border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.flip-line strong { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--amber); white-space: nowrap; }
.flip-line.deps strong { color: var(--violet); }
.decision-evidence { margin-top: 12px; }
.decision-evidence > strong { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); display: block; margin-bottom: 6px; }
.ev-row { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; padding: 4px 0; }
.ev-row .claim-ref { flex-shrink: 0; }
.ledger-filter-note { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* decision-use grades */
.verdict-chip.g-a { color: var(--green); border-color: color-mix(in srgb, var(--green) 34%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }
.verdict-chip.g-b { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 34%, transparent); background: color-mix(in srgb, var(--blue) 8%, transparent); }
.verdict-chip.g-c { color: var(--red); border-color: color-mix(in srgb, var(--red) 34%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }
.claim-ref.gA { color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, transparent); background: color-mix(in srgb, var(--green) 7%, transparent); }
.claim-ref.gA:hover { background: color-mix(in srgb, var(--green) 15%, transparent); }
.claim-ref.gB { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 30%, transparent); background: color-mix(in srgb, var(--blue) 7%, transparent); }
.claim-ref.gB:hover { background: color-mix(in srgb, var(--blue) 15%, transparent); }
.claim-ref.gC { color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); background: color-mix(in srgb, var(--red) 7%, transparent); }
.claim-ref.gC:hover { background: color-mix(in srgb, var(--red) 15%, transparent); }

/* ---------- decision path (2026-07-18) ---------- */
.nav-more { position: relative; display: inline-block; }
.nav-more summary { list-style: none; cursor: pointer; color: inherit; padding: 6px 2px; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: ' \25BE'; font-size: 10px; }
.nav-more-panel { position: absolute; top: 100%; left: 0; min-width: 220px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: var(--shadow); padding: 8px 0; display: flex; flex-direction: column; }
.nav-more-panel a { padding: 8px 16px; }
.nav-more-panel a:hover { background: var(--surface-2); }
.nav-cta { border: 1px solid var(--navy); border-radius: 8px; padding: 8px 13px;
  font-weight: 600; background: var(--navy); color: #f4f0e7 !important; }
html[data-theme="dark"] .nav-cta { background: var(--cyan); border-color: var(--cyan); color: var(--navy-2) !important; }
.decision-card { background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--radius); padding: 22px 26px; margin: 18px 0; box-shadow: var(--shadow-soft); }
.choice-list li { margin: 4px 0; }
.next-block { border-top: 2px solid var(--line-strong); margin-top: 48px; padding-top: 22px; }
.decision-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--navy); color: var(--paper); padding: 10px 24px; display: none;
  align-items: baseline; gap: 18px; justify-content: center; flex-wrap: wrap; font-size: 14.5px; }
.decision-bar.visible { display: flex; }
.decision-bar a { color: var(--paper); text-decoration: underline; font-weight: 650; white-space: nowrap; }
html[data-theme="dark"] .decision-bar { background: var(--navy-2); }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 26px 0 8px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-soft); }
.step .stepnum { font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.step h3 { margin: 8px 0 8px; font-size: 17.5px; }
.step p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.trust-row { color: var(--muted); font-size: 14.5px; margin: 14px 0 0; }
@media (max-width: 900px) { .step-grid { grid-template-columns: 1fr; } .nav-more-panel { position: static; box-shadow: none; border: 0; } }

/* Calm documentation refinements. */
.primary-nav .nav-cta::after { display: none; }
.primary-nav .nav-cta:hover { color: #fff !important; background: var(--navy-2); }
html[data-theme="dark"] .primary-nav .nav-cta:hover { color: var(--navy-2) !important; background: var(--cyan-bright); }
.concept-card:hover, .evidence-card:hover, .object-card:hover, .research-card:hover, .ba-card:hover, .arch-node:hover, .doc-card:hover { transform: none; }

.decision-facts-wide dd { white-space: normal; overflow-wrap: anywhere; text-align: right; max-width: 60%; }

.decision-points { list-style: none; margin: 18px 0; padding: 0; }
.decision-points li { padding: 10px 0 10px 22px; position: relative; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; }
.decision-points li:last-child { border-bottom: 0; }
.decision-points li::before { content: '\2713'; position: absolute; left: 0; color: var(--cyan); font-weight: 700; }
