/* Collective documentation site.
   Direction: civic wayfinding. Highway-sign green bands, a metro-map rail
   (page groups are lines, pages are stations), Big Shoulders for signage,
   Overpass for reading and Overpass Mono for code.

   Colour roles (shared with scripts/site/figures.py):
     --sign    masthead, links, source and registry
     lines     --l-system (green), --l-devices (blue), --l-use (teal), --l-ref (graphite)
     figures   NixOS blue, WSL/Windows violet, macOS graphite, Android orange,
               builds and caches amber, secrets and auth red, agents teal          */

@font-face { font-family: "Big Shoulders"; src: url("fonts/bigshoulders.woff2") format("woff2"); font-weight: 500 900; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("fonts/overpass.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("fonts/overpass-italic.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Overpass Mono"; src: url("fonts/overpass-mono.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --paper: #f2f0e9;
  --card: #fbfaf6;
  --ink: #191c1a;
  --ink-2: #474c48;
  --ink-3: #6a706b;
  --rule: #d5d2c6;
  --rule-2: #e4e1d7;
  --sign: #0b6140;
  --sign-2: #08482f;
  --sign-ink: #f7f6ef;
  --amber: #f2b632;
  --l-system: #11734b;
  --l-devices: #2457b5;
  --l-use: #0e7a80;
  --l-ref: #5d636b;
  --nixos: #2457b5;
  --win: #6b4bb3;
  --mac: #5d636b;
  --droid: #cf5a14;
  --build: #b97800;
  --build-fill: #ffd977;
  --secret: #b42318;
  --agent: #0e7a80;
  --code-bg: #16201b;
  --code-ink: #e8e5d8;
  --code-dim: #8f9a92;
  --code-p: #8fe0b2;
  --code-k: #a8c8ff;
  --code-s: #f3c96c;
  --code-y: #ff9a7a;
  --line: var(--l-system);
  --display: "Big Shoulders", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Overpass", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Overpass Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --measure: 46rem;
  --rail: 15.5rem;
}
body[data-line="devices"] { --line: var(--l-devices); }
body[data-line="use"] { --line: var(--l-use); }
body[data-line="ref"] { --line: var(--l-ref); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.62 var(--body);
  font-feature-settings: "kern", "liga";
}
a { color: var(--sign); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--sign-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 2px; }
strong, b { font-weight: 700; }
code, kbd, samp { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code { background: var(--rule-2); border-radius: 3px; padding: 0.05em 0.3em; color: var(--ink); overflow-wrap: anywhere; }
a > code { color: inherit; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--amber); color: var(--ink); padding: 0.5rem 0.8rem; z-index: 10; font-weight: 700; }
.skip:focus { left: 0.5rem; }

/* ------------------------------------------------------------- masthead */
.band { background: var(--sign); color: var(--sign-ink); border-bottom: 4px solid var(--sign-2); }
.band-in { display: flex; align-items: center; gap: 1.5rem; padding: 0.85rem 2rem; max-width: 92rem; }
.brand {
  display: inline-flex; align-items: baseline; gap: 0.6rem; color: var(--sign-ink); text-decoration: none;
  border: 2px solid rgba(247, 246, 239, 0.85); border-radius: 7px; padding: 0.15rem 0.7rem 0.05rem;
}
.brand:hover { color: #fff; }
.brand b { font: 800 1.65rem/1.1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.brand small { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.02em; opacity: 0.85; }
.band .tag { margin-left: auto; font: 500 0.8rem/1.2 var(--mono); color: rgba(247, 246, 239, 0.82); letter-spacing: 0.02em; }
.band .tag b { color: #ffd36b; font-weight: 700; }

/* ------------------------------------------------------------- page grid */
.page { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 3.5rem; max-width: 92rem; padding: 0 2rem; }
main { min-width: 0; max-width: 60rem; padding: 3rem 0 5rem; }
main > * { max-width: var(--measure); }
main > figure.fig, main > .wide, main > .table.wide { max-width: 60rem; }

/* ------------------------------------------------------------- metro rail */
.map { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 2.4rem 0 3rem; scrollbar-width: thin; }
.map details > summary { display: none; }
.map .line { --c: var(--l-system); margin: 0 0 1.4rem; }
.map .line[data-line="devices"] { --c: var(--l-devices); }
.map .line[data-line="use"] { --c: var(--l-use); }
.map .line[data-line="ref"] { --c: var(--l-ref); }
.map .line > span {
  display: inline-block; font: 800 0.82rem/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: var(--c); padding: 0.32rem 0.55rem 0.24rem; border-radius: 4px; margin-left: 0.15rem;
}
.map ol { list-style: none; margin: 0; padding: 0.35rem 0 0.2rem; position: relative; }
.map .line > ol::before { content: ""; position: absolute; left: 0.62rem; top: 0; bottom: 0.9rem; width: 5px; background: var(--c); border-radius: 3px; }
.map .line > ol > li { position: relative; padding: 0.22rem 0 0.22rem 2rem; }
.map .line > ol > li::before {
  content: ""; position: absolute; left: 0.32rem; top: 0.52rem; width: 0.82rem; height: 0.82rem; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--c);
}
.map a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.97rem; }
.map a:hover { color: var(--c); }
.map a[aria-current="page"] { color: var(--c); font-weight: 800; }
.map li.here::before { background: var(--c) !important; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--c); }
.map .stops { padding: 0.25rem 0 0.35rem; margin-left: 0.05rem; border-left: 2px dotted var(--c); }
.map .stops li { padding: 0.08rem 0 0.08rem 0.9rem; position: relative; line-height: 1.35; }
.map .stops li::before { content: ""; position: absolute; left: -0.3rem; top: 0.5rem; width: 0.48rem; height: 0.48rem; border-radius: 50%; background: var(--paper); border: 2px solid var(--c); }
.map .stops a { font-weight: 500; font-size: 0.86rem; color: var(--ink-2); }
.map .stops a.on { color: var(--ink); font-weight: 700; }
.map .stops li.on::before { background: var(--c); }

/* ------------------------------------------------------------- headings */
h1, h2 { font-family: var(--display); color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: 0.95; letter-spacing: 0.005em; margin: 0.2rem 0 1.2rem; text-wrap: balance; }
.kicker { display: inline-flex; align-items: center; gap: 0.5rem; font: 800 0.86rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); margin: 0 0 0.6rem; }
.kicker::before { content: ""; width: 1.6rem; height: 5px; background: var(--line); border-radius: 3px; }
h2 {
  position: relative; font-weight: 800; font-size: 2.05rem; line-height: 1.02; letter-spacing: 0.02em; text-transform: uppercase;
  margin: 4.2rem 0 1rem; padding-left: 2.15rem; text-wrap: balance;
}
h2::before {
  content: ""; position: absolute; left: 0; top: 0.12em; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  border: 4px solid var(--line); background: var(--paper);
}
h2::after { content: ""; position: absolute; left: 0.45rem; top: calc(0.12em + 1.3rem); width: 4px; height: 0.9rem; background: var(--line); border-radius: 2px; opacity: 0.45; }
h3 { font: 700 1.2rem/1.3 var(--body); margin: 2.4rem 0 0.6rem; letter-spacing: -0.005em; }
h4 { font: 700 1rem/1.35 var(--body); margin: 1.6rem 0 0.4rem; }
h2 + h3 { margin-top: 1.2rem; }
p, ul, ol, dl { margin: 0 0 1.05rem; }
ul, ol { padding-left: 1.3rem; }
li { margin: 0.25rem 0; }
li::marker { color: var(--ink-3); }
.lede { font-size: 1.28rem; line-height: 1.5; color: var(--ink-2); font-weight: 400; margin-bottom: 1.6rem; max-width: 42rem; }
.lede strong { color: var(--ink); }
dl.defs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.45rem 1.4rem; }
dl.defs dt { font-weight: 700; }
dl.defs dd { margin: 0; color: var(--ink-2); }

