:root { color-scheme: dark; --paper: #10100f; --panel: #191917; --deep: #0a0a09; --ink: #f4efe5; --muted: #aaa79f; --line: #393832; --orange: #ff6b35; --lime: #c6f36b; --yellow: #ffd166; --red: #ff756b; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: linear-gradient(120deg, #171511 0, var(--paper) 38rem); font: 16px/1.55 Inter, ui-sans-serif, system-ui, sans-serif; }
body::before { position: fixed; inset: 0; z-index: -1; content: ""; opacity: .11; background-image: linear-gradient(#fff1 1px, transparent 1px), linear-gradient(90deg, #fff1 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 75%); }
a { color: var(--lime); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; padding: .7rem 1rem; color: var(--deep); background: var(--lime); font-weight: 800; }
.skip-link:focus { top: 0; left: 0; z-index: 10; }
.shell { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; padding: 4.5rem 0 3rem; }
.hero { position: relative; max-width: 920px; margin-bottom: 2.2rem; }
.hero.compact { margin-bottom: 1.2rem; }
.series-mark { position: absolute; top: -1rem; right: 0; color: #ffffff12; font: 900 clamp(5rem, 17vw, 11rem)/1 ui-monospace, monospace; letter-spacing: -.1em; }
.kicker, .section-label { margin: 0 0 .4rem; color: var(--orange); font: 800 .75rem/1.2 ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }
h1 { position: relative; margin: .2rem 0; font-size: clamp(2.8rem, 8vw, 6.4rem); line-height: .94; letter-spacing: -.06em; }
h1 em { color: var(--lime); font-style: normal; }
.compact h1 { font-size: clamp(2.5rem, 7vw, 4.8rem); }
.lede { max-width: 760px; color: var(--muted); font-size: 1.18rem; }
.console, .outcome { padding: 1.6rem; border: 1px solid var(--line); background: #191917eb; box-shadow: 0 30px 90px #0008; }
.console { border-top: 4px solid var(--orange); }
.panel-heading, .outcome-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 1rem; }
h2, h3 { margin: 0; }
.mode { display: inline-flex; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--lime); font: 750 .72rem ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
form { margin-top: 1.2rem; }
label { display: block; margin: 1rem 0 .45rem; font-weight: 750; }
textarea, input { width: 100%; padding: .9rem 1rem; color: var(--ink); background: var(--deep); border: 1px solid #555148; border-radius: 2px; font: inherit; }
textarea { resize: vertical; }
input[type="number"] { max-width: 11rem; }
.budget-row { display: grid; grid-template-columns: minmax(11rem, 1fr) 2fr; gap: 1.5rem; align-items: end; }
.budget-row p { margin: 0 0 .1rem; color: var(--muted); font-size: .9rem; }
button { margin-top: 1.35rem; padding: .78rem 1.2rem; color: var(--deep); background: var(--lime); border: 0; cursor: pointer; font: 850 .9rem ui-monospace, monospace; text-transform: uppercase; }
button:hover { background: #ddff98; transform: translateY(-1px); }
.outcome { margin-top: 1rem; border-left: 5px solid var(--lime); }
.outcome-degraded, .outcome-budget_exhausted { border-left-color: var(--yellow); }
.outcome-error { border-left-color: var(--red); }
.error-label { color: var(--red); }
.stats { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.stats div { min-width: 6.5rem; padding: .6rem .8rem; background: var(--deep); border: 1px solid var(--line); }
.stats dt { color: var(--muted); font: .68rem ui-monospace, monospace; text-transform: uppercase; }
.stats dd { margin: 0; font-size: 1.1rem; font-weight: 850; }
.outcome section { margin-top: 1.9rem; }
.writer-result { margin: .65rem 0 0; padding: 1rem; border-left: 2px solid var(--orange); background: var(--deep); white-space: pre-wrap; }
.agent-list { display: flex; flex-wrap: wrap; gap: .55rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.agent-list li { padding: .38rem .7rem; border: 1px solid var(--line); color: var(--lime); font: .78rem ui-monospace, monospace; text-transform: uppercase; }
.timing-note { margin: .45rem 0 .7rem; color: var(--muted); font-size: .85rem; }
.timing-list { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; }
.timing-list div { min-width: 8.5rem; padding: .55rem .7rem; border: 1px solid var(--line); background: var(--deep); }
.timing-list dt { color: var(--muted); font: .7rem ui-monospace, monospace; text-transform: uppercase; }
.timing-list dd { margin: .15rem 0 0; color: var(--lime); font: 800 .84rem ui-monospace, monospace; }
.replay-panel { padding: 1rem; border: 1px solid var(--line); background: #11110f; }
.replay-panel > p:not(.section-label) { color: var(--muted); }
.replay-panel nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.replay-meta { display: grid; grid-template-columns: minmax(8rem, 1fr) 3fr; gap: .5rem; margin: .8rem 0 0; }
.replay-meta div { min-width: 0; }
.replay-meta dt { color: var(--muted); font: .7rem ui-monospace, monospace; text-transform: uppercase; }
.replay-meta dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.trace { margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.trace summary { cursor: pointer; font-weight: 800; }
.trace summary span { margin-left: .5rem; color: var(--muted); font-weight: 400; }
.download-link { display: inline-block; padding: .45rem .65rem; border: 1px solid var(--line); font: 750 .75rem ui-monospace, monospace; text-transform: uppercase; }
.file-replay-loader { margin-top: 1.4rem; border-top: 4px solid var(--lime); }
.file-replay-loader .lede-small { margin: .6rem 0 0; color: var(--muted); max-width: 46rem; }
.file-replay-loader input[type="file"] { margin-top: .35rem; padding: .7rem; border-style: dashed; }
.file-replay-root { margin-top: 1rem; }
.file-replay-root .file-replay-panel { margin-bottom: .8rem; }
.file-replay-error { border-left: 4px solid var(--red); }
.trace ol { margin: 1rem 0 0; padding: 0; list-style: none; }
.trace li { display: grid; grid-template-columns: 2.3rem 1fr; gap: .8rem; padding-bottom: .8rem; }
.sequence { padding-top: .7rem; color: var(--orange); font: .75rem ui-monospace, monospace; }
.event-card { padding: .75rem; border: 1px solid var(--line); background: var(--deep); }
.event-title { display: flex; justify-content: space-between; gap: 1rem; }
.event-title h3 { color: var(--lime); font: 800 .78rem ui-monospace, monospace; text-transform: uppercase; }
.event-title span { color: var(--muted); font: .75rem ui-monospace, monospace; }
.event-card pre { margin: .6rem 0 0; overflow-x: auto; color: var(--muted); font: .78rem/1.5 ui-monospace, monospace; }
.diagnostics, .page-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: 1.5rem; padding-top: 1rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .84rem; }
.diagnostics code { overflow-wrap: anywhere; color: var(--ink); }
.diagnostics .mode { margin-left: auto; }
.page-footer { justify-content: space-between; }
.page-footer nav { display: flex; gap: 1rem; }
@media (max-width: 650px) { .shell { padding: 2rem 0; } .console, .outcome { padding: 1rem; } .budget-row { grid-template-columns: 1fr; } button { width: 100%; } .series-mark { display: none; } }
@media (prefers-reduced-motion: no-preference) { button { transition: transform .12s ease, background .12s ease; } }
