/* CAEL 0.5.98 — shared visual foundations.
   This final screen-only layer supplies the same semantic colors to the
   existing modules. It does not change structure, data, sizing or print. */
@media screen {
  html[data-theme] {
    --u598-canvas:#f2f4f7;
    --u598-sidebar:#fafbfc;
    --u598-surface:#ffffff;
    --u598-raised:#f6f8fa;
    --u598-subtle:#edf1f4;
    --u598-input:#ffffff;
    --u598-text:#263342;
    --u598-strong:#182634;
    --u598-muted:#5d6a78;
    --u598-placeholder:#657585;
    --u598-line:#dce3e9;
    --u598-line-strong:#7c8e9c;
    --u598-hover-border:#667d8d;
    --u598-hover:#edf2f5;
    --u598-pressed:#e1e9ee;
    --u598-selected:#e7f1f2;
    --u598-selected-hover:#d9e9ec;
    --u598-selected-border:#88aeb4;
    --u598-selected-text:#075967;
    --u598-action:#086b78;
    --u598-action-hover:#054e59;
    --u598-focus:#087086;
    --u598-primary:#086b78;
    --u598-primary-hover:#075c67;
    --u598-primary-pressed:#064c56;
    --u598-primary-border:#086b78;
    --u598-calculated:#edf0f3;
    --u598-calculated-hover:#e2e8ed;
    --u598-calculated-text:#405260;
    --u598-disabled:#edf0f3;
    --u598-disabled-text:#657380;
    --u598-hero:#193b49;
    --u598-table-head:#eef2f5;
    --u598-table-total:#e5ecef;
    --u598-ok:#216443;
    --u598-ok-soft:#eaf5ee;
    --u598-ok-border:#bed9c9;
    --u598-warn:#82581c;
    --u598-warn-soft:#fff4df;
    --u598-warn-border:#e2cd9c;
    --u598-late:#924a22;
    --u598-late-soft:#fff0e7;
    --u598-late-border:#e6c2aa;
    --u598-danger:#aa3546;
    --u598-danger-soft:#faedf0;
    --u598-danger-hover:#f5dfe5;
    --u598-danger-border:#e4bdc6;
    --u598-info:#286491;
    --u598-info-soft:#eaf2fa;
    --u598-info-border:#bdd1e4;
    --u598-scrollbar:#9daebc;
    --u598-selection:#cde7ec;
    --u598-selection-text:#173e48;
    --u598-shadow:0 2px 8px #1e344108;
    --u598-overlay-shadow:0 18px 60px #1327382e;
    --u598-backdrop:#13263880;
  }

  /* Graphite: neutral charcoal, with a restrained warm action color. */
  html[data-theme=dark] {
    --u598-canvas:#15181b;
    --u598-sidebar:#111416;
    --u598-surface:#202427;
    --u598-raised:#292e32;
    --u598-subtle:#242a2f;
    --u598-input:#191d20;
    --u598-text:#e7ecef;
    --u598-strong:#f6f8fa;
    --u598-muted:#acb5bc;
    --u598-placeholder:#9ca9b2;
    --u598-line:#363e44;
    --u598-line-strong:#6f7d87;
    --u598-hover-border:#85939e;
    --u598-hover:#2b3338;
    --u598-pressed:#343d43;
    --u598-selected:#363029;
    --u598-selected-hover:#453b31;
    --u598-selected-border:#88725d;
    --u598-selected-text:#f4dcc5;
    --u598-action:#edbd91;
    --u598-action-hover:#ffe0be;
    --u598-focus:#f0bc86;
    --u598-primary:#a14d22;
    --u598-primary-hover:#b35a2b;
    --u598-primary-pressed:#87411f;
    --u598-primary-border:#bc7044;
    --u598-calculated:#2a3035;
    --u598-calculated-hover:#343e45;
    --u598-calculated-text:#cbd3d9;
    --u598-disabled:#2b3034;
    --u598-disabled-text:#9fa9b1;
    --u598-hero:#222a30;
    --u598-table-head:#292f34;
    --u598-table-total:#30383e;
    --u598-ok:#9ad9b9;
    --u598-ok-soft:#23352c;
    --u598-ok-border:#455f50;
    --u598-warn:#f0cb8f;
    --u598-warn-soft:#3b3020;
    --u598-warn-border:#78613e;
    --u598-late:#eab083;
    --u598-late-soft:#3b2e24;
    --u598-late-border:#74533c;
    --u598-danger:#f0a8af;
    --u598-danger-soft:#3b282e;
    --u598-danger-hover:#4b3039;
    --u598-danger-border:#77505d;
    --u598-info:#a6c5ef;
    --u598-info-soft:#243246;
    --u598-info-border:#4a6382;
    --u598-scrollbar:#65727c;
    --u598-selection:#634b35;
    --u598-selection-text:#fff4e9;
    --u598-shadow:0 2px 10px #00000018;
    --u598-overlay-shadow:0 18px 60px #00000070;
    --u598-backdrop:#080c10b8;
  }

  /* Blue: midnight blue surfaces; no violet cast in the working areas. */
  html[data-theme=dark][data-theme-variant=blue] {
    --u598-canvas:#101824;
    --u598-sidebar:#0d1520;
    --u598-surface:#192534;
    --u598-raised:#223144;
    --u598-subtle:#1d2b3c;
    --u598-input:#111d2b;
    --u598-text:#e6edf5;
    --u598-strong:#f5f8fc;
    --u598-muted:#acbbcc;
    --u598-placeholder:#9aaebf;
    --u598-line:#314358;
    --u598-line-strong:#647c94;
    --u598-hover-border:#89a5c0;
    --u598-hover:#26394f;
    --u598-pressed:#304760;
    --u598-selected:#233f5f;
    --u598-selected-hover:#2c4f73;
    --u598-selected-border:#678fb5;
    --u598-selected-text:#d9eaff;
    --u598-action:#a5cfff;
    --u598-action-hover:#d3e7ff;
    --u598-focus:#9cc9ff;
    --u598-primary:#2d65b8;
    --u598-primary-hover:#3b73c4;
    --u598-primary-pressed:#24549c;
    --u598-primary-border:#648cca;
    --u598-calculated:#29343f;
    --u598-calculated-hover:#354351;
    --u598-calculated-text:#d1dbe6;
    --u598-disabled:#273444;
    --u598-disabled-text:#a2b2c4;
    --u598-hero:#172c43;
    --u598-table-head:#243346;
    --u598-table-total:#2b3e52;
    --u598-ok:#a5dbbd;
    --u598-ok-soft:#21382f;
    --u598-ok-border:#456657;
    --u598-warn:#eccb91;
    --u598-warn-soft:#3b3226;
    --u598-warn-border:#79664a;
    --u598-late:#efb38a;
    --u598-late-soft:#3d2f27;
    --u598-late-border:#775640;
    --u598-danger:#f3acb7;
    --u598-danger-soft:#3b2934;
    --u598-danger-hover:#4d3440;
    --u598-danger-border:#7b5162;
    --u598-info:#a5cfff;
    --u598-info-soft:#22374e;
    --u598-info-border:#4f7397;
    --u598-scrollbar:#657f99;
    --u598-selection:#315d89;
    --u598-selection-text:#f5f9ff;
  }

  /* Keep the previous adapters on one palette. Equal specificity to their
     variant definitions makes the final loaded layer authoritative. */
  html[data-theme],
  html[data-theme][data-theme-variant] {
    --p594-canvas:var(--u598-canvas);--p594-sidebar:var(--u598-sidebar);
    --p594-paper:var(--u598-surface);--p594-raised:var(--u598-raised);--p594-input:var(--u598-input);
    --p594-text:var(--u598-text);--p594-strong:var(--u598-strong);--p594-muted:var(--u598-muted);--p594-placeholder:var(--u598-placeholder);
    --p594-line:var(--u598-line);--p594-input-border:var(--u598-line-strong);--p594-input-hover:var(--u598-hover-border);
    --p594-hover:var(--u598-hover);--p594-hover-border:var(--u598-hover-border);--p594-pressed:var(--u598-pressed);
    --p594-selected:var(--u598-selected);--p594-selected-hover:var(--u598-selected-hover);--p594-selected-border:var(--u598-selected-border);--p594-selected-text:var(--u598-selected-text);
    --p594-action:var(--u598-action);--p594-action-hover:var(--u598-action-hover);--p594-focus:var(--u598-focus);
    --p594-primary:var(--u598-primary);--p594-primary-hover:var(--u598-primary-hover);--p594-primary-pressed:var(--u598-primary-pressed);--p594-primary-border:var(--u598-primary-border);
    --p594-calculated:var(--u598-calculated);--p594-calculated-hover:var(--u598-calculated-hover);--p594-calculated-text:var(--u598-calculated-text);
    --p594-disabled:var(--u598-disabled);--p594-disabled-text:var(--u598-disabled-text);--p594-hero:var(--u598-hero);
    --p594-ok:var(--u598-ok);--p594-ok-soft:var(--u598-ok-soft);--p594-ok-border:var(--u598-ok-border);
    --p594-warn:var(--u598-warn);--p594-warn-soft:var(--u598-warn-soft);--p594-warn-border:var(--u598-warn-border);
    --p594-danger:var(--u598-danger);--p594-danger-soft:var(--u598-danger-soft);--p594-danger-hover:var(--u598-danger-hover);--p594-danger-border:var(--u598-danger-border);
    --p594-scrollbar:var(--u598-scrollbar);--p594-selection:var(--u598-selection);
    --ui67-canvas:var(--u598-canvas);--ui67-paper:var(--u598-surface);--ui67-ink:var(--u598-text);--ui67-muted:var(--u598-muted);
    --ui67-line:var(--u598-line);--ui67-line-strong:var(--u598-line-strong);--ui67-action:var(--u598-action);--ui67-action-hover:var(--u598-action-hover);
    --ui67-action-soft:var(--u598-selected);--ui67-navy:var(--u598-hero);--ui67-focus:var(--u598-focus);--ui67-shadow:var(--u598-shadow);
    --ui67-ok:var(--u598-ok);--ui67-ok-soft:var(--u598-ok-soft);--ui67-warn:var(--u598-warn);--ui67-warn-soft:var(--u598-warn-soft);
    --ui67-danger:var(--u598-danger);--ui67-danger-soft:var(--u598-danger-soft);
    --ui593-sidebar:var(--u598-sidebar);--ui593-raised:var(--u598-raised);--ui593-input:var(--u598-input);
    --ui593-hover:var(--u598-hover);--ui593-hover-border:var(--u598-hover-border);--ui593-pressed:var(--u598-pressed);
    --ui593-selected:var(--u598-selected);--ui593-selected-hover:var(--u598-selected-hover);--ui593-selected-border:var(--u598-selected-border);
    --ui593-calculated:var(--u598-calculated);--ui593-calculated-hover:var(--u598-calculated-hover);--ui593-disabled:var(--u598-disabled);--ui593-placeholder:var(--u598-placeholder);
    --ui593-primary:var(--u598-primary);--ui593-primary-hover:var(--u598-primary-hover);--ui593-primary-pressed:var(--u598-primary-pressed);
    --ui593-success-border:var(--u598-ok-border);--ui593-warning-border:var(--u598-warn-border);--ui593-danger-border:var(--u598-danger-border);--ui593-danger-hover:var(--u598-danger-hover);
    --bg:var(--u598-canvas);--paper:var(--u598-surface);--ink:var(--u598-text);--muted:var(--u598-muted);--line:var(--u598-line);
    --teal:var(--u598-action);--teal-soft:var(--u598-selected);--amber:var(--u598-warn);--amber-soft:var(--u598-warn-soft);--red:var(--u598-danger);--sidebar:var(--u598-sidebar);
    --theme592-canvas:var(--u598-canvas);--theme592-paper:var(--u598-surface);--theme592-ink:var(--u598-text);--theme592-line:var(--u598-line);
  }

  /* Local semantic families also cover light mode and standalone dialogs. */
  html[data-theme] :is(.e559,.ws591,.ws591-dialog) {
    --e-ink:var(--u598-text);--e-muted:var(--u598-muted);--e-line:var(--u598-line);--e-bg:var(--u598-raised);--e-teal:var(--u598-action);
    --ws-ink:var(--u598-text);--ws-muted:var(--u598-muted);--ws-line:var(--u598-line);--ws-teal:var(--u598-action);--ws-surface:var(--u598-raised);
  }
  html[data-theme] :is(.op592,.op592-dialog) {
    --op-bg:var(--u598-raised);--op-paper:var(--u598-surface);--op-ink:var(--u598-text);--op-muted:var(--u598-muted);--op-line:var(--u598-line);
    --op-soft:var(--u598-selected);--op-action:var(--u598-action);--op-ok:var(--u598-ok);--op-warn:var(--u598-warn);--op-danger:var(--u598-danger);
  }
  html[data-theme] :is(.ct592-workspace,.ct592-composition,.ct592-history,.ct592-cpu-picker) {
    --ct-bg:var(--u598-raised);--ct-paper:var(--u598-surface);--ct-ink:var(--u598-text);--ct-muted:var(--u598-muted);--ct-line:var(--u598-line);
    --ct-action:var(--u598-action);--ct-soft:var(--u598-selected);--ct-warn:var(--u598-warn);--ct-warn-bg:var(--u598-warn-soft);--ct-danger:var(--u598-danger);--ct-ok:var(--u598-ok);
  }
  html[data-theme] :is(.commercial593-workspace,.commercial593-history,.commercial593-readonly) {
    --c593-paper:var(--u598-surface);--c593-bg:var(--u598-raised);--c593-ink:var(--u598-text);--c593-muted:var(--u598-muted);--c593-line:var(--u598-line);
    --c593-action:var(--u598-action);--c593-soft:var(--u598-selected);--c593-warn:var(--u598-warn);--c593-warn-bg:var(--u598-warn-soft);--c593-danger:var(--u598-danger);
  }
  html[data-theme] :is(.et587,.et587-dialog) {--et587-ink:var(--u598-text);--et587-muted:var(--u598-muted);--et587-line:var(--u598-line);--et587-teal:var(--u598-action);}
  html[data-theme] .fw585 {--fw585-text:var(--u598-text);--fw585-muted:var(--u598-muted);--fw585-line:var(--u598-line);}
  html[data-theme][data-interface567] :is(#modal.f586-editor,#nf-picker.f586-picker) {--f586-ink:var(--u598-text);--f586-muted:var(--u598-muted);--f586-line:var(--u598-line);--f586-surface:var(--u598-raised);--f586-teal:var(--u598-action);--f586-warn:var(--u598-warn);--f586-error:var(--u598-danger);}
  html[data-theme][data-interface567] #modal.r586-record {--r586-ink:var(--u598-text);--r586-muted:var(--u598-muted);--r586-line:var(--u598-line);--r586-soft:var(--u598-raised);--r586-teal:var(--u598-action);}
  html[data-theme] :is(.e559,.c561-page,.c563-workbench,.m564-page,#cpu527-root,#materials564-dialog) {--v565-ink:var(--u598-text);--v565-muted:var(--u598-muted);--v565-line:var(--u598-line);--v565-surface:var(--u598-raised);--v565-accent:var(--u598-action);}

  /* Surface hierarchy: quiet dividers, separate canvas, paper and toolbars. */
  html[data-theme] body,
  html[data-theme][data-interface567] :is(.dept-shell,.ux667-shell) {background:var(--u598-canvas);color:var(--u598-text);}
  html[data-theme][data-interface567] :is(.dept-sidebar,.ux667-sidebar) {background:var(--u598-sidebar);border-color:var(--u598-line);}
  html[data-theme][data-interface567] .ux667-shell>.topbar,
  html[data-theme] :is(.panel,.nf-table,.fin52-table,.e559-plan,.c561-page,.c563-sidebar,.c563-detail,.c563-empty,.ct592-workspace,.ws591-card,.ws591-kpi,.op592-card,.op592-dialog,.login-form,.login-card,.auth-card) {
    background:var(--u598-surface);color:var(--u598-text);border-color:var(--u598-line);box-shadow:var(--u598-shadow);
  }
  html[data-theme] :is(.ux667-brand-fallback,.ux667-breadcrumbs [aria-current=page]) {color:var(--u598-strong);}
  html[data-theme] :is(.c561-metric,.c563-metric,.c563-item-head,.ct592-filters,.commercial593-filters,.ux667-sidebar-search,.ux667-panel-link,.b575-meta,.ct592-service-fields,.ct592-category-totals) {
    background:var(--u598-raised);border-color:var(--u598-line);
  }
  html[data-theme] :is(.op592-metric,.ux667-task,.ux667-department,.module-card,.quick-action,.e559-work-card,.w531-item,.activity) {background:var(--u598-surface);border-color:var(--u598-line);box-shadow:var(--u598-shadow);}
  html[data-theme] :is(.e559-areas,.e559-subtabs,.tabs) {background:var(--u598-raised);border-color:var(--u598-line);}
  html[data-theme] :is(.b575-summary,.ct592-composition-reference,.ct593-service-details) {background:var(--u598-surface);border-color:var(--u598-line);box-shadow:none;}
  html[data-theme] .b575-summary>div {border-color:var(--u598-line);}
  html[data-theme] .b575-summary>div:last-child {background:var(--u598-ok-soft);}
  html[data-theme] :is(.b575-summary span,.b575-summary small,.b575-meta summary,.b575-caption,.b575-note,.b575-index,.c561-caption,.c561-metric span,.c561-metric small,.c561-subhead p,.c561-table small,.c563-table small) {color:var(--u598-muted);}
  html[data-theme] :is(.b575-positive,.c561-positive,.c563-positive) {color:var(--u598-ok)!important;}
  html[data-theme] :is(.b575-negative,.c561-negative,.c563-negative) {color:var(--u598-danger)!important;}
  html[data-theme] .b575-row-status {color:var(--u598-warn)!important;}
  html[data-theme] .c561-metric.c561-positive {background:var(--u598-ok-soft);border-color:var(--u598-ok-border);}
  html[data-theme] .c561-metric.c561-negative {background:var(--u598-danger-soft);border-color:var(--u598-danger-border);}

  /* Dialogs keep the same palette as the workspace instead of a third shade. */
  html[data-theme] :is(dialog,#modal,dialog>.modal-header,dialog>.modal-footer,dialog .modal-body),
  html[data-theme] .ct592-composition>header,
  html[data-theme] .ct592-composition>footer {background:var(--u598-surface);color:var(--u598-text);border-color:var(--u598-line);}
  html[data-theme] dialog {box-shadow:var(--u598-overlay-shadow);}
  html[data-theme] dialog::backdrop {background:var(--u598-backdrop);}
  html[data-theme][data-interface567] #toast {background:var(--u598-raised);color:var(--u598-text);border:1px solid var(--u598-line-strong);box-shadow:var(--u598-overlay-shadow);}
  html[data-theme][data-interface567] #toast.bad {background:var(--u598-danger-soft);color:var(--u598-danger);border-color:var(--u598-danger-border);}
  html[data-theme] #toast [data-ux667=close-toast] {border-color:var(--u598-line);}

  /* Form boundaries remain distinguishable; calculated values stay gray. */
  html[data-theme][data-interface567] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=color]):not([type=file]),select,textarea):not(:disabled):not([readonly]):not([aria-invalid=true]) {
    background-color:var(--u598-input)!important;color:var(--u598-text)!important;border-color:var(--u598-line-strong)!important;box-shadow:none;
  }
  html[data-theme] :is(input,textarea)::placeholder {color:var(--u598-placeholder)!important;opacity:1;}
  html[data-theme][data-interface567] :is(input[readonly],textarea[readonly],input:disabled,select:disabled,textarea:disabled) {
    background:var(--u598-calculated)!important;color:var(--u598-calculated-text)!important;-webkit-text-fill-color:var(--u598-calculated-text);border-color:var(--u598-line)!important;box-shadow:none;
  }
  html[data-theme] :is(input[type=checkbox],input[type=radio]) {accent-color:var(--u598-primary);}
  html[data-theme] :is(input,select,textarea)[aria-invalid=true] {
    background:var(--u598-danger-soft)!important;color:var(--u598-text)!important;border-color:var(--u598-danger)!important;outline-color:var(--u598-danger)!important;
  }
  html[data-theme] :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible {
    outline:2px solid var(--u598-focus)!important;outline-offset:2px;
  }
  html[data-theme][data-interface567] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=color]):not([type=file]),select,textarea):focus:not(:disabled):not([readonly]):not([aria-invalid=true]) {border-color:var(--u598-focus)!important;box-shadow:none!important;}
  html[data-theme] :is(.b582-local-dialog,.b582-editor,.b582-cpu-picker) :is(input,select,button):focus-visible:not([aria-invalid=true]) {outline-color:var(--u598-focus)!important;}
  html[data-theme][data-interface567] :is(input,select,textarea)[aria-invalid=true]:focus-visible,
  html[data-theme] :is(.b582-local-dialog,.b582-editor,.b582-cpu-picker,#ct592-editor,#commercial593-editor,#modal) :is(input,select,textarea)[aria-invalid=true]:focus-visible {
    border-color:var(--u598-danger)!important;outline-color:var(--u598-danger)!important;
  }

  /* Secondary controls are quieter than editable fields. */
  html[data-theme][data-interface567] :is(.btn,.icon-btn,.dept-top-action,.ux667-help):not(.primary):not(.danger):not(.r586-destructive):not(.active):not([aria-pressed=true]):not(:disabled):not([aria-disabled=true]) {
    background:var(--u598-surface);color:var(--u598-text);border-color:var(--u598-line);box-shadow:none;filter:none;
  }
  html[data-theme] :is(.btn.primary,.e559 .btn.primary,#modal .btn.primary,#cpu527-root .btn.primary,dialog .btn.primary):not(:disabled):not([aria-disabled=true]) {
    background:var(--u598-primary)!important;color:#fff!important;border-color:var(--u598-primary-border)!important;box-shadow:none;filter:none;
  }
  html[data-theme][data-interface567] :is(.btn.danger,.btn.r586-destructive) {background:var(--u598-danger-soft);color:var(--u598-danger)!important;border-color:var(--u598-danger-border);filter:none;}
  html[data-theme] .ct592-delete {color:var(--u598-danger)!important;}
  html[data-theme][data-interface567] :is(.btn,.icon-btn,button):disabled,
  html[data-theme] :is(.btn.primary,.e559 .btn.primary,#modal .btn.primary,#cpu527-root .btn.primary,dialog .btn.primary):disabled {
    opacity:1;background:var(--u598-disabled)!important;color:var(--u598-disabled-text)!important;border-color:var(--u598-line)!important;box-shadow:none!important;filter:none;
  }

  /* Tables use a neutral header and stronger totals. Accent belongs to status
     and interaction, not every column band or every service name. */
  html[data-theme][data-interface567] :is(.b575-table,.ct592-component-grid,.c561-table,.c563-table,.ws591-table,.op592-table,.wsu596-table) th,
  html[data-theme][data-interface567] .b575-table .b575-bands th,
  html[data-theme][data-interface567] .b575-table th.b575-name {
    background:var(--u598-table-head);color:var(--u598-muted);border-color:var(--u598-line);
  }
  html[data-theme][data-interface567] :is(.b575-table,.ct592-component-grid,.c561-table,.c563-table,.ws591-table,.op592-table,.wsu596-table) td {border-color:var(--u598-line);}
  html[data-theme][data-interface567] .b575-table .b575-name {background:var(--u598-surface);box-shadow:1px 0 0 var(--u598-line);}
  html[data-theme][data-interface567] .b575-table tbody:nth-of-type(2n)>tr:first-child>td {background:var(--u598-subtle);}
  html[data-theme][data-interface567] :is(.b575-table .b575-calculated,.c561-calc,.ct592-composition .ct592-calculated,.ct592-composition [data-component-coefficient],.op592-calculated,.ws591-computed,.ws591-calculated,.e559-calculated) {
    background:var(--u598-calculated)!important;color:var(--u598-calculated-text);
  }
  html[data-theme][data-interface567] .b575-table tfoot :is(th,td),
  html[data-theme][data-interface567] .b575-totals :is(th,td) {
    background:var(--u598-table-total);color:var(--u598-text);border-color:var(--u598-line);
  }
  html[data-theme][data-interface567] .b575-table tfoot .b575-calculated {background:var(--u598-table-total)!important;}
  html[data-theme][data-interface567] :is(#ct592-editor,#commercial593-editor) .b575-table .b575-service-link,
  html[data-theme][data-interface567] .b575-readonly .b575-name b {color:var(--u598-text);}
  html[data-theme][data-interface567] #commercial593-editor .b575-table .commercial593-service-link {background:none!important;color:var(--u598-text)!important;border-color:transparent!important;box-shadow:none!important;}
  html[data-theme] .commercial593-workspace .c561-eyebrow {color:var(--u598-action);}
  html[data-theme] :is(.ct592-cpu-link,.ct592-text-button,.op592-link,.e559-text-button,.c563-inline):not(.ct592-delete) {color:var(--u598-action);}
  html[data-theme][data-interface567] .stage597-table>tbody[data-stage597-header]>tr>th {background:var(--u598-raised);color:var(--u598-text);border-left-color:var(--stage597-accent);}
  html[data-theme][data-interface567] .stage597-table .stage597-toggle {background:color-mix(in srgb,var(--stage597-accent) 7%,var(--u598-raised));color:var(--u598-text);}
  html[data-theme] .stage597-count {background:var(--u598-surface);color:var(--u598-muted);border-color:var(--u598-line);}

  /* Navigation keeps selection visible through hover and keyboard focus. */
  html[data-theme][data-interface567] :is(.ux667-sidebar,.dept-sidebar) .nav-item {color:var(--u598-muted);}
  html[data-theme][data-interface567] :is(.ux667-sidebar,.dept-sidebar) .dept-toggle {color:var(--u598-text);}
  html[data-theme][data-interface567] :is(.ux667-sidebar,.dept-sidebar) .nav-item.active,
  html[data-theme] .c563-sidebar a.selected {
    background:var(--u598-selected);color:var(--u598-selected-text)!important;border-color:var(--u598-selected-border);box-shadow:inset 3px 0 var(--u598-action);
  }
  html[data-theme][data-interface567] :is(.e559-area,.e559-subtab,.e559-family,.nf-tabs button,.tab).selected,
  html[data-theme][data-interface567] :is(.tab,.dept-top-action).active,
  html[data-theme][data-interface567] :is(.w531-tabs,.h54-tabs) [aria-selected=true],
  html[data-theme] :is(.ws591-status-tabs,.ws591-segmented,.ux667-list-mode) button[aria-pressed=true],
  html[data-theme] :is(.nf-pick-item,.b57-choice).selected {
    background:var(--u598-selected);color:var(--u598-selected-text)!important;border-color:var(--u598-selected-border);box-shadow:none;
  }

  /* Semantic status colors are consistent across budgets, inputs and Gantt. */
  html[data-theme][data-interface567] .pill,
  html[data-theme] :is(.ws591-badge.ws591-neutral,.op592-badge:not(.op592-warning):not(.op592-danger):not(.op592-ok):not(.op592-info)) {
    background:var(--u598-raised);color:var(--u598-muted);border-color:var(--u598-line);
  }
  html[data-theme][data-interface567] .pill.ok,
  html[data-theme] :is(.ws591-badge.ws591-ok,.op592-badge.op592-ok,.c561-status.is-active) {
    background:var(--u598-ok-soft);color:var(--u598-ok);border-color:var(--u598-ok-border);
  }
  html[data-theme][data-interface567] .pill.warn,
  html[data-theme] :is(.ws591-badge.ws591-risk,.op592-badge.op592-warning,.c561-status:not(.is-active)) {
    background:var(--u598-warn-soft);color:var(--u598-warn);border-color:var(--u598-warn-border);
  }
  html[data-theme] .ws591-badge.ws591-late {background:var(--u598-late-soft);color:var(--u598-late);border-color:var(--u598-late-border);}
  html[data-theme][data-interface567] .pill.bad,
  html[data-theme] :is(.ws591-badge.ws591-blocked,.op592-badge.op592-danger) {
    background:var(--u598-danger-soft);color:var(--u598-danger);border-color:var(--u598-danger-border);
  }
  html[data-theme][data-interface567] .pill.resolved,
  html[data-theme] :is(.ws591-badge.ws591-ahead,.op592-badge.op592-info) {
    background:var(--u598-info-soft);color:var(--u598-info);border-color:var(--u598-info-border);
  }
  html[data-theme] .c561-note {background:var(--u598-raised);color:var(--u598-muted);border-color:var(--u598-line);border-left-color:var(--u598-action);}
  html[data-theme] :is(.c561-note.amber,.ws591-note.ws591-warning,.ux667-admin-warning) {background:var(--u598-warn-soft);color:var(--u598-warn);border-color:var(--u598-warn-border);}

  @media (hover:hover) {
    html[data-theme][data-interface567] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea):hover:not(:disabled):not([readonly]):not([aria-invalid=true]):not(:focus) {border-color:var(--u598-hover-border)!important;}
    html[data-theme][data-interface567] :is(.btn,.icon-btn,.dept-top-action,.ux667-help):hover:not(:disabled):not([aria-disabled=true]):not(.primary):not(.danger):not(.r586-destructive):not(.active):not([aria-pressed=true]) {
      background:var(--u598-hover);color:var(--u598-text);border-color:var(--u598-hover-border);filter:none;
    }
    html[data-theme] :is(.btn.primary,.e559 .btn.primary,#modal .btn.primary,#cpu527-root .btn.primary,dialog .btn.primary):hover:not(:disabled):not([aria-disabled=true]) {background:var(--u598-primary-hover)!important;border-color:var(--u598-primary-border)!important;color:#fff!important;}
    html[data-theme][data-interface567] :is(.btn.danger,.btn.r586-destructive):hover:not(:disabled):not([aria-disabled=true]) {background:var(--u598-danger-hover)!important;color:var(--u598-danger)!important;border-color:var(--u598-danger)!important;}
    html[data-theme][data-interface567] :is(.ux667-sidebar,.dept-sidebar) :is(.nav-item,.dept-toggle):hover,
    html[data-theme] :is(.ux667-department>nav>a,.ux667-related>a,.ux667-sidebar-search,.ux667-panel-link,.w531-item,.activity,.e559-family,.c563-sidebar a):hover,
    html[data-theme] #ux667-finder-results>a:hover {background:var(--u598-hover);color:var(--u598-text);border-color:var(--u598-line);}
    html[data-theme] :is(.ux667-task,.module-card,.quick-action,.e559-work-card):hover {background:var(--u598-hover);border-color:var(--u598-hover-border);}
    html[data-theme] :is(.e559-area,.e559-subtab,.nf-tabs button,.tab,[role=tab]):hover,
    html[data-theme] :is(.ws591-status-tabs,.ws591-segmented,.ux667-list-mode) button:hover {background:var(--u598-hover);color:var(--u598-text);}
    html[data-theme][data-interface567] :is(.ux667-sidebar,.dept-sidebar) .nav-item.active:hover,
    html[data-theme] .c563-sidebar a.selected:hover,
    html[data-theme][data-interface567] :is(.e559-area,.e559-subtab,.e559-family,.nf-tabs button,.tab).selected:hover,
    html[data-theme][data-interface567] :is(.tab,.dept-top-action).active:hover,
    html[data-theme][data-interface567] :is(.w531-tabs,.h54-tabs) [aria-selected=true]:hover,
    html[data-theme] :is(.ws591-status-tabs,.ws591-segmented,.ux667-list-mode) button[aria-pressed=true]:hover,
    html[data-theme] :is(.nf-pick-item,.b57-choice).selected:hover {
      background:var(--u598-selected-hover);color:var(--u598-selected-text)!important;border-color:var(--u598-selected-border);
    }
    html[data-theme] :is(.b574-candidate,.cpu527-option,.nf-pick-item,.b57-choice,.ct592-input-choice,.ws591-source-choice):hover:not(:has(input:disabled)):not(.selected) {background:var(--u598-hover);border-color:var(--u598-hover-border);}
    html[data-theme][data-interface567] :is(.r522-table,.nf-table table,.fin52-table table,.e559-table,.c561-table,.c563-table,.ct592-component-grid,.ws591-table,.op592-table,.wsu596-table) tbody>tr:hover>td,
    html[data-theme][data-interface567] .b575-table tbody>tr:first-child:hover>td,
    html[data-theme][data-interface567] table.v565-data tbody>tr:hover>td {background-color:var(--u598-hover);}
    html[data-theme][data-interface567] :is(.b575-table,.c561-table,.ct592-component-grid,.ws591-table,.op592-table) tbody>tr:hover>:is(.b575-calculated,.c561-calc,.ct592-calculated,.ws591-calculated,.op592-calculated) {background-color:var(--u598-calculated-hover)!important;}
    html[data-theme][data-interface567] .stage597-table .stage597-toggle:hover {background:color-mix(in srgb,var(--stage597-accent) 11%,var(--u598-hover));}
    html[data-theme][data-interface567] :is(#ct592-editor,#commercial593-editor) .b575-table .b575-service-link:hover,
    html[data-theme] :is(.ct592-cpu-link,.ct592-text-button,.op592-link,.e559-text-button,.c563-inline):hover:not(.ct592-delete) {color:var(--u598-action-hover);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;}
    html[data-theme][data-interface567] #commercial593-editor .b575-table .commercial593-service-link:hover {background:none!important;color:var(--u598-action-hover)!important;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;}
  }

  /* Pressed is deliberately last so a hovered primary button still responds. */
  html[data-theme][data-interface567] :is(.btn,.icon-btn):active:not(:disabled):not([aria-disabled=true]):not(.primary):not(.danger):not(.r586-destructive) {background:var(--u598-pressed)!important;border-color:var(--u598-hover-border)!important;}
  html[data-theme] :is(.btn.primary,.e559 .btn.primary,#modal .btn.primary,#cpu527-root .btn.primary,dialog .btn.primary):active:not(:disabled):not([aria-disabled=true]) {background:var(--u598-primary-pressed)!important;border-color:var(--u598-primary-border)!important;}

  /* A theme selector is one control: no doubled border or ring on pointer use.
     Keyboard focus stays on its wrapper; the native select remains intact. */
  html[data-theme][data-interface567] .theme592-control {background:var(--u598-surface);color:var(--u598-muted);border-color:var(--u598-line);box-shadow:none!important;}
  html[data-theme][data-interface567] .theme592-control:focus-within {outline:none!important;box-shadow:none!important;border-color:var(--u598-hover-border);}
  html[data-theme][data-interface567] .theme592-control select,
  html[data-theme][data-interface567] .theme592-control select:is(:hover,:focus,:focus-visible) {
    background:transparent!important;color:var(--u598-text)!important;border-color:transparent!important;outline:none!important;box-shadow:none!important;
  }
  /* Mirror the existing field selector inside the one composite control, so
     its native select cannot acquire a second input surface or border. */
  html[data-theme][data-interface567] .theme592-control :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=color]):not([type=file]),select,textarea):not(:disabled):not([readonly]):not([aria-invalid=true]),
  html[data-theme][data-interface567] .theme592-control :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=color]):not([type=file]),select,textarea):is(:hover,:focus,:focus-visible):not(:disabled):not([readonly]):not([aria-invalid=true]) {
    background:transparent!important;border-color:transparent!important;outline:none!important;box-shadow:none!important;
  }
  html[data-theme][data-interface567] .theme592-control[data-theme597-pointer] {outline:none!important;box-shadow:none!important;}
  html[data-theme][data-interface567] .theme592-control:has(select:focus-visible):not([data-theme597-pointer]) {outline:2px solid var(--u598-focus)!important;outline-offset:2px;}
  html[data-theme] ::selection {background:var(--u598-selection);color:var(--u598-selection-text);}
  html[data-theme] :is(table,section,dialog,aside,div) {scrollbar-color:var(--u598-scrollbar) var(--u598-surface);}

  @media (prefers-reduced-motion:reduce) {
    html[data-theme] :is(.btn,.icon-btn,.nav-item,.dept-toggle,.e559-area,.e559-subtab,.tab,.theme592-control,.stage597-chevron,.ws591-bar) {transition:none!important;animation:none!important;}
  }
}
