/* ============================================================
   Tyrien Jones — shared stylesheet (all pages use this one file)
   v2 "Site Documentation" redesign — 2026-11.
   Static. Fonts self-hosted. No remote fonts, no third-party requests.
   Lives at /assets/css/site.css — paths below are relative to HERE.
   ============================================================ */

/* ---- Self-hosted fonts (files in /assets/fonts/) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-Variable.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 62% 125%;
  font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---- Tokens (HANDOFF.md) ----------------------------------- */
:root {
  --bg:          oklch(0.17 0.006 70);   /* warm graphite */
  --panel:       oklch(0.21 0.006 70);
  --panel-2:     oklch(0.24 0.006 70);   /* placeholder stripe light */
  --warm:        oklch(0.22 0.008 60);   /* highlighted panel */
  --line:        oklch(0.29 0.006 70);   /* panel borders */
  --line-2:      oklch(0.25 0.006 70);   /* row dividers */
  --line-3:      oklch(0.32 0.006 70);   /* step rules on panel bg */
  --line-head:   oklch(0.27 0.006 70);   /* header/footer rule */
  --text:        oklch(0.95 0.008 80);
  --body:        oklch(0.85 0.01 75);
  --body-2:      oklch(0.8 0.01 75);
  --muted:       oklch(0.68 0.01 75);
  --muted-2:     oklch(0.62 0.01 75);    /* mono labels */
  --soft:        oklch(0.75 0.01 75);
  --soft-2:      oklch(0.72 0.01 75);
  --accent:      oklch(0.70 0.18 48);    /* hi-vis orange */
  --accent-hi:   oklch(0.76 0.17 52);    /* hover */
  --accent-text: oklch(0.78 0.15 52);    /* orange as text on dark */

  --font-head: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  --gut: 64px;           /* page gutter */
  --nav-h: 84px;
}

/* ---- Base --------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }
a, .btn, .card, details.reg summary, .nav a {
  transition: opacity .15s ease, background-color .2s ease,
              border-color .2s ease, color .2s ease;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}
img { max-width: 100%; display: block; }
code {
  font-family: var(--font-mono);
  font-size: .88em;
}
::selection { background: var(--accent); color: var(--bg); }

h1, h2, h3 { margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-weight: 700; font-stretch: 82%; font-size: clamp(38px, 4.4vw, 64px); line-height: .95; }
p  { margin: 0; color: var(--body); text-wrap: pretty; }

/* Mono label — labels only, never headings/body */
.lbl {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.lbl-lg { font-size: 12px; letter-spacing: .18em; color: var(--muted); }

/* ---- Header ------------------------------------------------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gut); height: var(--nav-h);
  border-bottom: 1px solid var(--line-head);
  gap: 24px;
}
.brand { display: flex; align-items: baseline; gap: 16px; flex: none; }
.brand-name { font-weight: 800; font-stretch: 80%; font-size: 22px; letter-spacing: .02em; }
.brand-sub {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  color: var(--muted);
}
.nav {
  display: flex; align-items: center; gap: 36px;
  font-size: 14px; font-weight: 500; color: oklch(0.78 0.01 75);
  flex-wrap: wrap;
}
.nav a { padding: 6px 0; }
.nav a.active {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.nav .btn-work {
  display: flex; align-items: center; height: 42px; padding: 0 20px;
  background: var(--text); color: var(--bg); font-weight: 600;
}

/* ---- Buttons ------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  height: 58px; padding: 0 30px;
  font-weight: 700; font-size: 15px; letter-spacing: .06em;
}
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-accent:hover { background: var(--accent-hi); opacity: 1; }
.btn-ghost { border: 1px solid oklch(0.4 0.008 70); font-weight: 600; }
.btn-ghost:hover { border-color: var(--text); opacity: 1; }

/* ---- Status tag / stamp ------------------------------------- */
.tag-status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 12px; border: 1px solid var(--accent);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  color: var(--accent-text); text-transform: uppercase;
}
.tag-status::before {
  content: ""; width: 7px; height: 7px; background: var(--accent); flex: none;
}
.stamp {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 14px; border: 2px solid var(--accent);
  color: var(--accent-text);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; text-align: center;
}
.stamp b {
  font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: 0;
  white-space: nowrap;
}

