.matrix-toolbar{margin-bottom:16px;padding:18px;border:1px solid var(--bs-border);border-radius:var(--bs-radius);background:var(--bs-surface)}
.matrix-title h3{margin:0;font-size:18px}.matrix-title p{margin:4px 0 0;color:var(--bs-muted);font-size:10px}
.matrix-actions{display:grid;grid-template-columns:minmax(150px,190px) minmax(260px,1fr) auto;align-items:end;gap:18px;margin-top:16px;padding-top:16px;border-top:1px solid var(--bs-border-quiet)}
.matrix-actions label>span,.matrix-freshness>span{display:block;margin-bottom:7px;color:var(--bs-muted);font-size:8px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.matrix-actions select{width:100%;height:var(--bs-control-height);padding:0 10px;border:1px solid var(--bs-border);border-radius:7px;outline:0;background:var(--bs-canvas);color:var(--bs-text);font-weight:700}
.matrix-actions select:focus{border-color:var(--bs-orange)}.matrix-actions option{background:var(--bs-canvas);color:var(--bs-text)}
.matrix-freshness strong{display:block;color:var(--bs-text);font-size:11px;line-height:var(--bs-control-height)}
.matrix-stack{display:grid;gap:18px}.matrix-accordion>summary{min-height:70px;padding-block:10px}.matrix-summary-copy{display:grid;gap:4px}.matrix-summary-copy small{color:var(--bs-muted);font-weight:500}
.heat-legend{display:flex;align-items:center;gap:9px;color:var(--bs-muted);font-size:9px;white-space:nowrap}.heat-legend i{display:block;width:86px;height:7px;border-radius:999px;background:linear-gradient(90deg,color-mix(in srgb,var(--bs-orange) 8%,transparent),var(--bs-orange))}
.matrix-table-wrap{position:relative;width:100%;overflow:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:var(--bs-orange) var(--bs-canvas)}
.matrix-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums;table-layout:fixed}
.matrix-table caption{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.matrix-table th,.matrix-table td{height:44px;padding:9px 10px;border-right:1px solid var(--bs-border-quiet);border-bottom:1px solid var(--bs-border-quiet);text-align:center}
.matrix-table thead th{position:sticky;z-index:4;background:var(--bs-surface-raised);color:var(--bs-muted);font-size:8px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.matrix-table thead tr:first-child th{top:0;height:42px}.matrix-table thead tr:nth-child(2) th{top:42px;height:54px}
.matrix-table .matrix-key-head,.matrix-table .matrix-key{position:sticky;left:0;width:220px;min-width:220px;max-width:220px;text-align:left;background:var(--bs-surface);box-shadow:1px 0 0 var(--bs-border)}
.matrix-table .matrix-key-head{z-index:8;background:var(--bs-surface-raised)}.matrix-table .matrix-key{z-index:3;color:var(--bs-muted);font-size:9px;letter-spacing:.06em;text-transform:uppercase;white-space:normal}
.matrix-table .matrix-total-head,.matrix-table .matrix-total{position:sticky;left:220px;width:84px;min-width:84px;max-width:84px;z-index:3;background:var(--bs-surface);box-shadow:1px 0 0 var(--bs-border)}
.matrix-table .matrix-total-head{z-index:8;background:var(--bs-surface-raised)}.matrix-table .matrix-total{color:var(--bs-semantic-info);font-weight:800}
.matrix-group{min-width:112px;color:var(--bs-text)!important;border-left:2px solid var(--bs-border)}
.matrix-option{width:112px;min-width:112px;max-width:112px;white-space:normal;line-height:1.25;overflow-wrap:anywhere}.matrix-option.is-group-start,.matrix-cell.is-group-start{border-left:2px solid var(--bs-border)}
.matrix-cell{width:112px;min-width:112px;max-width:112px;background:color-mix(in srgb,var(--bs-orange) var(--heat),transparent);color:var(--bs-text);font-weight:800}.matrix-cell.is-zero{background:transparent;color:color-mix(in srgb,var(--bs-muted) 72%,transparent)}
.matrix-table tbody tr:hover .matrix-key,.matrix-table tbody tr:hover .matrix-total{background:var(--bs-surface-raised)}
@media(max-width:900px){.matrix-actions{grid-template-columns:1fr 1fr}.matrix-actions>.bs-button{grid-column:1/-1}.matrix-table .matrix-key-head,.matrix-table .matrix-key{width:180px;min-width:180px;max-width:180px}.matrix-table .matrix-total-head,.matrix-table .matrix-total{left:180px}}
@media(max-width:560px){.matrix-actions{grid-template-columns:1fr}.matrix-actions>.bs-button{grid-column:auto}.matrix-accordion>summary{display:block}.heat-legend{margin:12px 0 0 22px}.matrix-table .matrix-key-head,.matrix-table .matrix-key{width:150px;min-width:150px;max-width:150px}.matrix-table .matrix-total-head,.matrix-table .matrix-total{left:150px}}
@media print{#matrices{display:none!important}}
