/* litan-table.css — the console's TABLE INSTRUMENT (DESIGN_SYSTEM_V4 §6.1 kind 3, §6.3, §2.5).
 *
 * ONE component, three instances. The markup it styles is a REAL server-rendered <table> with a
 * <caption>, <th scope>, a <tfoot> summary row and an <a href> in every row's first cell — so the
 * table is complete, sorted, readable and clickable with JavaScript off and to a crawler. Every
 * control (sort handle, filters, find, column picker, density, export) is CREATED by litan-table.js,
 * so a reader without JS never meets a control that does nothing.
 *
 * RE-TOKENING. Every visual value this sheet uses is a custom property declared in ONE place below
 * (§0). To adopt a different token set (wave3/ELEGANCE.md), redefine those properties after this
 * sheet — no rule below hardcodes a colour, a radius, a duration or an easing.
 *
 * The three gate hues appear ONLY on .lt-gate-dot and .lt-cell-gate (AC-6.B1). Numbers are tabular
 * in the text face; monospace appears only inside .lt-receipt code (ruling 23).
 */

/* ─────────────────────────────────────────────────────────────────────────────
   §0. TOKENS — the only place a literal value appears.
   The ramp, the one blue, glass L0/L1/L2, the four glow forms, durations, easings
   (DESIGN_SYSTEM_V4 §7.1 §7.2 §7.3 §7.4 §3.1 §3.2 §2.2). Dark only.
   ───────────────────────────────────────────────────────────────────────────── */
.litan-table-scope,
:root {
  /* ramp */
  --lt-ground: #050608;
  --lt-ground-2: #0B0D11;
  --lt-edge: rgba(255, 255, 255, .12);
  --lt-edge-soft: rgba(255, 255, 255, .07);
  --lt-fill-1: rgba(255, 255, 255, .035);
  --lt-fill-2: rgba(255, 255, 255, .06);
  --lt-ink: #EEF2F7;
  --lt-ink-2: #B7C1CE;
  --lt-muted: #7D8896;
  --lt-rule: #1B222D;
  /* one blue, three lightnesses + the fourth data-ink step */
  --lt-blue: #5EA0FF;
  --lt-blue-2: #9CC4FF;
  --lt-blue-deep: #2F6FE0;
  --lt-blue-4: #CFE2FF;
  /* gate hues — .lt-gate-dot and .lt-cell-gate ONLY */
  --lt-good: #4CC38A;
  --lt-warn: #E2B84D;
  --lt-crit: #F06B5B;
  /* glow forms: hairline · ring · halo · underglow */
  --lt-glow-ring: rgba(94, 160, 255, .30);
  --lt-glow-ring-strong: rgba(94, 160, 255, .48);
  --lt-glow-halo: rgba(94, 160, 255, .16);
  --lt-accent-hair: rgba(94, 160, 255, .55);
  --lt-hair: rgba(255, 255, 255, .10);
  --lt-hair-strong: rgba(255, 255, 255, .16);
  /* shadow: soft and large — a 1px seat, a mid bloom, a long fall */
  --lt-sh-1: 0 1px 1px rgba(0, 0, 0, .44), 0 12px 26px -12px rgba(0, 0, 0, .66), 0 44px 84px -34px rgba(0, 0, 0, .84);
  --lt-sh-2: 0 1px 1px rgba(0, 0, 0, .44), 0 14px 30px -12px rgba(0, 0, 0, .68), 0 52px 104px -38px rgba(0, 0, 0, .86);
  --lt-sh-focus: 0 0 0 3px var(--lt-glow-ring);
  /* the 1px edge is a GRADIENT, brightest at the top-left */
  --lt-edge-grad: linear-gradient(146deg, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .165) 24%, rgba(255, 255, 255, .075) 52%, rgba(255, 255, 255, .115) 100%);
  --lt-sheen: linear-gradient(180deg, rgba(255, 255, 255, .055) 0%, rgba(255, 255, 255, .015) 40%, transparent 100%);
  --lt-glass-1: rgba(6, 8, 12, .32);
  --lt-glass-2: rgba(6, 8, 12, .44);
  /* durations + easings */
  --lt-d-micro: 120ms;
  --lt-d-fast: 160ms;
  --lt-d-med: 240ms;
  --lt-d-slow: 400ms;
  --lt-e-out: cubic-bezier(.23, 1, .32, 1);
  --lt-e-house: cubic-bezier(.32, .72, .28, 1);
  /* type */
  --lt-font: "Geist", -apple-system, "SF Pro Display", Inter, system-ui, sans-serif;
  --lt-mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --lt-t-h2: 1.25rem;
  --lt-t-body: 1.03rem;
  --lt-t-cap: .8125rem;
  --lt-t-eyebrow: .6875rem;
  --lt-f-3: 1.75rem;
  --lt-f-4: 1.125rem;
  /* radii + rhythm (§2.5: rows ARE the visual, so density is real) */
  --lt-r-1: 6px;
  --lt-r-2: 8px;
  --lt-r-ctl: 4px;
  --lt-r-chip: 3px;
  --lt-row-h: 46px;
  --lt-row-h-compact: 34px;
  --lt-pad-x: 9px;
  --lt-bar-w: 44px;
  --lt-bar-h: 7px;
  --lt-scroll-h: 560px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   §1. ROOT + HEAD — title · denominator · controls (the controls are JS-created)
   ───────────────────────────────────────────────────────────────────────────── */