/* ---- Sections / hero ---------------------------------------- */
.sec { padding: 0 var(--gut) 120px; }
.sec-band {
  padding: 120px var(--gut);
  background: var(--panel);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.hero {
  padding: 96px var(--gut) 104px;
  display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr);
  gap: 80px; align-items: stretch;
}
.hero-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 56px; }
.kicker { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.display {
  font-weight: 700; font-stretch: 82%;
  font-size: clamp(60px, 7.17vw, 120px);
  line-height: .9; letter-spacing: -.02em;
}
.hero-lede { max-width: 600px; font-size: 24px; line-height: 1.45; color: var(--body-2); }
.hero-foot {
  display: flex; align-items: center; gap: 16px;
  padding-top: 24px; border-top: 1px solid var(--line-head);
}
.hero-foot b { font-size: 18px; font-weight: 500; }

/* ---- Screenshots -------------------------------------------- */
/* A grid of real screens: one wide shot with a side column, then a row of
   close-ups. Close-ups sit letterboxed on the app's own background colour,
   so the bars read as part of the screenshot. */
.shots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 16px; }
.shot { margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.shot img { width: 100%; height: auto; border: 1px solid var(--line); }
.shots .s-wide { grid-column: span 4; }
.shots .s-side { grid-column: span 2; }
.shot-paper, .shot-tile { position: relative; overflow: hidden; border: 1px solid var(--line); }
.shot-paper { flex: 1; min-height: 0; background: #fff; }
.shot-tile { aspect-ratio: 7 / 5; background: rgb(14 15 19); }
.shot-paper img, .shot-tile img { position: absolute; inset: 0; height: 100%; border: 0; }
.shot-paper img { object-fit: cover; object-position: top; }
.shot-tile img { object-fit: contain; }
.shots-note { margin-top: 20px; }
/* A row of phone-size screens (L.I.LY). */
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 320px)); justify-content: center; gap: 28px; }
.phones .shot img { border-radius: 18px; }
/* Cut-out phone frames (transparent corners): no box around them. */
.phones.framed { grid-template-columns: repeat(3, minmax(0, 260px)); }
.phones.framed .shot img { border: 0; border-radius: 0; }
@media (max-width: 640px) { .phones.framed { grid-template-columns: minmax(0, 260px); } }
@media (max-width: 640px) { .phones { grid-template-columns: minmax(0, 320px); } }
/* Real tool output shown as text (PC_HEALTH's MCP response). Scrolls
   sideways inside its own box on narrow screens, never the page. */
.out { margin: 0; padding: 22px 28px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.65; color: var(--text); }
.out .k { color: var(--muted-2); }
.out .flag { color: oklch(0.78 0.15 52); }
/* Screenshot filling a card's media side (home page). */
.card-shot { position: relative; overflow: hidden; background: rgb(14 15 19); border-right: 1px solid var(--line); }
.card-shot img { width: 100%; height: 100%; object-fit: contain; }
.card-shot-tag { position: absolute; top: 12px; right: 12px; padding: 5px 8px; background: var(--bg); border: 1px solid var(--line); }
/* The card stacks once it can't fit two 420px columns: the shot then sits
   on top, and the tag drops into a strip under it. */
