/* Quiet frames for colored regions. Inset outlines do not change box sizes. */
:root {
  --region-frame: color-mix(in srgb, var(--primary) 24%, var(--bg-card));
}
:root.dark-theme {
  --region-frame: color-mix(in srgb, var(--primary) 32%, var(--bg-card));
}

/* Group the entire strip; avoid a separate color patch behind each label. */
:is(.lab-shell,.app) .wb .wb-module-grid,
:is(.lab-shell,.app) .wb .wb-metrics {
  background-color: var(--hierarchy-heading);
  border-color: var(--region-frame);
  outline: 1px solid var(--region-frame);
  outline-offset: -1px;
}
:is(.lab-shell,.app) .wb .wb-module-grid { background-color: var(--hierarchy-module); }
:is(.lab-shell,.app) .wb .wb-metric,
:is(.lab-shell,.app) .wb .wb-panel-heading { background-color: transparent; }

/* Existing cards retain their geometry, with one visible edge around each group. */
:is(.lab-shell,.app) .wb .wb-panel,
:is(.lab-shell,.app) .wb.applications-page .wb-app-card:not(:focus-visible),
.lab-shell .lab-content :is(.project-card,.team-card,.report-card,.feature-card,.meeting-card,.gm-card,.stat-card,.metric-card,.insight-tile,.detail-insight,.wp-insight,.kanban-insight,.gantt-insight,.org-kpi,.stat-tile,.hero-stat,.compute-stat,.skill-stat,.meeting-stat):not(:focus-visible),
.lab-shell .lab-content :is(.filter-bar,.summary-strip,.gm-hero-main,.overview-panel,.setup-step,.form-live-panel),
:is(.lab-shell,.app) .rd-page:not(.rd-open) :is(.dc-library-sidebar,.dc-library-row),
.app :is(.mobile-page-heading,.profile-page__header),
.app :is(.pm-projects,.meeting-index,.agent-page) :is(.project-card,.meeting-card,.agent-card):not(:focus-visible) {
  border-color: var(--region-frame);
  outline: 1px solid var(--region-frame);
  outline-offset: -1px;
}

/* Headers already belong to a framed card; a second tinted stripe adds noise. */
.lab-shell .lab-content .project-card > .card-header,
.lab-shell .lab-content .el-card__header { background-color: transparent; }

/* Selected controls have a contained tint. Keep keyboard focus outlines intact. */
:is(.lab-shell,.app) .wb :is(.wb-tabs,.wb-overview-tabs,.wb-filters) button.active:not(:focus-visible),
.lab-shell .lab-nav .lab-nav-item.active:not(:focus-visible),
.lab-shell .lab-nav .lab-subnav .selected:not(:focus-visible),
:is(.lab-shell,.app) .rd-page .dc-library-sidebar button.active:not(:focus-visible) {
  outline: 1px solid var(--region-frame);
  outline-offset: -1px;
}
:is(.lab-shell,.app) .wb.applications-page .wb-app-card:hover:not(:focus-visible) {
  outline-color: var(--primary);
}

/* Leave breathing room between the statistics content and its outer frame. */
:is(.lab-shell,.app) .wb.workbench-home > .wb-metrics {
  padding-inline: 12px;
}
