/* Heatmap workspace. Shared colors and type come from the active Refractal theme. */
.rf-heatmap {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}
.rf-heatmap .workspace-heading {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  flex-shrink: 0;
  padding: 16px 20px;
  margin: 0;
  gap: 10px;
  background: var(--rf-surface);
  border-bottom: 1px solid var(--rf-border);
}
.rf-heatmap .workspace-eyebrow {
  font-size: 10px;
  color: var(--rf-muted);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.rf-heatmap .workspace-heading h1 {
  line-height: 1.2;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.rf-heatmap .workspace-heading p {
  font-size: 12px;
  color: var(--rf-muted);
  margin-top: 7px;
}
.rf-heatmap .source-button {
  display: flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid var(--rf-border);
  color: var(--rf-text-dim);
  font-size: 12px;
  height: 32px;
  gap: 9px;
  padding: 7px 11px;
  border-radius: 6px;
  background: var(--rf-surface-2);
  font: inherit;
  margin: 0;
}
.rf-heatmap .source-button > span {
  background: var(--rf-surface-3);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 10px;
}
.rf-heatmap .metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  flex-shrink: 0;
  margin-bottom: 24px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--rf-border);
  border-radius: 0;
  background: var(--rf-bg);
}
.rf-heatmap .workspace-metric {
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  gap: 6px;
  border-right: 1px solid var(--rf-border-soft);
}
.rf-heatmap .workspace-metric:last-child {
  border: 0;
}
.rf-heatmap .workspace-metric > span {
  color: var(--rf-text-dim);
  font-size: 11px;
}
.rf-heatmap .workspace-metric strong {
  font: 500 26px/1.15 var(--rf-mono);
  font-size: 22px;
  letter-spacing: -0.025em;
}
.rf-heatmap .workspace-metric small {
  color: var(--rf-muted);
  line-height: 1.5;
  font-size: 10px;
}
.rf-heatmap .source-disclosure {
  flex-shrink: 0;
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 0;
  width: min(338px, calc(100vw - 24px));
  border: 1px solid var(--rf-border);
  border-radius: 7px;
  background: var(--rf-surface);
  color: var(--rf-text);
  box-shadow: 0 10px 30px #0005;
  overflow: auto;
  max-height: calc(100vh - 150px);
}
.rf-heatmap .source-disclosure-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 12px;
  padding: 12px 16px;
  margin: 0;
  gap: 12px;
  border-bottom: 1px solid var(--rf-border);
  align-items: center;
}
.rf-heatmap .source-disclosure-heading > span {
  color: var(--rf-muted);
  font-size: 11px;
  white-space: nowrap;
}
.rf-heatmap .source-cards {
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  display: block;
}
.rf-heatmap .source-cards > div {
  align-items: center;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 11px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--rf-border);
  font-size: 13px;
}
.rf-heatmap .source-cards strong {
  font-weight: 500;
}
.rf-heatmap .source-cards > div > span:last-child {
  color: var(--rf-muted);
  margin-left: auto;
  white-space: nowrap;
  font-size: 11px;
}
.rf-heatmap .source-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rf-heatmap .investigation-workspace {
  display: flex;
  flex: 1;
  border-bottom: 0;
  overflow: hidden;
  background: var(--rf-bg);
  border: 0;
  border-radius: 0;
  min-height: 260px;
}
.rf-heatmap .identity-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--rf-border);
  overflow: auto;
  width: 240px;
  background: var(--rf-surface);
}
.rf-heatmap .identity-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--rf-border);
}
.rf-heatmap .identity-heading strong {
  font-size: 12px;
  font-weight: 600;
}
.rf-heatmap .identity-heading > span {
  font: 10px var(--rf-mono);
  color: var(--rf-muted);
  background: var(--rf-surface-3);
  padding: 2px 5px;
  border-radius: 4px;
}
.rf-heatmap .identity-heading p {
  width: 100%;
  font-size: 10px;
  color: var(--rf-muted);
}
.rf-heatmap .identity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.rf-heatmap .identity-choice {
  display: flex;
  align-items: center;
  background: transparent;
  text-align: left;
  color: var(--rf-text);
  border: 0;
  border-bottom: 1px solid var(--rf-border-soft);
  border-left: 2px solid transparent;
  border-radius: 0;
  padding: 13px 14px;
  gap: 12px;
}
.rf-heatmap .identity-choice:hover {
  background: var(--rf-surface-2);
}
.rf-heatmap .identity-choice.selected {
  border-color: color-mix(in srgb, var(--rf-brand) 20.784313725490197%, transparent);
  border-left-color: var(--rf-brand);
  background: color-mix(in srgb, var(--rf-brand) 7.0588235294117645%, transparent);
}
.rf-heatmap .identity-avatar {
  height: 29px;
  width: 29px;
  border: 1px solid var(--rf-border);
  background: var(--rf-surface-2);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--rf-muted);
  font-size: 12px;
  flex-shrink: 0;
}
.rf-heatmap .selected .identity-avatar {
  border-color: color-mix(in srgb, var(--rf-brand) 20.784313725490197%, transparent);
  color: var(--rf-brand-soft);
}
.rf-heatmap .identity-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 5px;
}
.rf-heatmap .identity-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}
.rf-heatmap .identity-copy > span {
  color: var(--rf-muted);
  font-size: 11px;
}
.rf-heatmap .identity-separator {
  margin: 0 4px;
  color: var(--rf-meta);
}
.rf-heatmap .identity-footnote {
  font-size: 10px;
  color: var(--rf-muted);
  padding: 20px 16px;
  margin-top: auto;
  line-height: 1.6;
  border-top: 1px solid var(--rf-border-soft);
}
.rf-heatmap .activity-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.rf-heatmap .activity-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding: 16px 20px 14px;
  background: var(--rf-surface);
  padding-bottom: 10px;
}
.rf-heatmap .activity-heading h2 {
  font-size: 15px;
  letter-spacing: 0;
  font-weight: 650;
}
.rf-heatmap .activity-heading p {
  font: 10px var(--rf-mono);
  color: var(--rf-muted);
  font-size: 11px;
  margin-top: 5px;
}
.rf-heatmap .activity-count {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}
.rf-heatmap .activity-count strong {
  font-weight: 500;
  color: var(--rf-text-dim);
}
.rf-heatmap .activity-count > span {
  color: var(--rf-muted);
  font-size: 11px;
}
.rf-heatmap .activity-toolbar {
  display: flex;
  border-bottom: 1px solid var(--rf-border);
  flex-shrink: 0;
  padding: 0 20px 16px;
  gap: 10px;
  align-items: end;
  background: var(--rf-surface);
}
.rf-heatmap .activity-tabs {
  display: flex;
  border-radius: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  gap: 6px;
}
.rf-heatmap .activity-tabs button {
  background: transparent;
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 6px 10px;
  border: 1px solid var(--rf-border);
  border-radius: 7px;
  font-size: 12px;
  color: var(--rf-text-dim);
  font-weight: 500;
}
.rf-heatmap .activity-tabs button[aria-pressed="true"] {
  background: var(--rf-surface-3);
  border-color: var(--rf-text-dim);
  color: var(--rf-text);
  font-weight: 650;
}
.rf-heatmap .activity-search {
  align-items: center;
  margin-left: auto;
  color: var(--rf-muted);
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 150px;
  max-width: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
}
.rf-heatmap .activity-search input {
  color: var(--rf-text);
  min-width: 0;
  width: 100%;
  height: 31px;
  border: 1px solid var(--rf-border);
  border-radius: 6px;
  background: var(--rf-surface-2);
  padding: 0 10px;
  font-size: 12px;
  outline: none;
}
.rf-heatmap .activity-search button {
  border: 0;
  background: transparent;
  color: var(--rf-muted);
}
.rf-heatmap .activity-search:focus-within {
  border-color: var(--rf-brand);
}
.rf-heatmap .activity-table-container {
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.rf-heatmap .activity-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: fixed;
}
.rf-heatmap .activity-table th {
  font-weight: 500;
  color: var(--rf-muted);
  background: var(--rf-surface);
  border-bottom: 1px solid var(--rf-border);
  font-size: 11px;
  padding: 10px 14px;
}
.rf-heatmap .activity-table th:first-child {
  width: 94px;
}
.rf-heatmap .activity-table th:nth-child(3) {
  width: 112px;
}
.rf-heatmap .activity-table th:nth-child(4) {
  width: 170px;
}
.rf-heatmap .activity-table th:last-child {
  width: 30px;
  padding: 0;
}
.rf-heatmap .activity-table th span {
  font-size: 9px;
  color: var(--rf-meta);
  margin-left: 4px;
}
.rf-heatmap .activity-table td {
  border-bottom: 1px solid var(--rf-border-soft);
  vertical-align: top;
  padding: 13px 14px;
}
.rf-heatmap .activity-table tbody tr {
  cursor: pointer;
}
.rf-heatmap .activity-table tbody tr:hover {
  background: var(--rf-surface-2);
}
.rf-heatmap .activity-table td:last-child {
  vertical-align: middle;
  padding: 13px 7px 13px 0;
}
.rf-heatmap .time-cell {
  font: 10px var(--rf-mono);
  color: var(--rf-text-dim);
  font-size: 11px;
}
.rf-heatmap .time-cell small {
  display: block;
  color: var(--rf-meta);
  font-size: 10px;
  margin-top: 5px;
}
.rf-heatmap .action-cell > button {
  font: 500 12px var(--rf-mono);
  color: var(--rf-text);
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  font-family: var(--rf-sans);
  font-size: 13px;
  font-weight: 650;
}
.rf-heatmap .action-cell p {
  line-height: 1.5;
  color: var(--rf-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  margin: 5px 0;
  max-width: 100%;
}
.rf-heatmap .event-metadata {
  align-items: center;
  flex-wrap: wrap;
  display: flex;
  gap: 14px;
  font-size: 10px;
  color: var(--rf-muted);
  row-gap: 5px;
}
.rf-heatmap .event-metadata i {
  font-style: normal;
}
.rf-heatmap .finding-label {
  display: inline-block;
  color: var(--rf-muted);
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 11px;
  font-weight: 600;
}
.rf-heatmap .finding-label.block {
  border-color: color-mix(in srgb, var(--rf-red) 18.823529411764707%, transparent);
  background: none;
  color: var(--rf-text-red);
  border: 0;
}
.rf-heatmap .finding-label.warn {
  border-color: color-mix(in srgb, var(--rf-amber) 18.823529411764707%, transparent);
  background: none;
  color: var(--rf-text-amber);
  border: 0;
}
.rf-heatmap .runtime-label {
  font-weight: 500;
  font-size: 11px;
}
.rf-heatmap .runtime-context {
  display: block;
  color: var(--rf-muted);
  line-height: 1.5;
  font-size: 10px;
  margin-top: 5px;
}
.rf-heatmap .inspect-action {
  color: var(--rf-meta);
  background: transparent;
  border: 0;
  font-size: 19px;
}
.rf-heatmap .activity-footer {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--rf-surface);
  border-top: 1px solid var(--rf-border);
  color: var(--rf-muted);
  flex-shrink: 0;
  font-size: 11px;
  justify-content: flex-start;
  padding: 11px 14px;
}
.rf-heatmap .activity-footer button {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--rf-muted);
  border: 0;
  background: transparent;
  font-size: 11px;
  margin-left: 12px;
}
.rf-heatmap .activity-empty {
  padding: 50px;
  text-align: center;
  font-size: 13px;
}
.rf-heatmap .activity-empty p {
  font-size: 12px;
  color: var(--rf-muted);
  margin: 10px 0;
}
.rf-heatmap .activity-empty button {
  border: 1px solid var(--rf-border);
  border-radius: 6px;
  background: var(--rf-surface);
  color: var(--rf-brand-soft);
  padding: 8px 12px;
  font-size: 12px;
}
.rf-heatmap .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.rf-heatmap .workspace-heading > span {
  font-size: 12px;
  color: var(--rf-muted);
}
.rf-heatmap .workspace-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.rf-heatmap .heatmap-sources {
  position: relative;
  font-size: 12px;
}
.rf-heatmap .source-button:hover,
.rf-heatmap .source-button[aria-expanded="true"] {
  background: var(--rf-surface-3);
  border-color: var(--rf-muted);
}
.rf-heatmap .source-button[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.rf-heatmap .source-disclosure::backdrop {
  background: transparent;
}
.rf-heatmap .source-disclosure-heading strong {
  font-size: 12px;
  font-weight: 500;
}
.rf-heatmap .source-cards svg {
  color: var(--rf-muted);
}
.rf-heatmap .source-disclosure > p {
  padding: 12px 16px;
  font-size: 11px;
  color: var(--rf-muted);
  line-height: 1.5;
}
.rf-heatmap .identity-flag-count {
  font-size: 10px;
  white-space: nowrap;
}
.rf-heatmap .activity-search > span {
  font-size: 10px;
  color: var(--rf-muted);
  font-weight: 600;
}
.rf-heatmap .activity-search input:focus {
  outline: 2px solid var(--rf-brand-soft);
  outline-offset: -2px;
}
.rf-heatmap .activity-tabs button > span {
  font-size: 11px;
  font-weight: 500;
  color: var(--rf-muted);
}
.rf-heatmap .event-metadata > span:first-child {
  font-size: 11px;
}
.rf-heatmap .finding-label.benign {
  font-weight: 400;
}
.rf-heatmap .metric-label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.rf-heatmap .identity-heading .rf-help-trigger {
  margin-left: -5px;
}
.rf-heatmap .activity-table th .rf-help-trigger {
  vertical-align: middle;
}
.rf-heatmap .workspace-heading .rf-help-trigger {
  margin-left: -7px;
}
.rf-heatmap .heatmap-overview {
  flex-shrink: 0;
  border-bottom: 1px solid var(--rf-border);
  background: var(--rf-surface);
}
.rf-heatmap .overview-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--rf-border-soft);
  font-size: 11px;
  color: var(--rf-muted);
}
.rf-heatmap .overview-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  color: var(--rf-text-dim);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 0;
}
.rf-heatmap .overview-toggle[aria-expanded="false"] svg {
  transform: rotate(-90deg);
}
.rf-heatmap .overview-scope {
  display: flex;
  gap: 18px;
  margin-left: auto;
}
.rf-heatmap .overview-toggle-note {
  font-size: 10px;
  pointer-events: none;
  display: none;
}
.rf-heatmap .overview-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr;
}
.rf-heatmap .overview-grid[hidden] {
  display: none;
}
.rf-heatmap .overview-section {
  padding: 12px 20px 14px;
  border-right: 1px solid var(--rf-border-soft);
  min-width: 0;
}
.rf-heatmap .overview-section:last-child {
  border-right: 0;
}
.rf-heatmap .overview-title {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-bottom: 8px;
}
.rf-heatmap .overview-title h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--rf-text-dim);
}
.rf-heatmap .risk-score-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.rf-heatmap .risk-score-line > strong {
  font: 500 23px var(--rf-mono);
}
.rf-heatmap .risk-score-line small {
  font-size: 11px;
  color: var(--rf-muted);
  margin-left: 3px;
}
.rf-heatmap .risk-score-line > span {
  font-size: 10px;
  color: var(--rf-muted);
}
.rf-heatmap .overview-policy-counts {
  display: flex;
  gap: 20px;
}
.rf-heatmap .overview-count {
  display: flex;
  gap: 7px;
  align-items: baseline;
  font-size: 11px;
  color: var(--rf-muted);
}
.rf-heatmap .overview-count strong {
  font: 500 12px var(--rf-mono);
}
.rf-heatmap .overview-data-classes {
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 1px solid var(--rf-border-soft);
  margin-top: 11px;
  padding-top: 8px;
  font-size: 11px;
  color: var(--rf-muted);
}
.rf-heatmap .overview-data-classes > strong {
  margin-left: auto;
  font: 500 12px var(--rf-mono);
  color: var(--rf-text-dim);
}
.rf-heatmap .breakdown-column-labels {
  display: flex;
  justify-content: space-between;
  color: var(--rf-meta);
  font-size: 10px;
  margin-bottom: 6px;
}
.rf-heatmap .breakdown-row {
  display: grid;
  grid-template-columns: minmax(105px, 1.5fr) minmax(24px, 1fr) 60px;
  align-items: center;
  gap: 12px;
  min-height: 24px;
  font-size: 11px;
}
.rf-heatmap .breakdown-name {
  color: var(--rf-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rf-heatmap .breakdown-value {
  font: 10px var(--rf-mono);
  color: var(--rf-text-dim);
  text-align: right;
}
.rf-heatmap .breakdown-bar {
  height: 3px;
  background: var(--rf-border-soft);
  border-radius: 2px;
  overflow: hidden;
}
.rf-heatmap .breakdown-bar > span {
  display: block;
  height: 100%;
  border-radius: 2px;
}
.rf-heatmap .identity-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rf-heatmap .identity-risk {
  font-size: 10px;
  white-space: nowrap;
}
.rf-heatmap .identity-title-row .rf-help-trigger {
  margin-left: -6px;
}
.rf-heatmap .identity-statistics {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 24px;
  padding: 0 20px 13px;
  background: var(--rf-surface);
}
.rf-heatmap .identity-stat-group {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
}
.rf-heatmap .identity-stat-label {
  color: var(--rf-meta);
}
.rf-heatmap .identity-stat-group .rf-help-trigger {
  margin-left: -9px;
  margin-right: -5px;
}
.rf-heatmap .identity-stat {
  display: flex;
  gap: 5px;
  align-items: baseline;
  color: var(--rf-muted);
  white-space: nowrap;
}
.rf-heatmap .identity-stat strong {
  font: 500 11px var(--rf-mono);
  color: var(--rf-text-dim);
}
.rf-heatmap .layer-counts {
  margin-left: auto;
}
.rf-heatmap .source-counts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}
.rf-heatmap .source-counts small {
  font-size: 10px;
  color: var(--rf-muted);
}
.rf-heatmap .overview-policy-caption {
  font-size: 10px;
  color: var(--rf-meta);
  margin-bottom: 5px;
}
.rf-heatmap .modality-zero-rows {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  padding-top: 7px;
  margin-top: 6px;
  border-top: 1px solid var(--rf-border-soft);
  color: var(--rf-muted);
  font-size: 10px;
}
.rf-heatmap .modality-zero-rows strong {
  font: 10px var(--rf-mono);
  margin-left: 4px;
}
.rf-heatmap .metric-action {
  border: 0;
  border-right: 1px solid var(--rf-border-soft);
  border-radius: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  position: relative;
  cursor: pointer;
}
.rf-heatmap .metric-action:hover {
  background: var(--rf-surface-2);
}
.rf-heatmap .metric-action[aria-pressed="true"] {
  background: var(--rf-surface-2);
  box-shadow: inset 0 -2px var(--rf-brand);
}
.rf-heatmap .metric-action:focus-visible {
  outline: 2px solid var(--rf-brand-soft);
  outline-offset: -3px;
}
.rf-heatmap .metric-action-hint {
  display: flex;
  align-items: center;
  gap: 5px;
}
.rf-heatmap .metric-action[aria-pressed="true"] .metric-action-hint {
  color: var(--rf-brand-soft);
}
.rf-heatmap .scope-event-count {
  margin-left: 12px;
}
.rf-heatmap .workspace-result-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 13px;
  background: var(--rf-surface);
  font-size: 11px;
  color: var(--rf-muted);
}
.rf-heatmap .workspace-result-context button {
  font-size: 11px;
  color: var(--rf-brand-soft);
  background: none;
  border: 0;
  padding: 3px 0;
}
.rf-heatmap .activity-table-container:focus-visible {
  outline: 2px solid var(--rf-brand-soft);
  outline-offset: -2px;
}
.rf-heatmap .activity-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
.rf-heatmap .event-metadata .event-identity {
  flex-basis: 100%;
  font-size: 10px;
  font-family: var(--rf-mono);
  color: var(--rf-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rf-heatmap .activity-heading h2:focus {
  outline: none;
}
.rf-heatmap .source-refresh-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
  font-size: 11px;
}
.rf-heatmap .source-refresh-controls > span {
  flex-basis: 100%;
  color: var(--rf-muted);
}
.rf-heatmap .source-refresh-controls button {
  background: var(--rf-surface-2);
  color: var(--rf-text-dim);
  border: 1px solid var(--rf-border);
  border-radius: 6px;
  padding: 6px 8px;
}
.rf-heatmap .heatmap-status {
  padding: 8px 20px;
  color: var(--rf-muted);
  font-size: 11px;
}
@media (max-width: 1250px) {
  .rf-heatmap .overview-section {
    padding-left: 14px;
    padding-right: 14px;
  }
  .rf-heatmap .breakdown-row {
    grid-template-columns: minmax(100px, 1fr) 25px 48px;
    gap: 7px;
  }
  .rf-heatmap .identity-statistics {
    gap: 7px 15px;
  }
  .rf-heatmap .layer-counts {
    margin-left: 0;
  }
  .rf-heatmap .overview-policy-counts {
    gap: 12px;
  }
}
@media (max-height: 820px) {
  .rf-heatmap {
    overflow: auto;
  }
  .rf-heatmap .investigation-workspace {
    flex-shrink: 0;
    min-height: 450px;
  }
  .rf-heatmap .activity-table-container {
    min-height: 200px;
  }
}

/* Case detail sits outside the Heatmap workspace. Keep its rules namespaced. */
.rf-heatmap-finding {
  padding: 13px 14px;
  background: var(--rf-bg);
  border: 1px solid var(--rf-border);
  border-left: 3px solid;
  border-radius: 8px;
}
.rf-heatmap-finding-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.rf-heatmap-finding-heading strong { font-size: 13px; font-weight: 500; }
.rf-heatmap-finding-heading > span { font-size: 11px; font-weight: 600; }
.rf-heatmap-finding-count { font-size: 10px; color: var(--rf-muted); margin-top: 8px; }
.rf-heatmap-finding-refs { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.rf-heatmap-finding-refs code {
  padding: 2px 5px;
  background: var(--rf-surface-2);
  border: 1px solid var(--rf-border);
  border-radius: 4px;
  font: 10px var(--rf-mono);
  color: var(--rf-text-dim);
  overflow-wrap: anywhere;
}
.rf-heatmap-policy-references { display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 1.6; }
.rf-heatmap-policy-reference { border-left: 3px solid; padding-left: 10px; overflow-wrap: anywhere; }
