:root { color-scheme: light; --ink: #182a35; --muted: #526572; --paper: #f6f5ef; --line: #cbd5d6; --accent: #075a68; --bad: #842d30; --bad-bg: #fff0ed; --good: #215a47; --good-bg: #eaf5ed; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: system-ui, sans-serif; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; }
button, a, input { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 3px solid #bd6b00; outline-offset: 4px; }
[hidden] { display: none !important; }
.masthead, footer { max-width: 1160px; margin: auto; padding: 1.5rem 2rem; display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; color: var(--muted); }
.masthead { border-bottom: 1px solid var(--line); }
.masthead a { font-weight: 700; text-decoration: none; }
main { max-width: 1160px; margin: auto; padding: 1rem 2rem 3rem; }
section { margin: 3rem 0; }
.intro { max-width: 800px; }
.eyebrow { color: var(--accent); font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; }
h1 { font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1.08; letter-spacing: -.055em; margin: 1rem 0 1.5rem; }
h2 { font-size: 1.55rem; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: 1.05rem; line-height: 1.4; }
h4 { margin: 0 0 .6rem; font-family: ui-monospace, monospace; }
.lead { font-size: 1.25rem; }
code { padding: .1em .25em; background: #e4eae6; border-radius: .2em; }
.section-heading, .crash-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-heading a { font-size: .9rem; }
.scenario-picker { border: 0; padding: 0; margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: .8rem; }
.scenario-picker legend { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.scenario-picker label { border: 1px solid var(--line); border-radius: .5rem; background: white; padding: .65rem 1rem; cursor: pointer; }
.scenario-picker label:has(input:checked) { border-color: var(--accent); background: #e9f2f1; }
.scenario-picker input { accent-color: var(--accent); margin-right: .45rem; }
.workspace { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.3fr); border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; background: white; }
.trace-panel { background: #edf1ee; border-right: 1px solid var(--line); padding: 1.3rem; }
.trace-panel ol { padding-left: 1.6rem; }
.trace-panel li { padding: .25rem 0; }
.trace-panel button { text-align: left; width: 100%; padding: .5rem .6rem; background: transparent; border: 1px solid transparent; border-radius: .3rem; font-size: .9rem; color: var(--ink); }
.trace-panel button[aria-current="step"] { background: white; border-color: var(--accent); color: var(--accent); font-weight: 700; }
.state-panel { padding: 1.3rem; min-width: 0; }
.step-controls { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.step-controls button { background: white; border: 1px solid var(--line); border-radius: .35rem; padding: .4rem .7rem; color: var(--ink); }
#step-counter { color: var(--muted); font-size: .9rem; }
.scrub-label { display: block; margin-top: 1rem; font-size: .85rem; color: var(--muted); }
#boundary { width: 100%; accent-color: var(--accent); margin: .8rem 0; }
.record-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.record-card { background: var(--paper); border: 1px solid var(--line); border-radius: .4rem; padding: .8rem; }
.record-card p { margin: .3rem 0; font-size: .9rem; }
.muted { color: var(--muted); font-size: .9rem; }
.crash-heading h3 { margin-bottom: .2rem; }
#crash-count { color: var(--muted); font-size: .8rem; white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: left; }
caption { text-align: left; margin: .5rem 0; color: var(--muted); }
th, td { border-bottom: 1px solid var(--line); padding: .7rem .6rem; }
thead th { color: var(--muted); font-weight: 600; }
.bad { color: var(--bad); background: var(--bad-bg); }
.good { color: var(--good); background: var(--good-bg); }
.verdict { padding: .8rem 1rem; border-radius: .4rem; font-size: .95rem; }
.takeaway { border-left: 3px solid var(--accent); padding: .2rem 1.5rem; background: #e9f0ed; }
.takeaway p { max-width: 780px; }
.table-scroll { overflow-x: auto; }
.all-boundaries { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.all-boundaries section { margin: 1.5rem 0; }
details { border-bottom: 1px solid var(--line); padding: .6rem 0; }
summary { cursor: pointer; }
details table { margin: .8rem 0; }
.limits { max-width: 850px; color: var(--muted); }
footer { border-top: 1px solid var(--line); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) { .masthead, footer, main { padding-left: 1.1rem; padding-right: 1.1rem; } .masthead { flex-direction: column; gap: .3rem; } .workspace { grid-template-columns: 1fr; } .trace-panel { border-right: 0; border-bottom: 1px solid var(--line); } .trace-panel ol { display: grid; grid-template-columns: 1fr 1fr; gap: .1rem 1rem; } .section-heading { align-items: flex-start; } .section-heading a { flex-shrink: 0; } }
@media (max-width: 440px) { .trace-panel ol, .record-cards { grid-template-columns: 1fr; } th, td { padding: .6rem .35rem; } .section-heading { flex-direction: column; gap: 0; } }
@media (prefers-reduced-motion: no-preference) { button { transition: background-color .12s ease; } }
