/* Domain Pack — Cross-Regulator Coverage panel (KG-v2c) */

/* Domain workspace — flex column so banners → tabs → content stack correctly */
#regintelDomainWorkspace[data-domain-layout="scope"]:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
}

#regintelDomainWorkspace[data-domain-layout="scope"] .wb-workspace-shell {
  grid-row: unset;
  flex: 1 1 0%;
  min-height: 0;
}

/* Tab bar — directly under banners, above holdings */
#regintelDomainWorkspace .wb-domain-pack-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid rgb(226 232 240);
  background: #fff;
  flex-shrink: 0;
  z-index: 5;
}

.wb-domain-pack-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.wb-domain-pack-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(100 116 139);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.wb-domain-pack-tab:hover {
  color: rgb(15 118 110);
}

.wb-domain-pack-tab.is-active {
  color: rgb(15 118 110);
  border-bottom-color: rgb(13 148 136);
}

#regintelDomainWorkspace[data-domain-layout="scope"] .wb-holdings-workbench-body--tabbed {
  flex-direction: column !important;
}

#regintelDomainWorkspace[data-domain-layout="scope"] .wb-domain-pack-tab-panels {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#regintelDomainWorkspace[data-domain-layout="scope"] .wb-domain-tab-panel:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
}

#regintelDomainWorkspace[data-domain-layout="scope"] .wb-domain-overview-pane.wb-holdings-feed {
  padding: 1rem var(--wb-domain-pack-gutter-x, 1rem) 1.5rem;
  background: var(--bg-main, #fff);
}

#regintelDomainWorkspace[data-domain-layout="scope"] .wb-domain-overview-pane .wb-wb-home {
  gap: 1.15rem;
  padding: 0;
}

.wb-domain-pack-tab-panels {
  min-height: 0;
}

.wb-domain-tab-panel.hidden {
  display: none !important;
}

.wb-domain-tab-panel.is-active {
  display: flex;
  flex-direction: column;
}

.wb-domain-overview-pane {
  padding: 0;
}

.wb-domain-card-kg-tag {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(13 148 136);
}

#regintelDomainWorkspace[data-domain-pack-tab="graph"] .wb-holdings-workbench-body--tabbed {
  flex-direction: column !important;
}

#wbDomainTabKnowledgeGraph,
#wbKnowledgeGraphPanel {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wb-kg-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: rgb(255 255 255);
}

.wb-kg-panel-head {
  flex-shrink: 0;
  padding: 0.65rem clamp(0.75rem, 2vw, 1.25rem) 0.55rem;
  border-bottom: 1px solid rgb(226 232 240);
  background: linear-gradient(180deg, rgb(240 253 250 / 0.55) 0%, rgb(255 255 255) 100%);
}

.wb-kg-panel-body {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  overflow: hidden;
  padding: 0;
}

/* Coverage map = full-width dashboard (no theme rails) */
.wb-kg-workspace--coverage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.wb-kg-main--full {
  min-height: 0;
}

/* Theme mapping = browse (left) | detail + table (center) */
.wb-kg-workspace--theme {
  display: grid;
  grid-template-columns: clamp(12rem, 18vw, 18rem) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.wb-kg-workspace--theme .wb-kg-theme-rail-label {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  line-height: 1.35;
}

.wb-kg-workspace--theme .wb-kg-theme-rail-meta {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

.wb-kg-workspace {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.wb-kg-theme-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: rgb(248 250 252);
}

.wb-kg-theme-rail--browse {
  border-right: 1px solid rgb(226 232 240);
}

.wb-kg-theme-rail-item.is-selected {
  background: rgb(240 253 250);
}

.wb-kg-workspace--theme .wb-kg-theme-rail-item.is-selected {
  box-shadow: inset 3px 0 0 rgb(13 148 136);
}

.wb-kg-theme-rail-head {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgb(226 232 240);
  flex-shrink: 0;
}

.wb-kg-theme-rail-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.wb-kg-theme-rail-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}

.wb-kg-theme-rail-search-icon {
  position: absolute;
  left: 0.45rem;
  font-size: 0.5625rem;
  color: rgb(148 163 184);
  pointer-events: none;
}

.wb-kg-theme-rail-search-input {
  width: 100%;
  font-size: 0.6875rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  padding: 0.3rem 0.45rem 0.3rem 1.35rem;
  background: white;
  color: rgb(30 41 59);
}

.wb-kg-theme-rail-search-input:focus {
  outline: 2px solid rgb(153 246 228);
  outline-offset: 0;
  border-color: rgb(13 148 136);
}

.wb-kg-theme-rail-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(71 85 105);
}

.wb-kg-theme-rail-count {
  font-size: 0.625rem;
  font-weight: 700;
  color: rgb(100 116 139);
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
}

.wb-kg-theme-rail-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.wb-kg-theme-rail-group {
  list-style: none;
}