.card:has(> .card-shot) { container-type: inline-size; }
@container (width < 840px) {
  .card-shot { border-right: 0; border-bottom: 1px solid var(--line); }
  .card-shot img { height: auto; }
  .card-shot-tag { position: static; display: block; border: 0; border-top: 1px solid var(--line); padding: 10px 16px; }
}
@media (max-width: 900px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots .s-wide { grid-column: 1 / -1; }
  .shots .s-side { grid-column: auto; }
  .shot-paper { flex: none; aspect-ratio: 7 / 5; }
}
@media (max-width: 640px) {
  .shots { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Spec strip (home hero) ---------------------------------- */
.spec-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  background: var(--panel); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase;
}
.spec-strip > div {
  padding: 14px 18px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--line);
}
.spec-strip > div:last-child { border-right: none; }
.spec-strip span:first-child { color: var(--muted-2); }

/* ---- Panels / sheet tables ----------------------------------- */
.panel { background: var(--panel); border: 1px solid var(--line); }
.panel-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px; border-bottom: 1px solid var(--line);
  gap: 16px; flex-wrap: wrap;
}
.panel-bar .ttl { font-weight: 800; font-stretch: 80%; font-size: 22px; letter-spacing: .02em; }

.sheet { display: grid; font-size: 17px; line-height: 1.45; }
.sheet > div { padding: 22px 28px; border-bottom: 1px solid var(--line-2); }
.sheet > .s-h {
  padding: 16px 28px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2);
}
.sheet .s-name { font-weight: 700; font-size: 20px; }
.sheet .s-role { color: var(--muted); }
.sheet .s-role.hl { color: var(--accent-text); font-weight: 600; }
.sheet .s-desc { color: var(--body-2); }

.tag-own, .tag-wired {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; padding: 4px 8px; white-space: nowrap;
}
.tag-own  { border: 1px solid var(--accent); color: var(--accent-text); }
.tag-wired{ border: 1px solid var(--line-3); color: var(--muted); }

/* ---- Stats row ------------------------------------------------ */
.stats { display: flex; gap: 40px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-weight: 700; font-size: 28px; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); }
.stat-link { margin-left: auto; align-self: end; font-size: 15px; font-weight: 600; }

/* ---- Numbered steps ------------------------------------------- */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 72px minmax(0,1fr) minmax(0,1.4fr);
  gap: 24px; align-items: baseline; padding: 28px 0;
  border-top: 1px solid var(--line-3);
}
.step:last-child { border-bottom: 1px solid var(--line-3); }
.step .n { font-family: var(--font-mono); font-size: 13px; color: var(--muted-2); }
.step .t { font-weight: 700; font-size: 30px; }
.step .d { font-size: 17px; line-height: 1.5; color: oklch(0.78 0.01 75); }
.step.hl .n, .step.hl .t { color: var(--accent-text); }

/* ---- Cards ----------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
}
a.card:hover { border-color: var(--accent); opacity: 1; }
.card-body { padding: 36px; display: flex; flex-direction: column; gap: 24px; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.card-title { font-weight: 800; font-stretch: 80%; font-size: 56px; line-height: 1; }
.card-desc { font-size: 19px; line-height: 1.5; color: oklch(0.82 0.01 75); }
.card .stats { margin-top: auto; }

/* ---- Two-column split (band interiors etc.) --------------------- */
.split { display: grid; gap: 80px; align-items: start; }
.split.s-12 { grid-template-columns: minmax(0,1fr) minmax(0,2fr); }
.split.s-21 { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
.hero-media { display: flex; flex-direction: column; justify-content: flex-end; }

/* ---- Section headers ------------------------------------------- */
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.sec-head .sub { font-size: 17px; color: var(--soft-2); }

/* ---- CTA band --------------------------------------------------- */
.cta {
  padding: 120px var(--gut);
  display: flex; justify-content: space-between; align-items: end; gap: 64px;
}
.cta.in-panel { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-copy { display: flex; flex-direction: column; gap: 20px; max-width: 860px; }
.cta-copy .lbl-lg { color: var(--accent-text); }
.cta-q {
  font-weight: 700; font-stretch: 82%;
  font-size: clamp(44px, 5vw, 72px); line-height: .95; letter-spacing: -.01em;
}
.cta .btn { flex: none; height: 60px; padding: 0 32px; }

/* ---- Footer ------------------------------------------------------ */
.site-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px var(--gut); border-top: 1px solid var(--line-head);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2);
  gap: 16px; flex-wrap: wrap;
}
.site-foot .links { display: flex; gap: 28px; }

