/* Living Stack: calm dev-tool dark. Graphite base, one blue accent for action and
   proven state, coral for rejected/drifted state, lilac for signatures.
   System fonts only (CSP font-src 'none'): Inter when installed, else the system sans; system mono for code. */
:root {
  color-scheme: dark;
  --bg: #111214;
  --panel: #1b1d21;
  --panel-2: #22252a;
  --well: #0c0d0f;
  --line: #2e3138;
  --line-strong: #3a3e47;
  --text: #eceef2;
  --body: #c5cad3;
  --muted: #a3a9b4;
  --accent: #6e8bff;
  --link: #8fa6ff;
  --accent-ink: #0b0d14;
  --signal: var(--accent);
  --ember: #ff8a7a;
  --seal: #c9b8ff;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sans);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: var(--bg); font-size: 17px; line-height: 1.5; overflow-wrap: break-word; }
@media (min-width: 1000px) { body { font-size: 18px; } }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--text); }
.skip { position: absolute; left: 16px; top: -80px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; font-weight: 700; z-index: 10; }
.skip:focus { top: 12px; }
.wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.links a { color: var(--body); text-decoration: none; }
.links a:hover { color: var(--text); text-decoration: underline; }
.hero { padding: 64px 0 72px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: start; }
.eyebrow { color: var(--link); font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: .02em; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; color: var(--text); }
h1 { font-size: clamp(38px, 5.4vw, 60px); line-height: 1.06; letter-spacing: -.025em; margin: 12px 0 20px; text-wrap: balance; }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -.018em; margin: 6px 0 12px; }
h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.3; letter-spacing: -.01em; }
p.lead { max-width: 720px; color: var(--body); font-size: clamp(18px, 1.7vw, 20px); line-height: 1.5; }
.fine { color: var(--muted); font-size: 15px; margin: 16px 0 0; }
.hero-mark { width: min(100%, 430px); justify-self: end; object-fit: contain; mix-blend-mode: screen; filter: drop-shadow(0 34px 58px #000a); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; min-height: 46px; padding: 11px 18px; border: 1px solid var(--line-strong); border-radius: 8px; text-decoration: none; color: var(--text); background: var(--panel); font-weight: 600; font-size: 16px; }
.button:hover { border-color: var(--link); color: var(--text); }
.button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.button.primary:hover { background: var(--link); border-color: var(--link); color: var(--accent-ink); }
a:focus-visible, summary:focus-visible, button:focus-visible, .skip:focus { outline: 3px solid var(--link); outline-offset: 3px; }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 18px; }
details p { max-width: 820px; color: var(--body); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0 56px; }
.card { background: var(--panel); border: 1px solid var(--line); padding: 24px; border-radius: 10px; }
.card p { color: var(--body); margin: 8px 0 0; }
.code { background: var(--well); border: 1px solid var(--line); border-radius: 8px; padding: 24px; overflow: auto; color: var(--text); }
.wrap-code { white-space: pre-wrap; overflow-wrap: anywhere; }
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.boundary { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
footer { color: var(--muted); padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 15px; }
code { font-family: var(--mono); font-size: .9em; }
p code, li code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
pre { max-width: 100%; overflow-x: auto; background: var(--well); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
main, section, .wrap > * { min-width: 0; }

/* Hero install box */
.install { margin-top: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.install-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.install-head p { margin: 0; color: var(--muted); font-size: 14px; }
.install pre { margin: 0; border: 0; border-radius: 0; background: var(--well); padding: 14px 16px; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.install pre code { font-size: inherit; }
.install .prompt { color: var(--muted); user-select: none; }
.copy { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; font: 600 14px/1 var(--sans); color: var(--text); background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; }
.copy[hidden] { display: none; }
.copy:hover { border-color: var(--link); }
.copy[data-state="done"] { color: var(--link); border-color: var(--link); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Hero: proof timeline, real text */
.handoff { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-family: var(--mono); font-size: 13.5px; line-height: 1.45; min-width: 0; overflow: hidden; }
.handoff-bar { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.handoff-bar b { color: var(--text); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 12px 16px 4px; }
.step { position: relative; display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: baseline; padding: 5px 0 5px 18px; animation: settle .5s ease-out both; }
.step::before { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; border-left: 1px solid var(--line-strong); }
.step::after { content: ""; position: absolute; left: 0; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.step:first-child::before { top: 11px; }
.step:last-child::before { bottom: calc(100% - 11px); }
.step .verb { color: var(--link); font-weight: 600; }
.step .what { color: var(--body); font-family: var(--sans); font-size: 14.5px; }
.tag { justify-self: end; padding: 0 6px; border: 1px solid currentColor; border-radius: 4px; font-size: 11.5px; letter-spacing: .03em; white-space: nowrap; color: var(--link); }
.tag.no { color: var(--ember); }
.tag.sig { color: var(--seal); }
.step.reject::after { background: var(--ember); }
.step.reject .verb { color: var(--ember); }
.step.sign::after { background: var(--seal); }
.step.sign .verb { color: var(--seal); }
.step.break { grid-template-columns: 1fr; color: var(--muted); padding-top: 6px; padding-bottom: 6px; }
.step.break::after { background: var(--panel); border: 1px solid var(--muted); }
.step.break span { border-top: 1px dashed var(--line-strong); padding-top: 4px; }
.timeline .step:nth-child(2) { animation-delay: .08s; } .timeline .step:nth-child(3) { animation-delay: .16s; }
.timeline .step:nth-child(4) { animation-delay: .24s; } .timeline .step:nth-child(5) { animation-delay: .32s; }
.timeline .step:nth-child(6) { animation-delay: .40s; } .timeline .step:nth-child(7) { animation-delay: .48s; }
.timeline .step:nth-child(8) { animation-delay: .56s; } .timeline .step:nth-child(9) { animation-delay: .64s; }
.coverage { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 16px 0; padding: 12px 0 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.coverage span { padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--body); }
.coverage .on { border-color: var(--link); color: var(--link); }
.coverage .drift { border-color: var(--ember); color: var(--ember); }
.coverage .sr-label { border: 0; padding: 0 4px 0 0; color: var(--muted); }
.handoff figcaption { padding: 10px 16px 12px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--sans); font-size: 13.5px; }
@keyframes settle { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 960px) { .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; } }
@media (max-width: 760px) {
  nav { flex-direction: column; align-items: flex-start; gap: 10px; }
  .boundary { grid-template-columns: 1fr; }
  .hero-mark { justify-self: start; width: 280px; }
  .grid { grid-template-columns: 1fr; }
  .links { gap: 4px 18px; }
  .handoff { font-size: 13px; }
  .step { grid-template-columns: 1fr auto; gap: 2px 10px; }
  .step .what { grid-column: 1 / -1; grid-row: 2; }
  .step .tag { grid-row: 1; grid-column: 2; }
  .handoff-bar { flex-direction: column; gap: 0; }
  .install pre { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .actions .button { flex: 1 1 auto; justify-content: center; }
}