.wb-kg-theme-rail-group-label {
  padding: 0.35rem 0.65rem 0.15rem;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.wb-kg-theme-rail-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wb-kg-theme-rail-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

.wb-kg-theme-rail-btn:hover {
  background: rgb(241 245 249);
}

.wb-kg-theme-rail-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(30 41 59);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-kg-theme-rail-status {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgb(100 116 139);
}

.wb-kg-theme-rail-status-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  flex-shrink: 0;
  background: rgb(148 163 184);
}

.wb-kg-theme-rail-status--is-covered {
  color: rgb(13 148 136);
}

.wb-kg-theme-rail-status--is-covered .wb-kg-theme-rail-status-dot {
  background: rgb(13 148 136);
}

.wb-kg-theme-rail-status--is-gap {
  color: rgb(217 119 6);
}

.wb-kg-theme-rail-status--is-gap .wb-kg-theme-rail-status-dot {
  background: rgb(245 158 11);
}

.wb-kg-theme-rail-status--is-neutral {
  color: rgb(100 116 139);
}

.wb-kg-theme-rail-meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.5625rem;
  color: rgb(100 116 139);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-kg-theme-rail-empty {
  padding: 0.65rem;
}

.wb-kg-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: white;
}

.wb-kg-main-empty {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  text-align: center;
  color: rgb(100 116 139);
}

.wb-kg-main-empty-icon {
  font-size: 1.25rem;
  color: rgb(148 163 184);
}

.wb-kg-main-empty-text {
  font-size: 0.8125rem;
  max-width: 18rem;
  line-height: 1.45;
}

.wb-kg-canvas {
  flex: 1 1 0%;
  min-height: 0;
  overflow: auto;
  padding: 0.5rem clamp(0.5rem, 1.5vw, 0.85rem);
  display: flex;
  flex-direction: column;
}

.wb-kg-matrix-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.wb-kg-main--theme {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.wb-kg-theme-center {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 0.65rem;
  padding: 0.55rem clamp(0.5rem, 1.5vw, 0.85rem) 0.65rem;
  background: rgb(241 245 249);
}

.wb-kg-theme-center .wb-kg-main-empty {
  flex: 1 1 0%;
  border-radius: 0.75rem;
  border: 1px solid rgb(226 232 240);
  background: #fff;
}

.wb-kg-theme-center .wb-kg-detail-panel {
  flex-shrink: 0;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.05);
  overflow: visible;
}

.wb-kg-theme-center .wb-kg-detail-panel-body {
  overflow: visible;
  padding: 0.5rem 0.85rem 0.65rem;
  border-radius: 0 0 0.75rem 0.75rem;
}

.wb-kg-theme-center .wb-kg-detail-rail-head {
  border-radius: 0.75rem 0.75rem 0 0;
  background: rgb(248 250 252);
  flex-shrink: 0;
}

.wb-kg-theme-center .wb-kg-overlap,
.wb-kg-theme-center .wb-kg-compare,
.wb-kg-theme-center .wb-kg-lineage {
  flex-shrink: 0;
}

.wb-kg-theme-center .wb-kg-canvas--table {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.wb-kg-theme-center .wb-kg-connections {
  flex: 0 0 auto;
  min-height: 12rem;
  max-height: none;
}

.wb-kg-detail-panel {
  flex-shrink: 0;
  max-height: 46%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
  overflow: hidden;
}

.wb-kg-detail-panel-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 0.5rem 0.85rem 0.65rem;
}

.wb-kg-theme-center .wb-kg-evidence-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  margin-top: 0.45rem;
}

.wb-kg-theme-center .wb-kg-evidence-card {
  flex: 0 0 11.5rem;
  min-width: 11.5rem;
}

.wb-kg-detail-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border-right: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
}

.wb-kg-back-coverage {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(13 148 136);
  cursor: pointer;
}

.wb-kg-back-coverage:hover {
  text-decoration: underline;
}

.wb-kg-detail-rail-title-block .wb-kg-detail-rail-title {
  margin-top: 0.15rem;
}

.wb-kg-detail-rail.is-empty {
  justify-content: flex-start;
  padding: 0.85rem 1rem;
}

.wb-kg-detail-rail-empty {
  margin-top: 0.5rem !important;
  font-size: 0.75rem;
  color: rgb(100 116 139);
  line-height: 1.5;
}

.wb-kg-detail-rail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem 0.45rem;
  border-bottom: 1px solid rgb(226 232 240);
  flex-shrink: 0;
  background: white;
}

.wb-kg-detail-rail-scroll {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 0.65rem 0.85rem 1rem;
}

.wb-kg-detail-rail-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgb(15 23 42);
  line-height: 1.25;
}

.wb-kg-detail-rail-summary {
  font-size: 0.75rem;
  color: rgb(71 85 105);
  line-height: 1.5;
}

.wb-kg-detail-scorecard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.wb-kg-scorecard-item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.4rem;
  background: rgb(248 250 252);
  min-width: 0;
}

.wb-kg-scorecard-item strong {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgb(15 23 42);
  line-height: 1.2;
}

.wb-kg-scorecard-item span {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgb(100 116 139);
}

