/* Таблицы: .table-wrap > table, tr.clickable, td.num; на телефоне строка — карточка с подписью колонки (boot.js: labelTables) */
.table-wrap { --table-head-bg: var(--surface-2); --table-row-hover: var(--surface-2); --table-line: var(--border);
  overflow-x: auto; border: var(--border-w) solid var(--table-line); border-radius: var(--r-lg); background: var(--surface-1); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
th, td { text-align: left; padding: calc(var(--s2) + 2px) var(--s3); border-bottom: var(--border-w) solid var(--table-line, var(--border)); vertical-align: middle; }
th { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--fg-muted); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); background: var(--table-head-bg, var(--surface-2)); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--dur-fast) var(--ease); }
tbody tr:hover { background: var(--table-row-hover, var(--surface-2)); }
tr.clickable { cursor: pointer; }
tr.clickable:active { background: var(--surface-3); }
tr.clickable:focus-visible, tr.clickable:focus-within { outline: var(--focus-w) solid var(--ring); outline-offset: calc(var(--focus-w) * -1); }
td.num { font-family: var(--font-data); font-variant-numeric: tabular-nums; text-align: right; }
.row-title { font-weight: var(--fw-medium); }
.row-title a, .row-title a:visited { text-decoration: none; color: inherit; }
.row-title a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; background: none; }
  .table-wrap > table, .table-wrap > table > tbody { display: block; }
  .table-wrap > table > thead { display: none; }
  .table-wrap > table > tbody > tr { display: block; margin-bottom: var(--s2); padding: var(--s2) var(--s3);
    background: var(--surface-1); border: var(--border-w) solid var(--border); border-radius: var(--r-lg); }
  .table-wrap > table > tbody > tr > td { display: block; padding: 4px 0; border: 0; min-width: 0 !important; text-align: left; }
  .table-wrap > table > tbody > tr > td:empty { display: none; }
  .table-wrap td { overflow-wrap: anywhere; }
  .table-wrap td :is(code, .mono) { white-space: normal; }
  .table-wrap > table > tbody > tr > td[data-label]::before { content: attr(data-label); display: block;
    font-size: var(--fs-xs); font-weight: var(--fw-medium); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--fg-muted); }
  .table-wrap > table > tbody > tr > td.num { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
  .table-wrap > table > tbody > tr > td.num::before { margin: 0; }
  .table-wrap > table > tbody > tr.evidence { margin-top: calc(-1 * var(--s2)); border-top: 0; border-radius: 0 0 var(--r) var(--r); }
}
