/* ============================================================
   Blueprint & Ledger — design tokens
   Paper sections carry narrative; blueprint panels carry systems.
   Amber is semantic (gates/status) only. Cobalt is the accent.
   ============================================================ */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/assets/fonts/sourceserif4-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/assets/fonts/sourceserif4-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/assets/fonts/sourceserif4-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/ibmplexmono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/ibmplexmono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #16202b;
  --ink-soft: #4a5768;
  --paper: #f5f6f4;
  --paper-raised: #ffffff;
  --line: #d8dcd6;
  --blueprint: #14263f;
  --blueprint-deep: #0e1c30;
  --bp-line: #9fc0e8;
  --bp-line-dim: #3d5a82;
  --bp-text: #dce8f5;
  --bp-text-dim: #8ca6c4;
  --cobalt: #2554d0;
  --cobalt-deep: #1d43a8;
  --amber: #e8a33d;
  --green: #3f9e5f;

  --display: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;

  --measure: 66ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--cobalt-deep); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.015em; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(37, 84, 208, 0.07);
  border-radius: 3px;
  padding: 0.1em 0.35em;
}
pre {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  background: var(--blueprint-deep);
  color: var(--bp-text);
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* ---------- structural chrome ---------- */

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper-raised); padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.site-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-head .wordmark {
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.site-head nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-head nav a {
  font-family: var(--mono); font-size: 0.75rem; text-transform: lowercase;
  color: var(--ink-soft); text-decoration: none;
}
.site-head nav a:hover { color: var(--cobalt); }

.site-foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem var(--gutter) 3rem;
  font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* ---------- shared section scaffolding ---------- */

.section { padding: clamp(3rem, 8vw, 5.5rem) var(--gutter); }
.section-inner { max-width: 72rem; margin: 0 auto; }

.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--cobalt);
  display: block; margin-bottom: 0.9rem;
}
.panel-blueprint .eyebrow { color: var(--bp-line); }

.section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; margin-bottom: 1rem;
}
.section-lede {
  max-width: var(--measure); font-size: 1.125rem; color: var(--ink-soft); margin-bottom: 2.2rem;
}
.panel-blueprint .section-lede { color: var(--bp-text-dim); }

/* ---------- blueprint panels ---------- */

.panel-blueprint {
  background:
    linear-gradient(rgba(159, 192, 232, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 192, 232, 0.045) 1px, transparent 1px),
    var(--blueprint);
  background-size: 28px 28px, 28px 28px, auto;
  color: var(--bp-text);
}
.panel-blueprint h2, .panel-blueprint h3 { color: #fff; }
.panel-blueprint a { color: var(--bp-line); }
.panel-blueprint a:hover { color: #fff; }

.diagram-frame { margin: 2rem 0 0.5rem; }
.diagram-frame svg { width: 100%; height: auto; display: block; }
.diagram-caption {
  font-family: var(--mono); font-size: 0.72rem; color: var(--bp-text-dim);
  margin-top: 0.9rem;
}

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

.hero { padding: clamp(3.5rem, 9vw, 7rem) var(--gutter) clamp(3rem, 7vw, 5rem); }
.hero-grid {
  max-width: 72rem; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 700; letter-spacing: -0.025em;
  margin: 0.6rem 0 1.3rem;
}
.hero h1 .accent { color: var(--cobalt); }
.hero .hero-lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 34rem; }
.hero .hero-cta { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.btn {
  font-family: var(--display); font-weight: 600; font-size: 0.9rem;
  text-decoration: none; border-radius: 4px; padding: 0.65rem 1.2rem;
  display: inline-block;
}
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-deep); color: #fff; }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: var(--paper-raised); }
.btn-ghost:hover { border-color: var(--cobalt); color: var(--cobalt); }

/* the signature: run-log trace panel */
.trace {
  background: var(--blueprint-deep);
  border: 1px solid var(--bp-line-dim);
  border-radius: 8px;
  padding: 1.1rem 1.25rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.9;
  color: var(--bp-text);
  box-shadow: 0 18px 40px -22px rgba(14, 28, 48, 0.55);
}
.trace-title {
  color: var(--bp-text-dim); font-size: 0.7rem; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--bp-line-dim); padding-bottom: 0.55rem; margin-bottom: 0.65rem;
  display: flex; justify-content: space-between; gap: 1rem;
}
.trace-line { display: flex; gap: 0.75rem; opacity: 0; animation: trace-commit 0.35s ease-out forwards; }
.trace-line .t { color: var(--bp-line-dim); flex-shrink: 0; }
.trace-line .ok { color: var(--green); }
.trace-line .gate { color: var(--amber); }
.trace-note {
  margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--bp-line-dim);
  color: var(--bp-text-dim); font-size: 0.72rem; font-style: normal;
  opacity: 0; animation: trace-commit 0.5s ease-out forwards;
}
@keyframes trace-commit { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .trace-line, .trace-note { opacity: 1; }
}