.wb-kg-scorecard-item--gap {
  border-color: rgb(253 230 138);
  background: rgb(255 251 235);
}

.wb-kg-scorecard-item--gap strong {
  color: rgb(180 83 9);
}

.wb-kg-detail-rail-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  margin-top: 0.55rem;
  font-size: 0.6875rem;
  color: rgb(100 116 139);
}

.wb-kg-detail-rail-metrics strong {
  color: rgb(15 23 42);
  font-size: 0.8125rem;
}

.wb-kg-detail-rail-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .wb-kg-workspace--theme {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(7rem, 22vh) minmax(0, 1fr);
  }

  .wb-kg-workspace--theme .wb-kg-theme-rail--browse {
    grid-row: 1;
    border-right: none;
    border-bottom: 1px solid rgb(226 232 240);
  }

  .wb-kg-workspace--theme .wb-kg-main--theme {
    grid-row: 2;
  }

  .wb-kg-detail-panel {
    max-height: 40%;
  }
}

@media (max-width: 720px) {
  .wb-kg-workspace--theme {
    grid-template-rows: minmax(6.5rem, 18vh) minmax(0, 1fr);
  }

  .wb-kg-detail-panel {
    max-height: 38%;
  }
}

.wb-kg-panel-head-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.wb-kg-panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgb(15 23 42);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.wb-kg-panel-title-icon {
  color: rgb(13 148 136);
}

.wb-kg-panel-badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgb(13 148 136);
  background: rgb(204 251 241);
  border: 1px solid rgb(153 246 228);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.wb-kg-panel-sub {
  margin-top: 0.35rem !important;
  font-size: 0.6875rem;
  color: rgb(100 116 139);
  line-height: 1.45;
  max-width: 52rem;
}

.wb-kg-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-top: 0.55rem;
}

.wb-kg-stat-chip {
  font-size: 0.6875rem;
  color: rgb(71 85 105);
}

.wb-kg-stat-chip strong {
  color: rgb(15 23 42);
  font-weight: 700;
}

.wb-kg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

.wb-kg-toolbar-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(100 116 139);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.wb-kg-group-select {
  font-size: 0.6875rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  padding: 0.2rem 0.4rem;
  background: white;
}

.wb-kg-legend {
  display: inline-flex;
  gap: 0.65rem;
  color: rgb(100 116 139);
}

.wb-kg-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.wb-kg-legend-glyph.is-linked { color: rgb(13 148 136); }
.wb-kg-legend-glyph.is-illustrative { color: rgb(245 158 11); }
.wb-kg-legend-glyph.is-gap { color: rgb(203 213 225); }

.wb-kg-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

.wb-kg-mode-hint {
  flex: 1 1 100%;
  font-size: 0.625rem;
  color: rgb(100 116 139);
  line-height: 1.4;
  margin-top: 0.15rem !important;
}

.wb-kg-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 16rem;
  flex-wrap: wrap;
}

.wb-kg-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wb-kg-search-wrap {
  display: inline-flex;
}

.wb-kg-search-input {
  font-size: 0.6875rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  padding: 0.3rem 0.55rem;
  min-width: 11rem;
  background: white;
}

.wb-kg-view-toggle {
  display: inline-flex;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  overflow: hidden;
}

.wb-kg-view-btn {
  appearance: none;
  border: none;
  background: white;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(100 116 139);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}

.wb-kg-view-btn + .wb-kg-view-btn {
  border-left: 1px solid rgb(203 213 225);
}

.wb-kg-view-btn.is-active {
  background: rgb(240 253 250);
  color: rgb(13 148 136);
}

.wb-kg-gaps-btn {
  appearance: none;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  background: white;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(100 116 139);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  flex-shrink: 0;
}

.wb-kg-gaps-btn.is-active {
  background: rgb(254 243 199);
  border-color: rgb(245 158 11);
  color: rgb(146 64 14);
}

.wb-kg-stat-chip--gap strong {
  color: rgb(180 83 9);
}

.wb-kg-stat-chip--edges strong {
  color: rgb(13 148 136);
}

.wb-kg-stat-chip--proposed strong {
  color: rgb(217 119 6);
}

.wb-kg-matrix-cell-edges {
  display: inline-block;
  margin-left: 0.15rem;
  padding: 0 0.2rem;
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: rgb(13 148 136);
  background: rgb(240 253 250);
  border: 1px solid rgb(153 246 228);
  border-radius: 2px;
  vertical-align: middle;
}

.wb-kg-legend-swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  vertical-align: middle;
}

.wb-kg-legend-swatch.is-linked { background: rgb(16 185 129); }
.wb-kg-legend-swatch.is-illustrative { background: rgb(245 158 11); }
.wb-kg-legend-swatch.is-gap { background: rgb(203 213 225); }

.wb-kg-panel-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* panel-body layout rules moved above — avoid duplicate stack layout */
.wb-kg-canvas-legacy-stack {
  display: none;
}