/* the hidden attribute must beat every display rule in this sheet */
.litan-table [hidden] { display: none !important; }

.litan-table {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--lt-font);
  color: var(--lt-ink);
  font-feature-settings: "tnum" 1, "lnum" 1, "ss01" 1;
}

.litan-table .lt-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.litan-table .lt-title {
  margin: 0;
  font-size: var(--lt-t-h2);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 600;
  color: var(--lt-ink);
  text-wrap: balance;
}

.litan-table .lt-sub {
  margin: 6px 0 0;
  font-size: var(--lt-t-cap);
  line-height: 1.5;
  font-weight: 500;
  color: var(--lt-ink-2);
  max-width: 68ch;
}

.litan-table .lt-gate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--lt-t-eyebrow);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--lt-muted);
  white-space: nowrap;
}

/* ELEGANCE §2.5: the DEFAULT gate prints the word only — no dot, no glow, because a green dot on
   every instrument turns a page of tables into a page of traffic lights. A non-default gate takes a
   1x9px hairline in its hue, and the word takes the hue with it. The honesty is unchanged: every
   gate still prints its word at first paint. */
.litan-table .lt-gate-dot { width: 1px; height: 9px; background: transparent; flex: none; }
.litan-table[data-gate="pass"] .lt-gate-dot { display: none; }
.litan-table[data-gate="watch"] .lt-gate-dot,
.litan-table[data-gate="stale"] .lt-gate-dot { background: var(--lt-warn); }
.litan-table[data-gate="watch"], .litan-table[data-gate="stale"] { --lt-gate-word: var(--lt-warn); }
.litan-table[data-gate="withheld"] .lt-gate-dot { background: var(--lt-ink-2); }
.litan-table[data-gate="withheld"] { --lt-gate-word: var(--lt-ink-2); }
.litan-table[data-gate="structural"] .lt-gate-dot { background: var(--lt-blue); }
.litan-table .lt-gate { color: var(--lt-gate-word, var(--lt-muted)); }

/* ─────────────────────────────────────────────────────────────────────────────
   §2. THE CONTROL BAR — one construction for every control: a lit top edge,
   a soft seat, and a full hover / press / focus. All created by JS.
   ───────────────────────────────────────────────────────────────────────────── */
.litan-table .lt-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.litan-table .lt-bar .lt-spring { flex: 1 1 auto; }