/* ------------------------------------------------------------- code */
pre {
  position: relative; margin: 1.2rem 0 1.5rem; background: var(--code-bg); color: var(--code-ink);
  border-radius: 6px; padding: 1rem 1.15rem; overflow-x: auto; font: 400 0.86rem/1.6 var(--mono);
  scrollbar-width: thin; scrollbar-color: #4d5a52 transparent; tab-size: 2;
}
pre code { font: inherit; background: none; padding: 0; color: inherit; white-space: pre-wrap; overflow-wrap: break-word; }
pre .ln { display: block; padding-left: 2ch; text-indent: -2ch; }
pre .p { color: #fff; }
pre .p::before { content: "$ "; color: var(--code-p); font-weight: 700; }
pre .o { color: var(--code-ink); }
pre .c { color: var(--code-dim); font-style: italic; }
pre .k { color: var(--code-k); }
pre .s { color: var(--code-s); }
pre .y { color: var(--code-y); }
pre .g { color: var(--code-p); }
pre var { font-style: normal; color: var(--code-s); }
pre.light { background: var(--card); color: var(--ink); border: 1px solid var(--rule); }
pre.light .c { color: var(--ink-3); }
pre.light .k { color: var(--nixos); }
pre.light .s { color: #8a5a00; }
pre.light .g { color: var(--sign); }
pre.light var { color: #7a4e00; font-style: italic; }
pre[data-label] { padding-top: 2.1rem; }
pre[data-label]::before {
  content: attr(data-label); position: absolute; top: 0.6rem; left: 1.15rem; font: 800 0.72rem/1 var(--display);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--code-p);
}
pre.light[data-label]::before { color: var(--line); }
.only-narrow { display: none; }
code.nb { white-space: nowrap; }
figure:has(.fig-scroll[data-scroll-more]) figcaption::before { content: "Scroll sideways · "; font-weight: 700; color: var(--ink); }
.fig-scroll[data-scroll-more], .table[data-scroll-more], pre[data-scroll-more] { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); }

/* ------------------------------------------------------------- tables */
.table { overflow-x: auto; margin: 1.2rem 0 1.6rem; scrollbar-width: thin; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; line-height: 1.45; }
th { text-align: left; font: 700 0.76rem/1.2 var(--body); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-2); padding: 0.55rem 0.8rem 0.45rem 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
td { padding: 0.6rem 0.8rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
td:first-child { font-weight: 600; }
td code { white-space: nowrap; }
td.wrap code, td .wrap { white-space: normal; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- notes */
.note, .warn {
  position: relative; margin: 1.6rem 0; padding: 0.9rem 1.1rem 0.9rem 1.2rem; background: var(--card);
  border: 1px solid var(--rule); border-left: 6px solid var(--line); border-radius: 0 6px 6px 0;
}
.warn { border-left-color: var(--secret); }
.note > :last-child, .warn > :last-child { margin-bottom: 0; }
.note b:first-child, .warn b:first-child { font: 800 0.8rem/1 var(--display); letter-spacing: 0.13em; text-transform: uppercase; margin-right: 0.45rem; color: var(--line); }
.warn b:first-child { color: var(--secret); }

/* ------------------------------------------------------------- steps on a line */
ol.steps { list-style: none; counter-reset: st; padding: 0; margin: 1.6rem 0 2rem; position: relative; }
ol.steps::before { content: ""; position: absolute; left: 0.9rem; top: 0.8rem; bottom: 1rem; width: 4px; background: var(--line); border-radius: 2px; opacity: 0.85; }
ol.steps > li { counter-increment: st; position: relative; padding: 0 0 0.9rem 3.2rem; margin: 0; }
ol.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 2.05rem; height: 2.05rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); border: 4px solid var(--line);
  font: 800 1rem/1 var(--display); color: var(--ink);
}
ol.steps > li > h3, ol.steps > li > h4 { margin: 0.25rem 0 0.35rem; font-size: 1.06rem; }
ol.steps > li > p:last-child { margin-bottom: 0.4rem; }

/* ------------------------------------------------------------- figures */
figure.fig { margin: 2rem 0 2.4rem; }
.fig-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 1.2rem 1.2rem 1rem; scrollbar-width: thin; }
.fig-scroll svg { display: block; width: 100%; height: auto; min-width: 640px; }
figcaption { margin-top: 0.7rem; font-size: 0.93rem; line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }
figcaption b { color: var(--ink); margin-right: 0.35rem; }