.wb-kg-empty-msg {
  font-size: 0.6875rem;
  color: rgb(100 116 139);
  margin: 0;
  padding: 0.5rem 0;
}

.wb-kg-drawer,
.wb-kg-drawer-head,
.wb-kg-drawer-title,
.wb-kg-drawer-close,
.wb-kg-drawer-summary,
.wb-kg-drawer-metrics,
.wb-kg-drawer-coverage {
  /* legacy bottom drawer — replaced by .wb-kg-detail-rail */
  display: none;
}

.wb-kg-evidence-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.wb-kg-coverage-dot {
  font-size: 0.625rem;
  font-weight: 700;
  color: rgb(5 150 105);
  background: rgb(209 250 229);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.wb-kg-coverage-more {
  font-size: 0.625rem;
  color: rgb(100 116 139);
}

.wb-kg-action-btn--ghost {
  background: transparent;
  border-color: rgb(203 213 225);
  color: rgb(71 85 105);
}

.wb-kg-evidence-card {
  border: 1px solid rgb(226 232 240);
  border-radius: 0.375rem;
  padding: 0.55rem 0.65rem;
  background: white;
}

.wb-kg-evidence-card.is-focus {
  border-color: rgb(45 212 191);
  background: rgb(240 253 250);
}

.wb-kg-evidence-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.6875rem;
}

.wb-kg-evidence-reg {
  font-weight: 700;
  color: rgb(5 150 105);
}

.wb-kg-evidence-strength {
  color: rgb(100 116 139);
  font-weight: 600;
}

.wb-kg-evidence-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(30 41 59);
  margin-top: 0.25rem !important;
  line-height: 1.35;
}

.wb-kg-evidence-meta {
  font-size: 0.6875rem;
  color: rgb(100 116 139);
  margin-top: 0.2rem !important;
  line-height: 1.4;
}

/* Ontology map — d3-org-chart interactive tree */
.wb-kg-ontology-wrap {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  overflow: hidden;
}

.wb-kg-ontology-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
  flex-shrink: 0;
}

.wb-kg-ontology-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.wb-kg-ontology-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.wb-kg-onto-tool-btn {
  appearance: none;
  border: 1px solid rgb(203 213 225);
  background: white;
  color: rgb(51 65 85);
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.wb-kg-onto-tool-btn:hover {
  border-color: rgb(13 148 136);
  color: rgb(13 148 136);
}

.wb-kg-ontology-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.wb-kg-ontology-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(100 116 139);
}

.wb-kg-ontology-meta {
  font-size: 0.6875rem;
  color: rgb(100 116 139);
  white-space: nowrap;
}

.wb-kg-ontology-chart-host {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: rgb(252 252 253);
  background-image: radial-gradient(circle at 1px 1px, rgb(226 232 240) 1px, transparent 0);
  background-size: 18px 18px;
}

.wb-kg-ontology-chart-host svg {
  width: 100%;
  height: 100%;
}

.wb-kg-ontology-foot {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  border-top: 1px solid rgb(241 245 249);
  font-size: 0.625rem;
  color: rgb(100 116 139);
  background: rgb(248 250 252);
}

/* d3-org-chart node cards (foreignObject HTML) — compact pills */
.wb-kg-onto-node {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0.2rem 0.4rem;
  border-radius: 0.3rem;
  border: 1px solid rgb(203 213 225);
  background: white;
  box-shadow: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  font-family: Inter, system-ui, sans-serif;
  text-align: left;
  overflow: hidden;
}

.wb-kg-onto-node--pack {
  border-color: rgb(13 148 136);
  background: rgb(240 253 250);
  justify-content: center;
}

.wb-kg-onto-node--type {
  border-color: rgb(148 163 184);
  background: rgb(248 250 252);
}

.wb-kg-onto-node--theme {
  border-color: rgb(147 197 253);
  cursor: pointer;
  justify-content: flex-start;
}

.wb-kg-onto-node--theme:hover {
  border-color: rgb(59 130 246);
  background: rgb(239 246 255);
}

.wb-kg-onto-node.is-selected {
  border-color: rgb(13 148 136);
  background: rgb(204 251 241);
  box-shadow: 0 0 0 1px rgb(13 148 136 / 0.35);
}

.wb-kg-onto-node-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(30 41 59);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}

.wb-kg-onto-node-meta {
  flex-shrink: 0;
  font-size: 0.5625rem;
  font-weight: 700;
  color: rgb(100 116 139);
  background: rgb(241 245 249);
  border-radius: 999px;
  padding: 0.05rem 0.3rem;
  line-height: 1.3;
}

.wb-kg-legend-swatch.is-type {
  background: rgb(100 116 139);
}

.wb-kg-legend-swatch.is-theme {
  background: rgb(59 130 246);
}

/* Theme mapping — connected regulators table */
.wb-kg-connections {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  overflow: hidden;
}

.wb-kg-connections--empty {
  padding: 1.5rem;
  justify-content: center;
}

.wb-kg-connections-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
  flex-shrink: 0;
}

