/* ============================================================
   tul-layout-v1.css - one page width and one table for every staff app
   (Nick, 2026-09-24). Byte-identical at the repo root (TALIA) and in
   titan/, terra/, tyr/ and tavi/ - tests/test_tul_layout.js fails if the
   copies drift. Each page links it after its app's own stylesheets.

   PAGES. A page names its width on its outer content container:
     class="page page--register"   lists and logs                 1920px
     class="page page--dashboard"  a home, a record's dashboard   1560px
     class="page page--form"       one form, document or chat     1120px
   The container sits centered in the room beside the rail, so on a wide
   screen the spare room splits evenly left and right, and every page gets
   the same fluid side gutter. Only a tier is styled: a bare .page (TAVI's
   .wrap.page, the letter-size print sheets) is left alone. Two classes, so
   a tier beats a page's own .wrap / .sheet / .reg rule without !important.
   Side padding only - a page keeps its own top and bottom spacing. Screen
   only - print keeps each page's own rules. A canvas (a schedule, a
   drawing, a sketch, an editor with its own toolbar) takes no tier and
   keeps the whole width. --page-w carries the tier's width for a shell
   that has to reckon with it (TITAN pages with no .app, titan-ui-v1.css).

   TABLES. <table class="tbl">: fixed layout, rows at least 44px, one
   hairline between rows, a hover tint. The header cells size the columns:
     col-flex     the name - takes the room the others leave
     col-status   110px        col-date   104px
     col-money    120px, right-aligned, tabular figures
     col-count    104px, centred, tabular figures (an open count)
     col-actions  112px, right-aligned, stays in view when the table scrolls
   A header wraps rather than spilling into its neighbour, so keep each
   header word shorter than its column. Fixed layout ignores min-width on a
   cell, so a table that can get narrow sets its own floor
   (style="--tbl-min:720px") inside a box with overflow-x:auto. The actions
   column then sticks to that box's right edge, painted with --tbl-bg (the
   surface under the table; default the card colour) so rows sliding under
   it do not show through.
   ============================================================ */
:root{
  --w-register:1920px;
  --w-dashboard:1560px;
  --w-form:1120px;
  --page-pad:clamp(16px,2vw,32px);
}

.page--register{--page-w:var(--w-register)}
.page--dashboard{--page-w:var(--w-dashboard)}
.page--form{--page-w:var(--w-form)}

@media screen{
  .page.page--register,.page.page--dashboard,.page.page--form{
    box-sizing:border-box;
    width:100%;
    max-width:var(--page-w);
    margin-left:auto;
    margin-right:auto;
    padding-left:var(--page-pad);
    padding-right:var(--page-pad);
  }
}

.tbl{width:100%;min-width:var(--tbl-min,0);table-layout:fixed;border-collapse:collapse}
.tbl td,.tbl th{height:44px;border-bottom:1px solid var(--line,#2a2a2e)}
.tbl .col-flex{width:auto;min-width:240px}
.tbl .col-status{width:110px}
.tbl .col-date{width:104px}
.tbl .col-money{width:120px;text-align:right;font-variant-numeric:tabular-nums}
.tbl .col-count{width:104px;text-align:center;font-variant-numeric:tabular-nums}
.tbl thead th{white-space:normal}
.tbl .col-actions{width:112px;text-align:right;position:sticky;right:0;background-color:var(--tbl-bg,var(--bg2,#161618))}
.tbl tbody tr:hover{background:var(--row-hover,rgba(168,159,147,.07))}
.tbl tbody tr:hover .col-actions{background-image:linear-gradient(var(--row-hover,rgba(168,159,147,.07)),var(--row-hover,rgba(168,159,147,.07)))}

/* EMPTY VALUE (the design sweep, DS-01 / DS-02, 2026-10-20). A cell or field with nothing in it shows
   <span class="nil" aria-label="none"></span>: the mark is drawn here, so the family changes it in one place
   (--nil-mark: a muted hyphen - Nick 10-21, D4; an em dash is never the empty glyph). A screen reader hears "none".
   --nil-mark is the ONE switch: where a span cannot go (text, an attribute, an <option>) a page reads it as text. */
:root{--nil-mark:"-"}
.nil{color:var(--ink-3,#9c958d);font-variant-numeric:tabular-nums}
.nil::before{content:var(--nil-mark,"-")}
/* the alt text only where it parses: a var() in it is dropped at computed time by an engine without it, which drew nothing (review P4) */
@supports (content:"x" / "y"){.nil::before{content:var(--nil-mark,"-") / "none"}}
@media print{
  .tbl .col-actions{position:static;background:none}
}

/* TAB ROWS ON A PHONE (Nick 2026-10-22, Q9 - one family pattern; the TUL Desk's app row is the model). At 760px and
   under a page's tab row stays ONE line - no wrap, no squeeze - and slides sideways inside itself (the page never
   scrolls sideways); the edge that has more fades out, which is the cue. The fade is a mask (the row's own pixels
   thinned to nothing at that edge), never a colour. The family shell (tul-shell-v1.js, tabRows) marks the edge -
   .tul-tabs-l / .tul-tabs-r while the row has more that way - and scrolls the selected tab into view. A tab row is an
   ARIA tab list (not a vertical one) and the apps' own rows: .tabs (TITAN's dashboard, TALIA's Sub Bids, TERRA's,
   TAVI's), .seg#tabs and .seg.views (TYR's queue and filter tabs and the Contracts register's saved views), .seg#seg
   (TAVI's segmented tabs), .att-tabs (TITAN's Needs attention), .reg-tabs (the register kernel's views), .terra-safnav
   (TERRA's section strips) and .secnav (TYR's On this page) - the shell's TAB_ROWS word for word
   (tests/test_tul_layout.js). Never every .seg: a segmented choice in a form or a toolbar is not a tab row. The three declarations that make the rule are !important: a page's own sheet may
   come after this one. */
@media screen and (max-width:760px){
  [role="tablist"]:not([aria-orientation="vertical"]),.tabs,.seg#tabs,.seg.views,.seg#seg,.att-tabs,.reg-tabs,.terra-safnav,.secnav{
    flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden;overscroll-behavior-x:contain;
    scrollbar-width:none;min-width:0;max-width:100%;white-space:nowrap}
  [role="tablist"]:not([aria-orientation="vertical"])::-webkit-scrollbar,.tabs::-webkit-scrollbar,.seg#tabs::-webkit-scrollbar,.seg.views::-webkit-scrollbar,.seg#seg::-webkit-scrollbar,.att-tabs::-webkit-scrollbar,.reg-tabs::-webkit-scrollbar,.terra-safnav::-webkit-scrollbar,.secnav::-webkit-scrollbar{display:none}
  [role="tablist"]:not([aria-orientation="vertical"])>*,.tabs>*,.seg#tabs>*,.seg.views>*,.seg#seg>*,.att-tabs>*,.reg-tabs>*,.terra-safnav>*,.secnav>*{flex-shrink:0!important}
  .tul-tabs-l{-webkit-mask-image:linear-gradient(to right,transparent,black 48px);mask-image:linear-gradient(to right,transparent,black 48px)}
  .tul-tabs-r{-webkit-mask-image:linear-gradient(to left,transparent,black 48px);mask-image:linear-gradient(to left,transparent,black 48px)}
  .tul-tabs-l.tul-tabs-r{-webkit-mask-image:linear-gradient(to right,transparent,black 48px,black calc(100% - 48px),transparent);
    mask-image:linear-gradient(to right,transparent,black 48px,black calc(100% - 48px),transparent)}
}
