:root {
  color-scheme: dark;
  --ink: #0b0b0b;
  --paper: #f3f0e8;
  --white: #ffffff;
  --muted: #9b9b96;
  --rule: #30302e;
  --signal: #b9ff4a;
  --signal-dark: #213100;
  --blue: #7ee7ff;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--signal);
  color: var(--ink);
  font-weight: 750;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .16em; text-decoration: none; }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 13px; letter-spacing: 0; }
.header-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgb(185 255 74 / 10%); }
.header-download { justify-self: end; color: var(--paper); font-size: 12px; font-weight: 750; text-decoration-thickness: 1px; text-underline-offset: 5px; }

.hero {
  min-height: calc(100vh - 76px);
  padding: clamp(72px, 10vw, 150px) clamp(20px, 4vw, 64px) clamp(68px, 8vw, 120px);
  overflow: hidden;
}
.hero-copy { max-width: 1080px; }
.eyebrow { margin: 0 0 22px; color: var(--signal); font-family: var(--font-mono); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 {
  max-width: 1040px;
  margin: 0;
  font-size: clamp(56px, 8.2vw, 128px);
  font-weight: 760;
  letter-spacing: -.065em;
  line-height: .88;
}
.hero-deck { max-width: 740px; margin: 38px 0 0; color: #c9c7c0; font-size: clamp(20px, 2.2vw, 31px); letter-spacing: -.025em; line-height: 1.3; }
.hero-action { display: flex; align-items: center; gap: 24px; margin-top: 42px; }
.hero-action p { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 10px; line-height: 1.65; text-transform: uppercase; }
.primary-action {
  display: inline-flex;
  min-width: 300px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 22px;
  background: var(--signal);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 150ms ease, transform 150ms ease;
}
.primary-action:hover { background: var(--white); transform: translateY(-2px); }

.product-frame {
  width: min(1180px, 94vw);
  margin: clamp(72px, 9vw, 130px) 0 0 auto;
  border: 1px solid #4a4a46;
  background: #11110f;
  box-shadow: -22px 24px 0 #171714;
}
.frame-bar { display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 18px; border-bottom: 1px solid var(--rule); font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; }
.frame-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.frame-brand span { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--paper); border-radius: 50%; }
.frame-state { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.frame-state i { width: 6px; height: 6px; background: var(--signal); border-radius: 50%; }
.frame-body { display: grid; grid-template-columns: 190px 1fr; min-height: 520px; }
.source-rail { padding: 28px 16px; border-right: 1px solid var(--rule); }
.source-rail p { margin: 0 10px 12px; color: #6f6f6b; font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; }
.source-rail button { display: flex; width: 100%; align-items: center; justify-content: space-between; margin: 2px 0; padding: 10px; border: 0; background: transparent; color: #888883; font: 11px var(--font-sans); text-align: left; }
.source-rail button span { color: #5d5d59; font-family: var(--font-mono); font-size: 9px; }
.source-rail .rail-active { background: var(--paper); color: var(--ink); }
.rail-rule { height: 1px; margin: 22px 10px; background: var(--rule); }
.library-panel { padding: 30px; }
.search-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid #52524e; color: #e8e5dd; font-size: 13px; }
kbd { padding: 4px 6px; border: 1px solid #3c3c38; color: #787873; font: 9px var(--font-mono); }
.result-head, .result-row { display: grid; grid-template-columns: minmax(240px, 2fr) 1fr .5fr .5fr; gap: 16px; align-items: center; }
.result-head { margin-top: 26px; padding: 0 14px 10px; color: #62625f; font: 9px var(--font-mono); letter-spacing: .12em; }
.result-row { min-height: 67px; padding: 10px 14px; border-top: 1px solid #262623; color: #aaa8a2; font-size: 11px; }
.result-row b { display: block; color: #ddd9d0; font-size: 12px; }
.result-row small { display: block; margin-top: 5px; color: #666661; font-family: var(--font-mono); }
.result-row.selected { border-color: #5c5c57; background: #1d1d1a; }
.result-row.selected b { color: var(--white); }
.match { color: var(--signal); font-family: var(--font-mono); }
.muted-row { opacity: .52; }
.wave-panel { margin-top: 28px; padding: 18px; background: var(--paper); color: var(--ink); }
.wave-label { display: flex; justify-content: space-between; font: 9px var(--font-mono); letter-spacing: .08em; }
.waveform { display: flex; height: 98px; align-items: center; gap: 5px; padding: 15px 0; overflow: hidden; }
.waveform i { flex: 1; min-width: 2px; background: var(--ink); transform-origin: center; }
.waveform i:nth-child(1) { height: 26%; }
.waveform i:nth-child(2) { height: 68%; }
.waveform i:nth-child(3) { height: 43%; }
.waveform i:nth-child(4) { height: 88%; }
.waveform i:nth-child(5) { height: 61%; }
.waveform i:nth-child(6) { height: 94%; }
.waveform i:nth-child(7) { height: 48%; }
.waveform i:nth-child(8) { height: 76%; }
.waveform i:nth-child(9) { height: 34%; }
.waveform i:nth-child(10) { height: 81%; }
.waveform i:nth-child(11) { height: 57%; }
.waveform i:nth-child(12) { height: 92%; }
.waveform i:nth-child(13) { height: 39%; }
.waveform i:nth-child(14) { height: 73%; }
.waveform i:nth-child(15) { height: 51%; }
.waveform i:nth-child(16) { height: 85%; }
.waveform i:nth-child(17) { height: 31%; }
.waveform i:nth-child(18) { height: 63%; }
.waveform i:nth-child(19) { height: 42%; }
.waveform i:nth-child(20) { height: 79%; }
.waveform i:nth-child(21) { height: 55%; }
.waveform i:nth-child(22) { height: 89%; }
.waveform i:nth-child(23) { height: 46%; }
.waveform i:nth-child(24) { height: 69%; }
.provenance-line { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border-top: 1px solid #c9c5ba; padding-top: 12px; font: 8px var(--font-mono); letter-spacing: .08em; }
.provenance-line strong { font-weight: 500; }
.source-safe { padding: 6px 8px; background: var(--signal-dark); color: var(--signal); }

.chapter { padding: clamp(80px, 10vw, 150px) clamp(20px, 4vw, 64px); border-top: 1px solid var(--rule); }
.chapter-index { color: #656560; font: 10px var(--font-mono); letter-spacing: .14em; }
.chapter-copy { display: grid; grid-template-columns: minmax(120px, .55fr) minmax(300px, 1.45fr); gap: 36px; margin-top: 70px; }
.chapter-copy .eyebrow { padding-top: 10px; }
h2 { max-width: 930px; margin: 0; font-size: clamp(44px, 6.7vw, 96px); font-weight: 730; letter-spacing: -.06em; line-height: .96; }
.chapter-deck { max-width: 650px; margin: 30px 0 0; color: #aaa8a2; font-size: 19px; line-height: 1.5; }
.workflow { background: var(--paper); color: var(--ink); }
.workflow .chapter-index { color: #77746d; }
.workflow .eyebrow { color: #4b650e; }
.workflow-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 100px 0 0; padding: 0; border-top: 1px solid #bbb7ad; list-style: none; }
.workflow-steps li { min-height: 290px; padding: 24px 24px 30px 0; border-right: 1px solid #bbb7ad; }
.workflow-steps li + li { padding-left: 24px; }
.workflow-steps li:last-child { border-right: 0; }
.workflow-steps span { font: 10px var(--font-mono); }
.workflow-steps h3 { margin: 82px 0 18px; font-size: 29px; letter-spacing: -.04em; }
.workflow-steps p { max-width: 250px; margin: 0; color: #5d5b55; font-size: 14px; line-height: 1.5; }

.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 100px; border: 1px solid var(--rule); }
.proof-grid div { display: flex; min-height: 170px; flex-direction: column; justify-content: space-between; padding: 24px; border-right: 1px solid var(--rule); }
.proof-grid div:last-child { border-right: 0; }
.proof-grid strong { color: var(--signal); font: 45px/1 var(--font-mono); letter-spacing: -.06em; }
.proof-grid span { color: var(--muted); font: 10px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.boundary-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; gap: 24px; }
.boundary-grid article { min-height: 250px; padding: 26px; background: #151513; }
.boundary-grid h3 { margin: 75px 0 16px; font-size: 26px; letter-spacing: -.035em; }
.boundary-grid article > p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.testing { background: #161614; }
.test-layout { display: grid; grid-template-columns: 1.55fr .75fr; gap: clamp(30px, 6vw, 100px); margin-top: 90px; }
.test-steps { margin: 0; padding: 0; border-top: 1px solid #41413d; list-style: none; }
.test-steps li { display: grid; grid-template-columns: 46px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid #41413d; }
.test-steps li > span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #5b5b56; border-radius: 50%; font: 10px var(--font-mono); }
.test-steps h3 { margin: 2px 0 8px; font-size: 18px; }
.test-steps p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
code { font-family: var(--font-mono); }
.test-note { align-self: start; padding: 28px; border-left: 3px solid var(--signal); background: #20201d; }
.test-note > p:nth-child(2) { margin: 0 0 28px; color: #c2c0b9; font-size: 17px; line-height: 1.55; }
.test-note a { color: var(--signal); font-size: 13px; font-weight: 700; text-underline-offset: 5px; }

.final-cta { padding: clamp(90px, 12vw, 180px) clamp(20px, 4vw, 64px); background: var(--signal); color: var(--ink); }
.final-cta .eyebrow { color: #364700; }
.final-cta h2 { max-width: 1120px; }
.primary-action.light { margin-top: 55px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.primary-action.light:hover { background: var(--paper); color: var(--ink); }
.checksum { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; max-width: 900px; margin-top: 44px; padding-top: 18px; border-top: 1px solid rgb(11 11 11 / 35%); font: 9px var(--font-mono); letter-spacing: .08em; }
.checksum code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checksum button { border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 7px 10px; font: 9px var(--font-mono); text-transform: uppercase; cursor: pointer; }
.final-cta details { max-width: 900px; margin-top: 28px; border-top: 1px solid rgb(11 11 11 / 35%); padding-top: 18px; }
.final-cta summary { font-size: 12px; font-weight: 750; cursor: pointer; }
.final-cta details p { max-width: 700px; margin: 14px 0 0; font-size: 13px; line-height: 1.5; }

footer { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 36px; min-height: 120px; padding: 24px clamp(20px, 4vw, 64px); border-top: 1px solid var(--rule); }
footer p { margin: 0; color: var(--muted); font: 9px var(--font-mono); letter-spacing: .07em; text-transform: uppercase; }

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; min-height: 66px; }
  .header-status { display: none; }
  .hero { min-height: auto; padding-top: 78px; }
  h1 { font-size: clamp(54px, 17vw, 86px); }
  .hero-deck { margin-top: 28px; font-size: 21px; }
  .hero-action { align-items: flex-start; flex-direction: column; }
  .primary-action { width: 100%; min-width: 0; }
  .product-frame { width: 100%; margin-top: 70px; box-shadow: -10px 12px 0 #171714; }
  .frame-body { grid-template-columns: 1fr; min-height: auto; }
  .source-rail { display: none; }
  .library-panel { padding: 18px; }
  .result-head, .result-row { grid-template-columns: 1.65fr .75fr .4fr; }
  .result-head span:nth-child(2), .result-row > span:nth-child(2) { display: none; }
  .result-head { gap: 8px; }
  .result-row { gap: 8px; padding-inline: 8px; }
  .waveform { gap: 3px; }
  .provenance-line { grid-template-columns: 1fr auto; }
  .provenance-line strong { display: none; }
  .chapter-copy { display: block; margin-top: 48px; }
  .chapter-copy .eyebrow { padding: 0; }
  .workflow-steps { grid-template-columns: 1fr 1fr; margin-top: 60px; }
  .workflow-steps li:nth-child(2) { border-right: 0; }
  .workflow-steps li:nth-child(n + 3) { border-top: 1px solid #bbb7ad; }
  .proof-grid { grid-template-columns: 1fr 1fr; margin-top: 60px; }
  .proof-grid div:nth-child(2) { border-right: 0; }
  .proof-grid div:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
  .boundary-grid { grid-template-columns: 1fr; }
  .boundary-grid article { min-height: 220px; }
  .test-layout { grid-template-columns: 1fr; margin-top: 60px; }
  footer { grid-template-columns: 1fr; padding-block: 40px; }
}

@media (max-width: 480px) {
  .site-header { padding-inline: 16px; }
  .header-download { font-size: 10px; }
  .hero, .chapter, .final-cta { padding-inline: 16px; }
  h1 { font-size: 55px; }
  h2 { font-size: 43px; }
  .product-frame { width: calc(100% + 8px); }
  .frame-bar { padding-inline: 12px; }
  .frame-state { display: none; }
  .library-panel { padding: 12px; }
  .search-row { padding: 13px 12px; }
  .result-head, .result-row { grid-template-columns: minmax(0, 1fr) 36px 32px; }
  .result-row b, .result-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wave-panel { padding: 13px; }
  .waveform { height: 72px; }
  .source-safe { white-space: nowrap; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-steps li, .workflow-steps li + li { min-height: 230px; padding: 22px 0; border-right: 0; border-top: 1px solid #bbb7ad; }
  .workflow-steps li:first-child { border-top: 0; }
  .workflow-steps h3 { margin-top: 55px; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-grid div { min-height: 135px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .proof-grid div:last-child { border-bottom: 0; }
  .checksum { grid-template-columns: 1fr auto; }
  .checksum > span { grid-column: 1 / -1; }
}

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