/* ============================================================
   TUL  |  tul-ledger-v1.css  -  the Registers' grid (TUL_LEDGER, tul-ledger-v1.js; Launchpad R1a, 2026-10-28)
   Prefix tlg-. Every colour a token from the family sheet (tul-tokens-v1.css, linked last), every size on the type floor
   (11px; nothing here under 12px on screen). One 820px breakpoint: under it a row folds into a card - each cell a line,
   its column's label beside it (data-label), a line holding only the empty mark not drawn. Print is its own: black on
   white Arial, the letterhead, the filter in words, landscape, the header row on every page and the page numbers.
   The empty value is tul-layout-v1.css's .nil span (a muted hyphen).
   ============================================================ */
.tlg{display:flex;flex-direction:column;gap:var(--sp-3,12px);min-width:0;color:var(--ink)}
/* the head (the second pass, B): the ledger's title, its lede behind a "?" beside it, the keeper at the right; the page's
   own small line under the title (the full page's "Full page - print and Admin") */
.tlg-head{display:flex;align-items:center;gap:4px 10px;flex-wrap:wrap;min-width:0}
.tlg-h{margin:0;font:600 18px/1.3 var(--fdisplay,Montserrat,Inter,Arial,sans-serif);color:var(--ink)}
.tlg-q{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:1px solid var(--line);border-radius:50%;
  background:transparent;color:var(--muted);font:500 12px/1 var(--fbody,Inter,Arial,sans-serif);cursor:help}
.tlg-q:hover,.tlg-q[aria-expanded="true"]{color:var(--ink);border-color:var(--ink-3)}
.tlg-q:focus-visible,.tlg-chip:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.tlg-sub{flex:1 1 100%;order:3;margin:0;font-size:12px;line-height:1.4;color:var(--muted)}
.tlg-lede{flex:1 1 100%;order:4;margin:0;font-size:13px;line-height:1.5;color:var(--ink-2);max-width:72ch}
/* B: ONE control row - scope, the buckets with their counts, search, then Filters, Views and Export at its right */
.tlg-bar{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;padding-bottom:10px;border-bottom:1px solid var(--line-soft)}
.tlg-bar .tlg-fold{border-bottom:0}
.tlg-acts{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-left:auto}
.tlg-search{flex:1 1 160px;max-width:360px}
.tlg-search .tlg-in{width:100%}
/* the scope: a chip, its pills in a panel under it */
.tlg-scopew,.tlg-filt{position:relative}
.tlg-chip{display:inline-flex;align-items:center;gap:6px;min-height:var(--h-ctl,34px);max-width:280px;padding:0 10px 0 12px;border:1px solid var(--line);
  border-radius:var(--r-pill,999px);background:var(--s0);color:var(--ink);font:500 13px/1.25 var(--fbody,Inter,Arial,sans-serif);text-align:left;cursor:pointer}
.tlg-chip:hover{background:var(--s1)}
.tlg-chev{flex:0 0 14px;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.tlg-chip[aria-expanded="true"] .tlg-chev{transform:rotate(180deg)}
.tlg-spanel,.tlg-fpanel{position:absolute;top:calc(100% + 6px);left:0;z-index:20;min-width:240px;max-width:calc(100vw - 32px);padding:10px;
  border:1px solid var(--line);border-radius:var(--r-ctl,8px);background:var(--s0);box-shadow:var(--sh-2)}
.tlg-fpanel{left:auto;right:0;width:340px}
.tlg-spanel[hidden],.tlg-fpanel[hidden]{display:none}
.tlg-fpanel .tlg-tools{flex-direction:column;align-items:stretch;gap:8px}
.tlg-fpanel .tlg-field{justify-content:space-between}
.tlg-fpanel .tlg-in{flex:0 1 200px}
.tlg-btn{display:inline-flex;align-items:center;min-height:var(--h-ctl,34px);padding:0 12px;border:1px solid var(--line);
  border-radius:var(--r-ctl,8px);background:var(--s1);color:var(--ink);font:500 13px/1.2 var(--fbody,Inter,Arial,sans-serif);cursor:pointer}
.tlg-btn:hover{background:var(--s2)}
.tlg-btn[aria-disabled="true"]{opacity:.6;cursor:default}
.tlg-btn:focus-visible,.tlg-foldb:focus-visible,.tlg-sortb:focus-visible,.tlg-in:focus-visible,.tlg-open:focus-visible,
.tlg-scroll:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
/* the saved views (Launchpad R4, tul/399): a disclosure in the export row - Views, then a panel that drops under it, over
   the grid (the button's right edge its own; a phone's from the left). Tokens only; a view's name wraps, never cut */
.tlg-views{position:relative}
.tlg-vpanel{position:absolute;top:calc(100% + 6px);right:0;z-index:20;width:320px;max-width:calc(100vw - 32px);display:flex;flex-direction:column;
  gap:8px;padding:12px;border:1px solid var(--line);border-radius:var(--r-ctl,8px);background:var(--s0);box-shadow:var(--sh-2)}
.tlg-vpanel[hidden]{display:none}
.tlg-vh{margin:0;font:600 13px/1.3 var(--fbody,Inter,Arial,sans-serif);color:var(--ink)}
.tlg-vnote{margin:0;font-size:12px;line-height:1.4;color:var(--muted)}
.tlg-vlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;max-height:300px;overflow-y:auto}
.tlg-vrow{display:flex;align-items:center;gap:4px}
.tlg-vopen{flex:1 1 auto;min-width:0;min-height:34px;padding:4px 8px;border:0;border-left:2px solid transparent;border-radius:var(--r-ctl,8px);
  background:transparent;color:var(--ink);font:400 13px/1.35 var(--fbody,Inter,Arial,sans-serif);text-align:left;cursor:pointer;overflow-wrap:anywhere}