/* ---- Page header (inner pages) ----------------------------------- */
.page-head {
  padding: 72px var(--gut) 72px;
  display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
  gap: 64px; align-items: end;
}
.crumb { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; color: var(--muted-2); text-transform: uppercase; }
.crumb a:hover { color: var(--text); }
.page-head .display { font-size: clamp(56px, 6vw, 110px); }
.lede { font-size: 26px; line-height: 1.4; font-weight: 500; color: var(--body); max-width: 760px; }

.spec-panel {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  background: var(--panel); border: 1px solid var(--line);
}
.spec-panel > div {
  padding: 18px 22px; display: flex; flex-direction: column; gap: 6px;
  border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
}
.spec-panel > div:nth-child(2n) { border-right: none; }
.spec-panel .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--muted-2); text-transform: uppercase; }
.spec-panel .v { font-size: 16px; font-weight: 600; line-height: 1.35; }
.spec-panel .cell-stamp { align-items: center; justify-content: center; }

/* ---- Doc layout (sticky index + reading column) ------------------- */
.doc {
  padding: 0 var(--gut) 120px;
  display: grid; grid-template-columns: 200px minmax(0,1fr);
  gap: 56px; align-items: start;
}
.doc-index {
  position: sticky; top: 32px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 14px;
}
.doc-index .idx-ttl { padding-bottom: 14px; }
.doc-index a {
  display: flex; gap: 14px; align-items: baseline;
  padding: 9px 0; color: var(--soft);
  border-top: 1px solid var(--line-2);
  font-weight: 500;
}
.doc-index a .n { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.doc-index a:hover { color: var(--text); opacity: 1; }
.doc-index a.btn {
  margin-top: 8px; height: 48px; padding: 0 22px;
  justify-content: center;
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  border-top: none;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent-text);
}
.doc-index a.btn:hover { background: var(--accent); color: var(--bg); opacity: 1; }

/* Index highlight, zero JS. Where the browser supports scroll-driven
   animations, the link for the section crossing ~35% of the viewport lights up
   as you scroll. Elsewhere it falls back to click-follow via :has(:target). */
