/* franmarcano.com · the system pages (/systems/<slug>/): every style they share. A page's own marks, if any, are inline in its <style>. */
/* Fonts: the landing's faces, from this domain */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/assets/fonts/archivo-latin-standard-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* text painted before the faces arrive: local faces sized to the same advance width (measured: Arial ×0.982 for regular
   Archivo, Helvetica Neue Medium ×0.984 and Bold ×0.96; Menlo ×1.163 for Martian Mono), so lines wrap the same and nothing
   moves when the real face swaps in. Regular text falls back to Arial first: over both articles' text Helvetica Neue fits
   at ×0.969, not ×0.984, and a dek's bold run moved up to 7 px when Archivo arrived; Arial at ×0.982 keeps every dek still
   from 320 to 1920 px (fonts held back 600 ms, both pages) */
@font-face { font-family: 'Archivo fallback'; font-weight: 100 450; src: local('Arial'), local('ArialMT'), local('Helvetica Neue'), local('HelveticaNeue'); size-adjust: 98.2%; ascent-override: 89.4%; descent-override: 21.3%; line-gap-override: 0%; }
@font-face { font-family: 'Archivo fallback'; font-weight: 451 550; src: local('Helvetica Neue Medium'), local('HelveticaNeue-Medium'), local('Arial'), local('ArialMT'); size-adjust: 98.4%; ascent-override: 89.4%; descent-override: 21.3%; line-gap-override: 0%; }
@font-face { font-family: 'Archivo fallback'; font-weight: 551 900; src: local('Helvetica Neue Bold'), local('HelveticaNeue-Bold'), local('Arial Bold'), local('Arial-BoldMT'); size-adjust: 96%; ascent-override: 91.7%; descent-override: 21.9%; line-gap-override: 0%; }
@font-face { font-family: 'Martian Mono fallback'; src: local('Menlo'), local('Menlo-Regular'), local('DejaVu Sans Mono'), local('Courier New'); size-adjust: 116.3%; ascent-override: 86%; descent-override: 17.2%; line-gap-override: 0%; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 300 600; font-stretch: 75% 112.5%; font-display: swap; src: url(/assets/fonts/martian-mono-latin-standard-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Tokens: the landing's, unchanged. One layout variable added: the reading measure. */
:root {
  --bg: #0B0C0E; --bg-2: #121418; --fg: #ECEBE6; --fg-2: #A3A39C; --fg-3: #6E6E68; --fg-label: #8C8C86;
  --line: #24262B; --line-2: #34373D; --signal: #FF1B04; --signal-text: #FF5240; --signal-fill: #FF1B04; --on-signal: #0B0C0E;
  --display: 'Archivo', 'Archivo fallback', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Martian Mono', 'Martian Mono fallback', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --g: clamp(16px, 4vw, 56px); --site: 100%; --hh: 60px; --measure: 760px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --bg: #FAFAFB; --bg-2: #FFFFFF; --fg: #0B0C0E; --fg-2: #4A4D54; --fg-3: #878A91; --fg-label: #686B72; --line: #E4E6E9; --line-2: #CDD0D5; --signal: #CA1B00; --signal-text: #CA1B00; --signal-fill: #CA1B00; --on-signal: #FFFFFF; color-scheme: light; } }
:root[data-theme="light"] { --bg: #FAFAFB; --bg-2: #FFFFFF; --fg: #0B0C0E; --fg-2: #4A4D54; --fg-3: #878A91; --fg-label: #686B72; --line: #E4E6E9; --line-2: #CDD0D5; --signal: #CA1B00; --signal-text: #CA1B00; --signal-fill: #CA1B00; --on-signal: #FFFFFF; color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--display); font-size: 18px; line-height: 1.5; font-weight: 400; font-stretch: 100%; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
a { color: inherit; }
::selection { background: var(--signal-fill); color: var(--on-signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--fg); color: var(--bg); padding: 10px 14px; font-weight: 700; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 10px); }
.in { width: 100%; max-width: var(--site); margin-inline: auto; padding-left: max(var(--g), env(safe-area-inset-left, 0px)); padding-right: max(var(--g), env(safe-area-inset-right, 0px)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nw { white-space: nowrap; }   /* a phrase that never breaks: '9 min read', '3–4 minutes' */
.label { margin: 0; font-family: var(--mono); font-size: 11px; font-weight: 400; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-label); }
.eyebrow { margin: 0; font-family: var(--mono); font-size: 11.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); display: flex; align-items: center; gap: 10px; }
.eyebrow .dot { width: 6px; height: 6px; background: var(--fg-label); flex: none; }

/* The scene: the landing's fixed canvas behind the hero. Hidden until a scene marks the page with html.gl, so today
   (no scene yet) the hero reads over the plain background. The document below is solid and covers it. */
#gl { position: fixed; inset: 0 0 auto; width: 100%; height: 100%; height: 100lvh; z-index: 0; display: block; }
html:not(.gl) #gl { display: none; }
main, .mast, .foot { position: relative; z-index: 2; }

/* ---------- masthead: the landing's, wordmark held condensed (wdth 72, where the landing's scroll leaves it) ---------- */
.mast { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid transparent; transition: border-color .25s ease; }
.mast .in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding-block: 14px; }
.wordmark { justify-self: start; font-weight: 700; font-stretch: 72%; font-size: 17px; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; line-height: 1.2; }
.mast nav { display: flex; gap: clamp(14px, 2.4vw, 30px); font-size: 14.5px; font-weight: 500; color: var(--fg-2); }
.mast nav a { text-decoration: none; padding-block: 8px; transition: color .2s ease; }
.mast nav a:hover, .mast nav a[aria-current] { color: var(--fg); }
.mast-end { justify-self: end; display: flex; align-items: center; gap: 18px; }
.theme-btn { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-2); background: transparent; color: var(--fg-2); cursor: pointer; transition: color .2s ease, border-color .2s ease; }
.theme-btn:hover { color: var(--fg); border-color: var(--fg-2); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .sun { display: none; }
:root[data-scheme="dark"] .theme-btn .sun { display: block; }
:root[data-scheme="dark"] .theme-btn .moon { display: none; }
/* the line under the masthead shows once the page moves under it */
html.scrolled .mast { border-bottom-color: var(--line); }
.mast-cta { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; background: var(--fg); color: var(--bg); border: 1px solid var(--fg); transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.mast-cta:hover { background: var(--signal-fill); border-color: var(--signal-fill); color: var(--on-signal); }
/* reading progress: 1 px in --fg-2 under the masthead, driven by the scroll timeline in CSS; no support, no line */
.readline { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--fg-2); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
@supports (animation-timeline: scroll()) { .readline { animation: read linear both; animation-timeline: scroll(root block); } @keyframes read { to { transform: scaleX(1); } } }
@media (max-width: 640px) { .mast .in { grid-template-columns: minmax(0, 1fr) auto; } .mast-end { display: none; } .mast nav { gap: 14px; font-size: 14px; } .wordmark { font-size: 15px; } }

/* ---------- hero: transparent over the scene, content low and left, like the landing's ---------- */
/* The hero holds the scene's room (most of the first screen) only when the first-paint script has set html.scene (a
   scene is wired and WebGL is there). Today, with no scene, it is as tall as its text, so no empty band sits over it */
.ahero { position: relative; display: flex; align-items: flex-end; }
html.scene .ahero { min-height: min(92svh, 940px); }
.ahero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 72%, transparent) 40%, transparent 72%), linear-gradient(0deg, var(--bg) 0%, transparent 34%); }
.ahero .in { position: relative; padding-block: clamp(72px, 12vh, 140px) clamp(36px, 6vh, 64px); display: grid; gap: clamp(18px, 2.2vw, 26px); }
.back { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 32px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-label); text-decoration: none; transition: color .2s ease; }
.back:hover { color: var(--fg); }
.kicker { view-transition-name: kicker; }
.ahero .eyebrow { align-items: flex-start; }
.ahero .eyebrow .dot { margin-top: calc(.75em - 3px); }
.title { margin: 0; font-weight: 640; font-size: clamp(40px, 5.2vw, 80px); line-height: .96; letter-spacing: -.04em; max-width: 15em; }
.title .ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.title .ln > span { display: inline-block; text-wrap: balance; }
.title .dim { color: var(--fg-3); }
/* the page's one orchestrated move, in CSS so it starts with the first frame: the landing's H1, 1.15 s expo-out,
   0.12 s between lines. .rise is set before paint only without reduced motion; no script, no move */