.litan-table .lt-find {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 300px;
  min-width: 190px;
}

.litan-table .lt-find svg {
  position: absolute;
  left: 13px;
  width: 14px;
  height: 14px;
  color: var(--lt-muted);
  pointer-events: none;
  transition: color var(--lt-d-fast) var(--lt-e-out);
}

.litan-table .lt-find:focus-within svg { color: var(--lt-blue-2); }

.litan-table input[type="search"],
.litan-table input[type="text"],
.litan-table select,
.litan-table .lt-btn {
  font: inherit;
  font-size: var(--lt-t-cap);
  font-weight: 500;
  color: var(--lt-ink);
  border: 1px solid transparent;
  border-radius: var(--lt-r-ctl);
  padding: 8px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .014) 60%, transparent 100%) padding-box,
    var(--lt-glass-1) padding-box,
    var(--lt-edge-grad) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .4);
  transition: box-shadow var(--lt-d-fast) var(--lt-e-out), color var(--lt-d-fast) var(--lt-e-out),
    transform var(--lt-d-micro) var(--lt-e-out);
  -webkit-appearance: none;
  appearance: none;
}

.litan-table input[type="search"] { padding-left: 34px; width: 100%; }
.litan-table .lt-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.litan-table .lt-btn svg { width: 13px; height: 13px; opacity: .8; }

.litan-table input:hover,
.litan-table select:hover,
.litan-table .lt-btn:hover {
  color: var(--lt-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 1px 2px rgba(0, 0, 0, .4), 0 0 0 1px var(--lt-glow-halo);
}

.litan-table .lt-btn:active { transform: translateY(1px); transition-duration: var(--lt-d-micro); }

.litan-table input:focus-visible,
.litan-table select:focus-visible,
.litan-table .lt-btn:focus-visible,
.litan-table [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--lt-sh-focus);
}

.litan-table input::placeholder { color: var(--lt-muted); }
.litan-table .lt-btn[aria-pressed="true"] { color: var(--lt-blue-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 0 0 1px var(--lt-glow-ring); }

/* the chip strip: one chip per live filter, each removable — the state is visible, not hidden in a menu */
.litan-table .lt-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.litan-table .lt-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--lt-t-eyebrow);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--lt-ink-2);
  padding: 5px 6px 5px 9px;
  border-radius: var(--lt-r-chip);
  border: 1px solid transparent;
  background: var(--lt-fill-1) padding-box, var(--lt-edge-grad) border-box;
}
.litan-table .lt-chip b { color: var(--lt-ink); font-weight: 600; }
.litan-table .lt-chip button {
  all: unset;
  cursor: pointer;
  width: 16px;
  height: 16px;
  border-radius: var(--lt-r-chip);
  display: grid;
  place-items: center;
  color: var(--lt-muted);
  line-height: 1;
}
.litan-table .lt-chip button:hover { color: var(--lt-ink); background: rgba(255, 255, 255, .08); }
.litan-table .lt-chip button:focus-visible { box-shadow: var(--lt-sh-focus); }

