/* Dark theme: deep navy surfaces, orange accents. Active only with <html data-theme="dark">. */
html[data-theme=dark]{color-scheme:dark;--bg:#091428;--surface:#0f1e3d;--surface-2:#132548;--surface-3:#182e58;--line:#263c6c;--text:#e8eefb;--muted:#a5b4d2;--dim:#8d9ec3;--navy-800:#e7eefc;--navy-700:#a8c2f2;--navy-600:#7ea6ee;--navy-100:#1a3162;--navy-50:#12244a;--orange-700:#ffad66;--orange-100:#3b2a17;--orange-50:#2a2316;--mint:#f58a2f;--mint-soft:#2a2316;--amber-soft:#2a2316;--coral-soft:#2d1f1a;--blue:#a8c2f2;--shadow:0 8px 30px rgba(0,0,0,.38);--chart-text:#aebbd6;--chart-grid:#223a6a;--chart-accent:#ffad66;--smoke-ink:#8fb2f2}
html[data-theme=dark] body{background:var(--bg);color:var(--text)}
html[data-theme=dark] body::before{background:linear-gradient(270deg,var(--orange-500) 0 24%,#3a5fa8 24% 100%)}
html[data-theme=dark] a,html[data-theme=dark] .text-link{color:var(--navy-700)}
/* generated dark counterparts of the light theme */
html[data-theme=dark] .button.secondary,html[data-theme=dark] .sidebar,html[data-theme=dark] .panel,html[data-theme=dark] .form-grid input,html[data-theme=dark] .form-grid select,html[data-theme=dark] .form-stack input,html[data-theme=dark] .phone-controls select,html[data-theme=dark] .phone-controls input,html[data-theme=dark] select,html[data-theme=dark] input[type=number],html[data-theme=dark] .metric,html[data-theme=dark] .login-page,html[data-theme=dark] .charts-filter input,html[data-theme=dark] .chart-controls input,html[data-theme=dark] .filters input,html[data-theme=dark] .filters select,html[data-theme=dark] .chart-card,html[data-theme=dark] .chart-panel,html[data-theme=dark] .chat-footer,html[data-theme=dark] .chat-input-box,html[data-theme=dark] .chat-footer textarea,html[data-theme=dark] .theme-toggle,html[data-theme=dark] .workspace-tabs button[aria-selected=true],html[data-theme=dark] .measurement-camera-pill,html[data-theme=dark] .measurement-camera-pill button,html[data-theme=dark] .measurement-previews:empty:before,html[data-theme=dark] #measurement-rename-dialog{background:#0e1c39}
html[data-theme=dark] .button.secondary,html[data-theme=dark] .chat-footer,html[data-theme=dark] .chat-input-box{border-color:#243c71}
html[data-theme=dark] .nav>a{color:#c0cfed}
html[data-theme=dark] .nav>a i{color:#a7bce5}
html[data-theme=dark] .nav>a:first-child{color:#bbcbeb}
html[data-theme=dark] .nav>a:first-child i{color:#a8bde6}
html[data-theme=dark] .nav-advanced{border-top:1px solid #233b6f}
html[data-theme=dark] .sidebar-bottom{color:#bdc8dc}
html[data-theme=dark] .topbar{background:#0e1c39eb}
html[data-theme=dark] .pill,html[data-theme=dark] .empty-icon,html[data-theme=dark] .metric-icon,html[data-theme=dark] .model-glyph,html[data-theme=dark] .drop-icon,html[data-theme=dark] .step i,html[data-theme=dark] .camera-glyph,html[data-theme=dark] .measurement-metrics article:first-child{border-color:#684827}
html[data-theme=dark] .form-grid input,html[data-theme=dark] .form-grid select,html[data-theme=dark] .form-stack input,html[data-theme=dark] .phone-controls select,html[data-theme=dark] .phone-controls input,html[data-theme=dark] select,html[data-theme=dark] input[type=number]{color:#e1e8f6}
html[data-theme=dark] .form-grid input,html[data-theme=dark] .form-grid select,html[data-theme=dark] .form-stack input,html[data-theme=dark] .phone-controls select,html[data-theme=dark] .phone-controls input,html[data-theme=dark] select,html[data-theme=dark] input[type=number],html[data-theme=dark] .charts-filter input,html[data-theme=dark] .chart-controls input,html[data-theme=dark] .filters input,html[data-theme=dark] .filters select{border:1px solid #253d74}
html[data-theme=dark] .form-stack label,html[data-theme=dark] .form-grid label,html[data-theme=dark] .status,html[data-theme=dark] .phone-controls>label{color:#c3d2ee}
html[data-theme=dark] .form-grid label small,html[data-theme=dark] .form-footnote,html[data-theme=dark] .muted,html[data-theme=dark] .workspace-heading p,html[data-theme=dark] .section-heading p{color:#bac5da}
html[data-theme=dark] .status.success,html[data-theme=dark] .status.active,html[data-theme=dark] .flash{background:#122348}
html[data-theme=dark] .status.failed,html[data-theme=dark] .status.error{background:#102042}
html[data-theme=dark] .flash.error{background:#101f40}
html[data-theme=dark] th,html[data-theme=dark] .phone-instructions{color:#beceec}
html[data-theme=dark] td{color:#d0dbf1}
html[data-theme=dark] td{border-color:#233a6e}
html[data-theme=dark] tbody tr:hover{background:#302312}
html[data-theme=dark] .metric-label,html[data-theme=dark] .metric-foot,html[data-theme=dark] .model-card span,html[data-theme=dark] .live-empty{color:#b6c2d8}
html[data-theme=dark] .info-row b,html[data-theme=dark] .charts-filter input,html[data-theme=dark] .chart-controls input,html[data-theme=dark] .filters input,html[data-theme=dark] .filters select,html[data-theme=dark] .chart-panel h3,html[data-theme=dark] .charts-heading h2,html[data-theme=dark] .message.user .message-content,html[data-theme=dark] .message.assistant .message-content,html[data-theme=dark] .chat-footer textarea,html[data-theme=dark] .chat-empty h2,html[data-theme=dark] .chat-intro h1{color:#cfdbf1}
html[data-theme=dark] footer{color:#b1c3e8}
html[data-theme=dark] .notice-strip{border-color:#684f27}
html[data-theme=dark] .notice-strip,html[data-theme=dark] .notice-strip p,html[data-theme=dark] .notice-strip *{color:#f9b06c}
html[data-theme=dark] .chart-card,html[data-theme=dark] .chart-panel{border-color:#233b70}
html[data-theme=dark] .chart-empty,html[data-theme=dark] .message.assistant .message-content{background:#101e3e}
html[data-theme=dark] .chart-empty,html[data-theme=dark] .chart-note,html[data-theme=dark] .charts-heading p{color:#a9bee6}
html[data-theme=dark] .runtime-banner{border-color:#243c72}
html[data-theme=dark] .runtime-banner p,html[data-theme=dark] .workspace-tabs button,html[data-theme=dark] .measurement-metrics span{color:#bacbeb}
html[data-theme=dark] .button.primary:disabled{background:#302112}
html[data-theme=dark] .button.secondary,html[data-theme=dark] .theme-toggle{border:1px solid #27417b}
html[data-theme=dark] .brand small,html[data-theme=dark] .logout{color:#b3c5e9}
html[data-theme=dark] .notice-strip,html[data-theme=dark] .notice-box{border:1px solid #684827}
html[data-theme=dark] .runtime-offline{border-color:#684927}
html[data-theme=dark] .content small,html[data-theme=dark] .content .muted,html[data-theme=dark] .content .form-footnote,html[data-theme=dark] .content .step small,html[data-theme=dark] .content .step p{color:#b5c7ea!important}
html[data-theme=dark] .content .metric-label,html[data-theme=dark] .content .metric-foot,html[data-theme=dark] .info-row>span:first-child{color:#b5c7ea}
html[data-theme=dark] .notice-box,html[data-theme=dark] .notice-box *{color:#f9b06c!important}
html[data-theme=dark] .drop-zone{border:1.5px dashed #2e4d91}
html[data-theme=dark] .login-page .theme-toggle{background:#0e1c39f0}
html[data-theme=dark] .soft-badge,html[data-theme=dark] .measurement-camera-pill button,html[data-theme=dark] #measurement-rename-dialog{border:1px solid #243c71}
html[data-theme=dark] .soft-badge{color:#bcccec}
html[data-theme=dark] .scale-status-card p,html[data-theme=dark] .network-panel>p{color:#bec8dc}
html[data-theme=dark] .microcopy{color:#b5c1d7}
html[data-theme=dark] .live-stage{border:1px solid #233a6f}
html[data-theme=dark] .camera-glyph{border:1px solid #243d73}
html[data-theme=dark] .phone-state{color:#bfceec}
html[data-theme=dark] .measurement-result-head p,html[data-theme=dark] .measurement-previews p,html[data-theme=dark] #measurement-rename-dialog p{color:#b6c1d8}
html[data-theme=dark] .measurement-metrics article:first-child{background:linear-gradient(120deg,#0e1c39,var(--orange-50))}
html[data-theme=dark] .measurement-metrics article.smoke{background:linear-gradient(120deg,#0e1c39,var(--navy-50))}
html[data-theme=dark] .measurement-metrics small{color:#b5c0d7}
html[data-theme=dark] .measurement-camera-pill{border:1px solid #233b70}
html[data-theme=dark] .measurement-discovery-row,html[data-theme=dark] .measurement-advanced,html[data-theme=dark] .live-stage{border-color:#233b6f}
html[data-theme=dark] .scale-options p,html[data-theme=dark] .measurement-notes p{color:#bcc6db}
html[data-theme=dark] .measurement-check{color:#b2c4e9}
html[data-theme=dark] .measurement-previews:empty:before{border:1px dashed #253e75}
html[data-theme=dark] .measurement-previews:empty:before{color:#a5bbe5}
html[data-theme=dark] .soft-badge,html[data-theme=dark] .measurement-metrics article.smoke{border-color:#243d73}
html[data-theme=dark] .measurement-camera-pill button{border-color:#27417b}
@media(max-width:760px){html[data-theme=dark] .mobile-menu{background:#0e1c39}
html[data-theme=dark] .mobile-menu{color:#b8c9ea}
html[data-theme=dark] .mobile-menu{border:1px solid #243c71}}
/* ===== hand-tuned dark details ===== */
html[data-theme=dark] .avatar{background:#2d5aa6;color:#fff}
html[data-theme=dark] .login-page .theme-toggle{background:rgba(9,20,40,.72);color:#fff;border-color:rgba(255,255,255,.35)}
html[data-theme=dark] .button.primary{color:var(--navy-900)}
html[data-theme=dark] .button.primary:disabled{background:#4a3a28;color:#b9a68e}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#7f92b8}
html[data-theme=dark] ::selection{background:#f58a2f;color:#0c1f45}
html[data-theme=dark] .refinery-hero{box-shadow:0 12px 30px rgba(0,0,0,.45)}
html[data-theme=dark] .brand-logo,html[data-theme=dark] .hero-identity img{background:#fff}
html[data-theme=dark] footer span{color:#7a8db4}
