/* Dark appearance for the supervisor console (2026-11). Active when <html data-theme="dark">.
   Teal-tinted charcoal, so light / semi-transparent animated emoji stay visible. */
html[data-theme="dark"]{color-scheme:dark;
 --ground:#0e1618;--surface:#152022;--raised:#1a2729;--active:#24363a;--border:#2a3c40;--rule:#213134;--control:#3d5357;
 --text:#e2ebeb;--muted:#94a8ab;--accent:#62b7c9;--positive:#6dc398;--negative:#ef8d97;--warning:#e3b46c;--line:#2a3c40}
html[data-theme="dark"] body{background:var(--ground);color:var(--text)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#101a1c;border-color:var(--control);color:var(--text)}
html[data-theme="dark"] .primary{color:#0e1618;background:var(--text);border-color:var(--text)}
html[data-theme="dark"] #toast{color:#0e1618;background:var(--text)}
html[data-theme="dark"] dialog::backdrop{background:rgba(0,0,0,.55)}
html[data-theme="dark"] .error-banner{background:#3a1d1f;border-color:#6b3337;color:#f3b4ba}
html[data-theme="dark"] .chat-body{background:#1a2b2e}
html[data-theme="dark"] .api-usage-warning{background:#3a2c14;border-left-color:var(--warning);color:#f1d29f}

/* chat preview: Telegram-like dark bubbles */
html[data-theme="dark"] .content-mode button.active,html[data-theme="dark"] .ve-modes button.on{background:var(--text);color:#0e1618}
html[data-theme="dark"] .ve-toolbar p,html[data-theme="dark"] .ve-page-group>small,html[data-theme="dark"] .ve-canvas small,
html[data-theme="dark"] .ve-scene-caption,html[data-theme="dark"] .ve-button-row>button small,html[data-theme="dark"] .ve-footnote,
html[data-theme="dark"] .ve-inspector-head>small,html[data-theme="dark"] .ve-inspector-head p,html[data-theme="dark"] .ve-inspector details p,
html[data-theme="dark"] .ve-inspector .hint,html[data-theme="dark"] .ve-format small,html[data-theme="dark"] .provider-nav small,
html[data-theme="dark"] .provider-detail>p,html[data-theme="dark"] .ve-hint,html[data-theme="dark"] .member-access p,
html[data-theme="dark"] .member-feature small,html[data-theme="dark"] .keyboard-sort small,html[data-theme="dark"] .keyboard-details>summary{color:var(--muted)}
html[data-theme="dark"] .ve button.selected,html[data-theme="dark"] .ve .selected,html[data-theme="dark"] .ve-message.selected{outline-color:var(--accent)}
html[data-theme="dark"] .ve-page-group>button.active,html[data-theme="dark"] .ve-scenes button.active,html[data-theme="dark"] .ve-notice-list button.active,
html[data-theme="dark"] .provider-nav button.active{background:var(--active);color:var(--text)}
html[data-theme="dark"] .ve-canvas,html[data-theme="dark"] .member-feature,html[data-theme="dark"] .ve-info{background:var(--raised)}
html[data-theme="dark"] .ve-chat{background:#0f1c1f;border-color:var(--border)}
html[data-theme="dark"] .ve-chat>header{background:#182729;border-bottom-color:var(--border)}
html[data-theme="dark"] .ve-chat>header svg{stroke:var(--accent)}
html[data-theme="dark"] .ve-message{background:#1d3034;box-shadow:none}
html[data-theme="dark"] .ve-message-text blockquote{border-left-color:var(--accent)}
html[data-theme="dark"] .ve-fragment:hover,html[data-theme="dark"] .ve-fragment:focus-visible{background:#24424a;outline-color:var(--accent)}
html[data-theme="dark"] .ve-variable{color:#9fd8e4;background:#1f3d44}
html[data-theme="dark"] .ve-emoji{border-bottom-color:#5d8c96}
html[data-theme="dark"] .ve-link,html[data-theme="dark"] .ve-back{color:var(--accent)}
html[data-theme="dark"] .ve-button-row>button{background:#1d3034;border-color:#2e4a50;color:var(--text)}
html[data-theme="dark"] .ve-chat-scroll>.ve-button-row>button{background:#24414a;color:#cfeef4}
html[data-theme="dark"] .ve-keyboard-title,html[data-theme="dark"] .ve-keyboard{background:#142224}
html[data-theme="dark"] .ve-related,html[data-theme="dark"] .ve-inspector-head,html[data-theme="dark"] .ve-inspector details{border-color:var(--border)}
html[data-theme="dark"] .ve-error{background:#3a1d1f;color:#f3b4ba}
html[data-theme="dark"] .ve-media{background:var(--raised);border-color:var(--control)}
html[data-theme="dark"] .content-workspace>.savebar{background:var(--surface)}
html[data-theme="dark"] .ve .ve-delete,html[data-theme="dark"] .keyboard-sort .danger-text{color:var(--negative)}

/* colour swatches and pickers */
html[data-theme="dark"] .ve-style button,html[data-theme="dark"] .kb-style button{background:#1b2a2d;border-color:#3d5357;color:var(--text)}
html[data-theme="dark"] .ve-style button.on,html[data-theme="dark"] .kb-style button.on{outline-color:var(--text)}
html[data-theme="dark"] .ve-style .sw-primary,html[data-theme="dark"] .kb-style .sw-primary{background:#1e3350;border-color:#40669c}
html[data-theme="dark"] .ve-style .sw-success,html[data-theme="dark"] .kb-style .sw-success{background:#1d3a2a;border-color:#3f7a56}
html[data-theme="dark"] .ve-style .sw-danger,html[data-theme="dark"] .kb-style .sw-danger{background:#43222a;border-color:#8a4450}
html[data-theme="dark"] .ek-pop{box-shadow:0 14px 36px rgba(0,0,0,.55)}
html[data-theme="dark"] .ek-grid button.on{background:#24424a}
html[data-theme="dark"] .rt-box{background:#1d3034;border-color:var(--control)}
html[data-theme="dark"] .rt-box:focus{box-shadow:0 0 0 3px #62b7c933}
html[data-theme="dark"] .rt-box code,html[data-theme="dark"] .rt-box pre{background:#13262a}
html[data-theme="dark"] .rt-box blockquote{background:#18292c}
html[data-theme="dark"] .rt-spoiler{background:#3b5155}
html[data-theme="dark"] .rt-var{background:#1f3d44;color:#a9e0eb;border-color:#2f5a63}
html[data-theme="dark"] .rt-fields button{border-color:#3e6a73;color:#a9e0eb}

/* the switch itself */
.theme-toggle{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:6px 12px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text);font-size:13px}
.theme-toggle svg{width:16px;height:16px}
.topbar-actions{display:flex;align-items:center;gap:8px}
.preview-keyboard .preview-button-row button{flex:1 1 0;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:8px 6px;background:var(--surface);border:1px solid var(--border);border-radius:6px;font-size:13px;color:var(--accent)}
/* flow simulator */
html[data-theme="dark"] .ve-modes>span,html[data-theme="dark"] .ve-sample,html[data-theme="dark"] .ve-trail li button small,html[data-theme="dark"] .ve-user-msg small,
html[data-theme="dark"] .ve-compose label,html[data-theme="dark"] .ve-text-list button small,html[data-theme="dark"] .ve-tree li button small{color:var(--muted)}
html[data-theme="dark"] .ve-trail li button{color:var(--text)}
html[data-theme="dark"] .ve-trail li.on button,html[data-theme="dark"] .ve-tree li button.on{background:var(--active)}
html[data-theme="dark"] .ve-step-btn,html[data-theme="dark"] .ve-text-list button{background:#1b2a2d;border-color:#3d5357;color:var(--text)}
html[data-theme="dark"] .ve-text-list button.active{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
html[data-theme="dark"] .ve-user-msg span{background:#2d4a3a;color:#e2f3e6}
html[data-theme="dark"] .ve-toast{background:#e2ebeb;color:#0e1618}
html[data-theme="dark"] .ve-toast small{color:#3d5357}
html[data-theme="dark"] .ve-toast.fixed{background:#9fb0b2}
html[data-theme="dark"] .ve-part{border-bottom-color:#2e4a50}
html[data-theme="dark"] .ve-part:hover{background:#22393d}
html[data-theme="dark"] .ve-chip{background:#0e1618cc;color:var(--accent)}
html[data-theme="dark"] .ve-chip:hover{background:var(--accent);color:#0e1618}
html[data-theme="dark"] .ve-compose{background:#142224;border-top-color:var(--border)}
html[data-theme="dark"] .ve-step-texts{border-top-color:var(--border)}
html[data-theme="dark"] .ve-overview-box{background:var(--surface);color:var(--text)}
html[data-theme="dark"] .ve-tree{border-color:var(--border)}
html[data-theme="dark"] .ve-tree li{border-bottom-color:var(--rule)}
html[data-theme="dark"] .ve-quick{background:#142224;border-top-color:var(--border);color:var(--muted)}
html[data-theme="dark"] .ve-quick button{background:#1b2a2d;border-color:#3d5357;color:var(--text)}
