/* The standard palette stays intact. Appearance always follows the device. */
:root{color-scheme:light}
@media(prefers-color-scheme:dark){
 :root{color-scheme:dark;--navy:#07182d;--navy-2:#102d49;--blue:#70b7f7;--cyan:#64cdf7;--orange:#e87524;--ink:#e6eef7;--muted:#afc1d3;--line:#35506a;--soft:#152e46;--white:#11283f;--shadow:0 14px 34px #0005;--dark-bg:#07182d;--dark-panel:#10263e;--dark-raised:#18344e;--dark-text:#e6eef7;--dark-muted:#afc1d3;--dark-border:#35506a}
 body{background:var(--dark-bg);color:var(--dark-text)}
 /* Main surfaces, dialogs, navigation and every operational workspace. */
 .surface,.metric,.filters,.finding,.playbook,.modal,.tour-dialog,.guide-coach,.claim-dialog,.source-card,.export-card,.source-metrics>div,.experience-filters,.ops-toolbar,.export-toolbar,.asset-table-surface tr,.fleet-table-wrap tr,.ml-gradient-labels button,.gradient-map,.device-workspace>.embedded-dex,.sidebar.menu-open nav,.mobile-dashboard-picker,.tenant-connect-card,.measurement-card{background:var(--dark-panel);border-color:var(--dark-border);color:var(--dark-text)}
 .context-item,.cause-chain div,.run-scope div,.approval-summary,.directory-source,.identity-source-bar,.identity-correlation,.view-toggle,.radial-key button,.channel-grid span,.next-action,.resolution-steps button,.outcome-strip,.outcome-strip div,.telemetry-item,.telemetry-grid span,.diagnostic-table div,.decision-options button,.differentiator-strip,.differentiator-strip>div,.tour-content li,.heat-breadcrumb,.heat-breadcrumb button,.risk-category-tabs button,.bulk-step>i,.export-formats span,.source-ribbon,.source-ribbon b,.device-signal-stack>div,.telemetry-badges span,.prediction-facts div,.workspace-decisions button,.zero-touch-flow,.device-outcomes,.device-outcomes div,.dex-collection,.dex-metrics button,.dex-detail-head>span,.dex-insight details,.dex-events>div,.ml-display,.ml-row-label,.ml-allocation-item,.ml-device-detail,.tenant-choice,.consent-path div,.permission-detail,.tenant-checks label,.tenant-validation>div,.v2-path,.v2-market,.v2-facts div,.v2-population div,.v2-meta span,.v2-manifest,.v2-modes button,.v2-separation,.v2-disclosure,.v2-permissions dl,.v2-action-disabled,.v2-action-state,.v2-sources span,.v2-checks label,.v2-validation>div,.v2-ready>div>span,.v2-timeline>div,.v2-prereqs,.v2-entry-card,.v2-ms-signin,.v2-shared-state,.v2-governance label,.v2-mode-note,.v2-qa,.v2-marketplace-listing,.v2-azure-phase,.v2-app-choice,.v2-market-progress,.v2-market-resources span,.v2-governance-columns label{background:var(--dark-raised);border-color:var(--dark-border);color:var(--dark-text)}
 .ghost,.search,.filters select,.experience-filters select,.compact-select select,.ops-toolbar select,.export-toolbar select,.export-toolbar input,.mobile-dashboard-picker select,.ml-toolbar select,.tenant-field select,.v2-form select,.v2-form input,.v2-scenario select,.v2-qa select,#claim-close{background:#10263e;border-color:#55718b;color:#e6eef7}
 input,select,textarea{color-scheme:dark;accent-color:#3f90dd}
 input::placeholder,textarea::placeholder{color:#afc1d3;opacity:1}
 .primary{background:#236ead;border-color:#529bd8;color:#fff}
 .primary:hover{background:#2b7fc4}
 .ghost:hover,.finding:hover,.playbook:hover,.asset-row:hover,.asset-row.selected,.driver-row:hover,.driver-row.selected{background:#1d405e;color:#e6eef7}
 .driver-row{background:#10263e;border-color:#35506a;color:#e6eef7}
 /* Long-form help, tables, and secondary labels must remain readable. */
 h1,h2,h3,.claim-content h2,.metric-basis-detail h3,.metric-observed-value,.signal-summary,.ml-gradient-labels button,.ml-row-label,.workspace-decisions button,.decision-options button,.identity-endpoint,.dex-metrics button{color:#e6eef7}
 .app-shell p,.app-shell small,.app-shell dt,.app-shell td,.app-shell label,.modal p,.modal small,.tour-dialog p,.tour-dialog small,.tour-content li,.guide-coach p,.guide-coach small,.claim-dialog p,.claim-dialog dd,.claim-dialog td,.metric-example-list,.claim-language,.v2-help,.v2-intro,.v2-subtitle{color:#afc1d3}
 .metric-table-scroll td,.metric-table-scroll th,.fleet-table-wrap th,.fleet-table-wrap td,.asset-table th,.asset-table td{border-color:#35506a;color:#e6eef7}
 .metric-table-scroll th,.fleet-table-wrap th{background:#18344e;color:#c8e2fb}
 .app-shell .eyebrow,.claim-dialog .eyebrow,.claim-content dt,.metric-basis-detail h3,.guide-number,.heat-breadcrumb button,.ml-reset,.text-link,.claim-link,.fleet-device{color:#8cc9ff}
 .claim-content dt{color:#8cc9ff}.claim-content dl>div,.metric-basis-detail,.tour-actions,.coach-actions,.signal-explanation dl div,.dex-insight dl div,.ml-allocation,.source-metrics,.v2-permissions,.v2-resources li{border-color:#35506a}
 .tour-actions,.coach-actions{background:#10263e}
 .guide-coach .coach-tasks button{background:#18344e;color:#e6eef7;border-color:#35506a}
 .guide-coach .coach-tasks button.active,.guide-coach .coach-tasks button.done,.coach-tasks i,.coach-tasks button.active i{background:#224765;color:#e6eef7}
 .tour-progress i{background:#35506a}.tour-progress i.active{background:#3f90dd}
 .mobile-nav-head button,.sidebar.menu-open .nav-item{background:#18344e;color:#e6eef7;border-color:#35506a}
 .sidebar.menu-open .nav-item.active,.risk-category-tabs button.active,.domain-tabs button.active,.ml-display button[aria-pressed=true],.tenant-choice.selected,.v2-modes button.selected,.v2-entry-card.selected,.v2-app-choice.selected{background:#224765;color:#e6eef7;border-color:#70b7f7}
 .metric-disclosure,.representative-data-banner,.orchestration-constraint,.foresight-note,.guide-callout,.recommended-outcome,.native-action,.identity-recommendation,.decision-recommendation,.dex-query-note,.tenant-explainer,.v2-redirect,.v2-ms-return,.v2-resume-result,.v2-confirm{background:#163650;color:#d8eaff;border-color:#436d91}
 .claim-language,.recommendation,.identity-cause,.signal-record,.approval-warning,.bulk-warning,.tenant-explainer.blocked,.v2-sim-notice,.v2-outcome.warning{background:#382a22;color:#ffe1c9;border-color:#a35c2a}
 .signal-summary i,.signal-summary>strong,.signal-stage,.signal-explanation em,.dex-insight em{color:#ffb57b;background-color:transparent}
 .signal-summary span b{color:#ffe1c9}.signal-summary span small,.signal-explanation dt{color:#cdb5a2}.signal-explanation dd{color:#f0daca}
 .signal-filter button,.signal-filter button b,.context-info,.claim-info{background:#18344e;color:#c8e2fb;border-color:#55718b}
 .signal-filter button.active,.identity-endpoint.active,.workspace-decisions button.selected,.decision-options .recommended,.dex-metrics button.active{background:#224765;color:#e6eef7;border-color:#70b7f7}
 .identity-endpoint{background:#18344e;border-color:#35506a}
 .dex-threshold,.dex-metric-state.outside{background:#382a22;color:#ffbf8f;border-color:#a35c2a}.dex-threshold strong,.dex-threshold span{color:#ffbf8f}
 .dex-threshold.within,.dex-healthy,.dex-metric-state,.status-chip.ready,.status-chip.success,.badge.Low,.risk-pill.low,.experience-pill.good,.compliance-pill.good,.telemetry-item.risk-green,.v2-state.ready,.v2-outcome.ready,.v2-success{background:#123c35;color:#a1e5cb;border-color:#3e8f76}
 .dex-threshold.within strong,.dex-threshold.within span{color:#a1e5cb}
 .badge.Critical,.risk-pill.critical,.telemetry-item.risk-red,.v2-state.blocked,.v2-outcome.blocked{background:#492936;color:#ffbec7;border-color:#aa5f70}
 .badge.High,.risk-pill.high,.badge.Medium,.risk-pill.medium,.telemetry-item.risk-yellow,.experience-pill.poor,.experience-pill.attention,.compliance-pill.bad,.compliance-pill.warn,.v2-state.warning,.v2-state.attention{background:#493522;color:#ffd3a4;border-color:#a47a44}
 .automation-ready,.confidence,.status-chip.running,.v2-state.running,.v2-state.pending,.resolution-steps .current,.tenant-step.active,.v2-step.active{background:#224765;color:#c8e2fb}
 .resolution-steps .complete,.tenant-step.done i,.v2-step.done i{background:#123c35;color:#a1e5cb}
 .tenant-step i,.v2-step i,.step-num,.tenant-icon,.guide-number,.export-icon{background:#224765;color:#c8e2fb}
 .tenant-choice em,.v2-market em,.v2-resources em,.v2-resources .deploying em,.v2-resources .validating em,.v2-resources .complete em,.v2-resources .warning em,.v2-resources .failed em,.v2-resources .not-enabled em{background:#18344e;color:#c8e2fb}
 .v2-ready>i,.tenant-ready>i,.v2-entry-card.recommended{background:#123c35;color:#a1e5cb;border-color:#3e8f76}
 .v2-resources,.v2-step,.v2-entry-card,.v2-marketplace-listing{color:#e6eef7}
 /* Keep the semantic heat-map colors; labels on its bright plot stay dark. */
 .ml-risk-low{background:#123c35;color:#a1e5cb}.ml-risk-medium{background:#493e22;color:#ffe2a1}.ml-risk-high{background:#4c3024;color:#ffc99d}.ml-risk-critical{background:#492936;color:#ffbec7}.ml-risk-none{background:#18344e;color:#afc1d3}
 .ml-axis{fill:#afc1d3}.ml-score-label{fill:#07182d;stroke:#ffffffaa}
 .risk-0,.l1{background:#123c35;color:#a1e5cb}.risk-1,.l2{background:#224765;color:#c8e2fb}.risk-2,.l3{background:#493e22;color:#ffe2a1}.risk-3,.l4{background:#4c3024;color:#ffc99d}.risk-4{background:#492936;color:#ffbec7}
 .auth-menu-logout button{background:#18344e!important;color:#e6eef7!important;border-color:#55718b!important}
 :focus-visible{outline-color:#8cc9ff}
 /* Higher-specificity component labels override fixed light-theme ink. */
 body .app-shell small,body .app-shell p,body .app-shell dt,body .claim-dialog p,body .claim-dialog dd,body .guide-coach small,body .tour-dialog small{color:#c0d0e0}
 body .dashboard-tab,body .domain-tabs button,body .driver-head>span,body .distribution-label,body .distribution-copy small,body .foresight-note span,body .experience-trend>span,body .trend-axis span,body .score-dial span{color:#c0d0e0}
 body .representative-data-banner strong,body .simulation-label{color:#ffbf8f;background:#382a22}
 body .representative-data-banner button,body .driver-row .gain,body .tour-open-workspace{color:#8cc9ff}
 body .distribution-row.good .mini-dial,body .distribution-row.good strong{color:#a1e5cb}
 body .experience-trend strong{color:#a1e5cb}
 body .experience-score>div>p{color:#c0d0e0}
 body .experience-score,body .experience-trend,body .experience-kpis,body .measurement-summary{background:#102d49}
 body .experience-score .eyebrow{color:#8cc9ff}
 body .simulation-label{border-color:#a35c2a}
 body .experience-filters .simulation-label,body .dex-head .simulation-label{background:#382a22;color:#ffbf8f;border-color:#a35c2a}
 body .distribution-copy .distribution-label{color:#c0d0e0}
 body .differentiator-strip span{background:#224765;color:#c8e2fb}
 body .close,body .tour-open,body .coach-controls button{color:#c8e2fb}
 /* Legacy workspaces set many individual ink colors. Keep their text legible. */
 body .app-shell :is(span,strong,b,em,i,a,button),body .guide-coach :is(span,strong,b,em,i,button),body .tour-dialog :is(span,strong,b,em,i,button){color:#d0deec!important}
 body .app-shell :is(.primary,.primary span),body .guide-coach .primary,body .tour-dialog .primary{color:#fff!important}
 body .app-shell :is(.eyebrow,.text-link,.claim-link,.gain),body .tour-dialog .tour-open{color:#8cc9ff!important}
 body .app-shell :is(.good,.risk-green,.Low),body .app-shell :is(.good,.risk-green,.Low) strong{color:#a1e5cb!important}
 body .app-shell :is(.warn,.risk-yellow,.High,.Medium){color:#ffd3a4!important}
 body .app-shell :is(.risk-red,.Critical),body .app-shell :is(.risk-red,.Critical) strong{color:#ffbec7!important}
 body .stage-number,body .resolution-steps .complete i{background:#224765;color:#c8e2fb}
 body .app-shell th,body .zero-touch-flow li{color:#c0d0e0}
 body .device-workspace .dex-collection{background:#18344e;border-color:#35506a}
 body .dex-metric-state.outside{color:#ffbf8f!important}
 body .v2-path .v2-step i,body .v2-path .v2-step.active i,body .v2-entry-icon{background:#224765;color:#c8e2fb!important}
 body .dex-collection{background:#18344e!important;color:#e6eef7!important;border-color:#35506a}
}
