:root{color-scheme:light}
.profile-theme-switch{display:flex;gap:4px;padding:4px;margin:16px 0 10px;border:1px solid var(--line,#dce3ed);border-radius:999px;background:var(--ground,#f8f9fb)}
.profile-theme-switch button{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-height:44px;border:1px solid transparent;border-radius:999px;background:transparent;color:var(--muted,#526078);font:inherit;font-size:14px;cursor:pointer}
.profile-theme-switch button[aria-pressed=true]{background:var(--accent,#3458d5);color:#fff;box-shadow:0 2px 6px #17245418}
.profile-theme-switch svg{width:19px;height:19px;flex:none}
.profile-theme-switch button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
:root[data-theme=dark]{color-scheme:dark;background:#101520}
/* Component styles pair their original light colour with these shared tokens.
   Keeping the token in the original declaration also covers nested panels,
   gradients, selected/hover states and dialogs without a specificity contest. */
:root[data-theme=dark]{
 --della-surface:#192130;--della-soft:#202b3d;--della-ground:#101520;
 --della-ink:#edf1fa;--della-muted:#b6c3d8;
 --della-line:#45536b;--della-line-soft:#36435a;--della-line-strong:#6d7f9e;
 --della-accent:#a5b7ff;--della-accent-border:#798cdb;
 --della-danger:#ffb8b3;--della-danger-tint:#482328;--della-danger-border:#bc747a;
 --della-warn:#ffd18a;--della-warn-tint:#42331c;--della-warn-border:#a48554;
 --della-ok:#91deb0;--della-ok-tint:#1d3c30;--della-ok-border:#579777;
 --della-teal:#82d9e5;--della-teal-tint:#16363f;--della-teal-border:#4f9ba9;
 --della-purple:#d8b8ff;--della-purple-tint:#332546;--della-purple-border:#8a6bac;
 --della-glass:#1c2738eb;--della-glass-soft:#223149b3;
 --della-highlight:#64799870;--della-highlight-soft:#64799830;
}
:root[data-theme=dark],:root[data-theme=dark] :is(.content,.sidebar,.tron-page,.tron-chat,.tron-account,.profile-page,.chat-page,dialog){--surface:#192130;--ground:#101520;--ink:#edf1fa;--text:#e1e8f5;--muted:#aebbd0;--faint:#91a0b8;--line:#36435a;--line-strong:#52617b;--border:#36435a;--accent:#91a6ff;--accent-hover:#afbdff;--accent-tint:#263355;--danger:#ffaaa5;--danger-tint:#452326;--ok:#91deb0;--ok-tint:#1d3c30;--warn:#ffd18a;--warn-tint:#42331c;--chat-ink:#edf1fa;--chat-muted:#aebbd0;--chat-line:#36435a;--chat-soft:#192130;--chat-blue:#91a6ff;--nav-blue:#91a6ff;--nav-ink:#edf1fa;--nav-muted:#aebbd0;--page-ink:#edf1fa;--page-muted:#aebbd0;--page-border:#36435a;--page-surface:#192130;--page-primary:#3a51c7;--page-primary-hover:#465fd5;--bm-ink:#edf1fa;--bm-muted:#aebbd0;--bm-line:#36435a;--bm-blue:#91a6ff;--weave-ink:#edf1fa;--weave-muted:#aebbd0;--detail-ink:#edf1fa;--detail-muted:#aebbd0;--detail-line:#36435a;--card-shadow:0 8px 28px #0002}
:root[data-theme=dark] :is(body,.app,.workspace,main,.content,.chat-body,.conversation-main,.chat-composer-dock,.workspace-loading){background-color:var(--ground);color:var(--ink)}
:root[data-theme=dark] :is(header,.sidebar,.chat-history,.chat-history-panel,.tron-accounts-sidebar,.tron-sidebar-heading,.panel,.profile-card,.source-card,.empty,.answer,.ask-form,.document-row,.document-text,.conversation-reply,.chat-conversation-heading,.chat-options-menu,.tron-composer-menu,dialog){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(h1,h2,h3,h4,label,legend,strong,.profile-summary-title,.conversation-speaker,.answer-text,.della-prose,.tron-history-title,.tron-disclosure>summary){color:var(--ink)}
:root[data-theme=dark] :is(p,.hint,small,.lead,.meta,.page-context,.profile-eyebrow,.profile-section-label,.profile-session-list,.tron-chat-footnote,.chat-voice-status,.tron-thinking-caption,.conversation-choice small,.tron-day-notice){color:var(--muted)}
:root[data-theme=dark] :is(a,.text-link,.back,.sidebar-nav a,.sidebar-nav button){color:var(--accent)}
:root[data-theme=dark] :is(input,textarea,select,.interview-composer,.chat-composer,.tron-select,.tron-select-menu,.tron-select-option,.secondary,.badge,.status,.conversation-choice,.chat-item-menu,.profile-service-note,.profile-account-link,.profile-avatar,.citations details,.citations blockquote,pre,code){background-color:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
:root[data-theme=dark] :is(input[readonly],.conversation-question,.tron-user,.profile-service-note,.profile-account-link,.chat-item-menu[open],.tron-select-option.is-active,.tron-select-option[aria-selected=true]){background:var(--accent-tint);color:var(--ink)}
:root[data-theme=dark] :is(.conversation-choice[aria-current=true],.sidebar button[aria-current=page],.tron-entry[aria-current=page]){background:var(--accent-tint);color:var(--accent)}
:root[data-theme=dark] :is(.primary,.interview-send,.tron-day-primary,.profile-theme-switch button[aria-pressed=true]){background:#3a51c7;color:#fff;border-color:#748bf0}
:root[data-theme=dark] :is(.interview-stop,.interview-steer,.interview-voice,.interview-talk,.tron-attach-button,.tron-review-pill,.profile-motion-toggle){background:var(--accent-tint);color:var(--accent);border-color:var(--line)}
:root[data-theme=dark] .tron-chat .conversation-main{background-color:var(--ground)}
:root[data-theme=dark] .content[data-page=tron] .tron-chat .tron-thinking{background:var(--surface);border-color:var(--line)}
:root[data-theme=dark] .content[data-page=tron] .tron-chat .tron-thinking>summary{color:var(--ink)}
:root[data-theme=dark] #tron-accounts-panel .tron-account[data-provider=claude],:root[data-theme=dark] .tron-using-account[data-provider=claude]{background:#38291f;border-color:#805433}
:root[data-theme=dark] #tron-accounts-panel .tron-account[data-provider=chatgpt],:root[data-theme=dark] .tron-using-account[data-provider=chatgpt],:root[data-theme=dark] #tron-accounts-panel .tron-credit-overview{background:#2e2544;border-color:#665186}
:root[data-theme=dark] #tron-accounts-panel .tron-account.tron-account-exhausted{background:#482328;border-color:#e07a7a}
:root[data-theme=dark] :is(.tron-allowance-exhausted,.tron-status.tron-exhausted,.tron-error,.notice.error,.profile-danger,.profile-destructive){background:#482328;color:#ffb8b3;border-color:#e07a7a}
:root[data-theme=dark] :is(.tron-allowance-exhausted strong,.tron-allowance-exhausted>span,.tron-weekly-empty,.tron-using-empty,.error-text){color:#ffb8b3}
:root[data-theme=dark] :is(.tron-extra-credits,#tron-accounts-panel .tron-account-exhausted .tron-extra-credits){background:#ffffff08;border-color:#ffffff35}
:root[data-theme=dark] :is(.tron-credit-row strong,.tron-credit-overview>summary>strong,#tron-accounts-panel .tron-account-exhausted .tron-credit-row strong){color:#d8c0ff}
:root[data-theme=dark] .tron-ready,:root[data-theme=dark] .tron-release-badge.is-verified{background:#1d3c30;color:#91deb0}
:root[data-theme=dark] :is(.tron-provider-heading h3,.tron-release-badge,.tron-day-dialog button,.tron-day-dialog input,.tron-day-dialog textarea){background:var(--accent-tint);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] .tron-day-dialog .tron-day-primary{background:#3a51c7;color:#fff}
:root[data-theme=dark] .tron-day-dialog :is(fieldset,details,header){border-color:var(--line)}
:root[data-theme=dark] .tron-chat .conversation-choice[data-chat-activity=done] small{color:#a5b7ff}
:root[data-theme=dark] .tron-chat .conversation-choice:is([data-chat-activity=input],[data-chat-activity=attention]) small{color:#ffd18a}
:root[data-theme=dark] :is(.tron-privacy-review,.tron-tool-review){background:#42331c;border-color:#b68a43;color:var(--ink)}
:root[data-theme=dark] :focus-visible{outline-color:#a5b7ff}
:root[data-theme=dark] .app>aside{background:var(--surface)!important;color:var(--ink)}
:root[data-theme=dark] .app>aside :is(button,.profile-account-link){background-color:var(--surface);background-image:none;color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] .app>aside button[aria-current]{background:var(--accent-tint);color:var(--accent)}
:root[data-theme=dark] .app>aside :is(small,.nav-card-copy,.team-invite-entry){color:var(--muted)}
:root[data-theme=dark] .content[data-page] :is(input,textarea,select,.secondary){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] .content[data-page] input[readonly]{background:var(--ground);color:var(--muted)}
:root[data-theme=dark] .content[data-page] .profile-danger{border-color:#a65a62}
:root[data-theme=dark] .profile-motion-toggle{background:transparent}
:root[data-theme=dark] .profile-session-list li{border-color:var(--line)}
/* Legacy form rules include many :not() clauses; keep focus and readonly states dark too. */
:root[data-theme=dark] .content[data-page] :is(input,textarea,select){background-color:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)}
:root[data-theme=dark] .content[data-page] :is(input,textarea)::placeholder{color:var(--muted)}
:root[data-theme=dark] .content[data-page] :is(.chat-toolbar,.conversation-history,.chat-history-section-header,.chat-history-section-title,.tron-activity,.chat-item-menu,.chat-item-menu>div){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] #tron-accounts-panel{background:var(--surface);color:var(--ink);--muted:#aebbd0}
:root[data-theme=dark] #tron-accounts-panel .tron-credit-overview{--muted:#c2b5d9}
:root[data-theme=dark] #tron-accounts-panel :is(.tron-provider-group,.tron-total-cost,.tron-recovery-note,.tron-filter-disclosure){color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] #tron-accounts-panel .tron-provider-name{background:var(--accent-tint);color:var(--ink)}
:root[data-theme=dark] .content[data-page] :is(.feature-card,.knowledge-tile,.document-row,.workspace-empty,.conversation-history-list){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] .content[data-page] .chat-toolbar :is(h1,span,button){color:var(--ink)}
/* SVG map chrome needs the same palette as its HTML labels. */
:root[data-theme=dark] .business-weave-page.is-radial-map .weave-thread .weave-thread-halo{stroke:var(--della-soft)}
:root[data-theme=dark] .business-weave-page.is-radial-map .weave-orbits ellipse{stroke:var(--della-line);opacity:.45}
:root[data-theme=dark] .business-weave-page.is-radial-map .weave-station button>svg{color:var(--della-ground)}
:root[data-theme=dark] .business-weave-page .weave-edge-label rect{fill:var(--della-surface);stroke:var(--della-line)}
:root[data-theme=dark] .business-weave-page .weave-edge-label text{fill:var(--della-ink)}
:root[data-theme=dark] .business-weave-page :is(.weave-thread-start,.weave-bend-dot){fill:var(--della-surface)}
:root[data-theme=dark] .business-weave-page :is(.weave-map-signature,.weave-orbit-label){fill:var(--della-muted)}
:root[data-theme=dark] .map-guide-panel{background:linear-gradient(155deg,var(--della-surface),var(--della-soft))}
/* Monochrome provider artwork keeps its intended contrast on a small logo plate. */
:root[data-theme=dark] .build-provider-logo{display:grid;place-items:center;min-width:44px;min-height:44px;border-radius:10px;background:#fff}
:root[data-theme=dark] :is(.app>aside .brand>span,.login-brand-mark,.brief-brand-mark,.page-context .page-brand-mark){background:#3154ce;color:#fff}
:root[data-theme=dark] .tool-logo-generic{color:var(--della-ground)}
:root[data-theme=dark] :is(.onboarding-rail [aria-current=step] .onboarding-node,.wonders-rail li.is-current .wonder-number,.wizard-rail li.is-current span,.onboarding-current .save-tool-pill,.brief-step-n,.brief-rail li.is-current button span,.della-dialog-mark,.empty-step::before){background:#3a51c7;color:#fff}
