/* ENCY report, pp. 4–6: restrained charcoal, light text, selective teal.
   Values are the report's Mini CNC adaptation, not official ENCY tokens. */
:root[data-theme=dark], :host([data-theme=dark]) {
  color-scheme: dark;
  --ency-surface: #25282d;
  --ency-raised: #303438;
  --ency-inset: #1b1c1e;
  --ency-text: #f3f5f6;
  --ency-muted: #c9ced1;
  --ency-border: #4a5057;
  --ency-accent: #00cfa0;
  --ency-selected: #25463f;
  --ency-warn-bg: #48432c;
  --ency-warn-text: #e8da91;
  --ency-error-bg: #4b3031;
  --ency-error-text: #eb605b;
  --cf-color-primary: #00cfa0;
  --cf-color-primary-dark: #00ad86;
  --cf-color-primary-soft: #25463f;
  --cf-color-ink: #f3f5f6;
  --cf-color-text: #f3f5f6;
  --cf-color-label: #c9ced1;
  --cf-color-subtle: #a8b0b5;
  --cf-color-line: #4a5057;
  --cf-color-divider: #3c4248;
  --cf-color-surface: #25282d;
  --cf-color-bg: #303438;
  --cf-panel-header-gradient-start: #383d42;
  --cf-panel-header-gradient-end: #25282d;
  --cf-color-operation-text: #c9ced1;
  --cf-badge-bg: #303438;
  --cf-color-scrollbar-track: #25282d;
  --cf-color-scrollbar-thumb: #727d86;
  --cf-color-online-text: #00cfa0;
  --cf-color-simulation-progress: #00cfa0;
  --cf-color-simulation-progress-edge: #00cfa0;
  --muted: #c9ced1;
  --border: #4a5057;
  --surface: #25282d;
  --accent: #00cfa0;
  --green: #00cfa0;
  --blue: #00cfa0;
}
.mantis-theme-toggle { appearance:none; flex:none; display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; min-height:30px; padding:0; border:1px solid transparent; border-radius:50%; background:transparent; color:var(--ency-text,#303735); font:500 12px/18px Inter,system-ui,sans-serif; cursor:pointer; }
.mantis-theme-toggle::before { content:""; flex:none; box-sizing:border-box; width:14px; height:14px; border:1.5px solid currentColor; border-radius:50%; background:linear-gradient(90deg,currentColor 50%,transparent 50%); }
.mantis-theme-toggle[aria-pressed=true]::before { transform:rotate(180deg); }
.mantis-theme-toggle:hover { background:var(--ency-raised,#eef1ef); border-color:var(--ency-border,#c4c9cc); }
.mantis-theme-toggle:focus-visible { outline:2px solid var(--ency-accent,#15a130); outline-offset:2px; }
.mantis-theme-toggle--menu { justify-content:flex-start; gap:10px; width:100%; height:40px; margin-top:6px; padding:8px 10px; border:0; border-top:1px solid var(--ency-border,#c4c9cc); border-radius:0; text-align:left; }
.mantis-theme-toggle--menu::after { content:attr(data-theme-label); margin-left:auto; color:var(--ency-muted,#69746e); font-size:11px; }
:root[data-theme=dark] { background:#1b1c1e; color:#f3f5f6; }
:root[data-theme=dark] :is(.home-login-btn,.start-button,#workflow-next,#application-menu-toggle) { background:#00cfa0; color:#25282d; }
:root[data-theme=dark] :is(.home-brand,.home-brand-icon) { color:#00cfa0; }
:root[data-theme=dark] :is(dialog,.cf-cookie-notice) { background:#25282d; color:#f3f5f6; border-color:#4a5057; }
:root[data-theme=dark] :is(.cf-cookie-notice button,.cf-cookie-notice a) { color:#00cfa0; }
:root[data-theme=dark] .home-brand-icon img { filter:brightness(0) saturate(100%) invert(76%) sepia(55%) saturate(2077%) hue-rotate(110deg); }
/* Keep scene content and imported images unfiltered. */
:root[data-theme=dark] .file-picker > img { filter:brightness(0) invert(.9); }
:host([data-theme=dark]) #cf-shell-v2 :is(.cf-shell__menu-button,.cf-shell__action:not(:disabled),.cf-shell__action-menu-trigger:not(:disabled)) { background:#00cfa0 !important; color:#25282d !important; }
:host([data-theme=dark]) .cf-shell__step .cf-shell__icon,
:host([data-theme=dark]) .cf-select__arrow img,
:host([data-theme=dark]) .cf-preview-bar__action img { filter:brightness(0) invert(.9); }
:host([data-theme=dark]) :is(.cf-shell__step--active,.cf-preview-bar__stage[aria-pressed=true]) { border-color:#00cfa0 !important; }
:host([data-theme=dark]) :is(.cf-btn-primary,.cf-button--primary) { color:#25282d; }
:host([data-theme=dark]) .cf-machine-run-stop:not(:disabled) { background:#eb605b; }
:host([data-theme=dark]) .cf-machine-check-row--active { background:#25463f; }
:host([data-theme=dark]) .cf-machine-view .cf-machine-check-status--active { background:#00ad86; }
:host([data-theme=dark]) .cf-shell { box-shadow:none; }
:host([data-theme=dark]) .cf-select__arrow path { stroke:#c9ced1; }
:host([data-theme=dark]) .cf-model-action-dock__figma-icon { filter:brightness(0) invert(.83); }
:host([data-theme=dark]) .cf-model-action-dock__button--active { background:#25463f; outline-color:#00cfa0; }
:host([data-theme=dark]) .cf-model-action-dock__button--active .cf-model-action-dock__figma-icon { filter:brightness(0) saturate(100%) invert(76%) sepia(55%) saturate(2077%) hue-rotate(110deg); }
:root[data-theme=dark] .cf-notice { background:#25282d; color:#f3f5f6; border-color:#4a5057; }
:root[data-theme=dark] .cf-notice a { color:#00cfa0; }
:root[data-theme=dark] .cf-notice__action { background:#303438; color:#f3f5f6; }
:host([data-theme=dark]) .cf-segment__item { color:#c9ced1; }
:host([data-theme=dark]) .cf-segment__item.cf-active { color:#00cfa0; background:#25463f; }
:host([data-theme=dark]) :is(.cf-op-row__icon,.cf-op-type-cell__icon) { filter:brightness(0) invert(.83); }
:root[data-theme=dark] .preview-actions button { background:#25282d; color:#f3f5f6; border-color:#4a5057; }
:host([data-theme=dark]) .cf-machine-jog { background:#303438; }
:host([data-theme=dark]) :is(.cf-machine-jog--x,.cf-machine-coordinate--x) { color:#a4bca4; }
:host([data-theme=dark]) :is(.cf-machine-jog--y,.cf-machine-coordinate--y) { color:#a7a5ce; }
:host([data-theme=dark]) :is(.cf-machine-jog--z,.cf-machine-coordinate--z) { color:#c79fa5; }
:host([data-theme=dark]) :is(.cf-machine-jog--a,.cf-machine-coordinate--a) { color:#e8da91; }
:host([data-theme=dark]) .cf-machine-cutting--waiting { background:#48432c; }
:host([data-theme=dark]) .cf-machine-cutting--waiting .cf-machine-cutting__change { background:#4b3031; color:#f3f5f6; }
:host([data-theme=dark]) .cf-machine-tool-change { background:#48432c; color:#e8da91; }
:host([data-theme=dark]) .cf-import-wizard__continue,
:root[data-theme=dark] #camop_dialog > button:not(.camop_dialog__close) { color:#25282d; }
:host([data-theme=dark]) #cf-shell-v2 :is(.cf-shell__menu-button,.cf-shell__action-menu-trigger:not(:disabled)) .cf-shell__icon { filter:brightness(0); }
:root[data-theme=dark] .start-button img { filter:brightness(0); }