html.rise .title .ln > span { animation: rise 1.15s cubic-bezier(.16, 1, .3, 1) .1s both; }
html.rise .title .ln + .ln > span { animation-delay: .22s; }
@keyframes rise { from { transform: translateY(105%); } }
.dek { margin: 0; max-width: 26em; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.42; color: var(--fg-2); text-wrap: pretty; }
.dek b { color: var(--fg); font-weight: 500; }
.byline { margin: 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--fg-2); }
/* facts strip: the card's facts, laid flat in instrument type */
.strip { margin: 4px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); max-width: 860px; }
.strip > div { padding: 12px 24px 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.strip dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-label); }
.strip dd { margin: 6px 0 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; line-height: 1.45; color: var(--fg); }
@media (max-width: 760px) {
  html.scene .ahero { min-height: 0; }
  /* the scene takes the top of a phone's screen and the text starts under it (the landing's chapters do the same).
     The room is held only when the first-paint script has set html.scene (a scene is wired and WebGL is there):
     today, with no scene, and whenever WebGL is missing, the title starts at the top */
  html.scene .ahero .in { padding-top: 44svh; }
  .ahero .in { padding-bottom: 32px; }
  .ahero::before { background: linear-gradient(0deg, var(--bg) 0%, var(--bg) 52%, transparent 72%); }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .strip > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; padding: 9px 0; }
  .strip dt { padding-top: 1px; }
  .strip dd { margin: 0; font-size: 12px; }
}