/* the column picker — an L2 float */
.litan-table .lt-picker { position: relative; }
.litan-table .lt-picker-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 9;
  min-width: 232px;
  padding: 10px 6px;
  display: none;
  border: 1px solid transparent;
  border-radius: var(--lt-r-2);
  box-shadow: var(--lt-sh-2), 0 40px 120px -50px var(--lt-glow-ring-strong);
  background:
    linear-gradient(158deg, rgba(255, 255, 255, .072) 0%, rgba(255, 255, 255, .026) 46%, rgba(255, 255, 255, .013) 100%) padding-box,
    var(--lt-glass-2) padding-box,
    radial-gradient(38% 2px at 50% 0, var(--lt-glow-ring-strong) 0%, transparent 100%) border-box,
    var(--lt-edge-grad) border-box;
  -webkit-backdrop-filter: blur(28px) saturate(1.5) brightness(.84);
  backdrop-filter: blur(28px) saturate(1.5) brightness(.84);
}
.litan-table .lt-picker-menu[data-open="true"] { display: block; }
.litan-table .lt-picker-menu label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  font-size: var(--lt-t-cap);
  font-weight: 500;
  color: var(--lt-ink-2);
  cursor: pointer;
  border-radius: var(--lt-r-ctl);
}
.litan-table .lt-picker-menu label:hover { background: var(--lt-fill-1); color: var(--lt-ink); }
.litan-table .lt-picker-menu input[type="checkbox"] { accent-color: var(--lt-blue); width: 14px; height: 14px; }
.litan-table .lt-picker-menu .lt-pick-note {
  padding: 6px 10px 2px;
  font-size: var(--lt-t-eyebrow);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lt-muted);
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────────────────
   §3. THE BODY — L0 ground inside an L1 frame; rows light to L1 on hover only
   (§6.4: never glass behind data; a table body is L0 with L1 rows on hover).
   ───────────────────────────────────────────────────────────────────────────── */
.litan-table .lt-scroll {
  position: relative;
  container-type: inline-size;
  overflow: auto;
  max-height: var(--lt-scroll-h);
  border: 1px solid transparent;
  border-radius: var(--lt-r-1);
  background: var(--lt-ground);
  border-color: var(--lt-hair);
  scrollbar-color: var(--lt-rule) transparent;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.litan-table .lt-scroll:focus-visible { outline: none; box-shadow: var(--lt-sh-focus); }

.litan-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--lt-t-cap);
}

/* the caption is real and read by a screen reader; on screen it is the instrument's own denominator line */
.litan-table caption {
  caption-side: top;
  text-align: left;
  padding: 12px var(--lt-pad-x) 11px;
  font-size: var(--lt-t-eyebrow);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--lt-muted);
  border-bottom: 1px solid var(--lt-edge-soft);
  background: var(--lt-ground-2);
  white-space: normal;
  line-height: 1.5;
  position: sticky;
  left: 0;
}

