.report-modes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.report-mode {
  min-height: 36px;
  padding: 7px 13px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.report-mode.selected {
  background: var(--surface);
  color: var(--accent-deep);
  box-shadow: 0 1px 3px rgba(19, 33, 45, .12);
}
.report-mode:hover:not(.selected) { background: var(--surface); color: var(--ink); }
.report-mode:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.report-note { margin: 14px 0 0; }
.matrix-wrap { max-height: 68vh; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.matrix-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.matrix-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.matrix-table th, .matrix-table td { border-inline-end: 1px solid var(--line); border-block-end: 1px solid var(--line); }
.matrix-table thead th { position: sticky; top: 0; z-index: 2; background: var(--bg); }
.matrix-table .matrix-person {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  min-width: 190px;
  max-width: 210px;
  background: var(--surface);
  text-align: start;
}
.matrix-table thead .matrix-person { z-index: 3; background: var(--bg); }
.matrix-person strong { display: block; font-size: 13px; }
.matrix-person small, .matrix-date small, .matrix-cell small { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); white-space: normal; }
.matrix-date { min-width: 112px; text-align: start; font-variant-numeric: tabular-nums; }
.matrix-cell { min-width: 112px; max-width: 160px; padding: 10px; vertical-align: top; font-variant-numeric: tabular-nums; }
.matrix-cell .matrix-times { display: block; white-space: nowrap; font-weight: 600; font-size: 13px; }
.matrix-cell.matrix-alert { background: var(--warning-wash); }
.matrix-cell.matrix-alert small { color: var(--warning); }
.matrix-cell.matrix-underwork { box-shadow: inset 0 -3px 0 #d99525; }
.matrix-cell.matrix-danger { background: var(--danger-wash); box-shadow: inset 0 -3px 0 var(--danger); }
.matrix-cell.matrix-danger small { color: var(--danger); }
.matrix-cell.matrix-delayed { outline: 2px dashed #d99525; outline-offset: -4px; }
.matrix-cell.matrix-off { color: var(--muted); background: var(--bg); }
@media (max-width: 760px) {
  .report-modes { display: flex; }
  .report-mode { flex: 1; min-width: 96px; min-height: 44px; padding-inline: 8px; }
  .matrix-wrap { max-height: 60vh; }
  .matrix-table .matrix-person { min-width: 130px; max-width: 150px; }
}
@media print {
  .report-modes, .report-note { display: none !important; }
  .matrix-wrap { max-height: none; overflow: visible; }
  .matrix-table .matrix-person, .matrix-table thead th { position: static; }
}