/* ---------- the document: solid, a reading column with a contents rail and a notes rail ---------- */
.doc { position: relative; background: var(--bg); border-top: 1px solid var(--line); }
.doc-grid { width: 100%; max-width: var(--site); margin-inline: auto; padding: clamp(48px, 7vw, 104px) max(var(--g), env(safe-area-inset-right, 0px)) clamp(80px, 10vw, 140px) max(var(--g), env(safe-area-inset-left, 0px));
  display: grid; justify-content: start; column-gap: 56px;
  grid-template-columns: [rail-start] 200px [rail-end text-start] minmax(0, var(--measure)) [text-end note-start] 260px [note-end]; }
.toc { grid-column: rail; grid-row: 1; align-self: start; position: sticky; top: calc(var(--hh) + 40px); max-height: calc(100svh - var(--hh) - 64px); overflow-y: auto; font-size: 13.5px; line-height: 1.35; overscroll-behavior: contain; scrollbar-width: none; }
.toc ol { list-style: none; margin: 14px 0 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--fg-label); text-decoration: none; text-wrap: pretty; transition: color .2s ease, border-color .2s ease; }
.toc a:hover { color: var(--fg-2); }
.toc a[aria-current="true"] { color: var(--fg); border-left-color: var(--fg); }
.toc-m { display: none; grid-column: text; margin: 0 0 8px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line); }
.toc-m summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; list-style: none; }
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--fg-label); border-bottom: 1.5px solid var(--fg-label); transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.toc-m[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.toc-m ol { list-style: none; margin: 0; padding: 0 0 12px; counter-reset: none; }
.toc-m a { display: block; padding: 8px 0; font-size: 16px; line-height: 1.35; color: var(--fg-2); text-decoration: none; }
.toc-m a:hover { color: var(--fg); }
.flow { grid-column: text-start / note-end; grid-row: 1; display: grid; grid-template-columns: subgrid; align-content: start; }
/* a note follows its paragraph in the source; sparse auto-placement puts it in that paragraph's row */
.flow > * { grid-column: text; min-width: 0; }
.flow > .wide { grid-column: text-start / note-end; }
/* the rail comes in at 1320 px, where the reading column still gets 642 px (at 1200 it would drop to 532) */
@media (max-width: 1319px) {
  .doc-grid { grid-template-columns: [text-start] minmax(0, 640px) [text-end note-start] 240px [note-end]; column-gap: 48px; }
  .toc { display: none; }
  .toc-m { display: block; grid-column: text-start / note-end; grid-row: 1; margin-bottom: clamp(28px, 4vw, 48px); }
  .flow { grid-row: 2; }
}
@media (max-width: 899px) { .doc-grid { grid-template-columns: [text-start note-start] minmax(0, var(--measure)) [text-end note-end]; } .toc-m { grid-column: text; } }
/* the reading column is the CV's (760 px); the hero goes full width like the landing's (its text at the gutter, under the wordmark); the body reads as one centred
   block (rail, text, notes) */
@media (min-width: 1320px) { .doc-grid { max-width: calc(1332px + 2 * var(--g)); } }
@media (min-width: 900px) and (max-width: 1319px) { .doc-grid { max-width: calc(928px + 2 * var(--g)); } }

/* ---------- type and rhythm. Margin-top only (grid items do not collapse margins). The body is --fg-2; bold is the
   claim of a paragraph in --fg, so the headings and the bold alone carry the argument. ---------- */
.flow > p:not(.label), .flow > ul > li, .flow > ol > li { font-size: 19px; line-height: 1.62; color: var(--fg-2); text-wrap: pretty; }
.flow > p:not(.label) { margin: 1.1em 0 0; }
@media (max-width: 760px) { .flow > p:not(.label), .flow > ul > li, .flow > ol > li { font-size: 18px; line-height: 1.6; } }
.flow b, .flow strong { color: var(--fg); font-weight: 560; }
.flow > :first-child { margin-top: 0; }
.flow dfn { font-style: normal; color: var(--fg); }
.flow .sec { grid-column: text-start / note-end; margin: 4.4em 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.flow h2 { margin: 12px 0 0; font-weight: 620; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.05; letter-spacing: -.03em; color: var(--fg); text-wrap: balance; max-width: 14em; scroll-margin-top: calc(var(--hh) + 48px); }
.flow > h2 + p:not(.label), .flow > h2 + ul, .flow > h2 + ol, .flow > h2 + .tbl-wrap { margin-top: .9em; }
.flow a { text-decoration-line: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .2s ease; }
.flow a:hover { text-decoration-color: var(--fg); }
/* lists: square bullets for sets, mono numerals for sequences (the rules, the seven steps, the order to copy) */
.flow ul.points, .flow ol.seq { list-style: none; margin: 1.1em 0 0; padding: 0; display: grid; gap: .75em; }
.flow ul.points > li { position: relative; padding-left: 24px; }
.flow ul.points > li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; background: var(--fg-label); }
.flow ol.seq { counter-reset: n; }
.flow ol.seq > li { counter-increment: n; position: relative; padding-left: 36px; }
.flow ol.seq > li::before { content: counter(n); position: absolute; left: 0; top: .36em; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 5px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; line-height: 1; color: var(--fg-2); }
/* state names in the running text: the instrument register, with the state's square (ready is the only one in red) */
.flow em.st { font-style: normal; font-family: var(--mono); font-size: .74em; letter-spacing: .02em; color: var(--fg); white-space: nowrap; }
.flow em.st::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 .55em .12em 0; background: var(--fg-label); }
.flow em.st--ok::before { background: var(--signal); }
.flow em.st--draft::before { background: transparent; box-shadow: inset 0 0 0 1px var(--fg-label); }

