/* GUARDRAIL UNIFIED STYLESHEET — index, how, docs, recipes */
/* ── RESET & CUSTOM PROPERTIES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --void: #070c14;
  --abyss: #0d1520;
  --surface: #111c2d;
  --border: #1a2d45;
  --border-hi: #243d5c;
  --teal: #00e5c8;
  --teal-dim: #00a896;
  --teal-glow: rgba(0, 229, 200, 0.12);
  --teal-line: rgba(0, 229, 200, 0.28);
  --amber: #ff8c2a;
  --amber-glow: rgba(255, 140, 42, 0.10);
  --amber-dim: #c96a14;
  --green: #00ff88;
  --green-glow: rgba(0, 255, 136, 0.10);
  --red: #ff4455;
  --red-glow: rgba(255, 68, 85, 0.10);
  --white: #f0f4f8;
  --muted: #6b8199;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar: 260px;
  --nav-h: 57px;
}

/* ── CONSOLIDATED FONT FAMILIES ── */

.nav-links a, .nav-right a, .nav-cta,
.breadcrumb,
.btn-primary, .btn-p, .btn-install,
.btn-secondary, .btn-s, .btn-docs,
.risk-pill, .risk-badge,
.risk-examples li,
.exit-label,
.hero-eyebrow, .hero-terminal,
.threat-ticker-track span,
.section-label,
.problem-before,
.recipe-name, .recipe-risk, .recipe-tag,
.stat-label,
.install-block,
.footer-left, .footer-links a,
.step-nav-label, .step-nav-text,
.step-num, .step-explain h4,
.invariant-tag, .mono,
.step-viz, .flow-node-title,
.drift-table, .neg-from,
.audit-stream,
.header-stat-label,
.sidebar-group-label, .sidebar-link,
.toc-label, .toc-link,
.doc-eyebrow, .doc-h3, .doc-ul li::before,
code, :not(pre) > code, .code-label,
.nav-search input, .nav-search-kbd, .nav-version,
.search-box-top input, .search-esc, .search-empty,
.sr-title,
.callout-title,
th, td:first-child,
.step-card-title,
.pnc-dir,
.tag,
.filter-btn, .risk-toggle, .search-input,
.hero-count-label,
.trust-badge, .card-name, .card-cmd,
.input-tag, .input-name, .input-meta, .input-pattern,
.env-item,
.modal-name, .modal-section h4, .modal-footer-note,
.step-id, .step-cmd,
.recipes-page .install-block, .validator-block,
.step-nav-dot, .step-num-dot {
  font-family: 'Space Mono', monospace;
}

.nav-badge, .nav-wordmark,
.hero-title, .hero-tagline,
.section-title,
.how-number, .how-card h3,
.risk-card h3,
.stat-number,
.final-cta h2,
.exit-code,
.page-title, .header-stat-num,
.step-title,
.step-nav-dot, .step-card-num, .step-num-dot,
.sc-title,
.cta-strip h3,
.doc-h1, .doc-h2,
.pnc-title,
.hero-count,
.cat-title,
.empty-state h3,
.contribute h3 {
  font-family: 'Bebas Neue', sans-serif;
}

/* ── CONSOLIDATED COLOR VARIANTS ── */
.rp-green, .rp-g, .rb-g { background: var(--green-glow); border: 1px solid rgba(0, 255, 136, 0.25); color: var(--green); }
.rp-yellow, .rp-y, .rb-y { background: var(--amber-glow); border: 1px solid rgba(255, 140, 42, 0.25); color: var(--amber); }
.rp-red, .rp-r, .rb-r { background: var(--red-glow); border: 1px solid rgba(255, 68, 85, 0.25); color: var(--red); }

/* Badge fill variants */
.badge-green { background: rgba(0, 255, 136, 0.15); color: var(--green); }
.badge-yellow { background: rgba(255, 140, 42, 0.15); color: var(--amber); }
.badge-red { background: rgba(255, 68, 85, 0.15); color: var(--red); }

/* Flow icon variants */
.fi-teal { background: var(--teal-glow); border: 1px solid var(--teal-line); }
.fi-amber { background: var(--amber-glow); border: 1px solid rgba(255, 140, 42, 0.3); }
.fi-green { background: var(--green-glow); border: 1px solid rgba(0, 255, 136, 0.3); }
.fi-red { background: var(--red-glow); border: 1px solid rgba(255, 68, 85, 0.3); }

/* Callout variants */
.co-info { background: var(--teal-glow); border: 1px solid var(--teal-line); color: var(--muted); }
.co-info .callout-title { color: var(--teal); }
.co-warn { background: var(--amber-glow); border: 1px solid rgba(255, 140, 42, 0.25); color: var(--muted); }
.co-warn .callout-title { color: var(--amber); }
.co-danger { background: var(--red-glow); border: 1px solid rgba(255, 68, 85, 0.25); color: var(--muted); }
.co-danger .callout-title { color: var(--red); }
.co-success { background: var(--green-glow); border: 1px solid rgba(0, 255, 136, 0.2); color: var(--muted); }
.co-success .callout-title { color: var(--green); }

/* Sidebar badge variants */
.sl-new { background: var(--teal-glow); color: var(--teal); border: 1px solid var(--teal-line); }
.sl-red { background: var(--red-glow); color: var(--red); border: 1px solid rgba(255, 68, 85, 0.25); }

/* ── CONSOLIDATED CARD BASE ── */

.how-card, .recipe-card, .summary-card, .step-card, .page-nav-card {
  background: var(--abyss);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* ── CONSOLIDATED STAT/NUMBER DISPLAY ── */

.stat-number, .header-stat-num, .hero-count {
  color: var(--teal);
  line-height: 1;
}

/* ── BASE ── */

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
}

a { cursor: pointer; }

/* ── COMMON NAV ── */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(7, 12, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.nav-badge {
  width: 30px; height: 30px;
  background: var(--teal);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: var(--void);
  box-shadow: 0 0 16px rgba(0, 229, 200, 0.5);
}
.nav-badge-svg {
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(0, 229, 200, 0.4));
}

.nav-wordmark { font-size: 20px; letter-spacing: 0.08em; color: var(--white); }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }

.nav-links a {
  font-size: 12px; color: var(--muted); text-decoration: none;
  letter-spacing: 0.05em; transition: color 150ms;
}

.nav-links a:hover { color: var(--teal); }

.nav-right { display: flex; align-items: center; gap: 32px; }

.nav-right a {
  font-size: 11px; color: var(--muted); text-decoration: none;
  letter-spacing: 0.05em; transition: color 150ms;
}