/* ---------- stats strip ---------- */

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1px;
  background: var(--line); border-block: 1px solid var(--line);
}
.stat { background: var(--paper); padding: 1.4rem var(--gutter); }
.stat .n { font-family: var(--display); font-weight: 700; font-size: 1.7rem; display: block; }
.stat .l { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-soft); letter-spacing: 0.04em; }

/* ---------- card grids ---------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.25rem; }
.card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px;
  padding: 1.5rem 1.5rem 1.4rem; display: flex; flex-direction: column; gap: 0.7rem;
  position: relative; transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--cobalt); transform: translateY(-2px); }
.card h3 { font-size: 1.15rem; font-weight: 600; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ''; position: absolute; inset: 0; }
.card p { font-size: 0.95rem; color: var(--ink-soft); flex-grow: 1; }
.card .meta { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.panel-blueprint .card { background: rgba(14, 28, 48, 0.55); border-color: var(--bp-line-dim); }
.panel-blueprint .card:hover { border-color: var(--bp-line); }
.panel-blueprint .card h3 { color: #fff; }
.panel-blueprint .card p { color: var(--bp-text-dim); }

.chip {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
  padding: 0.15rem 0.5rem; border-radius: 999px; letter-spacing: 0.03em;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--paper);
}
.chip-status-shipped { border-color: var(--green); color: var(--green); background: transparent; }
.chip-status-active { border-color: var(--amber); color: #b57718; background: transparent; }
.panel-blueprint .chip { border-color: var(--bp-line-dim); color: var(--bp-text-dim); background: transparent; }
.panel-blueprint .chip-status-shipped { border-color: var(--green); color: #7fd39c; }
.panel-blueprint .chip-status-active { border-color: var(--amber); color: var(--amber); }

/* ---------- factory pipeline (real sequence, earns numbering) ---------- */