/* sticky glass header — L2 over the rows it holds down */
.litan-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
}
.litan-table thead th {
  position: relative;
  text-align: left;
  vertical-align: bottom;
  font-size: var(--lt-t-eyebrow);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--lt-muted);
  padding: 12px var(--lt-pad-x) 11px;
  white-space: nowrap;
  border-bottom: 1px solid var(--lt-hair);
  background: var(--lt-ground);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  transition: color var(--lt-d-fast) var(--lt-e-out), background var(--lt-d-fast) var(--lt-e-out);
}
/* the hairline glow form across the middle of the header's bottom edge */
.litan-table thead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--lt-hair-strong);
  pointer-events: none;
}
.litan-table thead th[data-sortable] { cursor: pointer; user-select: none; }
.litan-table thead th[data-sortable]:hover { color: var(--lt-ink); background: rgba(255, 255, 255, .03); }
.litan-table thead th.lt-num { text-align: right; }
.litan-table thead th .lt-sort {
  display: inline-block;
  width: 9px;
  margin-left: 7px;
  color: var(--lt-rule);
  font-size: 10px;
  line-height: 1;
  vertical-align: 1px;
  transition: color var(--lt-d-fast) var(--lt-e-out);
}
.litan-table thead th:hover .lt-sort { color: var(--lt-muted); }
.litan-table thead th[aria-sort="ascending"], .litan-table thead th[aria-sort="descending"] { color: var(--lt-ink); }
.litan-table thead th[aria-sort="ascending"] .lt-sort, .litan-table thead th[aria-sort="descending"] .lt-sort { color: var(--lt-accent-hair); }
/* underglow on the sorted column — the fourth glow form */
.litan-table thead th[aria-sort="ascending"]::before, .litan-table thead th[aria-sort="descending"]::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 1px;
  background: var(--lt-accent-hair);
}
/* sticky first column — the name stays while the numbers scroll */
.litan-table thead th.lt-sticky, .litan-table tbody td.lt-sticky, .litan-table tfoot td.lt-sticky, .litan-table tfoot th.lt-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
}
.litan-table thead th.lt-sticky { z-index: 4; }
.litan-table tbody td.lt-sticky { background: var(--lt-ground); }
.litan-table tbody tr:hover td.lt-sticky, .litan-table tbody tr.is-cursor td.lt-sticky { background: #0B0D11; }

/* the second header row: per-column filter inputs, created by JS */
.litan-table thead tr.lt-filters[hidden] { display: none !important; }
.litan-table thead tr.lt-filters th { padding: 0 6px 9px; background: linear-gradient(180deg, rgba(16, 20, 27, .94), rgba(11, 14, 19, .9)); border-bottom: 1px solid var(--lt-edge); }
.litan-table thead tr.lt-filters input, .litan-table thead tr.lt-filters select { padding: 5px 8px; font-size: var(--lt-t-eyebrow); width: 100%; min-width: 0; letter-spacing: .02em; text-transform: none; }
.litan-table thead tr.lt-filters .lt-range { display: flex; gap: 5px; align-items: center; }
.litan-table thead tr.lt-filters .lt-range input { text-align: right; width: 50%; }
.litan-table thead tr.lt-filters select { max-width: 92px; }

/* rows */
.litan-table tbody tr {
  height: var(--lt-row-h);
  transition: background var(--lt-d-fast) var(--lt-e-out), box-shadow var(--lt-d-fast) var(--lt-e-out);
}
.litan-table td[data-type="text"]:not(.lt-name), .litan-table th[data-type="text"]:not(.lt-name) {
  max-width: 124px; overflow: hidden; text-overflow: ellipsis;
}
.litan-table td.lt-name, .litan-table th.lt-name { max-width: 208px; overflow: hidden; text-overflow: ellipsis; }
.litan-table tbody td {
  padding: 0 var(--lt-pad-x);
  white-space: nowrap;
  color: var(--lt-ink-2);
  vertical-align: middle;
}
.litan-table tbody tr.lt-spacer, .litan-table tbody tr.lt-spacer td {
  height: 0; padding: 0; border: 0; background: none;
}
/* ELEGANCE §3.4: no zebra, no row borders. The grid comes from alignment, not from lines. */

/* hover / cursor: an L1 row over an L0 body, with the ring glow form */
/* hover is a WASH, not a ring; the keyboard cursor adds a 1px accent RULE so it stays separable */
.litan-table tbody tr:hover,
.litan-table tbody tr:focus-within { background: rgba(255, 255, 255, .03); }
.litan-table tbody tr.is-cursor { background: rgba(255, 255, 255, .045); box-shadow: inset 1px 0 0 var(--lt-accent-hair); }
.litan-table tbody tr:hover td, .litan-table tbody tr.is-cursor td { color: var(--lt-ink); }

/* the name cell holds the real <a href> — the whole row is a hit target when JS is on */
.litan-table td.lt-name { color: var(--lt-ink); font-weight: 500; }
.litan-table td.lt-name a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  border-radius: var(--lt-r-chip);
  outline-offset: 3px;
}
.litan-table td.lt-name a:focus-visible { outline: none; box-shadow: var(--lt-sh-focus); }
.litan-table td.lt-name a:hover { color: var(--lt-blue-2); }
.litan-table td.lt-name .lt-key {
  font-size: var(--lt-t-eyebrow);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lt-muted);
  font-weight: 600;
}
.litan-table tbody tr:hover td.lt-name .lt-key, .litan-table tbody tr.is-cursor td.lt-name .lt-key { color: var(--lt-ink-2); }