.tlg-vopen:hover{background:var(--s1)}
/* the view in force: an inset taupe edge, never a fill (D3) */
.tlg-vopen[aria-current="true"]{border-left-color:var(--taupe);font-weight:600}
.tlg-vin{color:var(--muted);font-weight:400}
.tlg-vact{flex:0 0 auto;min-height:34px;padding:0 6px;border:0;background:transparent;color:var(--ink-2);font:400 12px/1.2 var(--fbody,Inter,Arial,sans-serif);
  text-decoration:underline;cursor:pointer}
.tlg-vact:hover{color:var(--ink)}
.tlg-vopen:focus-visible,.tlg-vact:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.tlg-vact[aria-disabled="true"]{opacity:.5;cursor:default;text-decoration:none}
/* the review's R18: the column chooser in the Views panel - each column shown or hidden, the shown ones moved left or right */
.tlg-clist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;max-height:300px;overflow-y:auto}
.tlg-crow{display:flex;align-items:center;gap:4px}
.tlg-cl{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;min-height:34px;padding:0 4px;font-size:13px;color:var(--ink);cursor:pointer}
.tlg-cl input{accent-color:var(--taupe);margin:0}
.tlg-cl input:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
/* Plan B R13: the Export menu - a disclosure in the export row, its items and the line "Exports what is on screen" */
.tlg-xm{position:relative}
.tlg-xpanel{position:absolute;top:calc(100% + 6px);right:0;z-index:20;width:240px;max-width:calc(100vw - 32px);display:flex;flex-direction:column;
  gap:2px;padding:10px;border:1px solid var(--line);border-radius:var(--r-ctl,8px);background:var(--s0);box-shadow:var(--sh-2)}
.tlg-xpanel[hidden]{display:none}
.tlg-xpanel .tlg-vnote{margin:0 4px 6px}
.tlg-xi{min-height:34px;padding:4px 8px;border:0;border-radius:var(--r-ctl,8px);background:transparent;color:var(--ink);font:400 13px/1.35 var(--fbody,Inter,Arial,sans-serif);
  text-align:left;cursor:pointer}
.tlg-xi:hover{background:var(--s1)}
.tlg-xi[aria-disabled="true"]{opacity:.6;cursor:default}
.tlg-xi:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
/* Plan B R7: a list cell's "+N" */
.tlg-more{color:var(--muted);font-size:12px;font-weight:500;white-space:nowrap;cursor:default}
/* Plan B R9: a row that opens a record is pressed anywhere (its link the one way the keyboard reaches it; the folder
   button beside its name is tul-folders-v1.css's) */
.tlg-t tbody tr.tlg-go{cursor:pointer}
/* Plan B R6 (2026-11-05): an empty text, person, company or link cell is blank on a desk - and, since the second pass
   (D5), an amount too: money has one empty, blank when unknown, $0.00 only for a real zero; the hyphen only in a count; the mark stays in the cell, so a phone's card leaves the line
   out and a screen reader hears "none" */
@media (min-width:821px){
  .tlg-t tbody td:not(.tlg-cnt) > .tlg-v > .nil:only-child::before{content:""}
}

/* the fold: Open / Pending / Closed / All - outlined, never filled (D3); the one chosen underlined */
.tlg-fold{display:flex;gap:0;flex-wrap:wrap;border-bottom:1px solid var(--line-soft)}
.tlg-foldb{display:inline-flex;align-items:center;gap:6px;min-height:var(--h-ctl,34px);padding:0 8px;margin-bottom:-1px;border:0;
  border-bottom:2px solid transparent;background:transparent;color:var(--muted);font:500 13px/1.2 var(--fbody,Inter,Arial,sans-serif);cursor:pointer}
.tlg-foldb:hover{color:var(--ink)}
.tlg-foldb[aria-pressed="true"]{color:var(--ink);border-bottom-color:var(--taupe)}
/* a stored status list's own button (Not closed) - drawn only while the list is in force */
.tlg-foldb[hidden]{display:none}
.tlg-n{color:var(--faint);font-variant-numeric:tabular-nums}
/* the compact mount (a live log in the Launchpad's conversation, a pinned page): the fold and the grid, a shorter scroll */
.tlg-compact{gap:8px}
.tlg-compact .tlg-scroll{max-height:420px}

