:root{color-scheme:light}.theme-toggle{gap:8px;font-size:11px;white-space:nowrap}.theme-toggle span{display:inline}html[data-theme=dark]{color-scheme:dark;--bg:#17141d;--surface:#211c29;--ink:#f0eaf5;--muted:#b6aabe;--purple:#c7a5e5;--purple-deep:#dbc0f2;--lilac:#372941;--line:#3d3348;--green:#9dd2b0;--green-light:#213b30;--warning:#e6c180;--warning-light:#3b3020;--red:#f0a5b2;--red-light:#422630}
html[data-theme=dark] :is(.sidebar,.topbar,.metric,.card,dialog,.search-field,select,.calendar-board,.calendar-theme-banner){background:var(--surface)}
html[data-theme=dark] :is(.sidebar-note,.demo-banner,.metric-note,.stat-strip,.editorial-note,.workflow>div,.provider-grid article,.contact-overview,.mini-metrics article,.json-preview,.review-card,.composer-preview,.calendar-weekdays span,.calendar-day.outside){background:#282131;border-color:var(--line)}
html[data-theme=dark] :is(.demo-banner,.demo-banner strong,.demo-symbol,.sidebar-note p,.breadcrumb-group>strong,.next-edition,.next-art em,.stat-strip strong,.row-title,.contact-name strong,.funnel strong,.link-stat strong,.template-body h2,.card h2,.card h3,dialog>h2,dialog h3,.settings-grid h3,.integration-card h2,.drawer-section h3,.segment-count strong,.usage-grid strong,.provider-grid strong,.workflow>div>span,.detail-list dd,.preference-row,.timeline strong,.mini-metrics strong,.contact-overview p,.command-result,.json-preview){color:var(--ink)}
html[data-theme=dark] :is(.card p,.settings-grid p,.template-body p,.segment-card p,.integration-card>p,.editorial-note p,.empty p,.card .audit-list>div,.card .dns-row,.toggle-row,.composer-fields label,.sender-details>label,form>label,.form-grid>label,.check-row){color:var(--muted)}
html[data-theme=dark] :is(.nav-item.active,.nav-item:hover,.icon-only:hover,.btn.light,.next-edition,.initials,.large-initials,.segment-icon,.event-tags>span,.property-pill){background:#35283f;color:var(--purple);border-color:var(--line)}
html[data-theme=dark] .nav-item small{background:#4a3659;color:#ead8f8}
html[data-theme=dark] :is(.btn,.next-edition>.btn){background:#302739;border-color:#51425e;color:var(--ink)}
html[data-theme=dark] .btn:hover{background:#40324c}
html[data-theme=dark] .btn.primary{background:#b792d5;border-color:#b792d5;color:#20142a}
html[data-theme=dark] .btn.primary:hover{background:#cbaae4}
html[data-theme=dark] :is(.btn.text,.card .btn.text,.dialog-actions .btn.text,.editorial-note .text-link){background:transparent;border-color:transparent;color:var(--purple)}
html[data-theme=dark] :is(.btn.icon-only,.icon-only){background:transparent;border-color:transparent;color:var(--muted)}
html[data-theme=dark] :is(label>input:not([type=checkbox]),label>textarea,label>select){background:#1b1722;color:var(--ink);border-color:#51425e}
html[data-theme=dark] :is(th,tbody tr:hover,.command-result:hover){background:#2a2233}
html[data-theme=dark] .demo-pill{background:#342b20;color:#e4c58e;border-color:#665237}
html[data-theme=dark] .badge{background:#352b40;color:#ded0e9}
html[data-theme=dark] :is(.badge.sent,.badge.delivered,.badge.active,.badge.verified){background:#213b30;color:#a9d9bc}
html[data-theme=dark] :is(.badge.bounced,.badge.failed,.badge.complained,.badge.suppressed){background:#422630;color:#f4b0bc}
html[data-theme=dark] :is(.badge.unsubscribed,.badge.paused,.badge.cancelled){background:#3b3020;color:#e6c180}
html[data-theme=dark] :is(.card .property-pill,.card .event-tags>span,.metric-note strong,.settings-tabs button.active){color:var(--purple)}
html[data-theme=dark] .chart-grid{stroke:#41364c}html[data-theme=dark] .chart-area{fill:#35283f}html[data-theme=dark] .purple-line{stroke:#c5a0df}html[data-theme=dark] .green-line{stroke:#99c5ae}html[data-theme=dark] .purple-point{fill:var(--surface);stroke:#c5a0df}
html[data-theme=dark] :is(progress,progress::-webkit-progress-bar){background:#3b3047}html[data-theme=dark] .timeline>div:not(:last-child):before{background:#4b3958}
html[data-theme=dark] .calendar-notice{background:#30243b;border-color:#574065;color:#dec8ef}
html[data-theme=dark] .calendar-day.is-today{background:#30243b}html[data-theme=dark] .calendar-day-number span{background:#503760;color:#efdafa}
html[data-theme=dark] .calendar-entry{background:#352d40;color:#e2d6ed;border-color:#a996bc}
html[data-theme=dark] .calendar-entry.stage-writing{background:#3b3020;color:#f0d4a3;border-color:#ceab66}
html[data-theme=dark] :is(.calendar-entry.stage-ready,.calendar-entry.stage-sent){background:#213b30;color:#b7e2c7;border-color:#8cbea1}
html[data-theme=dark] .calendar-entry.stage-draft{background:#392746;color:#e5c9f8;border-color:#bc93d8}
html[data-theme=dark] .calendar-entry.stage-scheduled{background:#24364a;color:#c5dff6;border-color:#90b8dd}
html[data-theme=dark] .form-error{color:#ffb5c2}html[data-theme=dark] dialog::backdrop{background:#08060eb3}html[data-theme=dark] #toast{background:#dac1ed;color:#291936}html[data-theme=dark] ::selection{background:#64467c;color:#fff}
/* Email previews retain their original artwork and reader-facing colors. */
@media(max-width:1100px){.theme-toggle span{display:none}.topbar-actions{gap:10px}}
@media(max-width:480px){.topbar-actions{gap:4px}.theme-toggle{min-width:44px;padding:8px}}