.nav-right a:hover, .nav-right a.active { color: var(--teal); }

.nav-cta {
  font-size: 12px; padding: 8px 20px;
  background: transparent; border: 1px solid var(--teal); color: var(--teal);
  border-radius: 4px; cursor: pointer; text-decoration: none; transition: all 150ms;
}

.nav-cta:hover { background: var(--teal); color: var(--void); }

/* ── COMMON BREADCRUMB ── */

.breadcrumb {
  font-size: 11px; color: var(--muted); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 24px;
  display: flex; align-items: center; gap: 8px;
}

.breadcrumb a { color: var(--muted); text-decoration: none; transition: color 150ms; }
.breadcrumb a:hover { color: var(--teal); }
.bc-sep { color: var(--border-hi); }

/* ── COMMON BUTTONS ── */

.btn-primary, .btn-p, .btn-install {
  font-size: 13px; padding: 14px 32px;
  background: var(--teal); color: var(--void); border: none; border-radius: 4px;
  cursor: pointer; text-decoration: none; font-weight: 700;
  letter-spacing: 0.05em; transition: all 200ms var(--ease);
  box-shadow: 0 0 30px rgba(0, 229, 200, 0.3);
}

.btn-primary:hover, .btn-p:hover, .btn-install:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(0, 229, 200, 0.5);
}

.btn-secondary, .btn-s, .btn-docs {
  font-size: 13px; padding: 14px 32px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 4px;
  cursor: pointer; text-decoration: none; transition: all 200ms var(--ease);
}

.btn-secondary:hover, .btn-s:hover, .btn-docs:hover { color: var(--white); border-color: var(--muted); }

/* ── COMMON RISK PILLS ── */

.risk-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; padding: 4px 10px; border-radius: 20px; margin: 2px;
}

/* ── COMMON EXIT GRID ── */

.exit-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; margin: 20px 0;
}

.exit-item { background: var(--surface); padding: 18px 20px; display: flex; align-items: center; gap: 14px; }

.exit-code { font-size: 32px; line-height: 1; width: 48px; flex-shrink: 0; }

.ec-0, .ec0 { color: var(--green); }
.ec-12, .ec12 { color: var(--amber); }
.ec-13, .ec13 { color: var(--red); }
.ec-1, .ec1 { color: var(--muted); }

.exit-label { font-size: 11px; color: var(--muted); line-height: 1.5; }

/* ── CURSOR & BLINK ── */

.cursor {
  display: inline-block; width: 7px; height: 12px;
  background: var(--teal); margin-left: 1px; vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── REVEAL ANIMATION ── */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── INDEX PAGE ── */

.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px; overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(7,12,20,0.7) 0%, rgba(7,12,20,0.4) 40%, rgba(7,12,20,0.85) 80%, var(--void) 100%),
    linear-gradient(to right, rgba(7,12,20,0.5), transparent, rgba(7,12,20,0.5));
  background-color: #0d1e35;
  z-index: 1;
}

.hero-shield {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,229,200,0.08) 0%, transparent 70%);
  animation: shieldPulse 4s ease-in-out infinite;
  z-index: 1;
}

@keyframes shieldPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero-content { position: relative; z-index: 2; max-width: 900px; }

.hero-eyebrow {
  font-size: 11px; letter-spacing: 0.2em; color: var(--teal);
  text-transform: uppercase; margin-bottom: 24px;
  opacity: 0; animation: fadeUp 600ms var(--ease) 200ms forwards;
}

.hero-title {
  font-size: clamp(64px, 10vw, 128px); line-height: 0.9;
  letter-spacing: 0.02em; color: var(--white); margin-bottom: 8px;
  opacity: 0; animation: fadeUp 600ms var(--ease) 350ms forwards;
}

.hero-title-accent { color: var(--teal); display: block; text-shadow: 0 0 60px rgba(0, 229, 200, 0.4); }

.hero-tagline {
  font-size: clamp(18px, 3vw, 28px); letter-spacing: 0.15em;
  color: var(--muted); margin-bottom: 48px;
  opacity: 0; animation: fadeUp 600ms var(--ease) 500ms forwards;
}

.hero-tagline span { color: var(--amber); }

.hero-terminal {
  display: inline-block;
  background: rgba(13, 21, 32, 0.9);
  border: 1px solid var(--border); border-top: 1px solid var(--teal);
  border-radius: 8px; padding: 20px 28px;
  font-size: 13px; text-align: left; margin-bottom: 48px;
  box-shadow: 0 0 40px rgba(0, 229, 200, 0.1), 0 40px 80px rgba(0, 0, 0, 0.5);
  opacity: 0; animation: fadeUp 600ms var(--ease) 650ms forwards;
  min-width: 420px;
}

.terminal-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }

.t-red { background: #ff5f57; }
.t-yellow { background: #febc2e; }
.t-green { background: #28c840; }

.terminal-line { margin: 4px 0; white-space: nowrap; }

.t-dim { color: var(--muted); }
.t-amber { color: var(--amber); }
.t-teal { color: var(--teal); }
.t-green-text { color: var(--green); }
.t-red-text { color: var(--red); }
.t-strike { text-decoration: line-through; opacity: 0.4; }

.hero-cta-group {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 600ms var(--ease) 800ms forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── INDEX: Threat Ticker ── */

.threat-ticker {
  width: 100%; overflow: hidden; padding: 14px 0;
  background: rgba(255, 140, 42, 0.05);
  border-top: 1px solid rgba(255, 140, 42, 0.2);
  border-bottom: 1px solid rgba(255, 140, 42, 0.2);
  position: relative; z-index: 10;
}

.threat-ticker-track {
  display: flex; gap: 0;
  animation: tickerScroll 30s linear infinite;
  white-space: nowrap;
}

.threat-ticker-track span { font-size: 12px; color: var(--amber); padding: 0 40px; opacity: 0.7; }
.threat-ticker-track span::before { content: '\26A0 '; }

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── INDEX: Section Common ── */

section { position: relative; z-index: 2; padding: 100px 48px; max-width: 1200px; margin: 0 auto; }

.section-label {
  font-size: 11px; letter-spacing: 0.2em; color: var(--teal);
  text-transform: uppercase; margin-bottom: 16px;
}

.section-title { font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: 0.02em; margin-bottom: 20px; }

.section-body { font-size: 17px; color: var(--muted); max-width: 560px; line-height: 1.7; }

/* ── INDEX: Problem ── */

.problem { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

.problem-before {
  background: rgba(255, 68, 85, 0.05);
  border: 1px solid rgba(255, 68, 85, 0.2);
  border-radius: 12px; padding: 28px; font-size: 12px;
}

.problem-label {
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

.label-dot { width: 8px; height: 8px; border-radius: 50%; }
.before-label .label-dot { background: var(--red); }
.after-label .label-dot { background: var(--green); }

.problem-code-line {
  margin: 6px 0; padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}

.code-cmd { color: var(--amber); }
.code-status-bad { color: var(--red); font-size: 10px; }
.code-status-good { color: var(--green); font-size: 10px; }

/* ── INDEX: How Grid ── */

.how-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-top: 60px;
}

.how-card { padding: 40px 32px; position: relative; transition: background 300ms; border-radius: 0; border: none; }
.how-card:hover { background: var(--surface); }

.how-number {
  font-size: 72px; line-height: 1;
  color: rgba(0, 229, 200, 0.08);
  position: absolute; top: 16px; right: 24px;
}

.how-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--teal-glow); border: 1px solid rgba(0, 229, 200, 0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 20px;
}

.how-card h3 { font-size: 24px; letter-spacing: 0.05em; margin-bottom: 12px; color: var(--white); }
.how-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ── INDEX: Risk Cards ── */

.risk-section {
  background: var(--abyss);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 100px 48px;
}

.risk-inner { max-width: 1200px; margin: 0 auto; }

.risk-table { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 60px; }

.risk-card { border-radius: 12px; padding: 32px; position: relative; overflow: hidden; }

.risk-card-green { background: rgba(0, 255, 136, 0.04); border: 1px solid rgba(0, 255, 136, 0.2); }
.risk-card-yellow { background: rgba(255, 140, 42, 0.04); border: 1px solid rgba(255, 140, 42, 0.2); }
.risk-card-red { background: rgba(255, 68, 85, 0.04); border: 1px solid rgba(255, 68, 85, 0.2); }

.risk-badge {
  display: inline-block; font-size: 10px; letter-spacing: 0.15em;
  padding: 4px 12px; border-radius: 20px;
  text-transform: uppercase; margin-bottom: 20px;
}

.risk-card h3 { font-size: 28px; letter-spacing: 0.05em; margin-bottom: 12px; }

.risk-examples { list-style: none; margin-top: 16px; }
.risk-examples li {
  font-size: 11px; color: var(--muted);
  padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── INDEX: Recipe Grid ── */

.recipe-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 60px; }

.recipe-card {
  padding: 28px;
  transition: border-color 300ms, transform 300ms var(--ease);
  cursor: pointer;
}

.recipe-card:hover { border-color: var(--teal); transform: translateY(-4px); }

.recipe-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.recipe-name { font-size: 13px; color: var(--teal); }
.recipe-risk { font-size: 10px; padding: 3px 10px; border-radius: 20px; }
.recipe-desc { font-size: 14px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.recipe-inputs { display: flex; flex-wrap: wrap; gap: 6px; }
.recipe-tag { font-size: 10px; padding: 3px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); }

/* ── INDEX: Stats Bar ── */

.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

.stat-item { background: var(--void); padding: 48px 32px; text-align: center; }

.stat-number { font-size: 56px; text-shadow: 0 0 40px rgba(0, 229, 200, 0.3); }

.stat-label {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 8px;
}

/* ── INDEX: Final CTA ── */

.final-cta { text-align: center; padding: 120px 48px; position: relative; }

.final-cta::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(0, 229, 200, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.final-cta h2 { font-size: clamp(48px, 7vw, 96px); letter-spacing: 0.02em; line-height: 0.95; margin-bottom: 24px; }
.final-cta p { font-size: 17px; color: var(--muted); max-width: 480px; margin: 0 auto 40px; }

/* ── INDEX: Install Block ── */

.install-block {
  display: inline-flex; align-items: center; gap: 16px;
  background: var(--abyss); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px 24px; font-size: 14px; margin-bottom: 32px;
}

.install-prompt { color: var(--teal); }
.install-cmd { color: var(--white); }

.install-copy {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 16px; padding: 0; transition: color 150ms;
}

.install-copy:hover { color: var(--teal); }

/* ── INDEX: Footer ── */

footer {
  border-top: 1px solid var(--border); padding: 40px 48px;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto;
}

.footer-left { font-size: 12px; color: var(--muted); }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 12px; color: var(--muted); text-decoration: none; transition: color 150ms; }
.footer-links a:hover { color: var(--teal); }

/* ── HOW PAGE ── */

.page-header {
  padding: 140px 48px 80px; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end;
}

.page-title {
  font-size: clamp(56px, 7vw, 96px); line-height: 0.92;
  letter-spacing: 0.02em; margin-bottom: 28px;
}

.page-title-accent { color: var(--teal); }

.page-subtitle { font-size: 17px; color: var(--muted); line-height: 1.7; max-width: 460px; }

.header-stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}

.header-stat { background: var(--abyss); padding: 24px; }

.header-stat-num { font-size: 40px; text-shadow: 0 0 30px rgba(0, 229, 200, 0.3); }

.header-stat-label {
  font-size: 10px; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 6px;
}

/* ── HOW: Page Layout ── */

.page-layout {
  display: grid; grid-template-columns: 220px 1fr;
  max-width: 1200px; margin: 0 auto;
  padding: 0 48px 120px; align-items: start;
}

.step-sidebar { position: sticky; top: 80px; padding-right: 32px; padding-top: 12px; }

.step-nav-label {
  font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 20px;
}

.step-nav-list { list-style: none; position: relative; }

.step-nav-list::before {
  content: ''; position: absolute;
  left: 14px; top: 24px; bottom: 24px;
  width: 1px; background: var(--border);
}

.step-nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; }

.step-nav-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--abyss); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted); flex-shrink: 0; z-index: 1;
  transition: all 300ms var(--ease);
}

.step-nav-item.active .step-nav-dot {
  background: var(--teal); border-color: var(--teal); color: var(--void);
  box-shadow: 0 0 16px rgba(0, 229, 200, 0.4);
}

.step-nav-item.done .step-nav-dot {
  background: rgba(0, 229, 200, 0.1); border-color: var(--teal-dim); color: var(--teal);
}

.step-nav-text { font-size: 11px; color: var(--muted); transition: color 150ms; }
.step-nav-item.active .step-nav-text { color: var(--white); }
.step-nav-item.done .step-nav-text { color: var(--teal-dim); }

/* ── HOW: Step Blocks ── */

.steps-content { display: flex; flex-direction: column; gap: 2px; }

.step-illustration { margin: 32px 0; text-align: center; }
.step-illustration img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); }

.step-block {
  background: var(--abyss); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; transition: border-color 400ms;
}

