/* Light is the default, including when scripts/storage are unavailable. Dark retains original palette. */
:root:not([data-theme=dark]){
color-scheme:light;--env-bg:#f4f6f9;--env-window:#fff;--env-sidebar:#eef1f6;--env-toolbar:rgba(255,255,255,.96);--env-surface:#fff;--env-surface-raised:#edf2f8;--env-surface-hover:#e3ebf5;--env-separator:#d9e0e9;--env-separator-strong:#b9c5d4;--env-label:#192535;--env-secondary:#46566b;--env-tertiary:#59697c;--env-accent:#0865c5;--env-accent-hover:#064f9c;--env-shadow:0 3px 18px #233c5b09;--env-shadow-floating:0 18px 60px #233c5b26;
--color-bg-canvas:#f4f6f9;--color-bg-surface-1:#fff;--color-bg-surface-2:#edf2f8;--color-bg-surface-3:#e2eaf4;--color-border-subtle:#d9e0e9;--color-border-strong:#aab9ca;--color-border-focus:#0865c5;--color-text-primary:#192535;--color-text-secondary:#46566b;--color-text-muted:#59697c;--color-action-primary:#0865c5;--color-action-primary-hover:#064f9c;--color-status-success:#18673b;--color-status-info:#1759a0;--color-status-warning:#805600;--color-status-danger:#ad2531;--color-status-critical:#a01932;
}
.theme-toggle{white-space:nowrap;font-size:.8rem}.theme-entry{position:absolute;right:1rem;top:1rem;z-index:5}.nav-bottom .theme-toggle{width:100%;margin:.5rem 0}
html:not([data-theme=dark]) a{color:#0861b5}
html:not([data-theme=dark]) :is(h1,h2,h3,h4,strong,th){color:inherit}
html:not([data-theme=dark]) :is(.hero-primary,.product-page-head,.ops-summary,.metric-strip,.login-card,.entry-story,.public-header,.public-footer,.public-console,.public-cta,.command-palette,.command-search-row input){background:var(--env-surface);color:var(--env-label);border-color:var(--env-separator)}
html:not([data-theme=dark]) :is(.nexo-hero,.nexo-welcome,.desk-hero){background:linear-gradient(125deg,#e6f4f0,#fff 75%);border-color:#b8d7cc;color:var(--env-label)}
html:not([data-theme=dark]) :is(.nexo-hero p,.nexo-memory small,.desk-table small,.desk-metrics small){color:var(--env-secondary)}
html:not([data-theme=dark]) :is(.nexo-memory strong,.nexo-source,.nexo-origin summary){color:#146348}
html:not([data-theme=dark]) :is(input,select,textarea){background:#fff;color:#192535;border-color:#aab9ca;box-shadow:none}
html:not([data-theme=dark]) :is(input,select,textarea):focus{background:#fff;border-color:#0865c5;box-shadow:0 0 0 3px #0865c520}
html:not([data-theme=dark]) :is(input,textarea)::placeholder{color:#647489;opacity:1}
html:not([data-theme=dark]) :is(button,.button){background:#edf2f8;color:#253b55;border-color:#bdcad9}
html:not([data-theme=dark]) :is(button,.button):hover{background:#dfe9f5;border-color:#7d9abf}
html:not([data-theme=dark]) :is(button.primary,.button.primary){background:#0865c5;color:#fff;border-color:#0865c5}
html:not([data-theme=dark]) :is(button.primary,.button.primary):hover{background:#064f9c}
html:not([data-theme=dark]) :is(.sidebar a,.public-nav a,.quick-grid a,.ops-inbox-row){color:var(--env-secondary)}
html:not([data-theme=dark]) :is(.sidebar a[aria-current=page],.sidebar a:hover,.public-nav a[aria-current=page],.command-results a.is-active){background:#dce9fa;color:#154d8c}
html:not([data-theme=dark]) :is(th,thead){background:#edf2f8;color:#344a63}
html:not([data-theme=dark]) :is(td,th){border-color:#d9e0e9}
html:not([data-theme=dark]) tbody tr:hover{background:#f1f6fc}
html:not([data-theme=dark]) :is(.notice,.badge,.counter-badge){background:#e9f1fc;color:#234e80;border-color:#b9cce7}
html:not([data-theme=dark]) :is(.notice.danger,.badge.danger,.badge.critical,.budget-over){color:#9c2430;background:#fff0f1;border-color:#e8b6bd}
html:not([data-theme=dark]) :is(.badge.warning,.desk-tag.todo){color:#795100;background:#fff3d6;border-color:#dac691}
html:not([data-theme=dark]) :is(.badge.success,.desk-tag.done,.tool-result){color:#185b39;background:#edf8f0;border-color:#aacfb6}
html:not([data-theme=dark]) :is(.ops-summary.is-clear .ops-status-number,.empty-check){color:#18673b}
html:not([data-theme=dark]) .ops-summary.needs-attention .ops-status-number{color:#805600}
html:not([data-theme=dark]) :is(.command-trigger kbd,code,pre){background:#edf2f8;color:#304b68;border-color:#cbd5e1}
html:not([data-theme=dark]) .brand{background:#11151b;border-radius:8px;padding:5px 8px;box-sizing:content-box}
html:not([data-theme=dark]) .brand img{max-width:100%}
html:not([data-theme=dark]) .everyday-tools .tool-tabs button[aria-pressed=false]{background:#edf2f8;color:#253b55;border-color:#bdcad9}
html:not([data-theme=dark]) .everyday-tools .tool-tabs button[aria-pressed=true]{background:#d8edbe;color:#254612;border-color:#7c9c59}
html:not([data-theme=dark]) :is(.expense-row,.everyday-tools form,.everyday-tools hr){border-color:#d9e0e9}
@media(max-width:900px){.public-actions{flex-wrap:wrap}.theme-entry{position:relative;display:block;width:max-content;margin:1rem 1rem 0 auto;top:auto;right:auto}}
@media print{.theme-toggle{display:none!important}}
html:not([data-theme=dark]) table thead th{background:#edf2f8;color:#344a63}
html:not([data-theme=dark]) .nav-product img{filter:brightness(.42)}
html:not([data-theme=dark]) .public-footer .brand{width:fit-content;max-width:100%}
html:not([data-theme=dark]) input[aria-invalid=true],html:not([data-theme=dark]) textarea[aria-invalid=true],html:not([data-theme=dark]) select[aria-invalid=true]{border-color:#ad2531}
.theme-toggle[hidden]{display:none}

/* Matched brand variants; crop whitespace in the light source without altering either asset. */
.brand .brand-light{display:none}
html:not([data-theme=dark]) .brand{background:transparent;border-radius:0;padding:0;box-sizing:border-box}
html:not([data-theme=dark]) .brand .brand-dark{display:none}
html:not([data-theme=dark]) .brand .brand-light{display:block;width:100%;aspect-ratio:5/1;overflow:hidden;mix-blend-mode:multiply}
html:not([data-theme=dark]) .brand .brand-light img{display:block;width:100%;height:100%;object-fit:cover;max-width:none}

html.theme-switching *,html.theme-switching *::before,html.theme-switching *::after{transition:none!important}
