:root{color-scheme:light;--surface:#fff;--canvas:#f7f7f2;--panel:#eeefe8;--text:#202823;--secondary:#56645c;--border:#d9dfd7;--blue:#246b50;--selection:#dfefe5;--ink:var(--text);--muted:var(--secondary);--accent:var(--blue);--line:var(--border)}
:root[data-theme=dark]{color-scheme:dark;--surface:#181f1b;--canvas:#101513;--panel:#222c26;--text:#edf3ee;--secondary:#aabbb0;--border:#35463b;--blue:#8dd9b5;--selection:#254536;--ink:var(--text);--muted:var(--secondary);--accent:var(--blue);--line:var(--border);background:var(--canvas);color:var(--text)}
.appearance{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--secondary)}.appearance select{font:inherit;padding:5px 7px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text);min-height:28px}
[data-theme=dark] body,[data-theme=dark] main,[data-theme=dark] .mailbox,[data-theme=dark] .detail-pane,[data-theme=dark] .message{background:var(--surface);color:var(--text)}
[data-theme=dark] header,[data-theme=dark] footer,[data-theme=dark] .list-pane{background:var(--canvas)}
[data-theme=dark] .sidebar{background:linear-gradient(145deg,#222c26,#1b241f)}
[data-theme=dark] button,[data-theme=dark] input,[data-theme=dark] textarea,[data-theme=dark] select,[data-theme=dark] dialog,[data-theme=dark] .connection{background:var(--panel);color:var(--text);border-color:var(--border)}
[data-theme=dark] .nav,[data-theme=dark] .item,[data-theme=dark] .quiet{background:transparent;box-shadow:none;color:var(--text)}
[data-theme=dark] .nav:hover,[data-theme=dark] .item:hover,[data-theme=dark] .quiet:hover{background:#2b3830}
[data-theme=dark] .nav.active,[data-theme=dark] .item.selected,[data-theme=dark] .command.current,[data-theme=dark] .command:hover{background:var(--selection);color:#b5ebcf}
[data-theme=dark] .primary{background:#8dd9b5;color:#10291c;border-color:#a0e4c4}
[data-theme=dark] .primary:hover{background:#a0e4c4}
[data-theme=dark] .brand,[data-theme=dark] .item-title,[data-theme=dark] .item.unread .item-title,[data-theme=dark] .body,[data-theme=dark] .message-meta strong,[data-theme=dark] .breadcrumb strong{color:var(--text)}
[data-theme=dark] a,[data-theme=dark] .unread-badge,[data-theme=dark] .features{color:var(--blue)}
[data-theme=dark] .message-meta,[data-theme=dark] .recipients,[data-theme=dark] .message summary,[data-theme=dark] code,[data-theme=dark] .provenance,[data-theme=dark] .source-footer small,[data-theme=dark] .activity-facts dt,[data-theme=dark] .activity-raw summary,[data-theme=dark] .nav #count{color:var(--secondary)}
[data-theme=dark] .reader-toolbar,[data-theme=dark] .reader-back{background:var(--surface);box-shadow:0 0 0 8px var(--surface)}
[data-theme=dark] .avatar,[data-theme=dark] kbd,[data-theme=dark] .badge,[data-theme=dark] .welcome-icon,[data-theme=dark] .activity-day{background:#2b3830;color:#bacabd;border-color:var(--border)}
[data-theme=dark] .context-note,[data-theme=dark] .activity-hero,[data-theme=dark] .schedule-compose,[data-theme=dark] #notice,[data-theme=dark] .activity-icon{background:#203d2f;color:#c0e7d0;border-color:#416650}
[data-theme=dark] .context-note h3{color:#aee3c5}
[data-theme=dark] .operator-health,[data-theme=dark] .operator-current,[data-theme=dark] .extraction-status,[data-theme=dark] .provision-success{background:#243a30;color:#a0dbb4;border-color:#41614e}
[data-theme=dark] .schedule-state,[data-theme=dark] .schedule-badge,[data-theme=dark] .schedule-compose summary,[data-theme=dark] .extraction-status p,[data-theme=dark] .extraction-status small,[data-theme=dark] .extraction-steps .done,[data-theme=dark] .extraction-steps .current,[data-theme=dark] .activity-status.success{color:#a0dbb4}
[data-theme=dark] .operator-warning,[data-theme=dark] .operator-health.attention,[data-theme=dark] .activity-hero.attention,[data-theme=dark] .tag,[data-theme=dark] .extraction-status.failed,[data-theme=dark] #notice.error{background:#423425;color:#f2ce91;border-color:#755e3c}
[data-theme=dark] .danger,[data-theme=dark] #send-error,[data-theme=dark] #operator-error,[data-theme=dark] #context-error,[data-theme=dark] .context-error{color:#ffb4a8}
[data-theme=dark] .activity-status.attention{color:#f2ce91}
[data-theme=dark] .item,[data-theme=dark] .message,[data-theme=dark] .workspace,[data-theme=dark] .schedule-preview{border-color:var(--border)}
[data-theme=dark] .skeleton{background:linear-gradient(100deg,#26322b 20%,#3b4d40 45%,#26322b 70%);background-size:220% 100%}
[data-theme=dark] dialog{box-shadow:0 18px 70px #0009}[data-theme=dark] dialog::backdrop{background:#0008}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Shared graphite + mint surfaces for the light workspace. */
:root:not([data-theme=dark]) body{background:var(--canvas);color:var(--text)}
:root:not([data-theme=dark]) .sidebar{background:linear-gradient(145deg,#eeefe8,#e7ece3)}
:root:not([data-theme=dark]) header,:root:not([data-theme=dark]) footer,:root:not([data-theme=dark]) .list-pane{background:var(--canvas)}
:root:not([data-theme=dark]) .nav.active,:root:not([data-theme=dark]) .item.selected,:root:not([data-theme=dark]) .command.current,:root:not([data-theme=dark]) .command:hover{background:var(--selection);color:#245e46}
:root:not([data-theme=dark]) .primary{background:#246b50;border-color:#246b50;color:#fff}
:root:not([data-theme=dark]) .primary:hover{background:#1b563f}
:root:not([data-theme=dark]) .context-note,:root:not([data-theme=dark]) #notice:not(.error),:root:not([data-theme=dark]) .activity-icon{background:#e5f1e8;color:#2d654a;border-color:#c3dcca}
:root:not([data-theme=dark]) .context-note h3{color:#245e46}
:root:not([data-theme=dark]) .activity-hero:not(.attention){background:linear-gradient(135deg,#eff5ec,#fff);border-color:var(--border)}

/* Preview is a disconnected showcase, with no credential or provisioning entry. */
[data-preview=true] #connect,[data-preview=true] #connection-toggle,[data-preview=true] #create-inbox,[data-preview=true] #commands,[data-preview=true] #provision-dialog{display:none!important}
.preview-open{font-size:11px;color:var(--blue);padding:6px 8px;border:1px solid var(--border);border-radius:6px;text-decoration:none}