/* the short version, first: a box like the landing's cards, no shadow, no radius */
.inshort { border: 1px solid var(--line); padding: clamp(18px, 2.4vw, 26px) clamp(18px, 2.6vw, 30px); }
.inshort ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: .6em; }
.inshort li { position: relative; padding-left: 22px; font-size: 17.5px; line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
.inshort b { color: var(--fg); font-weight: 560; }
.inshort li::before { content: ""; position: absolute; left: 1px; top: .68em; width: 6px; height: 6px; background: var(--fg-label); }
.flow > .inshort + p:not(.label) { margin-top: 2.2em; }

/* margin notes: in the notes rail beside their paragraph, without stretching its row; inline under 900 px */
.flow .note { grid-column: note; align-self: start; margin: 1.5em 0 -60vh; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: var(--fg-2); }
.flow .note .label { display: block; margin-bottom: 6px; }
@media (max-width: 899px) { .flow .note { grid-column: text; margin: 1.2em 0 0; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); } }

/* code: mono, no syntax colours; comments step back to --fg-label. Nothing scrolls out of view: each line is a block
   that wraps under itself (a hanging indent), and the box sizes its type to its own width (container units). */
.code { container-type: inline-size; margin: 1.4em 0 0; }
.code pre { margin: 0; padding: 18px 20px; background: var(--bg-2); border: 1px solid var(--line); overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.65; color: var(--fg); tab-size: 2; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.code code { font: inherit; display: block; }
.code .ln { display: block; white-space: pre-wrap; padding-left: 4ch; text-indent: -4ch; }
.code .nl { display: none; }
.code .c { color: var(--fg-label); }
@container (max-width: 559.98px) { .code pre { padding: 14px; font-size: 12px; } }
/* the four calls: one line per call where 106 characters fit (at 12-13 px); below that the comment drops under its
   result, in the same column (77 characters); in a phone's column each part takes its own line */
@container (min-width: 937px) { .calls pre { font-size: clamp(12px, calc((100cqi - 42px) / 74.6), 13px); } }
@container (max-width: 936.98px) {
  .calls pre { padding-inline: 15px; font-size: clamp(11.75px, calc((100cqi - 32px) / 54.4), 13px); }
  .calls .pad2 { display: none; }
  .calls .c { display: block; padding-left: 42ch; }   /* the line's -4ch indent puts it at column 42, under the results */
}
@container (max-width: 671.98px) {
  .calls pre { padding: 14px; font-size: clamp(11.5px, calc((100cqi - 30px) / 28.4), 12.5px); }
  .calls .pad { display: none; }
  .calls .ln, .calls .ret, .calls .c { text-wrap: balance; }   /* a part that wraps (a call, a result, a comment) splits in two even halves, never one word under it */
  .calls .ret, .calls .c { display: block; padding-left: 2ch; }   /* first line at 2ch, a wrap at 6ch */
  .calls .ln + .ln { margin-top: .55em; }
}

/* ---------- figures: inline SVG, drawn on scroll; a landscape drawing and a portrait one redrawn for narrow screens ---------- */
.fig { margin: 2.6em 0 0; }
.fig-frame { --figbg: color-mix(in srgb, var(--bg-2) 60%, var(--bg)); border: 1px solid var(--line); background: var(--figbg); padding: clamp(16px, 2.4vw, 30px); }
.fig-head { display: grid; gap: 4px; margin-bottom: clamp(18px, 2.4vw, 30px); }
.fig-title { margin: 0; font-weight: 600; font-size: 20px; line-height: 1.2; letter-spacing: -.015em; color: var(--fg); }
.fig-sub { margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-label); }
.fig .dg { display: block; width: 100%; height: auto; overflow: visible; }
.fig .portrait { display: none; max-width: 440px; margin-inline: auto; }
@media (max-width: 639px) { .fig-frame { margin-inline: calc(-1 * max(var(--g), env(safe-area-inset-left, 0px))); border-inline: 0; padding: 20px max(var(--g), env(safe-area-inset-left, 0px)); } }
@media (max-width: 899px) { .fig .landscape { display: none; } .fig .portrait { display: block; } }
.fig figcaption { margin-top: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; font-size: 15px; line-height: 1.5; color: var(--fg-2); max-width: var(--measure); text-wrap: pretty; }
.fig figcaption .label { padding-top: 3px; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: clamp(16px, 2vw, 24px); font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-label); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 1px; background: var(--fg-label); }
.legend i.live { height: 2px; background: var(--signal); }
.legend i.path { height: 2px; background: var(--fg); }
.legend i.sq { width: 6px; height: 6px; background: var(--signal); }

