#evidence-matrix {
  margin-block: 1.5rem 2rem;
}
.matrix-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1rem;
  margin-block: 1rem;
}
.matrix-controls label {
  flex: 1 1 15rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
}
.matrix-controls input,
.matrix-controls select,
.matrix-controls .bw-select {
  width: 100%;
}
.matrix-scroll {
  max-height: 44rem;
}
.matrix-table {
  min-width: 1000px;
  table-layout: fixed;
}
.matrix-table th:first-child {
  width: 170px;
  position: sticky;
  left: 0;
  z-index: 1;
}
.matrix-table th {
  white-space: normal;
}
.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.matrix-table thead th:first-child {
  z-index: 3;
}
.matrix-table tbody th {
  background: var(--surface-0);
  overflow-wrap: anywhere;
}
.matrix-table small {
  display: block;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 0.3rem;
}
.matrix-table td {
  min-width: 0;
  padding: 0.35rem;
  vertical-align: middle;
}
.matrix-cell {
  width: 100%;
  min-height: 5rem;
  font-size: 0.8rem;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.matrix-glyph {
  font-size: 1.3rem;
  line-height: 1;
}
.matrix-cell[data-state='present'] {
  background: var(--surface-2);
  border-color: var(--text-tertiary);
}
.matrix-cell[data-state='not_evaluated'],
.matrix-cell[data-state='unavailable'] {
  border-style: dashed;
  color: var(--text-secondary);
}
.matrix-cell[aria-pressed='true'] {
  outline: 2px solid var(--text-primary);
  outline-offset: -2px;
}
.matrix-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-block: 1rem;
}
#matrix-page {
  flex: 1 1 15rem;
}
#matrix-details {
  padding: 1.25rem;
  border: 1px solid var(--color-loom-500);
  border-radius: var(--radius-control);
  margin-block: 1rem;
  overflow-wrap: anywhere;
  background: var(--surface-1);
}
#matrix-details h3 {
  margin-top: 0;
}
#matrix-details .detail-body {
  max-height: 28rem;
  overflow: auto;
}
.matrix-export-figure {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1400px;
}
.matrix-figure {
  font: 16px var(--font-sans);
  fill: var(--text-primary);
}
.matrix-figure rect {
  fill: var(--surface-1);
  stroke: var(--border-default);
}
.matrix-figure rect[data-state='present'] {
  fill: var(--surface-2);
  stroke: var(--text-tertiary);
}
.matrix-figure rect[data-state='not_evaluated'],
.matrix-figure rect[data-state='unavailable'] {
  stroke-dasharray: 4 3;
}
.matrix-figure-title {
  font-size: 24px;
  font-weight: 600;
}
.matrix-figure-state {
  font-size: 14px;
}

.matrix-phase {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.matrix-table .matrix-state-row th {
  top: auto;
  z-index: 1;
}
.matrix-table .matrix-state-row td {
  position: static;
}
.matrix-table .matrix-state-row th,
.matrix-table .matrix-state-row td {
  background: var(--surface-0);
  font-weight: 400;
  vertical-align: top;
}
.drug-note {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-1);
}
.drug-note[data-state='unavailable'] {
  border-style: dashed;
}
.drug-cell .drug-attribution,
.drug-note a {
  overflow-wrap: anywhere;
}
.audit-chart {
  margin-block: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-0);
}
.audit-chart h3 {
  margin-top: 0;
}
@media (forced-colors: active) {
  .matrix-cell[aria-pressed='true'] {
    outline-color: Highlight;
  }
}
/* At desktop width the 420-unit chart would scale its 15 px text up by half again. */
#loeuf-chart .chart-svg-bars {
  max-width: 30rem;
}
