/* Shared visual language with home.html. UI palette only; scientific trace colors stay distinct. */
body.workspace-theme {
  color-scheme:dark;
  --canvas:#080f1c; --chrome:#0d1728; --panel:#111e32; --surface:#16263d;
  --hover:#1c304b; --selected:#20334d; --edge:#2a3e5a; --mid:#647b98;
  --quiet:#94a7c0; --copy:#bdcde1; --ink:#f0f5fd;
  --accent:#95baff; --accent-soft:#18365c; --primary:#356cdb; --primary-hover:#3b70de; --on-accent:#fff;
  --teal:#62d8c3; --teal-soft:#123b36; --gold:#f0bf72; --gold-soft:#3d3020;
  --bg:var(--canvas); --card:var(--panel); --line:var(--edge); --line-2:#203149;
  --text:var(--ink); --text-2:var(--copy); --text-3:var(--quiet);
  --blue:var(--accent); --blue-soft:var(--accent-soft); --stage:#080f1c;
  --amber:var(--gold); --amber-soft:var(--gold-soft);
  --radius:10px; --r-1:5px; --r-2:7px; --r-3:10px; --r-4:13px; --r-5:16px;
  --card-line:var(--line); --shadow:0 8px 24px rgba(0,0,0,.12); --shadow-1:0 3px 12px rgba(0,0,0,.1);
  --shadow-2:0 18px 60px rgba(0,0,0,.28); --menu-shadow:0 18px 50px rgba(0,0,0,.35);
  --modal-shadow:0 30px 100px rgba(0,0,0,.5); --page-glow:rgba(56,111,197,.13);
  --chart-grid:#23344d; --chart-zero:#435c7d; --chart-axis:#56708e;
  --chart-cursor:rgba(149,186,255,.46);
  font-family:"Poppins","Microsoft YaHei","PingFang SC",sans-serif;
  background:var(--canvas); color:var(--text);
}
body.workspace-theme.theme-light {
  color-scheme:light;
  --canvas:#f0f4fa; --chrome:#fff; --panel:#fff; --surface:#f5f8fd;
  --hover:#edf3fc; --selected:#e6eef8; --edge:#d6e1ef; --mid:#788ba4;
  --quiet:#64748b; --copy:#4b5f77; --ink:#172b47;
  --accent:#3266c7; --accent-soft:#e8f0ff; --primary:#3266d9; --primary-hover:#2b5fcf; --on-accent:#fff;
  --teal:#10776a; --teal-soft:#e5f5f0; --gold:#94621c; --gold-soft:#fff3df;
  --line-2:#e5ecf5; --page-glow:rgba(86,144,226,.1);
  --shadow:0 7px 24px rgba(43,76,121,.06); --shadow-1:0 2px 10px rgba(43,76,121,.04);
  --shadow-2:0 16px 46px rgba(43,76,121,.1); --menu-shadow:0 16px 50px rgba(32,61,102,.14);
  --modal-shadow:0 28px 90px rgba(32,61,102,.22);
  --chart-grid:#e0e8f2; --chart-zero:#b9c9dc; --chart-axis:#94a8c0;
  --chart-cursor:rgba(50,102,199,.38);
}

body.workspace-theme ::selection {background:var(--mid);color:var(--ink)}
body.workspace-theme :focus-visible {outline:1px solid var(--ink);outline-offset:3px}
body.workspace-theme ::-webkit-scrollbar-thumb {background:var(--edge);background-clip:content-box}
body.workspace-theme ::-webkit-scrollbar-thumb:hover {background:var(--mid);background-clip:content-box}
body.workspace-theme a.btn {text-decoration:none}
body.workspace-theme .home, body.workspace-theme #view-home {background:var(--canvas);background-image:none}

