:root {
  color-scheme: dark;
  --ink: #e8f0f7;
  --muted: #8ea0b2;
  --dim: #788c9f;
  --bg: #070b10;
  --surface: #0c1219;
  --panel: #111a24;
  --line: #243241;
  --line-hot: #34536a;
  --cyan: #73d7ff;
  --mint: #6ee7d2;
  --amber: #ffc56e;
  --red: #ff7e8a;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(115, 215, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 215, 255, .025) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  font-family: var(--sans);
}
a { color: inherit; }
button, input { font: inherit; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 20; background: var(--mint); color: var(--bg); padding: .75rem 1rem; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-head { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(36, 50, 65, .75); background: rgba(7, 11, 16, .9); backdrop-filter: blur(18px); }
.site-head .shell { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 15px/1 var(--mono); letter-spacing: .04em; }
.brand svg { width: 28px; }
.cursor { color: var(--mint); }
.site-nav { display: flex; gap: 24px; color: var(--muted); font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--cyan); }

.hero { min-height: 700px; display: grid; grid-template-columns: .88fr 1.12fr; gap: 72px; align-items: center; padding: 96px 0 72px; }
.eyebrow { margin: 0 0 18px; color: var(--mint); font: 700 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; max-width: 700px; font-size: clamp(48px, 6.2vw, 82px); line-height: .96; letter-spacing: -.055em; }
.lede { max-width: 600px; color: #b6c4d1; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border: 1px solid var(--line-hot); background: var(--panel); color: var(--ink); text-decoration: none; font: 700 12px/1 var(--mono); letter-spacing: .04em; cursor: pointer; }
.button:hover { border-color: var(--cyan); color: var(--cyan); }
.button.primary { border-color: var(--mint); background: var(--mint); color: #06100e; }
.button.primary:hover { background: #94f0df; color: #06100e; }

.terminal { overflow: hidden; border: 1px solid var(--line-hot); border-radius: 8px; background: #090e14; box-shadow: 0 28px 80px rgba(0, 0, 0, .46); }
.terminal-bar { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #111820; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.dot.red { background: #ff6b72; }.dot.amber { background: #ffc15c; }.dot.green { background: #4bd98b; }
.terminal-title { margin-left: 8px; color: var(--muted); font: 11px/1 var(--mono); }
.terminal-body { min-height: 466px; padding: 24px; font: 13px/1.55 var(--mono); }
.term-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.term-head strong { font-size: 15px; letter-spacing: .04em; }
.term-state { color: var(--mint); }
.wave { display: flex; align-items: center; gap: 3px; height: 48px; margin: 24px 0; }
.wave i { display: block; width: 4px; height: var(--h); background: linear-gradient(var(--cyan), var(--mint)); opacity: var(--o, .8); }
.term-label { margin: 18px 0 7px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.progress { position: relative; height: 8px; overflow: hidden; background: #18232e; }
.progress span { display: block; width: var(--w); height: 100%; background: var(--mint); }
.term-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: center; margin-top: 12px; color: #bfd0df; }
.term-row code { color: var(--cyan); }
.term-row em { color: var(--muted); font-style: normal; }
.term-note { margin: 24px 0 0; padding: 13px 14px; border-left: 2px solid var(--amber); background: rgba(255, 197, 110, .07); color: #e1c18e; }

.proof-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(12, 18, 25, .72); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof { min-height: 124px; padding: 26px 22px; border-right: 1px solid var(--line); }
.proof:first-child { border-left: 1px solid var(--line); }
.proof b { display: block; margin-bottom: 8px; color: var(--cyan); font: 700 22px/1 var(--mono); }
.proof span { color: var(--muted); font-size: 13px; line-height: 1.45; }

section { scroll-margin-top: 90px; }
.section { padding: 110px 0; }
.section-head { display: grid; grid-template-columns: .75fr 1.25fr; gap: 60px; align-items: end; margin-bottom: 44px; }
h2 { margin-bottom: 0; font-size: clamp(36px, 5vw, 62px); line-height: 1; letter-spacing: -.045em; }
.section-intro { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.video-section { padding-bottom: 28px; }
.video-frame { overflow: hidden; border: 1px solid var(--line-hot); border-radius: 8px; background: #05080c; box-shadow: 0 28px 80px rgba(0, 0, 0, .35); }
.video-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #05080c; }
.sandbox { display: grid; grid-template-columns: .8fr 1.2fr; border: 1px solid var(--line-hot); background: var(--surface); }
.controls, .result { padding: 34px; }
.controls { border-right: 1px solid var(--line); }
.field { margin-bottom: 22px; }
.field label, .group-label { display: block; margin-bottom: 9px; color: var(--muted); font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.field input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); outline: 0; background: #080d13; color: var(--ink); font-family: var(--mono); }
.field input:focus { border-color: var(--cyan); }
.tier { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; }
.tier button { min-height: 46px; border: 1px solid var(--line); background: #080d13; color: var(--muted); font: 700 12px/1 var(--mono); cursor: pointer; }
.tier button + button { border-left: 0; }
.tier button.active { border-color: var(--cyan); background: rgba(115, 215, 255, .08); color: var(--cyan); }
.controls .button { width: 100%; }
.boundary { margin: 18px 0 0; color: var(--dim); font: 11px/1.6 var(--mono); }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.status-badge { padding: 7px 10px; border: 1px solid var(--line); color: var(--muted); font: 700 11px/1 var(--mono); text-transform: uppercase; }
.status-badge.warn { border-color: var(--amber); color: var(--amber); }.status-badge.blocked { border-color: var(--red); color: var(--red); }.status-badge.ok { border-color: var(--mint); color: var(--mint); }
.metric { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 26px; border: 1px solid var(--line); }
.metric div { padding: 18px; border-right: 1px solid var(--line); }.metric div:last-child { border: 0; }
.metric b { display: block; margin-bottom: 7px; color: var(--ink); font: 700 24px/1 var(--mono); }.metric span { color: var(--dim); font: 10px/1.3 var(--mono); text-transform: uppercase; }
.stages { display: grid; gap: 11px; }
.stage { display: grid; grid-template-columns: 95px 1fr 46px; align-items: center; gap: 12px; font: 12px/1 var(--mono); }
.stage span { color: var(--muted); }.stage .bar { height: 7px; background: #192431; }.stage .bar i { display: block; height: 100%; width: var(--w); background: var(--cyan); transition: width .45s ease; }.stage output { color: var(--dim); text-align: right; }
.result-message { margin: 26px 0 0; min-height: 72px; padding: 16px; border: 1px solid var(--line); color: #b8c7d4; font: 13px/1.55 var(--mono); }

.rename-grid { display: grid; grid-template-columns: .65fr 1.35fr; gap: 24px; }
.speaker-panel, .output-panel { border: 1px solid var(--line); background: var(--surface); padding: 28px; }
.speaker { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; margin-top: 16px; }
.speaker span { color: var(--cyan); font: 12px/1 var(--mono); }.speaker input { min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line); background: #080d13; color: var(--ink); font-family: var(--mono); }
.format-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.format-tabs button { padding: 9px 12px; border: 1px solid var(--line); background: #080d13; color: var(--muted); font: 700 11px/1 var(--mono); cursor: pointer; }.format-tabs button.active { border-color: var(--mint); color: var(--mint); }
pre { min-height: 220px; margin: 0; overflow: auto; white-space: pre-wrap; padding: 18px; border: 1px solid var(--line); background: #080d13; color: #c7d6e2; font: 12px/1.6 var(--mono); }

.workflow { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.flow-step { position: relative; min-height: 190px; padding: 24px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(12, 18, 25, .72); }
.flow-step small { display: block; color: var(--dim); font: 11px/1 var(--mono); }.flow-step b { display: block; margin: 34px 0 10px; color: var(--cyan); font: 700 13px/1.2 var(--mono); text-transform: uppercase; }.flow-step p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.flow-step:not(:last-child)::after { content: "→"; position: absolute; z-index: 2; top: 48px; right: -10px; color: var(--mint); font: 18px/1 var(--mono); }
.failure-line { margin: 0; padding: 18px 20px; border: 1px solid var(--amber); border-top: 0; color: #d7bd90; font: 12px/1.6 var(--mono); }

.interface-frame { overflow: hidden; border: 1px solid var(--line-hot); border-radius: 8px; background: #111; }
.interface-frame img { display: block; width: 100%; height: auto; }
.interface-link { position: relative; display: block; text-decoration: none; }
.interface-link > span { position: absolute; z-index: 2; top: 14px; right: 14px; padding: 9px 11px; border: 1px solid var(--mint); background: rgba(5, 8, 12, .92); color: var(--mint); font: 700 11px/1 var(--mono); }
.interface-link:hover .interface-frame { border-color: var(--mint); }
.mobile-details { display: none; }
.caption { margin: 14px 0 0; color: var(--dim); font: 11px/1.55 var(--mono); }
.limits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.limit { padding: 22px; border: 1px solid var(--line); background: rgba(12, 18, 25, .7); }.limit b { display: block; margin-bottom: 10px; color: var(--mint); font: 700 12px/1 var(--mono); }.limit p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

footer { padding: 30px 0 48px; border-top: 1px solid var(--line); color: var(--dim); font: 11px/1.5 var(--mono); }
.foot { display: flex; justify-content: space-between; gap: 24px; }

@media (max-width: 900px) {
  .hero, .section-head, .sandbox, .rename-grid { grid-template-columns: 1fr; }
  .hero { gap: 48px; padding-top: 72px; }
  .controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .proof-grid { grid-template-columns: 1fr 1fr; }.proof:nth-child(3) { border-left: 1px solid var(--line); }
  .workflow { grid-template-columns: 1fr 1fr; }.flow-step { min-height: 155px; }.flow-step:not(:last-child)::after { content: none; }
  .limits { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-nav { display: none; }
  .hero { min-height: 0; padding: 58px 0; }
  h1 { font-size: 46px; }
  .terminal-body, .controls, .result, .speaker-panel, .output-panel { padding: 20px; }
  .term-row { grid-template-columns: 68px 1fr; }.term-row em { grid-column: 2; }
  .proof-grid { grid-template-columns: 1fr 1fr; }.proof, .proof:nth-child(3) { min-height: 112px; border-left: 1px solid var(--line); }
  .proof b { font-size: 18px; }
  .metric, .workflow { grid-template-columns: 1fr; }
  .metric div { border-right: 0; border-bottom: 1px solid var(--line); }.metric div:last-child { border-bottom: 0; }
  .section { padding: 78px 0; }
  .section-head { gap: 20px; }
  .speaker { grid-template-columns: 1fr; }
  .flow-step { min-height: 0; padding: 15px 16px 15px 52px; }
  .flow-step small { position: absolute; left: 16px; top: 18px; }
  .flow-step b { margin: 0 0 6px; }
  .flow-step p { margin: 0; }
  .interface-link > span { top: 8px; right: 8px; font-size: 9px; }
  .mobile-details { display: grid; min-width: 0; gap: 14px; margin-top: 18px; }
  .mobile-details figure { min-width: 0; margin: 0; }
  .mobile-details figcaption { margin-bottom: 8px; color: var(--muted); font: 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
  .detail-scroll { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line-hot); background: #1b1b1b; scrollbar-color: var(--mint) #101820; }
  .detail-scroll img { display: block; max-width: none; height: auto; }
  .detail-output { width: 720px; }
  .detail-completion { width: 920px; }
  .foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
