:root {
  color-scheme: dark;
  --bg: #101210;
  --surface: #191d17;
  --line: #343c2d;
  --ink: #eff2e8;
  --muted: #b2bea5;
  --dim: #929e86;
  --lime: #c5f467;
  --amber: #f5c574;
  --coral: #f3a390;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.7 var(--sans); }
button, select, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .5; cursor: default; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.skip { position: fixed; top: -90px; left: 20px; background: var(--lime); padding: 12px; color: #142008; z-index: 20; }
.skip:focus { top: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.header { height: 94px; max-width: 1440px; padding: 0 60px; margin: auto; display: flex; align-items: center; gap: 30px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; }
.mark { display: grid; place-items: center; width: 38px; height: 42px; background: var(--lime); color: #142008; font-size: 32px; font-weight: 800; border-radius: 5px; transform: skewY(-5deg); }
.brand strong { font-size: 25px; line-height: 1.1; letter-spacing: -1px; }
.brand strong span { display: block; font: 9px/2.5 var(--mono); letter-spacing: 2px; color: var(--muted); }
.header nav { display: flex; margin-left: auto; gap: 30px; font-size: 13px; }
.header nav a:hover { color: var(--lime); }
.version { font: 10px var(--mono); color: var(--dim); border: 1px solid var(--line); padding: 7px 10px; border-radius: 4px; }
main { max-width: 1440px; padding: 0 60px; margin: auto; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 55px; align-items: center; padding: 90px 0 60px; }
.eyebrow { color: var(--muted); font: 10px/1.7 var(--mono); letter-spacing: 1.6px; display: flex; gap: 10px; align-items: center; }
.eyebrow>span { display: block; height: 1px; width: 22px; background: var(--lime); }
h1 { font-size: clamp(42px, 5vw, 70px); line-height: 1.08; font-weight: 600; letter-spacing: -3px; margin: 24px 0; }
h1 em { color: var(--lime); font-style: normal; }
.intro { color: var(--muted); font-size: 15px; line-height: 2; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.primary, .secondary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 17px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; font-weight: 600; }
.primary { color: #17230b; background: var(--lime); border-color: var(--lime); }
.primary:hover { background: #dbff98; }
.secondary { background: transparent; color: var(--ink); }
.secondary:hover { border-color: var(--muted); }
.hero-aside { border: 1px solid #455338; border-radius: 7px; overflow: hidden; background: radial-gradient(circle at top right, #2a381a55, transparent 80%), #161a13; box-shadow: 0 25px 60px #0003; transform: rotate(-1deg); }
.terminal-top { padding: 15px 18px; display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.terminal-top i { height: 6px; width: 6px; border-radius: 50%; background: #60704f; }
.terminal-top span { margin-left: auto; font: 10px var(--mono); color: var(--dim); }
.terminal { padding: 22px; }
.terminal p { display: grid; grid-template-columns: 58px 1fr 75px; gap: 10px; font: 12px/2.8 var(--mono); }
.terminal span, .terminal code { color: var(--dim); font-size: 11px; }
.terminal b { font-weight: 400; }
.lime { color: var(--lime); }.amber { color: var(--amber); }.coral { color: var(--coral); }
.terminal-note { padding: 12px 22px; border-top: 1px solid var(--line); color: var(--dim); font: 9px/1.6 var(--mono); letter-spacing: .7px; }
.boundary { display: flex; align-items: center; gap: 18px; padding: 20px 0; border-block: 1px solid var(--line); }
.pill { font: 10px/1.5 var(--mono); color: var(--muted); border: 1px solid #50633b; border-radius: 4px; padding: 5px 8px; white-space: nowrap; }
.boundary p { font-size: 12px; color: var(--muted); max-width: 590px; }
.boundary strong { font: 10px var(--mono); color: var(--lime); margin-left: auto; text-align: right; }
.lab { scroll-margin-top: 20px; padding: 65px 0 45px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-title h2 { margin-top: 7px; font-size: 29px; letter-spacing: -.8px; font-weight: 500; }
.section-title>span { color: var(--dim); font: 10px var(--mono); }
.lab-grid { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 18px; }
.scenarios { display: grid; gap: 10px; align-content: start; }
.scenario { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 15px 17px; text-align: left; min-height: 132px; }
.scenario:hover { border-color: #728b4f; }
.scenario[aria-pressed=true] { background: #25311b; border-color: #8ab54d; }
.scenario-number { position: absolute; right: 14px; top: 16px; color: var(--dim); font: 10px var(--mono); }
.scenario strong { display: block; font-size: 14px; margin-bottom: 7px; }
.scenario small { display: block; font-size: 12px; color: var(--muted); padding-right: 5px; }
.scenario-link { font: 10px var(--mono); color: var(--lime); display: block; margin-top: 15px; }
.theatre { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #161a13; align-self: start; }
.theatre-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px; border-bottom: 1px solid var(--line); }
.theatre-header h3 { margin-top: 5px; font-size: 18px; font-weight: 500; }
.pill.pass { color: var(--lime); }.pill.fail { color: var(--coral); }
.live-frame { padding: 19px 22px; display: flex; align-items: center; gap: 18px; background: #20291a; }
.frame-label { font: 10px var(--mono); color: var(--dim); }.frame-label b { color: var(--muted); margin-left: 5px; font-weight: 400; }
#frame-state { color: var(--lime); font: 12px var(--mono); }
#frame-state.dead, #frame-state.retry_wait { color: var(--amber); }
#frame-time { margin-left: auto; color: var(--muted); font: 12px var(--mono); }
.lane-header { display: flex; justify-content: space-between; padding: 25px 22px 0; gap: 15px; font: 9px var(--mono); color: var(--dim); }
.lane-header>span:last-child { font-family: var(--sans); }
#lanes { display: block; width: calc(100% - 44px); margin: 15px 22px 0; min-height: 110px; }
.grid-line { stroke: #344129; stroke-dasharray: 3 6; }
.axis-text, .lane-label { fill: var(--muted); font: 10px var(--mono); }
.attempt-bar { fill: #b5caff; }.attempt-bar.succeeded { fill: var(--lime); }.attempt-bar.expired, .attempt-bar.failed { fill: #db9e56; }
.bar-label { fill: #17220c; font: 10px var(--mono); }.playhead { stroke: var(--ink); stroke-width: 1; }
.transport { display: flex; align-items: center; gap: 10px; padding: 20px 22px 24px; border-bottom: 1px solid var(--line); }
.scrub-label { flex: 1; display: flex; min-width: 30px; }
#scrub { width: 100%; cursor: pointer; accent-color: var(--lime); }
#speed { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; color: var(--muted); min-height: 44px; width: 70px; padding: 6px; font: 12px var(--mono); }
.frame-facts { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.frame-facts article { padding: 16px 18px; border-right: 1px solid var(--line); min-width: 0; }
.frame-facts article:last-child { border: 0; }
.frame-facts span { display: block; color: var(--dim); font: 9px var(--mono); }
.frame-facts strong { display: block; font: 23px/1.6 var(--mono); overflow-wrap: anywhere; }
#frame-owner { font-size: 15px; padding-top: 8px; }
.event-heading { padding: 18px 22px 10px; display: flex; align-items: center; justify-content: space-between; }
.event-heading h4 { font: 10px var(--mono); color: var(--dim); letter-spacing: 1px; }
.text-button { background: none; border: 0; min-height: 44px; color: var(--muted); font-size: 11px; }
.text-button:hover { color: var(--lime); }
.event-rows { margin: 0 22px 20px; max-height: 252px; overflow: auto; }
.event-row { display: grid; grid-template-columns: 45px 1fr 52px 63px; gap: 10px; width: 100%; text-align: left; min-height: 44px; padding: 10px 8px; border: 0; border-top: 1px solid #2a3522; background: none; font: 11px var(--mono); }
.event-row.selected { background: #29381d; color: var(--lime); border-radius: 3px; }
.event-row.future { opacity: .55; }.event-row code, .event-detail, .event-row time { color: var(--muted); font-size: 10px; }
.event-name { overflow-wrap: anywhere; }
.event-row:focus-visible { outline-offset: -2px; }
.proof-section { padding: 10px 0 60px; }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.check { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 18px; min-height: 110px; }
.check-mark { color: var(--lime); font-size: 19px; margin-right: 12px; }.check.fail .check-mark { color: var(--coral); }
.check strong { font-size: 13px; font-weight: 500; }.check small { display: block; margin: 7px 0 0 30px; font: 11px/1.6 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.proof-note { font-size: 11px; color: var(--dim); margin-top: 16px; }
.engineering { border-top: 1px solid var(--line); padding: 60px 0; display: grid; grid-template-columns: .85fr 1.5fr; gap: 65px; }
.engineering h2 { font-size: 35px; line-height: 1.45; font-weight: 500; margin: 14px 0; }
.engineering p { color: var(--muted); font-size: 13px; line-height: 2; }
.text-link { display: inline-block; color: var(--lime); font-size: 12px; margin-top: 24px; }
.engineering-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 30px; }
.engineering-grid article>span { font: 11px var(--mono); color: var(--lime); }
.engineering-grid h3 { font-weight: 500; font-size: 18px; margin: 10px 0 8px; }
.engineering-grid p { color: var(--muted); font-size: 12px; }
.run { border: 1px solid #4c6135; background: #243019; border-radius: 6px; padding: 32px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 30px; margin: 10px 0 55px; }
.run h2 { font-size: 25px; font-weight: 500; margin: 7px 0; }.run p { color: var(--muted); font-size: 12px; }
.run>div:last-child { min-width: 0; }
.run code { display: block; padding: 8px 12px; border: 1px solid #445830; background: #192310; font: 12px/1.7 var(--mono); margin-bottom: 7px; overflow-wrap: anywhere; border-radius: 4px; }
.run span { color: var(--muted); font: 11px var(--mono); }
footer { border-top: 1px solid var(--line); padding: 25px 0 35px; display: flex; justify-content: space-between; gap: 20px; color: var(--dim); font: 9px/1.6 var(--mono); }
footer a { color: var(--muted); }.error { padding: 15px; border: 1px solid var(--coral); color: var(--coral); border-radius: 5px; margin-bottom: 20px; }
@media(max-width:1100px) {
  main, .header { padding-inline: 32px; }.version { display: none; }.hero { gap: 25px; padding-top: 65px; }
  .terminal { padding: 15px; }.terminal p { font-size: 11px; grid-template-columns: 50px 1fr 64px; gap: 6px; }.terminal code { font-size: 9px; }
  .boundary { flex-wrap: wrap; }.boundary strong { margin-left: 0; }.boundary p { flex: 1; }
  .lab-grid { grid-template-columns: 210px minmax(0,1fr); }.scenario { padding: 14px; }
  .frame-facts article { padding: 12px; }.frame-facts span { font-size: 8px; }.frame-facts strong { font-size: 21px; }
  .engineering { gap: 30px; }.run { grid-template-columns: 1fr; }
}
@media(max-width:780px) {
  .header { height: 80px; }.header nav { gap: 16px; font-size: 12px; }.hero { grid-template-columns: 1fr; padding: 45px 0; }
  .hero-aside { transform: none; max-width: 500px; }.hero h1 { font-size: 56px; }
  .lab { padding-top: 40px; }.lab-grid { grid-template-columns: 1fr; }
  .scenarios { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }.scenario { min-height: 135px; padding: 12px; }.scenario strong { font-size: 12px; margin-right: 18px; }.scenario small { font-size: 11px; }.scenario-link { font-size: 9px; }.scenario-number { right: 9px; top: 12px; }
  .checks { grid-template-columns: repeat(2,minmax(0,1fr)); }.section-title>span { display: none; }.engineering { grid-template-columns: 1fr; }.engineering h2 br { display: none; }
  footer { flex-wrap: wrap; }
}
@media(max-width:480px) {
  main, .header { padding-inline: 18px; }.brand strong { font-size: 22px; }.brand strong span { font-size: 7px; }.mark { width: 31px; height: 34px; font-size: 27px; }.header nav a:first-child { display: none; }
  .hero h1 { font-size: 43px; letter-spacing: -2px; }.hero .eyebrow { font-size: 8px; letter-spacing: .8px; }.intro { font-size: 13px; }.hero-actions { gap: 8px; }.hero-actions a { font-size: 12px; padding-inline: 12px; }
  .boundary { gap: 12px; }.boundary p { flex-basis: 100%; }.boundary strong { font-size: 9px; }
  .section-title h2 { font-size: 23px; }.scenarios { grid-template-columns: repeat(2,minmax(0,1fr)); }.scenario { min-height: 135px; }.scenario small { font-size: 12px; }
  .theatre-header { padding: 17px; }.theatre-header h3 { font-size: 15px; }.theatre-header .eyebrow { font-size: 9px; }.theatre-header .pill { font-size: 8px; }
  .live-frame { padding: 15px; gap: 10px; flex-wrap: wrap; }#frame-state { font-size: 10px; }.frame-label { font-size: 9px; }#frame-time { font-size: 10px; }
  .lane-header { padding-inline: 15px; font-size: 8px; }.lane-header>span:last-child { display: none; }#lanes { width: calc(100% - 30px); margin-inline: 15px; }
  .transport { padding: 15px; gap: 8px; }.transport .primary { padding: 9px; font-size: 12px; }.transport .secondary { padding-inline: 10px; }#speed { width: 50px; font-size: 10px; }
  .frame-facts { grid-template-columns: repeat(2,1fr); }.frame-facts article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }.frame-facts article:nth-child(2) { border-right: 0; }.frame-facts span { font-size: 9px; }.frame-facts article { padding: 14px; }
  .event-heading { padding: 12px 15px 6px; }.event-rows { margin-inline: 15px; }.event-row { grid-template-columns: 30px 1fr 28px 48px; gap: 6px; font-size: 9px; }.event-row code, .event-detail, .event-row time { font-size: 8px; }
  .checks { gap: 8px; }.check { padding: 14px; }.check strong { font-size: 12px; }.check-mark { margin-right: 6px; }.check small { margin-left: 0; font-size: 10px; }.engineering h2 { font-size: 29px; }.engineering-grid { gap: 20px; }.engineering-grid h3 { font-size: 16px; }.run { padding: 22px; }.run h2 { font-size: 22px; }.run code { font-size: 10px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
