/* Dark palettes follow html[data-theme], resolved by /assets/skins.js from the skin mode or the OS. */
.architecture-model{--architecture-page:#f7f5ee;--architecture-surface:#fffdf6;--architecture-alt:#e7f0e8;--architecture-ink:#17231b;--architecture-muted:#536158;--architecture-line:#93a79e;position:relative;display:grid;width:100%;gap:18px;margin:0;padding:20px;border:1px solid var(--architecture-line);border-radius:10px;background:var(--architecture-page);color:var(--architecture-ink);--architecture-added:#1f7a4d;--architecture-added-fill:#dff3e6;--architecture-changed:#a6690b;--architecture-changed-fill:#fbefd2}
.architecture-model-head{padding-right:0}.architecture-model-head h2{margin:0;font-size:20px}.architecture-model-head>p{max-width:760px;margin:3px 0 0;color:var(--architecture-muted)}
.architecture-model-stage{min-width:0}.architecture-model-canvas{position:relative;display:grid;min-width:0;gap:8px;isolation:isolate}/* Excessive Code places detail in clear canvas space; a dense diagram reserves a separate detail area. */.architecture-model-scroll{padding-right:320px;overflow-x:auto;border:1px solid var(--architecture-line);border-radius:9px;background:var(--architecture-page)}@media(max-width:780px){.architecture-model-scroll{padding-right:0}}.architecture-model-svg{display:block;min-width:0}.architecture-model-svg svg{display:block;max-width:none}.architecture-model-svg-dark,html[data-theme="dark"] .architecture-model-svg-light,.architecture-model-detail[hidden],.releases-page .architecture-model-detail.has-source>p:not(.release-background-description){display:none}.architecture-model-svg svg text{-webkit-user-select:text;user-select:text}.architecture-model-svg [data-node-id],.architecture-model-edge{cursor:pointer}.architecture-model-svg [data-node-id]:is(:hover,:focus-visible),.architecture-model-page-link:focus-visible,.architecture-model-detail:focus-visible{outline:2px solid var(--architecture-ink);outline-offset:2px}.architecture-model-failure{margin:0;padding:8px 10px;border:1px solid #b42318;border-radius:7px;background:var(--architecture-surface);color:#b42318;font-size:12px}.architecture-model-detail{position:absolute;box-sizing:border-box;max-width:calc(100% - 16px);z-index:3;top:20px;right:20px;display:grid;width:300px;height:180px;gap:6px;overflow:auto;padding:10px;border:1px solid var(--architecture-line);border-radius:9px;background:var(--architecture-surface);box-shadow:0 6px 18px rgba(23,55,47,.12)}.architecture-model-canvas>.architecture-model-detail.is-docked{position:relative;inset:auto!important;width:100%;max-width:100%;margin:0;box-shadow:none}.architecture-model-detail h3{display:flex;align-items:center;gap:8px;margin:0;font:800 13px/1.25 ui-monospace,monospace}.architecture-model-detail p{margin:0;color:var(--architecture-muted);font-size:12px;line-height:1.4}.architecture-model-detail-empty{font-style:italic}.architecture-model-detail-state{padding:1px 6px;border-radius:999px;font:700 9px/1.4 ui-monospace,monospace;text-transform:uppercase;background:var(--architecture-alt)}.architecture-model-page-links{display:grid;justify-items:start;gap:4px}.architecture-model-page-link{padding:5px 9px;border:1px solid var(--architecture-line);border-radius:6px;background:var(--architecture-alt);color:var(--architecture-ink);font:700 11px/1.2 ui-monospace,monospace;text-decoration:none}.architecture-model-page-link:hover{background:var(--architecture-surface)}
.architecture-model-mount{--architecture-page:#f7f5ee;--architecture-surface:#fffdf6;--architecture-alt:#e7f0e8;--architecture-ink:#17231b;--architecture-muted:#536158;--architecture-line:#93a79e;display:grid;gap:0}
.architecture-model-compact{width:min(1240px,calc(100vw - 32px));max-height:86vh;overflow:auto;box-shadow:0 18px 54px rgba(16,47,59,.28)}.architecture-model-compact .architecture-model-head p{font-size:12px}
@media(max-width:780px){.architecture-model{padding:14px}.architecture-model-head{min-height:0;padding-right:0}.architecture-model-detail{position:static;width:auto;height:180px;margin-top:10px;box-shadow:none}}
html[data-theme="dark"] .architecture-model-mount,html[data-theme="dark"] .architecture-model{--architecture-page:#0e1511;--architecture-surface:#17201a;--architecture-alt:#20382b;--architecture-ink:#edf4ee;--architecture-muted:#a9b7ad;--architecture-line:#536158}html[data-theme="dark"] .architecture-model-svg-dark{display:block}
.architecture-model-svg [data-node-id][data-diff="added"]>rect{fill:var(--architecture-added-fill);stroke:var(--architecture-added);stroke-width:3}.architecture-model-svg [data-node-id][data-diff="changed"]>rect{fill:var(--architecture-changed-fill);stroke:var(--architecture-changed);stroke-width:3}.architecture-model-svg g[data-edge-source][data-diff="added"]>path{stroke:var(--architecture-added);stroke-width:3}.architecture-model-svg g[data-edge-source][data-diff="changed"]>path{stroke:var(--architecture-changed);stroke-width:3}.architecture-model-svg g[data-edge-source][data-diff="added"]>rect{fill:var(--architecture-added-fill)}.architecture-model-svg g[data-edge-source][data-diff="changed"]>rect{fill:var(--architecture-changed-fill)}.architecture-model-svg [data-container-id][data-diff="changed"]>text{fill:var(--architecture-changed)}
html[data-theme="dark"] .architecture-model{--architecture-added:#7fd6a5;--architecture-added-fill:#1d4630;--architecture-changed:#f0c26b;--architecture-changed-fill:#4a3a12}
.architecture-model{--architecture-incident:#b42318;--architecture-incident-fill:#fdecea}html[data-theme="dark"] .architecture-model{--architecture-incident:#ff8a7a;--architecture-incident-fill:#4a1f1a}
.architecture-model-svg [data-node-id][data-incident="true"]>rect{stroke:var(--architecture-incident);stroke-width:3.5}.architecture-annotation-button[data-kind="incident"]{border:1px solid var(--architecture-incident);background:var(--architecture-incident-fill);color:var(--architecture-ink)}
.architecture-model-detail-owner{color:var(--architecture-muted);font:700 10px/1.3 ui-monospace,monospace}
/* An edge is path + label + invisible hit lane; hovering any part heats all of them. */.architecture-model-edge-hit,.architecture-model-svg [aria-pressed]:focus:not(:focus-visible){outline:none}path.architecture-model-edge:not(.architecture-model-edge-hit).is-hot,path.architecture-model-edge:not(.architecture-model-edge-hit)[aria-pressed="true"]{stroke-width:4}g.architecture-model-edge.is-hot rect{stroke:#0b7a5a;stroke-width:1.5}.architecture-model-detail-endpoints{color:var(--architecture-muted);font:600 10px/1.3 ui-monospace,monospace;letter-spacing:.02em;text-transform:uppercase}.architecture-model-detail-description{margin-top:4px;color:var(--architecture-ink);font-size:13px;line-height:1.45}.architecture-model-detail-members{margin-top:6px;color:var(--architecture-muted);font-size:11px;line-height:1.4}.architecture-model-boundary{cursor:pointer;outline:none}.architecture-model-boundary:is(:hover,:focus-visible)>rect,.architecture-model-boundary[aria-pressed="true"]>rect{stroke-width:3}path.architecture-model-edge:not(.architecture-model-edge-hit)[aria-pressed="true"],.architecture-model-boundary[aria-pressed="true"]>rect{stroke:#0b7a5a}

/* Pinning controls expansion; hover only selects the compact preview. */
.architecture-model-detail{transition:width 200ms ease,height 200ms ease;align-content:start}
.architecture-model-detail.is-pinned{width:min(360px,calc(100% - 40px));height:min(var(--architecture-detail-height,180px),70vh)}
@media(max-width:780px){.architecture-model-detail.is-pinned{width:auto;height:min(var(--architecture-detail-height,180px),60vh)}}
@media(prefers-reduced-motion:reduce){.architecture-model-detail{transition:none}}
.architecture-model-svg [data-node-id][aria-pressed="true"]>rect{stroke:var(--architecture-ink);stroke-width:3}
/* Mouse focus must not look pinned after aria-pressed is cleared. Keep keyboard focus visible. */
.agent-architecture-document{margin:0;background:#edf5ef;color:#17372f;font:16px/1.6 system-ui,sans-serif}.agent-architecture-document main{max-width:960px;margin:auto;padding:24px}.agent-architecture-document nav{display:flex;gap:24px;flex-wrap:wrap}.agent-architecture-document a{color:#285f49}.agent-architecture-document h1{font-size:1.5rem}.agent-architecture-document platform-markdown-page{display:block;overflow-wrap:anywhere}
html[data-theme="dark"] .agent-architecture-document{background:#10251f;color:#edf6ea}html[data-theme="dark"] .agent-architecture-document a{color:#a9d9bc}
.architecture-model-notice{margin:8px 16px;padding:10px 12px;background:var(--architecture-alt);color:var(--architecture-ink);border:1px solid var(--architecture-line);border-radius:8px;font-size:13px}
.architecture-model-table-wrap{margin:16px;overflow-x:auto}
.architecture-model-table{width:100%;border-collapse:collapse;background:var(--architecture-surface);color:var(--architecture-ink);font-size:13px;line-height:1.5}
.architecture-model-table caption{text-align:left;font-weight:700;padding:8px 0;color:var(--architecture-ink)}
.architecture-model-table th,.architecture-model-table td{padding:9px 12px;border:1px solid var(--architecture-line);text-align:left;vertical-align:top;min-width:150px}
.architecture-model-table thead th{background:var(--architecture-alt);color:var(--architecture-ink)}
.architecture-model-table tbody th{width:24%;font-weight:600}
@media(max-width:600px){.architecture-model-table-wrap{margin:10px}.architecture-model-table th,.architecture-model-table td{min-width:120px;padding:7px}}
.releases-page{max-width:1240px;margin:0 auto;color:var(--ink);min-width:0}.releases-page h1{font-size:20px;margin:0 0 12px}.releases-page .architecture-model-head{min-height:0;padding-right:0}.releases-page .architecture-model-detail.has-source.is-pinned{width:min(850px,calc(100% - 40px));height:min(720px,78vh);max-height:78vh}.release-source{min-width:0;border-top:1px solid var(--architecture-line);padding-top:9px}.release-source summary{cursor:pointer;font-weight:700;color:var(--architecture-ink)}.release-source-path{overflow-wrap:anywhere;font-family:ui-monospace,monospace!important}.release-source-code{margin:8px 0 0;max-width:100%;overflow:auto;padding:12px;background:var(--architecture-page);color:var(--architecture-ink);border:1px solid var(--architecture-line);border-radius:6px;font:12px/1.5 ui-monospace,monospace;tab-size:2;white-space:pre}.release-source-code code{font:inherit}.release-source-retry{padding:5px 9px;background:var(--architecture-alt);color:var(--architecture-ink);border:1px solid var(--architecture-line);border-radius:6px}.release-source-code .c,.release-source-code .c1,.release-source-code .ch,.release-source-code .cm{color:#526c5c}.release-source-code .k,.release-source-code .kn,.release-source-code .kd,.release-source-code .kc,.release-source-code .ow{color:#793ba4;font-weight:600}.release-source-code .s,.release-source-code .s1,.release-source-code .s2,.release-source-code .sd,.release-source-code .si{color:#216a42}.release-source-code .nb,.release-source-code .nf,.release-source-code .nc{color:#17618a}.release-source-code .m,.release-source-code .mi,.release-source-code .mf,.release-source-code .nv{color:#8d4b12}
html[data-theme="dark"] .release-source-code .c,html[data-theme="dark"] .release-source-code .c1,html[data-theme="dark"] .release-source-code .ch,html[data-theme="dark"] .release-source-code .cm{color:#a6bdad}html[data-theme="dark"] .release-source-code .k,html[data-theme="dark"] .release-source-code .kn,html[data-theme="dark"] .release-source-code .kd,html[data-theme="dark"] .release-source-code .kc,html[data-theme="dark"] .release-source-code .ow{color:#d2adf2}html[data-theme="dark"] .release-source-code .s,html[data-theme="dark"] .release-source-code .s1,html[data-theme="dark"] .release-source-code .s2,html[data-theme="dark"] .release-source-code .sd,html[data-theme="dark"] .release-source-code .si{color:#9cdeb1}html[data-theme="dark"] .release-source-code .nb,html[data-theme="dark"] .release-source-code .nf,html[data-theme="dark"] .release-source-code .nc{color:#8dcbe9}html[data-theme="dark"] .release-source-code .m,html[data-theme="dark"] .release-source-code .mi,html[data-theme="dark"] .release-source-code .mf,html[data-theme="dark"] .release-source-code .nv{color:#efbc86}
@media(max-width:780px){.releases-page .architecture-model-detail{width:100%;height:180px;margin:0}.releases-page .architecture-model-detail.has-source.is-pinned{width:calc(100% - 28px);height:70vh;max-height:70vh}}
.release-source-close{flex:none;padding:4px 7px;border:1px solid var(--architecture-line);border-radius:6px;background:var(--architecture-alt);color:var(--architecture-ink);font:12px system-ui,sans-serif}.release-source-header{position:sticky;top:-10px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-10px -10px 10px;padding:10px;background:var(--architecture-surface);color:var(--architecture-ink);border-bottom:1px solid var(--architecture-line)}.release-source-header h3{margin:0!important;min-width:0}.release-pseudocode-step{padding:9px 0;border-top:1px solid var(--architecture-line)}.release-pseudocode-step summary{font:13px/1.5 system-ui,sans-serif;font-weight:500}.release-pseudocode-step .release-source-path{margin:8px 0 0}.release-source-header button:focus-visible,.release-pseudocode-step summary:focus-visible,.architecture-annotation-button:focus-visible,[data-annotation-id]:focus-visible{outline:2px solid var(--architecture-ink);outline-offset:3px}
.architecture-annotation-button{justify-self:start;max-width:100%;padding:5px 9px;border:1px dashed var(--architecture-line);border-radius:7px;background:var(--architecture-alt);color:var(--architecture-ink);font:600 12px/1.4 system-ui,sans-serif;cursor:pointer;text-align:left}.architecture-annotation-button[aria-pressed="true"]{border-style:solid}
.releases-page .architecture-model-detail.has-proposal.is-pinned{width:min(620px,calc(100% - 40px));height:auto;max-height:75vh}.release-security-proposal{display:grid;gap:12px}.release-security-proposal h4{font:700 13px/1.4 system-ui,sans-serif;margin:0 0 4px}.release-security-proposal p{color:var(--architecture-ink)}g.architecture-model-edge.is-hot text,g.architecture-model-edge[aria-pressed="true"] text,.release-pseudocode-step[open]>summary,.release-proposal-status{font-weight:700}
@media(max-width:780px){.releases-page .architecture-model-detail.has-proposal.is-pinned{width:calc(100% - 28px);max-height:70vh}}
.release-timings-link{color:var(--architecture-ink);background:var(--architecture-surface);font-size:12px;text-decoration:underline;justify-self:start}
.release-reliability-detail{color:var(--architecture-ink);background:var(--architecture-surface);font:12px/1.5 system-ui,sans-serif;padding:8px 0}.release-reliability-detail p{margin:5px 0}.release-reliability-detail ul{padding-left:18px;margin:6px 0}.release-reliability-error{font:12px/1.6 system-ui,sans-serif;padding:8px 10px;border:1px solid #b77b72;border-radius:7px;margin:0 0 10px;color:#832c26;background:#fff0ec}html[data-theme="dark"] .release-reliability-error{color:#ffbdb5;background:#382621}
.system-page{grid-template-columns:minmax(0,1fr);margin:12px 0;min-width:0;padding:0 4px;color:var(--ink)}
html #surface-view:has(.system-page),html[data-fairystack-skin] #surface-view:has(.system-page){width:100%;margin:0 0 16px;box-sizing:border-box;padding:0 4px;border-color:transparent;background-color:transparent}
.system-page .architecture-model{padding:0;border:0;border-radius:0;background:transparent}.system-page-head h1{margin:0;font-size:22px;color:var(--ink)}.system-page-head p{margin:4px 0 12px;color:var(--muted);font-size:13px}.system-page-notice{margin:0 0 12px;padding:10px;border:1px solid var(--architecture-line);border-radius:8px;background:var(--architecture-surface);color:var(--architecture-ink)}
.system-page-section{scroll-margin-top:12px}.system-page-section+.system-page-section{margin-top:28px;padding-top:16px;border-top:1px solid var(--line)}.system-page-section>h2{margin:0;font-size:18px;color:var(--ink)}.system-page-section>p{margin:4px 0 12px;color:var(--muted);font-size:13px}
.architecture-model.has-viewport .architecture-model-scroll{height:clamp(280px,62vh,640px);padding-right:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y}
.architecture-model.has-viewport svg>rect{fill:var(--architecture-page)}
.architecture-model.has-viewport svg :is([data-container-id],[data-node-id])>rect{fill:var(--architecture-surface);stroke:var(--architecture-line)}
.architecture-model.has-viewport svg [data-node-id][aria-pressed=true]>rect{stroke:var(--architecture-ink)}
.architecture-model.has-viewport svg g[data-edge-source]>rect{fill:var(--architecture-alt)}
.architecture-model.has-viewport svg text{fill:var(--architecture-ink);font-family:var(--skin-font,system-ui)}
.architecture-model.has-viewport svg path[data-edge-source]:not([data-edge-hit]):not(.architecture-model-edge-hit){stroke:var(--architecture-ink)}
.architecture-model.has-viewport svg marker path{fill:var(--architecture-ink)}
.architecture-model-zoom{display:flex;gap:4px;justify-content:flex-end;margin:0 0 6px;color:var(--architecture-ink);background:transparent}
.architecture-model-zoom button{min-width:34px;min-height:32px;padding:4px 9px;border:1px solid var(--architecture-line);border-radius:6px;font:600 13px system-ui;background:var(--architecture-surface);color:var(--architecture-ink);cursor:pointer}
.architecture-model-zoom button:focus-visible,.architecture-model.has-viewport .architecture-model-scroll:focus-visible{outline:2px solid var(--architecture-ink);outline-offset:2px}
.architecture-model{--graph-annotation-surface:var(--architecture-surface);--graph-annotation-ink:var(--architecture-ink);--graph-annotation-red:#b42318;--graph-annotation-blue:#1555a5;--graph-annotation-green:#176c42}
html[data-theme="dark"] .architecture-model{--graph-annotation-red:#ff9b8c;--graph-annotation-blue:#8cbaff;--graph-annotation-green:#83d9a8}
.has-discussion-notes.has-viewport .architecture-model-scroll{height:clamp(250px,43vh,400px)}
.system-page-report{max-width:76ch;font-size:16px;margin-top:16px;background:var(--surface);color:var(--ink);line-height:1.65;overflow-wrap:anywhere}.system-page-report h2{margin-top:1.7em}.system-page-report li+li{margin-top:.85em}
.work-loop{--run-done:#2f8a3f;--run-problem:#b57f00;--run-failed:#c23a2e;--run-running:#2f6fbf;background:var(--surface);color:var(--ink);padding:16px 8px;max-width:1000px}
html[data-theme="dark"] .work-loop{--run-done:#4fbf62;--run-problem:#e0b030;--run-failed:#ec6a5c;--run-running:#6aa2ec}
.work-loop-track{position:relative;height:44px;border-bottom:1px solid var(--line)}
.work-loop-mark{display:block;position:absolute;bottom:0;width:6px;height:36px;margin-left:-3px;padding:0;border:0;border-radius:3px 3px 0 0;cursor:pointer;background:var(--run-done)}
.work-loop-mark:hover,.work-loop-mark:focus-visible,.work-loop-mark[aria-pressed=true]{height:44px;outline:2px solid var(--ink);outline-offset:1px}
.work-loop [data-outcome=problem]{background:var(--run-problem)}.work-loop [data-outcome=failed]{background:var(--run-failed)}.work-loop [data-outcome=running]{background:var(--run-running)}
.work-loop-days{position:relative;height:20px;font-size:12px;color:var(--muted)}.work-loop-days span{position:absolute;top:3px;transform:translateX(-50%);white-space:nowrap}
.work-loop-legend{margin:12px 0 0;font-size:13px;color:var(--muted)}.work-loop-dot{display:inline-block;width:9px;height:9px;border-radius:2px;margin:0 4px 0 12px;vertical-align:-1px;background:var(--run-done)}.work-loop-dot:first-child{margin-left:0}
.work-loop-detail{margin-top:14px;min-height:4em;color:var(--ink)}.work-loop-detail p{margin:2px 0;color:var(--muted)}.work-loop-detail a{color:var(--accent);margin-right:12px}
@media(max-width:600px){.system-page{padding:10px}}
.architecture-comparison{margin:14px 0 24px}.architecture-comparison table{min-width:620px;table-layout:fixed}.architecture-comparison caption{font-size:18px;padding:10px 0 14px}.architecture-comparison th:first-child{width:18%;min-width:100px}.architecture-comparison td{width:41%;font-size:13px}.architecture-comparison tr>:nth-child(3){background:var(--architecture-alt);color:var(--architecture-ink)}
.architecture-model-table-disclosure{margin:14px 0;color:var(--architecture-ink);background:var(--architecture-surface);border:1px solid var(--architecture-line);border-radius:8px;overflow:hidden}.architecture-model-table-disclosure>summary{padding:12px;cursor:pointer;font-weight:650;color:var(--architecture-ink);background:var(--architecture-alt)}.architecture-model-table-disclosure>summary:focus-visible{outline:2px solid currentColor;outline-offset:-4px}.architecture-model-table-disclosure .architecture-model-table-wrap{margin:0;padding:0 12px 12px}.architecture-model-table a{color:inherit;text-decoration:underline;text-underline-offset:3px}.architecture-model-table a:focus-visible{outline:2px solid currentColor;outline-offset:3px}
@media(max-width:600px){.architecture-model-table-stacked table{min-width:0;table-layout:auto}.architecture-model-table-stacked caption{font-size:17px;overflow-wrap:anywhere}.architecture-model-table-stacked thead{display:none}.architecture-model-table-stacked tbody,.architecture-model-table-stacked tr,.architecture-model-table-stacked td,.architecture-model-table-stacked tbody th{display:block;width:auto;min-width:0}.architecture-model-table-stacked tbody th{padding:10px;background:var(--architecture-alt);color:var(--architecture-ink)}.architecture-model-table-stacked td{padding:10px}.architecture-model-table-stacked tr+tr{margin-top:10px}}
.architecture-model-problems{margin:18px 16px;padding-left:22px;max-width:850px;color:var(--architecture-ink);background:var(--architecture-page);font:14px/1.55 system-ui,sans-serif;overflow-wrap:anywhere}
.architecture-model-problems li{margin:10px 0}
.architecture-model-problems a{color:var(--architecture-ink);background:var(--architecture-page);font-weight:650;text-decoration:underline;text-underline-offset:3px}
.architecture-model-problems a:focus-visible{outline:2px solid var(--architecture-ink);outline-offset:3px}
/* Box provisioning waterfall: measured durations on a log axis. Owner colors are set for light and dark together. */
.architecture-waterfall{--waterfall-machine:#2f6f95;--waterfall-machine-pale:#cfe2ee;--waterfall-agent:#7a4ca8;--waterfall-agent-pale:#e6daf2;--waterfall-customer:#2f7d4f;--waterfall-customer-pale:#d4ecdc;--waterfall-idle:#8a6a1f;--waterfall-idle-pale:#f1e5c6;--waterfall-failed:#b42318;--waterfall-failed-pale:#f6dcd8;--waterfall-chip-ink:#17231b;display:grid;gap:14px;margin:0 0 18px;padding:18px 20px;border:1px solid var(--architecture-line);border-radius:10px;background:var(--architecture-surface);color:var(--architecture-ink);font:14px/1.4 system-ui,sans-serif;-webkit-user-select:text;user-select:text}
html[data-theme="dark"] .architecture-waterfall{--waterfall-machine:#7fb8dc;--waterfall-machine-pale:#1f3a4b;--waterfall-agent:#c3a0e6;--waterfall-agent-pale:#3a2a4d;--waterfall-customer:#83d3a2;--waterfall-customer-pale:#1d3e2a;--waterfall-idle:#e5c16e;--waterfall-idle-pale:#46391a;--waterfall-failed:#ff8a7a;--waterfall-failed-pale:#4a1f1a;--waterfall-chip-ink:#edf4ee}
.architecture-waterfall-verdict{margin:0;font:800 19px/1.3 system-ui,sans-serif;color:var(--architecture-ink)}
.architecture-waterfall-buckets{display:flex;gap:3px;min-height:46px}.architecture-waterfall-bucket{display:grid;align-content:center;min-width:92px;padding:4px 8px;border-radius:6px;background:var(--waterfall-machine-pale);color:var(--waterfall-chip-ink);border-left:4px solid var(--waterfall-machine)}.architecture-waterfall-bucket strong{font:800 14px/1.2 ui-monospace,monospace}.architecture-waterfall-bucket small{color:var(--waterfall-chip-ink);opacity:.78;font-size:11px}
.architecture-waterfall-bucket[data-bucket="agent"]{background:var(--waterfall-agent-pale);border-color:var(--waterfall-agent)}.architecture-waterfall-bucket[data-bucket="failures"]{background:var(--waterfall-failed-pale);border-color:var(--waterfall-failed)}.architecture-waterfall-bucket[data-bucket="idle"]{background:var(--waterfall-idle-pale);border-color:var(--waterfall-idle)}
.architecture-waterfall-rows{display:grid;gap:4px;margin:0;padding:0;list-style:none}.architecture-waterfall-row{display:grid;grid-template-columns:minmax(150px,210px) minmax(160px,1fr) minmax(210px,300px);align-items:center;gap:12px;font-size:13px}
.architecture-waterfall-label{font-weight:700}.architecture-waterfall-step .architecture-waterfall-label{padding-left:16px;font-weight:500;color:var(--architecture-muted)}.architecture-waterfall-step{font-size:12px}
.architecture-waterfall-track{position:relative;height:16px;border-radius:4px;background:var(--architecture-page)}.architecture-waterfall-step .architecture-waterfall-track{height:9px}
.architecture-waterfall-worst,.architecture-waterfall-median{position:absolute;inset:0 auto 0 0;border-radius:4px}.architecture-waterfall-worst{background:var(--waterfall-machine-pale)}.architecture-waterfall-median{min-width:3px;background:var(--waterfall-machine)}
[data-owner="agent"] .architecture-waterfall-worst{background:var(--waterfall-agent-pale)}[data-owner="agent"] .architecture-waterfall-median{background:var(--waterfall-agent)}[data-owner="customer"] .architecture-waterfall-worst{background:var(--waterfall-customer-pale)}[data-owner="customer"] .architecture-waterfall-median{background:var(--waterfall-customer)}
.architecture-waterfall-numbers{display:flex;flex-wrap:wrap;gap:2px 10px;color:var(--architecture-muted);font:12px/1.3 ui-monospace,monospace}.architecture-waterfall-failed{color:var(--waterfall-failed);font-weight:800}
.architecture-waterfall-axis .architecture-waterfall-track{height:14px;background:none}.architecture-waterfall-tick{position:absolute;top:0;transform:translateX(-50%);color:var(--architecture-muted);font:11px/1 ui-monospace,monospace;white-space:nowrap}.architecture-waterfall-tick:first-child{transform:none}
@media(max-width:780px){.architecture-waterfall-row{grid-template-columns:1fr;gap:3px}.architecture-waterfall-axis{display:none}.architecture-waterfall-buckets{flex-wrap:wrap}}
.system-view-tabs{display:flex;gap:8px;margin:10px 0 14px}
.system-view-tabs button{font:inherit;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:7px;padding:6px 12px}
.system-view-tabs [aria-selected=true]{background:var(--ink);color:var(--page)}
.architecture-model-detail-grip{position:sticky;top:-10px;z-index:1;height:16px;margin:-10px -10px 0;border-radius:8px 8px 0 0;border-bottom:1px solid #8a6508;background:#b8860b;cursor:grab;touch-action:none}html[data-theme="dark"] .architecture-model-detail-grip{border-bottom-color:#5c4306;background:#9a7212}.architecture-model-detail-grip:active{cursor:grabbing}@media(max-width:780px){.architecture-model-detail-grip{display:none}}
.architecture-model-detail-image{display:block;width:100%;height:auto;margin:8px 0 0;border:1px solid var(--line);border-radius:6px;background:var(--surface)}

html[data-theme="dark"] .architecture-model-detail{background:#000;color:#fff;--architecture-surface:#000;--architecture-ink:#fff;--architecture-muted:#fff}html[data-theme="dark"] .architecture-model-detail p{color:#fff}

.tag-flow{
  --tag-flow-project:color-mix(in srgb,#0369a1 60%,var(--ink));
  --tag-flow-string:color-mix(in srgb,#b45309 60%,var(--ink));
  --tag-flow-good:color-mix(in srgb,#15803d 60%,var(--ink));
  --tag-flow-bad:color-mix(in srgb,#dc2626 50%,var(--ink));
  display:grid;grid-template-columns:minmax(0,1fr) 155px minmax(0,1fr);gap:20px;align-items:stretch;
  margin:8px 0 0;color:var(--ink);background:var(--surface);user-select:text;-webkit-user-select:text;
}
.tag-flow-service{
  --tag-flow-color:var(--accent);--tag-flow-fill:color-mix(in srgb,var(--tag-flow-color) 12%,var(--surface));
  min-width:0;padding:24px;border:2px solid color-mix(in srgb,var(--tag-flow-color) 65%,var(--line));
  border-radius:14px;background:var(--tag-flow-fill);color:var(--ink);
}
.tag-flow-service[data-service=arrowsplit]{--tag-flow-color:#2563eb}
.tag-flow-service[data-service=cyberpsychos]{--tag-flow-color:#8b5cf6}
.tag-flow-service h2{margin:0 0 24px;font-size:26px;line-height:1.2;color:var(--ink)}
.tag-flow-service h3{margin:0 0 10px;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--muted)}
.tag-flow-service code{font:500 15px/1.5 ui-monospace,monospace;overflow-wrap:anywhere}
.tag-flow-task{
  margin:0 0 26px;padding:16px;border:1px solid var(--tag-flow-project);border-radius:10px;
  background:var(--surface);color:var(--ink);
}
.tag-flow-task-value{color:var(--tag-flow-project)}
.tag-flow-task[data-missing=true]{border:2px solid var(--tag-flow-bad);background:color-mix(in srgb,var(--tag-flow-bad) 6%,var(--surface))}
.tag-flow-missing{margin:12px 0 0;font:600 13px/1.4 system-ui,sans-serif;color:var(--tag-flow-bad)}
.tag-flow-catalog-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tag-flow-count{font-weight:400;letter-spacing:0}
.tag-flow-catalog{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.tag-flow-catalog li{padding:10px 12px;border-radius:7px;border:1px solid color-mix(in srgb,var(--tag-flow-project) 28%,var(--surface));background:var(--surface);color:var(--tag-flow-project)}
.tag-flow-catalog code{color:var(--tag-flow-project)}
.tag-flow-conversation{margin:0 0 18px;min-width:0}
.tag-flow-message-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 6px}
.tag-flow-message-heading h3{margin:0}
.tag-flow-message-heading a{font-size:12px;line-height:1.4;color:var(--ink)}
.tag-flow-conversation>.tag-flow-count{margin:0 0 10px;font-size:12px;color:var(--muted)}
.tag-flow-transcript{display:grid;gap:10px;max-height:400px;overflow:auto;overscroll-behavior:contain;margin:0;padding:4px;list-style:none;scrollbar-gutter:stable;border-radius:8px}
.tag-flow-transcript li{min-width:0;padding:12px;border:1px solid color-mix(in srgb,var(--ink) 18%,var(--surface));border-radius:8px;background:var(--surface);color:var(--ink)}
.tag-flow-transcript li[data-role=operator]{margin-left:14px;background:color-mix(in srgb,var(--tag-flow-string) 7%,var(--surface));color:var(--tag-flow-string)}
.tag-flow-transcript li[data-role=agent]{margin-right:14px}
.tag-flow-transcript li[data-request=true]{border:2px solid var(--tag-flow-string)}
.tag-flow-message-label{display:flex;justify-content:space-between;gap:10px;margin-bottom:6px;font-size:11px;line-height:1.5;color:var(--muted)}
.tag-flow-request-label{color:var(--tag-flow-string);font-weight:600}
.tag-flow-message-text{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:400 14px/1.5 system-ui,sans-serif;color:inherit}
.tag-flow-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:10px}
.tag-flow-result{--tag-flow-result-ink:var(--tag-flow-string);min-width:0;padding:12px;border:1px solid var(--tag-flow-result-ink);border-radius:8px;background:var(--surface);color:var(--tag-flow-result-ink)}
.tag-flow-result[data-kind=correction]{--tag-flow-result-ink:var(--tag-flow-good)}
.tag-flow-result h3{color:var(--tag-flow-result-ink);margin:0 0 8px;letter-spacing:0}
.tag-flow-tags{display:flex;flex-wrap:wrap;gap:6px;min-width:0;color:var(--tag-flow-result-ink)}
.tag-flow-tags code{font-size:13px;color:inherit}
.tag-flow-links{display:flex;flex-direction:column;justify-content:space-around;gap:32px;padding:48px 0;color:var(--ink)}
.tag-flow-link{display:grid;justify-items:center;gap:12px;text-align:center;font-size:13px;line-height:1.4}
.tag-flow-link[data-direction=left]{color:var(--tag-flow-string)}
.tag-flow-link[data-direction=right]{color:var(--tag-flow-project)}
.tag-flow-arrow{display:block;width:100%;height:26px;color:inherit;overflow:visible}
.tag-flow [tabindex="0"]:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
@media(max-width:1000px){
  .tag-flow{grid-template-columns:minmax(0,1fr) 115px minmax(0,1fr);gap:12px}
  .tag-flow-service{padding:18px}
  .tag-flow-service code{font-size:14px}.tag-flow-tags code{font-size:13px}
}
@media(max-width:800px){
  .tag-flow{grid-template-columns:minmax(0,1fr);gap:16px}
  .tag-flow-service{padding:20px}.tag-flow-service h2{font-size:25px}
  .tag-flow-links{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:0 16px}
  .tag-flow-link{grid-template-rows:auto 60px;align-items:start}
  .tag-flow-arrow{width:60px;height:24px;transform:rotate(90deg);margin:18px 0}
}

.architecture-model-stories{width:100%;border-collapse:collapse;margin:12px 0;color:var(--architecture-ink);background:var(--architecture-surface);font-size:13px;line-height:1.4}.architecture-model-stories th{color:var(--architecture-muted);font-weight:600;text-align:left}.architecture-model-stories th,.architecture-model-stories td{padding:4px 8px;border-bottom:1px solid var(--architecture-line);vertical-align:top}.architecture-model-stories td:first-child{white-space:nowrap}
.text-pair{display:grid;grid-template-columns:1fr auto 1fr;align-items:start;gap:14px;margin:0 0 32px;padding-bottom:24px;border-bottom:1px solid var(--line)}
.text-pair-side{display:flex;flex-direction:column;gap:6px}
.text-pair-box{border:1px solid var(--line);border-radius:8px;padding:12px 14px;background:var(--surface);color:var(--ink)}
.text-pair-note{color:var(--muted);font-size:14px;text-align:center}
.text-pair-between{display:flex;flex-direction:column;align-items:center;gap:4px;padding-top:12px;color:var(--ink);font-size:14px;text-align:center}
.text-pair-between span+span{font-weight:600}
@media (max-width:560px){.text-pair{grid-template-columns:1fr}.text-pair-between{padding-top:0}}

/* A shared detail host keeps a fixed height while its content changes. */
.system-detail-host{position:sticky;top:0;z-index:1;height:28vh;min-height:150px;box-sizing:border-box;margin-bottom:8px;border-bottom:1px solid var(--line);background:var(--surface);color:var(--ink)}
/* Every other diagram page: drawings on the left, one sticky detail rail on the right (operator, 2026-10-23). */
.system-diagram-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,20%);gap:16px;align-items:start}.system-diagram-main{min-width:0}
.system-diagram-rail{position:sticky;top:8px;min-width:0;color:var(--ink);background:var(--surface)}.system-diagram-rail>.system-detail-host{margin-bottom:0;border-bottom:0}
/* Rail diagrams share Excessive Code' detail box; its slot carries links, images and badges. */
.system-diagram-rail>.system-detail-host{height:min(60vh,560px)}
.system-detail-host>graph-detail-overlay{--graph-detail-height:100%;--graph-detail-surface:var(--surface);--graph-detail-ink:var(--ink);--graph-detail-muted:var(--muted);--graph-detail-line:var(--line);--graph-detail-alt:#e7f0e8;--architecture-surface:var(--surface);--architecture-alt:#e7f0e8;--architecture-ink:var(--ink);--architecture-muted:var(--muted);--architecture-line:var(--line);padding:14px}
html[data-theme="dark"] .system-detail-host>graph-detail-overlay{--graph-detail-surface:#000;--graph-detail-ink:#fff;--graph-detail-muted:#fff;--graph-detail-alt:#20382b;--architecture-surface:#000;--architecture-alt:#20382b;--architecture-ink:#fff;--architecture-muted:#fff}
.system-detail-host>graph-detail-overlay>*{margin:10px 0 0}.system-detail-host>graph-detail-overlay>.architecture-model-detail-state{display:inline-block}.system-detail-host>graph-detail-overlay .architecture-model-page-link{font-size:13px}