/* the arrow only appears on the live row — the affordance, not decoration */
.litan-table td.lt-go { width: 30px; padding-left: 0; padding-right: 12px; text-align: right; }
.litan-table td.lt-go span { color: var(--lt-muted); opacity: 0; transition: opacity var(--lt-d-fast) var(--lt-e-out), color var(--lt-d-fast) var(--lt-e-out), transform var(--lt-d-fast) var(--lt-e-out); display: inline-block; }
.litan-table tbody tr:hover td.lt-go span, .litan-table tbody tr.is-cursor td.lt-go span { opacity: 1; color: var(--lt-blue-2); transform: translateX(2px); }

/* numbers: right-aligned, tabular, in the TEXT face (ruling 23) */
.litan-table td.lt-num, .litan-table th.lt-num, .litan-table tfoot .lt-num {
  padding-left: 8px;
  width: 1%;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.litan-table td.lt-num { color: var(--lt-ink); font-weight: 500; }
.litan-table td.lt-num.is-zero { color: var(--lt-muted); font-weight: 400; }

/* ELEGANCE §3.7 — every mini-visual is A MARK ON A SCALE, never a filled track, a rounded bar,
   a waffle, a ring or a donut. One construction serves all of them, so the same quantity type wears
   the same mark down a row and the columns compare:
     ::before  the 1px --hair track, full column width
     <s>       minor ticks in --rule (quarters for a share, one per unit for a small count)
     <i>       the measured extent, 2px in --ink-2
     <u>       the value, a 1px x 14 --ink tick
   The number itself is printed beside it, so nothing is read off the mark alone. */
.litan-table .lt-mark {
  display: inline-block;
  position: relative;
  width: var(--lt-mark-w, 54px);
  height: 16px;
  vertical-align: middle;
  margin-right: 10px;
}
.litan-table .lt-mark::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--lt-hair);
}
.litan-table .lt-mark s { position: absolute; top: calc(50% - 2px); height: 4px; width: 1px; background: var(--lt-rule); }
.litan-table .lt-mark i { position: absolute; left: 0; top: calc(50% - 1px); height: 2px; width: var(--w, 0%); background: var(--lt-ink-2); }
.litan-table .lt-mark u { position: absolute; left: var(--w, 0%); top: 1px; bottom: 1px; width: 1px; background: var(--lt-ink); }
.litan-table tbody tr:hover .lt-mark u, .litan-table tbody tr.is-cursor .lt-mark u { background: var(--lt-accent-hair); }
/* a share is always drawn on 0-100, so settled, dismissed and judgment compare across the row */
.litan-table .lt-mark[data-scale="share"] { --lt-mark-w: 50px; }

/* a gate dot inside a cell — one of the two places a gate hue may appear */
/* ELEGANCE §3.6: a fold never shows more than ONE coloured gate mark, so a recorded yes/no outcome
   is carried by INK, not by hue — 88 rows x 3 outcome columns of amber dots was a page of traffic
   lights and it was also what pushed the withheld column off the right edge. `yes` is --ink at 500,
   `no` is --muted at 400; the words are unchanged, so nothing is lost to a reader or a screen reader. */
.litan-table .lt-cell-gate { display: none; }
.litan-table td[data-type="gate"] { color: var(--lt-muted); font-weight: 400; }
.litan-table td[data-type="gate"][data-on="1"] { color: var(--lt-ink); font-weight: 500; }

