/* The house table (Egon design system, Table; Frank, 25 Nov 2026).

   One table for every surface: ruled rows, no cell walls, a mono header over a
   1px ink rule. Figure columns align right so place values stack. Loaded by
   templates/base.html (the product and the saved reports) and
   templates/shared/v2/base.html (share pages). A page stylesheet may set column
   widths, table-layout or a cell's content type; it never restyles the table.

   Markup:
     <div class="tbl-wrap"><table class="tbl [tbl--stack|tbl--hold]">
       <caption>what the rows are · how many · span · basis</caption>
       <thead><tr><th scope="col">Sale</th><th scope="col" class="n">Price</th></tr></thead>
       <tbody><tr><td>Phillips New York<span class="tbl__sub">19 May 2026</span></td>
                  <td class="n">$214,000</td></tr></tbody></table></div>

   td.n is a figure (right, mono, never wrapped); td.m is mono left and unwrapped (dates, references).
   tbl--stack: rows stack into labeled lines (each cell's data-label) below 620px.
   tbl--hold: a wide ledger keeps its columns, scrolls, and holds the first column.
   tbl__hide-s: a secondary column hidden below 620px; never the figure a row's claim rests on. */

.tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.tbl{width:100%;margin:0;border-collapse:collapse;font-family:"Newsreader",Georgia,serif;
  font-size:14.5px;line-height:1.5;color:var(--ink);}
.tbl caption{caption-side:top;text-align:left;padding:0 0 12px;font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;line-height:1.5;color:var(--graphite);}
.tbl thead th{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:9.5px;font-weight:500;
  letter-spacing:.16em;text-transform:uppercase;line-height:1.4;color:var(--graphite);text-align:left;
  vertical-align:bottom;background:transparent;border-bottom:1px solid var(--ink);padding:0 16px 7px 0;}
.tbl td,.tbl tbody th{font-weight:400;text-align:left;vertical-align:top;color:var(--ink);background:transparent;
  border-bottom:1px solid var(--rule-soft);padding:9px 16px 9px 0;overflow-wrap:break-word;}
.tbl tr > :last-child{padding-right:0;}
.tbl em{font-style:italic;color:inherit;}

/* figures */
.tbl th.n,.tbl td.n{text-align:right;}
.tbl td.n,.tbl td.m{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:13px;
  font-variant-numeric:tabular-nums;letter-spacing:-.005em;}
.tbl td.n,.tbl td.m{white-space:nowrap;}

/* a cell's second line, and a cell that says why it has no figure */
.tbl__sub{display:block;margin-top:2px;font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:11px;
  font-weight:400;letter-spacing:.02em;line-height:1.45;color:var(--graphite);white-space:normal;}
.tbl__line{display:block;}
.tbl__note{font-family:"Newsreader",Georgia,serif;font-style:italic;font-size:13.5px;letter-spacing:0;
  color:var(--graphite);white-space:normal;}

/* rows */
/* is-excluded: left out of the judgment, its reason on the row; is-muted: a row with no figure (bought in) */
.tbl tr.is-excluded > *,.tbl tr.is-excluded em,.tbl tr.is-excluded .tbl__sub,
.tbl tr.is-muted > *,.tbl tr.is-muted em{color:var(--graphite);}
.tbl tr[hidden]{display:none;}
.tbl tr.tbl__total > *{border-top:1px solid var(--ink);border-bottom:0;padding-top:10px;}
.tbl tr.tbl__total td.n{font-weight:500;}
.tbl--rows tbody tr{cursor:pointer;}
.tbl--rows tbody tr:hover > *{background:color-mix(in srgb, var(--ink) 3%, transparent);}

/* a sortable column: the header is a button, the active one carries aria-sort and an arrow.
   ▲ ▼ belong to movement, so sorting uses ↑ ↓. */
.tbl__sort{font:inherit;letter-spacing:inherit;text-transform:inherit;color:var(--ink);background:transparent;
  border:0;padding:0;cursor:pointer;white-space:nowrap;}

/* a wide ledger: keeps its columns and scrolls; where it can scroll, the first column holds still
   (opaque paper, so only where needed: on a wide screen it would cover the page grain for nothing) */
.tbl--hold{min-width:590px;}
@media (max-width: 760px){
  .tbl--hold th:first-child,.tbl--hold td:first-child{position:sticky;left:0;z-index:1;background:var(--paper);}
}

@media (max-width: 620px){
  .tbl .tbl__hide-s{display:none;}
  .tbl--stack,.tbl--stack tbody,.tbl--stack tr,.tbl--stack td,.tbl--stack tbody th,
  .tbl--stack caption{display:block;width:100%;}
  .tbl--stack thead{display:none;}
  .tbl--stack tr{border-bottom:1px solid var(--rule);padding:10px 0;}
  .tbl--stack td,.tbl--stack tbody th,.tbl--stack td.n,.tbl--stack td.m{border:0;padding-top:3px;padding-bottom:3px;padding-right:0;
    text-align:left;white-space:normal;}
  .tbl--stack td[data-label],.tbl--stack tbody th[data-label]{display:flow-root;padding-left:96px;}
  .tbl--stack [data-label]::before{content:attr(data-label);float:left;width:88px;margin-left:-96px;padding-top:3px;
    font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:10px;font-style:normal;font-weight:400;
    letter-spacing:.1em;text-transform:uppercase;line-height:1.4;color:var(--graphite);}
  .tbl--stack td:empty{display:none;}
}
