:root {
  --field: #0B0C0B;
  --field-2: #101210;
  --surface: #141714;
  --surface-2: #1A1E19;
  --rule: #292E28;
  --rule-strong: #485244;
  --text: #E4E6DE;
  --muted: #A0A69A;
  --faint: #697267;
  --dim: #454D44;
  --accent: #B9D878;
  --accent-dim: rgba(185, 216, 120, 0.12);
  --amber: #D29B5D;
  --red: #C97878;
  --sans: "Avenir Next", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "SFMono-Regular", "Roboto Mono", "Liberation Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--field);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--field); }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  padding: 8px 12px; background: var(--text); color: var(--field);
  font-family: var(--mono); font-size: 0.75rem;
}
.skip:focus { left: 12px; }

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
.shell.narrow { max-width: 800px; }
main { min-height: 60vh; }
.section { padding: 72px 0; }
.section + .section { padding-top: 0; }

h1, h2, h3 {
  margin: 0 0 16px;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.08;
}
h1 { font-size: clamp(2.7rem, 5.6vw, 3.8rem); letter-spacing: -0.065em; line-height: 0.98; }
h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); }
h3 { font-size: 1rem; }
h1 em, h2 em { font-family: var(--serif); font-weight: 400; letter-spacing: -0.04em; }
p { margin: 0 0 1rem; color: var(--muted); }
.lede { max-width: 58ch; font-size: 1.04rem; line-height: 1.7; }
.small { color: var(--faint); font-size: 0.78rem; }
code, pre, .mono { font-family: var(--mono); }
code.inline {
  padding: 1px 5px; border: 1px solid var(--rule); border-radius: 2px;
  background: var(--surface-2); color: var(--text); font-size: 0.82em;
}
.eyebrow, .hero-label, .section-index {
  display: inline-block;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}
.eyebrow { margin-bottom: 14px; }
.eyebrow.warn { color: var(--amber); }

/* Shared masthead */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--rule);
  background: rgba(11, 12, 11, 0.94);
  backdrop-filter: blur(16px);
}
.nav-inner {
  width: min(1216px, calc(100% - 32px));
  min-height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand-mark {
  display: grid; place-items: center;
  width: 29px; height: 29px;
  border: 1px solid var(--rule-strong);
  color: var(--text);
  font-family: var(--mono); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.08em;
}
.brand-name { font-size: 0.93rem; letter-spacing: -0.03em; }
.brand-name strong { font-weight: 700; }
.brand-name span { font-weight: 400; color: var(--muted); }
.brand-version { color: var(--accent); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; }
.nav-links { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav-links a, .nav-source {
  padding: 5px 0; color: var(--faint); font-size: 0.78rem;
  text-decoration: none; transition: color 150ms var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"], .nav-source:hover { color: var(--text); }
.nav-end { display: flex; align-items: center; gap: 18px; }
.nav-source { color: var(--muted); }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--rule-strong); border-radius: 3px;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  text-decoration: none; transition: color 150ms var(--ease), background 150ms var(--ease), border-color 150ms var(--ease);
}
.btn-primary { border-color: var(--text); background: var(--text); color: var(--field); }
.btn-primary:hover { border-color: var(--accent); background: var(--accent); color: var(--field); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { border-color: var(--text); background: var(--surface); color: var(--text); }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 0.72rem; }
.text-link { color: var(--text); font-size: 0.8rem; text-decoration: none; }
.text-link:hover { color: var(--accent); }

/* Homepage frame and hero */
.home-frame {
  width: min(1392px, calc(100% - 48px));
  margin-inline: auto;
  border-inline: 1px solid var(--rule);
}
.home-shell {
  width: min(1168px, calc(100% - 64px));
  margin-inline: auto;
}
.home-hero { border-bottom: 1px solid var(--rule); }
.hero-topline {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 18px 0 16px; border-bottom: 1px solid var(--rule);
  color: var(--faint); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.11em;
}
.hero-layout {
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 56px; align-items: start; padding: 56px 0 48px;
}
.hero-copy { min-width: 0; padding-top: 24px; }
.hero-copy .hero-label { margin-bottom: 20px; color: var(--accent); }
.hero-copy h1 { max-width: 18ch; margin-bottom: 24px; }
.hero-copy .lede { margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 28px; }
.hero-install-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px 0 24px; border-top: 1px solid var(--rule); }
.hero-install-label { display: grid; gap: 5px; color: var(--faint); font-family: var(--mono); font-size: 0.61rem; letter-spacing: 0.09em; line-height: 1.4; text-transform: uppercase; }
.hero-install-label span:last-child { color: var(--dim); letter-spacing: 0.05em; }
.hero-command { min-width: 0; }
.hero-note { margin: 10px 0 0; color: var(--faint); font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.04em; }

