/* Shared appearance control. Existing page palettes remain the dark default. */
.theme-switch{display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid #2a393e;border-radius:9px;background:#121b23;flex-shrink:0;box-sizing:border-box}
.theme-switch button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:#9aaeb7;cursor:pointer;box-sizing:border-box}
.theme-switch button svg{width:16px;height:16px;pointer-events:none}
.theme-switch button:hover{background:#203038;color:#eef5f3}
.theme-switch button[aria-pressed="true"]{background:#234046;color:#65d8df}
.theme-switch button:focus-visible{outline:2px solid #02a2ac;outline-offset:3px}
.qbit-header .qb-nav-actions{gap:16px}
.qbit-header .qb-nav-project{gap:8px}
.portal-header nav{gap:16px}

html[data-theme="light"]{color-scheme:light;--bg:#ffffff;--panel:#f4f8f9;--line:#d5e2e5;--text:#172d36;--muted:#526873;--blue:#096f9d;--accent:#087e85}
html[data-theme="light"] body{background:#fff;color:#172d36}
html[data-theme="light"] .qbit-brand{color:#172d36}
html[data-theme="light"] .qbit-header{border-color:#d5e2e5;color:#172d36}
html[data-theme="light"] .qbit-header nav{color:#526873}
html[data-theme="light"] .qbit-header .qb-phone{color:#087e85}
html[data-theme="light"] .qbit-header a:hover{color:#087e85}
html[data-theme="light"] .language-switch{color:#526873}
html[data-theme="light"] .theme-switch{border-color:#d5e2e5;background:#f4f8f9}
html[data-theme="light"] .theme-switch button{color:#526873}
html[data-theme="light"] .theme-switch button:hover{background:#e7f1f3;color:#172d36}
html[data-theme="light"] .theme-switch button[aria-pressed="true"]{background:#d6eff0;color:#08666d}

/* Landing and incubator demo. */
html[data-theme="light"] #qbit-concepts .qb-tech{color-scheme:light;--q-bg:#fff;--q-panel:#f4f8f9;--q-text:#172d36;--q-muted:#526873;--q-line:#d5e2e5;--q-accent:#087e85;--q-button:#fff}
html[data-theme="light"] #qbit-concepts .qt-platforms{color:#526873}
html[data-theme="light"] #qbit-concepts .qb-tech .qt-platforms span{color:#65808a}
html[data-theme="light"] #qbit-concepts .qt-divider{color:#36525c}
html[data-theme="light"] #qbit-concepts .qt-system-caption{border-color:#d5e2e5}
html[data-theme="light"] .demo-meter{background:#d5e2e5}
html[data-theme="light"] .demo-controls button{background:#e5f2f2;border-color:#a7ced0!important;color:#172d36}
html[data-theme="light"] .demo-controls button:hover{background:#d6ebec}
html[data-theme="light"] .demo-tabs a[aria-current]{background:#e5f2f2;border-color:#a7ced0}
html[data-theme="light"] .demo-settings input{accent-color:#087e85}
html[data-theme="light"] .demo-chart-grid{stroke:#d5e2e5}
html[data-theme="light"] .demo-chart-labels{fill:#526873}
html[data-theme="light"] .demo-incubator{background:linear-gradient(140deg,#e3efea,#f0f6f7);border-color:#a7c8bb}
html[data-theme="light"] .demo-incubator-top,html[data-theme="light"] .demo-incubator-bottom{color:#45665a}
html[data-theme="light"] .demo-chamber-window{--q-accent:#66f1c5}

/* Blue demo gallery and refrigeration dashboard. */
html[data-theme="light"] .eyebrow{color:#526873}
html[data-theme="light"] .gallery-card{border-color:#bfd5df}
html[data-theme="light"] .gallery-card:hover{background:#eaf3f6}
html[data-theme="light"] .gallery-incubator .gallery-icon,html[data-theme="light"] .gallery-incubator .gallery-action{color:#087e85}
html[data-theme="light"] .fridge-card{background:linear-gradient(145deg,#f5faff,#edf5f9)}
html[data-theme="light"] .fridge-card.is-cooling{border-color:#7aafc9;box-shadow:0 8px 32px #123b5810}
html[data-theme="light"] .ac-state{background:#e1eaf0}
html[data-theme="light"] .is-cooling .ac-state{background:#d4eaf5;color:#096f9d}
html[data-theme="light"] .fridge-illustration{--blue:#65c7ff}
html[data-theme="light"] .demo-tabs a[aria-current]{color:var(--blue,#087e85)}
html[data-theme="light"] .chart-grid{stroke:#d5e2e5}
html[data-theme="light"] .activity-panel{background:var(--panel)}
html[data-theme="light"] .control-note button{background:#e0eff7;border-color:#a4c7d9;color:#096184}
html[data-theme="light"] .control-note button:hover{background:#cee5f1}

/* Login and private project portal. */
html[data-theme="light"] .portal-eyebrow{color:#526873}
html[data-theme="light"] .login-card{background:linear-gradient(145deg,#f3f9f7,#f6f9fa);border-color:#c6ddda;box-shadow:0 20px 70px #173d3b0c}
html[data-theme="light"] .login-card input{background:#fff;border-color:#bfd4d3}
html[data-theme="light"] .portal-badge{border-color:#afceca}
html[data-theme="light"] .access-node,html[data-theme="light"] .access-hub{background:#e5f2ee;border-color:#afceca}
html[data-theme="light"] .access-line{background:#afceca}
html[data-theme="light"] .portal-primary{color:#fff}
html[data-theme="light"] .portal-primary:hover{background:#096a70}
html[data-theme="light"] .portal-message{background:#fff2eb;border-color:#dfb49e;color:#923c1e}
html[data-theme="light"] .portal-account button,html[data-theme="light"] .sensors-heading button{background:#e5f2ee;border-color:#afceca;color:#172d36}
html[data-theme="light"] .portal-account button:hover,html[data-theme="light"] .sensors-heading button:hover{background:#d4e9e3}
html[data-theme="light"] .project-summary{background:#f4f8f9}
html[data-theme="light"] .sensor-id{color:#526873}
html[data-theme="light"] .empty-sensors,html[data-theme="light"] .empty-sensors>span{border-color:#afceca}
html[data-theme="light"] .empty-sensors>span{background:#e5f2ee}

/* Give the icons their own space on phones. */
@media(max-width:700px){
  .qbit-header{grid-template-columns:auto minmax(0,1fr);gap:0 8px}
  .qbit-header nav{grid-column:1/-1;grid-row:2;justify-self:center;gap:24px}
  .qbit-header .qb-nav-actions{grid-column:2;grid-row:1;gap:8px}
  .qbit-header .qb-nav-project{gap:6px}
  .theme-switch button{width:28px;height:32px}
  .qb-login .portal{min-height:calc(100svh - 108px)}
  .portal-header{flex-wrap:wrap}
  .portal-header nav{flex-wrap:wrap;gap:14px}
}
@media(max-width:360px){
  .qbit-header .qb-nav-actions{gap:4px}
  .qbit-header .qb-nav-project{gap:4px}
  .theme-switch{padding:2px;gap:0}
  .theme-switch button{width:26px}
}
