/* Profile preferences and resolved system appearance. Loaded after workspace styles. */
.profile-preferences { display: grid; gap: 12px; margin: 12px 0; padding: 12px 0; border-block: 1px solid var(--ui-line); }
.profile-preference { display: grid; gap: 5px; min-width: 0; font-size: 13px; }
.profile-preference select { width: 100%; min-height: 36px; padding: 5px 8px; }
.preference-description { margin: 0; color: var(--ui-muted); font-size: 12px; line-height: 1.5; }
#profile-pop :is(select, a, button, input):focus-visible { outline: 2px solid #78b5ff; outline-offset: 2px; }
.controls { color: var(--ui-ink); }
.expander, .grip, .widget-del { color: var(--ui-muted); }

html[data-theme="light"] {
  color-scheme: light;
  --ui-ink: #17233b;
  --ui-muted: #53647b;
  --ui-line: #ccd6e3;
  --ui-surface: #fff;
  --ui-canvas: #f3f6fa;
  --ui-blue: #2454bd;
  --ui-blue-dark: #1c4195;
  --ui-blue-soft: #eaf1ff;
  --ui-shadow: 0 1px 3px #17233b0a;
}

html[data-theme="light"] :is(input, select, textarea) { color: var(--ui-ink); accent-color: var(--ui-blue); }
html[data-theme="light"] :is(select, input:not([type="checkbox"]):not([type="radio"]), textarea) { background: #fff; color: var(--ui-ink); border-color: #a7b6ca; }
html[data-theme="light"] :is(input, textarea)::placeholder { color: #63738a; }
html[data-theme="light"] :is(button, input, select, textarea, a, summary):focus-visible { outline-color: #2454bd; }
html[data-theme="light"] :is(h1, .screen-head h2, .brand-name, .empty-state h2) { color: #17233b; }
html[data-theme="light"] :is(.topbar, .suite-header) { color: #17233b; background: #fff; border-color: #ccd6e3; box-shadow: none; }
html[data-theme="light"] :is(.workspace-header, .title-row) { border-color: #dce3ed; }
html[data-theme="light"] :is(.crumbs, .page-eyebrow, .workspace-status, .workspace-context, .muted, .g-label .muted, .mask) { color: #53647b; }
html[data-theme="light"] .brand-name span { color: #53647b; border-color: #a7b6ca; }
html[data-theme="light"] .tool-toolbar { background: #f7f9fc; color: #34445c; }
html[data-theme="light"] .tool-toolbar .toolbar-label { color: #53647b; }
html[data-theme="light"] .tool-toolbar .ctl-sep { background: #ccd6e3; }
html[data-theme="light"] .tool-toolbar label:has(input[type="checkbox"]:checked) { color: #2454bd; }
html[data-theme="light"] :is(.view-btn, .chip-btn, .row-action, .add-btn) { background: #fff; border-color: #a7b6ca; color: #34445c; box-shadow: none; }
html[data-theme="light"] :is(.view-btn, .chip-btn, .row-action, .add-btn):hover { background: #eaf1ff; border-color: #6484b8; color: #1c4195; }
html[data-theme="light"] :is(.chip-btn, .view-btn):active { background: #d9e6fb; }
html[data-theme="light"] :is(.view-btn.active, .chip-btn.primary, .hint-btns .chip-btn.primary) { color: #fff; background: #2454bd; border-color: #2454bd; }
html[data-theme="light"] :is(.chip-btn.primary, .hint-btns .chip-btn.primary):hover { background: #1c4195; border-color: #1c4195; }
html[data-theme="light"] :is(.chip-btn.active, .view-tabs .chip-btn.active, #views .view-btn.active) { color: #1c4195; background: #e1ecff; border-color: #8faadb; box-shadow: none; }
html[data-theme="light"] .view-tabs .chip-btn { border-color: transparent; background: transparent; }
html[data-theme="light"] .view-tabs .chip-btn.active { border-color: #8faadb; background: #e1ecff; }
html[data-theme="light"] #statusline { color: #455871; }
html[data-theme="light"] :is(#statusline code, .dash-filter-help code) { background: #e7eef9; color: #294b81; }
html[data-theme="light"] :is(#gantt-wrap, #board-wrap, #screen-wrap, .dir-scroll, .hm-scroll, .labels) { background: #fff; border-color: #ccd6e3; }
html[data-theme="light"] :is(.gantt-header, .g-label.head) { background: #edf2f8; color: #34445c; border-color: #c5cfdd; }
html[data-theme="light"] .tier-cell { color: #53647b; border-left-color: #dce3ed; }
html[data-theme="light"] .tier-cell.top { color: #34445c; border-left-color: #ccd6e3; }
html[data-theme="light"] :is(.tier-cell.weekend, .weekend-bg) { background: #f3f6fa; }
html[data-theme="light"] :is(.g-label, .g-label.absent-count) { background: #fff; color: #17233b; border-bottom-color: #dce3ed; }
html[data-theme="light"] .g-label.group { background: #edf2f8; color: #17233b; }
html[data-theme="light"] :is(.g-label.section, .g-track-row.section) { background: #e2eaf4; color: #34445c; }
html[data-theme="light"] :is(.g-label .key, .g-label .title, .task-primary .key) { color: #294b81; }
html[data-theme="light"] :is(.task-secondary .owner, .gantt-search output, .gantt-legend) { color: #455871; }
html[data-theme="light"] :is(.g-label:hover, .g-label.drop-into, .g-label.search-match) { background: #eaf1ff; }
html[data-theme="light"] .g-label.search-match { box-shadow: inset 3px 0 #2454bd; }
html[data-theme="light"] :is(.g-track-row, .calendar-column) { border-color: #dce3ed; }
html[data-theme="light"] .bar.st-inprogress { background: #c4d8fb; color: #173d79; border-color: #7699ce; }
html[data-theme="light"] .bar.st-done { background: #bce9d4; color: #125b3e; border-color: #6fae92; }
html[data-theme="light"] .bar.st-queue { background: #e2e8f1; color: #34445c; border-color: #9aaac0; }
html[data-theme="light"] .bar.rollup { background: #7e92ad; }
html[data-theme="light"] .bar.estimate { background: repeating-linear-gradient(45deg, #edf2f8 0 6px, #dce3ed 6px 12px); color: #34445c; border-color: #8091a8; }
html[data-theme="light"] :is(.bar.risk, .bar.absence) { background: repeating-linear-gradient(45deg, #fff1c6 0 8px, #ffe5a0 8px 16px); color: #77440b; border-color: #ba7e20; }
html[data-theme="light"] :is(.bar.baseline, .bar.fact) { background: #53647b; }
html[data-theme="light"] .bar.fact { color: #fff; }
html[data-theme="light"] :is(.bar-note, .g-label .reason, .g-label.absence .reason) { color: #665127; }
html[data-theme="light"] :is(.status.st-done, .tag.shared) { background: #d7f2e5; color: #125b3e; }
html[data-theme="light"] .status.st-inprogress { background: #e1ecff; color: #173d79; }
html[data-theme="light"] :is(.status.st-queue, .tag.title-only) { background: #edf2f8; color: #34445c; border-color: #a7b6ca; }
html[data-theme="light"] :is(.tag.overdue, .tag.conflict) { background: #ffe7eb; color: #9f233b; border-color: #c65369; }
html[data-theme="light"] .tag.risk { background: #fff1c6; color: #77440b; border-color: #ba7e20; }
html[data-theme="light"] .est { border-color: #a7b6ca; color: #455871; }
html[data-theme="light"] .row-actions { background: #fff; box-shadow: -10px 0 8px #fff; }
html[data-theme="light"] :is(.board-col, .dash-controls, .dash-add, .flow-filters) { background: #f3f6fa; border-color: #ccd6e3; }
html[data-theme="light"] :is(.board-col-head, .dash-widget-head h3, .flow-card h4, .flow-compare h3) { color: #29405f; }
html[data-theme="light"] :is(.board-card, .dash-widget, .flow-card, .flow-compare, .empty-state) { background: #fff; border-color: #ccd6e3; color: #17233b; }
html[data-theme="light"] :is(.widget-name, .dash-duo span, .dash-tql, .flow-card p, .flow-compare p, .flow-filters label, .flow-compare label, .dash-filter-help, .empty-state p) { color: #455871; }
html[data-theme="light"] :is(.widget-value, .flow-card strong, .flow-compare strong) { color: #17233b; }
html[data-theme="light"] .dash-bar-track { background: #e2eaf4; }
html[data-theme="light"] .dash-bar-track i { background: #3a6fc3; }
html[data-theme="light"] .flow-metrics { border-color: #ccd6e3; }
html[data-theme="light"] :is(.flow-source, .flow-audit, .dash-share-box) { background: #edf2fb; border-color: #a7b6ca; color: #34445c; }
html[data-theme="light"] .dir-table th { background: #e8eef7; border-color: #c5cfdd; color: #29405f; }
html[data-theme="light"] .dir-table td { background: #fff; color: #17233b; border-color: #dce3ed; }
html[data-theme="light"] .dir-table tr:nth-child(even) td { background: #f7f9fc; }
html[data-theme="light"] .dir-table tr:hover td { background: #eaf1ff; }
html[data-theme="light"] :is(.dir-profile, .dependency-link) { color: #2454bd; }
html[data-theme="light"] .dependency-link:hover { color: #1c4195; background: #eaf1ff; }
html[data-theme="light"] .hm-person { color: #17233b; background: #fff; }
html[data-theme="light"] .hm-row:not(.hm-head):hover .hm-person { background: #eaf1ff; }
html[data-theme="light"] :is(.hm-row.hm-head, .hm-total) { color: #455871; }
html[data-theme="light"] .hm-cell.hm-active { background: #157a52; color: #fff; }
html[data-theme="light"] .hm-cell.hm-epic { background: #c8edda; color: #125b3e; }
html[data-theme="light"] .hm-cell.hm-idle { background: #edf1f6; color: #53647b; }
html[data-theme="light"] .hm-cell.hm-absent { background: #fff1c6; color: #77440b; }
html[data-theme="light"] .hm-cell.hm-out { background: #dce3ed; color: #455871; }
html[data-theme="light"] :is(#card-drawer, #side-panel, #profile-pop, #snapshot-pop, #risks-panel, #history-panel, .settings-content, #views, .colpop, .legend-entries, .selection-diagnostics > div, .date-editor) { color: #17233b; background: #fff; border-color: #a7b6ca; box-shadow: 0 8px 28px #17233b26; }
html[data-theme="light"] :is(.card-tab, .card-grid, .card-body, .hist-entry, .settings-content legend, .view-picker summary) { color: #34445c; }
html[data-theme="light"] .card-tab.active { color: #2454bd; border-bottom-color: #2454bd; }
html[data-theme="light"] .settings-content fieldset { border-color: #ccd6e3; }
html[data-theme="light"] :is(.view-picker summary, .workspace-settings[open] > summary) { border-color: #a7b6ca; }
html[data-theme="light"] :is(.workspace-settings[open] > summary, #views .view-btn:hover) { background: #eaf1ff; }
html[data-theme="light"] :is(.workspace-settings summary::after, .view-picker summary::after, .selection-diagnostics > summary) { color: #455871; }
html[data-theme="light"] :is(.process-note, #shift-preview) { background: #eaf1ff; border-color: #8faadb; color: #29405f; }
html[data-theme="light"] .process-note strong { color: #1c4195; }
html[data-theme="light"] .settings-content .process-note { background: transparent; }
html[data-theme="light"] :is(#hint-pop, #hint-disclosure, .drag-date-hint) { background: #eaf1ff; color: #17233b; border-color: #8faadb; }
html[data-theme="light"] :is(.hint-head, .hint-text, #hint-disclosure > summary) { color: #34445c; }
html[data-theme="light"] .today-line span { background: #fff; color: #b6273a; }
html[data-theme="light"] :is(.toggle-critical, #statusline .bad, td.bad, .bad) { color: #b6273a; }
html[data-theme="light"] :is(.footnote, #showmode-banner, .frozen-banner, #toggle-risks) { background: #fff5dc; color: #77440b; border-color: #ba7e20; }
html[data-theme="light"] :is(.legend, .audit-summary, .frozen-sheet) { color: #455871; }
html[data-theme="light"] .trans-cols .frozen tr:first-child td { background: #e8eef7; }
html[data-theme="light"] :is(.trans-table-scroll, .frozen-sheet) { scrollbar-color: #8798b0 #edf2f8; }
html[data-theme="light"] :is(.dash-load-table th, .dash-load-table td) { border-color: #ccd6e3; }
html[data-theme="light"] .dash-load-table th:first-child { background: #e8eef7; }
html[data-theme="light"] .dash-load-normal { background: #d7f2e5; color: #125b3e; }
html[data-theme="light"] .dash-load-full { background: #fff1c6; color: #77440b; }
html[data-theme="light"] .dash-load-overload { background: #ffe1ca; color: #8f3d10; }
html[data-theme="light"] .dash-load-absent { background: #e8eef7; color: #34445c; }
html[data-theme="light"] :is(.cnt, .cnt.load-cell.has) { color: #34445c; }
html[data-theme="light"] .cnt.zero { color: #63738a; }
html[data-theme="light"] .cnt.load-cell.overload { background: #ffe7eb; color: #9f233b; }
html[data-theme="light"] .cnt.load-cell.zero-norm { background: #fff1c6; color: #77440b; }
html[data-theme="light"] .suite-header .appswitch-menu { background: #fff; border-color: #a7b6ca; box-shadow: 0 12px 32px #17233b26; }
html[data-theme="light"] .suite-header :is(.appswitch-trigger:hover, .appswitch[open] > summary, .suite-account-trigger:hover, .suite-account-trigger[aria-expanded="true"]) { background: #edf2f8; border-color: #ccd6e3; }
html[data-theme="light"] .suite-header .appswitch-item { color: #17233b; }
html[data-theme="light"] .suite-header .appswitch-item:hover { background: #edf2f8; }
html[data-theme="light"] .suite-header .appswitch-item[aria-current] { background: #e1ecff; box-shadow: inset 3px 0 #2454bd; }
html[data-theme="light"] .suite-header :is(.appswitch-title, .appswitch-desc, .appswitch-chevron) { color: #53647b; }
html[data-theme="light"] .suite-account-link { color: #2454bd; border-color: #ccd6e3; }

/* State labels retain semantic contrast in both palettes. */
html[data-theme="dark"] :is(.ok, td.ok, #statusline .ok) { color: #a3efd1; }
html[data-theme="dark"] :is(.bad, td.bad, #statusline .bad) { color: #ffabbc; }
html[data-theme="dark"] .audit-summary.ok { background: #173f38; color: #a3efd1; }
html[data-theme="dark"] .audit-summary.warn { background: #5b3b1d; color: #ffe0a1; }

html[data-motion="reduced"],
html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html[data-motion="full"] button { transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
html[data-motion="full"] :is(#card-drawer, #side-panel) { transition: transform .18s ease; }
html[data-motion="full"] #toast { transition: opacity .2s ease, transform .2s ease; }

/* Shared Enterprise controls. Values mirror Taska styles/tokens.css and
   YourWiki enterprise.css, with compact sizing for a timeline workspace. */
html[data-theme] {
  --color-primary: #0c5cab;
  --color-secondary: #094f96;
  --color-surface: #f5f7fb;
  --color-surface-raised: #fff;
  --color-surface-subtle: #edf1f7;
  --color-surface-hover: #edf1f7;
  --color-text: #18181b;
  --color-text-secondary: #52525b;
  --color-border: #d9dee8;
  --color-border-strong: #838b99;
  --color-focus: #0c5cab;
  --color-primary-ink: #0a529b;
  --color-primary-muted: #e8f0fb;
  --color-success: #176b46;
  --color-success-muted: #eaf8f0;
  --color-warning: #8a4b08;
  --color-warning-muted: #fff7e8;
  --color-danger: #b42332;
  --color-danger-muted: #fff0f1;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-panel: 0 2px 4px #1c355008;
  --shadow-float: 0 16px 48px #1c355023, 0 2px 8px #1c355012;
  --duration-fast: 140ms;
  --ease-standard: cubic-bezier(.2, 0, 0, 1);
  --font-ui: 'IBM Plex Sans', system-ui, sans-serif;
  --ui-ink: var(--color-text);
  --ui-muted: var(--color-text-secondary);
  --ui-line: var(--color-border);
  --ui-surface: var(--color-surface-raised);
  --ui-canvas: var(--color-surface);
  --ui-blue: var(--color-primary);
  --ui-blue-dark: var(--color-secondary);
  --ui-blue-soft: var(--color-primary-muted);
}
html[data-theme="dark"] {
  --color-secondary: #0e68bd;
  --color-surface: #09090b;
  --color-surface-raised: #111318;
  --color-surface-subtle: #0c0e12;
  --color-surface-hover: #191c23;
  --color-text: #fafafa;
  --color-text-secondary: #a6adbc;
  --color-border: #2b303c;
  --color-border-strong: #687386;
  --color-focus: #8fc5ff;
  --color-primary-ink: #8fc5ff;
  --color-primary-muted: #14283f;
  --color-success: #72d7a4;
  --color-success-muted: #112c23;
  --color-warning: #f6c77e;
  --color-warning-muted: #302616;
  --color-danger: #ffb2b8;
  --color-danger-muted: #341c24;
  --shadow-panel: 0 2px 4px #0003;
  --shadow-float: 0 20px 56px #0007, 0 2px 8px #0003;
}
html[data-theme] body { font-family: var(--font-ui); color: var(--color-text); background: var(--color-surface); -webkit-font-smoothing: antialiased; }
html[data-theme] :is(h1, .screen-head h2, .brand-name, .empty-state h2, .widget-value, .flow-card strong, .flow-compare strong) { color: var(--color-text); }
html[data-theme] :is(.topbar, .suite-header, #gantt-wrap, #board-wrap, #screen-wrap, .dir-scroll, .hm-scroll, .labels) { color: var(--color-text); background: var(--color-surface-raised); border-color: var(--color-border); }
html[data-theme] :is(.workspace-header, .title-row, .flow-metrics, .g-track-row, .calendar-column) { border-color: var(--color-border); }
html[data-theme] :is(.tool-toolbar, .gantt-header, .g-label.head, .g-label.group, .g-label.section, .g-track-row.section, .board-col, .dash-controls, .dash-add, .flow-filters) { color: var(--color-text); background: var(--color-surface-subtle); border-color: var(--color-border); }
html[data-theme] :is(.g-label, .g-label.absent-count, .hm-person, .board-card, .dash-widget, .flow-card, .flow-compare, .empty-state) { color: var(--color-text); background: var(--color-surface-raised); border-color: var(--color-border); }
html[data-theme] :is(.g-label.group, .g-label.section) { background: var(--color-surface-subtle); }
html[data-theme] :is(.g-label:hover, .g-label.drop-into, .g-label.search-match, .hm-row:not(.hm-head):hover .hm-person) { background: var(--color-primary-muted); }
html[data-theme] :is(.g-label .title, .task-primary .title, .board-col-head, .dash-widget-head h3, .flow-card h4, .flow-compare h3, .card-grid, .card-body, .hist-entry) { color: var(--color-text); }
html[data-theme] :is(.crumbs, .page-eyebrow, .workspace-status, .workspace-context, .muted, .g-label .muted, .mask, .task-secondary .owner, .widget-name, .dash-duo span, .dash-tql, .flow-card p, .flow-compare p, .flow-filters label, .flow-compare label, .dash-filter-help, .empty-state p, .hm-row.hm-head, .hm-total, .gantt-search output, .gantt-legend, .tier-cell) { color: var(--color-text-secondary); }
html[data-theme] :is(.g-label .key, .task-primary .key, .dir-profile, .dependency-link, .selection-diagnostics > summary) { color: var(--color-primary-ink); }
html[data-theme] .tier-cell.top { color: var(--color-text); border-color: var(--color-border); }
html[data-theme] :is(.tier-cell.weekend, .weekend-bg) { background: var(--color-surface-subtle); }

html[data-theme] :is(.chip-btn, .view-btn, .row-action, .add-btn) {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  color: var(--color-text);
  font: 500 13px/1.3 var(--font-ui);
  box-shadow: var(--shadow-panel);
  touch-action: manipulation;
}
html[data-theme] :is(.chip-btn, .view-btn, .row-action, .add-btn):hover:not(:disabled) { color: var(--color-text); background: var(--color-primary-muted); border-color: var(--color-primary-ink); box-shadow: 0 0 0 1px var(--color-border-strong); }
html[data-theme] :is(.chip-btn, .view-btn):active:not(:disabled) { background: var(--color-surface-subtle); box-shadow: inset 0 2px 4px #0002; }
html[data-theme] :is(.chip-btn, .view-btn):disabled { color: var(--color-text-secondary); border-color: var(--color-border); background: var(--color-surface-subtle); box-shadow: none; opacity: .7; cursor: not-allowed; }
html[data-theme] :is(.chip-btn.primary, .hint-btns .chip-btn.primary, .view-btn.active) { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
html[data-theme] :is(.chip-btn.primary, .hint-btns .chip-btn.primary, .view-btn.active):hover:not(:disabled) { background: var(--color-secondary); border-color: var(--color-secondary); color: #fff; }
html[data-theme] :is(.chip-btn.active, .view-tabs .chip-btn.active, #views .view-btn.active) { background: var(--color-primary-muted); border-color: var(--color-primary-ink); color: var(--color-primary-ink); box-shadow: none; }
html[data-theme] .view-tabs .chip-btn { min-height: 36px; border-color: transparent; background: transparent; color: var(--color-text-secondary); box-shadow: none; }
html[data-theme] .view-tabs .chip-btn.active { border-color: var(--color-border); background: var(--color-primary-muted); color: var(--color-primary-ink); }
html[data-theme] .zoom-strip .chip-btn { min-width: 32px; border-radius: 0; }
html[data-theme] .zoom-strip .chip-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
html[data-theme] .zoom-strip .chip-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
html[data-theme] .row-action { min-height: 24px; padding: 2px 6px; font-size: 12px; }
html[data-theme] .add-btn { border-style: dashed; }
html[data-theme] .workspace-footer .chip-btn { min-height: 28px; padding-block: 4px; }
html[data-theme] body :is(select, input:not([type="checkbox"]):not([type="radio"]), textarea) { border-color: var(--color-border-strong); background: var(--color-surface-subtle); color: var(--color-text); border-radius: var(--radius-sm); font-family: var(--font-ui); font-size: 13px; line-height: 1.4; }
html[data-theme] body :is(input, textarea)::placeholder { color: var(--color-text-secondary); }
html[data-theme] :is(select, input, textarea):focus { border-color: var(--color-focus); }
html[data-theme] :is(button, input, select, textarea, a, summary):focus-visible { outline-color: var(--color-focus); }
html[data-theme] :is(.dash-controls, .dash-add, .flow-filters, .flow-compare, .profile-preference) :is(input:not([type="checkbox"]), select) { min-height: 36px; padding: 6px 10px; }
html[data-theme] :is(.dash-controls, .dash-add, .flow-filters, .flow-compare) .chip-btn { min-height: 36px; }
html[data-theme] :is(#card-drawer, #side-panel, #profile-pop, #snapshot-pop, #risks-panel, #history-panel, .settings-content, #views, .colpop, .legend-entries, .selection-diagnostics > div, .date-editor, .suite-header .appswitch-menu) { color: var(--color-text); background: var(--color-surface-raised); border-color: var(--color-border); box-shadow: var(--shadow-float); border-radius: var(--radius-md); }
html[data-theme] .suite-header :is(.appswitch-item, .appswitch-trigger, .suite-account-trigger) { color: var(--color-text); border-radius: var(--radius-sm); }
html[data-theme] .suite-header :is(.appswitch-title, .appswitch-desc, .appswitch-chevron) { color: var(--color-text-secondary); }
html[data-theme] .suite-header :is(.appswitch-trigger:hover, .appswitch[open] > summary, .suite-account-trigger:hover, .suite-account-trigger[aria-expanded="true"], .appswitch-item:hover) { background: var(--color-surface-hover); border-color: var(--color-border); }
html[data-theme] .suite-header .appswitch-item[aria-current] { background: var(--color-primary-muted); box-shadow: inset 3px 0 var(--color-primary-ink); }
html[data-theme] .suite-account-link { color: var(--color-primary-ink); border-color: var(--color-border); }
.suite-account { position: relative; }
.suite-account #profile-pop { position: absolute; top: calc(100% + 4px); right: 0; max-height: calc(100dvh - 70px); }
.suite-account-identity { padding: 4px 8px 12px; border-bottom: 1px solid var(--ui-line); }
.suite-account-identity strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.suite-account #profile-pop .suite-account-link { margin-bottom: 0; border-bottom: 0; }
@media (max-width: 960px) { .suite-account #profile-pop { max-height: calc(100dvh - 122px); } }
html[data-theme] :is(.suite-avatar, .brand-mark) { background: var(--color-primary); color: #fff; }
html[data-theme] .settings-content fieldset { border-color: var(--color-border); }
html[data-theme] :is(.settings-content legend, .view-picker summary, .workspace-settings summary::after, .view-picker summary::after) { color: var(--color-text-secondary); }
html[data-theme] :is(.view-picker summary, .workspace-settings[open] > summary) { border-color: var(--color-border-strong); border-radius: var(--radius-sm); }
html[data-theme] :is(.workspace-settings[open] > summary, #views .view-btn:hover) { background: var(--color-primary-muted); }
html[data-theme] :is(.dir-table th, .dash-load-table th:first-child, .trans-cols .frozen tr:first-child td) { color: var(--color-text); background: var(--color-surface-subtle); border-color: var(--color-border); }
html[data-theme] .dir-table td { color: var(--color-text); background: var(--color-surface-raised); border-color: var(--color-border); }
html[data-theme] .dir-table tr:nth-child(even) td { background: var(--color-surface); }
html[data-theme] .dir-table tr:hover td { background: var(--color-primary-muted); }
html[data-theme] :is(.flow-source, .flow-audit, .dash-share-box, #statusline code, .dash-filter-help code, .process-note, #shift-preview, #hint-pop, #hint-disclosure, .drag-date-hint) { color: var(--color-text); background: var(--color-primary-muted); border-color: var(--color-border-strong); }
html[data-theme] :is(.hint-head, .hint-text, #hint-disclosure > summary, .process-note strong) { color: var(--color-text); }
html[data-theme] :is(#showmode-banner, .frozen-banner, #toggle-risks, .audit-summary.warn) { color: var(--color-warning); background: var(--color-warning-muted); border-color: var(--color-warning); }
html[data-theme] :is(.ok, td.ok, #statusline .ok) { color: var(--color-success); }
html[data-theme] :is(.bad, td.bad, #statusline .bad, .toggle-critical) { color: var(--color-danger); }
html[data-theme] .audit-summary.ok { color: var(--color-success); background: var(--color-success-muted); }
html[data-theme] .settings-content .process-note { background: transparent; }
html[data-theme] .card-tab.active { color: var(--color-primary-ink); border-color: var(--color-primary-ink); }
html[data-motion="full"] button { transition: background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard); }
@media (pointer: coarse) {
  html[data-theme] :is(.chip-btn, .view-btn, .suite-header .view-tabs .chip-btn),
  html[data-theme] body :is(select, input:not([type="checkbox"]):not([type="radio"])) { min-height: 44px; }
}
@media (max-width: 700px) {
  html[data-theme] .zoom-strip .chip-btn { padding-inline: 6px; font-size: 12px; }
  html[data-theme] .view-tabs .chip-btn { padding-inline: 7px; font-size: 12px; }
}