.step-block.active { border-color: var(--teal-line); }

.step-header {
  padding: 32px 40px;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 24px; cursor: pointer; user-select: none;
}

.step-num {
  font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px;
}

.step-block.active .step-num {
  background: var(--teal-glow); border-color: var(--teal-line); color: var(--teal);
}

.step-title { font-size: 28px; letter-spacing: 0.04em; line-height: 1; color: var(--white); }
.step-tagline { font-size: 14px; color: var(--muted); margin-top: 4px; }

.step-chevron { color: var(--border-hi); font-size: 18px; transition: transform 300ms var(--ease), color 300ms; }
.step-block.active .step-chevron { transform: rotate(180deg); color: var(--teal); }

.step-body { max-height: 0; overflow: hidden; transition: max-height 700ms var(--ease); }
.step-block.active .step-body { max-height: 1400px; }

.step-inner {
  padding: 32px 40px 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  border-top: 1px solid var(--border);
}

/* ── HOW: Step Explain ── */

.step-explain h4 {
  font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 12px;
}

.step-explain p { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.step-explain p strong { color: var(--white); }

.invariant-tag {
  display: inline-block; font-size: 10px; padding: 3px 10px;
  background: var(--teal-glow); border: 1px solid var(--teal-line);
  border-radius: 4px; color: var(--teal);
  margin-top: 4px; margin-right: 6px;
}

.mono { color: var(--teal); font-size: 12px; }

/* ── HOW: Step Viz ── */

.step-viz {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; font-size: 12px;
}

.viz-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
}

.viz-dot { width: 8px; height: 8px; border-radius: 50%; }
.vd-r { background: #ff5f57; }
.vd-y { background: #febc2e; }
.vd-g { background: #28c840; }

.viz-title { font-size: 10px; color: var(--muted); margin-left: 4px; letter-spacing: 0.08em; }

.viz-body { padding: 20px; }
.vl { margin: 5px 0; line-height: 1.5; }

.vc-dim { color: var(--muted); }
.vc-teal { color: var(--teal); }
.vc-amber { color: var(--amber); }
.vc-green { color: var(--green); }
.vc-red { color: var(--red); }
.vc-white { color: var(--white); }
.vc-strike { text-decoration: line-through; opacity: 0.4; color: var(--red); }

.viz-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── HOW: Flow Diagram ── */

.flow-diagram { display: flex; flex-direction: column; gap: 0; }

.flow-node { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; position: relative; }

.flow-node:not(:last-child)::after {
  content: ''; position: absolute;
  left: 15px; top: 44px; bottom: -14px;
  width: 1px; background: var(--border);
}

.flow-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; z-index: 1;
}

.flow-node-title { font-size: 12px; color: var(--white); margin-bottom: 2px; }
.flow-node-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ── HOW: Drift Table ── */

.drift-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.drift-table th { text-align: left; padding: 8px 12px; color: var(--muted); letter-spacing: 0.08em; border-bottom: 1px solid var(--border); }
.drift-table td { padding: 10px 12px; border-bottom: 1px solid rgba(26, 45, 69, 0.5); vertical-align: middle; }
.drift-table tr:last-child td { border-bottom: none; }

.dt-field { color: var(--white); }
.dt-block { color: var(--red); }
.dt-allow { color: var(--green); }
.dt-escalate { color: var(--amber); }

/* ── HOW: Negotiation Loop ── */

.neg-loop { display: flex; flex-direction: column; gap: 12px; }

.neg-item { display: flex; gap: 12px; align-items: flex-start; }

.neg-from {
  font-size: 10px; padding: 3px 8px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}

.nf-agent { background: rgba(107, 129, 153, 0.2); color: var(--muted); }
.nf-guardrail { background: var(--teal-glow); color: var(--teal); border: 1px solid var(--teal-line); }
.nf-human { background: var(--amber-glow); color: var(--amber); }

.neg-text { font-size: 13px; color: var(--muted); line-height: 1.5; }
.neg-text strong { color: var(--white); }

.neg-connector { width: 1px; height: 10px; background: var(--border); margin-left: 22px; }

/* ── HOW: Audit Stream ── */

.audit-stream {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 20px; font-size: 11px;
}

.audit-entry {
  display: flex; gap: 10px; padding: 6px 0;
  border-bottom: 1px solid rgba(26, 45, 69, 0.5); line-height: 1.4;
}

.audit-entry:last-child { border-bottom: none; }

.ae-time { color: var(--border-hi); flex-shrink: 0; }
.ae-event { color: var(--white); flex: 1; }
.ae-status { flex-shrink: 0; }

.full-divider { border: none; border-top: 1px solid var(--border); }

/* ── HOW: Summary ── */

.summary-section { max-width: 1200px; margin: 0 auto; padding: 80px 48px 120px; }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }

.summary-card {
  padding: 28px;
  transition: border-color 300ms, transform 300ms var(--ease);
}

.summary-card:hover { border-color: var(--teal-line); transform: translateY(-4px); }

.sc-icon { font-size: 24px; margin-bottom: 16px; }
.sc-title { font-size: 22px; letter-spacing: 0.05em; margin-bottom: 8px; }
.sc-desc { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ── HOW: CTA Strip ── */

.cta-strip {
  background: var(--abyss); border-top: 1px solid var(--border);
  padding: 64px 48px; text-align: center;
}

.cta-strip h3 { font-size: 48px; letter-spacing: 0.04em; margin-bottom: 16px; }
.cta-strip p { color: var(--muted); margin-bottom: 32px; font-size: 16px; }
.cta-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ── DOCS PAGE ── */

nav.docs-nav { z-index: 200; height: var(--nav-h); padding: 0 24px 0 0; }

.nav-left {
  display: flex; align-items: center;
  width: var(--sidebar); border-right: 1px solid var(--border);
  padding: 0 24px; height: 100%;
}

.nav-center { flex: 1; display: flex; align-items: center; padding: 0 24px; }

.nav-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 14px; width: 320px;
  transition: border-color 200ms;
}

.nav-search:focus-within { border-color: var(--teal-line); }
.nav-search-icon { color: var(--muted); font-size: 14px; }

.nav-search input {
  background: none; border: none; outline: none;
  font-size: 12px; color: var(--white); flex: 1;
}

.nav-search input::placeholder { color: var(--muted); }

.nav-search-kbd { font-size: 10px; color: var(--muted); background: var(--border); padding: 2px 6px; border-radius: 4px; }

.nav-version {
  font-size: 10px; padding: 3px 10px;
  background: var(--teal-glow); border: 1px solid var(--teal-line);
  border-radius: 20px; color: var(--teal);
}

/* ── DOCS: Layout ── */

.doc-layout {
  display: grid; grid-template-columns: var(--sidebar) 1fr 200px;
  min-height: 100vh; padding-top: var(--nav-h);
}

/* ── DOCS: Left Sidebar ── */

.doc-sidebar {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto; border-right: 1px solid var(--border);
  padding: 32px 0;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}

.doc-sidebar::-webkit-scrollbar { width: 4px; }
.doc-sidebar::-webkit-scrollbar-track { background: transparent; }
.doc-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-group { margin-bottom: 32px; }

.sidebar-group-label {
  font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
  padding: 0 24px; margin-bottom: 8px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 24px; font-size: 11px; color: var(--muted);
  text-decoration: none; transition: all 150ms;
  border-left: 2px solid transparent; cursor: pointer;
}

.sidebar-link:hover { color: var(--white); background: rgba(255, 255, 255, 0.02); }

.sidebar-link.active {
  color: var(--teal); border-left-color: var(--teal);
  background: var(--teal-glow);
}

.sidebar-link .sl-badge {
  font-size: 9px; padding: 1px 6px;
  border-radius: 10px; margin-left: auto;
}

/* ── DOCS: Main Content ── */

.doc-content { padding: 48px 64px; max-width: 860px; min-width: 0; }

/* ── DOCS: Right TOC ── */

.doc-toc {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto; padding: 32px 24px;
  border-left: 1px solid var(--border);
}

.toc-label {
  font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}

.toc-link {
  display: block; font-size: 11px; color: var(--muted);
  text-decoration: none; padding: 4px 0; transition: color 150ms;
  border-left: 1px solid transparent; padding-left: 8px;
}

.toc-link:hover { color: var(--white); }
.toc-link.active { color: var(--teal); border-left-color: var(--teal); }
.toc-link.l2 { padding-left: 20px; font-size: 10px; }

/* ── DOCS: Sections ── */

.doc-section { display: none; }
.doc-section.active { display: block; }

/* ── DOCS: Typography ── */

.doc-eyebrow {
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 12px;
}

.doc-h1 { font-size: clamp(48px, 5vw, 72px); line-height: 0.95; letter-spacing: 0.02em; margin-bottom: 20px; }

.doc-lead { font-size: 17px; color: var(--muted); line-height: 1.7; margin-bottom: 40px; max-width: 600px; }

.doc-h2 {
  font-size: 36px; letter-spacing: 0.03em;
  margin: 56px 0 16px; padding-top: 56px;
  border-top: 1px solid var(--border);
}

.doc-h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

.doc-h3 { font-size: 13px; font-weight: 700; color: var(--white); margin: 32px 0 12px; letter-spacing: 0.05em; }

.doc-p { font-size: 15px; color: var(--muted); line-height: 1.75; margin-bottom: 16px; }
.doc-p strong { color: var(--white); }

.doc-p a {
  color: var(--teal); text-decoration: none;
  border-bottom: 1px solid var(--teal-line); transition: border-color 150ms;
}

.doc-p a:hover { border-bottom-color: var(--teal); }

.doc-ul { list-style: none; margin: 16px 0 20px; display: flex; flex-direction: column; gap: 8px; }

.doc-ul li { display: flex; gap: 10px; font-size: 15px; color: var(--muted); line-height: 1.6; }

.doc-ul li::before { content: '\2192'; color: var(--teal); flex-shrink: 0; font-size: 12px; margin-top: 2px; }

.doc-ul li strong { color: var(--white); }

/* ── DOCS: Code Blocks ── */

pre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 24px;
  overflow-x: auto; margin: 20px 0; position: relative;
}