@keyframes idx-on { from, to { color: var(--accent-text); font-weight: 600; } }
@supports (animation-timeline: view()) {
  .doc { timeline-scope: --s-ets2la, --s-featured, --s-how-i-ran-it, --s-how-they-learn, --s-inside, --s-next, --s-operational-core, --s-paused-builds, --s-pc-control-hub, --s-pc-health, --s-plain-terms, --s-receipts, --s-six-axis, --s-the-arc, --s-the-build, --s-the-crew, --s-the-job, --s-the-result, --s-the-rules, --s-the-stack, --s-using-ai, --s-what-i-dont-publish, --s-what-this-is, --s-whats-mine, --s-who-i-am, --s-why-it-counts, --s-why-this-way, --s-wired-in; }
  .doc-sec { view-timeline-axis: block; view-timeline-inset: 35% 64%; }
  #ets2la { view-timeline-name: --s-ets2la; }
  #featured { view-timeline-name: --s-featured; }
  #how-i-ran-it { view-timeline-name: --s-how-i-ran-it; }
  #how-they-learn { view-timeline-name: --s-how-they-learn; }
  #inside { view-timeline-name: --s-inside; }
  #next { view-timeline-name: --s-next; }
  #operational-core { view-timeline-name: --s-operational-core; }
  #paused-builds { view-timeline-name: --s-paused-builds; }
  #pc-control-hub { view-timeline-name: --s-pc-control-hub; }
  #pc-health { view-timeline-name: --s-pc-health; }
  #plain-terms { view-timeline-name: --s-plain-terms; }
  #receipts { view-timeline-name: --s-receipts; }
  #six-axis { view-timeline-name: --s-six-axis; }
  #the-arc { view-timeline-name: --s-the-arc; }
  #the-build { view-timeline-name: --s-the-build; }
  #the-crew { view-timeline-name: --s-the-crew; }
  #the-job { view-timeline-name: --s-the-job; }
  #the-result { view-timeline-name: --s-the-result; }
  #the-rules { view-timeline-name: --s-the-rules; }
  #the-stack { view-timeline-name: --s-the-stack; }
  #using-ai { view-timeline-name: --s-using-ai; }
  #what-i-dont-publish { view-timeline-name: --s-what-i-dont-publish; }
  #what-this-is { view-timeline-name: --s-what-this-is; }
  #whats-mine { view-timeline-name: --s-whats-mine; }
  #who-i-am { view-timeline-name: --s-who-i-am; }
  #why-it-counts { view-timeline-name: --s-why-it-counts; }
  #why-this-way { view-timeline-name: --s-why-this-way; }
  #wired-in { view-timeline-name: --s-wired-in; }
  .doc-index a[href^="#"] { animation: idx-on linear none; animation-range: cover 0% cover 100%; }
  .doc-index a[href="#ets2la"] { animation-timeline: --s-ets2la; }
  .doc-index a[href="#featured"] { animation-timeline: --s-featured; }
  .doc-index a[href="#how-i-ran-it"] { animation-timeline: --s-how-i-ran-it; }
  .doc-index a[href="#how-they-learn"] { animation-timeline: --s-how-they-learn; }
  .doc-index a[href="#inside"] { animation-timeline: --s-inside; }
  .doc-index a[href="#next"] { animation-timeline: --s-next; }
  .doc-index a[href="#operational-core"] { animation-timeline: --s-operational-core; }
  .doc-index a[href="#paused-builds"] { animation-timeline: --s-paused-builds; }
  .doc-index a[href="#pc-control-hub"] { animation-timeline: --s-pc-control-hub; }
  .doc-index a[href="#pc-health"] { animation-timeline: --s-pc-health; }
  .doc-index a[href="#plain-terms"] { animation-timeline: --s-plain-terms; }
  .doc-index a[href="#receipts"] { animation-timeline: --s-receipts; }
  .doc-index a[href="#six-axis"] { animation-timeline: --s-six-axis; }
  .doc-index a[href="#the-arc"] { animation-timeline: --s-the-arc; }
  .doc-index a[href="#the-build"] { animation-timeline: --s-the-build; }
  .doc-index a[href="#the-crew"] { animation-timeline: --s-the-crew; }
  .doc-index a[href="#the-job"] { animation-timeline: --s-the-job; }
  .doc-index a[href="#the-result"] { animation-timeline: --s-the-result; }
  .doc-index a[href="#the-rules"] { animation-timeline: --s-the-rules; }
  .doc-index a[href="#the-stack"] { animation-timeline: --s-the-stack; }
  .doc-index a[href="#using-ai"] { animation-timeline: --s-using-ai; }
  .doc-index a[href="#what-i-dont-publish"] { animation-timeline: --s-what-i-dont-publish; }
  .doc-index a[href="#what-this-is"] { animation-timeline: --s-what-this-is; }
  .doc-index a[href="#whats-mine"] { animation-timeline: --s-whats-mine; }
  .doc-index a[href="#who-i-am"] { animation-timeline: --s-who-i-am; }
  .doc-index a[href="#why-it-counts"] { animation-timeline: --s-why-it-counts; }
  .doc-index a[href="#why-this-way"] { animation-timeline: --s-why-this-way; }
  .doc-index a[href="#wired-in"] { animation-timeline: --s-wired-in; }
}
@supports not (animation-timeline: view()) {
  .doc-index a.on { color: var(--accent-text); font-weight: 600; }
  .doc:has(:target) .doc-index a.on { color: var(--soft); font-weight: 500; }
  .doc:has(#ets2la:target) .doc-index a[href="#ets2la"],
  .doc:has(#featured:target) .doc-index a[href="#featured"],
  .doc:has(#how-i-ran-it:target) .doc-index a[href="#how-i-ran-it"],
  .doc:has(#how-they-learn:target) .doc-index a[href="#how-they-learn"],
  .doc:has(#inside:target) .doc-index a[href="#inside"],
  .doc:has(#next:target) .doc-index a[href="#next"],
  .doc:has(#operational-core:target) .doc-index a[href="#operational-core"],
  .doc:has(#paused-builds:target) .doc-index a[href="#paused-builds"],
  .doc:has(#pc-control-hub:target) .doc-index a[href="#pc-control-hub"],
  .doc:has(#pc-health:target) .doc-index a[href="#pc-health"],
  .doc:has(#plain-terms:target) .doc-index a[href="#plain-terms"],
  .doc:has(#receipts:target) .doc-index a[href="#receipts"],
  .doc:has(#six-axis:target) .doc-index a[href="#six-axis"],
  .doc:has(#the-arc:target) .doc-index a[href="#the-arc"],
  .doc:has(#the-build:target) .doc-index a[href="#the-build"],
  .doc:has(#the-crew:target) .doc-index a[href="#the-crew"],
  .doc:has(#the-job:target) .doc-index a[href="#the-job"],
  .doc:has(#the-result:target) .doc-index a[href="#the-result"],
  .doc:has(#the-rules:target) .doc-index a[href="#the-rules"],
  .doc:has(#the-stack:target) .doc-index a[href="#the-stack"],
  .doc:has(#using-ai:target) .doc-index a[href="#using-ai"],
  .doc:has(#what-i-dont-publish:target) .doc-index a[href="#what-i-dont-publish"],
  .doc:has(#what-this-is:target) .doc-index a[href="#what-this-is"],
  .doc:has(#whats-mine:target) .doc-index a[href="#whats-mine"],
  .doc:has(#who-i-am:target) .doc-index a[href="#who-i-am"],
  .doc:has(#why-it-counts:target) .doc-index a[href="#why-it-counts"],
  .doc:has(#why-this-way:target) .doc-index a[href="#why-this-way"],
  .doc:has(#wired-in:target) .doc-index a[href="#wired-in"] {
    color: var(--accent-text); font-weight: 600;
  }
}
.doc-main [id] { scroll-margin-top: 28px; }
.doc-main p, .doc-main .lede { max-width: 72ch; }
.doc-main { display: flex; flex-direction: column; gap: 96px; min-width: 0; }

.doc-sec { display: flex; flex-direction: column; gap: 28px; }
.doc-sec > header {
  display: flex; align-items: baseline; gap: 18px;
  padding-top: 24px; border-top: 1px solid var(--line-3);
}
.doc-sec > header .n { font-family: var(--font-mono); font-size: 13px; color: var(--accent-text); }
.doc-sec h2 { font-size: clamp(34px, 3.6vw, 52px); }
.doc-sec h3 { font-weight: 700; font-size: 24px; }
.prose { display: flex; flex-direction: column; gap: 20px; max-width: 780px; }
.prose p { font-size: 18px; line-height: 1.7; }
.prose .big { font-size: 21px; line-height: 1.6; color: var(--text); font-weight: 500; }

/* ---- Details register (no JS) -------------------------------------- */
details.reg { border: 1px solid var(--line); background: var(--panel); }
details.reg + details.reg { border-top: none; }
details.reg summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 26px; font-weight: 600; font-size: 18px;
}
details.reg summary::-webkit-details-marker { display: none; }
details.reg summary::after {
  content: "+"; font-family: var(--font-mono); color: var(--muted);
  font-size: 18px; flex: none;
}
details.reg[open] summary::after { content: "–"; }
details.reg .reg-body { padding: 0 26px 24px; color: var(--body-2); max-width: 760px; }

/* ---- Prev / next strip ---------------------------------------------- */
.pn {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  border-top: 1px solid var(--line-head);
}
.pn a {
  display: flex; flex-direction: column; gap: 10px;
  padding: 44px var(--gut);
}
.pn a + a { border-left: 1px solid var(--line-head); text-align: right; align-items: end; }
.pn a:hover { background: var(--panel); opacity: 1; }
.pn b { font-weight: 700; font-stretch: 82%; font-size: 30px; }

/* ---- Wide screens: full-width bands, content centred past 1440px ------ */
.site-head, .hero, .page-head, .sec, .sec-band, .cta, .doc, .site-foot {
  padding-left: max(var(--gut), calc((100% - 1440px) / 2));
  padding-right: max(var(--gut), calc((100% - 1440px) / 2));
}

/* ---- Portfolio job register: stack rows before the columns get squeezed */
@media (max-width: 900px) {
  .reg-row { grid-template-columns: minmax(0,1fr) !important; gap: 6px !important; }
  .reg-row > span:last-child { display: none; }
}

/* ---- Mobile (HANDOFF §6) --------------------------------------------- */
@media (max-width: 1100px) {
  :root { --gut: 32px; }
  .hero, .page-head { grid-template-columns: minmax(0,1fr); gap: 48px; }
  .card-grid { grid-template-columns: minmax(0,1fr); }
  .doc { grid-template-columns: minmax(0,1fr); gap: 48px; }
  .doc-index { position: static; }
  .split, .split.s-12, .split.s-21 { grid-template-columns: minmax(0,1fr); gap: 48px; }
}
@media (max-width: 640px) {
  :root { --gut: 16px; --nav-h: auto; }
  body { font-size: 17px; }
  .site-head { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 16px; }
  .nav { gap: 18px; }
  .hero { padding-top: 56px; padding-bottom: 64px; }
  .display, .page-head .display { font-size: clamp(44px, 13vw, 80px); }
  .hero-lede { font-size: 20px; }
  .lede { font-size: 21px; }
  .sec, .doc { padding-bottom: 72px; }
  .sec-band, .cta { padding-top: 64px; padding-bottom: 64px; }
  .cta { flex-direction: column; align-items: flex-start; gap: 32px; }
  .step { grid-template-columns: 40px minmax(0,1fr); }
  .step .d { grid-column: 2; }
  .step .t { font-size: 24px; }
  .sheet { grid-template-columns: minmax(0,1fr) !important; font-size: 16px; }
  .sheet > .s-h { display: none; }
  .sheet > div { padding: 14px 18px; border-bottom: none; }
  .sheet .row-end { border-bottom: 1px solid var(--line-2) !important; padding-bottom: 20px; margin-bottom: 6px; }
  .card-title { font-size: clamp(32px, 11vw, 44px); }
  .spec-strip { grid-template-columns: minmax(0,1fr); }
  .spec-strip > div { border-right: none; border-bottom: 1px solid var(--line); }
  .spec-strip > div:last-child { border-bottom: none; }
  .spec-panel { grid-template-columns: minmax(0,1fr); }
  .spec-panel > div { border-right: none; }
  .card-top { flex-wrap: wrap; }
  details.reg summary > span { grid-template-columns: minmax(0,1fr) !important; gap: 4px !important; }
  /* Inline multi-column grids that must collapse on phones */
  .stack-sm { grid-template-columns: minmax(0,1fr) !important; }
  .two-sm { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .flush-sm > * { padding-left: 0 !important; padding-right: 0 !important; border-right: none !important; }
  .pn { grid-template-columns: minmax(0,1fr); }
  .pn a + a { border-left: none; border-top: 1px solid var(--line-head); }
  .stats { gap: 24px; }
  .btn { height: 52px; padding: 0 22px; }
}