.wb-kg-connections-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.wb-kg-connections-type {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(71 85 105);
}

.wb-kg-connections-meta {
  font-size: 0.6875rem;
  color: rgb(100 116 139);
  white-space: nowrap;
}

.wb-kg-connections-table-wrap {
  flex: 1 1 0%;
  min-height: 0;
  overflow: auto;
}

.wb-kg-connections-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.wb-kg-connections-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgb(248 250 252);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgb(100 116 139);
  text-align: left;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid rgb(226 232 240);
}

.wb-kg-connections-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgb(241 245 249);
  color: rgb(51 65 85);
  vertical-align: top;
}

.wb-kg-connections-row.is-selected td {
  background: rgb(240 253 250);
}

.wb-kg-connections-row:hover td {
  background: rgb(248 250 252);
}

.wb-kg-connections-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgb(15 118 110);
  cursor: pointer;
  text-align: left;
}

.wb-kg-connections-btn:hover {
  text-decoration: underline;
}

.wb-kg-strength-pill {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}

.wb-kg-strength-pill.is-linked {
  color: rgb(6 95 70);
  background: rgb(209 250 229);
}

.wb-kg-strength-pill.is-illustrative {
  color: rgb(146 64 14);
  background: rgb(254 243 199);
}

.wb-kg-connections-td-count {
  font-weight: 700;
  color: rgb(30 41 59);
  white-space: nowrap;
}

.wb-kg-connections-td-label {
  font-size: 0.6875rem;
  color: rgb(71 85 105);
  max-width: 16rem;
}

.wb-kg-theme-list-wrap {
  padding: 0.25rem 0;
}

.wb-kg-theme-list {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.375rem;
  overflow: hidden;
}

.wb-kg-theme-list-item + .wb-kg-theme-list-item {
  border-top: 1px solid rgb(241 245 249);
}

.wb-kg-theme-list-item.is-selected {
  background: rgb(240 253 250);
}

.wb-kg-theme-list-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.wb-kg-theme-list-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(30 41 59);
}

.wb-kg-theme-list-meta {
  font-size: 0.5625rem;
  color: rgb(100 116 139);
  white-space: nowrap;
}

.wb-kg-picker-prompt {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(51 65 85);
  margin-bottom: 0.55rem !important;
}

.wb-kg-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.4rem;
}

.wb-kg-picker-chip {
  text-align: left;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.375rem;
  background: white;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
}

.wb-kg-picker-chip:hover {
  border-color: rgb(59 130 246);
  background: rgb(239 246 255);
}

.wb-kg-picker-chip-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  color: rgb(30 41 59);
}

.wb-kg-picker-chip-meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.5625rem;
  color: rgb(100 116 139);
}

.wb-kg-col-total {
  display: block;
  font-size: 0.5rem;
  font-weight: 600;
  color: rgb(148 163 184);
}

.wb-kg-matrix-th-total,
.wb-kg-matrix-total {
  background: rgb(248 250 252);
  font-size: 0.5625rem;
  font-weight: 700;
  color: rgb(100 116 139);
  text-align: center;
  padding: 0.35rem 0.4rem;
}

.wb-kg-heat-stack {
  display: flex;
  gap: 1px;
  align-items: flex-end;
  height: 0.75rem;
}

.wb-kg-heat-bar {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 1px;
  background: rgb(226 232 240);
}

.wb-kg-matrix-cell.is-linked .wb-kg-heat-bar.is-on { background: rgb(16 185 129); }
.wb-kg-matrix-cell.is-illustrative .wb-kg-heat-bar.is-on { background: rgb(245 158 11); }
.wb-kg-matrix-cell.is-gap .wb-kg-heat-bar.is-on { background: rgb(203 213 225); }

.wb-kg-overview-cta {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgb(226 232 240);
}

.wb-kg-overview-cta-btn {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(13 148 136);
  background: transparent;
  border: 1px solid rgb(153 246 228);
  border-radius: 0.375rem;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

.wb-kg-overview-cta-btn:hover {
  background: rgb(240 253 250);
}

/* Legacy hub/detail — removed from layout; keep matrix base styles below */

.wb-kg-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
}

.wb-kg-matrix-th-theme {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgb(248 250 252);
  box-shadow: 2px 0 4px rgb(15 23 42 / 0.04);
}

.wb-kg-matrix-th-reg {
  text-align: center;
  font-size: 0.6875rem;
  min-width: 3.25rem;
}

.wb-kg-matrix-theme-btn {
  padding: 0.5rem 0.55rem;
  font-size: 0.75rem;
}

.wb-kg-matrix-cell-btn {
  min-width: 3rem;
  min-height: 2.35rem;
}

.wb-kg-matrix th,
.wb-kg-matrix td {
  border: 1px solid rgb(226 232 240);
  padding: 0;
  vertical-align: middle;
}

.wb-kg-matrix-th-theme,
.wb-kg-matrix-th-reg {
  background: rgb(248 250 252);
  font-weight: 700;
  color: rgb(51 65 85);
  padding: 0.35rem 0.5rem;
  white-space: nowrap;
}