pre.has-label { padding-top: 36px; }

.code-label {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 6px 16px; background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border); border-radius: 10px 10px 0 0;
  font-size: 10px; color: var(--muted); letter-spacing: 0.08em;
  display: flex; align-items: center; justify-content: space-between;
}

.code-copy {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 13px; transition: color 150ms; padding: 0;
}

.code-copy:hover { color: var(--teal); }

code { font-size: 12.5px; line-height: 1.65; }
pre code { color: var(--white); }

.c-dim { color: var(--muted); }
.c-teal { color: var(--teal); }
.c-amber { color: var(--amber); }
.c-green { color: var(--green); }
.c-red { color: var(--red); }
.c-white { color: var(--white); }
.c-str { color: #a8d8a8; }
.c-key { color: #79c0ff; }
.c-num { color: var(--amber); }
.c-comment { color: var(--muted); font-style: italic; }

:not(pre) > code {
  font-size: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 7px; color: var(--teal);
}

/* ── DOCS: Callouts ── */

.callout { border-radius: 8px; padding: 16px 20px; margin: 20px 0; display: flex; gap: 14px; align-items: flex-start; }
.callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.callout-body { font-size: 14px; line-height: 1.6; }
.callout-body strong { color: var(--white); }
.callout-title { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }

/* ── DOCS: Tables ── */

.doc-table-wrap { overflow-x: auto; margin: 20px 0; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 10px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}

td { padding: 12px 16px; border-bottom: 1px solid rgba(26, 45, 69, 0.5); color: var(--muted); vertical-align: top; line-height: 1.5; }
td:first-child { font-size: 12px; color: var(--white); }

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.01); }

/* ── DOCS: Step Cards ── */

.step-cards { display: flex; flex-direction: column; gap: 1px; margin: 20px 0; }

.step-card {
  padding: 20px 24px; border-radius: 10px;
  display: grid; grid-template-columns: 36px 1fr; gap: 16px; align-items: flex-start;
}

.step-card-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--teal-glow); border: 1px solid var(--teal-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--teal); flex-shrink: 0;
}

.step-card-title { font-size: 12px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.step-card-desc { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ── DOCS: Page Nav ── */

.page-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border);
}

.page-nav-card {
  padding: 20px 24px; border-radius: 10px; text-decoration: none;
  transition: border-color 300ms, transform 200ms var(--ease);
  display: flex; flex-direction: column; gap: 4px;
}

.page-nav-card:hover { border-color: var(--teal-line); transform: translateY(-2px); }

.pnc-dir { font-size: 10px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.pnc-title { font-size: 22px; letter-spacing: 0.04em; color: var(--white); }
.page-nav-card.next { text-align: right; }
.pnc-arrow { color: var(--teal); }

/* ── DOCS: Search Overlay ── */

.search-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 12, 20, 0.92); backdrop-filter: blur(12px);
  z-index: 500; display: none; padding: 80px 24px 24px; justify-content: center;
}