.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1rem; margin-top: 2rem; }
.pipeline .stage {
  border: 1px solid var(--bp-line-dim); border-radius: 6px; padding: 1rem 1.1rem;
  background: rgba(14, 28, 48, 0.55);
}
.pipeline .stage .id { font-family: var(--mono); font-size: 0.7rem; color: var(--amber); display: block; margin-bottom: 0.4rem; }
.pipeline .stage .name { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: #fff; display: block; margin-bottom: 0.3rem; }
.pipeline .stage p { font-size: 0.8rem; color: var(--bp-text-dim); line-height: 1.5; }

/* ---------- doctrine strip ---------- */

.doctrine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.doctrine {
  border-left: 3px solid var(--cobalt); padding: 0.2rem 0 0.2rem 1.1rem;
}
.doctrine h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
.doctrine p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- case-study pages (editorial) ---------- */

.ed-case-head { max-width: 78rem; margin: 0 auto; padding: clamp(3rem, 9vh, 6rem) var(--gutter) clamp(1.5rem, 3vh, 2.5rem); }
.ed-case-head .crumb { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--ink-soft); }
.ed-case-head .crumb a { text-decoration: none; color: var(--ink-soft); }
.ed-case-head .crumb a:hover { color: var(--cobalt); }
.ed-case-head h1 { font-family: var(--display); font-size: clamp(2.4rem, 6.2vw, 4.6rem); font-weight: 700; letter-spacing: -0.028em; line-height: 1.02; margin: 1.1rem 0 1.2rem; max-width: 20ch; }
.ed-case-summary { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink-soft); max-width: 52ch; }
.ed-case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; margin-top: 1.6rem; }
.ed-case-meta .kindline { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); }
.ed-case-meta .stack-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.ed-case-diagram { max-width: 78rem; margin: 1.2rem auto 0; padding: 0 var(--gutter); }
.ed-case-diagram .frame { border: 1px solid var(--bp-line-dim); border-radius: 10px; padding: 1.5rem 1.4rem; background-color: var(--blueprint); background-image: linear-gradient(rgba(159,192,232,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(159,192,232,.05) 1px, transparent 1px); background-size: 26px 26px; box-shadow: 0 18px 40px -28px rgba(14,28,48,.5); }
.ed-case-diagram .frame svg { width: 100%; height: auto; display: block; }
.ed-case-diagram.is-compact .frame { max-width: 36rem; }
.ed-case-diagram.is-compact .frame svg { min-width: 0; }

.ed-case-body { max-width: 78rem; margin: 0 auto; padding: clamp(2rem, 5vh, 3.5rem) var(--gutter) clamp(3rem, 7vh, 5rem); }
.case-body { max-width: var(--measure); min-width: 0; }
.case-body h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.018em; margin: 2.6rem 0 0.9rem; }
.case-body h2:first-child { margin-top: 0; }
.case-body h3 { font-size: 1.2rem; margin: 1.9rem 0 0.6rem; }
.case-body p, .case-body ul, .case-body ol { margin-bottom: 1.05rem; font-size: 1.0925rem; }
.case-body ul, .case-body ol { padding-left: 1.4rem; }
.case-body li { margin-bottom: 0.35rem; }
.case-body blockquote {
  border-left: 3px solid var(--amber); padding: 0.3rem 0 0.3rem 1.1rem;
  color: var(--ink-soft); font-style: italic; margin: 1.4rem 0;
}
.case-body blockquote p:last-child { margin-bottom: 0; }
.case-body hr { border: none; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.table-wrap { overflow-x: auto; margin: 1.4rem 0; }
.case-body table { border-collapse: collapse; font-size: 0.9rem; width: 100%; }
.case-body th { font-family: var(--display); font-weight: 600; text-align: left; }
.case-body th, .case-body td { border: 1px solid var(--line); padding: 0.5rem 0.75rem; background: var(--paper-raised); }

.case-next {
  border-top: 1px solid var(--line); padding: 2rem var(--gutter) 2.5rem;
}
.case-next-inner { max-width: 72rem; margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.case-next a { font-family: var(--display); font-weight: 600; font-size: 0.95rem; text-decoration: none; }

/* ---------- index table (non-flagship work) ---------- */

.index-list { border-top: 1px solid var(--line); }
.index-row {
  display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr auto; gap: 1.25rem;
  padding: 1rem 0.25rem; border-bottom: 1px solid var(--line); align-items: baseline;
}
.index-row .name { font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.index-row p { font-size: 0.9rem; color: var(--ink-soft); }

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

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .index-row { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ============================================================
   Editorial layout — big type, whitespace, asymmetry
   ============================================================ */

.ed-hero { max-width: 78rem; margin: 0 auto; padding: clamp(3.5rem, 13vh, 8.5rem) var(--gutter) clamp(2.5rem, 7vh, 5rem); }
.ed-hero .eyebrow { margin-bottom: 1.5rem; }
.ed-hero-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 7.4vw, 5.6rem); line-height: 1.02; letter-spacing: -0.032em;
  max-width: 19ch;
}
.ed-hero-title .accent { color: var(--cobalt); }
.ed-hero-lede { font-size: clamp(1.12rem, 1.65vw, 1.4rem); line-height: 1.55; color: var(--ink-soft); max-width: 48ch; margin-top: 2rem; }
.ed-hero .hero-cta { margin-top: 2.5rem; }

.ed-stats {
  max-width: 78rem; margin: 0 auto; padding: 1.4rem var(--gutter); border-block: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft);
}
.ed-stats b { font-family: var(--display); color: var(--ink); font-size: 1.05rem; font-weight: 700; margin-right: 0.45rem; }

.ed-section { max-width: 78rem; margin: 0 auto; padding: clamp(3.5rem, 9vh, 6.5rem) var(--gutter); }
.ed-kicker { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cobalt); margin-bottom: 0.9rem; display: block; }
.panel-blueprint .ed-kicker { color: var(--bp-line); }
.ed-title { font-family: var(--display); font-size: clamp(1.9rem, 4.3vw, 3.3rem); font-weight: 700; letter-spacing: -0.022em; line-height: 1.05; max-width: 22ch; }
.ed-lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 54ch; margin-top: 1.3rem; }
.panel-blueprint .ed-lede { color: var(--bp-text-dim); }

