:root {
  --ink: #11110f;
  --paper: #f4f1e9;
  --white: #fffef8;
  --green: #b9f34a;
  --coral: #ff6b4a;
  --blue: #3d67ff;
  --line: rgba(17, 17, 15, .2);
  --muted: #62615b;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Satoshi, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a, select { -webkit-tap-highlight-color: transparent; }
.page-shell { width: 100%; max-width: 100%; overflow-x: hidden; }
.nav { min-height: 68px; padding: 0 3vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(244, 241, 233, .96); position: relative; z-index: 20; }
.brand { color: var(--ink); text-decoration: none; font-weight: 750; display: inline-flex; gap: 10px; align-items: center; }
.brand-mark { width: 18px; height: 18px; border: 2px solid var(--ink); display: inline-block; position: relative; }
.brand-mark::after { content: ""; position: absolute; width: 7px; height: 7px; right: -5px; top: -5px; background: var(--green); border: 1px solid var(--ink); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-actions > a { color: var(--ink); text-decoration: none; font-size: .86rem; font-weight: 700; padding: 10px; }
.button, .icon-button { border: 1px solid var(--ink); border-radius: var(--radius); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 760; min-height: 42px; transition: transform .25s ease, background .25s ease, color .25s ease; }
.button:hover, .icon-button:hover { transform: translateY(-2px); }
.button:focus-visible, .icon-button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.button svg, .icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.button-dark { color: var(--white); background: var(--ink); padding: 0 16px; }
.icon-button { width: 42px; color: var(--ink); background: transparent; }

.hero { min-height: calc(100vh - 68px); padding: 5vw 3vw; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); gap: 5vw; align-items: center; border-bottom: 1px solid var(--line); }
.hero-copy { max-width: 72rem; }
.kicker, .eyebrow { margin: 0 0 18px; text-transform: uppercase; font-size: .72rem; font-weight: 850; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 72rem; margin-bottom: 28px; font-size: clamp(3rem, 5vw, 5.5rem); line-height: .96; letter-spacing: 0; font-weight: 780; text-wrap: balance; }
.hero-lede { max-width: 650px; color: #4e4d47; font-size: clamp(1rem, 1.5vw, 1.3rem); line-height: 1.55; }
.source-line { display: flex; gap: 20px; align-items: center; margin-top: 42px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.source-line .line { height: 1px; background: var(--ink); min-width: 80px; flex: 1; }
.composer { border: 1px solid var(--ink); background: var(--white); padding: clamp(20px, 3vw, 36px); border-radius: var(--radius); box-shadow: 12px 12px 0 var(--ink); }
.composer-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.composer-heading h2 { font-size: clamp(1.4rem, 2vw, 2rem); line-height: 1.05; margin-bottom: 0; }
.eyebrow { margin-bottom: 8px; }
.autosave { font-size: .72rem; color: #2d6200; white-space: nowrap; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field > span { color: var(--muted); font-size: .72rem; font-weight: 800; }
input, select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 4px; background: #f8f6ef; color: var(--ink); padding: 12px 11px; }
.button-primary { width: 100%; margin-top: 6px; background: var(--green); color: var(--ink); padding: 0 18px; }

.architecture { padding: 9rem 3vw; background: var(--ink); color: var(--white); }
.architecture-head { display: flex; justify-content: space-between; gap: 60px; align-items: end; margin-bottom: 52px; }
.architecture-head h2, .evidence h2, .action-band h2 { font-size: clamp(2.4rem, 4.5vw, 5.2rem); line-height: 1; letter-spacing: 0; max-width: 850px; margin-bottom: 0; }
.tier-block { min-width: 260px; border-left: 1px solid rgba(255,255,255,.3); padding-left: 24px; display: grid; gap: 4px; }
.tier-block span, .tier-block small { color: rgba(255,255,255,.62); }
.tier-block strong { color: var(--green); font-size: 2.2rem; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(175px, auto)); grid-auto-flow: dense; gap: 1px; background: rgba(255,255,255,.32); border: 1px solid rgba(255,255,255,.32); }
.bento article { background: #1d1d1a; padding: clamp(20px, 3vw, 36px); overflow: hidden; }
.control-map { grid-column: span 7; grid-row: span 2; min-height: 470px; display: flex; flex-direction: column; }
.gate-panel, .truth-panel { grid-column: span 5; }
.map-head, .map-footer, .panel-top { display: flex; justify-content: space-between; gap: 16px; font-size: .76rem; font-weight: 750; }
.map-head { padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.18); }
.map-footer { margin-top: auto; color: rgba(255,255,255,.62); }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; margin-right: 5px; }
.dot-green { background: var(--green); }.dot-coral { background: var(--coral); }
.control-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: center; flex: 1; padding: 30px 0; }
.control-node { min-height: 96px; padding: 14px; border: 1px solid rgba(255,255,255,.25); background: #11110f; display: flex; flex-direction: column; justify-content: space-between; transition: transform .7s ease; }
.control-node:hover { transform: scale(1.035); }
.control-node small { color: rgba(255,255,255,.5); font-size: .63rem; text-transform: uppercase; letter-spacing: .08em; }
.control-node strong { font-size: .89rem; line-height: 1.2; }
.control-node.human { border-color: var(--coral); }
.control-node.runtime { border-color: var(--green); }
.gate-status { color: var(--green); font-size: 1.5rem; }
.gate-status.fail { color: var(--coral); }
.gate-panel > p { font-size: 1.35rem; margin: 36px 0 26px; }
.meter { height: 8px; background: rgba(255,255,255,.13); overflow: hidden; }
.meter span { display: block; width: 100%; height: 100%; background: var(--green); transition: width .5s ease, background .5s ease; }
.truth-panel { display: flex; flex-direction: column; justify-content: space-between; }
.truth-panel p { color: rgba(255,255,255,.56); font-size: .72rem; text-transform: uppercase; font-weight: 800; }
.truth-panel strong { font-size: 1.35rem; line-height: 1.25; }
.truth-panel small { color: rgba(255,255,255,.56); line-height: 1.45; }

.evidence { padding: 11rem 3vw; display: grid; grid-template-columns: minmax(280px, .8fr) minmax(440px, 1.2fr); gap: 8vw; align-items: start; }
.evidence-title { max-width: 620px; }
.evidence-title > p:last-child { color: var(--muted); line-height: 1.6; max-width: 500px; margin-top: 28px; }
.outcome-stack { position: relative; }
.outcome-card { min-height: 210px; background: var(--white); border: 1px solid var(--ink); padding: 30px; margin-bottom: 24px; display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start; box-shadow: 7px 7px 0 var(--ink); }
.outcome-index { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--ink); background: var(--green); font-weight: 850; }
.outcome-card label { display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: 1.25rem; font-weight: 760; }
.outcome-card select { width: auto; min-width: 150px; }
.outcome-card p { grid-column: 2; color: var(--muted); margin: 0; }
.action-band { background: var(--blue); color: var(--white); padding: 8rem 3vw; display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.button-light { background: var(--white); color: var(--ink); padding: 0 20px; min-width: 230px; }
footer { padding: 28px 3vw; display: flex; justify-content: space-between; gap: 20px; font-size: .76rem; border-top: 1px solid var(--line); }
footer a { color: var(--ink); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 5rem; padding-bottom: 6rem; }
  .hero-copy { max-width: 850px; }
  .composer { max-width: 720px; }
  .architecture-head, .action-band { align-items: start; flex-direction: column; }
  .evidence { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav { padding: 0 18px; }
  .brand span:last-child, .nav-actions > a, .button-dark { display: none; }
  .hero, .architecture, .evidence, .action-band { padding-left: 18px; padding-right: 18px; }
  .hero { padding-top: 4rem; gap: 3.5rem; }
  h1 { font-size: clamp(2.75rem, 13vw, 4.2rem); }
  .source-line { align-items: start; }
  .composer { padding: 20px; box-shadow: 7px 7px 0 var(--ink); }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .architecture { padding-top: 7rem; padding-bottom: 7rem; }
  .architecture-head { gap: 28px; align-items: stretch; }
  .tier-block { min-width: 0; }
  .bento { grid-template-columns: 1fr; grid-template-rows: auto; }
  .control-map, .gate-panel, .truth-panel { grid-column: 1; grid-row: auto; }
  .control-map { min-height: 0; }
  .control-flow { grid-template-columns: 1fr 1fr; }
  .map-footer { margin-top: 20px; flex-direction: column; }
  .evidence { padding-top: 7rem; padding-bottom: 7rem; }
  .outcome-card { grid-template-columns: 42px 1fr; padding: 20px; }
  .outcome-card label { align-items: stretch; flex-direction: column; font-size: 1.05rem; }
  .outcome-card select { width: 100%; }
  footer { flex-direction: column; }
}

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