:root {
  color-scheme: dark;
  --bg: #050608;
  --surface: #0c1117;
  --text: #e2e8ee;
  --muted: #b0c0cd;
  --line: #263441;
  --signal: #b7dbe8;
  --refuse: #ff8a72;
  --pass: #70ddbb;
  --mono: "IBM Plex Mono", Menlo, Consolas, monospace;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-synthesis: none;
  scroll-padding-top: 92px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.7 var(--serif); }
body::after { content:""; position:fixed; inset:14px; border:1px solid #b7dbe82b; pointer-events:none; z-index:90; box-shadow:inset 0 0 65px #0005; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button { color: var(--text); background: #15202b; border: 1px solid #455b6c; padding: 10px 16px; min-height: 44px; font: 11px/1.5 var(--mono); letter-spacing: .04em; border-radius: 3px; }
button:active { background: #304a5b; transform: translateY(1px); }
a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: .24em; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #e2f1ff; outline-offset: 5px; }
@media (hover: hover) and (pointer: fine) {
  button:hover { background: #203443; border-color: var(--signal); }
  a:hover { color: #fff; }
  .card:hover { border-color: #4b6473; }
}
::selection { background: #305567; color: white; }
#shoreline-optics, #phase-boundary-canvas { position:fixed; inset:0; width:100%; height:100%; pointer-events:none; z-index:-1; }
#shoreline-optics { opacity:0; }
#phase-boundary-canvas { opacity:.8; }
.optics-ready #shoreline-optics { opacity:.78; }
.optics-ready #phase-boundary-canvas { opacity:0; }
.wrap { width:94%; margin:auto; padding:0; }
.instrument-bar { height: 72px; display: flex; align-items: center; gap: 28px; padding: 0 44px; border-bottom: 1px solid var(--line); background: #050608ef; position: relative; z-index: 2; font: 10px var(--mono); color: var(--muted); letter-spacing: .1em; }
.wordmark { font: 20px var(--mono); text-decoration: none; color: #eef3f6; display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.wordmark-cross { color: var(--pass); margin-left: 4px; }
.instrument-bar button { margin-left: auto; }
.reading-progress { position: fixed; left: 0; top: 0; width: 100%; height: 2px; z-index: 9; pointer-events: none; }
.reading-progress i { display: block; width: 100%; height: 100%; background: var(--signal); transform: scaleX(0); transform-origin: left; }
.skip-link { position: absolute; z-index: 10; top: 10px; left: 16px; transform: translateY(-160%); background: #122734; padding: 12px 18px; }
.skip-link:focus { transform: none; }
.hero { display:grid; grid-template-columns:1.05fr 1.2fr; gap:clamp(40px,5vw,120px); align-items:center; min-height:calc(100svh - 72px); padding:clamp(64px,9vh,120px) 2vw; }
.hero-intro { padding-bottom: 12px; }
.eyebrow, h2 { color: var(--signal); font: 11px/1.6 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.eyebrow a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
h1, .big { font-family: "Besley", "Iowan Old Style", Georgia, serif; font-weight: 500; }
h1 { font-size:clamp(60px,6.2vw,116px); line-height:1.02; letter-spacing:-.045em; margin:30px 0; text-wrap:balance; text-shadow:0 12px 40px #0008; }
.lede { color: #b4c1cc; font-size: 20px; line-height: 1.65; max-width: 38ch; }
.public-tools { display: flex; flex-wrap: wrap; gap: 5px 22px; margin-top: 40px; max-width: 480px; border-top: 1px solid var(--line); padding-top: 20px; }
.public-tools-label { width: 100%; color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.public-tools a { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; font: 12px var(--mono); }
.hero-instrument { border:1px solid #69899c66; border-top-color:#b7dbe86b; background:linear-gradient(145deg,#14212ad9,#080d13f0); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); box-shadow:0 30px 85px -20px #000d,inset 0 1px #d2eefa22; }
.chamber { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.instrument-caption, .chamber-footer { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font: 9px/1.6 var(--mono); letter-spacing: .05em; }
.instrument-caption span:last-child { text-align: right; }
.chamber canvas { display:block; width:100%; height:clamp(260px,32vh,380px); }
.chamber-footer { font-size: 8px; }
.panel { padding:28px 30px; color:#d0dbe3; font:clamp(11px,.85vw,13px)/1.9 var(--mono); }
.panel .row { display: block; margin-bottom: 10px; overflow-wrap: anywhere; }
.panel .pl { color: var(--muted); }
.panel .warn { color: var(--refuse); }
.panel .verdict { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; color: var(--refuse); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.stage { position:relative; min-height:100svh; align-content:center; padding:clamp(70px,9vh,130px) 2vw; }
h2 { margin: 0 0 38px; display: flex; align-items: center; gap: 16px; }
h2::before { content: "0" counter(plate); color: #82929f; font-size: 10px; letter-spacing: 0; }
main { counter-reset: plate; }
.stage { counter-increment: plate; }
.big { font-size:clamp(34px,3.6vw,68px); line-height:1.22; letter-spacing:-.025em; margin:0 0 30px; max-width:26ch; text-wrap:balance; }
.prose { max-width: 68ch; }
p { margin: 0 0 22px; }
.stage-1 { padding-right:52%; }
.stage-1 .big { max-width: 18ch; }
.difference-plate { position:absolute; margin:0; right:2vw; top:50%; transform:translateY(-50%); width:42%; padding:clamp(16px,2vw,32px); background:#0a111aed; border:1px solid #69899c66; border-top-color:#b7dbe86b; backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); box-shadow:0 22px 60px -24px #000c,inset 0 1px #d2eefa14; }
.difference-plate canvas { display:block; height:clamp(300px,46vh,500px); width:100%; }
figcaption { font: 9px/1.8 var(--mono); color: var(--muted); letter-spacing: .025em; }
.stage-2 { display:grid; grid-template-columns:1fr 1.1fr; gap:0 clamp(40px,7vw,150px); }
.stage-2 h2 { grid-column: 1 / -1; }
.stage-2 .prose { font-size:clamp(17px,1.15vw,21px); padding:clamp(24px,3vw,64px); background:linear-gradient(90deg,#050b11e6,#050b11b3); border-left:1px solid #69899c45; }
blockquote { border-left: 1px solid var(--signal); margin: 36px 0; padding: 4px 0 4px 24px; font-style: italic; color: #c6d4de; }
blockquote .attr { display: block; margin-top: 16px; font: 10px/1.8 var(--mono); color: var(--muted); }
.provenance { font: 10px/1.9 var(--mono); color: var(--muted); margin-top: 35px; }
.mono, code { font-family: var(--mono); }
.cards { display:grid; grid-template-columns:1fr 1fr; gap:clamp(24px,2.2vw,48px); }
.card { min-width:0; background:linear-gradient(145deg,#14212be6,#080d14f0); border:1px solid #5d7a8c66; border-top-color:#b7dbe86b; padding:clamp(28px,2.4vw,48px); position:relative; box-shadow:0 22px 65px -22px #000c,inset 0 1px #d2eefa14; }
.card::before { content: ""; pointer-events: none; position: absolute; inset: 0; border: 1px solid transparent; background: radial-gradient(250px circle at var(--mouse-x, -400px) var(--mouse-y, -400px), #d6efff1c, transparent 65%); }
.card > * { position: relative; }
.card .name { font: 15px/1.7 var(--mono); color: #d4e5ed; margin-bottom: 22px; }
.card .name a { min-height: 44px; display: inline-flex; align-items: center; }
.card p:not(.name) { font-size: 16px; color: #b0bfcc; }
.card p.status { font: 10px/1.8 var(--mono); letter-spacing: .025em; padding-top: 16px; margin-bottom: 0; border-top: 1px solid var(--line); }
.card .status.live { color: var(--pass); }
.card .status.building { color: #e7bb7d; }
.micro { padding: 18px 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.micro canvas { width:100%; height:clamp(180px,20vh,240px); display:block; margin:22px 0; background:#050c1280; border:1px solid #54718626; }
.micro label, .micro legend, .replay label { font: 11px/1.6 var(--mono); color: #b8cad6; }
input[type="range"] { appearance: auto; width: 100%; min-height: 44px; accent-color: #b6d7e5; margin: 0; cursor: pointer; }
input[type="checkbox"] { accent-color: #88d9be; min-width: 18px; min-height: 18px; margin: 0 10px 0 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset label, .replay-actions label { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
legend { padding: 0 0 8px; }
output { display: block; font: 12px/1.8 var(--mono); color: var(--signal); font-variant-numeric: tabular-nums; min-height: 22px; }
.card p.scope-note, .scope-note { font: 10px/1.8 var(--mono); color: var(--muted); margin: 10px 0 0; }
output[data-state="pass"] { color: var(--pass); }
output[data-state="refused"], output[data-state="mismatch"], output[data-state="unavailable"] { color: var(--refuse); }
.stage-4 { display:grid; grid-template-columns:1fr 1.2fr; gap:0 clamp(50px,8vw,180px); }
.stage-4 > h2 { grid-column: 1; align-self: start; }
.stage-4 > .prose { grid-column: 1; grid-row: 2 / 5; color: #acbccb; font-size: 20px; }
.receipt { grid-column: 2; position: relative; padding: 0 0 32px 26px; border-left: 1px solid #3a4c5b; margin-bottom: 20px; }
.receipt::before { content: ""; width: 7px; height: 7px; border: 1px solid #d8e8f1; background: var(--bg); position: absolute; top: 5px; left: -5px; }
.receipt .date { display: block; font: 10px/1.9 var(--mono); color: var(--muted); margin-bottom: 16px; }
.receipt .fail { color: var(--refuse); }
.receipt .pass { color: var(--pass); }
.receipt p { font-size: 16px; line-height: 1.75; }
.demo { border:1px solid #65839766; border-top-color:#b7dbe877; padding:clamp(30px,4vw,76px); background:linear-gradient(145deg,#14212be6,#080d14f0); box-shadow:0 25px 90px -20px #000b; }
.demo .big { max-width: 30ch; font-size: 37px; }
.demo .prose { max-width: 75ch; }
.demo .mono-line { font: 12px/2 var(--mono); color: #adbdc9; overflow-wrap: anywhere; }
.demo .contained { color: var(--pass); }
.demo a { display: inline-flex; align-items: center; min-height: 44px; }
.replay { border-bottom: 1px solid var(--line); padding-bottom: 32px; margin-bottom: 36px; }
.graph { display: flex; align-items: center; gap: 16px; padding: 36px 0; }
.graph [data-node] { font: 10px var(--mono); display: grid; place-items: center; flex: 1; padding: 28px 8px; border: 1px solid #496374; color: #b7dbe8; }
.graph [data-node][data-state="match"] { border-color: var(--pass); }
.graph [data-node][data-state="mismatch"] { border: 2px dashed var(--refuse); }
.graph-arrow { color: var(--muted); }
.replay-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; margin-bottom: 16px; }
.stage-6 .prose { margin-left: 27%; }
footer { border-top: 1px solid var(--line); padding: 40px 0 30px; color: var(--muted); font-size: 14px; }
footer .links { display: flex; gap: 12px 28px; flex-wrap: wrap; margin-top: 14px; }
footer a { min-height: 44px; display: inline-flex; align-items: center; }
.method-note { margin-bottom: 60px; color: var(--muted); font: 12px/1.8 var(--mono); }
.method-note summary { min-height: 44px; padding: 10px 0; }
.method-note p { max-width: 95ch; margin-top: 16px; }
.method-note code { overflow-wrap: anywhere; }
.method-note output { margin-top: 14px; }
@media (max-width: 1050px) {
  .wrap { width:94%; padding:0; }
  .hero { gap: 30px; }
  h1 { font-size: 65px; }
  .stage-2, .stage-4 { gap: 0 40px; }
}
@media (max-width: 760px) {
  body::after { inset:6px; box-shadow:none; }
  .instrument-bar { padding: 0 20px; gap: 15px; }
  .bar-label { max-width: 145px; font-size: 8px; line-height: 1.6; }
  .wrap { width:100%; padding:0 24px; }
  .hero { grid-template-columns: 1fr; gap: 36px; min-height: auto; padding: 54px 0 64px; }
  h1 { font-size: clamp(47px, 12vw, 75px); max-width: 12ch; margin: 24px 0; }
  .lede { font-size: 18px; max-width: 45ch; }
  .hero-intro { padding: 0; }
  .public-tools { margin-top: 28px; }
  .chamber canvas { height: 220px; }
  .stage { min-height:auto; padding:56px 0 64px; }
  h2 { margin-bottom: 26px; }
  .stage-1 { padding-right: 0; min-height: 0; }
  .difference-plate { position:static; transform:none; width:100%; margin-bottom:32px; }
  .difference-plate canvas { height: 170px; }
  .stage-1 .big { max-width: 25ch; }
  .stage-2, .stage-4 { display: block; }
  .stage-2 .prose { padding:20px; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .micro canvas { height:180px; }
  .stage-4 > .prose { margin-bottom: 36px; }
  .stage-6 .prose { margin-left: 0; }
  .demo { padding: 24px; }
  .demo .big { font-size: 29px; }
  .graph { gap: 7px; }
  .graph [data-node] { padding: 22px 3px; font-size: 9px; }
  .chamber-footer { flex-wrap: wrap; gap: 5px; }
}
@media (max-width: 360px) {
  .wrap { padding: 0 18px; }
  .bar-label { display: none; }
  .panel { padding: 20px 18px; }
  .chamber { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