/* featured — big alternating blocks */
.ed-features { margin-top: 2.5rem; }
.ed-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(2.2rem, 4.5vw, 3.4rem) 0; border-top: 1px solid var(--line); }
.ed-feature:last-child { border-bottom: 1px solid var(--line); }
.ed-feature-visual { grid-column: 2; }
.ed-feature-body { grid-column: 1; }
.ed-feature:nth-child(even) { grid-template-columns: minmax(0, 430px) minmax(0, 1fr); }
.ed-feature:nth-child(even) .ed-feature-visual { grid-column: 1; }
.ed-feature:nth-child(even) .ed-feature-body { grid-column: 2; }
.ed-feature-index { font-family: var(--mono); font-size: 0.78rem; color: var(--cobalt); }
.ed-feature h3 { font-family: var(--display); font-size: clamp(1.7rem, 3.4vw, 2.7rem); font-weight: 700; letter-spacing: -0.022em; margin: 0.35rem 0 0.85rem; line-height: 1.06; }
.ed-feature h3 a { color: inherit; text-decoration: none; }
.ed-feature h3 a:hover { color: var(--cobalt); }
.ed-feature-body p { font-size: 1.04rem; color: var(--ink-soft); max-width: 48ch; }
.ed-feature-meta { display: flex; gap: 0.6rem; align-items: center; margin-top: 1.3rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); }
.ed-feature-visual { border-radius: 10px; overflow: hidden; position: relative; display: flex; flex-direction: column; gap: 0.7rem; padding: 1.15rem 1.15rem 0.95rem; background: linear-gradient(140deg, var(--blueprint), var(--blueprint-deep)); border: 1px solid var(--bp-line-dim); box-shadow: 0 24px 50px -30px rgba(14,28,48,.6); }
.ed-feature-visual::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(159,192,232,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(159,192,232,.06) 1px, transparent 1px); background-size: 26px 26px; pointer-events: none; }
.ed-feature-visual .schematic { position: relative; }
.ed-feature-visual .schematic svg { width: 100%; height: auto; display: block; }
.ed-feature-visual .tag { position: relative; font-family: var(--mono); font-size: 0.68rem; color: var(--bp-text-dim); border-top: 1px solid var(--bp-line-dim); padding-top: 0.6rem; }

/* engine — diagram as hero visual */
.ed-engine .ed-diagram { margin-top: 2.6rem; border: 1px solid var(--bp-line-dim); border-radius: 10px; padding: 1.5rem; background: rgba(14,28,48,.35); }
.ed-engine .ed-diagram svg { width: 100%; height: auto; display: block; }
.ed-systems { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(2rem, 5vw, 4.5rem); margin-top: 2.6rem; }
.ed-system { border-top: 1px solid var(--bp-line-dim); padding: 1.35rem 0; }
.ed-system h4 { font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
.ed-system h4 a { color: #fff; text-decoration: none; }
.ed-system h4 a:hover { color: var(--bp-line); }
.ed-system p { color: var(--bp-text-dim); font-size: 0.96rem; margin-top: 0.45rem; max-width: 42ch; }

/* catalog — airy editorial list */
.ed-catalog-group { margin-top: 3rem; }
.ed-catalog-group .ed-kicker { border-bottom: 2px solid var(--ink); padding-bottom: 0.5rem; margin-bottom: 0.3rem; }
.ed-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 1.5rem; align-items: baseline; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.ed-item h4 { font-family: var(--display); font-size: 1.32rem; font-weight: 600; }
.ed-item h4 a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--cobalt); }
.ed-item .desc { grid-column: 1; color: var(--ink-soft); font-size: 1rem; max-width: 58ch; margin-top: 0.2rem; }
.ed-item .stack { grid-column: 1; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); margin-top: 0.5rem; letter-spacing: 0.02em; }
.ed-item .status { grid-column: 2; grid-row: 1; justify-self: end; }
.ed-worknote { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); margin-top: 2rem; max-width: 60ch; line-height: 1.7; }

