/* Shared workbench palette, informed by Tabler's light and dark themes.
   https://github.com/tabler/tabler/tree/main/core/scss */
:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --paper: #fff;
  --ink: #182433;
  --muted: #52647a;
  --line: #dce3eb;
  --accent: #206bc4;
  --accent-hover: #18579f;
  --accent-contrast: #fff;
  --accent-soft: #eaf2fb;
  --chart-fill: #7ca1cb;
  --soft: #edf3fb;
  --surface-muted: #f4f6fa;
  --control-border: #cdd7e2;
  --green: #18794e;
  --red: #b83942;
  --danger: var(--red);
  --radius: 6px;
  --panel-radius: 8px;
  --sidebar-width: 224px;
  --sidebar-inset: 14px;
  --bar-height: 56px;
}

html { background: var(--bg); }
body { color: var(--ink); background: var(--bg); font-size: 1rem; line-height: 1.6; }
body.app-page { min-height: 100dvh; background: var(--bg); }
h1, .page-heading h1 { color: var(--ink); font-size: 26px; font-weight: 550; line-height: 1.35; letter-spacing: -.025em; }
h2 { color: var(--ink); font-size: 17px; font-weight: 550; line-height: 1.45; }
h3 { color: var(--ink); font-size: 1rem; font-weight: 550; line-height: 1.5; }
p, small, label, legend, summary, button, input, select, textarea, .hint, .metadata, .tag, .notice,
body :is(table, td, th, pre, code, .content-text, .empty, .skip) { font-size: 1rem; }
.muted, .hint, .metadata, .page-heading p, .stat-note, .stat-label, .nav-caption, .workspace-label { color: var(--muted); }
a { color: #222; text-decoration-color: #a0a0a0; }
a:hover { color: #000; }

button, .button-link {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  font-size: 1rem;
  font-weight: 450;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
button:hover:not(:disabled), .button-link:hover { color: var(--ink); border-color: var(--muted); background: var(--surface-muted); }
button.primary, .primary, .button-link.primary {
  color: var(--accent-contrast);
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: none;
}
button.primary:hover:not(:disabled), .button-link.primary:hover { color: var(--accent-contrast); border-color: var(--accent-hover); background: var(--accent-hover); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input:not([type=checkbox]):not([type=radio]), select, textarea {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  box-shadow: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }

.app-page { padding-top: 58px; }
.app-sidebar {
  padding: 0 var(--sidebar-inset) 14px;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: none;
}
.sidebar-heading {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: var(--bar-height);
  margin: 0 calc(-1 * var(--sidebar-inset)) 10px;
  padding-inline: calc(var(--sidebar-inset) + 10px) var(--sidebar-inset);
  border-bottom: 1px solid var(--line);
}
.app-brand {
  gap: 9px;
  min-height: 40px;
  padding: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: .04em;
  text-decoration: none;
}
.app-brand .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--accent-contrast, var(--paper));
  background: var(--accent);
}
.brand-mark svg { width: 18px; height: 18px; }
.nav-caption { display: none; }
.app-nav { margin: 0; padding: 0; }
.nav-link {
  min-height: 39px;
  margin: 1px 0;
  padding: 8px 11px;
  border-radius: 3px;
  color: #444;
  font-size: 1rem;
  font-weight: 450;
}
.nav-link:hover { background: var(--surface-muted); color: var(--ink); }
.nav-link[aria-current=page] {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 var(--accent);
  color: var(--accent);
  font-weight: 550;
}
.sidebar-bottom { gap: 5px; padding: 13px 7px 0; border-top-color: var(--line); }
.sidebar-account { gap: 9px; color: #222; }
.sidebar-account strong { max-width: 128px; font-size: 1rem; font-weight: 550; }
.sidebar-account small { color: var(--muted); font-size: 1rem; }
.user-avatar { width: 32px; height: 32px; border-radius: 3px; background: #eee; color: #222; font-size: 1rem; }
.icon-button { min-width: 34px; min-height: 34px; color: #555; }
.nav-settings { margin-top: 8px; border: 0; }
.nav-settings > summary { min-height: 36px; padding: 8px 11px; color: #666; font-size: 1rem; }
.nav-settings .nav-link { margin: 1px 0; }
.sidebar-heading .nav-close, .app-topbar .mobile-menu {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
}
.sidebar-heading .nav-close { display: none; }
.nav-close svg, .mobile-menu svg { width: 20px; height: 20px; }
body.app-page > .nav-backdrop,
body.app-page > .nav-backdrop:hover:not(:disabled) { background: rgb(15 23 42 / 32%); }
.app-topbar {
  height: 58px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
}
.app-breadcrumb { display: none; gap: 0; color: var(--ink); font-size: 1rem; }
.app-breadcrumb strong { color: var(--ink); font-size: 1rem; font-weight: 500; }
.workspace-label { display: none !important; }
.skip-link { border-color: #111; }
.app-page .collection-shell, .app-page .admin-shell, .overview-shell,
.app-page .shell, .app-page .storage-main {
  max-width: 1440px;
  padding: 28px 34px;
  margin: 0 auto;
}
.app-page > header:not(.app-topbar):not(.topbar) { padding: 28px 34px 0; }
.app-page > main:not(.collection-shell):not(.overview-shell):not(.admin-shell) { max-width: 1440px; }
.page-heading { margin-bottom: 23px; align-items: center; }
.page-heading h1 { margin-bottom: 0; }
.heading-actions { gap: 9px; }
.card, .panel, .stat-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}
.card { padding: 21px; }
.stat-grid { gap: 0; margin-bottom: 22px; border: 1px solid var(--line); background: #fff; }
.stat-card { padding: 17px 18px; border: 0; border-right: 1px solid var(--line); }
.stat-card:last-child { border-right: 0; }
.stat-label { color: #666; font-size: 1rem; }
.stat-label svg { color: #888; }
.stat-value { margin: 8px 0 2px; color: #111; font-size: 29px; font-weight: 500; letter-spacing: -.04em; }
.stat-note { color: #777; font-size: 1rem; }
.section-heading { margin-bottom: 15px; }
.section-heading h2 { font-size: 16px; }
.text-link { color: #333; font-size: 1rem; }
.tag, .status-badge {
  border: 1px solid #e2e2e1;
  border-radius: 3px;
  background: #f5f5f4;
  color: #555;
  font-size: 1rem;
}
.status-badge[data-state] { border-color: #e2e2e1; background: #f5f5f4; color: #555; }
.status-dot { background: #555; }
.notice { border: 1px solid #e2e2e1; border-radius: 3px; background: #f7f7f6; color: #444; }
.empty-state { color: #666; }
.empty-state .empty-icon { border-radius: 3px; background: #f1f1f0; color: #555; }
.empty-state h2, .app-page .workspace .empty h1 { color: #333; }
.statistics-help { margin: -6px 0 22px; }
.statistics-help summary { color: #444; font-size: 1rem; }
.app-page #message:not(:empty) { border-color: #ddd; border-radius: 3px; background: #f5f5f4; color: #333; }
.app-page #message.error { border-color: #ccc; background: #f2f2f1; color: #222; }
.app-page .admin-tabs button[aria-selected=true] { border-bottom-color: #111; color: #111; }
.app-page .admin-tabs button { font-size: 1rem; }
.app-page .candidate { border-bottom-color: #e7e7e6; }
.app-page .workspace { border-radius: 4px; border-color: var(--line); }
.app-page .task-column { background: #fafafa; }
.app-page .task-item { border-radius: 3px; }
.app-page .task-item[aria-current=true] { border-color: #ddd; background: #f2f2f1; }
.app-page .account-sidebar:before { color: #171717; font-size: 25px; font-weight: 550; letter-spacing: -.03em; }
.app-page #account-sections button { color: #666; font-size: 1rem; }
.app-page #account-sections button[aria-current=page] { border-bottom-color: #111; color: #111; }
.app-page .users-table th { background: #f6f6f5; color: #444; }
.app-page .users-table td { border-color: #e8e8e7; }

.collection-page { --accent: inherit; --soft: inherit; --line: inherit; background: var(--bg) !important; }
.collection-page .page-heading p, .collection-page .stat-note { display: none; }
.collection-page .page-heading { margin-bottom: 18px; }
.collection-page .collection-shell { max-width: 1440px; padding-top: 26px; }
.collection-page .heading-actions button { min-height: 38px; padding: 8px 13px; border-radius: 4px; box-shadow: none; }
.collection-page #open-create, body.collection-page #open-create,
.collection-page .primary, .collection-page button.primary { border-color: #111; background: #111; color: #fff; box-shadow: none; }
.collection-page .primary:hover:not(:disabled) { border-color: #333; background: #333; }
.collection-page .stat-card { min-height: 124px; grid-template-columns: 38px minmax(0,1fr); gap: 4px 12px; padding: 15px; border-radius: 0; box-shadow: none; }
.collection-page .stat-glyph, .collection-page [data-stat] .stat-glyph { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 3px; background: #f2f2f1; color: #444; }
.collection-page .stat-glyph svg { width: 18px; height: 18px; }
.collection-page [data-stat=task] .stat-glyph, .collection-page [data-stat=users] .stat-glyph { background: #f2f2f1; color: #444; }
.collection-page .stat-value { grid-column: 2; margin: 0; font-size: 28px; }
.collection-page .stat-label svg { color: #777; }
.collection-page .job-platform, .collection-page .job-platform[data-platform] { border: 1px solid #e4e4e3; border-radius: 3px; background: #f2f2f1; color: #444; }
.collection-page .job-row:hover, .collection-page .job-row[aria-current=true] { background: #f5f5f4; border-color: #e1e1e0; }
.collection-page .collection-service #capability:before { background: #555; }
.collection-page .status-badge, .collection-page .link-state { border: 1px solid #e2e2e1; border-radius: 3px; background: #f5f5f4; color: #444; }
.collection-page .batch-intro > p, .collection-page #jobs .empty-state > p { display: none; }
.collection-page .link-preview, .collection-page .link-panel .operation-option { border-color: var(--line); border-radius: 4px; }
.collection-page .link-panel .operation-option:has(input:checked) { border-color: #777; background: #f7f7f6; }
.collection-page .link-service-message { border-color: var(--line); border-radius: 4px; background: #f7f7f6; color: #444; }
.collection-page .range-dialog { border-radius: 4px; }
.collection-page .range-dialog::backdrop { background: #0006; }

.task-center-page { --task-green: var(--accent); --task-soft: var(--accent-soft); --accent: inherit; --soft: inherit; --ink: inherit; --muted: inherit; --line: inherit; background: var(--bg) !important; }
.task-center-page .task-center { max-width: 1440px; margin: 0 auto; padding: 28px 34px; }
.task-center-page .queue-overview, .task-center-page .queue-work { border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: none; }
.task-center-page .queue-progress-track { background: #ededec; }
.task-center-page .queue-progress-track > span, .task-center-page .queue-progress-fill { background: #222; }
.task-center-page .queue-filters button[aria-pressed=true] { border-color: #111; background: #111; color: #fff; }
.task-center-page .queue-filters button { border-radius: 3px; }
.task-center-page .queue-table th { background: #f6f6f5; color: #444; }
.task-center-page .queue-table td { border-color: #e8e8e7; }
.task-center-page .queue-counts > * { border-color: var(--line); border-radius: 3px; background: #fff; }

.ai-workspace { background: var(--bg) !important; }
.ai-workspace .ai-workspace, .ai-workspace main { max-width: 1440px; margin-right: auto; margin-left: auto; }
.ai-workspace .ai-page-header { padding: 24px 34px 10px !important; }
.ai-workspace .ai-page-header h1 { margin: 0; color: #171717; }
.ai-workspace .ai-section-nav { border-color: var(--line); background: #fff; }
.ai-workspace .ai-section-nav button[aria-current], .ai-workspace .ai-section-nav button.active { border-color: #111; color: #111; }
.ai-workspace .ai-step-card, .ai-workspace .ai-overview, .ai-workspace .ai-method-note,
.ai-workspace .ai-analysis-summary, .ai-workspace .ai-selected-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}
.ai-workspace .ai-step-number { display: none; }
.ai-workspace .ai-step-heading { gap: 0; }
.ai-workspace .ai-source-card { border-color: var(--line); border-radius: 4px; background: #fafafa; color: #222; }
.ai-workspace .ai-source-card:hover, .ai-workspace .ai-source-card[aria-pressed=true] { border-color: #888; background: #f4f4f3; }
.ai-workspace .ai-method-note { border-left: 2px solid #555; background: #f7f7f6; }
.ai-workspace .ai-pending-approval, .ai-workspace .notice { border-color: var(--line); border-radius: 3px; background: #f7f7f6; color: #444; }
.ai-workspace .ai-danger { border-color: #d8d8d7; background: #f6f6f5; color: #333; }
.ai-workspace dialog { border-color: var(--line); border-radius: 4px; box-shadow: 0 18px 60px #0002; }
.ai-workspace dialog::backdrop { background: #0006; backdrop-filter: none; }

.expert-audit-page { background: var(--bg) !important; }
.expert-audit-page .expert-audit-shell { max-width: 1440px; }
.expert-audit-page .audit-columns .card, .expert-audit-page .audit-create-card,
.expert-audit-page .audit-dashboard, .expert-audit-page .audit-batches-card { border-color: var(--line); border-radius: 4px; box-shadow: none; }
.expert-audit-page .audit-create-card .primary, .expert-audit-page #create { border-color: #111; background: #111; box-shadow: none; color: #fff; }
.expert-audit-page .audit-create-card #create:hover:not(:disabled) { background: #333; }
.expert-audit-page .audit-form-notice, .expert-audit-page .audit-pool-notice { border: 1px solid var(--line); border-radius: 3px; background: #f7f7f6; color: #444; }
.expert-audit-page .audit-form-notice svg { color: #555; }
.expert-audit-page .audit-stat, .expert-audit-page .audit-stat:nth-child(n) { --stat-color: #333; --stat-icon-bg: #f1f1f0; --stat-bg: #fff; --stat-border: #e4e4e3; border-radius: 3px; background: #fff; }
.expert-audit-page .audit-field-label svg { color: #444; background: #f1f1f0; }
.expert-audit-page .verdict-badge[data-verdict] { border: 1px solid var(--line); border-radius: 3px; background: #f5f5f4; color: #444; }
.expert-audit-page .audit-metrics th { background: #f6f6f5; color: #444; }

.light-label-page { background: var(--bg) !important; }
.light-label-page .light-card, .light-label-page .light-list { border-color: var(--line); border-radius: 4px; box-shadow: none; }
.light-label-page .light-stats li, .light-label-page .light-checklist { border-color: var(--line); border-radius: 3px; background: #fff; }
.light-label-page .light-option { border-color: #ddd; border-radius: 3px; }
.light-label-page button.light-option[aria-pressed=true], .light-label-page button.light-option[aria-pressed=true]:hover:not(:disabled) { border-color: #111; background: #111; color: #fff; }
.light-label-page .primary { border-color: #111; background: #111; color: #fff; }
.light-label-page main :is(p, th, td) { font-size: 16px; }
.light-label-page .notice { border-color: var(--line); border-radius: 3px; background: #f7f7f6; color: #444; }
.light-label-page #create-message:not(:empty) { border-color: var(--line); border-radius: 3px; background: #f5f5f4; color: #333; }
.light-label-page #create-message.error { border-color: #ccc; background: #f2f2f1; color: #222; }
.light-label-page table th { border-color: var(--line); background: #f6f6f5; color: #444; }
.light-label-page table td { border-color: var(--line); color: #333; }
.light-label-page table tbody th { background: #fafaf9; }

.material-library-page { --ink: inherit; --muted: inherit; --accent: inherit; --soft: inherit; --line: inherit; --bg: inherit; background: var(--bg) !important; }
.material-library-page .library-statistics { gap: 0; border: 1px solid var(--line); background: #fff; }
.material-library-page .library-stat,
.material-library-page .library-stat[data-kind] { --stat-color: #444; --stat-tint: #f5f5f4; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: #fff; }
.material-library-page .library-stat:last-child { border-right: 0; }
.material-library-page .library-stat-icon { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 3px; background: #f2f2f1; color: #444; }
.material-library-page .library-stat-icon svg { width: 18px; height: 18px; }
.material-library-page .library-filters { padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.material-library-page .admin-tabs button, .material-library-page .library-view-toggle button { border-radius: 3px; box-shadow: none; }
.material-library-page .admin-tabs [aria-selected=true], .material-library-page .admin-tabs [aria-pressed=true] { border-color: #ddd; border-bottom-color: #111; background: #f5f5f4; color: #111; }
.material-library-page .library-view-toggle [aria-pressed=true] { border-color: #111; background: #111; color: #fff; box-shadow: none; }
.material-library-page .work-detail > .card { border-color: var(--line); border-radius: 4px; box-shadow: none; }
.material-library-page .material-card { border-color: var(--line); border-radius: 4px; box-shadow: none; }
.material-library-page .card-status, .material-library-page .material-state,
.material-library-page .card-tags > span, .material-library-page .card-tags > small { border: 1px solid #e2e2e1; border-radius: 3px; background: #f5f5f4; color: #444; }
.material-library-page .library-selection-bar:has(.selection-tools:not([hidden])) { border-radius: 3px; background: #f6f6f5; }
.material-library-page .library-tools-menu, .material-library-page .material-lightbox { border-radius: 4px; box-shadow: 0 12px 38px #0002; }
.material-library-page .library-tools-menu button { border-radius: 3px; }
.material-library-page .candidate-cover { background: #f1f1f0; }
.material-library-page .material-state[data-state], .material-library-page .card-status { border-color: #e2e2e1; background: #f5f5f4; color: #444; }
.material-library-page .primary, .material-library-page button.primary { border-color: #111; background: #111; color: #fff; box-shadow: none; }
.material-library-page .primary:hover:not(:disabled) { background: #333; }
.material-library-page .admin-tabs button[aria-selected=true], .material-library-page .admin-tabs button[aria-pressed=true] { border-bottom-color: #111; color: #111; }
.material-library-page .library-catalog, .material-library-page .quality-card, .material-library-page .collector-create-card,
.material-library-page .collector-recent-card { border-color: var(--line); border-radius: 4px; box-shadow: none; }
.material-library-page .library-statistics > *, .material-library-page .library-result-bar,
.material-library-page .library-selection-bar, .material-library-page .collector-receipt { border-color: var(--line); border-radius: 3px; background: #f7f7f6; color: #333; }
.material-library-page .library-filters, .material-library-page .library-options { border-color: var(--line); }
.material-library-page .tag, .material-library-page .status-badge, .material-library-page .studio-material-state { border-color: #e2e2e1; border-radius: 3px; background: #f5f5f4; color: #444; }
.material-library-page .library-tools-menu { border-color: var(--line); border-radius: 4px; box-shadow: 0 10px 30px #0002; }

.annotation-studio .studio-material-item:hover, .annotation-studio .studio-material-item[aria-current=true] { border-color: #aaa; background: #f5f5f4; box-shadow: inset 2px 0 #111; }
.annotation-studio .studio-material-state[data-state] { border: 1px solid var(--line); border-radius: 3px; background: #f4f4f3; color: #444; }
.annotation-studio :is(.studio-welcome, .studio-insight-card, .studio-start-tip, .studio-guide-cards > *, .studio-paper) { border-color: var(--line); border-radius: 4px; background: #fff; box-shadow: none; }
.annotation-studio .studio-illustration, .annotation-studio .paper-dots { display: none; }
.annotation-studio .workspace { border-color: var(--line); border-radius: 4px; }

.storage-main { color: var(--ink); }
.storage-main .card { margin-bottom: 15px; padding: 20px; border-color: var(--line); border-radius: 4px; box-shadow: none; }
.storage-main h2 { font-size: 16px; }
.storage-main .hint { color: #666; font-size: 1rem; }
.storage-main .host-key-box, .storage-main .directory-list { border-color: var(--line); border-radius: 3px; background: #f7f7f6; }
.storage-main th { background: #f6f6f5; color: #444; }
.storage-main .error { color: #333; }
.storage-main .primary { border-color: #111; background: #111; color: #fff; }

.account-page.app-page:not(.is-signin) #admin-users .team-stat > div > span,
.account-page.app-page:not(.is-signin) #admin-users .team-stat strong,
.account-page.app-page:not(.is-signin) #admin-users .team-stat small { font-size: 1rem; }
.account-page.app-page:not(.is-signin) #admin-users .team-stat strong { font-size: 27px; }
.account-page.app-page:not(.is-signin) #admin-users .team-heading-actions button { min-height: 38px; border-radius: 4px; font-size: 1rem; }
.account-page.app-page:not(.is-signin) #admin-users .users-table .tag,
.account-page.app-page:not(.is-signin) #admin-users .user-state { font-size: 1rem; }

/* Remove marketing-style banners and illustrations while keeping workflow notes. */
.ai-page-header { min-height: 0 !important; padding: 0 0 20px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.ai-page-header p, .ai-hero-art, .ai-step-heading p { display: none !important; }
.audit-hero { display: block !important; min-height: 0 !important; padding: 0 0 20px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.audit-hero-mark, .audit-hero-art, .audit-create-mark { display: none !important; }
.audit-hero h1, .light-hero h1 { color: #171717 !important; font-size: 26px !important; font-weight: 550 !important; letter-spacing: -.025em !important; }
.audit-form-heading p { display: none !important; }
.light-hero { min-height: 0 !important; padding: 0 0 20px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.light-hero p { margin: 5px 0 0; font-size: 1rem; color: #666; }
.data-heading-icon, .data-folder-art, .collector-hero-art, .collector-benefits { display: none !important; }
.collector-hero { min-height: 0 !important; padding: 0 0 17px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.collector-hero h2 { font-size: 20px !important; color: #171717 !important; }
.collector-hero p { margin: 3px 0 0; color: #666 !important; font-size: 1rem !important; }
.collector-columns { gap: 14px !important; }
.collector-card-heading p { display: none !important; }
.storage-heading { margin-bottom: 22px; }
.storage-heading .section-caption { display: none; }
.storage-heading h1 { margin: 0; }
.overview-page { --ink: inherit; --muted: inherit; --accent: inherit; --line: inherit; --paper: inherit; --wash: var(--surface-muted); background: var(--bg); }
.overview-page .overview-shell { padding-top: 29px; }
.overview-page .overview-columns { gap: 14px; }
.overview-page .card { border-radius: 4px; box-shadow: none; }
.overview-page .stat-note { display: none; }
.overview-footer { border: 0; color: #777; }
.account-page.app-page:not(.is-signin) {
  --account-accent: #111;
  --account-muted: #686868;
  --account-border: #e4e4e3;
  --account-paper: #fff;
  --account-bg: #f7f7f6;
  background: var(--bg);
}
.account-page.app-page:not(.is-signin) #admin-users { --team-green: #111; }
.account-page.app-page:not(.is-signin) #admin-users .team-heading h2 { color: #171717; font-size: 25px; font-weight: 550; }
.account-page.app-page:not(.is-signin) #admin-users .team-heading p { display: none; }
.account-page.app-page:not(.is-signin) #admin-users .team-stat,
.account-page.app-page:not(.is-signin) #admin-users .team-stat[data-state] {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}
.account-page.app-page:not(.is-signin) #admin-users .team-stat-icon,
.account-page.app-page:not(.is-signin) #admin-users .team-stat[data-state] .team-stat-icon { background: #f2f2f1; color: #444; border-radius: 3px; }
.account-page.app-page:not(.is-signin) #admin-users .team-stat strong { color: #171717; font-size: 28px; font-weight: 500; }
.account-page.app-page:not(.is-signin) #admin-users .team-stat small { display: none; }
.account-page.app-page:not(.is-signin) #admin-users .team-directory,
.account-page.app-page:not(.is-signin) #admin-users .team-insights { border-color: var(--line); border-radius: 4px; box-shadow: none; }
.account-page.app-page:not(.is-signin) #admin-users .directory-heading { border-color: var(--line); }
.account-page.app-page:not(.is-signin) #admin-users .directory-heading button[aria-selected=true] { border-bottom-color: #111; color: #111; }
.account-page.app-page:not(.is-signin) #admin-users .users-table th { background: #f6f6f5; color: #444; }
.account-page.app-page:not(.is-signin) #admin-users .member-avatar,
.account-page.app-page:not(.is-signin) #admin-users .member-avatar[data-role] { border-radius: 3px; background: #eee; color: #333; box-shadow: none; }
.account-page.app-page:not(.is-signin) #admin-users .users-table .tag,
.account-page.app-page:not(.is-signin) #admin-users .user-state,
.account-page.app-page:not(.is-signin) #admin-users .user-state[data-state] { border: 1px solid #e2e2e1; border-radius: 3px; background: #f5f5f4; color: #444; }
.account-page.app-page:not(.is-signin) #admin-users .user-manage > summary { border-color: #ddd; border-radius: 3px; color: #333; }
.account-page.app-page:not(.is-signin) #admin-users #open-new-user { border-color: #111; border-radius: 4px; background: #111; color: #fff; box-shadow: none; }
.account-page.app-page:not(.is-signin) #admin-users .team-utility { border-color: var(--line); }

.account-page.is-signin { --account-accent: #111; --account-muted: #666; --account-border: #ddd; --account-paper: #fff; --account-bg: #fff; background: #fff; }
.account-page.is-signin .account-header .brand strong { color: #222; font-size: 1rem; font-weight: 550; }
.account-page.is-signin #signin h1 { font-size: 26px; font-weight: 550; letter-spacing: -.03em; }
.account-page.is-signin #signin .btn-primary { --bs-btn-bg: #111; --bs-btn-border-color: #111; --bs-btn-hover-bg: #333; --bs-btn-hover-border-color: #333; }

/* Keep dense workflow pages quiet while preserving their controls and states. */
.task-center-page .task-center { max-width: 1440px; padding: 26px 34px; }
.task-center-page .task-center h1 { color: #171717; font-size: 26px; font-weight: 550; }
.task-center-page .queue-overview, .task-center-page .queue-work { border-color: var(--line); border-radius: 4px; background: #fff; box-shadow: none; }
.task-center-page .queue-count { --stat-color: #444; --stat-soft: #f2f2f1; border-color: transparent; border-radius: 3px; color: #171717; }
.task-center-page .queue-count[data-state] { --stat-color: #444; --stat-soft: #f2f2f1; }
.task-center-page .queue-count[aria-pressed=true] { border-color: #ddd; background: #f7f7f6; }
.task-center-page .count-icon { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 3px; background: #f2f2f1; color: #444; }
.task-center-page .count-icon svg { width: 19px; height: 19px; }
.task-center-page .count-copy strong { color: #171717; font-size: 26px; font-weight: 500; }
.task-center-page .count-copy > span:not(.count-track) { color: #666; }
.task-center-page .count-track { height: 2px; border-radius: 0; background: #ededec; }
.task-center-page .count-track > span { border-radius: 0; background: #555; }
.task-center-page .queue-filters button { border-radius: 0; color: #555; }
.task-center-page .queue-filters button[aria-pressed=true] { border-bottom-color: #111; background: transparent; color: #111; }
.task-center-page #queue-refresh { border-color: #ddd; border-radius: 3px; background: #fff; color: #333; }
.task-center-page .queue-search-row label { color: #555; }
.task-center-page .queue-search > [data-icon] { color: #777; }
.task-center-page .queue-table th { background: #f6f6f5; color: #444; }
.task-center-page .queue-table td { border-color: #e8e8e7; }
.task-center-page .queue-item:hover { background: #fafaf9; }
.task-center-page .queue-task-title { color: #222; }
.task-center-page .queue-task-title:hover { color: #111; }
.task-center-page .queue-task-meta, .task-center-page .queue-workflow, .task-center-page .queue-workflow small,
.task-center-page .queue-index, .task-center-page .queue-date, .task-center-page .queue-scope-cell,
.task-center-page .queue-pagination { color: #777; }
.task-center-page .queue-avatar { border-radius: 3px; background: #f1f1f0; color: #444; }
.task-center-page .queue-item .status-badge, .task-center-page .queue-item .status-badge[data-state] { border: 1px solid var(--line); border-radius: 3px; background: #f5f5f4; color: #444; }
.task-center-page .queue-item .button-link { color: #222; }
.task-center-page :is(a, button, input, select, [tabindex]):focus-visible { outline-color: #333; }
.task-center-page #add-tasks { border-color: #111; border-radius: 4px; background: #111; box-shadow: none; }
.task-center-page .queue-empty h3 { color: #222; }

body.ai-workspace { --ink: inherit; --muted: inherit; --line: inherit; --bg: inherit; --accent: inherit; --soft: inherit; background: var(--bg) !important; }
body.ai-workspace .ai-page-header { padding: 24px 34px 10px !important; }
body.ai-workspace .ai-page-header h1 { color: #171717 !important; font-size: 26px !important; font-weight: 550 !important; letter-spacing: -.025em !important; }
body.ai-workspace .ai-readiness { gap: 8px 20px; color: #555; }
body.ai-workspace .ai-readiness > span { gap: 7px; color: #555; font-size: 1rem; }
body.ai-workspace .ai-readiness > span:before,
body.ai-workspace .ai-readiness > [data-ready=true]:before { width: 7px; height: 7px; content: ''; border: 0; border-radius: 50%; background: #999; box-shadow: none; }
body.ai-workspace .ai-readiness > [data-ready=true]:after { display: none; }
body.ai-workspace .ai-section-nav { gap: 2px; border-color: var(--line); background: #fff; }
body.ai-workspace .ai-section-nav button,
body.ai-workspace .ai-section-nav button:last-child { border: 1px solid transparent; border-radius: 3px; background: transparent; color: #444; box-shadow: none; }
body.ai-workspace .ai-section-nav button:hover { background: #f5f5f4; }
body.ai-workspace .ai-section-nav button[aria-current],
body.ai-workspace .ai-section-nav button.active { border-color: #ddd; border-bottom-color: #111; background: #f7f7f6; color: #111; }
body.ai-workspace .ai-step-card, body.ai-workspace .ai-overview, body.ai-workspace .ai-method-note,
body.ai-workspace .ai-analysis-summary, body.ai-workspace .ai-selected-card { border-color: var(--line); border-radius: 4px; box-shadow: none; }
body.ai-workspace .ai-source-card, body.ai-workspace #setup-action { border: 1px solid var(--line); border-radius: 3px; background: #f7f7f6; color: #222; }
body.ai-workspace .ai-source-card svg, body.ai-workspace #setup-action svg { stroke: #555; }
body.ai-workspace .ai-source-card:hover, body.ai-workspace .ai-source-card[aria-pressed=true] { border-color: #aaa; background: #f1f1f0; }
body.ai-workspace #create #run { border: 1px solid #111; border-radius: 4px; background: #111; color: #fff; box-shadow: none; }
body.ai-workspace #create #run:disabled { border-color: #e1e1e0; background: #f1f1f0; color: #888; }
body.ai-workspace .ai-method-note { border-left: 2px solid #555; background: #f7f7f6; }
body.ai-workspace .ai-method-note p { margin-bottom: 0; color: #555; }
body.ai-workspace .ai-pending-approval, body.ai-workspace .notice, body.ai-workspace .ai-run-guidance,
body.ai-workspace .ai-analysis-options, body.ai-workspace .ai-analysis-tips, body.ai-workspace #setup-empty {
  border-color: var(--line); border-radius: 3px; background: #f7f7f6; color: #444; box-shadow: none;
}
body.ai-workspace .ai-danger { border-color: #d8d8d7; border-radius: 3px; background: #f5f5f4; color: #333; }
body.ai-workspace #status { border-color: var(--line); border-radius: 3px; background: #f5f5f4; }
body.ai-workspace .ai-job-state[data-state], body.ai-workspace .ai-batch-error { border-color: var(--line); background: #f5f5f4; color: #444; }
body.ai-workspace dialog { border-color: var(--line); border-radius: 4px; box-shadow: 0 18px 60px #0002; }
body.ai-workspace dialog::backdrop { background: #0006; backdrop-filter: none; }

.annotation-studio .studio-toolbar { background: #f7f7f6; border-color: var(--line); }
.annotation-studio .studio-toolbar button { border-radius: 3px; box-shadow: none; }
.annotation-studio .studio-toolbar .primary, .annotation-studio #studio-start { border: 1px solid #111; border-radius: 4px; background: #111; color: #fff; box-shadow: none; }
.annotation-studio #studio-start:hover:not(:disabled) { background: #333; }
.annotation-studio #studio-start:disabled { border-color: #e2e2e1; background: #f1f1f0; color: #888; }
.annotation-studio .task-column, .annotation-studio .material-column, .annotation-studio .label-column { border-color: var(--line); border-radius: 4px; background: #fff; box-shadow: none; }
.annotation-studio .studio-task-counts { border-color: var(--line); }
.annotation-studio .studio-material-item { border-color: var(--line); border-radius: 3px; }
.annotation-studio .studio-material-item:hover, .annotation-studio .studio-material-item[aria-current=true] { border-color: #aaa; background: #f5f5f4; box-shadow: inset 2px 0 #111; }
.annotation-studio .studio-material-state[data-state], .annotation-studio .studio-state[data-state] { border: 1px solid var(--line); border-radius: 3px; background: #f5f5f4; color: #444; }
.annotation-studio .workspace { border-color: var(--line); border-radius: 4px; box-shadow: none; }
.annotation-studio .studio-guide-cards button { border-color: var(--line); border-radius: 3px; box-shadow: none; }
.annotation-studio .studio-guide-cards button > span { border-radius: 3px; background: #f1f1f0; color: #555; }
.annotation-studio .studio-guide-cards small, .annotation-studio .studio-start-tip, .annotation-studio .studio-steps small,
.annotation-studio .studio-welcome > p:has(#start-from-library), .annotation-studio .studio-insight-card > .hint { display: none !important; }
.annotation-studio .studio-steps li > span { border-radius: 3px; background: #f1f1f0; color: #444; }
.annotation-studio .studio-progress-ring { background: conic-gradient(#555 var(--progress), #eee var(--progress)); }
.annotation-studio .studio-state[data-state=submitted] { background: #f1f1f0; color: #333; }
.annotation-studio #labels > h2 { color: #222; }
.annotation-studio :is(.tools, .reference, .stage, .calibration-panel) { border-color: var(--line); background: #f7f7f6; }
.annotation-studio .thumbnails button[aria-pressed=true] { border-color: #555; background: #f1f1f0; }
.annotation-studio #regions rect { fill: #5552; stroke: #444; }
.annotation-studio #regions rect.comparison-region { fill: #8882; stroke: #666; }
.annotation-studio #regions .resize-handle { fill: #555; stroke: #fff; }
.annotation-studio #studio-help-dialog { border-color: var(--line); border-radius: 4px; }
.annotation-studio #studio-help-dialog::backdrop { background: #0006; }
.overview-page .next-action small { display: none; }

/* Data and quality tools use the same neutral controls as the rest of the app. */
body.material-library-page.data-quality-page { --ink: inherit; --muted: inherit; --accent: inherit; --line: inherit; --bg: inherit; background: var(--bg) !important; }
body.material-library-page.data-quality-page .admin-shell { max-width: 1440px; padding: 26px 34px; }
body.material-library-page.data-quality-page .admin-shell .page-heading { min-height: 0; margin: 0 0 18px; padding: 0; gap: 0; }
body.material-library-page.data-quality-page .library-heading h1 { color: #171717; font-size: 26px; font-weight: 550; }
body.material-library-page.data-quality-page .library-heading p { margin: 4px 0 0; color: #666; font-size: 1rem; }
body.material-library-page.data-quality-page .data-navigation button { min-height: 38px; min-width: 0; padding: 8px 14px; border: 1px solid transparent; border-radius: 3px; background: var(--paper); color: var(--muted); box-shadow: none; font-size: 1rem; }
body.material-library-page.data-quality-page .data-navigation button:hover { background: var(--surface-muted); }
body.material-library-page.data-quality-page .data-navigation button[aria-selected=true] { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); box-shadow: none; }
body.material-library-page.data-quality-page .quality-card { border-color: var(--line); border-radius: 4px; box-shadow: none; }
body.material-library-page.data-quality-page .quality-card-title .title-icon { border: 1px solid var(--line); border-radius: 3px; background: #f2f2f1; color: #444; }
body.material-library-page.data-quality-page .quality-card-title h2, body.material-library-page.data-quality-page .step-heading h3 { color: #222; }
body.material-library-page.data-quality-page .export-step { border-color: var(--line); }
body.material-library-page.data-quality-page .export-step:last-child { border-radius: 3px; }
body.material-library-page.data-quality-page .step-heading b { border: 1px solid var(--line); border-radius: 3px; background: #f1f1f0; color: #333; }
body.material-library-page.data-quality-page .included-check { border-radius: 3px; background: #f1f1f0; color: #444; }
body.material-library-page.data-quality-page .export-actions .export-main-action,
body.material-library-page.data-quality-page #export { border-color: #111; border-radius: 4px; background: #111; color: #fff; box-shadow: none; }
body.material-library-page.data-quality-page .export-actions .export-main-action:hover:not(:disabled) { background: #333; }
body.material-library-page.data-quality-page .export-actions :is(button, .button-link) { border-radius: 4px; }
body.material-library-page.data-quality-page .export-complete,
body.material-library-page.data-quality-page .export-download,
body.material-library-page.data-quality-page #downloads a { border-color: #ddd; border-radius: 3px; background: #f5f5f4; color: #444; }
body.material-library-page.data-quality-page .export-issues { border-color: #ddd; border-radius: 3px; background: #f7f7f6; color: #444; }
body.material-library-page.data-quality-page #export-history th { background: #f6f6f5; color: #444; }
body.material-library-page.data-quality-page .quality-card-title p,
body.material-library-page.data-quality-page .export-hint { color: #777; }
body.material-library-page.data-quality-page .export-builder > .quality-card-title p { display: none; }

body.collector-keys-page { --ink: inherit; --muted: inherit; --accent: inherit; --line: inherit; --bg: inherit; background: var(--bg) !important; }
.collector-keys-page .admin-shell { max-width: 1440px; padding: 26px 34px; }
.collector-keys-page .library-heading h1 { color: #171717; font-size: 26px; font-weight: 550; }
.collector-keys-page .library-heading p { color: #666; font-size: 1rem; }
.collector-keys-page .collector-hero { display: none !important; }
.collector-keys-page .collector-create-card, .collector-keys-page .collector-recent-card { border-color: var(--line); border-radius: 4px; box-shadow: none; }
.collector-keys-page .collector-glyph, .collector-keys-page .collector-record-icon { border: 1px solid var(--line); border-radius: 3px; background: #f1f1f0; color: #444; box-shadow: none; }
.collector-keys-page .collector-record-icon[data-tint] { background: #f1f1f0; color: #444; }
.collector-keys-page .collector-list-heading svg { color: #555; }
.collector-keys-page #collector-submit { border-color: #111; border-radius: 4px; background: #111; color: #fff; box-shadow: none; }
.collector-keys-page .collector-status, .collector-keys-page .collector-status[data-state] { border: 1px solid var(--line); border-radius: 3px; background: #f5f5f4; color: #444; }
.collector-keys-page .collector-menu > summary { border-radius: 3px; background: #f5f5f4; color: #444; }
.collector-keys-page .collector-menu-content { border-color: var(--line); border-radius: 4px; box-shadow: 0 10px 30px #0002; }

.expert-audit-page { --accent: inherit; --soft: inherit; --line: inherit; --ink: inherit; --muted: inherit; }
.expert-audit-page .audit-section-title > svg, .expert-audit-page .audit-incorrect-card .audit-section-title > svg,
.expert-audit-page .audit-refresh svg, .expert-audit-page .audit-form-notice svg { color: #555; }
.expert-audit-page .audit-stat:nth-child(n) { --stat-color: #444; --stat-icon-bg: #f1f1f0; --stat-bg: #fff; --stat-border: #e4e4e3; }
.expert-audit-page .audit-stat-icon { border: 1px solid var(--line); border-radius: 3px; background: #f1f1f0; }
.expert-audit-page .audit-metrics tbody tr:nth-child(n) .audit-field-label svg { border: 1px solid var(--line); border-radius: 3px; background: #f1f1f0; color: #555; }
.expert-audit-page .audit-metrics th, .expert-audit-page .audit-metrics td { border-color: #e8e8e7; }
.expert-audit-page .audit-metrics thead th { background: #f6f6f5; color: #444; }
.expert-audit-page .audit-metrics tbody th { background: #fff; }
.expert-audit-page .audit-create-card #create { border-color: #111; border-radius: 4px; background: #111; box-shadow: none; }
.expert-audit-page .audit-create-card #create:hover:not(:disabled) { background: #333; }
.expert-audit-page .audit-seed-field button, .expert-audit-page .audit-refresh { border-color: var(--line); border-radius: 3px; color: #444; }
.expert-audit-page .audit-pool-notice, .expert-audit-page .audit-form-notice,
.expert-audit-page #create-message:not(:empty), .expert-audit-page .audit-batches-card .empty { border-color: var(--line); border-left-color: #777; border-radius: 3px; background: #f7f7f6; color: #444; }
.expert-audit-page .audit-pool-notice strong { color: #222; }
.expert-audit-page .audit-method summary { color: #444; }
.expert-audit-page .verdict-badge[data-verdict] { border: 1px solid var(--line); border-radius: 3px; background: #f5f5f4; color: #444; }
.expert-audit-page main :is(th, td, p, .content-text) { font-size: 16px; }
.account-page.app-page:not(.is-signin) #admin-users .member-self,
.account-page.app-page:not(.is-signin) #admin-users #users-count { border: 1px solid var(--line); border-radius: 3px; background: #f5f5f4; color: #444; }
body.ai-workspace .ai-readiness > span:not(#model-readiness):not(#material-readiness):not(#ocr-readiness) { display: none; }
.research-admin-page { --ink: inherit; --muted: inherit; --line: inherit; --bg: inherit; --accent: inherit; background: var(--bg); }
.research-admin-page .app-brand .muted { display: none; }
.research-admin-page #workspace > nav { border-color: var(--line); }
.research-admin-page #workspace > nav button { border-radius: 3px; background: transparent; color: #444; box-shadow: none; }
.research-admin-page #workspace > nav button:hover { background: #f5f5f4; }
.research-admin-page #workspace > nav button[aria-current=page] { border-color: #ddd; background: #f1f1f0; color: #111; box-shadow: inset 2px 0 #111; }
.research-admin-page #workspace > .notice { border-color: var(--line); border-radius: 3px; background: #f7f7f6; color: #555; }
.research-admin-page #workspace .card { border-color: var(--line); border-radius: 4px; box-shadow: none; }
.research-admin-page #workspace .empty, .research-admin-page #workspace .empty-state { border-color: var(--line); background: #fafaf9; color: #666; }
body.annotation-app { --ink: inherit; --muted: inherit; --line: inherit; --bg: inherit; --accent: inherit; --soft: inherit; background: var(--bg); }
body.annotation-app .task-filters { border-color: var(--line); border-radius: 4px; background: #f2f2f1; }
body.annotation-app .task-filters button { border-radius: 3px; color: #555; }
body.annotation-app .task-filters button[aria-pressed=true] { border-color: #111; background: #111; color: #fff; box-shadow: none; }
body.annotation-app .task-item, body.annotation-app .task-item:hover:not(:disabled) { border-radius: 3px; background: transparent; }
body.annotation-app .task-item.selected, body.annotation-app .task-item[aria-current=true] { border-color: #bbb; background: #f3f3f2; color: #171717; }
body.annotation-app .task-item-kind, body.annotation-app .task-item-state, body.annotation-app .task-sidebar-heading .tag { border-color: var(--line); border-radius: 3px; background: #f5f5f4; color: #444; }
body.annotation-app .task-board > .card, body.annotation-app .annotation-form.card,
body.annotation-app .reading, body.annotation-app .review-evidence { border-color: var(--line); border-radius: 4px; box-shadow: none; }
body.annotation-app .annotation-form-header { border-color: var(--line); border-radius: 4px 4px 0 0; box-shadow: none; }
body.annotation-app .source-viewer { border-color: var(--line); border-radius: 3px; background: #f5f5f4; }
body.annotation-app .viewer-title, body.annotation-app .review-proof { color: #444; }
body.annotation-app .viewer-symbol { border-color: #ddd; border-radius: 3px; background: #fff; }
body.annotation-app .viewer-symbol:after { border-left-color: #666; }
body.annotation-app .source-link { border-color: #ddd; border-radius: 3px; color: #333; }
body.annotation-app .source-link:hover { background: #f5f5f4; }
body.annotation-app .section-number { border-color: var(--line); border-radius: 3px; background: #f2f2f1; color: #444; }
body.annotation-app .label-section > summary:after { border-color: #777; }
body.annotation-app :is(.optional-fields, .evidence-fields) { border-color: var(--line); border-radius: 3px; background: #f7f7f6; }
body.annotation-app .review-observation, body.annotation-app .review-judgment blockquote { border-color: var(--line); border-left-color: #777; border-radius: 3px; background: #f5f5f4; color: #444; }
body.annotation-app .annotation-errors, body.annotation-app .field-error { border-color: #ddd; border-radius: 3px; background: #f5f5f4; color: #333; }
body.annotation-app .task-empty .empty-symbol { border-color: #ccc; border-radius: 3px; background: #f7f7f6; }
body.annotation-app .task-empty .empty-symbol:before, body.annotation-app .task-empty .empty-symbol:after { background: #aaa; }
@media (max-width: 850px) { :root { --sidebar-width: 0px; } }
.account-page.is-signin #signin .form-control { border-radius: 4px; }
.account-page.is-signin #signin .signin-submit { border-radius: 4px; }

/* Neutral controls for the active annotation workspace. */
body.annotation-studio {
  --accent: inherit;
  --ink: inherit;
  --muted: inherit;
  --line: inherit;
  --bg: inherit;
  --soft: inherit;
  background: var(--bg);
}
body.annotation-studio .studio-heading h1,
body.annotation-studio #labels > h2 { color: #171717; }
body.annotation-studio .studio-heading p,
body.annotation-studio #annotation-progress,
body.annotation-studio #save-status,
body.annotation-studio .check-state,
body.annotation-studio .field-help { color: #666; }
body.annotation-studio .studio-toolbar { background: #f7f7f6; border-color: var(--line); }
body.annotation-studio .workspace > :is(.task-column, .material-column, .label-column) {
  border-color: var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  scrollbar-color: #ccc transparent;
}
body.annotation-studio .task-column :is(input, select) { border-color: #d5d5d4; background: #fff; }
body.annotation-studio .studio-material-item { border-color: var(--line); border-radius: 3px; }
body.annotation-studio .studio-material-item:hover,
body.annotation-studio .studio-material-item[aria-current=true],
body.annotation-studio .task-item[aria-current=true] {
  border-color: #aaa;
  background: #f2f2f1;
  box-shadow: inset 2px 0 #111;
  color: #171717;
}
body.annotation-studio .studio-material-state[data-state],
body.annotation-studio .studio-state[data-state] { border-color: var(--line); background: #f5f5f4; color: #444; }
body.annotation-studio .studio-task-counts,
body.annotation-studio #comparison { border-color: var(--line); }
body.annotation-studio .choice-group button[aria-pressed=true],
body.annotation-studio #focus-mode[aria-pressed=true],
body.annotation-studio .thumbnails button[aria-pressed=true] {
  border-color: #555;
  background: #f1f1f0;
  color: #171717;
  box-shadow: inset 0 0 0 1px #555;
}
body.annotation-studio .field-help { border: 0; background: transparent; box-shadow: none; }
body.annotation-studio .annotation-guide,
body.annotation-studio .studio-start-tip,
body.annotation-studio :is(.tools, .reference, .stage, .calibration-panel) {
  border-color: var(--line);
  background: #f7f7f6;
  color: #444;
}
body.annotation-studio .guide-example { border-left-color: #999; color: #555; }
body.annotation-studio .submission-issues { border-color: var(--line); border-radius: 4px; background: #f7f7f6; }
body.annotation-studio .submission-issues h2,
body.annotation-studio #submission-issue-list button { color: #333; }
body.annotation-studio .studio-toolbar #studio-start { border-color: #111; background: #111; color: #fff; }
body.annotation-studio .studio-toolbar #studio-start:hover:not(:disabled) { background: #333; }
body.annotation-studio #regions rect { fill: #5552; stroke: #444; }
body.annotation-studio #regions rect.comparison-region { fill: #8881; stroke: #777; stroke-dasharray: 6 4; }
body.annotation-studio #regions .resize-handle { fill: #555; stroke: #fff; }
body.annotation-studio #studio-help-dialog { border-color: var(--line); border-radius: 4px; }
body.annotation-studio #studio-help-dialog::backdrop { background: #0006; }

@media (max-width: 850px) {
  .app-page { padding-top: 54px; }
  .app-topbar { height: 54px; padding: 0 16px; }
  .sidebar-heading .nav-close { display: grid; }
  .app-page .collection-shell, .app-page .admin-shell, .overview-shell,
  .app-page .shell, .app-page .storage-main { padding: 22px 20px; }
  .app-page > header:not(.app-topbar):not(.topbar) { padding: 22px 20px 0; }
}
@media (max-width: 600px) {
  h1, .page-heading h1, .audit-hero h1, .light-hero h1 { font-size: 23px !important; }
  .app-page .collection-shell, .app-page .admin-shell, .overview-shell,
  .app-page .shell, .app-page .storage-main { padding: 18px 15px; }
  .app-page > header:not(.app-topbar):not(.topbar) { padding: 18px 15px 0; }
  .card { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { border-bottom: 1px solid var(--line); }
  .stat-card:nth-child(2n) { border-right: 0; }
  .stat-card:nth-last-child(-n+2) { border-bottom: 0; }
  .page-heading { display: flex; }
  .account-page.app-page:not(.is-signin) #admin-users .team-stats { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Shared type and spacing rhythm: compact pages use 4 / 8 / 12 / 16 / 24px steps. */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --type-caption: 1rem;
  --type-label: 1rem;
  --type-body: 1rem;
  --type-section: 16px;
  --type-page: 24px;
}

body { font-size: var(--type-body); line-height: 1.65; }
h1, .page-heading h1 { font-size: var(--type-page); line-height: 1.3; font-weight: 550; letter-spacing: -.025em; }
h2 { font-size: var(--type-section); line-height: 1.45; font-weight: 550; }
h3 { font-size: 1rem; line-height: 1.45; font-weight: 550; }

body.app-page { padding-top: var(--bar-height); }
body.app-page .app-topbar { height: var(--bar-height); padding-inline: 24px; }
body.app-page .nav-link { min-height: 36px; }
body.app-page .page-heading { margin-bottom: 20px; }
body.app-page .page-heading p { max-width: 560px; font-size: 1rem; line-height: 1.5; }
body.app-page .collection-shell,
body.app-page .admin-shell,
body.app-page .overview-shell,
body.app-page .shell,
body.app-page .storage-main,
body.app-page .task-center,
body.app-page .expert-audit-shell,
body.app-page .light-label-shell { padding: 24px 32px; }
body.app-page > header:not(.app-topbar):not(.topbar) { padding: 24px 32px 0; }
body.app-page > main:not(.collection-shell):not(.overview-shell):not(.admin-shell) { max-width: 1440px; }
body.app-page .card { padding: 18px; border-radius: 4px; box-shadow: none; }
body.app-page .section-heading { margin-bottom: 12px; }
body.app-page main :is(th, td) { padding: 9px 10px; }

/* Overview: one title size, shorter metrics, and closer working sections. */
.overview-page .overview-shell { padding-top: 24px; }
.overview-shell .page-heading h1 { font-size: var(--type-page); }
.overview-shell .page-heading { margin-bottom: 18px; }
.overview-shell #overview-stats { margin-bottom: 18px; }
.overview-shell .stat-card { min-height: 104px; padding: 14px 18px; }
.overview-shell .stat-value { margin: 5px 0 2px; font-size: 28px; }
.overview-shell .overview-columns { gap: 14px; }
.overview-shell .recent-card, .overview-shell .next-card { padding: 18px; }
.overview-shell .section-heading { margin-bottom: 12px; }
.overview-shell .home-task-progress { margin-bottom: 14px; }
.overview-shell .home-task-filters { gap: 6px; margin-bottom: 12px; }
.overview-shell .home-task-filters button { min-height: 34px; padding: 6px 10px; font-size: 1rem; }
.overview-shell .home-task-table :is(th, td) { padding: 10px 8px; }
.overview-shell .next-card h2 { margin-bottom: 4px; }
.overview-shell .next-action { min-height: 48px; padding: 9px 0; }
.overview-shell .empty-state { padding: 36px 16px; }

/* Collection and task counts should read as data, not oversized feature cards. */
.collection-page .collection-shell { padding-top: 24px; }
.collection-page .page-heading { margin-bottom: 16px; }
.collection-page .page-heading h1 { font-size: var(--type-page) !important; }
.collection-page .card, .collection-page .panel { border-radius: 4px; box-shadow: none; }
.collection-page .stat-card { min-height: 108px; padding: 13px; }
.collection-page .stat-value { font-size: 26px; }
.collection-page .stat-label svg { display: none; }
.collection-page .collection-service #capability,
.collection-page .collection-service a { font-size: 1rem; }
.collection-page .empty-state .empty-icon { display: none; }
.task-center-page .task-center { padding: 24px 32px; }
.task-center-page .task-center h1 { font-size: var(--type-page); }
.task-center-page .page-heading { margin-bottom: 18px; }
.task-center-page .queue-overview { margin-bottom: 16px; padding: 14px; }
.task-center-page .queue-counts { gap: 6px; }
.task-center-page .queue-count { gap: 12px; padding: 6px 8px; }
.task-center-page .count-icon { width: 32px; height: 32px; }
.task-center-page .count-icon svg { width: 18px; height: 18px; }
.task-center-page .count-copy strong { font-size: 24px; }
.task-center-page .count-track { height: 1px; margin-top: 8px; border-radius: 0; }
.task-center-page .queue-work { margin-bottom: 16px; padding: 0 18px 14px; }
.task-center-page .queue-toolbar { margin-inline: -18px; padding-inline: 18px; }
.task-center-page .queue-filters button { padding: 13px 10px 11px; font-size: 1rem; }
.task-center-page .queue-search-row { gap: 12px; margin: 14px 0; }
.task-center-page .queue-search-row select { min-height: 38px; }
.task-center-page .queue-table th { padding: 9px 10px; font-size: 1rem; }
.task-center-page .queue-table td { padding: 11px 10px; }
.task-center-page .queue-empty { padding: 36px 16px !important; }

/* Library controls and empty states use the same compact surface language. */
.material-library-page .admin-shell { padding-top: 24px; }
.material-library-page .admin-shell .page-heading { min-height: 0; margin-bottom: 14px; gap: 16px; }
.material-library-page .library-heading h1,
.collector-keys-page .library-heading h1,
body.material-library-page.data-quality-page .library-heading h1 { font-size: var(--type-page); }
.material-library-page .library-search { border-radius: 4px; box-shadow: none; }
.material-library-page .admin-shell .library-search input { min-height: 38px; border-radius: 4px; font-size: 1rem; }
.material-library-page .admin-shell .library-search button { min-height: 38px; min-width: 72px; border-radius: 4px; font-size: 1rem; }
.material-library-page .library-navigation { margin-bottom: 10px; }
.material-library-page .admin-shell .admin-tabs.detail-pane-tabs button { min-height: 38px; padding: 7px 12px; border-radius: 3px; font-size: 1rem; }
.material-library-page .admin-shell .admin-tabs.detail-pane-tabs button:disabled { border-color: transparent; background: #f2f2f1; color: #777; }
.material-library-page .admin-shell .admin-tabs.detail-pane-tabs button[aria-selected="true"],
.material-library-page .admin-shell .admin-tabs.detail-pane-tabs button[aria-pressed="true"] { border-color: #ddd; border-bottom-color: #111; background: #f5f5f4; color: #111; }
.material-library-page .library-options select,
.material-library-page .library-tools > summary { min-height: 38px; font-size: 1rem; }
.material-library-page .library-filters { gap: 8px; margin-bottom: 12px; padding: 10px; border-radius: 4px; }
.material-library-page .admin-shell .library-filters select,
.material-library-page .admin-shell #reset-filters { min-height: 38px; border-radius: 3px; font-size: 1rem; }
.material-library-page .library-date-range { border-radius: 3px; }
.material-library-page .admin-shell .library-date-range input { min-height: 36px; font-size: 1rem; }
.material-library-page .library-statistics { margin-bottom: 12px; }
.material-library-page .library-stat { gap: 10px; padding: 12px; }
.material-library-page .library-stat-icon { width: 30px; height: 30px; }
.material-library-page .library-stat-icon svg { width: 16px; height: 16px; }
.material-library-page .library-stat span { font-size: 16px; }
.material-library-page .library-stat strong { margin-top: 2px; font-size: 22px; }
.material-library-page .admin-shell .work-detail > .card { padding: 14px; border-radius: 4px; }
.material-library-page .library-catalog-toolbar { gap: 8px 14px; padding: 8px 10px; }
.material-library-page .library-selection-bar { min-height: 44px; margin-bottom: 8px; }
.material-library-page .admin-shell #list { min-height: 0; gap: 10px; padding: 0 8px 8px; border-radius: 0 0 4px 4px; }
.material-library-page .library-empty { padding: 40px 16px; }
.material-library-page .empty-library-icon { display: none; }
.material-library-page .library-empty h3 { margin: 0; color: #333; font-size: 16px; }
.material-library-page .library-empty p { margin: 6px 0 0; color: #666; font-size: 1rem; }
.material-library-page .material-card { border-radius: 4px; }

/* Workflow pages retain their work area while reducing decorative breathing room. */
body.ai-workspace .ai-page-header { padding: 20px 32px 8px !important; }
body.ai-workspace .ai-page-header h1 { font-size: var(--type-page) !important; }
body.ai-workspace .ai-step-card, body.ai-workspace .ai-overview, body.ai-workspace .ai-method-note,
body.ai-workspace .ai-analysis-summary, body.ai-workspace .ai-selected-card { border-radius: 4px; }
body.annotation-studio .studio-toolbar { padding: 18px 24px 12px; gap: 14px; }
body.annotation-studio .studio-heading h1 { font-size: 22px; }
body.annotation-studio .studio-toolbar button { min-height: 38px; padding: 7px 11px; font-size: 1rem; }
body.annotation-studio .workspace > :is(.task-column, .material-column, .label-column) { border-radius: 4px; }
body.annotation-studio .workspace > .task-column { padding: 16px 14px; }
body.annotation-studio .workspace > .material-column { padding: 18px; }
body.annotation-studio .workspace > .label-column { padding: 0 18px 18px; }
body.annotation-studio .studio-welcome > h2 { margin: 12px 0 6px; font-size: 22px; }
body.annotation-studio #studio-empty-hint { margin-bottom: 18px; font-size: 1rem; }
body.annotation-studio .studio-guide-cards { gap: 8px; }

/* Keep labels above their own controls and align paired actions at the baseline. */
body.annotation-studio .video-time-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 14px 0; }
body.annotation-studio .video-time-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; min-width: 0; }
body.annotation-studio .video-time-field label { margin: 0; min-width: 0; }
body.annotation-studio #video-tools .video-time-field :is(input, select) { width: 100%; min-height: 42px; margin-top: 6px; }
body.annotation-studio .video-time-field button { min-height: 42px; white-space: nowrap; }
body.annotation-studio .video-segment-action { grid-column: 1 / -1; }
body.annotation-studio .evidence-supports { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 12px; }
body.annotation-studio .evidence-supports label { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; line-height: 1.5; }
body.annotation-studio .evidence-supports input[type=checkbox] { flex: 0 0 auto; margin: 0; width: 17px; height: 17px; }
body.annotation-studio .save-bar { align-items: center; }
body.annotation-studio .save-bar button { min-height: 42px; }
body.annotation-studio .workspace > :is(.material-column, .label-column) { scrollbar-gutter: stable; }
@media (max-width: 1400px) {
  body.annotation-studio .video-time-controls { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  body.annotation-studio .evidence-supports { grid-template-columns: minmax(0, 1fr); }
}

/* Shared workbench themes. Pages consume the same tokens so the switch feels
   like a workspace setting instead of a page-specific skin. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111a27;
  --paper: #1b2839;
  --ink: #f1f5fa;
  --muted: #adbcd0;
  --line: #33435a;
  --accent: #79b8ff;
  --accent-hover: #9bccff;
  --accent-contrast: #102034;
  --accent-soft: #253e5b;
  --chart-fill: #6897c9;
  --soft: #253e5b;
  --surface-muted: #233247;
  --control-border: #435570;
  --green: #7bd5a9;
  --red: #ffa9ae;
}
:root[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] body,
html[data-theme="dark"] body.app-page,
html[data-theme="dark"] .overview-page,
html[data-theme="dark"] .material-library-page,
html[data-theme="dark"] .task-center-page,
html[data-theme="dark"] .ai-workspace,
html[data-theme="dark"] .annotation-studio {
  background: var(--bg) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] :is(.app-sidebar, .app-topbar, .card, .panel, .stat-card,
  .queue-overview, .queue-work, .library-filters, .library-statistics,
  .material-card, .work-detail > .card, .ai-step-card, #jobs-section,
  .workspace > :is(.task-column, .material-column, .label-column)) {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] :is(button:where(:not(.nav-backdrop)), .button-link, input, select, textarea) {
  border-color: var(--line) !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] :is(button.primary, .button-link.primary, .ai-workspace #create #run) {
  border-color: var(--accent) !important;
  background: var(--accent) !important;
  color: var(--accent-contrast) !important;
}
html[data-theme="dark"] :is(.nav-link[aria-current="page"], .queue-filters button[aria-pressed="true"],
  .admin-tabs button[aria-selected="true"], .library-view-toggle button[aria-pressed="true"]) {
  border-color: var(--accent) !important;
  background: var(--soft) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] :is(h1, h2, h3, h4, strong, th, td, label, legend, summary,
  .app-brand, .app-breadcrumb, .nav-link, .workspace-downloads, .text-link, a) { color: var(--ink) !important; }
html[data-theme="dark"] :is(p, small, .hint, .muted, .metadata, .page-heading p,
  .stat-note, .stat-label, .app-breadcrumb, .sidebar-account small, .workspace-label) { color: var(--muted) !important; }
html[data-theme="dark"] :is(th, .queue-table th, .library-stat, .notice, .empty-state,
  .ai-workspace .ai-analysis-summary, .ai-workspace .ai-analysis-tips,
  .ai-workspace .ai-method-note, .ai-workspace .ai-source-card) { background: var(--soft) !important; }
html[data-theme="dark"] :is(.queue-table td, .queue-table th, .library-stat, .admin-tabs,
  .ai-workspace .ai-section-nav) { border-color: var(--line) !important; }
html[data-theme="dark"] dialog { background: var(--paper) !important; color: var(--ink) !important; border-color: var(--line) !important; }

html[data-theme="dark"] body.ai-workspace :is(.ai-page-header, .ai-section-nav,
  .ai-step-card, #jobs-section, .ai-selected-card, .ai-overview) {
  border-color: var(--line) !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] body.ai-workspace .ai-section-nav { background: transparent !important; }
html[data-theme="dark"] body.ai-workspace .ai-page-header h1,
html[data-theme="dark"] body.ai-workspace .ai-step-heading h2,
html[data-theme="dark"] body.ai-workspace :is(h3, strong, label, summary) { color: var(--ink) !important; }
html[data-theme="dark"] body.ai-workspace :is(.ai-source-card, #setup-action,
  .ai-analysis-summary, .ai-analysis-tips, .ai-method-note, .ai-run-guidance,
  .ai-analysis-options, .ai-pending-approval, .ai-danger, #status,
  .ai-job-state, .ai-batch-error, #setup-empty, .notice) {
  border-color: var(--line) !important;
  background: var(--soft) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] body.annotation-studio .studio-toolbar,
html[data-theme="dark"] body.annotation-studio :is(.studio-welcome,
  .studio-insight-card, .studio-start-tip, .studio-guide-cards > *, .studio-paper) {
  border-color: var(--line) !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.annotation-studio .studio-paper:before {
  border-color: var(--line) !important;
  background: var(--soft) !important;
}
html[data-theme="dark"] body.annotation-studio :is(.studio-guide-cards button > span,
  .studio-material-state[data-state], .studio-state[data-state], .submission-issues,
  .annotation-guide, .calibration-panel) {
  border-color: var(--line) !important;
  background: var(--soft) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] body.overview-page :is(#overview-stats, .stat-card, .overview-shell .card,
  .next-action, .home-task-filters button, .home-task-table th,
  .status-badge, .platform-icon) {
  border-color: var(--line) !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] body.overview-page :is(.next-action:hover,
  .home-task-filters button:hover:not(:disabled), .nav-link:hover) {
  background: var(--soft) !important;
}
html[data-theme="dark"] body.overview-page :is(.page-heading h1, .stat-value,
  h2, .next-action strong, .home-task-table td a, .app-breadcrumb strong) {
  color: var(--ink) !important;
}
html[data-theme="dark"] body.overview-page :is(.stat-label, .stat-note,
  #overview-date, .home-download p, .home-download [data-download-status],
  .task-list-note, .home-task-table td, .home-task-table td small,
  .overview-shell .text-link, .home-progress-line, .recent-head,
  .recent-date, .recent-description small) {
  color: var(--muted) !important;
}
html[data-theme="dark"] body.overview-page .home-progress-track { background: var(--line) !important; }
html[data-theme="dark"] body.overview-page .home-progress-track span { background: var(--accent) !important; }

/* Data review, settings and dense utility pages share restrained spacing. */
.light-label-page .light-columns { gap: 16px; margin-bottom: 16px; }
.light-label-page main h1 { font-size: 24px !important; }
.light-label-page main h2 { font-size: 18px; }
.light-label-page main h3 { font-size: 16px; }
.light-label-page .light-card { margin-bottom: 16px; padding: 18px 20px; border-radius: 4px; }
.light-label-page .light-card label { margin-top: 10px; }
.light-label-page .light-card fieldset { margin-top: 12px; }
.light-label-page .light-stats { gap: 8px; margin: 10px 0; }
.light-label-page .light-stats li { padding: 9px 11px; }
.light-label-page .light-option { min-height: 40px; padding: 7px 10px; }
.light-label-page .light-list li { padding: 8px 0; }
.expert-audit-page .expert-audit-shell { padding: 24px 32px; }
.expert-audit-page main h1 { font-size: 24px !important; }
.expert-audit-page main h2 { font-size: 18px; }
.expert-audit-page main h3 { font-size: 16px; }
.expert-audit-page .audit-columns { gap: 16px; }
.expert-audit-page .audit-create-card, .expert-audit-page .audit-dashboard { padding: 18px; }
.expert-audit-page .audit-form-heading { margin-bottom: 14px; }
.expert-audit-page .audit-stats { gap: 10px; margin: 14px 0 18px; }
.expert-audit-page .audit-breakdowns { gap: 16px; margin-top: 18px; }
.expert-audit-page .audit-breakdown-card { padding: 16px; }
.storage-main { padding: 24px 32px; }
.storage-main .card { margin-bottom: 16px; padding: 18px; }
.storage-main h2 { margin-bottom: 10px; font-size: 16px; }
.storage-columns { gap: 16px; }
.storage-grid { gap: 12px; }
.storage-main label { gap: 6px; margin-bottom: 14px; font-size: 1rem; }
.storage-main input:not([type=checkbox]), .storage-main select { min-height: 38px; }
.storage-main .hint { font-size: 1rem; line-height: 1.55; }
.storage-main th, .storage-main td { padding: 9px 10px; }
.account-page.app-page:not(.is-signin) > .shell { padding: 24px 32px; }
.account-page.app-page:not(.is-signin) #admin-users .team-heading { margin-bottom: 18px; }
.account-page.app-page:not(.is-signin) #admin-users .team-heading h2 { font-size: 24px; }
.account-page.app-page:not(.is-signin) #admin-users .team-stats { gap: 12px; margin-bottom: 16px; }
.account-page.app-page:not(.is-signin) #admin-users .team-stat { gap: 14px; padding: 16px; border-radius: 4px; }
.account-page.app-page:not(.is-signin) #admin-users .team-stat-icon { width: 40px; height: 40px; }
.account-page.app-page:not(.is-signin) #admin-users .team-stat-icon svg { width: 20px; height: 20px; }
.account-page.app-page:not(.is-signin) #admin-users .team-directory,
.account-page.app-page:not(.is-signin) #admin-users .team-insights { border-radius: 4px; }
.account-page.app-page:not(.is-signin):has(#admin-users:not([hidden])) .account-sidebar { margin-bottom: 14px; }
.account-page.app-page:not(.is-signin) #admin-users .role-donut { background-color: #e5e5e4; }
.account-page.app-page:not(.is-signin) #admin-users .role-donut strong { color: #171717; }
.account-page.app-page:not(.is-signin) #admin-users .role-donut span { color: #777; }
.account-page.app-page:not(.is-signin) #admin-users .role-legend strong { color: #333; }
.account-page.app-page:not(.is-signin) #admin-users .status-track { background: #eee; border-radius: 0; height: 2px; }
.account-page.app-page:not(.is-signin) #admin-users .status-track i { background: #555 !important; border-radius: 0; }
.account-page.app-page:not(.is-signin) #admin-users .utility-icon { border-radius: 3px; background: #f2f2f1; color: #555; }
.account-page.app-page:not(.is-signin) #admin-users .team-utility summary strong { color: #333; }
.account-page.app-page:not(.is-signin) #admin-users .team-utility summary small { color: #777; }
.account-page.app-page:not(.is-signin) #admin-users .directory-heading button { padding: 13px 9px 11px; font-size: 1rem; }
.account-page.app-page:not(.is-signin) #admin-users .users-table td { padding: 11px 10px; }
.account-page.is-signin #signin h1 { font-size: 24px; }
.account-page.is-signin .signin-identity { margin-bottom: 28px; }
.account-page.is-signin #signin form > .form-control,
.account-page.is-signin #signin .signin-submit { height: 44px; min-height: 44px; }
.account-page.is-signin #signin form > .form-control { margin-bottom: 18px; }

@media (max-width: 850px) {
  body.app-page .app-topbar { padding-inline: 16px; }
  body.app-page .collection-shell, body.app-page .admin-shell, body.app-page .overview-shell,
  body.app-page .shell, body.app-page .storage-main, body.app-page .task-center,
  body.app-page .expert-audit-shell, body.app-page .light-label-shell { padding: 20px; }
  body.app-page > header:not(.app-topbar):not(.topbar) { padding: 20px 20px 0; }
  .task-center-page .task-center { padding: 20px; }
  .expert-audit-page .expert-audit-shell { padding: 20px; }
}
@media (max-width: 600px) {
  h1, .page-heading h1, .audit-hero h1, .light-hero h1 { font-size: 22px !important; }
  body.app-page .collection-shell, body.app-page .admin-shell, body.app-page .overview-shell,
  body.app-page .shell, body.app-page .storage-main, body.app-page .task-center,
  body.app-page .expert-audit-shell, body.app-page .light-label-shell { padding: 16px; }
  body.app-page > header:not(.app-topbar):not(.topbar) { padding: 16px 16px 0; }
  body.app-page .card { padding: 15px; }
  .material-library-page .admin-shell .page-heading { display: block; }
  .material-library-page .library-search { width: 100%; margin-top: 10px; }
  .material-library-page .library-navigation { align-items: flex-start; flex-wrap: wrap; }
  .material-library-page .library-stat { padding: 10px; }
  .task-center-page .task-center { padding: 16px; }
  .expert-audit-page .expert-audit-shell { padding: 16px; }
}

/* Readability is a delivery requirement, including navigation and count badges. */
.workspace-downloads, .notification-count { font-size: 1rem; }
.notification-count { min-width: 24px; height: auto; min-height: 24px; line-height: 1.2; }

/* Optional compact workbench density for people processing many tasks. The
   default remains the more spacious layout; density is independent of theme. */
@media (min-width: 851px) {
  html[data-layout="top"] .sidebar-heading { display: none; }
  :root[data-density="compact"] { --sidebar-width: 196px; }
}
:root[data-density="compact"] { --sidebar-inset: 10px; --bar-height: 50px; }
:root[data-density="compact"] body.app-page .app-topbar { padding-inline: 20px; }
:root[data-density="compact"] body.app-page .nav-link { min-height: 36px; margin: 1px 0; padding: 7px 10px; }
:root[data-density="compact"] body.app-page .nav-caption { margin: 12px 10px 5px; }
:root[data-density="compact"] body.app-page .sidebar-bottom { padding-top: 10px; }
:root[data-density="compact"] body.app-page .workspace-actions { gap: 8px; }
:root[data-density="compact"] body.app-page :is(.collection-shell, .admin-shell,
  .overview-shell, .shell, .storage-main, .task-center,
  .expert-audit-shell, .light-label-shell) { padding: 18px 24px; }
:root[data-density="compact"] .overview-shell .page-heading { margin-bottom: 14px; }
:root[data-density="compact"] .overview-shell #overview-stats { margin-bottom: 14px; }
:root[data-density="compact"] .overview-shell .stat-card { min-height: 92px; padding: 14px 16px; }
:root[data-density="compact"] .overview-shell .stat-value { margin: 4px 0 2px; font-size: 28px; }
:root[data-density="compact"] .overview-shell .overview-columns { gap: 12px; }
:root[data-density="compact"] body.ai-workspace > header.ai-page-header { margin-top: 10px; padding: 16px 20px 12px; }
:root[data-density="compact"] .ai-workspace .ai-section-nav { padding: 4px 0; }
:root[data-density="compact"] .ai-workspace #create .ai-step-card { padding: 14px; }
:root[data-density="compact"] .ai-workspace #jobs-section { margin-top: 12px; }
:root[data-density="compact"] body.annotation-studio .studio-toolbar { padding: 14px 20px 10px; }
:root[data-density="compact"] body.annotation-studio .workspace { gap: 10px; margin: 0 16px 16px; }
:root[data-density="compact"] body.annotation-studio .workspace > :is(.task-column, .material-column, .label-column) { border-radius: 4px; }
html[data-theme="dark"] :is(button, a, input, select, textarea, summary):focus-visible {
  outline-color: var(--accent) !important;
}

.app-topbar .appearance-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  white-space: nowrap;
}
.app-topbar .appearance-toggle:is(:hover,:has(+ :popover-open)) { background: var(--soft); }
#workspace-appearance.appearance-panel {
  position: fixed;
  inset: 58px 18px auto auto;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100dvh - 76px);
  overflow-y: auto;
  margin: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 6px 24px #1112;
}
.appearance-panel h2 { margin: 0 0 16px; font-size: 17px; line-height: 1.35; }
.appearance-panel fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.appearance-panel fieldset + fieldset { margin-top: 14px; }
.appearance-panel legend { padding: 0; margin: 0 0 5px; color: var(--muted); font-size: 1rem; font-weight: 500; }
.appearance-panel .appearance-options { display: flex; gap: 6px; }
.appearance-panel .appearance-option {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
}
.appearance-option input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
}
.appearance-panel .appearance-option:has(input:checked) {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--soft);
  font-weight: 650;
}
.appearance-panel .appearance-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.appearance-option .layout-preview {
  display: inline-flex;
  width: 22px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: .8;
}
.layout-preview::before { content: ""; background: currentColor; }
.layout-preview[data-preview="sidebar"]::before { width: 5px; }
.layout-preview[data-preview="top"]::before { width: 100%; height: 4px; }

@media (min-width: 851px) {
  html[data-layout="top"] body.app-page { padding-left: 0; }
  html[data-layout="top"] .app-page > .app-topbar { left: 0; z-index: 41; }
  html[data-layout="top"] .app-page > .skip-link { left: 12px; }
  html[data-layout="top"] .app-topbar .app-breadcrumb { display: flex; }
  html[data-layout="top"] .app-topbar .mobile-menu,
  html[data-layout="top"] .app-sidebar :is(.app-brand,.sidebar-account,.nav-close) { display: none; }
  html[data-layout="top"] .app-page > .app-sidebar {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 3px 24px;
    border: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    transform: none;
    box-shadow: none;
  }
  html[data-layout="top"] .app-sidebar .app-nav {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 3px;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  html[data-layout="top"] .app-page .app-nav > .nav-link,
  html[data-layout="top"] .app-nav .nav-settings > summary {
    display: flex;
    align-items: center;
    min-height: 36px;
    margin: 0;
    padding: 5px 9px;
    border: 0;
    border-radius: 3px;
    font-size: 1rem;
    line-height: 1.4;
    white-space: nowrap;
  }
  html[data-layout="top"] .app-page .app-nav > .nav-link[aria-current="page"],
  html[data-layout="top"] .app-nav .nav-settings:has([aria-current="page"]) > summary {
    color: var(--ink);
    background: var(--soft);
    box-shadow: inset 0 -2px var(--accent);
  }
  html[data-layout="top"] .app-nav .nav-settings { position: relative; margin: 0 0 0 auto; padding: 0; border: 0; }
  html[data-layout="top"] .app-nav .nav-settings > summary { gap: 7px; cursor: pointer; }
  html[data-layout="top"] .app-nav .nav-settings > summary::-webkit-details-marker { display: none; }
  html[data-layout="top"] .app-nav .nav-settings > summary::after {
    content: "";
    width: 5px;
    height: 5px;
    border: solid currentColor;
    border-width: 0 1px 1px 0;
    transform: rotate(45deg) translateY(-1px);
  }
  html[data-layout="top"] .app-nav .nav-settings-links {
    position: absolute;
    inset: calc(100% + 2px) 0 auto auto;
    min-width: 124px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
  }
  html[data-layout="top"] .app-nav .nav-settings-links a { margin: 0; font-size: 1rem; white-space: nowrap; }
  html[data-layout="top"] .app-page .sidebar-bottom { flex: none; margin: 0 0 0 auto; padding: 0; border: 0; }
}
@media (max-width: 600px) {
  #workspace-appearance.appearance-panel { inset: 56px 12px auto auto; }
  .app-topbar .appearance-toggle { min-height: 34px; padding: 4px 8px; }
}

/* Use the shared palette in signed-in navigation and actions, including older pages. */
body.app-page > :is(.app-sidebar, .app-topbar) {
  background: var(--paper);
  border-color: var(--line);
}
body.app-page .app-nav .nav-link[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}
html[data-theme="dark"] body.app-page .app-nav .nav-link[aria-current="page"] { color: var(--accent) !important; }
body.app-page :is(.workspace-profile .user-avatar, .sidebar-account .user-avatar) {
  background: var(--accent-soft);
  color: var(--accent);
}
body.app-page .app-topbar :is(.mobile-menu, .appearance-toggle, .workspace-notifications) {
  background: var(--paper);
  color: var(--ink);
}
body.app-page .app-topbar :is(.mobile-menu, .appearance-toggle, .workspace-notifications):is(:hover,:focus-visible) {
  background: var(--surface-muted);
}

/* The material catalog keeps a page-level light palette for its cards and
   statistics. Remap those tokens for the shared dark workspace. */
html[data-theme="dark"] body.material-library-page {
  --ink: #eff4fb;
  --muted: #afbdd0;
  --line: #344761;
  --bg: #111a27;
  --accent: #79b8ff;
  --accent-soft: #253e5b;
  --paper: #1b2839;
  --soft: #253e5b;
  --surface-muted: #233247;
  --control-border: #435570;
}
html[data-theme="dark"] body.material-library-page :is(
  .library-search input,
  .library-tools-menu,
  .library-catalog-toolbar,
  .library-selection-bar,
  #list,
  .material-panel-header,
  .material-gallery,
  .gallery-stage,
  .gallery-error,
  .material-lightbox,
  .material-facts > div,
  .resource-line
) {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] body.material-library-page :is(
  .library-search input,
  .library-filters,
  .library-result-bar select,
  .library-view-toggle button,
  .selection-tools,
  .gallery-thumbnails,
  .gallery-thumbnail > img,
  .video-thumbnail
) {
  border-color: var(--line) !important;
  background: var(--surface-muted) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] body.material-library-page .library-stat {
  background: var(--surface-muted) !important;
  border: 1px solid var(--line) !important;
  box-shadow: inset 3px 0 var(--stat-color) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] body.material-library-page .library-stat[data-kind="total"] { --stat-color: #56b5ff; }
html[data-theme="dark"] body.material-library-page .library-stat[data-kind="pending"] { --stat-color: #f4c86a; }
html[data-theme="dark"] body.material-library-page .library-stat[data-kind="promoted"] { --stat-color: #65d6ad; }
html[data-theme="dark"] body.material-library-page .library-stat[data-kind="video"] { --stat-color: #79b8ff; }
html[data-theme="dark"] body.material-library-page .library-stat[data-kind="image"] { --stat-color: #ff8fa8; }
html[data-theme="dark"] body.material-library-page .library-stat[data-kind="today"] { --stat-color: #c09aff; }
html[data-theme="dark"] body.material-library-page .library-stat span { color: var(--muted) !important; }
html[data-theme="dark"] body.material-library-page .library-stat strong { color: var(--ink) !important; }
html[data-theme="dark"] body.material-library-page .library-stat-icon {
  background: var(--paper) !important;
  color: var(--stat-color) !important;
}
html[data-theme="dark"] body.material-library-page :is(.library-result-bar, .library-selection-bar) {
  color: var(--ink) !important;
}
html[data-theme="dark"] body.material-library-page :is(
  .card-tags > span,
  .admin-shell .card-tags > small,
  .admin-shell .card-actions button,
  .admin-shell .card-actions .button-link
) {
  background: var(--surface-muted) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] body.material-library-page .admin-shell .card-actions .primary {
  background: var(--accent) !important;
  color: var(--accent-contrast) !important;
  border-color: var(--accent) !important;
}
html[data-theme="dark"] body.material-library-page :is(
  .material-state,
  .material-card .card-status
) {
  border: 1px solid var(--line) !important;
  background: var(--surface-muted) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] body.material-library-page :is(
  .material-state[data-state="pending"],
  .material-card[data-state="pending"] .card-status
) { background: #3c3320 !important; color: #f4c86a !important; }
html[data-theme="dark"] body.material-library-page :is(
  .material-state[data-state="analysis_snapshot"],
  .material-card[data-state="analysis_snapshot"] .card-status
) { background: #352a1d !important; color: #ffd38a !important; }
html[data-theme="dark"] body.material-library-page :is(
  .material-state[data-state="returned"],
  .material-card[data-state="returned"] .card-status
) { background: #3a2a23 !important; color: #ffb17d !important; }
html[data-theme="dark"] body.material-library-page :is(
  .material-state[data-state="superseded"],
  .material-card[data-state="superseded"] .card-status
) { background: #2a3340 !important; color: #b9c7d6 !important; }
html[data-theme="dark"] body.material-library-page :is(.material-meta, .material-caption p, #detail > p, #detail > details) {
  color: var(--muted) !important;
}