/* Command and code specimens */
.command-spec, .run-specimen, .evidence-ledger, .artifact {
  border: 1px solid var(--rule); background: var(--field-2);
}
.command-spec { overflow: hidden; }
.spec-head, .specimen-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 38px; padding: 8px 12px; border-bottom: 1px solid var(--rule);
  color: var(--faint); font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.spec-line {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 9px 12px; overflow: hidden;
}
.spec-line .prompt, .command-bar .prompt { color: var(--faint); flex: 0 0 auto; }
.spec-line code { min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; color: var(--text); font-size: 0.75rem; }
.spec-line code::-webkit-scrollbar, .command-bar code::-webkit-scrollbar { display: none; }
.copy-btn {
  flex: 0 0 auto; padding: 3px 8px; border: 1px solid var(--rule-strong); border-radius: 2px;
  background: transparent; color: var(--faint); cursor: pointer; font-family: var(--mono); font-size: 0.62rem;
  text-transform: uppercase; transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.copy-btn:hover, .copy-btn:focus-visible { border-color: var(--accent); color: var(--accent); }

.command-bar {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 12px; overflow: hidden; border: 1px solid var(--rule); background: var(--field-2);
  font-family: var(--mono); font-size: 0.78rem;
}
.command-bar code { min-width: 0; flex: 1; overflow-x: auto; white-space: nowrap; color: var(--text); font-size: 0.75rem; scrollbar-width: none; }

/* Architecture figure */
.architecture-figure { min-width: 0; margin: 0; border: 1px solid var(--rule); background: var(--field-2); }
.architecture-figure figcaption, .figure-foot {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 12px 14px; color: var(--faint); font-family: var(--mono); font-size: 0.59rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.architecture-figure figcaption { border-bottom: 1px solid var(--rule); }
.architecture-figure .fig-status { color: var(--accent); }
.system-map { padding: 18px; }
.map-intake { display: grid; grid-template-columns: 1fr auto 1fr auto 1.15fr; gap: 7px; align-items: stretch; }
.map-node { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 10px; border: 1px solid var(--rule-strong); }
.map-node.map-context { border-color: var(--accent); }
.node-kicker, .map-rule-label, .map-control > span, .map-output > span {
  color: var(--faint); font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.map-node strong { font-size: 0.72rem; letter-spacing: -0.02em; }
.map-node code { overflow: hidden; color: var(--muted); font-size: 0.6rem; text-overflow: ellipsis; white-space: nowrap; }
.map-link { display: grid; place-items: center; color: var(--accent); font-family: var(--mono); font-size: 0.72rem; }
.map-rule-label { display: flex; justify-content: space-between; gap: 12px; padding: 20px 0 9px; border-bottom: 1px solid var(--rule); }
.map-rule-label span:last-child { color: var(--dim); letter-spacing: 0.04em; text-transform: none; }
.map-flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.map-step { position: relative; min-width: 0; min-height: 142px; padding: 12px 10px 14px; border-right: 1px solid var(--rule); }
.map-step:last-child { border-right: 0; }
.map-step:not(:last-child)::after { content: "->"; position: absolute; top: 60px; right: -12px; z-index: 1; padding: 0 3px; background: var(--field-2); color: var(--accent); font-family: var(--mono); font-size: 0.62rem; }
.map-step > span { display: block; margin-bottom: 18px; color: var(--faint); font-family: var(--mono); font-size: 0.58rem; }
.map-step strong { display: block; max-width: 10ch; min-height: 32px; color: var(--text); font-size: 0.68rem; line-height: 1.2; }
.map-step code { display: block; margin-top: 8px; overflow: hidden; color: var(--accent); font-size: 0.58rem; text-overflow: ellipsis; white-space: nowrap; }
.map-step small { display: block; margin-top: 5px; color: var(--faint); font-family: var(--mono); font-size: 0.55rem; line-height: 1.45; }
.map-step-active { border-top: 2px solid var(--accent); background: var(--accent-dim); }
.map-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.map-control { min-width: 0; padding: 14px 10px 15px; border-right: 1px solid var(--rule); }
.map-control:last-child { border-right: 0; }
.map-control code { display: block; margin-top: 7px; overflow: hidden; color: var(--text); font-size: 0.6rem; text-overflow: ellipsis; white-space: nowrap; }
.map-control small { display: block; margin-top: 4px; color: var(--faint); font-family: var(--mono); font-size: 0.55rem; line-height: 1.45; }
.map-output { display: flex; align-items: center; gap: 12px; padding-top: 15px; }
.map-output code { color: var(--accent); font-size: 0.62rem; }
.map-output .output-note { margin-left: auto; color: var(--accent); }
.figure-foot { border-top: 1px solid var(--rule); }
.figure-foot span:last-child { color: var(--dim); letter-spacing: 0.04em; text-transform: none; }
.hero-facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.hero-facts > div { min-width: 0; padding: 18px 16px 22px; border-right: 1px solid var(--rule); }
.hero-facts > div:last-child { border-right: 0; }
.hero-facts strong { display: block; margin-bottom: 5px; color: var(--text); font-family: var(--mono); font-size: 1.18rem; font-weight: 400; letter-spacing: -0.04em; }
.hero-facts span { display: block; color: var(--faint); font-family: var(--mono); font-size: 0.59rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* Homepage information sections */
.home-section { border-bottom: 1px solid var(--rule); padding: 88px 0; }
.section-intro { display: grid; grid-template-columns: 190px minmax(0, 700px); gap: 42px; margin-bottom: 46px; }
.section-intro h2 { margin-bottom: 12px; }
.section-intro p { max-width: 64ch; margin-bottom: 0; }
.section-index { padding-top: 8px; }
.control-ledger, .safety-ledger, .inventory-list { border-top: 1px solid var(--rule); }
.control-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 230px; gap: 24px; align-items: start; padding: 21px 0; border-bottom: 1px solid var(--rule); }
.row-index { color: var(--accent); font-family: var(--mono); font-size: 0.65rem; padding-top: 4px; }
.control-row h3 { margin-bottom: 5px; font-size: 1rem; }
.control-row p { max-width: 57ch; margin-bottom: 0; font-size: 0.88rem; }
.control-row code { justify-self: end; padding-top: 4px; color: var(--faint); font-size: 0.64rem; text-align: right; }

.specimen-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 18px; }
.run-specimen, .evidence-ledger { min-width: 0; }
.run-specimen pre { min-height: 274px; margin: 0; padding: 18px; overflow-x: auto; color: var(--text); font-size: 0.72rem; line-height: 1.75; white-space: pre; }
.code-muted { color: var(--faint); }
.evidence-ledger dl { margin: 0; padding: 8px 16px 0; }
.evidence-ledger dl > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.evidence-ledger dt { color: var(--faint); font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; }
.evidence-ledger dd { min-width: 0; margin: 0; color: var(--muted); font-size: 0.76rem; }
.evidence-ledger dd code { overflow-wrap: anywhere; color: var(--text); font-size: 0.66rem; }
.ledger-note { margin: 18px 16px 20px; color: var(--faint); font-size: 0.78rem; }

.safety-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 220px; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.safety-row strong { color: var(--text); font-family: var(--mono); font-size: 0.72rem; font-weight: 400; }
.safety-row > span { color: var(--muted); font-size: 0.86rem; }
.safety-row > span:last-child { color: var(--faint); font-family: var(--mono); font-size: 0.62rem; text-align: right; }
.safety-row-warn strong { color: var(--amber); }
.safety-row-danger strong { color: var(--red); }
.safety-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.safety-notes p { margin: 0; font-size: 0.78rem; }
.safety-notes strong { color: var(--text); font-weight: 600; }

.inventory-list > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--rule); }
.inventory-list span { color: var(--faint); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; }
.inventory-list p { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; line-height: 1.7; }
.inventory-section .text-link { display: inline-block; margin-top: 20px; }
.home-close { padding: 96px 0 104px; }
.home-close h2 { max-width: 18ch; margin: 18px 0 14px; font-size: clamp(2rem, 4vw, 3.5rem); }
.home-close p { max-width: 54ch; }
.close-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 26px; }