/* the tools: search, a date column from / to, group by */
.tlg-tools{display:flex;gap:8px 16px;flex-wrap:wrap;align-items:center}
/* each label beside its box (one row of tools; a phone stacks them) */
.tlg-field{display:flex;flex-direction:row;align-items:center;gap:8px;min-width:0}
.tlg-lab{flex:0 0 auto;font-size:12px;color:var(--muted)}
.tlg-grow{flex:1 1 120px}
.tlg-grow .tlg-in{flex:1 1 auto}
.tlg-in{min-height:var(--h-ctl,34px);padding:0 10px;border:1px solid var(--line);border-radius:var(--r-ctl,8px);background:var(--s0);
  color:var(--ink);font:400 13px/1.2 var(--fbody,Inter,Arial,sans-serif);min-width:0}
.tlg-in:disabled{opacity:.6}
/* the job row: v3's pills on ONE line, the keeper's words at its right */
.tlg-jobline{display:flex;gap:8px 16px;align-items:center;min-width:0;font-size:13px;color:var(--ink-2)}
.tlg-jobs{position:relative;min-width:0;display:flex;align-items:stretch;gap:8px}
/* v3's keeper: the agent that keeps the ledger, a shield before it (house inks - no blue), in the job row */
.tlg-keeper{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;margin:0 0 0 auto;color:var(--ink-2)}
/* the review's R5: a company-wide ledger says so where the job pills would be */
.tlg-scope{margin:0;color:var(--muted)}
.tlg-kic{flex:0 0 16px;width:16px;height:16px;fill:none;stroke:var(--taupe);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tlg-kw{font-size:13px;line-height:1.4;white-space:nowrap}
.tlg-kw b{font-weight:600}
/* v3's job pills, one line: All jobs, the one in force, the person's own - outlined, the one pressed an inset taupe edge (never a
   fill). A long name wraps inside its pill (at most 320px - never cut); a row wider than its room scrolls sideways under a
   soft edge on the right (the cue), which covers only what runs past it */
/* no scrollbar of its own (a real one added ~10px and moved the first record down - the delta review, P3-2): the soft edge, the
   keyboard (a focused pill is scrolled into view, past the edge - scroll-padding) and shift + wheel move it */
/* the second pass: the pills stand in the scope's panel, one under another (each its whole name, wrapping - never cut); the
   panel scrolls when the person has many jobs */
.tlg-pills{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-width:0;max-height:320px;overflow-y:auto;padding:2px}
.tlg-pills .tlg-pill:focus-visible{outline-offset:-4px}
.tlg-pill{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;min-height:30px;padding:0 11px;border:1px solid var(--line);border-radius:var(--r-pill);background:var(--s0);
  color:var(--ink-2);font:500 13px/1.3 var(--fbody,Inter,Arial,sans-serif);text-align:left;max-width:100%;padding-top:4px;padding-bottom:4px;cursor:pointer}
.tlg-pn,.tlg-pill .tlg-n{white-space:nowrap}
.tlg-pill:hover{background:var(--s1);color:var(--ink)}
.tlg-pill[aria-pressed="true"]{border-color:var(--taupe);color:var(--ink);box-shadow:inset 0 0 0 1px var(--taupe)}
.tlg-pn{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.tlg-pill:focus-visible,.tlg-mark:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
/* a row waiting on the person's decision: the attention tint, and its own button to that card */
.tlg-t tbody tr.tlg-wait td,.tlg-t tbody tr.tlg-wait th{background:color-mix(in srgb, var(--attn) 10%, var(--s0))}
.tlg-mark{display:block;margin-top:4px;padding:0;border:0;background:none;color:var(--attn);font:600 12px/1.4 var(--fbody,Inter,Arial,sans-serif);text-align:left;
  text-decoration:underline;text-underline-offset:2px;cursor:pointer}
/* the phone's sort (the headers are clipped there) */
.tlg-sortf{display:none}

/* the grid: a named, focusable scroll region; the header row sticks, the first column (the record's link) is frozen. Its
   height is its container's (Plan B R3, 2026-11-05): in a filled host (.tlg-fill - the ledger workspace in the Launchpad, the
   Registers page on a desk) the grid takes the room left under its head and scrolls on its own, so the header row never
   scrolls away with the page */
/* position: the scroll region holds its own screen-reader words (.tlg-sr, absolute) - without it, one in a deep row escaped
   the region and stretched the page into a tall blank area under the grid (the review's D7) */
.tlg-scroll{position:relative;overflow:auto;border:1px solid var(--line-soft);border-radius:var(--r-card,12px);background:var(--s0)}
.tlg-fill > .tlg{flex:1 1 auto;min-height:0}
.tlg-fill .tlg:not(.tlg-compact) > .tlg-scroll{flex:1 1 auto;min-height:120px}
/* a ledger wider than its box scrolls sideways: a soft edge on the right shows while there is more to the right (scroll
   shadows, no script - the cover rides with the content, attachment local, and hides the edge, attachment scroll, once
   the last column is in view). Tokens only; screen only (a phone's cards and print set the background aside); a browser
   without color-mix keeps the plain background above */
@media screen{
  .tlg-scroll{background:
    linear-gradient(to left, var(--s0) 40%, transparent) right center / 48px 100% no-repeat local,
    linear-gradient(to left, color-mix(in srgb, var(--line) 60%, transparent), transparent) right center / 18px 100% no-repeat scroll,
    var(--s0)}
}
.tlg [hidden]{display:none !important}
/* the second pass (the grid): table-layout fixed - each column its spec's width or its type's (the kernel's WIDTHS, set on
   its header cell; the table as wide as its columns and at least its box); ONE cell padding, 11px top and bottom, 22px a
   side; the header on a strong rule in Montserrat small capitals with no tracking (Nick's card 2026-11-06 - the design
   ratchet's one named exception, UPPER_OK in tests/test_design_ratchet.js, for this selector alone) */
.tlg-t{table-layout:fixed;min-width:100%;border-collapse:separate;border-spacing:0;font-size:13px;line-height:1.45}
.tlg-t th,.tlg-t td{box-sizing:border-box}
.tlg-t thead th{position:sticky;top:0;z-index:2;padding:11px 22px 10px;border-bottom:1px solid var(--ink-3);background:var(--s1);
  color:var(--ink-2);font:600 13px/1.3 var(--fdisplay,Montserrat,Inter,Arial,sans-serif);font-variant-caps:all-small-caps;text-align:left;vertical-align:bottom;overflow-wrap:break-word}
.tlg-t tbody td,.tlg-t tbody th{padding:11px 22px;border-bottom:1px solid var(--line-soft);text-align:left;vertical-align:top;
  font-weight:400;color:var(--ink-2);overflow-wrap:break-word}
/* D4: every text cell two lines at most - the whole text in its title and for a screen reader (the words stay in the cell) */
.tlg-v,.tlg-key{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-width:0;overflow-wrap:anywhere}
.tlg-nw .tlg-v,.tlg-num .tlg-v{display:block;white-space:nowrap}
/* the walk of 2026-11-08: an email address never breaks inside a word - it wraps only after its @ or a dot (the kernel's
   addrHtml puts a break chance there), still two lines at most, its title holding it whole */
.tlg-v.tlg-addr{overflow-wrap:normal;word-break:normal}
.tlg-kn{font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.tlg-kt{font-weight:500}
.tlg-ks{display:block;font-weight:400;color:var(--muted);font-size:12px}
/* the key line: the row's box (U5) and the record link on ONE line - so a one-line title is a one-line row. Since Release
   1.181.0 Add to a folder is an item of the row's menu (H), never a button on this line */
.tlg-kline{display:flex;align-items:flex-start;gap:8px;min-width:0}
.tlg-kline > .tlg-open,.tlg-kline > .tlg-key{flex:1 1 auto;min-width:0}
/* U5: a row's box and the header's - the taupe accent, a focus ring, 44px to touch on a phone */
.tlg-cbw{display:inline-flex;align-items:flex-start;flex:0 0 auto;cursor:pointer}
.tlg-cb{flex:0 0 auto;width:16px;height:16px;margin:2px 0 0;accent-color:var(--taupe);cursor:pointer}
.tlg-cb:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.tlg-t thead th.tlg-frz .tlg-cbw{margin:0 8px 0 0;vertical-align:middle}
.tlg-t thead th.tlg-frz .tlg-cb{margin:0}
/* F: a row that needs a person here - a 3px red inset on its first cell, the status word red, its reason in words */
.tlg-t tbody tr.att > th.tlg-frz{box-shadow:inset 3px 0 0 var(--bad)}
.tlg-atw{display:block;margin-top:2px;color:var(--bad);font-size:12px;font-weight:600;line-height:1.4}
/* RG-23 (tul/448): a row an agent filed on its own - a quiet line under the record, read only */
.tlg-agm{display:block;margin-top:2px;color:var(--muted);font-size:12px;font-weight:400;line-height:1.4}
.tlg-agm-u{display:block}
/* U6: the row the j / k keys hold */
.tlg-t tbody tr.tlg-kf > th,.tlg-t tbody tr.tlg-kf > td{background:var(--s1)}
.tlg-t tbody tr[data-k]:focus{outline:2px solid var(--focus);outline-offset:-2px}
/* H: the row menu's kebab, at the row's end (sticking to the grid's right edge while it scrolls sideways) */
.tlg-t td.tlg-act,.tlg-t th.tlg-act{position:sticky;right:0;z-index:1;width:56px;padding-left:0;padding-right:12px;text-align:right;background:var(--s0)}
.tlg-t thead th.tlg-act{z-index:3;background:var(--s1)}
.tlg-t tfoot td.tlg-act{z-index:3}
.tlg-keb{display:inline-flex;align-items:center;justify-content:center;width:32px;height:28px;padding:0;border:0;border-radius:var(--r-ctl,8px);
  background:transparent;color:var(--muted);cursor:pointer}
.tlg-keb svg{width:18px;height:18px;fill:currentColor}
.tlg-keb:hover,.tlg-keb[aria-expanded="true"]{background:var(--s2);color:var(--ink)}
.tlg-keb:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
/* H: the row menu - a layer over the grid, kept inside the window */
.tlg-rmenu{position:fixed;z-index:40;display:flex;flex-direction:column;gap:2px;width:240px;max-width:calc(100vw - 16px);padding:6px;
  border:1px solid var(--line);border-radius:var(--r-ctl,8px);background:var(--s0);box-shadow:var(--sh-2)}
.tlg-ritem{display:flex;align-items:center;min-height:34px;padding:4px 10px;border:0;border-radius:6px;background:transparent;color:var(--ink);
  font:400 13px/1.35 var(--fbody,Inter,Arial,sans-serif);text-align:left;text-decoration:none;cursor:pointer}
.tlg-ritem:hover,.tlg-ritem:focus{background:var(--s1)}
.tlg-ritem:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.tlg-rsep{height:1px;margin:4px 2px;background:var(--line-soft)}
/* F: Needs attention and Mine, before the buckets - outlined, the one in force an inset taupe edge (never a fill, D3); the
   attention count in the status red */
.tlg-chips{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.tlg-fchip{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 12px;border:1px solid var(--line);border-radius:var(--r-pill,999px);
  background:var(--s0);color:var(--ink-2);font:500 13px/1.2 var(--fbody,Inter,Arial,sans-serif);white-space:nowrap;cursor:pointer}
.tlg-fchip:hover{background:var(--s1);color:var(--ink)}
.tlg-fchip[aria-pressed="true"]{border-color:var(--taupe);color:var(--ink);box-shadow:inset 0 0 0 1px var(--taupe)}
.tlg-fchip:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.tlg-fatt .tlg-n{color:var(--bad);font-weight:600}
/* U5: the selection bar - the count, the keeper's own doors, Copy links, Export selected, Clear; its receipt under it */
.tlg-selbar{display:flex;align-items:center;gap:8px 10px;flex-wrap:wrap;padding:8px 12px;border:1px solid var(--line);border-radius:var(--r-ctl,8px);background:var(--s1)}
.tlg-seln{color:var(--ink)}
.tlg-selnote{flex:1 1 200px;font-size:12px;color:var(--muted)}
.tlg-selmsg{flex:1 1 100%;margin:0;font-size:13px;color:var(--ink-2)}
/* the head of a ledger whose title the workspace pane says (o.titled false): the "?" on the keeper's line, just left of it
   (never alone on a row - the design review of rc/1.181.0, 3) */
.tlg-untitled{min-height:0}
.tlg-untitled .tlg-q{margin-left:auto}
.tlg-untitled .tlg-keeper{margin-left:0}
.tlg-selacts{display:flex;align-items:center;gap:8px 10px;flex-wrap:wrap}
/* a desk under 1400px (the 1280 window's grid is about 970px wide): ONE control row kept - a narrower search, compact chips,
   buckets and buttons (the design review of rc/1.181.0, 4) */
@media screen and (min-width:821px) and (max-width:1399px){
  .tlg-bar{gap:8px}
  .tlg-search{flex:1 1 110px;max-width:220px}
  .tlg-chips{gap:4px}
  .tlg-fchip{padding:0 9px;gap:4px}
  .tlg-foldb{padding:0 5px}
  .tlg-chip{padding:0 8px 0 10px}
  .tlg-acts{gap:4px}
  .tlg-acts .tlg-btn{padding:0 10px}
}
.tlg-t tbody tr:last-child td,.tlg-t tbody tr:last-child th{border-bottom:0}
/* the totals row (Plan B R11): under each money column the spec totals, sticking to the grid's foot while it scrolls */
.tlg-t tfoot td,.tlg-t tfoot th{position:sticky;bottom:0;z-index:2;padding:9px 12px;border-top:1px solid var(--line);background:var(--s1);
  color:var(--ink);font-weight:600;text-align:left;white-space:nowrap}
.tlg-t tfoot .tlg-frz{z-index:3;background:var(--s1)}
.tlg-t tfoot td.tlg-num{text-align:right;font-variant-numeric:tabular-nums}
.tlg-t tbody tr:hover td,.tlg-t tbody tr:hover th{background:var(--s1)}
.tlg-frz{position:sticky;left:0;z-index:1;background:var(--s0);border-right:1px solid var(--line-soft)}
.tlg-t thead .tlg-frz{z-index:3;background:var(--s1)}
.tlg-t tbody .tlg-frz{color:var(--ink);font-weight:500}
.tlg-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tlg-t thead .tlg-num{text-align:right;white-space:normal}   /* the walk of 2026-11-08: a header wraps between its words, never cut (the kernel's headW sizes the column for its longest word) */
.tlg-t tbody td.tlg-num{text-align:right}   /* design gate 1.165.0 F1: a money cell sits right under its right-aligned head - .tlg-t tbody td (left) outranked .tlg-num; the phone cards keep their own left rule below */
.tlg-open{color:var(--ink);text-decoration:none}
.tlg-open:hover{text-decoration:underline;text-underline-offset:3px}
.tlg-line{display:block}
/* D3: three colours, one meaning each - taupe waiting on someone outside (the pending fold), ink the rest; red (att) is a
   row that needs a person here (Release 1.181.0's attention mark - the door's attention:true) */
.tlg-st{font-weight:500}
.tlg-st-open,.tlg-st-closed{color:var(--ink)}
.tlg-st-pending{color:var(--taupe)}
.tlg-st.att{color:var(--bad);font-weight:600}
.tlg-sortb{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:none;color:inherit;font:inherit;cursor:pointer;text-align:left}
.tlg-sortb:hover{color:var(--ink)}
.tlg-arr{width:10px;height:10px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
/* I: a group's header - its name, then its rows' count and its money totals */
.tlg-grp th{position:static;padding:9px 22px;background:var(--s1);color:var(--ink);font:600 13px/1.35 var(--fbody,Inter,Arial,sans-serif);
  text-align:left;border-bottom:1px solid var(--line-soft)}
.tlg-gname{margin-right:12px}
.tlg-gmeta{font-weight:400;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.tlg-state{padding:24px 22px !important;color:var(--muted) !important;text-align:left}
/* E: an empty bucket's way out */
.tlg-empty{white-space:normal}
.tlg-et{margin:0 0 4px;font-weight:600;color:var(--ink)}
.tlg-em{margin:0 0 10px;color:var(--muted)}
.tlg-eacts{margin:0}
.tlg-eacts a.tlg-btn{text-decoration:none}
.tlg-err{color:var(--bad)}
.tlg-foot{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.tlg-note{flex:1 1 280px;text-align:right}
/* the review's R16 / R17: a note that leads somewhere - this ledger's own list (a button) or another ledger (a link) */
.tlg-gob{display:inline;padding:0;border:0;background:transparent;color:var(--ink-2);font:inherit;text-decoration:underline;cursor:pointer}
.tlg-goa{color:var(--ink-2);text-decoration:underline}
.tlg-gob:hover,.tlg-goa:hover{color:var(--ink)}
.tlg-gob:focus-visible,.tlg-goa:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.tlg-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* the Registers home (Release 1.181.0, tul-ledger-home-v1.js): Needs attention and its count, then one card per group - its
   count, its top three rows (each into its ledger, filtered) and its ledgers with their counts. Tokens only */
.tlg-home{display:flex;flex-direction:column;gap:16px;min-width:0;padding-bottom:16px;color:var(--ink)}
.tlg-hlead{display:flex;flex-direction:column;gap:4px}
.tlg-hh{margin:0;font:600 18px/1.3 var(--fdisplay,Montserrat,Inter,Arial,sans-serif)}
.tlg-hbig{margin:0;font:600 22px/1.25 var(--fbody,Inter,Arial,sans-serif)}
.tlg-hn{color:var(--bad);font-variant-numeric:tabular-nums}
.tlg-hsub,.tlg-hq{margin:0;font-size:13px;color:var(--muted)}
/* the group tiles (a summary each - never the records laid out as cards): three across on a wide desk, two on a narrow one,
   one on a phone */
.tlg-hcards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
@media (min-width:1280px){.tlg-hcards{grid-template-columns:repeat(3,minmax(0,1fr))}}
.tlg-hcard{display:flex;flex-direction:column;gap:10px;min-width:0;padding:14px 16px;border:1px solid var(--line-soft);border-radius:var(--r-card,12px);background:var(--s0)}
.tlg-hch{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0;font:600 14px/1.35 var(--fbody,Inter,Arial,sans-serif)}
.tlg-hcn{font-size:12px;font-weight:600;color:var(--bad)}
.tlg-hcn.tlg-hok{color:var(--muted);font-weight:400}
.tlg-hrows,.tlg-hls{list-style:none;margin:0;padding:0}
.tlg-hrows{display:flex;flex-direction:column;gap:4px}
.tlg-hrow{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-height:34px;padding:4px 6px;border-radius:6px;color:var(--ink);text-decoration:none;font-size:13px;line-height:1.4}
.tlg-hrow:hover{background:var(--s1)}
.tlg-hl{color:var(--muted);font-size:12px}
.tlg-ht{flex:1 1 140px;min-width:0;overflow-wrap:anywhere}
.tlg-hw{color:var(--bad);font-size:12px;font-weight:600}
.tlg-hls{display:flex;flex-wrap:wrap;gap:4px 14px;padding-top:8px;border-top:1px solid var(--line-soft);font-size:12px}
.tlg-hla{display:inline-flex;align-items:center;gap:4px;min-height:28px;color:var(--ink-2);text-decoration:underline;text-underline-offset:2px}
.tlg-hla b{color:var(--bad);font-weight:600}
.tlg-hlx{color:var(--muted)}
.tlg-hrow:focus-visible,.tlg-hla:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.tlg-hfail{display:flex;flex-direction:column;align-items:flex-start;gap:8px}

/* a phone: each row a card - its record's name on top, every other cell a line with its column's label */
@media (max-width:820px){
  .tlg-scroll{max-height:none;overflow:visible;border:0;background:transparent}
  /* a live log's cards (the compact mount) scroll inside its block, never past it */
  .tlg-compact .tlg-scroll{max-height:60vh;overflow:auto}
  .tlg-t,.tlg-t tbody{display:block;width:100% !important;table-layout:auto}
  .tlg-t thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .tlg-t tbody tr{display:block;margin:0 0 10px;padding:12px 14px;border:1px solid var(--line-soft);border-radius:var(--r-card,12px);background:var(--s0)}
  .tlg-t tbody tr:hover td,.tlg-t tbody tr:hover th{background:transparent}
  .tlg-t tbody td,.tlg-t tbody th{display:flex;gap:12px;padding:3px 0;border:0;max-width:none;min-width:0;background:transparent}
  .tlg-t tbody td::before{content:attr(data-label);flex:0 0 38%;color:var(--muted);font-size:12px;line-height:1.6}
  .tlg-t tbody td.tlg-num{text-align:left;white-space:normal}
  .tlg-t tbody td:has(> .tlg-v > .nil:only-child){display:none}
  .tlg-t tbody td.tlg-nw,.tlg-t tbody td.tlg-tx{white-space:normal;min-width:0}
  .tlg-v{flex:1 1 auto}
  .tlg-frz{position:static;border-right:0;max-width:none}
  .tlg-t tbody th.tlg-frz{display:block;padding:0 0 6px;font-size:15px}
  .tlg-t tbody tr.tlg-grp{padding:0;border:0;background:transparent;margin:14px 0 6px}
  .tlg-grp th{display:block;padding:0;background:transparent;border:0;color:var(--muted)}
  .tlg-t tbody td.tlg-state{display:block}
  .tlg-t tbody td.tlg-state::before{content:none}
  /* a phone: the totals row is one more card, each total with its column's label */
  .tlg-t tfoot,.tlg-t tfoot tr{display:block}
  .tlg-t tfoot tr{padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-card,12px);background:var(--s1)}
  .tlg-t tfoot td,.tlg-t tfoot th{position:static;display:flex;gap:12px;padding:3px 0;border:0;background:transparent}
  .tlg-t tfoot td:empty{display:none}
  .tlg-t tfoot td::before{content:attr(data-label);flex:0 0 38%;color:var(--muted);font-size:12px;font-weight:400}
  .tlg-t tfoot td.tlg-num{text-align:left}
  .tlg-note{text-align:left}
  /* a phone's controls: 44px to touch, 16px in a box (so the phone does not zoom) */
  .tlg-btn,.tlg-foldb,.tlg-in{min-height:44px}
  .tlg-in{font-size:16px}
  .tlg-field,.tlg-grow{flex:1 1 100%}
  .tlg-field{flex-direction:column;align-items:stretch;gap:4px}
  /* a phone: the control row stacks - the search the whole width, the scope and the actions on their own lines; the
     panels drop from the left edge, as wide as the window */
  .tlg-search{flex:1 1 100%;max-width:none}
  .tlg-keeper{flex:1 1 100%;order:2;margin:0}
  .tlg-kw{white-space:normal}
  .tlg-acts{margin-left:0}
  .tlg-chip,.tlg-q{min-height:44px}
  .tlg-q{min-width:44px}
  .tlg-fpanel{left:0;right:auto;width:calc(100vw - 32px)}
  .tlg-fpanel .tlg-field{flex-direction:column;align-items:stretch}
  .tlg-fpanel .tlg-in{flex:1 1 auto}
  /* a phone: the Views panel drops from the button's left edge (the export row starts at the left there); 44px to touch */
  .tlg-vpanel{left:0;right:auto}
  .tlg-vopen,.tlg-vact,.tlg-cl{min-height:44px}
  .tlg-sortf{display:flex}
  .tlg-pill,.tlg-mark{min-height:44px}
  /* a waiting row on a phone is its whole card in the attention tint, edged in the attention colour */
  .tlg-t tbody tr.tlg-wait{background:color-mix(in srgb, var(--attn) 10%, var(--s0));border-color:var(--attn)}
  .tlg-t tbody tr.tlg-wait td,.tlg-t tbody tr.tlg-wait th{background:transparent}
  .tlg-open{display:inline-block;min-height:44px;line-height:1.4;padding-top:10px}
  /* Release 1.181.0 on a phone: the box and the kebab 44px to touch, the kebab at the card's top right; the chips and the
     selection bar's buttons 44px; the row menu as wide as the window allows; a marked card edged red */
  .tlg-t tbody tr{position:relative}
  .tlg-t tbody th.tlg-frz{padding-right:48px}
  .tlg-cbw{align-items:center;justify-content:center;min-width:44px;min-height:44px;margin-left:-11px}
  .tlg-cb{width:22px;height:22px;margin:0}
  .tlg-t tbody td.tlg-act{position:absolute;top:6px;right:6px;display:block;width:auto;padding:0;background:transparent}
  .tlg-t tbody td.tlg-act::before{content:none}
  .tlg-keb{width:44px;height:44px}
  .tlg-t tbody tr.att{box-shadow:inset 3px 0 0 var(--bad);border-color:var(--bad)}
  .tlg-t tbody tr.att > th.tlg-frz{box-shadow:none}
  .tlg-t tfoot td.tlg-act{display:none}
  .tlg-fchip{min-height:44px}
  .tlg-ritem{min-height:44px}
  .tlg-rmenu{width:calc(100vw - 32px)}
  .tlg-selbar .tlg-btn{min-height:44px}
  /* the design review of rc/1.181.0, 2: on a phone the selection bar sticks to the window's foot while rows are ticked,
     above the TUL Chat launcher - the count and Clear on one line, the doors in one row that scrolls inside the bar, its
     words in two lines at most; the ledger keeps room for it under its last row */
  .tlg-selbar{position:fixed;z-index:30;left:12px;right:12px;bottom:68px;max-height:45vh;overflow:hidden;box-shadow:var(--sh-2)}
  .tlg-seln{flex:1 1 auto}
  .tlg-selbar [data-tlg="selclear"]{order:1}
  .tlg-selacts{order:2;flex:1 1 100%;flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}
  .tlg-selacts .tlg-btn{flex:0 0 auto;white-space:nowrap}
  .tlg-selnote{order:3;flex:1 1 100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
  .tlg-selmsg{order:4}
  section.tlg-selon{padding-bottom:220px}
  .tlg-untitled .tlg-q{margin-left:0}
  .tlg-untitled .tlg-keeper{flex:0 1 auto;order:0}
  .tlg-hcards{grid-template-columns:1fr}
  .tlg-hrow,.tlg-hla{min-height:44px}
}

/* print: the ledger's own sheet (the Print button) - everything else on the page set aside */
@media screen{.tlg-print{display:none}}
@page{size:landscape;margin:12mm 10mm 14mm;
  @bottom-right{content:"Page " counter(page) " of " counter(pages);font:8pt Arial,Helvetica,sans-serif;color:#000}}
@media print{
  html.tlg-printing body > *:not(.tlg-print){display:none !important}
  html.tlg-printing body{background:#fff;margin:0}
  .tlg-print{display:block;color:#000;background:#fff;font:9pt/1.35 Arial,Helvetica,sans-serif}
  .tlg-pl{margin:0 0 8pt;padding:0 0 6pt;border-bottom:1pt solid #000}
  .tlg-plw{font:700 11pt Arial,Helvetica,sans-serif}
  .tlg-pll{font:9pt Arial,Helvetica,sans-serif}
  .tlg-ph{margin:6pt 0 2pt;font:700 14pt Arial,Helvetica,sans-serif;color:#000}
  .tlg-pf{margin:0 0 2pt;font:9pt Arial,Helvetica,sans-serif}
  .tlg-pt{width:100%;margin-top:8pt;border-collapse:collapse;font:8.5pt/1.3 Arial,Helvetica,sans-serif}
  .tlg-pt thead{display:table-header-group}
  .tlg-pt th{padding:3pt 4pt;border-bottom:1pt solid #000;text-align:left;vertical-align:bottom;font-weight:700}
  .tlg-pt td{padding:3pt 4pt;border-bottom:0.5pt solid #999;vertical-align:top}
  .tlg-pt tr{break-inside:avoid}
  /* the record's number on one line (never "RFI-" over "003") */
  .tlg-pt td:first-child,.tlg-pt th:first-child{white-space:nowrap}
  /* the page printed as it stands (the browser's own Print): the grid, plain */
  .tlg-acts,.tlg-bar,.tlg-act,.tlg-cb,.tlg-selbar,.tlg-rmenu,.tlg-fold,.tlg-tools,.tlg-foot [data-slot="more"],.tlg-keeper,.tlg-pills,.tlg-mark,.tlg-sortf,.tlg-q,.tlg-lede{display:none !important}
  .tlg-t tbody tr.tlg-wait td,.tlg-t tbody tr.tlg-wait th{background:#fff}
  .tlg-scroll{max-height:none;overflow:visible;border:0;background:#fff}
  .tlg-t{color:#000;font:8.5pt Arial,Helvetica,sans-serif}
  .tlg-t thead th{position:static;background:#fff;color:#000;border-bottom:1pt solid #000}
  .tlg-t tbody td,.tlg-t tbody th{color:#000;background:#fff;border-bottom:0.5pt solid #999}
  .tlg-frz{position:static;border-right:0}
}
/* the design gate 1.168.0 (H1): on a phone the export buttons read CSV / Excel / PDF so the row keeps one line; the word stays for a screen reader */
@media (max-width:820px){.tlg-xw{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}}
/* LA-01: the view switch (List, then each registered view the spec names) - outlined like the fold, never filled (D3) */
.tlg-vsw{display:flex;gap:0;flex-wrap:wrap}
.tlg-vsw[hidden]{display:none}
.tlg-vswb{display:inline-flex;align-items:center;min-height:var(--h-ctl,34px);padding:0 8px;margin-bottom:-1px;border:0;
  border-bottom:2px solid transparent;background:transparent;color:var(--muted);font:500 13px/1.2 var(--fbody,Inter,Arial,sans-serif);cursor:pointer}
.tlg-vswb:hover{color:var(--ink)}
.tlg-vswb[aria-pressed="true"]{color:var(--ink);border-bottom-color:var(--taupe)}
.tlg-vswb:focus-visible,.tlg-sheetb:focus-visible{outline:2px solid var(--focus,var(--taupe));outline-offset:2px}
/* the view's area, in place of the grid while a view is chosen */
.tlg-scroll[hidden],.tlg-varea[hidden]{display:none}
.tlg-varea{min-height:120px;padding:12px 0}
.tlg-varea .tlg-state{padding:24px 22px;margin:0}
.tlg-vask{margin:0;padding:24px 22px;color:var(--muted);font:400 13px/1.4 var(--fbody,Inter,Arial,sans-serif)}
/* a record view's opener with no app address: a button drawn as the record link */
.tlg-sheetb{border:0;padding:0;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
@media (max-width:820px){.tlg-vswb{min-height:44px}}
@media print{.tlg-vsw{display:none !important}}
