/* CabrOS / Pico · MIT. No imports, remote fonts, scripts or build step.
   Personalize the tokens below. See README.md for light/dark and layout guidance. */
:root {
    color-scheme: light dark;
    --paper: #fff; --ink: #161616; --muted: #595959;
    --line: #a3a3a3; --surface: #f5f5f5; --focus: #161616;
    --font: Arial, Helvetica, sans-serif;
    --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
    --text: 1.0625rem; --small: .75rem;
    --title: clamp(2.5rem, 4.6vw, 4.5rem);
    --display: clamp(3.3rem, 7.3vw, 7.5rem);
    --space-1: .5rem; --space-2: 1rem; --space-3: 1.5rem;
    --space-4: 2rem; --space-6: 3rem; --space-8: 4rem;
    --rule: 1px solid var(--line); --reading: 68ch;
    --site: 88rem; --rail: 15rem; --gutter: clamp(1.25rem, 4vw, 4rem);
    --gap: clamp(2rem, 5vw, 5.5rem);
    font-family: var(--font); font-size: 100%; line-height: 1.7;
    background: var(--paper); color: var(--ink);
}
@media (prefers-color-scheme: dark) {
    :root {
        --paper: #161616; --ink: #f5f5f5; --muted: #b5b5b5;
        --line: #737373; --surface: #222; --focus: #fff;
    }
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--paper); }
.site { max-width: var(--site); margin-inline: auto; padding-inline: var(--gutter); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; border-bottom: 2px solid var(--ink); padding-block: 1.5rem 1.25rem; }
.brand { color: var(--ink); font-size: 2rem; font-weight: 900; line-height: 1; letter-spacing: -.08em; text-decoration: none; text-transform: uppercase; overflow-wrap: anywhere; }
.top-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 1.75rem; font: .75rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .045em; }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.top-nav a:hover, .top-nav [aria-current] { text-decoration: underline; }
.page-grid { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: var(--gap); padding-block: var(--space-6) var(--space-8); }
main { min-width: 0; min-height: 60vh; }
.eyebrow { font: var(--small)/1.5 var(--mono); text-transform: uppercase; letter-spacing: .08em; overflow-wrap: anywhere; }
.directory { min-width: 0; font-size: .8125rem; }
.directory-label { margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: var(--rule); color: var(--muted); }
.tree, .tree ul { list-style: none; padding: 0; margin: 0; }
.tree ul { border-inline-start: var(--rule); margin: .25rem 0 .75rem .375rem; padding-inline-start: .8rem; }
.tree a { display: block; padding: .55rem .5rem; text-decoration: none; line-height: 1.45; overflow-wrap: anywhere; }
.tree summary { cursor: pointer; padding: .55rem .5rem; line-height: 1.45; font-weight: 700; overflow-wrap: anywhere; }
.tree summary::marker { font-size: .75em; }
.tree a:hover { background: var(--surface); text-decoration: underline; }
.tree [aria-current] { background: var(--ink); color: var(--paper); }
.tree [aria-current]:hover { background: var(--ink); }
.page-heading { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; max-width: var(--reading); margin-bottom: 2rem; padding-bottom: .75rem; border-bottom: var(--rule); }
.page-heading p { margin: 0; }
.page-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--muted); font: var(--small)/1.5 var(--mono); }
.prose { max-width: var(--reading); font-size: var(--text); overflow-wrap: anywhere; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); line-height: 1.12; text-wrap: balance; }
h1 { margin: 0 0 2rem; font-size: var(--title); font-weight: 800; letter-spacing: -.055em; }
h2 { margin: 3rem 0 1.25rem; font-size: clamp(1.6rem, 2.5vw, 2.2rem); font-weight: 750; letter-spacing: -.04em; }
h3 { margin: 2rem 0 1rem; font-size: 1.3rem; letter-spacing: -.025em; }
h4, h5, h6 { margin: 2rem 0 1rem; font-size: 1.05rem; }
p, ul, ol, pre, blockquote, table, dl, figure { margin-block: 0 1.5rem; }
li { margin-block: .35rem; }
.tree li { margin: 0; }
li::marker { font-family: var(--mono); }
strong { font-weight: 750; }
hr { border: 0; border-top: var(--rule); margin-block: 3rem; }
blockquote { margin-inline: 0; padding: .3rem 0 .3rem 1.25rem; border-inline-start: 3px solid var(--ink); font-size: 1.15em; }
blockquote > :last-child { margin-bottom: 0; }
code, kbd, samp { font-family: var(--mono); font-size: .85em; }
:not(pre) > code, kbd { background: var(--surface); border: var(--rule); padding: .1em .25em; }
pre { max-width: 100%; overflow-x: auto; padding: 1.25rem; border: var(--rule); background: var(--surface); font-size: .9375rem; line-height: 1.65; white-space: pre-wrap; tab-size: 4; }
pre code { overflow-wrap: anywhere; }
table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; border-top: 2px solid var(--ink); font-size: .875rem; line-height: 1.5; }
th, td { min-width: 7rem; padding: .75rem; border-bottom: var(--rule); text-align: start; vertical-align: top; }
th { background: var(--surface); font-weight: 700; }
caption { text-align: start; font: var(--small)/1.5 var(--mono); padding-bottom: .75rem; }
img, video, svg { max-width: 100%; height: auto; }
figure { margin-inline: 0; }
figcaption { margin-top: .5rem; color: var(--muted); font: var(--small)/1.5 var(--mono); }
dt { font-weight: 700; }
dd { margin-inline-start: 1.5rem; }
.endnote { max-width: var(--reading); margin-top: 4rem; padding-top: 1rem; border-top: var(--rule); font: var(--small)/1.5 var(--mono); text-align: end; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.5rem 2rem; border-top: 2px solid var(--ink); color: var(--muted); font: .6875rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.skip-link { position: fixed; z-index: 10; top: .75rem; left: .75rem; padding: .75rem 1rem; background: var(--ink); color: var(--paper); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
/* The editorial home is explicit (Template: home). Ordinary pages stay articles. */
.home .page-grid { grid-template-columns: 1fr; gap: 4rem; padding-top: 0; }
.home main { grid-row: 1; }
.home .directory { max-width: 100%; border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.home .tree { columns: 3 15rem; column-gap: 3rem; }
.home .tree > li { break-inside: avoid; }
.hero { padding: clamp(3rem, 6vw, 6rem) 0 3rem; overflow-wrap: anywhere; }
.hero .eyebrow { margin: 0 0 2rem; }
.hero h1 { max-width: 12ch; margin-bottom: 2rem; font-size: var(--display); line-height: .98; letter-spacing: -.065em; font-weight: 800; }
.deck { margin: 0; font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); border-block: var(--rule); margin: 0 0 2rem; }
.stats > div { display: flex; flex-direction: column; padding: 1.75rem 1rem 1.75rem 0; }
.stats dt { order: 2; font: var(--small)/1.5 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: .5rem; }
.stats dd { margin: 0; font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.05; font-weight: 750; letter-spacing: -.06em; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0 2.5rem; border-bottom: var(--rule); margin-bottom: 3rem; }
.features > a { display: grid; grid-template-columns: 1.5rem 1fr auto; gap: .75rem; padding-block: 1.25rem 1.75rem; text-decoration: none; }
.feature-number { font: .6875rem/1.7 var(--mono); color: var(--muted); }
.features strong { display: block; font-size: 1.15rem; line-height: 1.4; letter-spacing: -.025em; }
.features small { display: block; font-size: .8125rem; color: var(--muted); line-height: 1.6; margin-top: .35rem; }
.features a:hover strong { text-decoration: underline; text-underline-offset: .25em; }
.feature-arrow { font-size: 1.25rem; line-height: 1.3; }
.home-prose { margin-inline: auto; }
@media (max-width: 56rem) {
    .page-grid { grid-template-columns: 1fr; gap: 3rem; }
    main { grid-row: 1; }
    .directory { border-top: 2px solid var(--ink); padding-top: 1.5rem; }
    .directory .tree { columns: 2 15rem; column-gap: 2rem; }
    .directory .tree > li { break-inside: avoid; }
    .prose, .page-heading, .endnote { margin-inline: auto; }
}
@media (max-width: 32rem) {
    .site-header { align-items: flex-start; flex-wrap: wrap; padding-block: 1.25rem .75rem; gap: .5rem 1.25rem; }
    .brand { font-size: 1.75rem; }
    .top-nav { justify-content: flex-start; gap: .5rem 1.25rem; }
    .hero { padding-block: 3rem 2rem; }
    .hero .eyebrow { margin-bottom: 1.5rem; }
    .stats { grid-template-columns: 1fr; }
    .stats > div { flex-direction: row; align-items: baseline; gap: 1rem; justify-content: space-between; padding-block: 1rem; }
    .stats > div + div { border-top: var(--rule); }
    .stats dt { margin: 0; text-align: end; }
    .features { grid-template-columns: 1fr; }
    .features > a + a { border-top: var(--rule); }
    .features > a { padding-block: 1.25rem; }
}
@media (forced-colors: active) {
    .tree [aria-current] { outline: 2px solid CanvasText; outline-offset: -2px; }
    :focus-visible { outline-color: Highlight; }
}
@media print {
    .site-header, .directory, .endnote, .site-footer, .skip-link { display: none; }
    .page-grid { display: block; padding: 0; }
    :root { --paper: #fff; --ink: #000; --muted: #333; --surface: #fff; }
    .prose { max-width: none; font-size: 11pt; }
    pre, blockquote, img { break-inside: avoid; }
}