.search-overlay.open { display: flex; }

.search-box {
  background: var(--abyss); border: 1px solid var(--teal-line);
  border-radius: 14px; width: 100%; max-width: 640px;
  overflow: hidden; max-height: 70vh;
  display: flex; flex-direction: column;
}

.search-box-top {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}

.search-box-top input {
  background: none; border: none; outline: none;
  font-size: 14px; color: var(--white); flex: 1;
}

.search-box-top input::placeholder { color: var(--muted); }

.search-esc {
  font-size: 10px; color: var(--muted); background: var(--border);
  padding: 3px 8px; border-radius: 4px; cursor: pointer;
}

.search-results { overflow-y: auto; padding: 8px; }

.search-result {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: 8px;
  cursor: pointer; transition: background 150ms; text-decoration: none;
}

.search-result:hover, .search-result.focused { background: var(--surface); }

.sr-icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--teal-glow); border: 1px solid var(--teal-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}

.sr-title { font-size: 12px; color: var(--white); margin-bottom: 2px; }
.sr-section { font-size: 12px; color: var(--muted); }
.search-empty { padding: 32px; text-align: center; font-size: 12px; color: var(--muted); }

/* ── DOCS: Misc ── */

.divider { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }

.tag {
  font-size: 10px; padding: 3px 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; color: var(--muted);
}

/* ── RECIPES PAGE ── */

.page-hero { padding: 130px 48px 0; max-width: 1200px; margin: 0 auto; }

.hero-grid {
  display: grid; grid-template-columns: 1fr auto; gap: 60px;
  align-items: end; padding-bottom: 60px;
}

.page-title em { color: var(--teal); font-style: normal; }
.page-sub { font-size: 17px; color: var(--muted); max-width: 500px; line-height: 1.7; }

.hero-meta { text-align: right; flex-shrink: 0; }
.hero-count { font-size: 80px; text-shadow: 0 0 60px rgba(0, 229, 200, 0.25); }
.hero-count-label { font-size: 11px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

/* ── RECIPES: Filter Bar ── */

.filter-wrap {
  position: sticky; top: 57px; z-index: 90;
  background: rgba(7, 12, 20, 0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.filter-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 48px;
  display: flex; align-items: center; gap: 0; overflow-x: auto;
}

.filter-cats { display: flex; align-items: center; gap: 0; flex: 1; }

.filter-btn {
  font-size: 11px; letter-spacing: 0.06em;
  padding: 18px 20px; background: none; border: none;
  border-bottom: 2px solid transparent; color: var(--muted);
  cursor: pointer; white-space: nowrap; transition: all 200ms;
  display: flex; align-items: center; gap: 8px;
}

.filter-btn:hover { color: var(--white); }
.filter-btn.active { color: var(--teal); border-bottom-color: var(--teal); }

.filter-count { font-size: 10px; padding: 2px 6px; border-radius: 10px; background: var(--surface); }
.filter-btn.active .filter-count { background: var(--teal-glow); color: var(--teal); }

.filter-risk {
  display: flex; align-items: center; gap: 8px;
  padding-left: 24px; border-left: 1px solid var(--border); margin-left: 8px;
}

.risk-toggle {
  font-size: 10px; padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--border); background: none;
  cursor: pointer; transition: all 200ms; letter-spacing: 0.05em;
}

.risk-toggle.g { color: var(--green); }
.risk-toggle.g.active { background: var(--green-glow); border-color: rgba(0, 255, 136, 0.3); }
.risk-toggle.y { color: var(--amber); }
.risk-toggle.y.active { background: var(--amber-glow); border-color: rgba(255, 140, 42, 0.3); }
.risk-toggle.r { color: var(--red); }
.risk-toggle.r.active { background: var(--red-glow); border-color: rgba(255, 68, 85, 0.3); }

.filter-search {
  display: flex; align-items: center; gap: 10px;
  padding-left: 24px; border-left: 1px solid var(--border); margin-left: 8px;
}

.search-input {
  font-size: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 14px; color: var(--white); outline: none;
  width: 180px; transition: border-color 200ms;
}

.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--teal-line); }

/* ── RECIPES: Main Layout ── */

.main {
  max-width: 1200px; margin: 0 auto; padding: 48px 48px 120px;
  display: grid; grid-template-columns: 1fr; gap: 48px;
}

/* ── RECIPES: Category Sections ── */

.cat-section { display: none; }
.cat-section.visible { display: block; }

.cat-header {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.cat-icon { font-size: 22px; }
.cat-title { font-size: 32px; letter-spacing: 0.04em; }
.cat-desc { font-size: 14px; color: var(--muted); margin-left: auto; }

/* ── RECIPES: Recipe Card overrides ── */

.recipes-page .recipe-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.recipes-page .recipe-card { overflow: hidden; display: flex; flex-direction: column; }
.recipe-card.hidden { display: none; }

.card-top { padding: 22px 22px 0; }

.card-risk-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.trust-badge { font-size: 9px; color: var(--muted); letter-spacing: 0.06em; }

.card-name { font-size: 13px; color: var(--teal); margin-bottom: 8px; font-weight: 700; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }

.card-inputs { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 22px 14px; }

.input-tag {
  font-size: 10px; padding: 3px 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; color: var(--muted);
}

.card-footer {
  margin-top: auto; padding: 12px 22px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0, 0, 0, 0.15);
}

.card-cmd { font-size: 10px; color: var(--muted); }

.card-arrow { font-size: 14px; color: var(--border-hi); transition: color 200ms, transform 200ms; }
.recipe-card:hover .card-arrow { color: var(--teal); transform: translateX(3px); }

/* ── RECIPES: Empty State ── */

.empty-state { text-align: center; padding: 80px 24px; display: none; }
.empty-state.visible { display: block; }
.empty-state h3 { font-size: 36px; color: var(--muted); margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--border-hi); }

