/* Evidence heatmap (EV-HEATMAP). Rules are scoped to .ev-heatmap. Light theme only. */
.ev-heatmap { color: var(--atlas-text); max-width: 60rem; font-size: 0.9rem; }
.ev-heatmap-toggle { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.ev-heatmap-toggle button {
  font: inherit; padding: 0.3rem 0.8rem; border-radius: var(--atlas-radius-pill); cursor: pointer;
  border: 1px solid var(--atlas-boundary); background: var(--atlas-surface); color: var(--atlas-text);
}
.ev-heatmap-toggle button[aria-pressed="true"] { background: var(--atlas-text); border-color: var(--atlas-text); color: var(--atlas-surface); }
.ev-heatmap-toggle button:focus-visible,
.ev-heatmap-cell:focus-visible,
.ev-heatmap-scroll:focus-visible { outline: 3px solid var(--atlas-accent); outline-offset: 2px; }
.ev-heatmap-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.ev-heatmap-table { border-collapse: separate; border-spacing: 2px; margin: 0.25rem 0; font-variant-numeric: tabular-nums; }
.ev-heatmap-table th { font-weight: 600; text-align: left; padding: 0.3rem 0.5rem; vertical-align: bottom; background: var(--atlas-surface); }
.ev-heatmap-table thead th { font-size: 0.8rem; text-align: center; min-width: 5.5rem; }
.ev-heatmap-table tbody th { white-space: nowrap; font-size: 0.85rem; }
.ev-heatmap-table td { padding: 0; }
.ev-heatmap-cell {
  font: inherit; font-weight: 600; min-width: 4.5rem; min-height: 2.5rem; padding: 0.35rem 0.5rem;
  border: 1px solid var(--atlas-line); border-radius: var(--atlas-radius-control); cursor: pointer;
}
.ev-heatmap-cell:disabled { cursor: default; font-weight: 400; color: var(--atlas-faint) !important; }
.ev-heatmap-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ev-heatmap-legend { display: flex; align-items: center; gap: 0.35rem; margin: 0.5rem 0; font-size: 0.8rem; color: var(--atlas-muted); }
.ev-heatmap-swatch { display: inline-block; width: 1.1rem; height: 1.1rem; border: 1px solid var(--atlas-boundary); border-radius: var(--atlas-radius-control); }
.ev-heatmap-note, .ev-heatmap-empty { margin: 0.4rem 0; color: var(--atlas-muted); font-size: 0.85rem; }
.ev-heatmap-empty { font-style: italic; }
.ev-heatmap-selection { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; margin: 0.4rem 0; }
.ev-heatmap-status { margin: 0; color: var(--atlas-muted); font-size: 0.85rem; }
.ev-heatmap-clear {
  font: inherit; font-size: 0.85rem; padding: 0.25rem 0.8rem; border-radius: var(--atlas-radius-pill); cursor: pointer;
  border: 1px solid var(--atlas-boundary); background: var(--atlas-surface); color: var(--atlas-text);
}
.ev-heatmap-clear:disabled { opacity: 0.5; cursor: default; }
.ev-heatmap-show { font: inherit; font-size: 0.85rem; padding: 0.25rem 0.8rem; border-radius: var(--atlas-radius-pill); cursor: pointer; border: 1px solid var(--atlas-brand); background: var(--atlas-surface); color: var(--atlas-brand); }
.ev-heatmap-show[hidden] { display: none; }
.ev-heatmap-show:hover { background: var(--atlas-brand-wash); }
.ev-heatmap-rowbtn {
  font: inherit; font-size: 0.85rem; font-weight: 600; text-align: left; white-space: nowrap;
  padding: 0.2rem 0.4rem; border: 1px solid transparent; border-radius: var(--atlas-radius-control); cursor: pointer;
  background: transparent; color: var(--atlas-text);
}
.ev-heatmap-rowbtn:disabled { cursor: default; font-weight: 400; color: var(--atlas-faint); }
.ev-heatmap-colbtn {
  font: inherit; font-size: 0.8rem; font-weight: 600; text-align: center; line-height: 1.25;
  padding: 0.2rem 0.3rem; border: 1px solid transparent; border-radius: var(--atlas-radius-control); cursor: pointer;
  background: transparent; color: var(--atlas-text);
}
.ev-heatmap-colbtn:disabled { cursor: default; font-weight: 400; color: var(--atlas-faint); }
.ev-heatmap-check { font-weight: 700; }
/* Selected cells: a 3px dark ring inside a white halo, so the ring shows on dark and light fills. */
.ev-heatmap-cell[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--atlas-text), inset 0 0 0 5px var(--atlas-surface); }
/* Selected topic and column headers: a tinted box with a dark border. */
.ev-heatmap-rowbtn[aria-pressed="true"],
.ev-heatmap-colbtn[aria-pressed="true"] { background: var(--atlas-brand-tint); border-color: var(--atlas-text); }
/* While anything is selected, the unselected non-empty cells recede. */
.ev-heatmap.ev-heatmap-selecting .ev-heatmap-cell:not(:disabled):not([aria-pressed="true"]) { opacity: 0.45; }