/* the diagram vocabulary: nodes are --line-2 boxes on --bg; edges 1.25 px --fg-label; the path through a model in
   --signal; packets are 6 px squares, the scene's point */
.dg text { font-family: var(--mono); font-size: 11px; fill: var(--fg-label); }
.dg .t { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; fill: var(--fg); }
.dg .t--sm { font-size: 15px; }
.dg .s { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; fill: var(--fg-label); }
.dg .r { font-size: 11.5px; fill: var(--fg-2); }
.dg .a { font-family: var(--display); font-size: 15px; fill: var(--fg-2); }
.dg .el { font-size: 11px; fill: var(--fg-label); }
.dg .el--live { fill: var(--signal-text); }
.dg .n { fill: var(--bg); stroke: var(--line-2); stroke-width: 1; }
.dg .n--end { stroke: var(--fg-label); }
.dg .n--live { stroke: var(--signal); }
.dg .n--dash { stroke-dasharray: 4 3; }
.dg .cell { fill: none; stroke: var(--line); stroke-width: 1; }
.dg .lane { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 4; }
.dg .e { fill: none; stroke: var(--fg-label); stroke-width: 1.25; marker-end: url(#ah); }
.dg .e--live { stroke: var(--signal); stroke-width: 1.5; marker-end: url(#ah-live); }
.dg .e--both { marker-start: url(#ah); }
.dg .e--live.e--both { marker-start: url(#ah-live); }
.dg .e--dash { stroke-dasharray: 4 4; }
.dg .e--plain { marker-end: none; }
.dg .x { fill: none; stroke: var(--fg-2); stroke-width: 1.5; stroke-linecap: square; }
.dg .ph { fill: none; stroke: var(--fg-label); stroke-width: 1.25; }
.dg .ph-bar { stroke: var(--fg-label); stroke-width: 1.25; stroke-linecap: round; }
.dg .dot, .dg .mk--live { fill: var(--signal); }
.dg .mk { fill: var(--fg-label); }
.dg .mk--hollow { fill: none; stroke: var(--fg-label); stroke-width: 1; }
.dg .mk--off { fill: var(--fg-3); }
.dg .ok { fill: none; stroke: var(--fg-2); stroke-width: 1.5; stroke-linecap: square; }
.dg .tg rect { fill: none; stroke: var(--fg-2); stroke-width: 1; }
.dg .tg text { font-size: 10px; letter-spacing: .06em; fill: var(--fg); }
.dg .pk { fill: var(--signal); }
.dg .pk--ink { fill: var(--fg-2); }
.dg .badge rect { fill: var(--bg); stroke: var(--line-2); }
.dg .badge text { font-size: 10.5px; fill: var(--fg-2); }
/* The accent means one of two things, in every figure of every system page, and each has its own mark:
   - calls a model: a red line or a red box outline (Fig. 1's legend: 'Calls a model'; Fig. 2's lines);
   - ready: the red square, ■, and only it (the legends' 'Ready'). No other square is red: a box that calls a model
     is marked by its outline, never by a square, and a ready box's outline stays ink (only its ■ is red).
   Anything else that a figure has to single out (a decision made in code, the two-run path, what the agent writes)
   is strong ink: --fg at 1.5 px (.e--path, .n--path), with its own legend in ink. Refusals and barriers are ink too,
   never red: an engineer reads red plus 'refused' as a failure.
   Fig. 2 draws step by step in ink; the accent stays on the steps that call a model and on the ready square the job
   ends in (the pilot: plan, the verify-first run, exploration and run 1, then the pull request's ■; the commit itself
   is the service's, in ink). A step's branch (the dashed exit to 'already passing') stays in ink.
   One exception, by design: a state diagram (the pilot's Fig. 3) keeps the accent for ready alone and draws the path
   to it in strong ink, so the states that call a model (verify, explore, run 1) carry no mark there; its legend
   doesn't claim 'Calls a model' or 'No model', and run 2 keeps its NO MODEL tag. */
.dg .step .spine { fill: none; stroke: var(--line-2); stroke-width: 1.25; }
.dg .step .spine--live { stroke: var(--signal); }
.dg .a--live { fill: var(--signal-text); }
.dg .ok--live { stroke: var(--signal); }
.dg .e--path { stroke: var(--fg); stroke-width: 1.5; marker-end: url(#ah-ink); }
.dg .e--path.e--both { marker-start: url(#ah-ink); }
.dg .n--path { stroke: var(--fg); stroke-width: 1.5; }
.dg .el--path { fill: var(--fg-2); }
/* a label that crosses a lifeline sits on the frame's colour */
.dg .halo { paint-order: stroke fill; stroke: var(--figbg); stroke-width: 6px; stroke-linejoin: round; }
.dg .s--fg { fill: var(--fg); }
/* Portrait type: a narrower drawing shown at up to 440 px, so the same type sizes in user units read the same */
.dg.portrait .t { font-size: 15px; }
.dg.portrait .el { font-size: 10.5px; }
.dg.portrait .r { font-size: 10.5px; }
.dg.portrait .s { font-size: 10px; }
/* a landscape drawing at 900-1099 px is shown at 0.82-0.91 of its size: its small type steps up so nothing reads under 9 px */
@media (min-width: 900px) and (max-width: 1099px) {
  .fig-frame { padding: 18px 14px; }
  .dg.landscape text:not([class]), .dg.landscape .el { font-size: 12px; }
  .dg.landscape .s { font-size: 11px; }
  .dg.landscape .tg text { font-size: 11px; }
  .dg.landscape .badge text { font-size: 11.5px; }
}

/* ---------- tables: the design doc's. Mono heads, Archivo cells; stacked into labelled blocks on phones ---------- */
.tbl-wrap { margin: 1.6em 0 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.tbl caption { text-align: left; }
.tbl th { font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-label); text-align: left; padding: 0 24px 10px 0; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 14px 24px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--fg-2); text-wrap: pretty; }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; }
.tbl td b { color: var(--fg); font-weight: 560; }
.tbl--risk td:first-child { width: 42%; color: var(--fg); }
.tbl--dec td:first-child { width: 38%; }
.tbl--dec td:nth-child(2) { width: 30%; }
@media (max-width: 760px) {
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: auto !important; }
  .tbl tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .tbl tbody tr:first-child { border-top: 1px solid var(--line-2); }
  .tbl td { padding: 0; border: 0; }
  .tbl td + td { margin-top: 8px; }
  .tbl td[data-k]::before { content: attr(data-k); display: block; margin-bottom: 2px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-label); }
}

/* ---------- results: the .md's two bullets, verbatim, after the landing's diff, which carries only the metrics: the old
   value struck by scroll, then the new one printed (the landing's type sizes for the struck and printed lines) ---------- */
.difflist { list-style: none; margin: 1.6em 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 40px); border-top: 1px solid var(--line-2); }
.diff { display: grid; gap: 10px; align-content: start; padding: clamp(22px, 2.6vw, 32px) 0; border-bottom: 1px solid var(--line); min-width: 0; }
.diff .val { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px .4em; }
.diff del { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.3; color: var(--fg-2); white-space: nowrap; }
.diff .to { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.3; color: var(--fg-label); }
.diff .print { font-weight: 620; font-size: clamp(24px, 2.5vw, 36px); line-height: 1.06; letter-spacing: -.03em; color: var(--fg); white-space: nowrap; }
.diff .per { margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-label); line-height: 1.6; }
.flow > .difflist + ul.points { margin-top: 1.4em; }
@media (max-width: 479px) { .difflist { grid-template-columns: minmax(0, 1fr); } }
del, ins { text-decoration: none; }
.strike-wrap { position: relative; }
.bar { position: absolute; height: 2px; background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
html:not(.js) del { text-decoration: line-through; text-decoration-color: var(--signal); text-decoration-thickness: 2px; color: var(--fg-label); }
html.js del.strike { color: transparent; background-image: linear-gradient(90deg, var(--fg-label) 0, var(--fg-label) var(--strike, 0%), var(--fg-2) var(--strike, 0%), var(--fg-2) 100%); -webkit-background-clip: text; background-clip: text; }
.print { --p: -8; --rx: .05em; --ro: .7; position: relative; display: block; isolation: isolate; text-wrap: balance; }
.print > span { position: relative; z-index: 1; }
html.js .print > span { color: transparent; background-image: linear-gradient(90deg, var(--fg) 0, var(--fg) calc(var(--p) * 1% - 5%), var(--fg-3) calc(var(--p) * 1% + 5%), var(--fg-3) 100%); -webkit-background-clip: text; background-clip: text; }
html.js .print::before { content: attr(data-text); content: attr(data-text) / ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; color: var(--signal); opacity: var(--ro); transform: translateX(var(--rx)); }

/* ---------- end matter: the next system and the way to reach Fran ---------- */
.end { margin: 5.4em 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.end > section { padding: 26px 40px 4px 0; display: grid; gap: 12px; align-content: start; min-width: 0; }
.end > section + section { padding: 26px 0 4px 40px; border-left: 1px solid var(--line); }
.end h2 { margin: 0; font-weight: 620; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.05; letter-spacing: -.03em; color: var(--fg); text-wrap: balance; max-width: 10.5em; }
.end h2 em { font-style: normal; color: var(--signal); }
.end p { margin: 0; }
.end p:not(.label) { font-size: 17px; line-height: 1.5; color: var(--fg-2); text-wrap: pretty; }
.go { justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--fg); text-decoration: none !important; padding-block: 6px; border-bottom: 1px solid var(--signal); }
.go svg { width: 12px; height: 12px; flex: none; }
.reach { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.email { font-size: clamp(19px, 1.7vw, 22px); font-weight: 560; letter-spacing: -.015em; color: var(--fg); user-select: all; overflow-wrap: anywhere; }
.copy { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); background: transparent; color: var(--fg); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; cursor: pointer; transition: border-color .2s ease; }
.copy:hover { border-color: var(--fg); }
.reach a { font-size: 16px; font-weight: 600; color: var(--fg); text-decoration: none !important; border-bottom: 1px solid var(--signal); padding-bottom: 2px; }
@media (max-width: 760px) { .end { grid-template-columns: minmax(0, 1fr); } .end > section, .end > section + section { padding: 24px 0 8px; border-left: 0; } .end > section + section { border-top: 1px solid var(--line); margin-top: 16px; } }

.foot { background: var(--bg); }
.foot .in { padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--fg-2); }

/* cross-document transition, for when the landing opts in too: the kicker flies from the chapter card */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: .2s; animation-timing-function: cubic-bezier(.33, 0, .2, 1); }
::view-transition-new(root) { animation-duration: .28s; animation-timing-function: cubic-bezier(.33, 0, .2, 1); }
::view-transition-group(kicker) { animation-duration: .7s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .mast, .mast-cta, .mast nav a, .theme-btn, .toc a, .back, .copy, .flow a, .toc-m summary::after { transition: none; }
}