/* Workspace menu: one primary creation card and two quieter exploration cards. */
body.workspace-theme #view-home {background:radial-gradient(ellipse at 85% 8%,var(--page-glow),transparent 58%),var(--canvas);overflow-y:auto}
body.workspace-theme .home-top {padding:24px max(28px,6vw);gap:14px;border-bottom:1px solid var(--line-2);background:var(--chrome)}
body.workspace-theme .home-nav {gap:7px;margin-right:8px}
body.workspace-theme .home-nav .btn.ghost {height:34px;width:34px;flex-basis:34px;border:1px solid var(--edge);border-radius:50%;background:var(--panel)}
body.workspace-theme .home-logo {width:31px;height:37px;border-radius:0;background:transparent;box-shadow:none;color:var(--ink)}
body.workspace-theme .home-logo svg {width:31px;height:37px;display:block}
body.workspace-theme .home-title {font-size:19px;letter-spacing:2px;font-weight:600}
body.workspace-theme .home-sub {font-size:9px;letter-spacing:1.4px;color:var(--quiet);margin-top:4px}
body.workspace-theme .home-actions {gap:10px}
body.workspace-theme .home-actions .btn {height:34px;padding:0 14px}
body.workspace-theme .home-body {width:min(1180px,100%);padding:42px 38px 32px;justify-content:flex-start}
body.workspace-theme .workspace-kicker {display:flex;align-items:center;gap:9px;color:var(--accent);font-size:10px;letter-spacing:2.2px;margin-bottom:13px;font-weight:600}
body.workspace-theme .workspace-kicker::before {content:"";width:5px;height:5px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 4px var(--teal-soft)}
body.workspace-theme .workspace-intro h1 {font-size:clamp(28px,3.3vw,43px);font-weight:600;letter-spacing:-.5px;line-height:1.35}
body.workspace-theme .workspace-lead {color:var(--text-2);font-size:14px;line-height:1.8;margin-top:12px}
body.workspace-theme .workspace-intro {margin-bottom:29px}
body.workspace-theme .entries {display:grid;grid-template-columns:1fr 1fr;gap:18px;border:0}
body.workspace-theme .entry {--entry-color:var(--accent);--entry-soft:var(--accent-soft);background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:26px;gap:0 18px;grid-template-columns:48px minmax(0,1fr);align-items:start;position:relative;isolation:isolate;transition:background .18s,border-color .18s,box-shadow .18s,transform .18s;min-height:216px}
body.workspace-theme .entry-2 {--entry-color:var(--teal);--entry-soft:var(--teal-soft)}
body.workspace-theme .entry-3 {--entry-color:var(--gold);--entry-soft:var(--gold-soft)}
body.workspace-theme .entry-1 {grid-column:1/-1;min-height:225px;border-color:#365e8c;background:linear-gradient(115deg,#122c4d,#14273f 64%,#18364d)}
body.workspace-theme.theme-light .entry-1 {border-color:#c0d4f5;background:linear-gradient(115deg,#edf4ff,#e7f0ff 65%,#e4f2f5)}
body.workspace-theme .entry:hover,body.workspace-theme .entry:focus-visible {transform:translateY(-2px);border-color:var(--entry-color);box-shadow:var(--shadow-2);background:var(--panel)}
body.workspace-theme .entry-1:hover {background:linear-gradient(115deg,#173554,#17304c 64%,#1c4055)}
body.workspace-theme.theme-light .entry-1:hover {background:linear-gradient(115deg,#e5efff,#e0ecff 65%,#ddf0f3)}
body.workspace-theme .entry .entry-ico {grid-column:1;grid-row:1/3;width:48px;height:48px;background:var(--entry-soft);color:var(--entry-color);border:1px solid var(--line);border-radius:13px;box-shadow:none;align-self:start}
body.workspace-theme .entry-ico svg {width:22px;height:22px}
body.workspace-theme .entry-main {grid-column:2;min-width:0;position:relative;z-index:1}
body.workspace-theme .entry-1 .entry-main {max-width:calc(100% - 260px)}
body.workspace-theme .entry .entry-kicker {color:var(--entry-color);font-size:10px;letter-spacing:1.8px;font-weight:600;margin:0 0 7px;line-height:1.5;display:block}
body.workspace-theme .entry h3 {font-size:24px;font-weight:600;letter-spacing:.3px;line-height:1.4}
body.workspace-theme .entry-1 h3 {font-size:28px}
body.workspace-theme .entry p {font-size:12px;line-height:1.85;color:var(--copy);margin-top:9px;max-width:66ch;-webkit-line-clamp:3}
body.workspace-theme .entry .chips {gap:5px;margin-top:12px}
body.workspace-theme .entry .chip {color:var(--quiet);font-size:10px;background:var(--surface);border:1px solid var(--line-2);border-radius:5px;padding:2px 7px;line-height:1.6}
body.workspace-theme .entry .chip+.chip::before {content:none}
body.workspace-theme .entry-side {grid-column:2;justify-self:start;display:inline-flex;align-items:center;gap:8px;color:var(--entry-color);margin-top:20px;font-size:12px;font-weight:600;position:relative;z-index:1}
body.workspace-theme .entry .go {display:flex;align-items:center;color:inherit;transform:none}
body.workspace-theme .entry .go svg {width:15px;height:15px}
body.workspace-theme .entry:hover .go {transform:translateX(3px);color:inherit}
body.workspace-theme .entry-1 .entry-side {color:#fff;background:var(--primary);padding:8px 13px;border-radius:7px;margin-top:18px;box-shadow:0 4px 14px rgba(27,74,158,.18)}
body.workspace-theme .entry-art {position:absolute;right:26px;top:10px;width:265px;height:205px;display:grid;place-items:center;color:var(--accent);z-index:-1;pointer-events:none;opacity:.82}
body.workspace-theme .entry-art svg {display:block;width:100%;height:100%;overflow:visible}
body.workspace-theme .entry-orbits {stroke:var(--accent);opacity:.35}
body.workspace-theme .entry-wire {stroke:var(--accent);fill:var(--accent-soft)}
body.workspace-theme .entry-core {fill:var(--teal);filter:drop-shadow(0 0 12px var(--teal))}
body.workspace-theme .home-foot {max-width:1180px;padding:8px 38px 25px;color:var(--quiet);font-size:10px;gap:18px}

/* Common chrome, menus and controls. */
body.workspace-theme .topbar {height:52px;flex-basis:52px;background:var(--chrome);border-color:var(--line);gap:10px}
body.workspace-theme .tb-logo {font-size:0;background:transparent;border-radius:0;box-shadow:none;position:relative;color:var(--copy)}
body.workspace-theme .tb-logo::after {content:"";width:23px;height:27px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 44' fill='none' stroke='%23dddddd' stroke-width='1.5'%3E%3Cpath d='M20 2 37 12v20L20 42 3 32V12L20 2Z M3 12l17 10 17-10M20 22v20'/%3E%3C/svg%3E");display:block}
body.workspace-theme .tb-name {font-size:12px;font-weight:500;letter-spacing:1px}
body.workspace-theme .tb-crumb .sep {color:var(--mid)}
body.workspace-theme .btn, body.workspace-theme .tbtn, body.workspace-theme .pbtn {background:var(--panel);border-color:var(--edge);color:var(--copy);border-radius:5px;box-shadow:none}
body.workspace-theme .btn:hover, body.workspace-theme .tbtn:hover, body.workspace-theme .pbtn:hover {background:var(--hover);border-color:var(--mid);color:var(--ink);box-shadow:none}
body.workspace-theme .btn.ghost {background:transparent;border-color:transparent}
body.workspace-theme .btn.ghost:hover {background:var(--hover);border-color:var(--edge)}
body.workspace-theme .btn.primary, body.workspace-theme .tbtn.primary, body.workspace-theme .pbtn.main,
body.workspace-theme .pchip.on, body.workspace-theme .cb-send.on, body.workspace-theme .fe-send, body.workspace-theme .undo-btn {background:var(--ink);border-color:var(--ink);color:var(--surface);box-shadow:none}
body.workspace-theme .btn.primary:hover, body.workspace-theme .tbtn.primary:hover, body.workspace-theme .pbtn.main:hover,
body.workspace-theme .pchip.on:hover, body.workspace-theme .cb-send.on:hover, body.workspace-theme .fe-send:hover, body.workspace-theme .undo-btn:hover {background:var(--ink);border-color:var(--ink);color:var(--canvas)}
body.workspace-theme .btn.ghost.on, body.workspace-theme .tbtn.link, body.workspace-theme .tbtn.link:hover,
body.workspace-theme .pchip:hover, body.workspace-theme .ms-group.on, body.workspace-theme .hello-space {background:var(--hover);border-color:var(--mid);color:var(--ink)}
body.workspace-theme .chip, body.workspace-theme .grp-hd .n, body.workspace-theme .cb-mi .k,
body.workspace-theme .bs-sp-n, body.workspace-theme .rag-src, body.workspace-theme .rag-model,
body.workspace-theme .rag-qt, body.workspace-theme .fe-kind, body.workspace-theme .fe-who, body.workspace-theme .fm-tag.dim {background:var(--selected);border-color:var(--edge);color:var(--copy)}
body.workspace-theme .hello-space {font-size:11px}
body.workspace-theme .home-logo, body.workspace-theme .hello-av, body.workspace-theme .av {background:transparent;box-shadow:none;color:var(--ink)}
body.workspace-theme .hello-av, body.workspace-theme .av {border:1px solid var(--edge)}
body.workspace-theme .lab-more-menu, body.workspace-theme .cb-menu {background:var(--surface);border:1px solid var(--edge);border-radius:7px;box-shadow:var(--menu-shadow)}
body.workspace-theme .cb-mi:hover, body.workspace-theme .cb-ic:hover, body.workspace-theme .cb-chip:hover,
body.workspace-theme .bs-op:hover, body.workspace-theme .bs-close:hover, body.workspace-theme .bs-gt-hist:hover,
body.workspace-theme .bs-sp-hd:hover, body.workspace-theme .tq-item:hover, body.workspace-theme button.tq-h:hover {background:var(--selected);color:var(--ink);border-color:var(--mid)}
body.workspace-theme .cb-sep, body.workspace-theme .tool-sep, body.workspace-theme .tb-sep {background:var(--line)}
body.workspace-theme .bm-sess-hd, body.workspace-theme .bs-sub {border-color:var(--line)}
body.workspace-theme .cb-chip.scene, body.workspace-theme .cb-chip.scene:hover {background:var(--hover);color:var(--copy)}
body.workspace-theme .cb-chip.scene svg, body.workspace-theme .cb-chip svg {color:var(--copy)}
body.workspace-theme .cb-send {background:var(--selected);color:var(--mid)}
body.workspace-theme .cb-chip.enh.on {background:var(--selected);color:var(--ink)}
body.workspace-theme .spin {border-color:var(--edge);border-top-color:var(--ink)}

/* Inputs retain strong, visible focus and checked states on black. */
body.workspace-theme input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=file]),
body.workspace-theme select, body.workspace-theme textarea.scene, body.workspace-theme .ge-ta,
body.workspace-theme .fm-in, body.workspace-theme .fe-ta, body.workspace-theme .ms-search {background:var(--panel);color:var(--text);border-color:var(--edge);border-radius:5px}
body.workspace-theme input:not([type=range]):focus, body.workspace-theme select:focus, body.workspace-theme textarea:focus {border-color:var(--quiet);box-shadow:0 0 0 1px var(--mid);background:var(--panel);outline:none}
body.workspace-theme input::placeholder, body.workspace-theme textarea::placeholder {color:var(--quiet)}
body.workspace-theme input[type=range] {background:var(--edge);accent-color:var(--ink)}
body.workspace-theme input[type=range]::-webkit-slider-thumb {background:var(--surface);border-color:var(--ink);box-shadow:none}
body.workspace-theme .track input[type=range]::-webkit-slider-thumb {background:var(--ink);border-color:var(--surface);box-shadow:0 0 0 1px var(--ink)}
body.workspace-theme input[type=checkbox], body.workspace-theme input[type=radio] {accent-color:var(--ink)}
body.workspace-theme .chk input {background:var(--panel);border-color:var(--mid)}
body.workspace-theme .chk input:checked {background:var(--ink);border-color:var(--ink)}
body.workspace-theme .chk input:checked::after {border-color:var(--surface)}
body.workspace-theme .composer {background:var(--panel);border-color:var(--edge);border-radius:10px;box-shadow:none}
body.workspace-theme .composer:focus-within {border-color:var(--quiet);box-shadow:none}

/* Builder, saved scenes, history and result cards. */
body.workspace-theme .b-side, body.workspace-theme .side, body.workspace-theme .right {background:var(--chrome);border-color:var(--line)}
body.workspace-theme .b-handle, body.workspace-theme .b-handle:not(.open) {background:var(--hover);border-color:var(--edge);color:var(--copy);box-shadow:none}
body.workspace-theme .b-handle:hover, body.workspace-theme .b-handle:not(.open):hover {background:var(--selected);border-color:var(--quiet);color:var(--ink)}
body.workspace-theme .bs-new {border-color:var(--edge);color:var(--copy)}
body.workspace-theme .bs-new:hover, body.workspace-theme .bs-pinmark, body.workspace-theme .bs-gt-hist {color:var(--copy)}
body.workspace-theme .bs-item.on, body.workspace-theme .bs-item.menu-on {background:var(--selected);box-shadow:inset 2px 0 0 var(--copy)}
body.workspace-theme .bs-item:hover, body.workspace-theme .bs-op.bs-om.on {background:var(--hover);color:var(--ink)}
body.workspace-theme .bs-empty, body.workspace-theme .ms-empty {background:var(--panel);border-color:var(--edge);border-radius:8px;color:var(--text-3)}
body.workspace-theme .ms-empty {padding:50px 24px}
body.workspace-theme .ms-empty-ico {background:transparent;border:1px solid var(--edge);color:var(--copy)}
body.workspace-theme .ms-wrap {padding-top:36px}
body.workspace-theme .ms-h2 {font-weight:500;letter-spacing:.5px;font-size:26px}
body.workspace-theme .ms-sub {margin-top:10px;color:var(--quiet)}
body.workspace-theme .ms-tools {margin-top:26px;margin-bottom:22px}
body.workspace-theme .ms-card, body.workspace-theme .acard {background:var(--panel);border-color:var(--line);box-shadow:none;border-radius:7px}
body.workspace-theme .ms-card:hover, body.workspace-theme .ms-card:focus-visible {border-color:var(--mid);box-shadow:none}
body.workspace-theme .ms-thumb {background:var(--surface)}
body.workspace-theme .acard>.acard-hd::before {background:var(--copy)}
body.workspace-theme .ubub, body.workspace-theme .ex, body.workspace-theme .rag-i, body.workspace-theme .rev-box,
body.workspace-theme .item-ans, body.workspace-theme .fe, body.workspace-theme .fe-b, body.workspace-theme .fm-item,
body.workspace-theme .fm-sec-hd, body.workspace-theme .demo-step, body.workspace-theme .gen-log {background:var(--surface);border-color:var(--edge);color:var(--text-2)}
body.workspace-theme .ex:hover, body.workspace-theme .hchip:hover {background:var(--hover);border-color:var(--mid);box-shadow:none}
body.workspace-theme .hchip {border-radius:6px}
body.workspace-theme .hello-t {font-weight:500;font-size:27px;letter-spacing:.5px}
body.workspace-theme .hello-s {color:var(--quiet)}
body.workspace-theme .mt {background:var(--selected)}
body.workspace-theme .ia-v, body.workspace-theme .parm-tbl td.v {color:var(--ink)}
body.workspace-theme .rt-i, body.workspace-theme .ip-i, body.workspace-theme .parm-tbl td {border-color:var(--line)}
body.workspace-theme .pr-fig, body.workspace-theme .acard.fig .fig-box {background:var(--panel);border-color:var(--edge);box-shadow:none}
body.workspace-theme .fig-ctrl, body.workspace-theme .fig-player {background:var(--surface);border-color:var(--edge);box-shadow:none}
body.workspace-theme .fc-b, body.workspace-theme .fig-style, body.workspace-theme .fp-btn,
body.workspace-theme .fig-player .fp-btn, body.workspace-theme .fig-player .fp-speed {background:var(--hover);border-color:var(--edge);color:var(--copy);box-shadow:none}
body.workspace-theme .fc-b:hover, body.workspace-theme .fig-style:hover, body.workspace-theme .fig-player .fp-btn:hover {background:var(--selected);border-color:var(--mid);color:var(--ink)}
body.workspace-theme .fc-b.on, body.workspace-theme .fc-b.zoom, body.workspace-theme .fig-style.on,
body.workspace-theme .fig-player .fp-btn.main {background:var(--ink);border-color:var(--ink);color:var(--surface)}
body.workspace-theme .fig-hint {background:var(--surface);color:var(--copy);border-color:var(--edge)}

/* Experimental workspace: neutral frame; scientific vectors and traces keep their colors. */
body.workspace-theme .stage {background:radial-gradient(ellipse at 50% 20%,var(--hover),var(--chrome) 75%);border:1px solid var(--edge);border-radius:7px;box-shadow:none}
body.workspace-theme .stage.fs {background:var(--chrome);border:0;border-radius:0}
body.workspace-theme .stage-tl, body.workspace-theme .seg, body.workspace-theme .fs-btn,
body.workspace-theme .iso-host .iso-viewbtn, body.workspace-theme .stage-fsread {background:#101010c9;border-color:var(--edge);color:var(--copy)}
body.workspace-theme .seg button {color:var(--copy)}
body.workspace-theme .seg button:hover, body.workspace-theme .fs-btn:hover, body.workspace-theme .iso-host .iso-viewbtn:hover {background:var(--edge);color:var(--ink)}
body.workspace-theme .seg button.on, body.workspace-theme .iso-btn.on,
body.workspace-theme .stage.fs .stage-fullscreen {background:var(--ink);color:var(--surface);border-color:var(--ink)}
body.workspace-theme .stage-tip, body.workspace-theme .stage-bl {color:var(--quiet)}
body.workspace-theme .stage.fs .player, body.workspace-theme .player {background:var(--chrome);border-color:var(--line)}
body.workspace-theme .stage.fs .pbtn, body.workspace-theme .stage.fs .tclock,
body.workspace-theme .stage.fs .play-loop, body.workspace-theme .stage.fs .speed-value {color:var(--copy)}
body.workspace-theme .stage.fs .pbtn.main {color:var(--surface)}
body.workspace-theme .stage.fs .pbtn:hover {background:var(--selected);color:var(--ink)}
body.workspace-theme .metric-big, body.workspace-theme .metric, body.workspace-theme .metric.hl {background:var(--panel);border-color:var(--edge);border-radius:5px}
body.workspace-theme .metric-big .v, body.workspace-theme .metric.hl .v {color:var(--ink)}
body.workspace-theme .metric-big .v .u, body.workspace-theme .metric-big .f,
body.workspace-theme .metric .f, body.workspace-theme .grp-hd .rt {color:var(--quiet)}
body.workspace-theme .explain {background:var(--surface);border-color:var(--edge);color:var(--copy)}
body.workspace-theme .explain .tag {background:var(--selected);color:var(--copy)}
body.workspace-theme .explain .txt em {color:var(--copy)}
body.workspace-theme .tree-book>.row:hover, body.workspace-theme .tree-chap>.row:hover,
body.workspace-theme .sec:hover {background:var(--hover)}
body.workspace-theme .sec.on, body.workspace-theme .tq-item.on {background:var(--selected);color:var(--ink)}
body.workspace-theme .sec .dot {background:var(--mid)}
body.workspace-theme .sec .badge {border-color:var(--edge);color:var(--quiet)}
body.workspace-theme .sec.locked {color:var(--mid)}
body.workspace-theme .tree-book .caret, body.workspace-theme .tree-chap .caret,
body.workspace-theme .tree-book .count, body.workspace-theme .tq-caret, body.workspace-theme .sec-star {color:var(--quiet)}
body.workspace-theme .tq-mbtn {color:var(--copy)}
body.workspace-theme .tq-mbtn:hover, body.workspace-theme .tq-mbtn.quiet:hover {background:var(--selected);color:var(--copy)}
body.workspace-theme .tq-mbtn.quiet {color:var(--quiet)}

/* Modal and secondary menu surfaces use the same thin edges as the main navigation. */
body.workspace-theme .ov, body.workspace-theme .modal-mask, body.workspace-theme .dlg-mask {background:#000a;backdrop-filter:blur(5px)}
body.workspace-theme .modal, body.workspace-theme .cfg-box, body.workspace-theme .dlg {background:var(--panel);border:1px solid var(--edge);border-radius:8px;box-shadow:var(--modal-shadow)}
body.workspace-theme .modal-hd .x:hover {background:var(--selected)}
body.workspace-theme .modal-hd .t {font-weight:500;letter-spacing:.4px}
body.workspace-theme .formula, body.workspace-theme .verify-row {background:var(--surface);border-color:var(--edge)}
body.workspace-theme .formula .fx, body.workspace-theme .verify-row .sim {color:var(--ink)}
body.workspace-theme .verify-row .eq {color:var(--mid)}
body.workspace-theme table.dtable th {background:var(--hover)}
body.workspace-theme table.dtable td {border-color:var(--selected)}
body.workspace-theme table.dtable tbody tr:hover {background:var(--selected)}
body.workspace-theme table.dtable tr.mark td {background:var(--selected)}
body.workspace-theme .cfg-presets .pbtn {width:auto;display:inline-flex;align-items:center;justify-content:center;background:var(--hover);color:var(--copy)}
body.workspace-theme .cfg-presets .pbtn:hover {background:var(--selected);border-color:var(--mid);color:var(--ink)}
body.workspace-theme .dlg-cancel {background:var(--hover);border-color:var(--edge);color:var(--copy)}
body.workspace-theme .toast, body.workspace-theme .undo-bar {background:var(--surface);border:1px solid var(--edge);color:var(--ink)}

@media (min-width:1600px) {
  body.workspace-theme .home-body {padding-top:52px}
  body.workspace-theme .workspace-intro {margin-bottom:34px}
}
@media (max-width:760px) {
  body.workspace-theme .home-top {padding:20px;gap:10px;flex-wrap:wrap}
  body.workspace-theme .home-actions {margin-left:auto;gap:4px}
  body.workspace-theme .home-actions .btn {padding:0 8px;font-size:11px}
  body.workspace-theme .home-sub {font-size:8px;letter-spacing:.7px}
  body.workspace-theme .home-title {font-size:16px}
  body.workspace-theme .home-nav {gap:3px;margin-right:0}
  body.workspace-theme .home-nav .btn.ghost {width:28px;height:28px;flex-basis:28px}
  body.workspace-theme .home-body {padding:30px 20px 24px;overflow:visible}
  body.workspace-theme .workspace-intro {margin-bottom:24px}
  body.workspace-theme .workspace-intro h1 {font-size:clamp(24px,5.2vw,34px);letter-spacing:0}
  body.workspace-theme .workspace-kicker {font-size:9px;letter-spacing:1.4px}
  body.workspace-theme .workspace-lead {font-size:12px}
  body.workspace-theme .entries {grid-template-columns:1fr;gap:14px}
  body.workspace-theme .entry {gap:0 14px;padding:22px;grid-template-columns:38px minmax(0,1fr);min-height:0;border-radius:13px}
  body.workspace-theme .entry-1 {grid-column:auto}
  body.workspace-theme .entry .entry-ico {width:38px;height:38px;border-radius:10px}
  body.workspace-theme .entry-ico svg {width:19px;height:19px}
  body.workspace-theme .entry h3,body.workspace-theme .entry-1 h3 {font-size:22px}
  body.workspace-theme .entry p {font-size:11px;-webkit-line-clamp:4}
  body.workspace-theme .entry .entry-kicker {font-size:9px}
  body.workspace-theme .entry-1 .entry-main {max-width:100%}
  body.workspace-theme .entry-art {right:-35px;top:-45px;width:180px;opacity:.17;z-index:-1}
  body.workspace-theme .entry .chip {font-size:9px;padding:2px 5px}
  body.workspace-theme .entry-side {margin-top:15px;font-size:11px}
  body.workspace-theme .home-foot {padding:8px 20px 22px;flex-wrap:wrap;gap:6px;font-size:9px}
  body.workspace-theme .ms-wrap {padding:28px 20px}
}
@media (prefers-reduced-motion:reduce) {
  body.workspace-theme *,body.workspace-theme *::before,body.workspace-theme *::after {scroll-behavior:auto;transition:none}
}

/* Keep the instrument canvas dark in either lighting setting for colored vectors and labels. */
body.workspace-theme .stage {
  color-scheme:dark;
  --canvas:#000; --chrome:#050505; --panel:#090909; --surface:#111;
  --hover:#191919; --selected:#242424; --edge:#363636; --mid:#777;
  --quiet:#929292; --copy:#bdbdbd; --ink:#f5f5f5;
  --bg:var(--canvas); --line:var(--edge); --line-2:var(--selected);
  --text:var(--ink); --text-2:var(--copy); --text-3:var(--quiet); --blue:var(--ink);
}
body.workspace-theme.theme-light .tb-logo::after {filter:invert(1)}
body.workspace-theme .acard.item, body.workspace-theme .acard.rag,
body.workspace-theme .acard.fig, body.workspace-theme .acard.gen {border-color:var(--line)}
body.workspace-theme .present-panel {background:var(--canvas)}
body.workspace-theme .pr-scene, body.workspace-theme .pr-q {color:var(--text)}
body.workspace-theme .pr-qs {border-color:var(--line)}
body.workspace-theme .ge-ta:focus, body.workspace-theme .fm-in:focus {border-color:var(--mid);box-shadow:0 0 0 1px var(--mid)}
body.workspace-theme .fc-b.zoom:hover {background:var(--ink);border-color:var(--ink);color:var(--surface)}
body.workspace-theme .native-figure-player .native-playback-main>.btn:first-child {background:var(--ink);border-color:var(--ink);color:var(--surface);box-shadow:none}
body.workspace-theme .native-playback-scope-label {background:var(--selected);border-color:var(--line);color:var(--text-2)}
body.workspace-theme .hchip.brief b {color:var(--text)}
body.workspace-theme [data-light-toggle] {min-width:64px;justify-content:center}
body.workspace-theme .tb-right>[data-light-toggle] span {display:inline}
body.workspace-theme [data-light-toggle][aria-pressed="true"] {border-color:var(--edge)}
body.workspace-theme #view-builder.present .topbar .tb-right [data-light-toggle] {display:inline-flex}
body.workspace-theme .bs-new:hover {border-color:var(--mid)}
body.workspace-theme .tag-info, body.workspace-theme .fe-prev-tag {background:var(--selected);border-color:var(--edge);color:var(--text-2)}
body.workspace-theme .fig-proof {--accent:var(--text-2);--muted:var(--text-3)}
body.workspace-theme .fig-vp:fullscreen .fc-b {background:var(--surface);border-color:var(--edge);color:var(--text-2);box-shadow:none}
body.workspace-theme .fig-vp:fullscreen .fc-b:hover {background:var(--hover);border-color:var(--mid);color:var(--text)}
body.workspace-theme .fig-vp:fullscreen .fc-b.zoom,body.workspace-theme .fig-vp:fullscreen .fc-b.zoom:hover {background:var(--ink);border-color:var(--ink);color:var(--surface)}
body.workspace-theme .fig-vp:fullscreen .fc-b:disabled {background:var(--selected);border-color:var(--edge);color:var(--quiet)}
body.workspace-theme [data-scene-action="use"] {height:auto;min-height:56px;line-height:1.7;white-space:pre-line!important;display:block}
body.workspace-theme [data-scene-action="preview"] {height:32px}

/* Action hierarchy: blue creates/plays, teal organizes, warm gold selects experiment presets. */
body.workspace-theme :focus-visible {outline-color:var(--accent)}
body.workspace-theme ::selection {background:var(--accent-soft);color:var(--ink)}
body.workspace-theme .topbar {height:54px;flex-basis:54px;box-shadow:0 1px 8px rgba(0,0,0,.035)}
body.workspace-theme .btn,body.workspace-theme .tbtn,body.workspace-theme .pbtn {border-radius:7px}
body.workspace-theme .btn.primary,body.workspace-theme .tbtn.primary,
body.workspace-theme .pbtn.main,body.workspace-theme .cb-send.on,
body.workspace-theme .fe-send,body.workspace-theme .undo-btn {background:var(--primary);border-color:var(--primary);color:var(--on-accent);box-shadow:0 3px 9px rgba(22,70,152,.16)}
body.workspace-theme .btn.primary:hover,body.workspace-theme .tbtn.primary:hover,
body.workspace-theme .pbtn.main:hover,body.workspace-theme .cb-send.on:hover,
body.workspace-theme .fe-send:hover,body.workspace-theme .undo-btn:hover {background:var(--primary-hover);border-color:var(--primary-hover);color:var(--on-accent)}
body.workspace-theme .btn.ghost.on,body.workspace-theme .tbtn.link,
body.workspace-theme .tbtn.link:hover,body.workspace-theme .cb-chip.enh.on {background:var(--accent-soft);border-color:var(--edge);color:var(--accent)}
body.workspace-theme .topbar .tb-logo {color:var(--accent)}
body.workspace-theme #view-builder .tb-crumb .cur {color:var(--accent)}
body.workspace-theme #view-mine .tb-crumb .cur {color:var(--teal)}
body.workspace-theme #view-lab .tb-crumb .cur {color:var(--gold)}
body.workspace-theme .home-actions>[data-light-toggle],body.workspace-theme .tb-right>[data-light-toggle] {background:var(--surface);border-color:var(--edge);color:var(--copy)}
body.workspace-theme .home-actions>[data-light-toggle]:hover,body.workspace-theme .tb-right>[data-light-toggle]:hover {color:var(--gold);border-color:var(--mid)}
body.workspace-theme input:not([type=range]):focus,body.workspace-theme select:focus,
body.workspace-theme textarea:focus,body.workspace-theme .ge-ta:focus,
body.workspace-theme .fm-in:focus {border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
body.workspace-theme .composer {border-color:var(--mid);border-radius:14px;padding:14px 16px 10px;box-shadow:var(--shadow)}
body.workspace-theme .composer:focus-within {border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft),var(--shadow)}
body.workspace-theme .composer-ta {font-size:14px}
body.workspace-theme .cb-chip.scene {background:var(--accent-soft);color:var(--accent)}
body.workspace-theme .cb-chip.scene svg {color:var(--accent)}
body.workspace-theme .hello-t {font-size:29px;font-weight:600;letter-spacing:0}
body.workspace-theme .hello-av,body.workspace-theme .av {background:var(--accent-soft);border-color:var(--edge);color:var(--accent)}
body.workspace-theme .hello-s {font-size:13px;line-height:1.9;max-width:560px;color:var(--quiet)}
body.workspace-theme .hchip {border-radius:9px;padding:10px 13px;box-shadow:var(--shadow-1)}
body.workspace-theme .hchip b {color:var(--accent)}
body.workspace-theme .hchip.brief b {color:var(--gold)}
body.workspace-theme .hchip:hover {border-color:var(--accent);background:var(--surface);box-shadow:var(--shadow-1)}
body.workspace-theme .bs-item.on,body.workspace-theme .bs-item.menu-on {background:var(--accent-soft);box-shadow:inset 2px 0 0 var(--accent)}
body.workspace-theme .bs-pinmark,body.workspace-theme .bs-op.bs-om.on {color:var(--accent)}
body.workspace-theme .bs-new {background:var(--surface);color:var(--accent);border-color:var(--edge)}
body.workspace-theme .bs-new:hover {border-color:var(--accent);color:var(--accent)}
body.workspace-theme .bs-empty {background:transparent;border-style:dashed;line-height:1.9}
body.workspace-theme .acard {border-radius:12px;padding:17px 18px;box-shadow:var(--shadow-1)}
body.workspace-theme .acard-hd {padding-bottom:10px;border-bottom:1px solid var(--line-2);margin-bottom:13px}
body.workspace-theme .acard-t {font-size:14px;font-weight:600}
body.workspace-theme .acard.item,body.workspace-theme .acard.gen {border-left:3px solid var(--accent)}
body.workspace-theme .acard.fig {border-left:3px solid var(--teal)}
body.workspace-theme .acard.rt,body.workspace-theme .acard.item-review {border-left:3px solid var(--gold)}
body.workspace-theme .acard.item>.acard-hd::before,body.workspace-theme .acard.gen>.acard-hd::before {background:var(--accent)}
body.workspace-theme .acard.fig>.acard-hd::before {background:var(--teal)}
body.workspace-theme .acard.rt>.acard-hd::before,body.workspace-theme .acard.item-review>.acard-hd::before {background:var(--gold)}
body.workspace-theme .item-ans {background:var(--accent-soft);border-color:var(--line)}
body.workspace-theme .ia-v,body.workspace-theme .parm-tbl td.v {color:var(--accent)}
body.workspace-theme .ubub {background:var(--accent-soft);border-color:var(--edge)}
body.workspace-theme .fc-b.on,body.workspace-theme .fc-b.zoom,body.workspace-theme .fig-style.on,
body.workspace-theme .fig-player .fp-btn.main,body.workspace-theme .fc-b.zoom:hover,
body.workspace-theme .native-figure-player .native-playback-main>.btn:first-child,
body.workspace-theme .fig-vp:fullscreen .fc-b.zoom,body.workspace-theme .fig-vp:fullscreen .fc-b.zoom:hover {background:var(--primary);border-color:var(--primary);color:var(--on-accent)}
body.workspace-theme .fe-prev-tag,body.workspace-theme .tag-info {background:var(--accent-soft);color:var(--accent);border-color:var(--line)}
body.workspace-theme .fig-proof {--accent:var(--teal)}

/* The saved-scene library reads as a quiet collection space. */
body.workspace-theme .ms-h2 {display:flex;align-items:center;gap:12px;font-weight:600;font-size:28px}
body.workspace-theme .ms-h2::before {content:"";width:4px;height:25px;border-radius:3px;background:var(--teal)}
body.workspace-theme .ms-sub {font-size:13px;line-height:1.9}
body.workspace-theme .ms-empty {padding:60px 26px;border-style:solid;border-radius:16px;background:radial-gradient(ellipse at 50% 0,var(--teal-soft),transparent 65%),var(--panel);box-shadow:var(--shadow-1)}
body.workspace-theme .ms-empty-ico {width:56px;height:56px;border-radius:15px;background:var(--teal-soft);color:var(--teal);border-color:var(--edge);margin-bottom:6px}
body.workspace-theme .ms-empty-t {font-size:18px;color:var(--ink);font-weight:600}
body.workspace-theme .ms-empty-s {font-size:13px;color:var(--quiet)}
body.workspace-theme .ms-group.on {background:var(--teal-soft);border-color:var(--teal);color:var(--teal)}
body.workspace-theme .ms-group.on .ms-group-n {color:var(--teal)}
body.workspace-theme .ms-card {border-radius:13px;box-shadow:var(--shadow-1)}
body.workspace-theme .ms-card:hover,body.workspace-theme .ms-card:focus-visible {border-color:var(--teal);box-shadow:var(--shadow)}

/* Dense experiment controls use color for navigation and important readings. */
body.workspace-theme .stage {--canvas:#080f1c;--chrome:#0b1424;--panel:#111d31;--surface:#13243c;--hover:#182b45;--selected:#213956;--edge:#314663;--mid:#6a809f;--quiet:#9baec6;--copy:#c0cfe3;--ink:#f0f5fd;--accent:#95baff;--accent-soft:#18365c;--primary:#356cdb;--primary-hover:#3b70de;--blue:var(--accent);border-radius:11px}
body.workspace-theme .stage.fs {border-radius:0}
body.workspace-theme .stage-tl,body.workspace-theme .seg,body.workspace-theme .fs-btn,
body.workspace-theme .iso-host .iso-viewbtn,body.workspace-theme .stage-fsread {background:rgba(13,27,46,.85);border-color:#334b6b}
body.workspace-theme .seg button.on,body.workspace-theme .iso-btn.on,body.workspace-theme .stage.fs .stage-fullscreen {background:var(--primary);border-color:var(--primary);color:#fff}
body.workspace-theme .stage.fs .pbtn.main {color:#fff}
body.workspace-theme .sec.on,body.workspace-theme .tq-item.on {background:var(--accent-soft);color:var(--accent);box-shadow:inset 2px 0 0 var(--accent)}
body.workspace-theme .sec.on .dot {background:var(--accent)}
body.workspace-theme .sec.on .badge {color:var(--accent);border-color:var(--mid)}
body.workspace-theme .grp-hd {padding-bottom:7px;border-bottom:1px solid var(--line-2);margin-bottom:11px}
body.workspace-theme .grp-hd .t {font-size:11px;font-weight:600;letter-spacing:.25px}
body.workspace-theme .pchip.on {background:var(--gold-soft);border-color:var(--gold);color:var(--gold);font-weight:600}
body.workspace-theme .pchip:hover,body.workspace-theme .pchip.on:hover {background:var(--gold-soft);border-color:var(--gold);color:var(--gold)}
body.workspace-theme .metric-big {background:var(--accent-soft);border-color:var(--edge);border-radius:10px;padding:11px 12px}
body.workspace-theme .metric-big .v {color:var(--accent);font-size:25px;margin-top:3px}
body.workspace-theme .metric {background:var(--surface);border-color:var(--line-2);border-radius:7px;padding:7px 8px}
body.workspace-theme .metric.hl {background:var(--teal-soft);border-color:var(--edge)}
body.workspace-theme .metric.hl .v {color:var(--teal)}
body.workspace-theme .chart-card {border-radius:10px;background:var(--panel);box-shadow:var(--shadow-1);padding:10px 10px 7px}
body.workspace-theme .chart-hd {margin-bottom:5px}
body.workspace-theme .chart-hd .t {font-weight:600}
body.workspace-theme .explain {background:var(--gold-soft);border-color:var(--edge);color:var(--copy);border-radius:9px}
body.workspace-theme .explain .tag {background:transparent;color:var(--gold);padding-left:0}
body.workspace-theme .explain .txt em {color:var(--gold)}
body.workspace-theme input[type=range] {accent-color:var(--accent)}
body.workspace-theme input[type=range]::-webkit-slider-thumb {border-color:var(--accent);background:var(--panel)}
body.workspace-theme .track input[type=range]::-webkit-slider-thumb {background:var(--accent);border-color:var(--panel);box-shadow:0 0 0 1px var(--accent)}
body.workspace-theme input[type=checkbox],body.workspace-theme input[type=radio] {accent-color:var(--primary)}
body.workspace-theme .chk input:checked {background:var(--primary);border-color:var(--primary)}
body.workspace-theme .chk input:checked::after {border-color:#fff}
body.workspace-theme .formula .fx,body.workspace-theme .verify-row .sim {color:var(--accent)}
body.workspace-theme .formula {border-left:2px solid var(--accent);border-radius:8px}
body.workspace-theme table.dtable tr.mark td {background:var(--accent-soft)}
body.workspace-theme .modal,body.workspace-theme .cfg-box,body.workspace-theme .dlg {border-radius:13px}
body.workspace-theme .modal-hd {background:var(--surface)}
body.workspace-theme .cfg-t {font-size:16px;font-weight:600;margin-bottom:8px}
body.workspace-theme .cfg-hint {color:var(--quiet)}
body.workspace-theme .lab-more-menu,body.workspace-theme .cb-menu {border-radius:10px}

@media(max-width:760px) {
  body.workspace-theme .hello-t {font-size:24px}
  body.workspace-theme .composer {padding:12px}
  body.workspace-theme .acard {padding:13px;border-radius:10px}
  body.workspace-theme .ms-empty {padding:40px 20px}
}
