:root[data-theme="light"]{color-scheme:light;--bg:#f7f9fc;--panel:#fff;--surface:#fff;--surface-2:#edf2f8;--surface-3:#e7edf6;--ink:#1c2a3e;--text:#1c2a3e;--muted:#596b83;--muted-2:#687b93;--line:#d8e1ed;--line-strong:#bdcbe0;--accent:#365ec9;--accent-strong:#2d50b5;--accent-soft:#e9efff;--green:#286b4a}
:root[data-theme="dark"]{color-scheme:dark;--bg:#141414;--panel:#1b1b1b;--surface:#1b1b1b;--surface-2:#202020;--surface-3:#292929;--ink:#ededed;--text:#ededed;--muted:#ababab;--muted-2:#979797;--line:#303030;--line-strong:#474747;--accent:#dedede;--accent-strong:#f5f5f5;--accent-soft:#262626;--green:#8fbd9d;--brand-accent:#8ba9ff}
html[data-theme] body:not(.app-body){background:var(--bg);color:var(--text)}
html[data-theme]{--sidebar:var(--surface-2);--panel-solid:var(--panel);--raised:var(--surface);--subtle:var(--surface-2);--hover:var(--surface-3);--text-soft:var(--muted);--text-faint:var(--muted-2);--text-muted:var(--muted);--accent-ink:var(--accent);--surface-soft:var(--surface-2)}
:root[data-theme="dark"]{--sidebar:#181818;--panel-solid:var(--panel);--raised:var(--surface);--subtle:var(--surface-2);--hover:var(--surface-3);--text-soft:var(--muted);--text-faint:var(--muted-2);--text-muted:var(--muted);--accent-ink:var(--accent);--surface-soft:var(--surface-2)}
html[data-theme] .analytics-page{--bg:inherit;--panel:inherit;--text:inherit;--muted:inherit;--line:inherit;--accent:inherit;color-scheme:inherit}
html[data-theme] .site-header,html[data-theme] .auth-header{background:var(--bg);border-color:var(--line)}
html[data-theme] .site-header nav,html[data-theme] .header-link,html[data-theme] .site-footer,html[data-theme] .auth-principles,html[data-theme] #auth-form label{color:var(--muted)}
.global-theme-toggle{font:12px "Segoe UI",Arial,sans-serif;white-space:nowrap;cursor:pointer;min-height:34px;padding:7px 10px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--text);flex-shrink:0}
.global-theme-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html[data-theme] .global-theme-toggle:hover,html[data-theme] .editor-header button,html[data-theme] .team-strip button{background:var(--surface-2);color:var(--text);border-color:var(--line)}
html[data-theme] .editor-header a:not(.editor-brand),html[data-theme] .registry>a{color:var(--accent)}
html[data-theme] .editor-brand span,html[data-theme] .local-badge,html[data-theme] .process-row small,html[data-theme] #selection-hint{color:var(--muted)}
html[data-theme] .site-header{flex-wrap:wrap;padding-block:18px;gap:18px}
html[data-theme] .direction-card,html[data-theme] .module,html[data-theme] .product-preview,html[data-theme] .preview-bar,html[data-theme] .process-example{background:var(--panel);border-color:var(--line)}
html[data-theme] .direction-card:hover,html[data-theme] .module:hover{background:var(--surface-2);color:var(--text)}
html[data-theme] .module-state{background:var(--accent-soft);color:var(--accent)}
html[data-theme] .preview-bar,html[data-theme] .planned .module-state{color:var(--muted)}
html[data-theme] .analytics-cta{background:var(--accent-soft);border-color:var(--line)}
html[data-theme] .button,html[data-theme] .analytics-page .button{background:var(--accent);color:var(--bg)}
html[data-theme] .button--secondary{background:var(--surface-2);color:var(--text)}
html[data-theme] .card-art svg circle,html[data-theme] .card-art svg rect{fill:var(--panel)}
html[data-theme] .diagram-line{stroke:var(--line-strong)}
html[data-theme] #auth-form input,html[data-theme] .account,html[data-theme] .app-mark{color:var(--text);background:var(--panel);border-color:var(--line)}
html[data-theme] .submit-button{color:var(--bg)}
html[data-theme] .auth-brand,html[data-theme] .auth-intro h1,html[data-theme] .approval-card h1,html[data-theme] header .brand{font-family:"Segoe UI",Arial,sans-serif}
html[data-theme="light"] body::before,html[data-theme="light"] body::after{opacity:.12}
html[data-theme="light"] .product-stage,html[data-theme="light"] .stage-chrome,html[data-theme="light"] .stage-sidebar,html[data-theme="light"] .route-inspector,html[data-theme="light"] .workspace-top,html[data-theme="light"] .composer-preview,html[data-theme="light"] .router-demo,html[data-theme="light"] .model-row,html[data-theme="light"] .route-profiles article,html[data-theme="light"] .price-card,html[data-theme="light"] .terminal-card{background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-theme="light"] .stage-brand,html[data-theme="light"] .agent-message,html[data-theme="light"] .agent-label,html[data-theme="light"] .user-message,html[data-theme="light"] .terminal-card pre{color:var(--text)}
html[data-theme="light"] .closing{background:#dfe9ff;color:#213251}
html[data-theme="light"] .closing h2,html[data-theme="light"] .closing h2 span,html[data-theme="light"] .closing p{color:#213251}
html[data-theme] .editor-header,html[data-theme] .registry,html[data-theme] .properties,html[data-theme] .document-bar,html[data-theme] .team-dialog{background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-theme] .editor-brand,html[data-theme] .document-bar input{color:var(--text)}
html[data-theme] .editor-layout,html[data-theme] .toolbar{border-color:var(--line)}
html[data-theme] .storage-notice,html[data-theme] .team-strip{background:var(--accent-soft);color:var(--muted);border-color:var(--line)}
html[data-theme] .editor-layout button,html[data-theme] .editor-layout input,html[data-theme] .editor-layout select,html[data-theme] .editor-layout textarea,html[data-theme] .team-dialog input,html[data-theme] .team-dialog textarea,html[data-theme] .team-dialog select,html[data-theme] .team-dialog button{background:var(--surface);color:var(--text);border-color:var(--line)}
html[data-theme] .editor-layout button.primary,html[data-theme] .team-dialog button.primary{background:var(--accent);color:var(--bg)}
html[data-theme] .process-row.active{background:var(--accent-soft);border-color:var(--line-strong)}
html[data-theme] #save-state,html[data-theme] #feedback,html[data-theme] .small,html[data-theme] .canvas-help,html[data-theme] .properties label,html[data-theme] .registry-note{color:var(--muted)}
html[data-theme] #feedback.error{background:var(--danger-soft,#422526);color:var(--danger,#f8a29c)}
html[data-theme] .header-inner{grid-template-columns:auto 1fr auto auto;gap:20px}
html[data-theme] .header-inner .site-nav{justify-content:center}
html[data-theme] .site-header:has(.header-inner){height:auto;min-height:76px}
html[data-theme] .header-inner .wordmark,html[data-theme] .inline-link,html[data-theme] .model-row>span,html[data-theme] .agent-message h2,html[data-theme] .terminal-command,html[data-theme] .terminal-tabs .is-active,html[data-theme] .result-model strong,html[data-theme] .price-card>a{color:var(--text)}
html[data-theme] .hero-copy>p,html[data-theme] .feature-copy p,html[data-theme] .hero-footnote,html[data-theme] .release-pill,html[data-theme] .release-pill b,html[data-theme] .site-nav a,html[data-theme] .text-link,html[data-theme] .site-footer nav strong,html[data-theme] .stage-tabs,html[data-theme] .model-row small,html[data-theme] .route-profiles p,html[data-theme] .route-profiles article>small,html[data-theme] .billing-note,html[data-theme] .plan-head small,html[data-theme] .price-card li,html[data-theme] .faq summary,html[data-theme] .faq details>p,html[data-theme] .terminal-comment,html[data-theme] .terminal-features,html[data-theme] .license-note,html[data-theme] .lead,html[data-theme] .security{color:var(--muted)}
html[data-theme] .site-nav a:hover,html[data-theme] .text-link:hover,html[data-theme] .site-footer nav a:hover{color:var(--accent)}
html[data-theme="light"] .routes,html[data-theme="light"] .cli-section,html[data-theme="light"] .stage-workspace,html[data-theme="light"] .router-query,html[data-theme="light"] .router-result,html[data-theme="light"] .new-chat,html[data-theme="light"] .history-row.is-active,html[data-theme="light"] .activity-line,html[data-theme="light"] .query-signals span,html[data-theme="light"] .site-nav.is-open{background:var(--surface-2);color:var(--text)}
html[data-theme="light"] .agent-message>p,html[data-theme="light"] .user-message p,html[data-theme="light"] .plan-lines em,html[data-theme="light"] .router-query>p,html[data-theme="light"] .stage-tabs .is-active{color:var(--text)}
html[data-theme="light"] .approve{color:var(--bg)}
html[data-theme="light"] .auth-panel,html[data-theme="light"] .approval-card{box-shadow:0 10px 35px #263e5710}
@media(max-width:1050px){html[data-theme] .header-inner{grid-template-columns:1fr auto auto}.header-inner .global-theme-toggle{grid-column:3;grid-row:1}.header-inner .nav-toggle{grid-column:2;grid-row:1}html[data-theme] .auth-header,html[data-theme] body>header:has(.product){height:auto;min-height:72px;gap:12px;flex-wrap:wrap;padding-block:14px}}
/* BPMN keeps document colours and exported SVG identical in either theme. */
html[data-theme="dark"] #canvas{background-color:#ededed;background-image:radial-gradient(#cecece .8px,transparent .8px)}
.team-strip{display:flex;align-items:center;gap:12px;padding:10px 20px;flex-wrap:wrap;font-size:12px}.team-strip button{font-size:12px}
.prism-section{display:grid;grid-template-columns:1fr 1.5fr;gap:70px;padding:64px;margin-top:90px;background:var(--panel);border:1px solid var(--line);border-radius:12px}.prism-section h2{font-size:clamp(32px,4vw,52px);margin:17px 0 25px}.prism-section p{font-size:16px;line-height:1.7;margin-bottom:16px}.prism-section strong{color:var(--text);font-weight:500}.prism-mark{color:var(--accent);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:25px;font-size:14px;letter-spacing:.4em}.prism-mark svg{width:100%;max-width:280px}.prism-note{display:block;font-size:12px;color:var(--muted);padding:14px 0 25px}.analytics-hero{max-width:1280px}.analytics-hero .eyebrow{color:var(--accent)}.analytics-page .product-preview{box-shadow:0 12px 45px #1429500a}.analytics-page .module{border-radius:5px}.analytics-page .module h3{font-weight:500}.analytics-page .module-state{border-radius:3px}.analytics-cta{border-radius:6px}
@media(max-width:760px){.prism-section{grid-template-columns:1fr;padding:28px;gap:30px;margin-top:50px}.prism-mark svg{max-width:170px}}
.team-dialog{width:min(720px,calc(100vw - 28px));max-height:85vh;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:25px;background:var(--panel);color:var(--text);font:14px/1.5 "Segoe UI",Arial,sans-serif}
.team-dialog::backdrop{background:#0008}.team-dialog header{display:flex;justify-content:space-between;gap:20px;align-items:center}.team-dialog h2{font-size:22px;margin:0}.team-dialog h3{font-size:17px}.team-dialog form{display:grid;gap:12px;margin:22px 0}.team-dialog label{font-size:13px}.team-dialog [role=status]{color:var(--muted)}.team-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;border-bottom:1px solid var(--line);padding:16px 0}.team-row strong{overflow-wrap:anywhere}.team-row small{flex:1;min-width:100px;color:var(--muted)}.comment-row,.review-row{border:1px solid var(--line);border-radius:6px;padding:14px;margin:12px 0;overflow-wrap:anywhere}.comment-row small{color:var(--muted)}.comment-row p{white-space:pre-wrap}.review-row button{margin:8px 8px 0 0}.readonly .djs-palette,.readonly .djs-context-pad{display:none}
/* Neutral dark surfaces: the brand colour is not a page background. */
html[data-theme="dark"] body::before,html[data-theme="dark"] body::after,html[data-theme="dark"] .closing-grid{display:none}
html[data-theme="dark"] .auth-intro,html[data-theme="dark"] .routes,html[data-theme="dark"] .cli-section,html[data-theme="dark"] .stage-workspace{background:var(--bg)}
html[data-theme="dark"] .product-stage,html[data-theme="dark"] .stage-chrome,html[data-theme="dark"] .stage-sidebar,html[data-theme="dark"] .route-inspector,html[data-theme="dark"] .composer-preview,html[data-theme="dark"] .router-demo,html[data-theme="dark"] .router-query,html[data-theme="dark"] .router-result,html[data-theme="dark"] .route-profiles article,html[data-theme="dark"] .price-card,html[data-theme="dark"] .terminal-card,html[data-theme="dark"] .terminal-card pre,html[data-theme="dark"] .site-nav.is-open{background:var(--panel);border-color:var(--line);box-shadow:none}
html[data-theme="dark"] .new-chat,html[data-theme="dark"] .history-row.is-active,html[data-theme="dark"] .activity-line,html[data-theme="dark"] .query-signals span,html[data-theme="dark"] .model-row b,html[data-theme="dark"] .router-flow b,html[data-theme="dark"] .result-model>b{background:var(--surface-2);color:var(--text);border-color:var(--line);box-shadow:none}
html[data-theme="dark"] .closing{background:var(--panel);color:var(--text);border-block:1px solid var(--line)}
html[data-theme="dark"] .closing h2{color:var(--text)}
html[data-theme="dark"] .closing h2 span,html[data-theme="dark"] .closing p,html[data-theme="dark"] .closing-action small,html[data-theme="dark"] .hero h1 span,html[data-theme="dark"] .section-heading h2 span,html[data-theme="dark"] .models-copy h2 span,html[data-theme="dark"] .route-heading h2 span,html[data-theme="dark"] .pricing-heading h2 span,html[data-theme="dark"] .cli-copy h2 span{color:var(--muted)}
html[data-theme="dark"] .button,html[data-theme="dark"] .submit-button,html[data-theme="dark"] .approve{background:var(--text);color:var(--bg);border-color:transparent;box-shadow:none}
html[data-theme="dark"] .button--secondary{background:var(--surface-2);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .button:hover,html[data-theme="dark"] .submit-button:hover,html[data-theme="dark"] .approve:hover{background:#fff;color:#141414}
html[data-theme="dark"] .button--secondary:hover{background:var(--surface-3);color:var(--text)}
html[data-theme="dark"] .chart-bar{fill:#333;stroke:#777}
html[data-theme="dark"] .process-steps li{border-color:var(--line-strong)}
html[data-theme="dark"] .product-preview img{filter:grayscale(1) invert(.9)}
html[data-theme="dark"] .auth-brand .spark,html[data-theme="dark"] .brand .spark,html[data-theme="dark"] .astra-symbol-orbit{stroke:var(--brand-accent)}
html[data-theme="dark"] :focus-visible{outline-color:var(--brand-accent)}
html[data-theme="dark"] ::selection{background:#414141;color:#fff}
@media(max-width:760px){html[data-theme] .site-header{gap:12px}.global-theme-toggle{font-size:11px;padding:7px}.team-dialog{padding:18px}.team-strip{padding:12px}.site-header>.global-theme-toggle{order:4}.editor-header{height:auto;min-height:62px;padding-block:12px;flex-wrap:wrap}}