.wb-kg-matrix-th-reg {
  text-align: center;
  font-size: 0.625rem;
}

.wb-kg-matrix-group-row th {
  background: rgb(241 245 249);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(100 116 139);
  padding: 0.3rem 0.5rem;
  text-align: left;
}

.wb-kg-matrix-theme-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.4rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(30 41 59);
  cursor: pointer;
}

.wb-kg-matrix-row.is-selected .wb-kg-matrix-theme-btn,
.wb-kg-matrix-theme-btn:hover {
  color: rgb(13 148 136);
}

.wb-kg-matrix-row.is-selected th {
  background: rgb(240 253 250);
}

.wb-kg-matrix-row.is-in-scope th {
  box-shadow: inset 3px 0 0 rgb(13 148 136);
}

.wb-kg-matrix-row-meta {
  display: block;
  font-size: 0.5625rem;
  font-weight: 500;
  color: rgb(100 116 139);
  margin-top: 0.1rem;
}

.wb-kg-live-badge {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
  color: rgb(13 148 136);
  background: rgb(204 251 241);
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
}

.wb-kg-matrix-cell-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 100%;
  min-width: 2.5rem;
  min-height: 2rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
}

.wb-kg-matrix-cell.is-linked { background: rgb(236 253 245 / 0.35); }
.wb-kg-matrix-cell.is-illustrative { background: rgb(255 251 235 / 0.45); }
.wb-kg-matrix-cell.is-gap { background: rgb(248 250 252); }

.wb-kg-matrix-cell.is-cell-selected .wb-kg-matrix-cell-btn {
  background: rgb(240 253 250);
  outline: 2px solid rgb(45 212 191);
  outline-offset: -2px;
}

.wb-kg-matrix-cell-count {
  font-size: 0.5625rem;
  font-weight: 700;
  color: rgb(71 85 105);
}

.wb-kg-selection-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(16rem, 1.4fr);
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgb(226 232 240);
}

@media (max-width: 900px) {
  .wb-kg-selection-row {
    grid-template-columns: 1fr;
  }
}

.wb-kg-hub-canvas {
  position: relative;
  min-height: 11rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  background: radial-gradient(circle at 50% 50%, rgb(240 253 250) 0%, rgb(255 255 255) 68%);
}

.wb-kg-hub-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  max-width: 42%;
}

.wb-kg-hub-center-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: rgb(15 23 42);
  line-height: 1.25;
}

.wb-kg-hub-type {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.5625rem;
  font-weight: 600;
  color: rgb(13 148 136);
  background: rgb(204 251 241);
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
}

.wb-kg-hub-spoke {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 1px solid rgb(153 246 228);
  background: white;
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  font-size: 0.5625rem;
  font-weight: 700;
  color: rgb(15 118 110);
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
  z-index: 1;
}

.wb-kg-hub-spoke:hover {
  background: rgb(240 253 250);
}

.wb-kg-hub-spoke-count {
  margin-left: 0.15rem;
  color: rgb(71 85 105);
}

.wb-kg-hub-bottom {
  position: absolute;
  left: 50%;
  bottom: 0.45rem;
  transform: translateX(-50%);
  text-align: center;
  font-size: 0.5625rem;
  color: rgb(100 116 139);
}

.wb-kg-hub-obl-count {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.wb-kg-hub-more {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  color: rgb(100 116 139);
}

.wb-kg-detail {
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: rgb(248 250 252 / 0.5);
}

.wb-kg-detail-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.wb-kg-detail-type {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.5625rem;
  font-weight: 600;
  color: rgb(13 148 136);
  background: rgb(204 251 241);
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
}

.wb-kg-detail-summary {
  margin-top: 0.35rem !important;
  font-size: 0.6875rem;
  color: rgb(71 85 105);
  line-height: 1.45;
}

.wb-kg-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.45rem;
  font-size: 0.625rem;
  color: rgb(100 116 139);
}

.wb-kg-detail-stats strong {
  color: rgb(15 23 42);
}

.wb-kg-live-line {
  margin-top: 0.35rem !important;
}

.wb-kg-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.wb-kg-action-btn {
  font-size: 0.625rem;
  font-weight: 600;
  border: 1px solid rgb(13 148 136);
  background: rgb(13 148 136);
  color: white;
  border-radius: 0.375rem;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}

.wb-kg-action-btn--secondary {
  background: white;
  color: rgb(13 148 136);
}

.wb-kg-impl-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.55rem;
  max-height: 14rem;
  overflow-y: auto;
}

.wb-kg-impl-card {
  border: 1px solid rgb(226 232 240);
  border-radius: 0.375rem;
  padding: 0.4rem 0.5rem;
  background: white;
}

.wb-kg-impl-card.is-focus {
  border-color: rgb(45 212 191);
  background: rgb(240 253 250);
}

.wb-kg-impl-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.5625rem;
}