/* ── RECIPES: Modal ── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 12, 20, 0.88); backdrop-filter: blur(8px);
  z-index: 500; display: none;
  align-items: center; justify-content: center; padding: 24px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--abyss); border: 1px solid var(--border-hi);
  border-radius: 16px; width: 100%; max-width: 780px;
  max-height: 90vh; overflow-y: auto; position: relative;
  animation: modalIn 300ms var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.modal-header {
  padding: 28px 32px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; position: sticky; top: 0; background: var(--abyss); z-index: 1;
}

.modal-title-group {}

.modal-name { font-size: 16px; color: var(--teal); font-weight: 700; margin-bottom: 4px; }
.modal-desc { font-size: 14px; color: var(--muted); }
.modal-badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.modal-close {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--muted); font-size: 18px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all 150ms;
}

.modal-close:hover { color: var(--white); border-color: var(--muted); }

.modal-body {
  padding: 28px 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}

.modal-section { margin-bottom: 20px; }

.modal-section h4 {
  font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}

.modal-section p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.modal-section p strong { color: var(--white); }

.input-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

.input-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.input-name { font-size: 12px; color: var(--white); margin-bottom: 3px; }
.input-meta { font-size: 10px; color: var(--muted); }
.input-pattern { font-size: 10px; color: var(--teal); margin-top: 4px; word-break: break-all; }

.env-row { display: flex; flex-direction: column; gap: 6px; }

.env-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.env-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }
.env-name { color: var(--amber); }
.env-note { color: var(--muted); font-size: 10px; }

/* ── RECIPES: Step List (modal) ── */

.step-list { display: flex; flex-direction: column; gap: 0; }

.step-item { display: flex; gap: 14px; padding: 12px 0; position: relative; }

.step-item:not(:last-child)::after {
  content: ''; position: absolute;
  left: 11px; top: 32px; bottom: -12px;
  width: 1px; background: var(--border);
}

.step-num-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); flex-shrink: 0; z-index: 1;
}

.step-info {}
.step-id { font-size: 12px; color: var(--white); margin-bottom: 2px; }
.step-cmd { font-size: 11px; color: var(--teal); }
.step-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.idempotent-no { color: var(--amber); font-size: 10px; }
.idempotent-yes { color: var(--green); font-size: 10px; }

/* ── RECIPES: Install Block (modal variant) ── */

.recipes-page .install-block {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 1px solid var(--teal-line); border-radius: 8px;
  padding: 14px 16px; font-size: 12px;
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}

.ib-prompt { color: var(--teal); }
.ib-cmd { color: var(--white); flex: 1; }

.ib-copy {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 14px; padding: 0; transition: color 150ms;
}

.ib-copy:hover { color: var(--teal); }

.validator-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
  font-size: 11px; color: var(--teal); word-break: break-all;
}

.modal-footer {
  padding: 20px 32px; border-top: 1px solid var(--border);
  display: flex; gap: 12px; align-items: center;
  background: var(--abyss); position: sticky; bottom: 0;
}

.modal-footer-note { font-size: 10px; color: var(--muted); margin-left: auto; }

/* ── RECIPES: Contribute Banner ── */

.contribute { max-width: 1200px; margin: 0 auto 80px; padding: 0 48px; }

.contribute-inner {
  background: var(--abyss); border: 1px solid var(--border);
  border-radius: 14px; padding: 40px 48px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px;
}

.contribute h3 { font-size: 36px; letter-spacing: 0.03em; margin-bottom: 8px; }
.contribute p { font-size: 15px; color: var(--muted); max-width: 520px; line-height: 1.6; }

.contribute-actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════════
   SECURITY PAGE
   ══════════════════════════════════════════════════════════════════ */

/* Layout override — security hero is inside page-layout */
body[data-page="security"] .page-layout { padding-top: 120px; }
body[data-page="security"] .sec-section { padding: 0; max-width: none; }

/* Sidebar */
.sec-sidebar {
  position: sticky; top: 80px;
  padding-right: 40px; padding-top: 24px;
}

.sidebar-label {
  font-family: 'Space Mono', monospace; font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px; display: block;
}

.sidebar-links { list-style: none; position: relative; }

.sidebar-links::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 1px; background: var(--border);
}

.sidebar-link {
  display: block; font-family: 'Space Mono', monospace; font-size: 11px;
  color: var(--muted); padding: 8px 0 8px 16px; cursor: pointer;
  border-left: 2px solid transparent; margin-left: -1px;
  transition: all 150ms; text-decoration: none;
}

.sidebar-link:hover { color: var(--white); }
.sidebar-link.active { color: var(--teal); border-left-color: var(--teal); }
.sidebar-group-gap { height: 20px; }

/* Content area */
.sec-content { min-width: 0; }

/* Hero */
.sec-hero { margin-bottom: 80px; }

.sec-eyebrow {
  font-family: 'Space Mono', monospace; font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 12px;
}

.sec-h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 7vw, 88px);
  line-height: 0.92; letter-spacing: 0.02em; margin-bottom: 20px;
}

.sec-h1 em { color: var(--teal); font-style: normal; }

.sec-lead {
  font-size: 17px; color: var(--muted); line-height: 1.7;
  max-width: 580px; margin-bottom: 40px;
}

/* Stat row */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 80px;
}

.stat-row .stat-item { background: var(--abyss); padding: 24px 20px; }

.stat-num {
  font-family: 'Bebas Neue', sans-serif; font-size: 44px;
  color: var(--teal); line-height: 1;
  text-shadow: 0 0 30px rgba(0, 229, 200, 0.25);
}

.stat-row .stat-label {
  font-family: 'Space Mono', monospace; font-size: 10px;
  color: var(--muted); letter-spacing: 0.1em;
  text-transform: uppercase; margin-top: 6px; line-height: 1.4;
}

/* Section blocks */
.sec-section { margin-bottom: 80px; scroll-margin-top: 88px; }

.sec-h2 {
  font-family: 'Bebas Neue', sans-serif; font-size: 40px;
  letter-spacing: 0.03em; margin-bottom: 8px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}

.sec-intro {
  font-size: 15px; color: var(--muted); line-height: 1.7;
  margin-bottom: 28px; max-width: 640px;
}

.sec-intro strong { color: var(--white); }

/* Cards */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.sec-card {
  background: var(--abyss); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px;
}

.sec-card-icon { font-size: 20px; margin-bottom: 14px; }

.sec-card-title {
  font-family: 'Space Mono', monospace; font-size: 12px;
  font-weight: 700; color: var(--white);
  margin-bottom: 8px; letter-spacing: 0.05em;
}

.sec-card-body { font-size: 14px; color: var(--muted); line-height: 1.6; }
.sec-card-body strong { color: var(--white); }

.sec-card.highlight {
  border-color: var(--teal-line);
  background: linear-gradient(135deg, var(--abyss), rgba(0, 229, 200, 0.03));
}

/* Invariant accordion */
.invariant-list { display: flex; flex-direction: column; gap: 2px; }

.inv-item {
  background: var(--abyss); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; transition: border-color 300ms;
}

.inv-item:hover { border-color: var(--border-hi); }

.inv-header {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 16px; padding: 18px 24px; cursor: pointer;
}

