/* tables 1–5 */
.page-table main.wrap { max-width: none; }
.table-head { max-width: 1180px; }
.table-head h1 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tno { font-size: 16px; font-weight: 600; color: var(--muted); }
.controls { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
button.pill { font: inherit; font-size: 13px; cursor: pointer; }
.box { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--ink2); border-radius: 3px; font-size: 11px; line-height: 12px; text-align: center; vertical-align: -2px; }
.filter { font-size: 14px; margin: 8px 0 12px; }
.filter .pill { margin-left: 6px; }
.small { font-size: 12px; }

.table-scroll { width: fit-content; max-width: 100%; overflow: auto; max-height: calc(100vh - 40px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.review { border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.review th, table.review td { border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }

/* header */
table.review thead th { position: sticky; background: #eef2f6; color: var(--ink); font-weight: 600; z-index: 2; }
table.review thead tr:nth-child(1) th { top: 0; }
table.review thead tr:nth-child(2) th { top: 44px; }
table.review thead tr:nth-child(3) th { top: 88px; }
th.grp { height: 44px; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; text-align: center; padding: 4px 6px; line-height: 1.2; }
th.corner { left: 0; z-index: 4 !important; text-align: left; vertical-align: bottom; padding: 8px 12px; min-width: 190px; }
th.lab { vertical-align: bottom; padding: 0; height: 210px; width: 40px; min-width: 40px; max-width: 40px; }
th.lab a { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; color: var(--ink); text-decoration: none; padding: 8px 4px; }
th.lab a:hover { background: #dfe7ef; }
th.lab span { display: block; writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 500; font-size: 12px; line-height: 1.25; max-height: 194px; overflow-wrap: anywhere; margin: 0 auto; }
th.lab.active, th.lab.active a { background: var(--accent); color: #fff; }

/* body */
table.review tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 400; padding: 3px 12px; white-space: nowrap; }
table.review tbody tr.odd th, table.review tbody tr.odd td { background: #f7f9fb; }
table.review tbody tr.state th { padding-left: 30px; color: var(--ink2); }
table.review tbody th a { color: inherit; text-decoration: none; }
table.review tbody th a:hover { color: var(--accent2); text-decoration: underline; }
table.review tbody tr:hover th, table.review tbody tr:hover td:not(.bt) { background: #eaf1f8; }
table.review tr.region th { position: sticky; left: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; padding: 5px 12px; }
table.review td { text-align: center; padding: 0; height: 24px; }
td.bt { font-size: 10px; font-weight: 700; white-space: nowrap; padding: 0 2px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--mark); vertical-align: middle; }

/* totals */
table.review tfoot th, table.review tfoot td { position: sticky; bottom: 0; background: #eef2f6; font-weight: 600; font-size: 12px; padding: 4px 2px; }
table.review tfoot th { left: 0; z-index: 3; text-align: left; padding-left: 12px; }

@media print {
  .page-table main.wrap { padding: 0; }
  .table-scroll { overflow: visible; max-height: none; border: 0; }
  table.review thead th, table.review tbody th, table.review tfoot th, table.review tfoot td { position: static; }
  table.review { font-size: 9px; }
  th.lab { height: 160px; width: 26px; min-width: 26px; max-width: 26px; }
  th.lab span { font-size: 9px; max-height: 150px; }
  td.bt, .dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.review tr.region th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: landscape; margin: 10mm; }
}
@media (max-width: 640px) {
  th.corner { min-width: 120px; }
  table.review tbody th { white-space: normal; min-width: 120px; max-width: 150px; line-height: 1.25; padding-top: 4px; padding-bottom: 4px; }
  table.review tbody tr.state th { padding-left: 20px; }
}
