/* Documentation pages (notes.html, journey.html). Loaded after styles.css and reuses
   its variables, top bar, cards and tables. No inline styles anywhere: the server's
   CSP forbids them, so every visual rule lives here. Works offline: the font stacks
   fall back to locally installed faces. */

/* styles.css locks the SPA to one viewport; documents scroll. */
body.doc-page { display: block; height: auto; min-height: 100vh; overflow: visible; font-size: 14px; line-height: 1.62; }
body.doc-page .topbar { position: sticky; top: 0; z-index: 40; }
.doc-nav { margin-left: auto; }
.view-nav a { display: inline-block; padding: 5px 13px; border-radius: 6px; color: var(--muted); font-size: 12.5px; text-decoration: none; }
.view-nav a:hover { color: var(--ink); }
.view-nav a.on { background: var(--paper2); color: var(--ink); box-shadow: var(--shadow); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 8px; z-index: 50; background: var(--paper2); padding: 6px 10px; border: 1px solid var(--line2); border-radius: 6px; }

/* layout: sticky contents rail + reading column */
.doc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 34px; max-width: 1180px; margin: 0 auto; padding: 26px 28px 80px; }
.toc { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 84px); overflow-y: auto; font-size: 12.5px; padding-right: 6px; }
.toc h2 { font-family: "Inter", sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--ink2); text-decoration: none; border-left: 2px solid transparent; }
.toc a:hover { background: var(--paper2); border-left-color: var(--clay); color: var(--ink); }
.doc-main { min-width: 0; max-width: 880px; }