.inv-num {
  font-family: 'Space Mono', monospace; font-size: 10px;
  color: var(--teal); background: var(--teal-glow);
  border: 1px solid var(--teal-line); border-radius: 4px;
  padding: 3px 8px; letter-spacing: 0.08em; white-space: nowrap;
}

.inv-title {
  font-family: 'Space Mono', monospace; font-size: 12px;
  font-weight: 700; color: var(--white);
}

.inv-chevron {
  color: var(--border-hi);
  transition: transform 300ms var(--ease), color 300ms;
  font-size: 14px;
}

.inv-item.open .inv-chevron { transform: rotate(180deg); color: var(--teal); }

.inv-body {
  max-height: 0; overflow: hidden;
  transition: max-height 500ms var(--ease);
}

.inv-item.open .inv-body { max-height: 300px; }

.inv-body-inner {
  padding: 0 24px 20px; font-size: 14px;
  color: var(--muted); line-height: 1.7;
  border-top: 1px solid var(--border);
}

.inv-body-inner strong { color: var(--white); }

.inv-body-inner code {
  font-family: 'Space Mono', monospace; font-size: 11px;
  color: var(--teal); background: var(--surface);
  border: 1px solid var(--border); border-radius: 3px;
  padding: 1px 6px;
}

/* Data table */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; margin-bottom: 4px;
}

.data-table th {
  font-family: 'Space Mono', monospace; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 10px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(26, 45, 69, 0.5);
  color: var(--muted); vertical-align: top; line-height: 1.5;
}

.data-table td:first-child {
  font-family: 'Space Mono', monospace; font-size: 12px;
  color: var(--white);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table-wrap {
  background: var(--abyss); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-top: 20px;
}

/* Status badges */
.badge {
  font-family: 'Space Mono', monospace; font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}

.badge-yes {
  background: var(--green-glow);
  border: 1px solid rgba(0, 255, 136, 0.2);
  color: var(--green);
}

.badge-partial {
  background: var(--amber-glow);
  border: 1px solid rgba(255, 140, 42, 0.2);
  color: var(--amber);
}

.badge-planned {
  background: var(--teal-glow);
  border: 1px solid var(--teal-line);
  color: var(--teal);
}

.badge-no {
  background: rgba(107, 129, 153, 0.15);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* Callout */
.callout {
  border-radius: 8px; padding: 16px 20px; margin: 20px 0;
  display: flex; gap: 14px; align-items: flex-start;
}

.callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }

.callout-body { font-size: 14px; color: var(--muted); line-height: 1.6; }
.callout-body strong { color: var(--white); }

.callout-title {
  font-family: 'Space Mono', monospace; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px;
}

.co-info { background: var(--teal-glow); border: 1px solid var(--teal-line); }
.co-info .callout-title { color: var(--teal); }
.co-warn { background: var(--amber-glow); border: 1px solid rgba(255, 140, 42, 0.25); }
.co-warn .callout-title { color: var(--amber); }

/* Trust tiers */
.tier-grid { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; }

.tier-item {
  display: grid; grid-template-columns: 180px 1fr 120px;
  gap: 24px; align-items: center;
  background: var(--abyss); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px 24px;
  transition: border-color 200ms;
}

.tier-item:hover { border-color: var(--border-hi); }

.tier-name {
  font-family: 'Space Mono', monospace; font-size: 12px;
  color: var(--white); font-weight: 700;
}

.tier-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.tier-status { text-align: right; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.check-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; background: var(--abyss);
  border: 1px solid var(--border); border-radius: 8px;
}

.check-icon {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; margin-top: 1px;
}

.ci-yes { background: var(--green-glow); border: 1px solid rgba(0, 255, 136, 0.25); color: var(--green); }
.ci-partial { background: var(--amber-glow); border: 1px solid rgba(255, 140, 42, 0.25); color: var(--amber); }
.ci-plan { background: var(--teal-glow); border: 1px solid var(--teal-line); color: var(--teal); }
.ci-no { background: rgba(107, 129, 153, 0.1); border: 1px solid var(--border); color: var(--muted); }

.check-title {
  font-family: 'Space Mono', monospace; font-size: 12px;
  color: var(--white); margin-bottom: 2px;
}

.check-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* More-info link (cross-page navigation within sections) */
.more-info {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Space Mono', monospace; font-size: 11px;
  color: var(--teal); text-decoration: none;
  letter-spacing: 0.05em; margin-top: 16px;
  transition: color 150ms;
}

.more-info:hover { color: var(--white); }
.more-info::after { content: ' →'; }

@media (max-width: 900px) {
  body[data-page="security"] nav {
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 10px;
  }

  body[data-page="security"] .nav-right {
    width: 100%;
    gap: 14px;
    justify-content: space-between;
  }

  body[data-page="security"] .nav-right a,
  body[data-page="security"] .nav-version {
    font-size: 9px;
    white-space: nowrap;
  }

  body[data-page="security"] .page-layout {
    grid-template-columns: 1fr;
    padding: 142px 24px 80px;
    width: 100%;
    max-width: 100%;
  }

  body[data-page="security"] .sec-content,
  body[data-page="security"] .sec-hero,
  body[data-page="security"] .sec-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .sec-sidebar {
    position: static;
    padding: 0;
    margin-bottom: 40px;
    min-width: 0;
  }

  .sidebar-links {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .sidebar-links::before { display: none; }

  .sidebar-link {
    padding: 8px 12px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    white-space: nowrap;
  }

  .sidebar-link.active {
    background: var(--teal-glow);
    border-color: var(--teal);
  }

  .sec-lead, .sec-card-body, .stat-label { overflow-wrap: anywhere; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .stat-row .stat-item { min-width: 0; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  body[data-page="security"] nav { padding: 12px 16px; }
  body[data-page="security"] .nav-right { gap: 10px; }

  body[data-page="security"] .nav-right a,
  body[data-page="security"] .nav-version { font-size: 8px; }

  body[data-page="security"] .nav-version { display: none; }

  body[data-page="security"] .page-layout {
    padding: 136px 18px 64px;
  }

  .sec-h1 { font-size: 48px; }
  .sec-h2 { font-size: 32px; }
  .sec-hero, .sec-section { margin-bottom: 64px; }
  .stat-row .stat-item { padding: 20px 12px; }
  .stat-num { font-size: 38px; }
  .inv-header { gap: 10px; padding: 16px; }
  .inv-body-inner { padding: 0 16px 18px; }
  .cta-strip { padding: 40px 20px; }
  .cta-strip h3 { font-size: 36px; }

  body[data-page="security"] footer {
    padding: 32px 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  body[data-page="security"] .footer-links {
    flex-wrap: wrap;
    gap: 12px 20px;
  }
}
