:root {
  --paper: #fff;
  --ink: #111315;
  --muted: #5b6570;
  --line: #d8dde1;
  --accent: #f04416;
  --night: #0d161d;
  --night-line: #2c3942;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page: min(1440px, calc(100% - 64px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 10px 14px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header, footer { width: var(--page); margin: auto; display: flex; align-items: center; justify-content: space-between; min-height: 88px; }
.site-header { position: relative; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 1.75rem; font-weight: 760; letter-spacing: -.05em; text-decoration: none; }
nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); }
nav a { font-family: var(--mono); text-decoration: none; }
nav a:hover { color: var(--accent); }
.menu-toggle { display: none; border: 0; background: none; color: var(--ink); font: 700 .78rem var(--mono); }
.page-section { width: var(--page); margin: auto; }
.hero { position: relative; min-height: calc(100vh - 88px); display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(48px, 7vw, 112px); padding: 64px 0 100px; }
h1, h2 { margin: 0; font-family: var(--mono); letter-spacing: -.065em; line-height: 1.02; }
h1 { max-width: 720px; font-size: clamp(3.4rem, 5vw, 5.7rem); }
h2 { font-size: clamp(2.6rem, 4.6vw, 5.5rem); }
.lead, .section-heading p { max-width: 710px; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.4rem); line-height: 1.65; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 26px; }
.button { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 20px; padding: 0 24px; border: 1px solid var(--ink); font-family: var(--mono); font-weight: 700; text-decoration: none; }
.button.primary { border-color: var(--accent); background: var(--accent); color: white; }
.button:hover { transform: translateY(-2px); }
.proof-line { padding-left: 18px; border-left: 4px solid var(--accent); font-family: var(--mono); font-weight: 700; }
.audience-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 34px; border: 1px solid var(--line); }
.audience-tabs button { min-height: 54px; border: 0; border-right: 1px solid var(--line); background: white; color: var(--muted); font: 600 .88rem var(--mono); cursor: pointer; }
.audience-tabs button:last-child { border-right: 0; }
.audience-tabs button[aria-selected="true"] { box-shadow: inset 0 -3px var(--accent); color: var(--accent); }
.evidence-console { padding: 14px; border: 1px solid #24313a; border-radius: 4px; background: var(--night); color: #eaf0f3; box-shadow: 0 24px 60px rgb(13 22 29 / 18%); font-family: var(--mono); }
.console-bar { display: flex; justify-content: space-between; padding: 7px 3px 17px; color: #aab7bf; font-size: .74rem; }
.console-step { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--night-line); }
.console-step.active strong { color: var(--accent); }
.console-step p { margin: 8px 0 0; color: #b9c3c9; line-height: 1.5; }
.step-number { width: 25px; height: 25px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #82919a; }
.console-arrow { padding: 7px 0; text-align: center; color: #82919a; }
.citation { border: 1px solid var(--night-line); }
.citation-head { display: flex; justify-content: space-between; gap: 16px; padding: 12px; border-bottom: 1px solid var(--night-line); font-size: .7rem; overflow: hidden; }
.citation-head strong { color: #59c8ef; }
.source-line { display: grid; grid-template-columns: 44px 1fr; align-items: center; min-height: 58px; }
.source-line span { text-align: center; color: #76868f; }
.source-line mark { padding: 8px 10px; background: #1c2a32; color: #eaf0f3; }
.evidence-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 2px 8px; }
.evidence-legend div { min-width: 0; }
.evidence-legend dt { margin-bottom: 7px; font-weight: 700; }
.evidence-legend dt::before { content: "■"; margin-right: 8px; color: #58c979; }
.evidence-legend div:nth-child(2) dt::before { color: #f3bf27; }
.evidence-legend div:nth-child(3) dt::before { color: #ed6075; }
.evidence-legend dd { margin: 0; color: #9cabb4; font-size: .7rem; line-height: 1.45; }
.evidence-id { margin: 16px 2px 4px; color: #82919a; font-size: .7rem; }
.section-cue { position: absolute; bottom: 28px; left: 50%; display: flex; flex-direction: column; gap: 8px; align-items: center; color: var(--muted); font: .82rem var(--mono); text-decoration: none; transform: translateX(-50%); }
.process { padding: 72px 0 0; }
.section-heading { margin-bottom: 60px; }
.process-rail { display: grid; grid-template-columns: 1fr .75fr 1fr; gap: 40px; align-items: center; padding-bottom: 88px; }
.process-rail h3 { font: 700 1.1rem var(--mono); }
.process-rail h3 span { margin-right: 8px; color: var(--accent); }
pre { margin: 0; white-space: pre-wrap; }
.process-rail pre, .question-block, .result-block { padding: 24px; border: 1px solid var(--line); color: #26313a; font: .82rem/1.65 var(--mono); }
.policy-flow { display: flex; flex-direction: column; align-items: stretch; gap: 0; font-family: var(--mono); text-align: center; }
.policy-flow span { padding: 18px; border: 1px solid var(--ink); background: white; }
.policy-flow i { width: 1px; height: 48px; margin: auto; background: var(--ink); }
.question-block { margin-bottom: 32px; }
.result-block { display: grid; gap: 10px; border-color: var(--accent); }
.result-block strong { color: var(--accent); }
.result-block code { overflow: hidden; text-overflow: ellipsis; }
.safety { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; padding: 68px max(32px, calc((100% - 1440px) / 2)); background: var(--night); color: white; }
.safety h2 { font-size: clamp(2rem, 2.5vw, 3rem); }
.safety-title a { display: inline-block; margin-top: 40px; color: var(--accent); font-family: var(--mono); }
.safety-points { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.safety-points div { padding: 12px 28px; border-left: 1px solid var(--night-line); }
.safety-points dt { min-height: 44px; font-weight: 750; }
.safety-points dd { margin: 14px 0 0; color: #aab7bf; line-height: 1.55; }
.install { padding: 76px 0 64px; }
.install-layout { display: grid; grid-template-columns: 1.5fr .7fr; gap: 80px; align-items: start; }
.install-layout > * { min-width: 0; }
.terminal { padding: 34px; border-radius: 4px; background: var(--night); color: #f1f5f7; font: .95rem/2 var(--mono); box-shadow: 0 24px 60px rgb(13 22 29 / 15%); }
.terminal span { color: var(--accent); }
.clients { padding-left: 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.tool-index h3 { font-family: var(--mono); }
.tool-index ul { margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.tool-index li { padding: 13px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.contribute { display: flex; justify-content: space-between; gap: 48px; align-items: center; padding: 54px max(32px, calc((100% - 1440px) / 2)); border-block: 1px solid var(--line); }
.contribute p { font-size: clamp(1.35rem, 2.2vw, 2.4rem); font-weight: 760; }
.contribute .actions { margin: 0; }
footer nav { font-size: .82rem; }

@media (max-width: 980px) {
  :root { --page: min(100% - 36px, 760px); }
  .menu-toggle { display: block; }
  .site-header nav { position: absolute; top: calc(100% + 1px); right: 0; z-index: 10; width: min(320px, 100%); display: none; align-items: stretch; flex-direction: column; gap: 0; border: 1px solid var(--line); background: white; box-shadow: 0 20px 40px rgb(13 22 29 / 12%); }
  .site-header nav[data-open="true"] { display: flex; }
  .site-header nav a { padding: 18px 20px; border-bottom: 1px solid var(--line); }
  .site-header nav a:last-child { border-bottom: 0; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .process-rail, .install-layout, .safety { grid-template-columns: 1fr; }
  .safety-points { grid-template-columns: repeat(2, 1fr); }
  .section-cue { display: none; }
}

@media (max-width: 620px) {
  :root { --page: calc(100% - 28px); }
  .site-header { min-height: 72px; }
  .wordmark { font-size: 1.4rem; }
  h1 { font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero { padding-top: 48px; gap: 48px; }
  .actions, .contribute { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .audience-tabs { grid-template-columns: 1fr; }
  .audience-tabs button { border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-legend, .safety-points { grid-template-columns: 1fr; }
  .citation-head { flex-direction: column; }
  .process { padding-top: 88px; }
  .process-rail { grid-template-columns: 1fr; }
  .safety { padding-block: 68px; }
  .safety-points div { border-left: 0; border-top: 1px solid var(--night-line); padding: 24px 0; }
  .terminal { padding: 22px; font-size: .72rem; overflow-x: auto; white-space: pre; }
  footer { align-items: flex-start; flex-direction: column; padding: 28px 0; }
  footer nav { position: static; width: auto; display: flex; flex-wrap: wrap; align-items: center; flex-direction: row; gap: 16px 24px; border: 0; box-shadow: none; }
  footer nav a { padding: 0; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
