:root{color-scheme:dark}html,body{margin:0;padding:0}img{max-width:100%}[hidden]{display:none!important}
/* ── theme toggle ── */
.theme-toggle{width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.06);color:#eef2fb;display:flex;align-items:center;justify-content:center;cursor:pointer;margin-right:12px;transition:border-color .3s,background .3s}
.theme-toggle:hover{border-color:rgba(224,38,62,.6);background:rgba(255,255,255,.1)}
.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .ic-sun{display:none}
html[data-theme="light"] .theme-toggle .ic-sun{display:block}
html[data-theme="light"] .theme-toggle .ic-moon{display:none}
/* ── light mode: the whole page flips; only the four cinematic 3D scenes stay dark ── */
html[data-theme="light"]{
  color-scheme:light;
  --bg:#f4f6fb;--bg2:#e9eef7;--panel:#ffffff;--panel-brd:rgba(15,26,51,.13);
  --ink:#101a33;--muted:#49577a;
  --light-bg:#ffffff;--light-alt:#f1f4fa;--light-ink:#101a33;--light-muted:#49577a;
}
html[data-theme="light"] body{background:var(--bg);color:var(--ink)}
/* the four 3D scenes flip too: soft light backdrop with a touch of depth so the models read */
html[data-theme="light"] #story,html[data-theme="light"] #device,html[data-theme="light"] #platform,html[data-theme="light"] #twin{background:linear-gradient(180deg,#f4f6fb 0%,#e1e8f5 55%,#edf1f9 100%)}
html[data-theme="light"] #story .pin-wrap::before{background:linear-gradient(90deg,rgba(244,246,251,.96) 0%,rgba(244,246,251,.86) 22%,rgba(244,246,251,.5) 40%,transparent 58%)}
html[data-theme="light"] .story-copy{text-shadow:0 2px 22px rgba(244,246,251,.92),0 1px 2px rgba(244,246,251,.7)}
html[data-theme="light"] .story-step h3{color:#101a33}
html[data-theme="light"] .story-step p{color:#3d4a6b}
html[data-theme="light"] .story-rail li{background:rgba(16,26,51,.14)}
html[data-theme="light"] .story-rail li.done{background:rgba(16,26,51,.45)}
html[data-theme="light"] .story-rail li.on{background:var(--red)}
html[data-theme="light"] .story-cut{background:#edf1f9}
html[data-theme="light"] .scroll-hint{color:rgba(16,26,51,.55);border-color:rgba(16,26,51,.3)}
html[data-theme="light"] .alert-chip{color:#b3122b;background:rgba(255,255,255,.9);border-color:rgba(224,38,62,.5);box-shadow:0 8px 28px -6px rgba(224,38,62,.35)}
html[data-theme="light"] #storyReadout{background:rgba(255,255,255,.92);box-shadow:0 24px 60px -20px rgba(15,26,51,.3)}
html[data-theme="light"] .sr-head{color:#101a33}
html[data-theme="light"] .sr-row{border-top-color:rgba(16,26,51,.09)}
html[data-theme="light"] .sr-row b{color:#101a33}
html[data-theme="light"] .sr-row b.bad{color:#c93a2a}
html[data-theme="light"] .sr-row b.good{color:#128a52}
html[data-theme="light"] .sr-status{color:#2a63c8;border-color:rgba(42,99,200,.4)}
html[data-theme="light"] .sr-status.alert{color:#c2372a;border-color:rgba(194,55,42,.45)}
html[data-theme="light"] .sr-status.acting{color:#128a52;border-color:rgba(18,138,82,.45)}
html[data-theme="light"] #storyReadout.alert-card{box-shadow:0 0 48px -8px rgba(224,38,62,.3),0 24px 60px -20px rgba(15,26,51,.25)}
html[data-theme="light"] #storyReadout.good-card{box-shadow:0 0 44px -8px rgba(57,217,138,.35),0 24px 60px -20px rgba(15,26,51,.25)}
html[data-theme="light"] .callout{color:#101a33;background:rgba(255,255,255,.86);border-color:rgba(16,26,51,.16);box-shadow:0 8px 22px -6px rgba(16,26,51,.28)}
html[data-theme="light"] .loop-ball{background:#ffffff;border-color:rgba(16,26,51,.22);color:#101a33}
html[data-theme="light"] .loop-ball .lb-num{color:var(--red)}
html[data-theme="light"] .loop-ball.on{background:radial-gradient(circle at 32% 26%,#ff5064 0%,var(--red) 55%,#a51226 100%);border-color:var(--red);box-shadow:0 30px 80px -18px rgba(224,38,62,.55),0 0 0 1px rgba(255,80,104,.4);color:#fff}
html[data-theme="light"] .loop-ball.on .lb-num{color:rgba(255,255,255,.8)}
html[data-theme="light"] .loop-ball.done{border-color:rgba(224,38,62,.45)}
html[data-theme="light"] .big-num-label{color:#49577a}
html[data-theme="light"] .stage-ring .rt{stroke:rgba(16,26,51,.12)}
html[data-theme="light"] .loop-dock-arrow{color:rgba(16,26,51,.3)}
html[data-theme="light"] .pillar{background:#ffffff}
html[data-theme="light"] .pillar li{color:#3d4a6b;border-top-color:rgba(16,26,51,.08)}
html[data-theme="light"] .twin-panel{background:rgba(255,255,255,.92);box-shadow:0 24px 60px -20px rgba(15,26,51,.28)}
html[data-theme="light"] .twin-panel-head{color:#101a33}
html[data-theme="light"] .twin-room{border-color:rgba(16,26,51,.12);background:rgba(16,26,51,.03)}
html[data-theme="light"] footer{border-top-color:rgba(15,26,51,.1)}
html[data-theme="light"] .foot-base{border-top-color:rgba(15,26,51,.08)}
html[data-theme="light"] #modeGate{background:radial-gradient(1100px 520px at 50% -10%,#dde6f7 0%,var(--bg) 62%)}
html[data-theme="light"] .loader-bar{background:rgba(16,26,51,.12)}
@media (max-width:900px){
  html[data-theme="light"] #story .pin-wrap::after,html[data-theme="light"] #device .pin-wrap::after,html[data-theme="light"] #twin .pin-wrap::after{background:linear-gradient(180deg,rgba(244,246,251,.98) 0%,rgba(244,246,251,.95) 55%,rgba(244,246,251,.6) 80%,transparent 100%)}
}
html[data-theme="light"] #nav,html[data-theme="light"] #nav.scrolled{background:rgba(255,255,255,.9);box-shadow:0 1px 0 rgba(15,26,51,.08)}
html[data-theme="light"] .brand-mark,html[data-theme="light"] .nav-links a:hover,html[data-theme="light"] .foot-col b,html[data-theme="light"] .foot-col a:hover,html[data-theme="light"] .chip:hover,html[data-theme="light"] .chart-title b,html[data-theme="light"] .mode-switch a:hover{color:#101a33}
html[data-theme="light"] .theme-toggle{border-color:rgba(15,26,51,.35);background:rgba(15,26,51,.05);color:#101a33}
html[data-theme="light"] .burger span{background:#101a33}
html[data-theme="light"] #mobileMenu{background:rgba(244,246,251,.98)}
html[data-theme="light"] #mobileMenu a{color:#101a33}
html[data-theme="light"] .stat{background:#ffffff}
html[data-theme="light"] .gauge-val{color:#101a33}
html[data-theme="light"] .case-stat{background:linear-gradient(160deg,#ffffff,#e9edf8);color:#101a33;box-shadow:0 40px 80px -30px rgba(15,26,51,.22)}
html[data-theme="light"] .big-num{background:linear-gradient(120deg,#e0263e,#8f0f24);-webkit-background-clip:text;background-clip:text}
html[data-theme="light"] .mode-switch{background:rgba(255,255,255,.92)}
html[data-theme="light"] .btn-ghost{border-color:rgba(15,26,51,.3);color:#101a33;background:transparent}
html[data-theme="light"] .btn-ghost:hover{background:rgba(15,26,51,.06)}
html[data-theme="light"] .ai-badge{background:rgba(29,43,95,.08);color:#1d2b5f}
html[data-theme="light"] .ai-badge-red{background:rgba(224,38,62,.12);color:#b3122b}
html[data-theme="light"] .ai-card-red{background:linear-gradient(160deg,#fdeef0,#f9dde2);border-color:rgba(224,38,62,.3)}
html[data-theme="light"] .ai-card-red h3,html[data-theme="light"] .ai-card-red p,html[data-theme="light"] .ai-card-red li{color:#3c1520}
html[data-theme="light"] .ticks li{border-top-color:rgba(15,26,51,.1)}
html[data-theme="light"] .eyebrow{border-color:rgba(15,26,51,.15);background:rgba(15,26,51,.04)}
html[data-theme="light"] .gauge > path:first-child{stroke:rgba(15,26,51,.12)}
html[data-theme="light"] .gauge text{fill:#101a33}
html[data-theme="light"] .gauge text:last-of-type{fill:#49577a}
