html{color-scheme:light}
html[data-theme="dark"]{
  color-scheme:dark;
  --rz-ink:#f3f5ff;
  --rz-muted:#949eb7;
  --rz-line:#27304e;
  --rz-soft:#111831;
  --rz-blue:#8190ff;
  --rz-violet:#a189ff;
  --rz-green:#53c49d;
}
html[data-theme="dark"] body{background:#0b1024;color:#eef1ff}
html[data-theme="dark"] .scroll-progress{background:rgba(255,255,255,.04)}
html[data-theme="dark"] .site-header{background:rgba(10,15,34,.78);border-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .site-header.scrolled{background:rgba(10,15,34,.92);box-shadow:0 18px 55px rgba(0,0,0,.28)}
html[data-theme="dark"] .brand,html[data-theme="dark"] .desktop-nav a,html[data-theme="dark"] .header-actions .text-link{color:#eef1ff}
html[data-theme="dark"] .button-light{color:#10162d;background:#fff}
html[data-theme="dark"] .mobile-nav{background:#111831;border-color:#2a3352}

html[data-theme="dark"] .product-demo{background:#10162d;box-shadow:0 38px 95px rgba(0,0,0,.4)}
html[data-theme="dark"] .demo-topbar{background:#10162d;border-color:#252e4a;color:#9ba5bc}
html[data-theme="dark"] .reality-scene{background:#0f152c;color:#eef1ff}
html[data-theme="dark"] .rz-rail,html[data-theme="dark"] .rz-sim-nav,html[data-theme="dark"] .rz-review-tasks{background:#121a33;border-color:#29324f}
html[data-theme="dark"] .rz-rail-brand,html[data-theme="dark"] .rz-sim-nav header{border-color:#2a3452}
html[data-theme="dark"] .rz-rail nav button.active,
html[data-theme="dark"] .rz-sim-nav nav button.active,
html[data-theme="dark"] .rz-review-tasks>article.active{background:#1a2340;color:#fff;box-shadow:0 8px 25px rgba(0,0,0,.25)}
html[data-theme="dark"] .rz-rail>p{border-color:#303a58;background:rgba(255,255,255,.035)}
html[data-theme="dark"] .rz-state,html[data-theme="dark"] .rz-complete,
html[data-theme="dark"] .rz-space-metrics article,
html[data-theme="dark"] .rz-space-panel,
html[data-theme="dark"] .rz-query-card,
html[data-theme="dark"] .rz-plan-card,
html[data-theme="dark"] .rz-results-card,
html[data-theme="dark"] .rz-sim-panel,
html[data-theme="dark"] .rz-review-summary article,
html[data-theme="dark"] .rz-issue-list,
html[data-theme="dark"] .rz-issue-detail{background:#151d36;border-color:#2b3451;color:#eef1ff}
html[data-theme="dark"] .rz-material-list article,
html[data-theme="dark"] .rz-sim-cards article,
html[data-theme="dark"] .rz-sim-checks article,
html[data-theme="dark"] .rz-issue-list button,
html[data-theme="dark"] .rz-results-card>label{border-color:#29324d;background:#151d36;color:#eef1ff}
html[data-theme="dark"] .rz-space-panel>footer,
html[data-theme="dark"] .rz-sim-footer,
html[data-theme="dark"] .rz-issue-detail>div,
html[data-theme="dark"] .rz-issue-detail blockquote{background:#10172e;border-color:#29324d;color:#aab3c8}
html[data-theme="dark"] .rz-stepper{border-color:#2b3451}
html[data-theme="dark"] .rz-stepper button{background:#151d36;border-color:#2b3451;color:#919bb3}
html[data-theme="dark"] .rz-stepper button.active{color:#98a4ff}
html[data-theme="dark"] .rz-stepper button i,
html[data-theme="dark"] .rz-material-list article>i{background:#20294c}
html[data-theme="dark"] .rz-query-card textarea,
html[data-theme="dark"] .rz-query-card input,
html[data-theme="dark"] .rz-save-row select{background:#10172e;border-color:#303a58;color:#e8ebf7}
html[data-theme="dark"] .rz-plan-empty article{background:#111831;border-color:#2d3652}
html[data-theme="dark"] .rz-plan-card>button,
html[data-theme="dark"] .rz-query-card>button,
html[data-theme="dark"] .rz-save-row button{background:#7180ef}
html[data-theme="dark"] .rz-sim-question{background:linear-gradient(135deg,#1b2447,#201c40)}
html[data-theme="dark"] .rz-review-tasks>footer{border-color:#303a58;color:#929db4}
html[data-theme="dark"] .rz-issue-list button.active{background:#20284b}
html[data-theme="dark"] .rz-issue-list button>i{background:#3a222b}

html[data-theme="dark"] .workflow-section{background:linear-gradient(180deg,#0b1024,#10162f)}
html[data-theme="dark"] .workflow-board{border-color:#28314e;background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.012));box-shadow:0 45px 110px rgba(0,0,0,.35)}
html[data-theme="dark"] .workflow-controls{background:#111831;border-color:#28314e}
html[data-theme="dark"] .workflow-controls button{border-color:#28314e;color:#8f9ab4}
html[data-theme="dark"] .workflow-controls button.active{background:#18213e;color:#fff}
html[data-theme="dark"] .realwf-stage{background:#10172e;border-color:#29324d;color:#eef1ff;box-shadow:0 18px 55px rgba(0,0,0,.3)}
html[data-theme="dark"] .realwf-stage>header,html[data-theme="dark"] .realwf-stage>footer{background:#121a33;border-color:#2b3451}
html[data-theme="dark"] .flagship-stage>footer>span{color:#9ca6bc}
html[data-theme="dark"] .flagship-stage>footer>button{border-color:#7180ef;background:linear-gradient(135deg,#6676ed,#846ff0);color:#fff;box-shadow:0 8px 22px rgba(79,93,214,.24)}
html[data-theme="dark"] .flagship-stage>footer>button:disabled{border-color:#303a58;background:#242d48;color:#8993aa;box-shadow:none}
html[data-theme="dark"] .flagship-sim-grid,
html[data-theme="dark"] .flagship-ber-body,
html[data-theme="dark"] .flagship-figure-grid,
html[data-theme="dark"] .flagship-msmr-body{background:#0e152b}
html[data-theme="dark"] .flagship-sim-grid>aside,
html[data-theme="dark"] .flagship-sim-grid>section,
html[data-theme="dark"] .flagship-ber-metrics article,
html[data-theme="dark"] .flagship-topic-list,
html[data-theme="dark"] .flagship-topic-detail,
html[data-theme="dark"] .flagship-figure-grid>aside,
html[data-theme="dark"] .flagship-figure-grid>section,
html[data-theme="dark"] .flagship-msmr-evidence>section,
html[data-theme="dark"] .flagship-calibration{background:#151d36;border-color:#2b3451;color:#eef1ff}
html[data-theme="dark"] .flagship-sim-grid>aside button.active,
html[data-theme="dark"] .flagship-topic-list>button.active,
html[data-theme="dark"] .flagship-figure-grid>aside>button.active,
html[data-theme="dark"] .flagship-msmr-evidence section>button.active{background:#222b50;color:#fff}
html[data-theme="dark"] .flagship-sim-grid>aside button,
html[data-theme="dark"] .flagship-topic-list>button,
html[data-theme="dark"] .flagship-msmr-evidence section>button,
html[data-theme="dark"] .flagship-figure-grid>aside>button,
html[data-theme="dark"] .flagship-time article{background:#151d36;border-color:#2b3451;color:#aab4ca}
html[data-theme="dark"] .flagship-time:before{border-color:#46517c}
html[data-theme="dark"] .flagship-time article>i,
html[data-theme="dark"] .flagship-sim-grid>aside button.active,
html[data-theme="dark"] .flagship-topic-list>button i,
html[data-theme="dark"] .flagship-msmr-evidence button>i{background:#27315c}
html[data-theme="dark"] .flagship-arms span,
html[data-theme="dark"] .flagship-topic-detail>div:not(.flagship-topic-bars){background:#10172e;color:#aab4c9}
html[data-theme="dark"] .flagship-topic-list>header,
html[data-theme="dark"] .flagship-topic-list>button,
html[data-theme="dark"] .flagship-msmr-evidence section>header,
html[data-theme="dark"] .flagship-msmr-evidence section>button,
html[data-theme="dark"] .flagship-calibration>div:last-child{border-color:#2b3451}
html[data-theme="dark"] .flagship-topic-list>header button,
html[data-theme="dark"] .flagship-topic-detail>button,
html[data-theme="dark"] .flagship-figure-grid>aside>button,
html[data-theme="dark"] .flagship-field-map select{background:#10172e;border-color:#303a58;color:#dfe4f2}
html[data-theme="dark"] .flagship-topic-bars,
html[data-theme="dark"] .flagship-paper-chart{border-color:#3a4565;background-color:#10172e;background-image:linear-gradient(#222b45 1px,transparent 1px)}
html[data-theme="dark"] .flagship-figure-checks span,
html[data-theme="dark"] .flagship-sim-grid>section>header>span{background:#17372f;color:#63c5a5}
html[data-theme="dark"] .flagship-risk-ring{border-color:#263058;border-top-color:#7f8ef5;border-right-color:#a188ff}

html[data-theme="dark"] .tools-section,
html[data-theme="dark"] .infrastructure-section,
html[data-theme="dark"] .about-section{background:#10162f}
html[data-theme="dark"] .infra-list button{color:#eef1ff;background:#151d36;border-color:#2a3452;box-shadow:0 10px 28px rgba(0,0,0,.16)}
html[data-theme="dark"] .infra-list button:hover,html[data-theme="dark"] .infra-list button.active{background:#1a2340;border-color:#7180ef}
html[data-theme="dark"] .infra-list button>em{background:#232d55;color:#9ba6ff}
html[data-theme="dark"] .tool-result-layer{background:rgba(18,26,51,.94);border-color:#344064;box-shadow:0 14px 34px rgba(0,0,0,.32)}

html[data-theme="dark"] .about-principles article{background:rgba(255,255,255,.025);border-color:#2a3452;box-shadow:0 14px 42px rgba(0,0,0,.12)}
html[data-theme="dark"] .about-principles article:hover{background:#18213e;border-color:#6676e8}
html[data-theme="dark"] .principle-visual{border-color:#2b3553;background:linear-gradient(145deg,rgba(97,114,237,.1),rgba(255,255,255,.018))}
html[data-theme="dark"] .principle-object i,
html[data-theme="dark"] .principle-connect i,
html[data-theme="dark"] .principle-trace i,
html[data-theme="dark"] .principle-publish i{background:#151d36;border-color:#344064;color:#a5afc5}
html[data-theme="dark"] .principle-trace i:last-of-type{background:#25305a;color:#bbc3ff}
html[data-theme="dark"] .principle-publish i:last-of-type{background:#17372f;color:#62c2a2}

html[data-theme="dark"] .interactive-section{background:#0b1024}
html[data-theme="dark"] .interactive-shell{border-color:#2a3452;background:linear-gradient(145deg,#151d36,#10172e)}
html[data-theme="dark"] .contact-section{background:#10162f}
html[data-theme="dark"] .contact-shell,html[data-theme="dark"] .contact-form{border-color:#2a3452;background:#151d36}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{accent-color:#7180ef}

@media (prefers-reduced-motion:no-preference){
  body,.site-header,.workflow-section,.tools-section,.infrastructure-section,.about-section,.interactive-section,.contact-section{transition:background-color .28s ease,color .28s ease,border-color .28s ease}
}