svg.f { font-family: var(--body); }
svg.f .f-t { font: 700 15px var(--body); fill: var(--ink); }
svg.f .f-t-sm { font-size: 13.5px; }
svg.f .f-d { font: 800 17px var(--display); letter-spacing: 0.06em; text-transform: uppercase; fill: var(--ink); }
svg.f .f-s { font: 400 13px var(--body); fill: var(--ink-2); }
svg.f .f-xs { font: 600 11.5px var(--body); fill: var(--ink-3); letter-spacing: 0.02em; }
svg.f .f-m { font: 500 12.5px var(--mono); fill: var(--ink); }
svg.f .f-white { fill: #fff; }
svg.f .f-on { fill: #f2efe4; }
svg.f .f-box { fill: var(--card); stroke: var(--ink); stroke-width: 1.4; }
svg.f .f-plain { fill: var(--card); stroke: var(--rule); stroke-width: 1.4; }
svg.f .f-ink { fill: var(--ink); }
svg.f .f-sign { fill: var(--sign); }
svg.f .f-build { fill: var(--build-fill); stroke: var(--build); stroke-width: 1.6; }
svg.f .f-line { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
svg.f .f-wire { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg.f .f-dash { stroke-dasharray: 5 5; }
svg.f .f-station { fill: #fff; stroke: var(--ink); stroke-width: 3; }
svg.f .f-hub { fill: #fff; stroke: var(--ink); stroke-width: 3.5; }
svg.f .f-labbg { fill: var(--card); }
svg.f .c-sign { stroke: var(--sign); } svg.f .t-sign { fill: var(--sign); } svg.f .b-sign { fill: #e3efe8; stroke: var(--sign); stroke-width: 1.6; }
svg.f .c-nixos { stroke: var(--nixos); } svg.f .t-nixos { fill: var(--nixos); } svg.f .b-nixos { fill: #e6edfa; stroke: var(--nixos); stroke-width: 1.6; }
svg.f .c-win { stroke: var(--win); } svg.f .t-win { fill: var(--win); } svg.f .b-win { fill: #eee8f8; stroke: var(--win); stroke-width: 1.6; }
svg.f .c-mac { stroke: var(--mac); } svg.f .t-mac { fill: var(--mac); } svg.f .b-mac { fill: #ebecee; stroke: var(--mac); stroke-width: 1.6; }
svg.f .c-droid { stroke: var(--droid); } svg.f .t-droid { fill: var(--droid); } svg.f .b-droid { fill: #fbe9dd; stroke: var(--droid); stroke-width: 1.6; }
svg.f .c-build { stroke: var(--build); } svg.f .t-build { fill: #8a5a00; } svg.f .b-build { fill: #fff3cf; stroke: var(--build); stroke-width: 1.6; }
svg.f .c-secret { stroke: var(--secret); } svg.f .t-secret { fill: var(--secret); } svg.f .b-secret { fill: #fbe5e2; stroke: var(--secret); stroke-width: 1.6; }
svg.f .c-agent { stroke: var(--agent); } svg.f .t-agent { fill: var(--agent); } svg.f .b-agent { fill: #e0f1f1; stroke: var(--agent); stroke-width: 1.6; }
svg.f .b-plain { fill: var(--card); stroke: var(--ink); stroke-width: 1.4; }
svg.f .c-ink { stroke: var(--ink); } svg.f .t-ink { fill: var(--ink); } svg.f .b-ink { fill: var(--ink); stroke: var(--ink); stroke-width: 1.6; }
svg.f .c-muted { stroke: var(--ink-3); } svg.f .t-muted { fill: var(--ink-3); } svg.f .b-muted { fill: var(--rule-2); stroke: var(--ink-3); stroke-width: 1.4; }
svg.f .m-sign { fill: var(--sign); } svg.f .m-nixos { fill: var(--nixos); } svg.f .m-win { fill: var(--win); } svg.f .m-mac { fill: var(--mac); }
svg.f .m-droid { fill: var(--droid); } svg.f .m-build { fill: var(--build); } svg.f .m-secret { fill: var(--secret); } svg.f .m-agent { fill: var(--agent); }
svg.f .m-ink { fill: var(--ink); } svg.f .m-muted { fill: var(--ink-3); }

/* ------------------------------------------------------------- home */
body.home .page { grid-template-columns: var(--rail) minmax(0, 1fr); }
.hero-h1 { font-size: clamp(3rem, 7vw, 6rem); max-width: 14ch; margin-bottom: 1.4rem; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 2.2rem 0 1rem; border-top: 3px solid var(--ink); max-width: 60rem; }
.facts p { margin: 0; padding: 0.9rem 1rem 0.2rem 0; }
.facts p + p { padding-left: 1rem; border-left: 1px solid var(--rule); }
.facts b { display: block; font: 800 3rem/0.95 var(--display); letter-spacing: 0.01em; }
.facts span { display: block; margin-top: 0.35rem; font-size: 0.9rem; line-height: 1.35; color: var(--ink-2); }
.routes { list-style: none; padding: 0; margin: 1.4rem 0 2rem; border-top: 1px solid var(--rule); max-width: 60rem; }
.routes li { margin: 0; border-bottom: 1px solid var(--rule); }
.routes a { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.2rem; align-items: baseline; padding: 0.85rem 0.2rem; color: var(--ink); text-decoration: none; }
.routes a:hover { background: var(--card); }
.routes b { font: 800 1.35rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; display: flex; align-items: center; gap: 0.6rem; }
.routes b::before { content: ""; width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 3.5px solid var(--c, var(--l-system)); background: var(--paper); flex: none; }
.routes span { color: var(--ink-2); font-size: 0.98rem; line-height: 1.45; }
.routes [data-line="devices"] { --c: var(--l-devices); }
.routes [data-line="use"] { --c: var(--l-use); }
.routes [data-line="ref"] { --c: var(--l-ref); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.chips li { margin: 0; font: 700 0.8rem/1 var(--body); padding: 0.38rem 0.6rem 0.3rem; border-radius: 4px; color: #fff; background: var(--c, var(--ink)); letter-spacing: 0.02em; }

/* ------------------------------------------------------------- cli reference */
.cmd { margin: 0 0 2.2rem; }
.cmd h3 { margin: 2rem 0 0.35rem; font-size: 1.12rem; }
.cmd h3 code { background: none; padding: 0; font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.cmd > p { margin-bottom: 0.5rem; color: var(--ink-2); }
pre.usage { margin: 0.5rem 0 0.8rem; padding: 0.6rem 0.9rem; }
pre.usage .u { white-space: nowrap; }
pre.notes { margin-top: 0; font-size: 0.82rem; }
table.opts td:first-child { font-weight: 400; }
table.opts td:nth-child(2) { color: var(--ink-2); white-space: nowrap; font-family: var(--mono); font-size: 0.82rem; }
table.opts td:nth-child(3) { min-width: 16rem; }
.cmd-group { margin: 1.4rem 0 0; color: var(--ink-2); }
.cmd-group code { font-weight: 700; }

/* ------------------------------------------------------------- footer */
.foot { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; padding: 1.4rem 2rem 2rem; border-top: 4px solid var(--sign); background: var(--card); color: var(--ink-2); font-size: 0.86rem; }
.foot a { color: var(--ink-2); }

/* ------------------------------------------------------------- redirects, 404 */
.moved { max-width: 40rem; padding: 4rem 0; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  :root { --rail: 13.5rem; }
  .page { gap: 2.5rem; }
}
@media (max-width: 920px) {
  .page { display: block; padding: 0 1.25rem; }
  .map { position: static; max-height: none; padding: 1rem 0 0; overflow: visible; }
  .map details { border: 1px solid var(--rule); border-radius: 6px; background: var(--card); }
  .map details > summary {
    display: flex; align-items: center; gap: 0.6rem; cursor: pointer; padding: 0.7rem 0.9rem; list-style: none;
    font: 800 0.95rem/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  }
  .map details > summary::-webkit-details-marker { display: none; }
  .map details > summary::before { content: ""; width: 1.2rem; height: 5px; border-radius: 3px; background: var(--line); }
  .map details > summary::after { content: "+"; margin-left: auto; font-size: 1.2rem; }
  .map details[open] > summary::after { content: "−"; }
  .map details > div { padding: 0.4rem 0.9rem 0.2rem; }
  .map .stops { display: none; }
  main { padding-top: 1.8rem; }
  .band-in { padding: 0.75rem 1.25rem; }
  .band .tag { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts p:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts p:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  h2 { font-size: 1.7rem; margin-top: 3.2rem; }
  .lede { font-size: 1.14rem; }
  pre { margin-left: -1.25rem; margin-right: -1.25rem; border-radius: 0; font-size: 0.82rem; }
  .fig-scroll { margin: 0 -1.25rem; border-radius: 0; border-left: 0; border-right: 0; padding: 0.8rem; }
  .routes a { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  dl.defs { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  dl.defs dd { margin-bottom: 0.9rem; }
  .only-wide { display: none; }
  .only-narrow { display: block; }
  .only-narrow svg { min-width: 0; }
  .facts b { font-size: 2.4rem; }
  ol.steps > li { padding-left: 2.8rem; }
  .foot { flex-direction: column; padding: 1.2rem 1.25rem 1.6rem; }
  .table table:has(th:nth-child(3)) { min-width: 34rem; }
  td code, td code.nb { white-space: normal; overflow-wrap: anywhere; }
  .table table.opts { min-width: 36rem; }
}

/* ------------------------------------------------------------- print */
@media print {
  .band, .map, .skip, .foot { display: none !important; }
  .page { display: block; padding: 0; }
  body { background: #fff; font-size: 10.5pt; }
  main { padding: 0; max-width: none; }
  pre, pre.light { background: #fff !important; color: #000 !important; border: 1px solid #999; white-space: pre-wrap; -webkit-mask-image: none !important; mask-image: none !important; }
  pre .p, pre .o, pre .c, pre .k, pre .s, pre .y, pre .g, pre var, pre .p::before, pre[data-label]::before { color: #000 !important; }
  .fig-scroll { border: 0; padding: 0; overflow: visible; }
  .fig-scroll svg { min-width: 0; }
  h2 { break-after: avoid; }
  figure, pre, table { break-inside: avoid; }
  a { color: #000; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