/* register pips — seven registers as seven cells, filled or empty; a count nobody can misread */
.litan-table .lt-pips { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 10px; }
.litan-table .lt-pips i { width: 7px; height: 12px; border-radius: 2px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.litan-table .lt-pips i[data-on="1"] { background: linear-gradient(180deg, var(--lt-blue-2), var(--lt-blue-deep)); }
.litan-table tbody tr:hover .lt-pips i[data-on="1"] { box-shadow: 0 0 8px var(--lt-glow-ring); }

/* ─────────────────────────────────────────────────────────────────────────────
   §4. THE WITHHELD COLUMN (§6.3) — never blank, never invented, never "n/a".
   The header keeps its name and takes a WITHHELD word; the cells draw the FRAME
   of the value that would be there (a hatched slot), and the reason is stated
   once under the table where a reader will actually read it.
   ───────────────────────────────────────────────────────────────────────────── */
.litan-table th[data-withheld] { color: var(--lt-muted); }
.litan-table th[data-withheld] .lt-wh {
  display: block;
  margin-top: 4px;
  font-size: var(--lt-t-eyebrow);
  letter-spacing: .08em;
  color: var(--lt-muted);
  font-weight: 600;
  opacity: .9;
}
.litan-table td[data-withheld] { color: var(--lt-muted); }
.litan-table .lt-slot,
.litan-table td[data-withheld] .lt-slot {
  display: inline-block;
  width: 46px;
  height: var(--lt-bar-h);
  border-radius: 0;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px var(--lt-edge);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .085) 0 1px, transparent 1px 6px);
}
.litan-table .lt-withheld-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--lt-t-cap);
  line-height: 1.5;
  color: var(--lt-ink-2);
  font-weight: 500;
  padding: 12px 14px;
  border-radius: var(--lt-r-1);
  border: 1px solid transparent;
  background: var(--lt-fill-1) padding-box, var(--lt-edge-grad) border-box;
  max-width: 78ch;
}
.litan-table .lt-withheld-note b { color: var(--lt-ink); font-weight: 600; }

/* a stale COLUMN: the ink stays (never grey the figure), the as-of is a word beside a warn dot */
.litan-table th[data-stale] .lt-asof, .litan-table .lt-asof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--lt-t-eyebrow);
  letter-spacing: .06em;
  color: var(--lt-ink-2);
  font-weight: 600;
  text-transform: none;
}
.litan-table .lt-asof::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--lt-warn); flex: none; }

/* ─────────────────────────────────────────────────────────────────────────────
   §5. THE SUMMARY ROW — a real <tfoot> inside the table, aligned to the columns,
   sticky at the bottom of the scroller. Count and denominator, plus the column
   totals a reader would otherwise compute by hand.
   ───────────────────────────────────────────────────────────────────────────── */
.litan-table tfoot { position: sticky; bottom: 0; z-index: 3; }
.litan-table tfoot th, .litan-table tfoot td {
  padding: 11px var(--lt-pad-x);
  border-top: 1px solid var(--lt-hair-strong);
  background: var(--lt-ground-2);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  color: var(--lt-ink);
  font-weight: 600;
  white-space: nowrap;
  font-size: var(--lt-t-cap);
}
.litan-table tfoot th { text-align: left; font-weight: 600; color: var(--lt-ink); }
.litan-table tfoot .lt-den { display: block; font-size: var(--lt-t-eyebrow); letter-spacing: .06em; color: var(--lt-ink-2); font-weight: 600; margin-top: 3px; text-transform: none; }
.litan-table tfoot td[data-withheld] { color: var(--lt-muted); font-weight: 500; }

/* the foot line under the frame: what is on screen, out of what population */
.litan-table .lt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  flex-wrap: wrap;
  font-size: var(--lt-t-cap);
  color: var(--lt-muted);
  font-weight: 500;
  padding: 0 4px;
}
.litan-table .lt-foot .lt-count { color: var(--lt-ink-2); font-variant-numeric: tabular-nums; }
.litan-table .lt-foot .lt-count b { color: var(--lt-ink); font-weight: 600; }
.litan-table .lt-receipt { color: var(--lt-muted); }
.litan-table .lt-receipt code { font-family: var(--lt-mono); font-size: .96em; color: var(--lt-ink-2); }

/* ─────────────────────────────────────────────────────────────────────────────
   §6. THE SIX DESIGNED STATES (§6.3). None is blank; none is a dash, a spinner,
   a grey skeleton block or a red placard.
   ───────────────────────────────────────────────────────────────────────────── */