/* doctrine + about editorial */
.ed-doctrine { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.4rem) clamp(2rem, 5vw, 5rem); margin-top: 3rem; }
.ed-rule h4 { font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; }
.ed-rule p { color: var(--ink-soft); font-size: 1.02rem; margin-top: 0.5rem; }
.ed-about p { font-size: 1.2rem; line-height: 1.6; color: var(--ink); max-width: 56ch; }
.chip-status-wip { border-color: #8792a3; color: #5b6675; background: transparent; }

@media (max-width: 820px) {
  .ed-feature, .ed-feature:nth-child(even) { grid-template-columns: 1fr; }
  .ed-feature-visual, .ed-feature:nth-child(even) .ed-feature-visual { grid-column: 1; order: 2; max-width: 430px; }
  .ed-feature-body, .ed-feature:nth-child(even) .ed-feature-body { grid-column: 1; order: 1; }
  .ed-systems, .ed-doctrine { grid-template-columns: 1fr; }
}

/* ============================================================
   #1 build-reveal + run-log  ·  #3 honesty filter
   ============================================================ */

.js-build [data-reveal] { opacity: 0; transform: translateY(26px); }
[data-reveal] { transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }
/* reduced-motion: keep a gentle fade-in sequence, just drop the movement */
@media (prefers-reduced-motion: reduce) { .js-build [data-reveal] { transform: none; } [data-reveal] { transition: opacity .4s ease; } }

.buildlog { max-width: 78rem; margin: 1.6rem auto 0; padding: 0 var(--gutter); }
.buildlog-inner { border: 1px solid var(--bp-line-dim); border-radius: 8px; background: var(--blueprint-deep); color: var(--bp-text); font-family: var(--mono); font-size: 0.76rem; line-height: 1.9; padding: 0.9rem 1.1rem 1rem; max-width: 31rem; box-shadow: 0 16px 36px -24px rgba(14,28,48,.5); }
.buildlog-title { color: var(--bp-text-dim); font-size: 0.7rem; letter-spacing: .06em; border-bottom: 1px solid var(--bp-line-dim); padding-bottom: .5rem; margin-bottom: .55rem; display: flex; justify-content: space-between; gap: 1rem; }
.bl-line { opacity: 0; transform: translateY(2px); transition: opacity .3s ease, transform .3s ease; display: flex; gap: .55rem; }
.bl-line.is-in { opacity: 1; transform: none; }
.bl-line > span:first-child { color: var(--bp-line-dim); }
.bl-line .ok { color: var(--green); }
.bl-line .gate { color: var(--amber); }
.buildlog .note { color: var(--bp-text-dim); margin-top: .6rem; padding-top: .55rem; border-top: 1px solid var(--bp-line-dim); opacity: 0; transition: opacity .5s ease; }
.buildlog.done .note { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .bl-line { transform: none; transition: opacity .25s ease; } }

.ed-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.7rem 0 0.4rem; align-items: center; }
.ed-filter .flabel { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); margin-right: 0.35rem; }
.ed-filter button { font-family: var(--mono); font-size: 0.74rem; padding: 0.34rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-raised); color: var(--ink-soft); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.ed-filter button:hover { border-color: var(--cobalt); color: var(--cobalt); }
.ed-filter button[aria-pressed="true"] { border-color: var(--ink); color: var(--paper-raised); background: var(--ink); }
.ed-item[hidden], .ed-catalog-group[hidden] { display: none; }

/* doctrine logic diagram — blueprint panel on the paper section */
.doctrine-diagram { margin: 1.8rem 0 2.6rem; border: 1px solid var(--bp-line-dim); border-radius: 10px; padding: 1.5rem 1.4rem; background-color: var(--blueprint); background-image: linear-gradient(rgba(159,192,232,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(159,192,232,.05) 1px, transparent 1px); background-size: 26px 26px; box-shadow: 0 18px 40px -28px rgba(14,28,48,.5); }
.doctrine-diagram svg { width: 100%; height: auto; display: block; }