.wb-kg-impl-meta {
  font-weight: 700;
  color: rgb(51 65 85);
}

.wb-kg-impl-strength {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgb(100 116 139);
}

.wb-kg-impl-label {
  font-size: 0.625rem;
  color: rgb(51 65 85);
  margin-top: 0.15rem !important;
}

.wb-kg-impl-link {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.5625rem;
  font-weight: 600;
  color: rgb(13 148 136);
}

/* KG-v3 — regulator overlap, firm coverage, lineage */
.wb-kg-overlap {
  flex-shrink: 0;
  margin: 0 0 0.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  background: #fff;
}

.wb-kg-overlap-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.wb-kg-overlap-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.wb-kg-overlap-sub {
  font-size: 0.5625rem;
  color: rgb(100 116 139);
}

.wb-kg-overlap-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.2rem 0;
  font-size: 0.625rem;
}

.wb-kg-overlap-label {
  flex: 0 0 8.5rem;
  font-weight: 700;
  color: rgb(71 85 105);
}

.wb-kg-overlap-regs {
  color: rgb(30 41 59);
  line-height: 1.35;
}

.wb-kg-overlap-row.is-shared .wb-kg-overlap-label { color: rgb(4 120 87); }
.wb-kg-overlap-row.is-partial .wb-kg-overlap-label { color: rgb(180 83 9); }
.wb-kg-overlap-row.is-missing .wb-kg-overlap-label { color: rgb(100 116 139); }

.wb-kg-lineage {
  flex-shrink: 0;
  margin: 0 0 0.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  background: rgb(248 250 252);
}

.wb-kg-lineage-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.wb-kg-lineage-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.wb-kg-lineage-link-btn {
  font-size: 0.5625rem;
  font-weight: 600;
  color: rgb(13 148 136);
  text-decoration: none;
}

.wb-kg-lineage-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.45rem;
}

.wb-kg-lineage-card {
  padding: 0.45rem 0.55rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  background: #fff;
}

.wb-kg-lineage-head {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.wb-kg-lineage-reg {
  font-size: 0.625rem;
  font-weight: 700;
  color: rgb(30 41 59);
}

.wb-kg-lineage-status {
  font-size: 0.5625rem;
  font-weight: 600;
  color: rgb(100 116 139);
}

.wb-kg-lineage-obl {
  font-size: 0.5625rem;
  color: rgb(71 85 105);
  line-height: 1.35;
}

.wb-kg-lineage-link {
  margin-top: 0.2rem !important;
  font-size: 0.5625rem;
  color: rgb(51 65 85);
}

.wb-kg-lineage-kind {
  font-weight: 700;
  color: rgb(100 116 139);
  margin-right: 0.2rem;
}

.wb-kg-firm-wrap {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 0.65rem clamp(0.5rem, 1.5vw, 0.85rem) 0.85rem;
}

.wb-kg-firm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.wb-kg-firm-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.wb-kg-firm-sub {
  margin-top: 0.15rem !important;
  font-size: 0.6875rem;
  color: rgb(100 116 139);
}

.wb-kg-firm-scorecards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.wb-kg-firm-stat {
  padding: 0.45rem 0.5rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  background: #fff;
}

.wb-kg-firm-stat strong {
  display: block;
  font-size: 0.875rem;
  color: rgb(15 23 42);
}

.wb-kg-firm-stat span {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.wb-kg-firm-stat--gap {
  border-color: rgb(253 230 138);
  background: rgb(255 251 235);
}

.wb-kg-firm-stat--warn strong {
  color: rgb(180 83 9);
}

.wb-kg-firm-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 960px) {
  .wb-kg-firm-panels {
    grid-template-columns: 1fr 1fr;
  }
}

.wb-kg-firm-panel {
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
  min-height: 12rem;
}

.wb-kg-firm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgb(241 245 249);
  background: rgb(248 250 252);
}

.wb-kg-firm-panel-head h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgb(30 41 59);
}

.wb-kg-firm-panel-meta {
  font-size: 0.5625rem;
  font-weight: 600;
  color: rgb(100 116 139);
}

.wb-kg-firm-panel .wb-kg-empty-msg,
.wb-kg-firm-table-wrap {
  padding: 0.55rem 0.75rem 0.75rem;
}

.wb-kg-firm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.625rem;
}

.wb-kg-firm-table th,
.wb-kg-firm-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid rgb(241 245 249);
  text-align: left;
  vertical-align: top;
}

.wb-kg-firm-table th {
  font-weight: 700;
  color: rgb(100 116 139);
}

.wb-kg-firm-gap-obl {
  max-width: 16rem;
  color: rgb(71 85 105);
  line-height: 1.35;
}

.wb-kg-firm-gap-pill {
  display: inline-block;
  font-size: 0.5625rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  background: rgb(254 243 199);
  color: rgb(146 64 14);
}

.wb-kg-firm-status {
  font-size: 0.5625rem;
  font-weight: 600;
}

.wb-kg-firm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 14rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px dashed rgb(203 213 225);
  border-radius: 0.75rem;
  background: rgb(248 250 252);
}