/* typography */
.doc-main h1 { font-size: 34px; line-height: 1.15; margin: 4px 0 10px; }
.doc-main h2 { font-size: 24px; margin: 0 0 10px; }
.doc-main h3 { font-size: 17px; margin: 22px 0 8px; }
.doc-main h4 { font-family: "Inter", sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin: 16px 0 6px; }
.doc-main p { margin: 0 0 12px; }
.doc-main ul, .doc-main ol { margin: 0 0 12px; padding-left: 22px; }
.doc-main li { margin: 4px 0; }
.doc-main a { color: var(--clay); }
.doc-main code, .doc-main kbd { font-family: "Roboto Mono", monospace; font-size: 12px; background: var(--paper); border: 1px solid var(--line); padding: 0 5px; border-radius: 4px; }
.eyebrow { color: var(--clay); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.lede { font-size: 16px; color: var(--ink2); max-width: 760px; }
.doc-section { padding: 26px 0 8px; border-top: 1px solid var(--line); margin-top: 18px; scroll-margin-top: 64px; }
.doc-section:first-of-type { border-top: none; margin-top: 0; }
.sec-num { font-family: "Roboto Mono", monospace; color: var(--faint); font-size: 12px; margin-right: 6px; }
.small { font-size: 12.5px; }
.note { color: var(--muted); font-size: 12.5px; }

/* callouts */
.callout { background: var(--paper2); border: 1px solid var(--line); border-left: 3px solid var(--clay); border-radius: 8px; padding: 11px 14px; margin: 12px 0 16px; }
.callout.ok { border-left-color: var(--olive); }
.callout.warn { border-left-color: var(--gold); }
.callout.info { border-left-color: var(--slate); }
.callout p:last-child { margin-bottom: 0; }
.changed { background: #fbf3e4; border: 1px dashed var(--gold); border-radius: 8px; padding: 9px 13px; margin: 10px 0 14px; font-size: 13px; }
.changed b.was { color: var(--muted); font-weight: 600; text-decoration: line-through; }
.changed b.now { color: var(--ink); }

/* status labels: light pills, colour plus icon, used once per section heading */
.st { display: inline-block; font-family: "Inter", sans-serif; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; padding: 0 7px 0 6px; line-height: 17px; border-radius: 20px; vertical-align: 3px; white-space: nowrap; border: 1px solid var(--line2); background: transparent; color: var(--muted); }
.st::before { margin-right: 4px; font-size: 9px; }
.st-built { color: #3f6e3e; border-color: #c6dbc5; }
.st-built::before { content: "\25CF"; color: var(--olive); }
.st-inproc { color: #2f6291; border-color: #c3d6e8; }
.st-inproc::before { content: "\25D0"; color: var(--slate); }
.st-designed { color: #7a5e10; border-style: dashed; border-color: #d9c27e; }
.st-designed::before { content: "\25CB"; color: var(--gold); }
.st-partial { color: #8a4a2a; border-color: #e5c8b5; }
.st-partial::before { content: "\25D1"; color: var(--clay); }
.st-open { color: var(--rust); border-color: #e6c0b6; }
.st-open::before { content: "\25B2"; color: var(--rust); }
.doc-main h2 .st, .doc-main h3 .st { margin-left: 6px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 12px; margin: 8px 0 4px; color: var(--muted); }

/* small "teaching numbers" / "measured" tags */
.tag-n { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 0 6px; border-radius: 4px; vertical-align: 1px; }
.tag-n.teach { background: #f1ebe0; color: var(--muted); }
.tag-n.meas { background: #e3edf6; color: #2f6291; }

/* the persistent request state board */
.step-row { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; align-items: start; margin: 14px 0 6px; }
.step-row h3 { margin-top: 2px; }
.board { background: var(--paper2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 6px; font-size: 11.5px; }
.board .bh { font-family: "Inter", sans-serif; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; margin-bottom: 4px; }
.board dl { margin: 0; }
.board .f { display: grid; grid-template-columns: 84px 1fr; gap: 6px; padding: 2px 4px; border-radius: 5px; border-left: 2px solid transparent; }
.board dt { color: var(--faint); }
.board dd { margin: 0; color: var(--ink2); }
.board .f.empty dd { color: var(--line2); }
.board .f.chg { background: var(--clay-soft); border-left-color: var(--clay); }
.board .f.chg dd { color: var(--ink); font-weight: 600; }
.board .f.bad dd { color: var(--rust); font-weight: 600; }
.board.wide { max-width: 330px; }

/* three questions: permission, feasibility, commitment */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 16px; }
.trio > div { background: var(--paper2); border: 1px solid var(--line); border-top: 3px solid var(--slate); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.trio > div:nth-child(2) { border-top-color: var(--gold); }
.trio > div:nth-child(3) { border-top-color: var(--olive); }
.trio .q { font-family: "Fraunces", Georgia, serif; font-size: 18px; line-height: 1.2; }
.trio .who { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 2px; }
.trio .fail { font-family: "Roboto Mono", monospace; font-size: 11.5px; color: var(--rust); }

/* "how this maps to the running system" box */
.mapbox { background: #f4f1ea; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 14px 4px; margin: 12px 0 18px; font-size: 12.5px; }
.mapbox h4 { margin-top: 2px; }
.mapbox table { width: 100%; border-collapse: collapse; margin: 4px 0 8px; }
.mapbox th, .mapbox td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mapbox th { color: var(--muted); font-weight: 600; font-size: 11px; }
.mapbox tr:last-child td { border-bottom: none; }

/* hero request diagram and shared diagram parts */
.hero { margin-top: 6px; }
.rq-q { fill: var(--ink); }
.rq-qt { font-family: "Inter", sans-serif; font-size: 12px; font-weight: 700; fill: #fff; letter-spacing: .05em; }
.rq-ok { fill: var(--olive); font-family: "Inter", sans-serif; font-size: 13px; font-weight: 700; }
.rq-res { font-family: "Roboto Mono", monospace; font-size: 11px; fill: var(--ink2); }
.rq-band { font-family: "Inter", sans-serif; font-size: 10.5px; fill: var(--faint); text-transform: uppercase; letter-spacing: .07em; }
.rq-bar { stroke: var(--line2); stroke-width: 1.2; fill: none; }
.rq-head { font-family: "Fraunces", Georgia, serif; font-size: 17px; fill: var(--ink); }
.dg-box.cast { fill: #fffdf8; stroke: var(--ink2); }
.dg-box.relay { fill: #fdfaf4; stroke: var(--slate); }
.dg-box.runner { fill: #fdfaf4; stroke: var(--olive); stroke-width: 1.6; }
.dg-box.grant { fill: #fdfaf4; stroke: var(--clay); stroke-width: 1.6; }
.dg-box.dim { fill: var(--paper); stroke: var(--line2); }
.dg-box.designed { fill: #fbf6e6; stroke: var(--gold); stroke-dasharray: 5 4; }
.dg-cap { font-family: "Roboto Mono", monospace; font-size: 11px; font-weight: 700; fill: var(--clay); }
.dg-capc { fill: var(--paper2); stroke: var(--clay); stroke-width: 1.2; }
.dg-lane { fill: none; stroke: var(--line2); stroke-width: 1; }
.dg-lane.designed { fill: #fdf9ee; stroke: var(--gold); stroke-dasharray: 6 5; }
.dg-lane.inproc { fill: #f6f9fc; stroke: #c3d6e8; }
.dg-lane.live { fill: #f6faf5; stroke: #c6dbc5; }
.dg-edge.thick { stroke: var(--clay); stroke-width: 3; }
.dg-edge.rev { stroke: var(--slate); stroke-width: 1.6; stroke-dasharray: 5 4; }
.dg-edge.faint { stroke: var(--line2); }
.dg-edge.designed { stroke: var(--gold); stroke-dasharray: 5 4; }
.dg-edge.cut { stroke: var(--rust); stroke-width: 1.4; stroke-dasharray: 3 4; }
.dg-arrow.clay { fill: var(--clay); }
.dg-arrow.slate { fill: var(--slate); }
.dg-arrow.gold { fill: var(--gold); }
.dg-lbl.clay { fill: var(--clay); font-weight: 600; }
.dg-lbl.slate { fill: var(--slate); font-weight: 600; }
.dg-lbl.ok { fill: var(--olive); font-weight: 700; }
.dg-lbl.mut { fill: var(--muted); }
.dg-lbl.big { font-size: 13px; font-weight: 700; }
.dg-x { stroke: var(--rust); stroke-width: 2.2; }

/* unit cells: ledger demand vector, partition ownership */
.u-free { fill: var(--paper2); stroke: var(--line2); stroke-width: 1; }
.u-used { fill: var(--line2); stroke: var(--faint); stroke-width: 1; }
.u-req { fill: var(--clay-soft); stroke: var(--clay); stroke-width: 1.6; }
.u-bad { fill: #f3dcd6; stroke: var(--rust); stroke-width: 1.6; }
.u-p0 { fill: #dde8f2; stroke: var(--slate); stroke-width: 1.2; }
.u-p1 { fill: #e0ebe0; stroke: var(--olive); stroke-width: 1.2; }

/* PCA geometry */
.pca-pt { fill: var(--slate); opacity: .75; }
.pca-pt.b { fill: var(--clay); }
.pca-axis { stroke: var(--slate); stroke-width: 2; }
.pca-axis.b { stroke: var(--clay); }
.pca-axis.ghost { stroke: var(--slate); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .7; }
.pca-arc { stroke: var(--ink2); stroke-width: 1.4; fill: none; }
.pca-frame { fill: var(--paper2); stroke: var(--line); }

/* journey: vertical achievement flow and headline numbers */
.vflow { list-style: none; margin: 12px 0 16px; padding: 0; max-width: 520px; }
.vflow li { position: relative; background: var(--paper2); border: 1px solid var(--line2); border-radius: 9px; padding: 7px 12px; margin: 0 0 18px; font-size: 13px; }
.vflow li b { font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: 15.5px; }
.vflow li span { color: var(--muted); font-size: 12px; margin-left: 6px; }
.vflow li:not(:last-child)::after { content: "\2193"; position: absolute; left: 22px; bottom: -18px; color: var(--faint); font-size: 13px; line-height: 18px; }
.vflow li.hot { border-color: var(--clay); }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0; }
.unusual { font-size: 15.5px; color: var(--ink); border-left: 3px solid var(--clay); padding: 4px 0 4px 14px; margin: 18px 0; }

/* journey: one line per phase, details for the chronology */
.phases { list-style: none; margin: 12px 0; padding: 0; border-left: 2px solid var(--line2); }
.phases > li { position: relative; padding: 0 0 8px 20px; margin: 0; }
.phases > li::before { content: ""; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--olive); }
.phases > li.draft::before { background: var(--paper2); border: 2px solid var(--gold); width: 6px; height: 6px; }
.phases details > summary { cursor: pointer; list-style: none; padding: 2px 0; }
.phases details > summary::-webkit-details-marker { display: none; }
.phases details > summary::after { content: " +"; color: var(--faint); font-family: "Roboto Mono", monospace; }
.phases details[open] > summary::after { content: " \2212"; }
.phases .when { display: inline-block; min-width: 118px; font-family: "Roboto Mono", monospace; font-size: 11.5px; color: var(--faint); }
.phases .what { font-weight: 600; color: var(--ink); }
.phases .one { color: var(--ink2); }
.phases details > div { padding: 4px 0 6px 118px; font-size: 13px; color: var(--ink2); }
.phases details > div p:last-child { margin-bottom: 0; }

/* journey: bugs caught, each with a before/after micro-diagram */
.bugs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 16px; }
.bug { background: var(--paper2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.bug h3 { font-size: 14.5px; margin: 0 0 4px; }
.bug svg { width: 100%; height: auto; display: block; margin: 6px 0; }
.bug .by { color: var(--faint); font-size: 11.5px; }
.mb-lbl { font-family: "Inter", sans-serif; font-size: 10px; fill: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.mb-t { font-family: "Roboto Mono", monospace; font-size: 10.5px; fill: var(--ink2); }
.mb-bad { font-family: "Roboto Mono", monospace; font-size: 10.5px; fill: var(--rust); font-weight: 700; }
.mb-good { font-family: "Roboto Mono", monospace; font-size: 10.5px; fill: var(--olive); font-weight: 700; }
.mb-box { fill: var(--paper); stroke: var(--line2); stroke-width: 1; }
.mb-box.bad { stroke: var(--rust); fill: #fbefeb; }
.mb-box.good { stroke: var(--olive); fill: #f1f6f0; }
.mb-line { stroke: var(--ink2); stroke-width: 1.2; fill: none; }
.mb-line.bad { stroke: var(--rust); }
.mb-line.good { stroke: var(--olive); }
.mb-line.cap { stroke: var(--olive); stroke-dasharray: 4 3; }
.mb-sep { stroke: var(--line); stroke-width: 1; }

/* cards and grids */
.doc-main .card { box-shadow: none; }
.card h3 { margin-top: 0; }
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 12px 0; }
.mini { background: var(--paper2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.mini .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.mini .v { font-family: "Fraunces", Georgia, serif; font-size: 22px; line-height: 1.2; margin: 2px 0; }
.mini .u { color: var(--faint); font-size: 11.5px; }
.cast { background: var(--paper2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.cast .who { font-family: "Fraunces", Georgia, serif; font-size: 17px; }
.cast .tag { color: var(--clay); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.cast dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 8px 0 0; font-size: 12.5px; }
.cast dt { color: var(--muted); }
.cast dd { margin: 0; font-family: "Roboto Mono", monospace; font-size: 12px; }

/* flow chips: a → b → c */
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 14px; }
.chain span { background: var(--paper2); border: 1px solid var(--line2); border-radius: 7px; padding: 4px 10px; font-size: 12.5px; }
.chain span.hot { border-color: var(--clay); background: var(--clay-soft); }
.chain span.off { border-style: dashed; color: var(--muted); }
.chain i { color: var(--faint); font-style: normal; }

/* tables */
.doc-main table.cmp { margin: 10px 0 16px; background: var(--paper2); border: 1px solid var(--line); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.doc-main table.cmp th { background: var(--panel); }
.doc-main table.cmp tr:last-child td { border-bottom: none; }
.doc-main table.cmp td { vertical-align: top; }
.tbl-wrap { overflow-x: auto; }
pre.ascii { font-family: "Roboto Mono", monospace; font-size: 12px; line-height: 1.45; background: var(--paper2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 10px 0 16px; color: var(--ink2); }
.formula { font-family: "Roboto Mono", monospace; font-size: 13px; background: var(--paper2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: inline-block; margin: 4px 0 12px; }

/* SVG diagrams (all styling by class; attributes carry geometry only) */
figure.diagram { margin: 14px 0 18px; background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
figure.diagram svg { width: 100%; height: auto; display: block; }
figure.diagram figcaption { color: var(--muted); font-size: 12px; margin-top: 8px; }
.dg-box { fill: var(--paper); stroke: var(--line2); stroke-width: 1.2; }
.dg-box.svc { fill: #fdfaf4; }
.dg-box.al { stroke: var(--clay); }
.dg-box.af { stroke: var(--slate); }
.dg-box.as { stroke: var(--olive); }
.dg-box.ext { fill: #f3efe6; stroke-dasharray: 4 3; }
.dg-zone { fill: none; stroke: var(--line2); stroke-dasharray: 6 4; stroke-width: 1; }
.dg-title { font-family: "Inter", sans-serif; font-size: 13px; font-weight: 600; fill: var(--ink); }
.dg-sub { font-family: "Roboto Mono", monospace; font-size: 10.5px; fill: var(--muted); }
.dg-zl { font-family: "Inter", sans-serif; font-size: 10.5px; fill: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.dg-edge { stroke: var(--ink2); stroke-width: 1.4; fill: none; }
.dg-edge.ro { stroke: var(--faint); stroke-dasharray: 3 3; }
.dg-arrow { fill: var(--ink2); }
.dg-step { fill: var(--clay); }
.dg-stepn { font-family: "Inter", sans-serif; font-size: 10.5px; font-weight: 700; fill: #fff; }
.dg-lbl { font-family: "Inter", sans-serif; font-size: 10.5px; fill: var(--ink2); }
/* data plane (agent workload): the dataset store and the denied path */
.dg-box.dp { stroke: var(--gold); }
.dg-box.deny { stroke: var(--rust); stroke-dasharray: 4 3; }
.dg-edge.deny { stroke: var(--rust); stroke-dasharray: 4 3; }
.dg-lbl.deny { fill: var(--rust); font-weight: 600; }
/* wide data tables (agent roster, agent measurements) */
.doc-main table.cmp.compact th, .doc-main table.cmp.compact td { padding: 6px 7px; }
.doc-main table.cmp td.nowrap, .doc-main table.cmp.compact td.num { white-space: nowrap; }
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { position: relative; padding-left: 34px; margin: 8px 0; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--clay); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* charts (single-series bars; native SVG <title> tooltips) */
.chart-fig { margin: 12px 0 6px; }
.bar { fill: var(--clay); }
.bar.alt { fill: var(--slate); }
.bar.ok { fill: var(--olive); }
.bar.warn { fill: var(--gold); }
.bar:hover { opacity: .8; }
.bar-track { fill: var(--line); }
.ax { font-family: "Roboto Mono", monospace; font-size: 10.5px; fill: var(--muted); }
.ax-l { font-family: "Inter", sans-serif; font-size: 11.5px; fill: var(--ink2); }
.ax-v { font-family: "Roboto Mono", monospace; font-size: 11px; fill: var(--ink); }
.gridline { stroke: var(--line); stroke-width: 1; }
details.data { margin: 4px 0 14px; font-size: 12.5px; }
details.data summary { cursor: pointer; color: var(--muted); }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 14px 0; border-left: 2px solid var(--line2); }
.timeline > li { position: relative; padding: 0 0 18px 22px; margin: 0; }
.timeline > li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper2); border: 2px solid var(--clay); }
.timeline > li.done::before { background: var(--olive); border-color: var(--olive); }
.timeline > li.draft::before { background: var(--gold); border-color: var(--gold); }
.timeline .when { font-family: "Roboto Mono", monospace; font-size: 11.5px; color: var(--faint); }
.timeline .what { font-family: "Fraunces", Georgia, serif; font-size: 17px; margin: 0 0 4px; }

/* rule cards (journey) */
.rule { background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.rule h3 { margin: 0 0 6px; }
.rule .why { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; color: var(--ink2); }
.rule .why b { color: var(--clay); }
.labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.labels div { background: var(--paper2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; }
.labels b { font-family: "Roboto Mono", monospace; font-size: 11.5px; display: block; }

.doc-foot { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; padding: 18px 16px 60px; }
  .toc { position: static; max-height: none; }
  .cards2, .cards3, .cards4, .labels, .trio, .bugs, .step-row { grid-template-columns: 1fr; }
  .phases details > div { padding-left: 0; }
  body.doc-page .brand-sub { display: none; }
}
@media print {
  body.doc-page .topbar, .toc { display: none; }
  .doc-layout { display: block; }
}

/* shared SVG marker definitions live in one zero-size inline svg per page */
svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.dg-title.sm { font-size: 11.5px; }
.dg-sub.sm { font-size: 9.5px; }
details.gloss { margin: 10px 0 14px; }
details.gloss > summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* deployment and code chapters: sequence lifelines, notes, module layers, component blocks */
.dg-life { stroke: var(--line2); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.dg-note { fill: var(--paper2); stroke: var(--line2); stroke-width: 1; }
.dg-edge.ret { stroke: var(--muted); stroke-dasharray: 5 3; }
.dg-box.l3 { fill: #fdfaf4; stroke: var(--clay); }
.dg-box.l2 { fill: #fdfaf4; stroke: var(--gold); }
.dg-box.l1 { fill: #f6f9fc; stroke: var(--slate); }
.dg-box.l0 { fill: #f6faf5; stroke: var(--olive); }
details.comp { background: var(--paper2); border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; margin: 12px 0; }
details.comp > summary { cursor: pointer; padding: 8px 0; font-size: 14.5px; }
details.comp[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
details.comp figure.diagram { background: var(--paper); }