/* Shared documentation components */
.terminal { border: 1px solid var(--rule); border-radius: 2px; background: var(--field-2); overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.terminal-bar .dot { width: 7px; height: 7px; border: 1px solid var(--faint); border-radius: 50%; background: transparent; }
.dot-r, .dot-y, .dot-g { background: transparent; }
.terminal-bar .title { margin-left: 7px; color: var(--faint); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; }
.terminal-body { padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 0.74rem; line-height: 1.75; }
.terminal-body .line { white-space: nowrap; }
.terminal-body .prompt { margin-right: 6px; color: var(--faint); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .output, .terminal-body .dim { color: var(--faint); }
.terminal-body .success { color: var(--accent); }

.chip { display: inline-block; padding: 3px 7px; border: 1px solid var(--rule-strong); border-radius: 2px; color: var(--muted); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.04em; }
.chip.neon { color: var(--muted); }
.chip.amber { color: var(--amber); border-color: rgba(210, 155, 93, 0.45); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0 24px; border-top: 1px solid var(--rule); }
.card { padding: 20px 0; border-bottom: 1px solid var(--rule); background: transparent; }
.card:hover { background: transparent; }
.card .card-num { display: block; margin-bottom: 12px; color: var(--faint); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; }
.card h3 { margin-bottom: 7px; font-size: 1rem; }
.card p { margin: 0; font-size: 0.84rem; }
.card .card-icon { display: none; }
.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-block: 1px solid var(--rule); }
.stat { padding: 22px 16px; border-right: 1px solid var(--rule); text-align: left; }
.stat:last-child { border-right: 0; }
.stat .num { display: block; color: var(--text); font-family: var(--mono); font-size: 1.8rem; font-weight: 400; line-height: 1; }
.stat .label { display: block; margin-top: 8px; color: var(--faint); font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; }
.stat .sub { display: block; margin-top: 3px; color: var(--dim); font-family: var(--mono); font-size: 0.6rem; }
.two-col { display: grid; gap: 28px; }
.artifact { margin: 0 0 16px; padding: 16px; overflow-x: auto; }
.artifact pre { margin: 0; color: var(--muted); font-size: 0.74rem; line-height: 1.7; }
.artifact .hl-green { color: var(--accent); }
.artifact .hl-amber { color: var(--amber); }
.artifact .hl-red { color: var(--red); }
.artifact .hl-dim { color: var(--faint); }
.callout { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--rule); font-size: 0.84rem; }
.callout-warn { border-color: rgba(210, 155, 93, 0.45); }
.callout-warn strong { color: var(--amber); }
.callout-info { background: var(--surface); }
.callout-danger { border-color: rgba(201, 120, 120, 0.45); }
.callout-danger strong { color: var(--red); }
.table-scroll { margin: 0 0 16px; overflow-x: auto; border-block: 1px solid var(--rule); }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { color: var(--faint); font-family: var(--mono); font-size: 0.62rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
details.acc { margin-bottom: 0; border-top: 1px solid var(--rule); }
details.acc:last-child { border-bottom: 1px solid var(--rule); }
details.acc[open] { background: var(--surface); }
details.acc > summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; font-size: 0.9rem; font-weight: 600; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc .chev { color: var(--faint); }
details.acc[open] .chev { color: var(--accent); }
details.acc .acc-body { padding: 0 0 16px; font-size: 0.84rem; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; border-top: 1px solid var(--rule); }
.skill-card { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.skill-card:hover { border-color: var(--rule); }
.skill-card .skill-num { color: var(--faint); font-family: var(--mono); font-size: 0.6rem; }
.skill-card h3 { margin: 4px 0; font-size: 0.86rem; }
.skill-card h3 code { color: var(--text); }
.skill-card p { margin: 0; color: var(--faint); font-size: 0.76rem; }
.timeline { margin: 0; padding: 0 0 0 20px; border-left: 1px solid var(--rule); list-style: none; }
.timeline li { position: relative; margin-bottom: 14px; padding-left: 8px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 8px; width: 7px; height: 7px; border: 1px solid var(--rule-strong); background: var(--field); }
.timeline li:hover::before { border-color: var(--accent); background: var(--accent); }

/* Mobile navigation and responsive layout */
.nav-mobile { display: none; }
footer.site { border-top: 1px solid var(--rule); background: var(--field-2); }
.footer-inner { width: min(1216px, calc(100% - 32px)); min-height: 68px; margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 18px; color: var(--faint); font-family: var(--mono); font-size: 0.62rem; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--accent); }

@media (min-width: 900px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .home-frame { width: min(100% - 32px, 1120px); }
  .home-shell { width: min(100% - 48px, 1000px); }
  .hero-layout { gap: 34px; }
  .map-step { padding-inline: 7px; }
  .map-step strong { font-size: 0.62rem; }
}
@media (max-width: 860px) {
  .nav-links { gap: 12px; }
  .nav-source { display: none; }
  .hero-layout { grid-template-columns: 1fr; gap: 38px; }
  .hero-copy { padding-top: 28px; }
  .hero-copy h1 { max-width: 18ch; }
  .architecture-figure { max-width: 760px; }
  .section-intro { grid-template-columns: 150px minmax(0, 1fr); gap: 28px; }
  .control-row { grid-template-columns: 44px minmax(0, 1fr); }
  .control-row code { grid-column: 2; justify-self: start; padding-top: 0; text-align: left; }
  .safety-row { grid-template-columns: 150px minmax(0, 1fr); gap: 16px; }
  .safety-row > span:last-child { grid-column: 2; text-align: left; }
}
@media (max-width: 680px) {
  .nav-inner { min-height: 64px; }
  .nav-links, .nav-end { display: none; }
  .nav-mobile { display: block; margin-left: auto; }
  .nav-mobile summary { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule-strong); color: var(--muted); cursor: pointer; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; list-style: none; text-transform: uppercase; }
  .nav-mobile summary::-webkit-details-marker { display: none; }
  .menu-lines { color: var(--accent); letter-spacing: -0.12em; }
  .menu-panel { position: absolute; top: 64px; left: 16px; right: 16px; z-index: 60; border: 1px solid var(--rule); background: var(--field-2); }
  .menu-panel a { display: block; padding: 12px 14px; border-bottom: 1px solid var(--rule); color: var(--muted); font-family: var(--mono); font-size: 0.7rem; text-decoration: none; }
  .menu-panel a:last-child { border-bottom: 0; }
  .menu-panel a:hover { background: var(--surface); color: var(--text); }
  .home-frame { width: calc(100% - 14px); }
  .home-shell { width: calc(100% - 32px); }
  .hero-topline { align-items: flex-start; flex-direction: column; gap: 6px; padding-block: 14px; }
  .hero-layout { padding-block: 34px 30px; }
  .hero-copy { padding-top: 0; }
  .hero-copy h1 { max-width: 18ch; font-size: clamp(2.55rem, 12vw, 3.6rem); }
  .hero-copy .lede { font-size: 0.98rem; }
  .hero-actions { gap: 14px; margin-bottom: 24px; }
  .hero-install-row { grid-template-columns: 1fr; gap: 10px; padding-top: 16px; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .hero-facts > div:nth-child(2) { border-right: 0; }
  .hero-facts > div:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
  .architecture-figure figcaption, .figure-foot { align-items: flex-start; flex-direction: column; gap: 5px; }
  .system-map { padding: 12px; }
  .map-intake { grid-template-columns: 1fr; gap: 5px; }
  .map-link { min-height: 20px; transform: rotate(90deg); }
  .map-rule-label { align-items: flex-start; flex-direction: column; gap: 5px; padding-top: 16px; }
  .map-flow { grid-template-columns: 1fr; }
  .map-step, .map-step:last-child { min-height: 0; padding: 13px 10px 15px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .map-step:last-child { border-bottom: 0; }
  .map-step:not(:last-child)::after { top: auto; right: 10px; bottom: -10px; }
  .map-step > span { display: inline-block; margin: 0 10px 0 0; }
  .map-step strong { display: inline-block; min-height: 0; max-width: none; }
  .map-step code { margin-top: 7px; }
  .map-controls { grid-template-columns: 1fr; }
  .map-control, .map-control:last-child { border-right: 0; border-bottom: 1px solid var(--rule); }
  .map-control:last-child { border-bottom: 0; }
  .map-output { align-items: flex-start; flex-wrap: wrap; }
  .map-output .output-note { margin-left: 0; }
  .section { padding: 52px 0; }
  .home-section { padding: 58px 0; }
  .section-intro { display: block; margin-bottom: 32px; }
  .section-index { margin-bottom: 16px; }
  .section-intro h2 { font-size: 1.85rem; }
  .control-row, .safety-row, .inventory-list > div { display: block; }
  .row-index { display: block; margin-bottom: 9px; }
  .control-row code { display: block; margin-top: 11px; }
  .safety-row strong, .safety-row > span { display: block; }
  .safety-row > span:last-child { margin-top: 6px; }
  .safety-notes, .specimen-grid { grid-template-columns: 1fr; gap: 16px; }
  .safety-notes { gap: 14px; }
  .inventory-list p { margin-top: 7px; }
  .home-close { padding: 68px 0 76px; }
  .home-close h2 { font-size: 2.25rem; }
  .footer-inner { min-height: 84px; flex-direction: column; justify-content: center; align-items: flex-start; }
  .cards, .skill-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
