/* CV palette: blue #36588A, gray #62676D, white paper. */
body.spatial-site{--accent:#36588a;--muted:#62676d;--ink:#242931;--fg:#242931;--bg:#fafbfc;--line:#d6dce5;--surface:#f0f3f8;--paper:#f0f3f8;--light:#e6ecf5}
.project-underlay{transition:filter .4s ease,opacity .4s ease}
.project-opening-active .project-underlay{filter:blur(5px);opacity:.55;pointer-events:none;user-select:none}
.spatial-site .project-opening{position:absolute;inset:0;z-index:15;display:flex;align-items:center;justify-content:center;padding:30px 7%;overflow:auto;background:radial-gradient(ellipse at center,#fafbfcb8 5%,#fafbfc33 65%,transparent 100%)}
.project-opening[hidden]{display:none}
.project-opening-content{width:min(1050px,100%);padding:30px 0}
.spatial-site .project-opening-title{font:11px/1.5 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--accent);margin:0 0 26px}
.spatial-site .project-abstract{font:400 clamp(21px,2.05vw,32px)/1.52 Arial,sans-serif;letter-spacing:-.025em;color:var(--fg);margin:0;max-width:1050px;text-wrap:pretty}
.project-opening-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:34px}
.spatial-site .project-enter,.spatial-site .project-opening-source{display:inline-flex;align-items:center;justify-content:center;gap:16px;padding:15px 22px;border-radius:5px;font:12px/1.3 var(--mono);min-height:48px;letter-spacing:0;text-decoration:none;box-shadow:0 3px 12px #36588a0d;white-space:nowrap}
.spatial-site .project-enter{background:var(--accent);color:white;border:1px solid var(--accent);cursor:pointer}
.spatial-site .project-enter:hover{background:#28466f;color:#fff}
.spatial-site .project-opening-source{border:1px solid #8c9eb9;background:#ffffffd9;color:var(--accent)}
.spatial-site .project-opening-source:hover{background:#e9eff8;border-color:var(--accent)}
.project-source svg{width:18px;height:18px;flex:none}
.project-heading-tools{display:flex;align-items:center;gap:18px;margin-left:auto}
.spatial-site .project-heading-tools .project-source{display:inline-flex;align-items:center;gap:9px;font:11px/1.3 var(--mono);padding:9px 12px;border:1px solid #9babc2;border-radius:4px;background:#ffffffb8;color:var(--accent);white-space:nowrap}
.spatial-site .project-heading-tools .project-source:hover{border-color:var(--accent);background:#e9eff8}
.spatial-site .project-source small{font:8px/1.3 var(--mono);color:var(--muted);border:0;padding:0;margin:0}
.spatial-site .project-overview-toggle{font:10px var(--mono);color:var(--accent);cursor:pointer;padding:8px 0;border-bottom:1px solid #b8c5d7}
.spatial-site .ag-heading{display:flex;align-items:center;gap:24px}
.project-opening-active .project-underlay .design-heading,.project-opening-active .project-underlay .ag-heading{opacity:0}
/* More legible system modules: white faces, blue edge accents and inset drawings. */
.spatial-site .ag-space-faces .ag-system-boundary.agent,.spatial-site .ag-space-faces .ag-system-nn,.spatial-site .ag-space-faces .ag-candidate-plate{fill:#fbfcfe;stroke:#8da2c2;stroke-width:2;filter:none}
.spatial-site .ag-space-solid .agent rect,.spatial-site .ag-space-solid .evaluator rect{fill:#8b9fbf!important;stroke:#8b9fbf!important}
.spatial-site .ag-space-solid .candidate rect{fill:#b4c0d1!important;stroke:#b4c0d1!important}
.spatial-site .ag-panel .ag-module-title,.ag-flight .ag-module-title{font:600 23px Arial,sans-serif;fill:#36588a;text-anchor:start;letter-spacing:.3px}
.spatial-site .ag-panel .ag-module-index,.ag-flight .ag-module-index{font:12px var(--mono);fill:#7f8faa;text-anchor:start}
.ag-module-rule{stroke:#d9e1ed;stroke-width:1.5}
.ag-module-accent{fill:#36588a}
.ag-module-inset{fill:#edf2f9;stroke:none}
.ag-module-open circle{fill:#e7eef8;stroke:#adc0dc;stroke-width:1}
.spatial-site .ag-panel .ag-module-open text,.ag-flight .ag-module-open text{fill:#36588a;font:22px Arial}
.spatial-site .ag-panel .ag-mini-tree path{stroke:#b2bfd2;stroke-width:2.3}
.spatial-site .ag-panel .ag-mini-tree .ag-mini-selected{stroke:#36588a;stroke-width:4}
.spatial-site .ag-panel .ag-mini-tree circle{fill:#fff;stroke:#91a7c7;stroke-width:2}
.spatial-site .ag-panel .ag-mini-tree .ag-mini-root{fill:#36588a;stroke:#36588a}
.spatial-site .ag-panel .ag-mini-tree .ag-mini-leaf{fill:#dce7f7;stroke:#36588a;stroke-width:3}
.spatial-site .ag-space-faces #ag-system-nn-hit .nn-neuron{fill:#36588a;stroke:#fff;stroke-width:1.5}
.spatial-site .ag-space-faces #ag-system-nn-hit .nn-layer-1{fill:#6985ae}
.spatial-site .ag-space-faces #ag-system-nn-hit .nn-link{stroke:#8099bd;opacity:.42;stroke-width:1.4}
.spatial-site .ag-panel #ag-system-graph .ag-node circle{fill:#fff;stroke:#7e96ba;stroke-width:2}
.spatial-site .ag-panel #ag-system-graph .ag-node.and circle{fill:#e3ecf9;stroke:#36588a}
.spatial-site .ag-panel #ag-system-graph .ag-edge{stroke:#7188a9;stroke-width:2.5}
.spatial-site .ag-panel .ag-system-agent-state{font:18px var(--mono);fill:#36588a}
.spatial-site .ag-panel .ag-system-count{font:16px var(--mono);fill:#62676d}
.spatial-site .ag-panel .ag-system-metrics{font:20px var(--mono);fill:#36588a}
.ag-system-agent-state,.ag-system-count{pointer-events:none}
@media(max-width:850px){.spatial-site .project-opening{padding:20px 5%}.project-opening-title{margin-bottom:18px}.spatial-site .project-abstract{font-size:clamp(18px,2.8vw,24px);line-height:1.5}.project-heading-tools{gap:10px}.spatial-site .ag-heading{gap:12px}.spatial-site .project-heading-tools .project-source{font-size:9px;padding:7px}.project-source svg{width:15px;height:15px}.project-opening-actions{margin-top:24px}}
@media(max-width:560px){.spatial-site .project-opening{align-items:flex-start;padding:20px 5%}.project-opening-content{padding:14px 0}.spatial-site .project-abstract{font-size:19px;line-height:1.45;letter-spacing:-.02em}.project-opening-title{font-size:10px;margin-bottom:18px}.project-opening-actions{gap:10px}.spatial-site .project-enter,.spatial-site .project-opening-source{padding:12px 14px;font-size:10px;gap:9px;min-height:44px}.project-heading-tools{gap:8px}.spatial-site .project-heading-tools .project-source small{display:none}.spatial-site .ag-heading,.spatial-site .design-heading{flex-wrap:wrap;gap:3px}.project-heading-tools{margin-left:0}.spatial-site main.has-project-opening{overflow:auto}.project-opening-active .project-underlay{max-height:100%;overflow:hidden}}
@media(prefers-reduced-motion:reduce){.project-underlay{transition:none}}

/* Keep experience navigation accessible above the overview. */
.has-project-opening .design-mode{position:relative;z-index:20}
.spatial-site .has-design .project-opening{top:40px}
.spatial-site main.has-design #demo-root[hidden],.spatial-site .design-explorer[hidden]{display:none}