.litan-table .lt-frame {
  position: relative;
  min-height: 300px;
  border: 1px solid transparent;
  border-radius: var(--lt-r-1);
  background: var(--lt-ground) padding-box, var(--lt-edge-grad) border-box;
  box-shadow: var(--lt-sh-1);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
/* the frame keeps the COLUMNS, so the reader sees the shape of what is missing */
.litan-table .lt-frame .lt-frame-head {
  display: flex;
  gap: 20px;
  padding: 13px var(--lt-pad-x);
  border-bottom: 1px solid var(--lt-edge);
  font-size: var(--lt-t-eyebrow);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lt-muted);
  font-weight: 600;
  background: var(--lt-ground-2);
}
.litan-table .lt-frame .lt-frame-head span:first-child { flex: 2.2 1 0; }
.litan-table .lt-frame .lt-frame-head span { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* the ruled empty rows: the FRAME of the rows, in edge only, nothing filled */
.litan-table .lt-frame .lt-frame-rows { background-image: repeating-linear-gradient(180deg, transparent 0 calc(var(--lt-row-h) - 1px), var(--lt-edge-soft) calc(var(--lt-row-h) - 1px) var(--lt-row-h)); }
.litan-table .lt-frame .lt-say {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 0 32px;
}
.litan-table .lt-frame .lt-say p {
  margin: 0;
  font-size: var(--lt-t-h2);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--lt-ink-2);
  max-width: 44ch;
}
.litan-table .lt-frame .lt-say small { font-size: var(--lt-t-cap); color: var(--lt-muted); font-weight: 500; max-width: 56ch; line-height: 1.5; }
.litan-table .lt-frame .lt-say .lt-btn { margin-top: 4px; }

/* LOADING: one hairline travels the top edge once — never a shimmer block, never a spinner.
   Rows that are already known stay at .62 (ruling 29's floor) rather than being replaced by grey. */
.litan-table[data-state="loading"] .lt-scroll::after,
.litan-table[data-state="loading"] .lt-frame::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 26%;
  background: linear-gradient(90deg, transparent, var(--lt-blue-2), transparent);
  animation: lt-travel 1400ms linear infinite;
}
.litan-table[data-state="loading"] .lt-scroll { position: relative; }
.litan-table[data-state="loading"] tbody tr { opacity: .62; }
@keyframes lt-travel { from { transform: translateX(-100%); } to { transform: translateX(420%); } }

/* ERROR: the loading frame plus a receipt line that says what did not answer. No red placard. */
.litan-table[data-state="error"] .lt-receipt { color: var(--lt-ink-2); }

/* the live region that announces the result count to a screen reader */
.litan-table .lt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   §7. DENSITY, MOBILE, PRINT, REDUCED MOTION
   ───────────────────────────────────────────────────────────────────────────── */
.litan-table[data-density="compact"] tbody tr { height: var(--lt-row-h-compact); }
.litan-table[data-density="compact"] .lt-mark { display: none; }

@media (max-width: 720px) {
  .litan-table { --lt-scroll-h: 60vh; --lt-pad-x: 10px; --lt-mark-w: 34px; }
  .litan-table .lt-head { align-items: flex-start; }
  .litan-table .lt-find { flex: 1 1 100%; }

  /* the sticky first column earns its keep on a phone; the rest scrolls under it */
  .litan-table td.lt-name, .litan-table th.lt-name { max-width: 44vw; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  .litan-table *, .litan-table *::before, .litan-table *::after { transition-duration: 1ms !important; animation: none !important; }
  /* what STAYS: the hover ring, the focus ring, the sorted underglow — state, not motion */
}

@media print {
  .litan-table .lt-bar, .litan-table .lt-picker, .litan-table .lt-go { display: none; }
  .litan-table .lt-scroll { max-height: none; overflow: visible; box-shadow: none; }
  .litan-table thead th, .litan-table tfoot td, .litan-table tfoot th { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