.wb-kg-firm-empty-icon {
  font-size: 1.75rem;
  color: rgb(148 163 184);
}

.wb-kg-firm-empty-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(30 41 59);
}

.wb-kg-firm-empty-text {
  font-size: 0.6875rem;
  color: rgb(100 116 139);
  max-width: 24rem;
  line-height: 1.45;
}

/* KG-v4 — regulator compare */
.wb-kg-compare {
  flex-shrink: 0;
  margin: 0 0 0.5rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
}

.wb-kg-compare-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgb(241 245 249);
  background: rgb(248 250 252);
}

.wb-kg-compare-head-text {
  flex: 1 1 10rem;
  min-width: 0;
}

.wb-kg-compare-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.wb-kg-compare-sub {
  display: block;
  font-size: 0.5625rem;
  color: rgb(100 116 139);
}

.wb-kg-compare-picks {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.wb-kg-compare-pick {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.5625rem;
  font-weight: 600;
  color: rgb(100 116 139);
}

.wb-kg-compare-select {
  font-size: 0.625rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.3rem;
  background: #fff;
  min-width: 5.5rem;
}

.wb-kg-compare-vs {
  font-size: 0.625rem;
  font-weight: 700;
  color: rgb(148 163 184);
  padding-bottom: 0.25rem;
}

.wb-kg-compare-body {
  padding: 0.55rem 0.75rem 0.65rem;
}

.wb-kg-compare-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

@media (max-width: 720px) {
  .wb-kg-compare-cols {
    grid-template-columns: 1fr;
  }
}

.wb-kg-compare-col {
  padding: 0.5rem 0.55rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  background: rgb(248 250 252);
  min-width: 0;
}

.wb-kg-compare-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
}

.wb-kg-compare-col-reg {
  font-size: 0.6875rem;
  font-weight: 700;
  color: rgb(30 41 59);
}

.wb-kg-compare-strength {
  font-size: 0.5625rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
}

.wb-kg-compare-strength.is-aligned {
  background: rgb(209 250 229);
  color: rgb(4 120 87);
}

.wb-kg-compare-strength.is-partial {
  background: rgb(254 243 199);
  color: rgb(180 83 9);
}

.wb-kg-compare-strength.is-gap {
  background: rgb(241 245 249);
  color: rgb(100 116 139);
}

.wb-kg-compare-impl {
  font-size: 0.625rem;
  color: rgb(51 65 85);
  line-height: 1.35;
}

.wb-kg-compare-obl-list {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  font-size: 0.5625rem;
  color: rgb(71 85 105);
  line-height: 1.4;
}

.wb-kg-compare-obl-empty,
.wb-kg-compare-loading {
  margin-top: 0.35rem !important;
  font-size: 0.5625rem;
  color: rgb(148 163 184);
}

.wb-kg-compare-buckets {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.wb-kg-compare-bucket {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.35rem;
  background: rgb(241 245 249);
  font-size: 0.5625rem;
}

.wb-kg-compare-bucket-label {
  font-weight: 700;
  color: rgb(51 65 85);
}

.wb-kg-compare-bucket-detail {
  color: rgb(100 116 139);
  line-height: 1.35;
}

.wb-kg-compare-bucket.is-common {
  background: rgb(236 253 245);
}

.wb-kg-compare-bucket.is-conflict_check {
  background: rgb(239 246 255);
}

.wb-kg-compare-obl-open {
  margin-left: 0.35rem;
  font-size: 0.5rem;
  font-weight: 600;
  color: rgb(13 148 136);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.wb-kg-compare-analysis {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgb(241 245 249);
}

.wb-kg-compare-analysis-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.wb-kg-compare-analysis-head h5 {
  font-size: 0.6875rem;
  font-weight: 700;
  color: rgb(30 41 59);
}

.wb-kg-compare-analysis-sub {
  font-size: 0.5rem;
  color: rgb(148 163 184);
}

.wb-kg-compare-analysis-block {
  margin-bottom: 0.45rem;
}

.wb-kg-compare-analysis-block h6 {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgb(100 116 139);
  margin-bottom: 0.25rem;
}

.wb-kg-compare-pair {
  padding: 0.4rem 0.45rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.4rem;
  background: rgb(248 250 252);
  margin-bottom: 0.35rem;
}

.wb-kg-compare-pair.is-conflict {
  border-color: rgb(254 215 170);
  background: rgb(255 251 235);
}

.wb-kg-compare-pair-badge {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 700;
  color: rgb(4 120 87);
  margin-bottom: 0.2rem;
}

.wb-kg-compare-pair.is-conflict .wb-kg-compare-pair-badge {
  color: rgb(180 83 9);
}

.wb-kg-compare-pair-line {
  font-size: 0.5625rem;
  color: rgb(71 85 105);
  line-height: 1.35;
}

.wb-kg-compare-pair-actions {
  margin-top: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.wb-domain-tab-hint {
  line-height: 1.5;
}
