/* ─────────────────────────────────────────────────────────────────────
   HOMEi Ledger — «دفتر الأستاذ» (LEDGER-1 / LEDGER-DS-1, 2026-10-24): the
   general ledger's screens on the house design system — chart of accounts,
   journal entries, import from Excel, trial balance, statement, vouchers,
   treasury and banks, posting rules, period close.

   Copied from the design system's starter sheet (v1.0, 28-9-2026) with the
   prefix `ds` → `lg`, plus the ledger's own pieces at the end (§17+).

   Colours: the house tokens (--lm-d-* in resources/css/tokens.css, with
   their dark mirror); no colour literal here — the ratchet holds this sheet
   at zero. Text never under 12px. RTL-safe: logical properties only.
   Scoped by `.lg-page` (the page class) and `.lg`.

   Registered as a Filament asset — a change here ships NOTHING until
   `php artisan filament:assets` is run and public/css/app/ is committed in
   the same change.
   ──────────────────────────────────────────────────────────────────── */

/* ── 1. the ground and the head ── */
body:has(.lg-page) { background: var(--lm-d-page); }
body:has(.lg-page) .fi-main-ctn { background: transparent; }
.lg-page .fi-header-heading { font-size: 28px; font-weight: 700; line-height: 1.25; color: var(--lm-d-ink); }
.lg-page .fi-header-subheading { margin-block-start: 4px; font-size: 14px; color: var(--lm-d-muted); }

.lg { display: flex; flex-direction: column; gap: 14px; color: var(--lm-d-ink); }
.lg :focus-visible { outline: 2px solid var(--lm-d-info); outline-offset: 2px; }
.lg .lg-num { font-variant-numeric: tabular-nums; }
.lg bdi { unicode-bidi: isolate; }

/* the page's header actions (Filament): outline buttons, the main decision is the orange */
.lg-page .fi-header-actions-ctn .fi-btn {
    min-block-size: 44px;
    border-radius: 12px;
    padding-inline: 16px;
    background: var(--lm-d-surface);
    color: var(--lm-d-ink);
    box-shadow: inset 0 0 0 1px var(--lm-d-control-edge);
    font-weight: 700;
}
.lg-page .fi-header-actions-ctn .fi-btn .fi-icon { color: currentColor; }
.lg-page .fi-header-actions-ctn .fi-btn:is(.fi-color-primary, .fi-color-success) { background: var(--lm-d-accent); color: var(--lm-d-on-accent); box-shadow: 0 4px 12px var(--lm-d-accent-soft); }
.lg-page .fi-header-actions-ctn .fi-btn.fi-color-danger { color: var(--lm-d-danger); box-shadow: inset 0 0 0 1px var(--lm-d-gap-edge); }

/* ── 2. text tones (words and figures only) ── */
.lg .is-ink { color: var(--lm-d-ink); }
.lg .is-muted { color: var(--lm-d-muted); }
.lg .is-ok { color: var(--lm-d-ok); }
.lg .is-warn { color: var(--lm-d-warn); }
.lg .is-danger { color: var(--lm-d-danger); }
.lg .is-accent { color: var(--lm-d-accent-ink); }
.lg .is-info { color: var(--lm-d-info); }

/* ── 3. the numbers strip (KPI row): label · big figure · one line under it ── */
.lg-strip {
    display: grid;
    grid-template-columns: repeat(var(--lg-cols, 6), minmax(0, 1fr));
    background: var(--lm-d-surface);
    border: 1px solid var(--lm-d-border);
    border-radius: 16px;
    box-shadow: 0 1px 2px var(--lm-d-shadow);
}
.lg-strip-c { padding: 12px 18px; border-inline-start: 1px solid var(--lm-d-divider); min-inline-size: 0; }
.lg-strip-c:first-child { border-inline-start: 0; }
a.lg-strip-c, button.lg-strip-c { color: inherit; text-decoration: none; background: none; border-block: 0; border-inline-end: 0; text-align: start; font: inherit; cursor: pointer; }
a.lg-strip-c:hover, button.lg-strip-c:hover { background: var(--lm-d-hover); }
.lg-k-l { font-size: 13px; color: var(--lm-d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-k-v { font-size: 26px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-k-s { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 4. the card with the blue rule (the page's main surface) ── */
.lg-card {
    background: var(--lm-d-surface);
    border: 1px solid var(--lm-d-border);
    border-block-start: 3px solid var(--lm-d-info);
    border-radius: 16px;
    box-shadow: 0 1px 2px var(--lm-d-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.lg-card--plain { border-block-start-width: 1px; border-block-start-color: var(--lm-d-border); }
.lg-card-h {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 12px 18px;
    border-block-end: 1px solid var(--lm-d-divider);
}
.lg-card-t { font-size: 20px; font-weight: 700; margin: 0; }
.lg-card-t span { font-size: 14px; font-weight: 500; color: var(--lm-d-muted); }
.lg-card-b { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }

/* ── 5. view pills (the page's views / tabs): navy when on ── */
.lg-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lg-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-block-size: 40px;
    padding-inline: 16px;
    border-radius: 20px;
    border: 1px solid var(--lm-d-border);
    background: var(--lm-d-surface);
    color: var(--lm-d-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}
.lg-pill:hover { border-color: var(--lm-d-control-edge); }
.lg-pill.is-on { background: var(--lm-d-tab-on-bg); border-color: var(--lm-d-tab-on-bg); color: var(--lm-d-tab-on-ink); }
.lg-pill-n { font-variant-numeric: tabular-nums; }
.lg-dot { inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--lm-d-info); flex: none; }
.lg-dot.is-accent { background: var(--lm-d-accent); }
.lg-dot.is-ok { background: var(--lm-d-ok); }
.lg-dot.is-danger { background: var(--lm-d-danger); }
.lg-pill.is-on .lg-dot { background: var(--lm-d-accent); }

/* ── 6. status chips with counts (filters on the list's toolbar row) ── */
.lg-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-block-size: 34px;
    padding-inline: 12px;
    border: 1px solid var(--lm-d-border);
    border-radius: 10px;
    background: var(--lm-d-page);
    color: var(--lm-d-muted);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.lg-chip b { color: var(--lm-d-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-chip:hover { background: var(--lm-d-chip-bg); }
.lg-chip.is-on { background: var(--lm-d-info-soft); border-color: var(--lm-d-info-soft); color: var(--lm-d-info); }
.lg-chip.is-on b { color: var(--lm-d-info); }

/* ── 7. toolbar: search (the panel-wide dictation mic attaches itself) + a small segmented toggle ── */
.lg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 18px; border-block-end: 1px solid var(--lm-d-divider); }
.lg-search { margin-inline-start: auto; inline-size: min(320px, 100%); block-size: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--lm-d-control-edge); border-radius: 10px; background: var(--lm-d-surface); color: var(--lm-d-muted); }
.lg-search .lg-ic { inline-size: 16px; block-size: 16px; flex: none; }
.lg-search input { flex: 1; min-inline-size: 0; block-size: 34px; border: 0; outline: 0; background: transparent; color: var(--lm-d-ink); font: inherit; font-size: 13.5px; }
.lg-search input::placeholder { color: var(--lm-d-muted); }
.lg-search:focus-within { border-color: var(--lm-d-accent); box-shadow: 0 0 0 3px var(--lm-d-accent-soft); }
.lg-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--lm-d-border); border-radius: 10px; background: var(--lm-d-surface); }
.lg-seg button { block-size: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--lm-d-muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.lg-seg button:hover { color: var(--lm-d-ink); }
.lg-seg button.is-on { background: var(--lm-d-chip-bg); color: var(--lm-d-ink); font-weight: 700; }

/* ── 8. the split: the list (start) and the item opened beside it (end) ── */
.lg-split { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.lg-split.has-open { grid-template-columns: minmax(0, 1fr) 360px; }
.lg-split:not(.has-open) .lg-panel { display: none; }
.lg-list { min-inline-size: 0; }
.lg-split.has-open .lg-list { border-inline-end: 1px solid var(--lm-d-divider); }

/* a Filament table flattened into the card */
:is(.lg-list, .lg-doc-main) .fi-ta-ctn { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
:is(.lg-list, .lg-doc-main) .fi-ta-header-ctn { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding-inline: 18px 12px; border-block-end: 1px solid var(--lm-d-divider); }
:is(.lg-list, .lg-doc-main) .fi-ta-header-ctn > * { border: 0; }
:is(.lg-list, .lg-doc-main) .fi-ta-header { padding: 10px 0; flex: 1 1 auto; min-inline-size: 0; }
:is(.lg-list, .lg-doc-main) .fi-ta-header-toolbar { padding: 8px 0; flex: 0 0 auto; border: 0; }
:is(.lg-list, .lg-doc-main) .fi-ta-search-field { max-inline-size: 260px; }
:is(.lg-list, .lg-doc-main) .fi-ta-header-cell { background: var(--lm-d-surface); color: var(--lm-d-ink); font-size: 13.5px; font-weight: 700; padding-inline: 8px; white-space: nowrap; }
:is(.lg-list, .lg-doc-main) .fi-ta-cell { padding-inline: 8px; color: var(--lm-d-ink); }
:is(.lg-list, .lg-doc-main) .fi-ta-row:hover > td { background: var(--lm-d-hover); }
.lg-list .fi-ta-row { cursor: pointer; }
.lg-list .fi-ta-row.lg-row-open > td { background: var(--lm-d-row-hl); }
.lg-list .fi-ta-row.lg-row-open > td:first-child { box-shadow: inset -3px 0 0 var(--lm-d-accent); }
[dir='ltr'] .lg-list .fi-ta-row.lg-row-open > td:first-child { box-shadow: inset 3px 0 0 var(--lm-d-accent); }
:is(.lg-list, .lg-doc-main) .fi-ta-actions .fi-btn:is(.fi-color-success, .fi-color-primary) { background: var(--lm-d-accent); color: var(--lm-d-on-accent); }

/* a hand-built table (when the list is not a Filament table) */
.lg-table { inline-size: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.lg-table th { text-align: start; padding: 10px 12px; color: var(--lm-d-ink); font-weight: 700; font-size: 13.5px; border-block-end: 1px solid var(--lm-d-border); white-space: nowrap; }
.lg-table td { padding: 10px 12px; border-block-end: 1px solid var(--lm-d-divider); color: var(--lm-d-ink); vertical-align: middle; }
.lg-table tbody tr { cursor: pointer; }
.lg-table tbody tr:hover > td { background: var(--lm-d-hover); }
.lg-table tbody tr.is-open > td { background: var(--lm-d-row-hl); }
.lg-table tbody tr.is-open > td:first-child { box-shadow: inset -3px 0 0 var(--lm-d-accent); }
[dir='ltr'] .lg-table tbody tr.is-open > td:first-child { box-shadow: inset 3px 0 0 var(--lm-d-accent); }
.lg-table td.is-name { font-weight: 700; }
.lg-table tfoot td { background: var(--lm-d-info-soft); font-weight: 700; border: 0; }
.lg-dim { color: var(--lm-d-muted); font-size: 12.5px; }

/* ── 9. the panel (the opened item): head · own scroll · buttons pinned at the foot ── */
.lg-panel { position: sticky; inset-block-start: 12px; display: flex; flex-direction: column; background: var(--lm-d-surface); max-block-size: calc(100dvh - 120px); min-block-size: 420px; }
.lg-p { display: flex; flex-direction: column; min-block-size: 0; flex: 1 1 auto; }
.lg-p-h { padding: 14px 18px 12px; border-block-end: 1px solid var(--lm-d-divider); }
.lg-p-t { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.lg-p-x { margin-inline-start: auto; inline-size: 32px; block-size: 32px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--lm-d-border); background: var(--lm-d-surface); color: var(--lm-d-muted); font: inherit; font-size: 13px; cursor: pointer; }
.lg-p-s { margin-block-start: 2px; font-size: 13px; color: var(--lm-d-muted); }
.lg-p-b { flex: 1 1 auto; min-block-size: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.lg-p-f { padding: 12px 18px; border-block-start: 1px solid var(--lm-d-divider); display: flex; flex-wrap: wrap; gap: 8px; }
.lg-p-f > .lg-btn { flex: 1 1 0; min-inline-size: 0; justify-content: center; }
/* four buttons (an account: statement · edit · archive · delete) no longer clip the last one: the orange takes its own row, the outlines share the next */
.lg-p-f:has(> :nth-child(4)) > .lg-btn.is-primary { flex-basis: 100%; }
.lg-p-f:has(> :nth-child(4)) > .lg-btn:not(.is-primary) { flex: 1 1 auto; }

/* ── 10. status tag (a dot + a word) ── */
.lg-tag { display: inline-flex; align-items: center; gap: 6px; min-block-size: 26px; padding-inline: 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.lg-tag::before { content: ''; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
.lg-tag.is-info { background: var(--lm-d-info-soft); color: var(--lm-d-info); }
.lg-tag.is-ok { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.lg-tag.is-warn { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.lg-tag.is-danger { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.lg-tag.is-accent { background: var(--lm-d-accent-soft); color: var(--lm-d-accent-ink); }
.lg-tag.is-quiet { background: var(--lm-d-quiet-bg); color: var(--lm-d-muted); }

/* ── 11. the stages of a record ── */
.lg-steps { display: flex; justify-content: space-between; position: relative; margin: 0; padding: 4px 0 0; list-style: none; }
.lg-steps::before { content: ''; position: absolute; inset-block-start: 12px; inset-inline: 14px; border-block-start: 2px solid var(--lm-d-divider); }
.lg-steps li { position: relative; flex: 1; text-align: center; font-size: 12px; color: var(--lm-d-muted); }
.lg-steps li i { display: block; inline-size: 16px; block-size: 16px; margin: 0 auto 4px; border-radius: 50%; background: var(--lm-d-surface); border: 2px solid var(--lm-d-control-edge); }
.lg-steps li.is-done i { background: var(--lm-d-ok); border-color: var(--lm-d-ok); }
.lg-steps li.is-now { color: var(--lm-d-ink); font-weight: 700; }
.lg-steps li.is-now i { background: var(--lm-d-accent); border-color: var(--lm-d-accent); box-shadow: 0 0 0 4px var(--lm-d-accent-soft); }
.lg-steps li.is-stop { color: var(--lm-d-danger); font-weight: 700; }
.lg-steps li.is-stop i { background: var(--lm-d-danger); border-color: var(--lm-d-danger); }

/* ── 12. figures inside a panel / card ── */
.lg-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lg-money > div { border: 1px solid var(--lm-d-border); border-radius: 10px; padding: 8px 10px; display: grid; min-inline-size: 0; }
.lg-money span { font-size: 12px; color: var(--lm-d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-money b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-net { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--lm-d-ok-soft); color: var(--lm-d-ok); font-size: 13.5px; font-weight: 700; }
.lg-net b { font-variant-numeric: tabular-nums; }
.lg-sec { font-size: 14px; font-weight: 700; margin-block-end: 6px; }
.lg-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-block-end: 1px solid var(--lm-d-divider); font-size: 13.5px; }
.lg-line:last-child { border-block-end: 0; }
.lg-line b { font-variant-numeric: tabular-nums; }
.lg-note { border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.6; border: 1px solid var(--lm-d-divider); }
.lg-note.is-info { background: var(--lm-d-info-soft); color: var(--lm-d-info); }
.lg-note.is-warn { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.lg-note.is-danger { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.lg-note.is-ok { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }

/* ── 13. buttons: one orange primary per area, the rest outline ── */
.lg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-block-size: 42px;
    padding-inline: 16px;
    border-radius: 10px;
    border: 1px solid var(--lm-d-control-edge);
    background: var(--lm-d-surface);
    color: var(--lm-d-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
.lg-btn:hover { background: var(--lm-d-hover); }
.lg-btn.is-primary { background: var(--lm-d-accent); border-color: var(--lm-d-accent); color: var(--lm-d-on-accent); }
.lg-btn.is-primary:hover { filter: brightness(0.96); }
.lg-btn.is-danger { color: var(--lm-d-danger); border-color: var(--lm-d-gap-edge); }
.lg-btn.is-sm { min-block-size: 36px; padding-inline: 14px; font-size: 13.5px; }
.lg-btn.is-icon { inline-size: 42px; padding: 0; justify-content: center; }
.lg-btn:disabled { opacity: .6; cursor: default; }
.lg-btn-ico, .lg-ic { inline-size: 18px; block-size: 18px; flex: none; }

/* ── 14. empty state ── */
.lg-empty { flex: 1 1 auto; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 32px 24px; text-align: center; color: var(--lm-d-muted); font-size: 13px; }
.lg-empty b { color: var(--lm-d-ink); font-size: 15px; }
.lg-empty-ico { inline-size: 36px; block-size: 36px; color: var(--lm-d-subtle); }

/* ── 15. a record page (Filament view/edit): ruled main card, tabs as pills ── */
.lg-doc-page .fi-page-content { gap: 16px; }
.lg-doc-page .fi-section { border-radius: 16px; box-shadow: 0 1px 2px var(--lm-d-shadow); }
.lg-doc-page .fi-section-header-heading { color: var(--lm-d-ink); font-weight: 700; }
.lg-doc-main {
    background: var(--lm-d-surface);
    border: 1px solid var(--lm-d-border);
    border-block-start: 3px solid var(--lm-d-info);
    border-radius: 16px;
    box-shadow: 0 1px 2px var(--lm-d-shadow);
}
.lg-doc-main .fi-tabs { gap: 8px; padding: 12px 16px; border-block-end: 1px solid var(--lm-d-divider); justify-content: flex-start; background: transparent; box-shadow: none; border-radius: 0; }
.lg-doc-main .fi-tabs .fi-tabs-item { min-block-size: 42px; padding-inline: 16px; border-radius: 21px; border: 1px solid var(--lm-d-border); background: var(--lm-d-surface); color: var(--lm-d-ink); font-weight: 700; }
.lg-doc-main .fi-tabs .fi-tabs-item .fi-tabs-item-label { color: inherit; }
.lg-doc-main .fi-tabs .fi-tabs-item .fi-icon { color: var(--lm-d-muted); }
.lg-doc-main .fi-tabs .fi-tabs-item.fi-active { background: var(--lm-d-tab-on-bg); border-color: var(--lm-d-tab-on-bg); color: var(--lm-d-tab-on-ink); }
.lg-doc-main .fi-tabs .fi-tabs-item.fi-active :is(.fi-tabs-item-label, .fi-icon) { color: var(--lm-d-tab-on-ink); }
.lg-doc-main .fi-sc-tabs-tab { padding: 16px; }
.lg-doc-main .fi-sc-tabs-tab .fi-section { box-shadow: none; }

/* ── 16. under 1024px: the page scrolls, the panel becomes a bottom sheet ── */
@media (max-width: 1023.98px) {
    .lg-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg-strip-c:nth-child(3n + 1) { border-inline-start: 0; }
    .lg-strip-c:nth-child(n + 4) { border-block-start: 1px solid var(--lm-d-divider); }
    .lg-split, .lg-split.has-open { grid-template-columns: minmax(0, 1fr); }
    .lg-split.has-open .lg-list { border-inline-end: 0; }
    .lg-panel { display: none; }
    .lg-split.has-open .lg-panel {
        display: flex;
        position: fixed;
        inset-inline: 0;
        inset-block: auto 0;
        z-index: 45;
        min-block-size: 0;
        max-block-size: 82dvh;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -10px 40px var(--lm-d-sheet-shadow);
    }
    .lg-card-h { align-items: stretch; }
    .lg-pills, .lg-doc-main .fi-tabs { flex-wrap: nowrap; overflow-x: auto; padding-block-end: 2px; scrollbar-width: none; }
    .lg-page .fi-header-heading { font-size: 22px; }
}
@media (max-width: 640px) {
    .lg-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg-strip-c:nth-child(n) { border-inline-start: 0; border-block-start: 1px solid var(--lm-d-divider); }
    .lg-strip-c:nth-child(-n + 2) { border-block-start: 0; }
    .lg-strip-c:nth-child(2n) { border-inline-start: 1px solid var(--lm-d-divider); }
    .lg-k-v { font-size: 22px; }
    .lg-search { inline-size: 100%; margin-inline-start: 0; block-size: 44px; }
    .lg-money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* touch: every control at least 44px tall on a phone */
    .lg-pill, .lg-chip, .lg-btn, .lg-seg button, .lg-p-x { min-block-size: 44px; }
    .lg-p-x { inline-size: 44px; }
    .lg-table thead { display: none; }
    .lg-table, .lg-table tbody, .lg-table tr, .lg-table td { display: block; inline-size: 100%; }
    .lg-table tbody tr { padding: 10px 12px; border-block-end: 1px solid var(--lm-d-divider); }
    .lg-table td { padding: 2px 0; border: 0; }
    .lg-table td[data-label]::before { content: attr(data-label) ' · '; color: var(--lm-d-muted); font-size: 12.5px; }
}


/* ── 17. the ledger's own: tone classes that work anywhere on a ledger page (modal HTML, form placeholders) ── */
.lg-ok { color: var(--lm-d-ok); }
.lg-warn { color: var(--lm-d-warn); }
.lg-danger { color: var(--lm-d-danger); }
.lg-info { color: var(--lm-d-info); }
.lg-muted { color: var(--lm-d-muted); }
.lg-ink { color: var(--lm-d-ink); }
.lg-accent { color: var(--lm-d-accent-ink); }
.lg-num { font-variant-numeric: tabular-nums; }

/* ── 18. the page fills the screen: header · strip · ONE card; only the list and the panel scroll (DS §7, Kamal: 1440×800, no page scroll) ──
   --lg-chrome = the height of HOMEi's top navigation above the page; a page without .lg-fill (forms, record pages) keeps the normal flow. */
@media (min-width: 1024px) {
    .lg-page.fi-page:has(.lg-fill) { display: flex; flex-direction: column; block-size: calc(100dvh - var(--lg-chrome, 69px)); }
    .lg-page.fi-page:has(.lg-fill) .fi-page-header-main-ctn { flex: 1 1 auto; min-block-size: 0; display: flex; flex-direction: column; gap: 14px; padding-block: 18px 16px; }
    .lg-page.fi-page:has(.lg-fill) .fi-page-main { flex: 1 1 auto; min-block-size: 0; display: flex; flex-direction: column; }
    .lg-page.fi-page:has(.lg-fill) .fi-page-content { flex: 1 1 auto; min-block-size: 0; display: flex; flex-direction: column; gap: 14px; }
    .lg-fill { flex: 1 1 auto; min-block-size: 0; }
    .lg-fill > .lg-main { flex: 1 1 auto; min-block-size: 0; }
    .lg-main > .lg-split { flex: 1 1 auto; min-block-size: 0; align-items: stretch; grid-template-columns: minmax(0, 1fr) 360px; }
    .lg-main > .lg-split .lg-panel { display: flex; position: static; inset-block-start: auto; max-block-size: none; min-block-size: 0; block-size: 100%; }
    .lg-main > .lg-split .lg-list { border-inline-end: 1px solid var(--lm-d-divider); overflow: auto; overscroll-behavior: contain; min-block-size: 0; block-size: 100%; }
    .lg-main > .lg-split .lg-list > .lg-empty { block-size: 100%; }
    .lg-main > .lg-card-b.lg-scroll { flex: 1 1 auto; min-block-size: 0; overflow: auto; }
    /* the table's own toolbar (chips · search · filters) stays while the rows scroll */
    .lg-list .fi-ta-header-ctn { position: sticky; inset-block-start: 0; z-index: 2; background: var(--lm-d-surface); }
    .lg-list .lg-table thead th { position: sticky; inset-block-start: 0; z-index: 1; background: var(--lm-d-surface); }
    .lg-list .lg-table tfoot td { position: sticky; inset-block-end: 0; z-index: 1; }
}
@media print {
    .lg-page.fi-page:has(.lg-fill) { block-size: auto; }
    .lg-main > .lg-split .lg-list { overflow: visible; block-size: auto; }
    .lg-panel, .fi-header-actions-ctn, .lg-toolbar { display: none !important; }
}

/* ── 19. a Filament table inside the card's list: the record actions live in the panel's foot, the row itself opens the item ── */
.lg-list .fi-ta-actions-header-cell, .lg-list .fi-ta-cell:has(> .fi-ta-actions), .lg-list td:has(> .fi-ta-actions) { display: none; }
.lg-list .fi-ta-ctn { background: transparent; }
.lg-list .fi-ta-content { border: 0; border-radius: 0; }
.lg-list .fi-ta-pagination { padding-inline: 18px; border-block-start: 1px solid var(--lm-d-divider); }
.lg-list .fi-ta-empty-state { padding: 32px 24px; }
.lg-list .fi-ta-empty-state-heading { color: var(--lm-d-ink); font-size: 15px; font-weight: 700; }
.lg-list .fi-ta-empty-state-description { color: var(--lm-d-muted); font-size: 13px; }
.lg-list .fi-ta-empty-state-icon-ctn { background: transparent; color: var(--lm-d-subtle); }
.lg-list .fi-badge { font-size: 12.5px; }
.lg-list .fi-ta-filters-ctn, .lg-list .fi-ta-filters { background: var(--lm-d-page); border-block-end: 1px solid var(--lm-d-divider); }

/* a hand-built list (trial balance · statement · the close checklist) */
.lg-table td.is-num, .lg-table th.is-num { text-align: end; font-variant-numeric: tabular-nums; }
.lg-table tbody tr.is-group > td { font-weight: 700; }
.lg-table tbody tr.is-dim > td { color: var(--lm-d-muted); }
.lg-table tbody tr.is-static { cursor: default; }
.lg-table tbody tr.is-static:hover > td { background: transparent; }
.lg-indent-1 { padding-inline-start: 1.1rem; }
.lg-indent-2 { padding-inline-start: 2.2rem; }
.lg-indent-3 { padding-inline-start: 3.3rem; }
.lg-indent-4 { padding-inline-start: 4.4rem; }
.lg-table .lg-tag { margin-inline-start: 6px; }

/* ── 20. the close checklist: one row per condition, opened beside the list like any item ── */
.lg-checks { display: flex; flex-direction: column; }
.lg-check { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-block-end: 1px solid var(--lm-d-divider); cursor: pointer; text-align: start; background: transparent; border-inline: 0; border-block-start: 0; font: inherit; color: inherit; inline-size: 100%; }
.lg-check:hover { background: var(--lm-d-hover); }
.lg-check.is-open { background: var(--lm-d-row-hl); box-shadow: inset -3px 0 0 var(--lm-d-accent); }
[dir='ltr'] .lg-check.is-open { box-shadow: inset 3px 0 0 var(--lm-d-accent); }
.lg-check-i { inline-size: 26px; block-size: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 700; font-size: 13px; background: var(--lm-d-quiet-bg); color: var(--lm-d-muted); }
.lg-check-i.is-ok { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.lg-check-i.is-fail { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.lg-check-i.is-unknown { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.lg-check-b { flex: 1 1 auto; min-inline-size: 0; }
.lg-check-t { font-size: 14px; font-weight: 700; }
.lg-check-d { font-size: 13px; color: var(--lm-d-muted); overflow-wrap: anywhere; }
.lg-check-a { flex: none; }

/* ── 21. the toolbar can hold a Filament form (the report's period · project · statement): compact, no card around it ── */
.lg-toolbar > .fi-sc, .lg-toolbar > form, .lg-toolbar .lg-form { flex: 1 1 auto; min-inline-size: 0; }
.lg-toolbar .fi-sc { gap: 8px 10px; }
.lg-toolbar .fi-section { border: 0; box-shadow: none; background: transparent; }
.lg-toolbar .fi-section-content { padding: 0; }
.lg-toolbar .fi-fo-field-label-content, .lg-toolbar .fi-fo-field-wrp-label { font-size: 12.5px; color: var(--lm-d-muted); }
.lg-toolbar .fi-input-wrp { border-radius: 10px; }
.lg-toolbar .fi-fo-toggle { padding-block-start: 22px; }
.lg-pills.is-scroll { flex: 1 1 0; min-inline-size: 0; max-inline-size: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.lg, .lg-card, .lg-strip { min-inline-size: 0; max-inline-size: 100%; }
.lg { contain: inline-size; }   /* the page is sized by the viewport, never by a wide row of pills or a wide table (no horizontal page scroll, DS §7) */
.lg-dot.is-warn { background: var(--lm-d-warn); }
.lg-dot.is-quiet { background: var(--lm-d-dot); }
.lg-dot.is-muted { background: var(--lm-d-dot); }
.lg-dot.is-info { background: var(--lm-d-info); }

/* ── 22. the record pages (create · edit · view): the numbers strip, then ONE ruled card — its head, the wide fields in the
      middle with their own scroll (.lg-f-main), the key fields in a 380px aside (.lg-f-aside), the form's buttons pinned at the
      aside's foot. Filament wraps every schema component in three layers (fi-sc → fi-grid-col → fi-sc-component); the layers
      between the card and its four parts are flattened with display: contents so the parts sit on one grid. ── */
.lg-record :is(.fi-sc, .fi-grid-col, .fi-sc-component):not(.lg-form-card *) { display: contents; }
/* the page content's own wrappers above the group, so the group is the page content's flex child and fills the screen */
.lg-page .fi-page-content > .fi-sc:has(> .fi-grid-col > .fi-sc-component > .lg-record),
.lg-page .fi-page-content > .fi-sc:has(> .fi-grid-col > .fi-sc-component > .lg-record) > .fi-grid-col,
.lg-page .fi-page-content > .fi-sc:has(> .fi-grid-col > .fi-sc-component > .lg-record) > .fi-grid-col > .fi-sc-component { display: contents; }
.lg-record .lg-form-card { flex: 1 1 auto; min-block-size: 0; }
.lg-form-card { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto minmax(0, 1fr) auto; min-inline-size: 0; }
.lg-form-card :is(.fi-sc, .fi-grid-col, .fi-sc-component):not(.lg-f-main *):not(.lg-f-aside *):not(.fi-sc-actions *) { display: contents; }
.lg-form-card .lg-form-head { grid-column: 1 / -1; grid-row: 1; }
.lg-form-card .lg-f-main { grid-column: 1; grid-row: 2 / span 2; min-block-size: 0; overflow: auto; overscroll-behavior: contain; border-inline-end: 1px solid var(--lm-d-divider); }
.lg-form-card .lg-f-aside { grid-column: 2; grid-row: 2; min-block-size: 0; overflow: auto; overscroll-behavior: contain; }
/* the foot: the decision (orange) on its own line, the outline buttons side by side under it */
.lg-form-card .fi-sc-actions { grid-column: 2; grid-row: 3; display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-block-start: 1px solid var(--lm-d-divider); background: var(--lm-d-surface); }
.lg-form-card .fi-sc-actions .fi-ac { display: contents; }
.lg-form-card .fi-sc-actions .fi-btn { flex: 1 1 calc(50% - 4px); min-inline-size: 0; justify-content: center; min-block-size: 42px; border-radius: 10px; padding-inline: 10px; font-size: 13.5px; white-space: nowrap; background: var(--lm-d-surface); color: var(--lm-d-ink); box-shadow: inset 0 0 0 1px var(--lm-d-control-edge); font-weight: 700; }
.lg-form-card .fi-sc-actions .fi-btn:is(.fi-color-primary, .fi-color-success) { flex-basis: 100%; }
.lg-form-card .fi-sc-actions .fi-btn .fi-icon { color: currentColor; }
.lg-form-card .fi-sc-actions .fi-btn:is(.fi-color-primary, .fi-color-success) { background: var(--lm-d-accent); color: var(--lm-d-on-accent); box-shadow: 0 4px 12px var(--lm-d-accent-soft); }
.lg-form-card .fi-sc-actions .fi-btn.fi-color-danger { color: var(--lm-d-danger); box-shadow: inset 0 0 0 1px var(--lm-d-gap-edge); }
/* the two sections are the card's own regions, not cards of their own */
.lg-form-card :is(.lg-f-main, .lg-f-aside) { border-radius: 0; box-shadow: none; background: transparent; border-block: 0; border-inline-start: 0; }
.lg-form-card .lg-f-aside { border-inline-end: 0; }
.lg-form-card :is(.lg-f-main, .lg-f-aside) > .fi-section-header { padding: 12px 18px 8px; }
.lg-form-card :is(.lg-f-main, .lg-f-aside) .fi-section-header-heading { color: var(--lm-d-ink); font-weight: 700; font-size: 15px; }
.lg-form-card :is(.lg-f-main, .lg-f-aside) .fi-section-header-description { color: var(--lm-d-muted); font-size: 13px; }
.lg-form-card :is(.lg-f-main, .lg-f-aside) > .fi-section-content-ctn, .lg-form-card :is(.lg-f-main, .lg-f-aside) .fi-section-content { padding: 12px 18px 16px; }
.lg-form-card .fi-fo-repeater-item { border-radius: 12px; border: 1px solid var(--lm-d-border); box-shadow: none; }
.lg-form-card .fi-fo-field-label-content { color: var(--lm-d-muted); font-size: 12.5px; }
.lg-form-card .fi-in-entry-label { color: var(--lm-d-muted); font-size: 12.5px; }
.lg-form-card .fi-in-entry-content { color: var(--lm-d-ink); }
.lg-form-card .fi-in-repeatable-item { border-radius: 12px; border: 1px solid var(--lm-d-border); box-shadow: none; }
@media (max-width: 1023.98px) {
    .lg-form-card { display: flex; flex-direction: column; }
    .lg-form-card .lg-f-main { border-inline-end: 0; overflow: visible; }
    .lg-form-card .lg-f-aside { overflow: visible; border-block-start: 1px solid var(--lm-d-divider); }
}

/* ── 23. small bits ── */
.lg-k-v.is-text { font-size: 17px; }
.lg-k-v.is-title { font-size: 20px; }
.lg-k-v.is-long { font-size: 18px; }   /* a 13-digit amount keeps its digits instead of an ellipsis */
.lg-money { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }   /* three boxes become 2 + 1 when the figures are long */
.lg-money b { font-size: 16px; }
.lg-money b.is-muted { color: var(--lm-d-muted); }
.lg-pills.is-months .lg-pill { padding-inline: 12px; min-block-size: 36px; font-size: 13.5px; }
.lg-line-l { min-inline-size: 0; overflow-wrap: anywhere; }
.lg-line > b { flex: none; white-space: nowrap; }
.lg-line > b.lg-line-txt { flex: 0 1 62%; white-space: normal; overflow-wrap: anywhere; text-align: end; }   /* a long name wraps instead of crushing its label */
.lg-line > .lg-tag { flex: none; }
.lg-link { color: var(--lm-d-info); text-decoration: underline; text-underline-offset: 2px; }
button.lg-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.lg-text { font-size: 14px; }
.lg-preview { font-size: 13.5px; }
.lg-preview tbody tr { cursor: default; }
.lg-note b { display: block; }
.lg-p-s bdi, .lg-card-t bdi { white-space: nowrap; }
.lg-card-h .lg-tag { margin-inline-start: 0; }
.lg-card-h .lg-dim { flex: 1 1 100%; }
@media (max-width: 640px) {
    .lg-money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg-check { min-block-size: 44px; }
}

/* ── 25. S14b — the ledger's five sections: their screens as tabs across the top (SectionTabs, PAGE_START, the
      HR-SECTIONS-1 / MKT-NAV-1 markup) worn as the house pills, navy when on; the page keeps its 28px title
      (project-360.css hides a strip page's title — the ledger's short tab names do not name the screen) ── */
.lg-page.fi-page:has(.hr-strip) .fi-header-heading { position: static; inline-size: auto; block-size: auto; overflow: visible; clip: auto; white-space: normal; }
.lg-page .hr-strip { margin: 0 0 2px; }
.lg-page .hr-strip-tabs { display: flex; gap: 8px; padding: 0; background: transparent; border: 0; border-radius: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
.lg-page .hr-strip .mcp-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; min-block-size: 38px; padding: 0 16px; border: 1px solid var(--lm-d-border); border-radius: 19px; background: var(--lm-d-surface); color: var(--lm-d-ink); font-size: 14px; font-weight: 700; box-shadow: none; }
.lg-page .hr-strip .mcp-tab:hover { border-color: var(--lm-d-control-edge); background: var(--lm-d-surface); color: var(--lm-d-ink); }
.lg-page .hr-strip .mcp-tab .mcp-ic { inline-size: 16px; block-size: 16px; color: var(--lm-d-muted); }
.lg-page .hr-strip .mcp-tab.is-on { background: var(--lm-d-tab-on-bg); border-color: var(--lm-d-tab-on-bg); color: var(--lm-d-tab-on-ink); }
.lg-page .hr-strip .mcp-tab.is-on .mcp-ic { color: var(--lm-d-accent); }
.lg-page .hr-strip .mcp-tab.is-on::after { content: none; }
.lg-page .hr-strip .mcp-tab:focus-visible { outline: 2px solid var(--lm-d-info); outline-offset: 2px; }
@media (max-width: 640px) {
    .lg-page .hr-strip .mcp-tab { min-block-size: 44px; padding-inline: 12px; font-size: 13.5px; }
}
/* S14c (dev 29j): on a full-height page the strip and the page head keep their height — only the card gives way (the
   statement's head had been squeezed to 5px under its five buttons, its subtitle clipped under the numbers) */
.lg-page.fi-page:has(.lg-fill) > .hr-strip,
.lg-page.fi-page:has(.lg-fill) .fi-page-header-main-ctn > .fi-header { flex-shrink: 0; }
/* S14 review (dev 29k, 375px): a hand-built page keeps its panel beside the list on a desktop — an empty state or the
   page's summary — and on a phone that panel had become a fixed sheet over 82% of the screen with nothing picked. The
   sheet rises only for a row actually opened (is-picked); a summary sits under the list; an empty state is not drawn. */
@media (max-width: 1023.98px) {
    .lg-split.has-open:not(.is-picked) .lg-panel { position: static; inset: auto; z-index: auto; min-block-size: 0; max-block-size: none; border-radius: 0; box-shadow: none; border-block-start: 1px solid var(--lm-d-divider); }
    .lg-split.has-open:not(.is-picked) .lg-panel:has(.lg-empty) { display: none; }
}
/* a date, an entry number or a code stays on one line in a hand-built table (the statement wrapped 13-01-2026) */
.lg .lg-table td bdi { white-space: nowrap; }

/* S12 — the smart search inside the panel: the typed name beside its button, «اربط» at the end of each choice */
.lg-search-in { margin: 0 0 8px; inline-size: 100%; block-size: auto; min-block-size: 40px; padding-inline-end: 4px; }
.lg-search-in .lg-btn.is-sm { min-block-size: 32px; flex: none; }
.lg-line > .lg-line-act { flex: none; min-block-size: 32px; padding-inline: 12px; }
/* S12d — the quick choices under the smart search, and the confirm strip that asks once */
.lg-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.lg-confirm { display: flex; flex-direction: column; gap: 8px; }
.lg-confirm .lg-quick { margin: 0; }

/* ── 24. S14a — the sheet («سطور القيود», page class lg-sheet), the PO's review of 2026-10-28: no strip — the treasury
      line (lg-tr) above and the totals line (lg-sum) right above the column heads; dense rows; the panel takes its
      360px only once a line is open, and while it is the words (lg-opt) give way to the figures; on a phone each
      line is a card (date · entry / number · name / party / description, the figure beside them). ── */
.lg-tr { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 20px; min-block-size: 42px; padding: 4px 16px; background: var(--lm-d-surface); border: 1px solid var(--lm-d-border); border-radius: 12px; box-shadow: 0 1px 2px var(--lm-d-shadow); font-size: 13px; color: var(--lm-d-muted); overflow: hidden; }
.lg-tr-t { font-weight: 700; color: var(--lm-d-ink); font-size: 13.5px; white-space: nowrap; }
.lg-tr-c { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.lg-tr-c b { color: var(--lm-d-ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-tr-c.is-total { padding-inline-end: 20px; border-inline-end: 1px solid var(--lm-d-divider); }
.lg-tr-c.is-total b { font-size: 16px; }   /* a balance is a figure, not a status: ink, never green */
.lg-tr-link { margin-inline-start: auto; color: var(--lm-d-info); font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }
.lg-tr-link:hover { text-decoration: underline; }
.lg-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 8px 18px; margin-block-start: 8px; border-block-start: 1px solid var(--lm-d-divider); font-size: 13.5px; color: var(--lm-d-muted); }
.lg-sum b { color: var(--lm-d-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-sum .lg-sum-bal b { font-size: 15px; }
.lg-sum .lg-sum-hint { margin-inline-start: auto; font-size: 12.5px; }
/* the table's header: the chips and the search on one row, the filters form (above content) a full row under them —
   Filament 4 renders all three inside .fi-ta-header-ctn, which §8 keeps on one unwrapped line (dev 2026-10-28: the
   chips stacked into a 185px column and the filters crushed) */
.lg-sheet .lg-list .fi-ta-header-ctn { flex-wrap: wrap; row-gap: 0; }
.lg-sheet .lg-list .fi-ta-header-ctn > .lg-chips { order: 1; flex: 1 1 auto; min-inline-size: 0; padding-block: 8px; }
.lg-sheet .lg-list .fi-ta-header-ctn > .fi-ta-header-toolbar { order: 2; }
.lg-sheet .lg-list .fi-ta-header-ctn > .fi-ta-filters-above-content-ctn { order: 3; flex: 1 0 100%; min-inline-size: 0; margin-inline: -18px -12px; padding: 0; border-block-start: 1px solid var(--lm-d-divider); border-block-end: 0; }
/* the filters form is the sheet's header row: the four everyday filters open, «فلاتر أكتر» folded, compact */
.lg-sheet .lg-list .fi-ta-filters { padding: 8px 18px 0; row-gap: 6px; }
.lg-sheet .lg-list .fi-ta-filters .lg-sum { margin: 0 -18px; }
.lg-sheet .lg-list .fi-ta-filters-heading { display: none; }
.lg-sheet .lg-list .fi-ta-filters .fi-fo-field-label-content, .lg-sheet .lg-list .fi-ta-filters .fi-fo-field-wrp-label { font-size: 12.5px; color: var(--lm-d-muted); }
.lg-sheet .lg-list .fi-ta-filters .fi-input-wrp { border-radius: 10px; }
.lg-sheet .lg-list .lg-filters-more .fi-section { box-shadow: none; border: 0; background: transparent; border-radius: 0; }
.lg-sheet .lg-list .lg-filters-more .fi-section-header { padding: 2px 0; }
.lg-sheet .lg-list .lg-filters-more .fi-section-header-heading { font-size: 13px; font-weight: 700; color: var(--lm-d-info); }
.lg-sheet .lg-list .lg-filters-more .fi-section-content-ctn { border: 0; }
.lg-sheet .lg-list .lg-filters-more .fi-section-content { padding: 6px 0 4px; }
/* the phone's one filters button — hidden on a desktop, where the everyday filters always stand open */
.lg-filters-toggle { display: none; align-items: center; justify-content: center; gap: 8px; min-block-size: 44px; padding-inline: 14px; border: 1px solid var(--lm-d-control-edge); border-radius: 10px; background: var(--lm-d-surface); color: var(--lm-d-ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.lg-filters-toggle b { min-inline-size: 22px; padding-inline: 6px; border-radius: 11px; background: var(--lm-d-info-soft); color: var(--lm-d-info); font-size: 12.5px; }
.lg-filters-toggle.is-open { background: var(--lm-d-info-soft); border-color: var(--lm-d-info-soft); color: var(--lm-d-info); }
/* dense rows: the sheet is read by scanning */
.lg-sheet .lg-list .fi-ta-header-cell { padding-block: 8px; padding-inline: 10px; }
.lg-sheet .lg-list .fi-ta-cell { padding-inline: 10px; padding-block: 0; }
.lg-sheet .lg-list .fi-ta-text { padding-block: 6px; font-size: 13.5px; }
.lg-sheet .lg-list :is(.lg-c-date, .lg-c-entry, .lg-c-code, .lg-c-debit, .lg-c-credit) .fi-ta-text { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-sheet .lg-list :is(.lg-c-name, .lg-c-party) .fi-ta-text { max-inline-size: 170px; }
.lg-sheet .lg-list .lg-c-desc .fi-ta-text { max-inline-size: 260px; }
.lg-sheet .lg-list :is(.lg-c-name, .lg-c-party, .lg-c-desc) .fi-ta-text-item { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-sheet .lg-list .fi-ta-filters > .fi-sc { row-gap: 8px; }
@media (min-width: 641px) {
    /* the phone's filters button has no row on a desktop */
    .lg-sheet .lg-list .fi-ta-filters > .fi-sc > .fi-grid-col:has(.lg-filters-toggle) { display: none; }
}
@media (min-width: 1024px) {
    /* the column heads stay while the lines scroll (the sheet's frozen header row); the chips, filters and totals
       scroll away with the list — a 230px sticky block took a third of the list (dev 2026-10-29) */
    .lg-sheet .lg-list .fi-ta-header-ctn { position: static; }
    .lg-sheet .lg-list .fi-ta-content-ctn { overflow: visible; }
    .lg-sheet .lg-list .fi-ta-table thead .fi-ta-header-cell { position: sticky; inset-block-start: 0; z-index: 1; background: var(--lm-d-surface); box-shadow: inset 0 -1px 0 var(--lm-d-border); }
    /* the panel only once a line is open; the words step aside while it is */
    .lg-sheet .lg-main > .lg-split:not(.has-open) { grid-template-columns: minmax(0, 1fr); }
    .lg-sheet .lg-main > .lg-split:not(.has-open) .lg-panel { display: none; }
    .lg-sheet .lg-main > .lg-split:not(.has-open) .lg-list { border-inline-end: 0; }
    .lg-sheet .lg-split.has-open :is(.fi-ta-header-cell, .fi-ta-cell).lg-opt { display: none; }
}
@media (max-width: 640px) {
    .lg-sheet .lg-tr { flex-wrap: wrap; gap: 2px 12px; padding: 6px 12px; min-block-size: 40px; }
    .lg-sheet .lg-tr-c.is-total { border: 0; padding: 0; }
    .lg-sheet .lg-tr-c b { font-size: 14px; }
    .lg-sheet .lg-tr-link { display: none; }
    .lg-sheet .lg-sum { padding: 8px 12px; gap: 2px 12px; font-size: 12.5px; }
    .lg-sheet .lg-sum .lg-sum-hint { display: none; }
    .lg-sheet .lg-list .fi-ta-filters { padding-inline: 12px; }
    .lg-sheet .lg-list .fi-ta-filters .lg-sum { margin-inline: -12px; }
    .lg-sheet .lg-list .lg-filters-toggle { display: flex; inline-size: 100%; }
    /* folded until the button opens them; Filament's reset link goes with them */
    .lg-sheet .lg-list :is(.lg-filters-main, .lg-filters-more):not(.is-open) { display: none; }
    .lg-sheet .lg-list .fi-ta-filters:has(.lg-filters-main:not(.is-open)) .fi-ta-filters-header { display: none; }
    /* the folded blocks' grid wrappers go too, or their row gaps stay behind */
    .lg-sheet .lg-list .fi-ta-filters > .fi-sc > .fi-grid-col:has(:is(.lg-filters-main, .lg-filters-more):not(.is-open)) { display: none; }
    /* a card with no party skips the «—» line */
    .lg-sheet .lg-list .fi-ta-row > .lg-c-party:has(.fi-ta-placeholder) { display: none; }
    .lg-sheet .lg-list .fi-ta-header-ctn > .lg-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .lg-sheet .lg-list .fi-ta-header-ctn > .fi-ta-header-toolbar { flex: 1 1 100%; }
    .lg-sheet .lg-list .fi-ta-header-toolbar .fi-ta-search-field { flex: 1 1 auto; max-inline-size: none; }
    /* each line a card: the date and the entry, the number and the name, the party, the description — the figure beside them with its side named */
    .lg-sheet .lg-list .fi-ta-table thead { display: none; }
    .lg-sheet .lg-list .fi-ta-table, .lg-sheet .lg-list .fi-ta-table tbody { display: block; inline-size: 100%; }
    .lg-sheet .lg-list .fi-ta-row { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr) auto; grid-auto-rows: auto; column-gap: 8px; align-items: baseline; padding: 10px 12px; border-block-end: 1px solid var(--lm-d-divider); }
    .lg-sheet .lg-list .fi-ta-row > .fi-ta-cell { display: block; padding: 0; border: 0; min-inline-size: 0; }
    .lg-sheet .lg-list .fi-ta-row > .fi-ta-cell .fi-ta-text { padding: 0; max-inline-size: none; }
    .lg-sheet .lg-list .fi-ta-row > :is(.lg-c-date, .lg-c-entry) .fi-ta-text { font-size: 12.5px; color: var(--lm-d-muted); }
    .lg-sheet .lg-list .fi-ta-row > .lg-c-date { grid-column: 1; grid-row: 1; }
    .lg-sheet .lg-list .fi-ta-row > .lg-c-entry { grid-column: 2 / span 2; grid-row: 1; }
    .lg-sheet .lg-list .fi-ta-row > .lg-c-code { grid-column: 1; grid-row: 2; }
    .lg-sheet .lg-list .fi-ta-row > .lg-c-name { grid-column: 2 / span 2; grid-row: 2; }
    .lg-sheet .lg-list .fi-ta-row > :is(.lg-c-code, .lg-c-name) .fi-ta-text { font-weight: 700; font-size: 14px; }
    .lg-sheet .lg-list .fi-ta-row > .lg-c-party { grid-column: 1 / span 3; grid-row: 3; }
    .lg-sheet .lg-list .fi-ta-row > .lg-c-desc { grid-column: 1 / span 3; grid-row: 4; }
    .lg-sheet .lg-list .fi-ta-row > :is(.lg-c-party, .lg-c-desc) .fi-ta-text { font-size: 12.5px; color: var(--lm-d-muted); }
    .lg-sheet .lg-list .fi-ta-row > :is(.lg-c-project, .lg-c-unit, .lg-c-source) { display: none; }
    .lg-sheet .lg-list .fi-ta-row > :is(.lg-c-debit, .lg-c-credit):not(.is-filled) { display: none; }
    .lg-sheet .lg-list .fi-ta-row > :is(.lg-c-debit, .lg-c-credit).is-filled { grid-column: 4; grid-row: 1 / span 4; align-self: center; text-align: end; }
    .lg-sheet .lg-list .fi-ta-row > :is(.lg-c-debit, .lg-c-credit).is-filled .fi-ta-text { font-weight: 700; font-size: 15px; }
    .lg-sheet .lg-list .fi-ta-row > :is(.lg-c-debit, .lg-c-credit).is-filled::after { content: attr(data-label); display: block; font-size: 12px; color: var(--lm-d-muted); }
    .lg-sheet .lg-list .fi-ta-row.lg-row-open { background: var(--lm-d-row-hl); box-shadow: inset -3px 0 0 var(--lm-d-accent); }
    .lg-sheet .lg-list .fi-ta-row.lg-row-open > td:first-child { box-shadow: none; }
}

/* ── 26. S16 — «إدخال سريع» (the S16 mockup, «نفّذ زي رأيك» 2026-10-29): the treasury line, ONE ruled card — the keys,
      the rows typed today, the row being typed pinned under them (cells are inputs: no border until focused, then the
      info ring), the totals. The name field's choices float fixed to the screen (the list's scroll never clips them),
      upward near the bottom. Under 640px each row is a card of labelled fields, 44px controls. ── */
.lg-qe-mode { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--lm-d-muted); }
.lg-qe-mode::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--lm-d-warn); }
.lg-qe-mode.is-ok::before { background: var(--lm-d-ok); }
.lg-qe-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 7px 18px; border-block-end: 1px solid var(--lm-d-divider); background: var(--lm-d-page); font-size: 12.5px; color: var(--lm-d-muted); }
.lg-qe-keys span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lg-qe kbd { font: inherit; font-size: 12px; font-weight: 700; color: var(--lm-d-ink); background: var(--lm-d-surface); border: 1px solid var(--lm-d-control-edge); border-block-end-width: 2px; border-radius: 6px; padding-inline: 6px; line-height: 20px; min-inline-size: 22px; text-align: center; display: inline-block; }
.lg-qe-msg { padding: 8px 18px; font-size: 13.5px; border-block-end: 1px solid var(--lm-d-divider); }
.lg-qe-msg.is-danger { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.lg-qe-msg.is-ok { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); font-weight: 600; }
.lg-qe-grid { table-layout: fixed; font-size: 13.5px; }
.lg-qe-grid th { padding: 8px 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-qe-grid td { padding: 0 10px; block-size: 34px; border-inline-start: 1px solid var(--lm-d-divider); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.lg-qe-grid td:first-child, .lg-qe-grid th:first-child { border-inline-start: 0; }
.lg-qe-grid .w-n { inline-size: 36px; } .lg-qe-grid .w-date { inline-size: 92px; } .lg-qe-grid .w-kind { inline-size: 88px; } .lg-qe-grid .w-side { inline-size: 132px; }
.lg-qe-grid .w-who { inline-size: 290px; } .lg-qe-grid .w-proj { inline-size: 150px; } .lg-qe-grid .w-amt { inline-size: 122px; } .lg-qe-grid .w-st { inline-size: 142px; }
.lg-qe-grid td.is-blank, .lg-qe-grid .is-blank { color: var(--lm-d-muted); }
.lg-qe-n { text-align: center; color: var(--lm-d-muted); font-size: 12px; padding: 0 !important; }
.lg-qe-k { display: inline-flex; align-items: center; min-block-size: 22px; padding-inline: 8px; border-radius: 6px; font-size: 12.5px; font-weight: 700; }
.lg-qe-k.is-receipt { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.lg-qe-k.is-payment { background: var(--lm-d-info-soft); color: var(--lm-d-info); }
.lg-qe-k.is-transfer { background: var(--lm-d-quiet-bg); color: var(--lm-d-muted); }
.lg-qe-k.is-entry { background: var(--lm-d-accent-soft); color: var(--lm-d-accent-ink); }
.lg-qe-who { display: flex; align-items: center; gap: 8px; min-inline-size: 0; }
.lg-qe-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.lg-qe-role { flex: none; font-size: 12px; font-weight: 700; color: var(--lm-d-muted); background: var(--lm-d-chip-bg); border-radius: 5px; padding-inline: 6px; line-height: 20px; }
.lg-qe-role.is-new { color: var(--lm-d-warn); background: var(--lm-d-warn-soft); }
.lg-qe-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; text-decoration: none; color: var(--lm-d-muted); }
.lg-qe-st::before { content: ''; inline-size: 7px; block-size: 7px; border-radius: 50%; background: currentColor; flex: none; }
.lg-qe-st.is-posted { color: var(--lm-d-ok); }
.lg-qe-st.is-pending { color: var(--lm-d-warn); }
.lg-qe-st.is-cancelled { text-decoration: line-through; }
.lg-qe-st.is-busy { opacity: .5; }
.lg-qe-st bdi { color: var(--lm-d-ink); font-weight: 600; }
a.lg-qe-st:hover bdi { text-decoration: underline; }
.lg-qe-desc { color: var(--lm-d-ink); }
.lg-qe-empty td { block-size: 64px; text-align: center; color: var(--lm-d-muted); white-space: normal; }
.lg-qe-typing td { background: var(--lm-d-row-hl); padding: 0; border-block-start: 1px solid var(--lm-d-border); overflow: visible; }
.lg-qe-typing td.lg-qe-n { box-shadow: inset -3px 0 0 var(--lm-d-accent); color: var(--lm-d-accent-ink); font-weight: 700; }
.lg-qe-in { inline-size: 100%; block-size: 36px; border: 0; border-radius: 0; background: transparent; color: var(--lm-d-ink); font: inherit; font-size: 13.5px; padding-inline: 10px; outline: none; box-shadow: none; }
.lg-qe-in:focus { box-shadow: inset 0 0 0 2px var(--lm-d-info); background: var(--lm-d-surface); }
.lg-qe-in::placeholder { color: var(--lm-d-muted); }
select.lg-qe-in { padding-inline: 6px; cursor: pointer; }
.lg-qe-in.is-num { text-align: end; font-variant-numeric: tabular-nums; }
.lg-qe-name { position: relative; }
.lg-qe-drop { position: fixed; z-index: 60; inline-size: 430px; max-inline-size: calc(100vw - 24px); max-block-size: 340px; overflow-y: auto; background: var(--lm-d-surface); border: 1px solid var(--lm-d-border); border-radius: 12px; box-shadow: 0 14px 34px var(--lm-d-sheet-shadow); font-size: 13.5px; white-space: normal; text-align: start; }
.lg-qe-drop-g { padding: 6px 12px 2px; font-size: 12px; font-weight: 700; color: var(--lm-d-muted); }
.lg-qe-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 7px 12px; border-inline-start: 3px solid transparent; cursor: pointer; }
.lg-qe-opt.is-sel { background: var(--lm-d-info-soft); border-inline-start-color: var(--lm-d-info); }
.lg-qe-opt .t { display: flex; align-items: center; gap: 8px; min-inline-size: 0; font-weight: 700; color: var(--lm-d-ink); }
.lg-qe-opt .t > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-qe-opt .m { grid-column: 1; font-size: 12px; color: var(--lm-d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-qe-opt .r { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: end; font-size: 12px; color: var(--lm-d-muted); }
.lg-qe-opt .r b { display: block; color: var(--lm-d-ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.lg-qe-none { padding: 10px 12px; color: var(--lm-d-muted); font-size: 13px; }
.lg-qe-foot { margin-block-start: 0; }
.lg-qe-foot .lg-qe-wait b { color: var(--lm-d-warn); }
@media (min-width: 1024px) {
    .lg-qe .lg-main > .lg-qe-list { flex: 1 1 auto; min-block-size: 0; overflow: auto; overscroll-behavior: contain; }
}
@media (max-width: 640px) {
    .lg-qe-keys { display: none; }
    .lg-qe-grid, .lg-qe-grid tbody, .lg-qe-grid tfoot { display: block; }
    .lg-qe-grid thead { display: none; }
    .lg-qe-grid tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 8px; padding: 10px 12px; border-block-end: 1px solid var(--lm-d-divider); }
    .lg-qe-grid td { display: flex; flex-direction: column; gap: 2px; block-size: auto; border: 0; padding: 4px 0; white-space: normal; position: static; }
    .lg-qe-grid td[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--lm-d-muted); }
    .lg-qe-grid td.lg-qe-n { display: none; }
    .lg-qe-grid td:nth-child(5), .lg-qe-grid td:nth-child(8) { grid-column: 1 / -1; }
    .lg-qe-typing { background: var(--lm-d-row-hl); }
    .lg-qe-typing td { background: transparent; border: 0; }
    .lg-qe-in { block-size: 44px; border: 1px solid var(--lm-d-control-edge); border-radius: 10px; background: var(--lm-d-surface); }
}

/* ── 27. S18 — «القوائم المالية» (mockup v3, PO «ابدأ» 2026-11-03): the formal statements as paper sheets in the
      auditor's-report form — البيان · إيضاح · one column per period; a single rule above a subtotal, a double rule
      under a total, negatives in parentheses, no colour on a figure. One thin bar (period · project · comparison ·
      contents) above the sheets; on a phone the comparison column folds away; printed, one sheet per page. ── */
.lg-fs { gap: 16px; }
.lg-fs-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; padding: 10px 14px; background: var(--lm-d-surface); border: 1px solid var(--lm-d-border); border-radius: 12px; }
.lg-fs-form { flex: 1 1 640px; min-inline-size: 0; }
.lg-fs-toc { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; font-weight: 600; }
.lg-fs-toc a { color: var(--lm-d-ink); text-decoration: none; padding-block: 6px; border-block-end: 2px solid transparent; }
.lg-fs-toc a:hover, .lg-fs-toc a:focus-visible { border-block-end-color: var(--lm-d-accent); }
.lg-fs-sheet { inline-size: 100%; max-inline-size: 1000px; margin-inline: auto; background: var(--lm-d-surface); border: 1px solid var(--lm-d-border); border-radius: 6px; box-shadow: 0 2px 10px var(--lm-d-shadow); padding: 40px 52px 22px; scroll-margin-block-start: 80px; }
.lg-fs-h { display: grid; gap: 2px; text-align: center; margin-block-end: 22px; }
.lg-fs-h h2 { margin: 2px 0 0; font-size: 22px; font-weight: 700; color: var(--lm-d-ink); text-wrap: balance; }
.lg-fs-co { font-size: 13px; font-weight: 600; color: var(--lm-d-muted); }
.lg-fs-per { font-size: 14px; color: var(--lm-d-ink); }
.lg-fs-cur { font-size: 12.5px; color: var(--lm-d-muted); }
.lg-fs-f { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-block-start: 26px; padding-block-start: 10px; border-block-start: 1px solid var(--lm-d-divider); font-size: 12px; color: var(--lm-d-muted); }
.lg-fs-f .is-ok { color: var(--lm-d-ok); }
.lg-fs-f .is-danger { color: var(--lm-d-danger); }
.lg-fs-wrap { overflow-x: auto; }
.lg-fs-t { inline-size: 100%; border-collapse: collapse; font-size: 14px; color: var(--lm-d-ink); }
.lg-fs-t th { padding: 6px 10px; font-size: 13px; font-weight: 700; border-block-end: 1.5px solid var(--lm-d-ink); white-space: nowrap; }
.lg-fs-t td { padding: 5px 10px; vertical-align: baseline; }
.lg-fs-t .is-l { text-align: start; }
.lg-fs-t .is-n { text-align: end; inline-size: 150px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-fs-t .is-note { inline-size: 54px; text-align: center; color: var(--lm-d-muted); font-size: 13px; }
.lg-fs-t td.is-cmp { color: var(--lm-d-muted); }
.lg-fs-t td.is-z { color: var(--lm-d-subtle); }
.lg-fs-t .is-i1 { padding-inline-start: 18px; }
.lg-fs-t .is-i2 { padding-inline-start: 34px; }
.lg-fs-t tr.is-head td { padding-block: 16px 4px; font-weight: 700; font-size: 14.5px; }
.lg-fs-t tr.is-head2 td { padding-block: 10px 2px; padding-inline-start: 18px; font-weight: 600; font-size: 13.5px; color: var(--lm-d-muted); }
.lg-fs-t tr.is-sub td { font-weight: 700; }
.lg-fs-t tr.is-sub td.is-n { border-block-start: 1px solid var(--lm-d-ink); }
.lg-fs-t tr.is-total td { font-weight: 700; font-size: 15px; padding-block: 8px; }
.lg-fs-t tr.is-total td.is-n { border-block-start: 1px solid var(--lm-d-ink); border-block-end: 3px double var(--lm-d-ink); }
.lg-fs-t tr.is-pct td { font-size: 12.5px; color: var(--lm-d-muted); padding-block-start: 6px; }
.lg-fs-t.is-ag, .lg-fs-t.is-eq { font-size: 12.5px; }
.lg-fs-t.is-ag .is-n { inline-size: auto; }
.lg-fs-t.is-ag td, .lg-fs-t.is-ag th { padding-inline: 5px; }
.lg-fs-t.is-eq .is-n { inline-size: 170px; }
.lg-fs-grp { font-size: 12px; color: var(--lm-d-muted); white-space: nowrap; }
.lg-fs-ratio { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-block-start: 14px; font-size: 13px; color: var(--lm-d-muted); }
.lg-fs-ratio b { color: var(--lm-d-ink); }
.lg-fs-nt + .lg-fs-nt { margin-block-start: 26px; }
.lg-fs-nt h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--lm-d-ink); }
.lg-fs-nt h3 span { font-size: 13px; font-weight: 500; color: var(--lm-d-muted); }
.lg-fs-pol { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.8; color: var(--lm-d-muted); max-inline-size: 78ch; }
.lg-fs-pol b { color: var(--lm-d-ink); }
@media (max-width: 640px) {
    .lg-fs-sheet { padding: 22px 14px 14px; border-radius: 4px; }
    .lg-fs-h h2 { font-size: 18px; }
    .lg-fs-t { font-size: 12.5px; }
    .lg-fs-t .is-note, .lg-fs-t .is-cmp { display: none; }
    .lg-fs-t .is-n { inline-size: auto; }
    .lg-fs-t td, .lg-fs-t th { padding-inline: 6px; }
    .lg-fs-t .is-i1 { padding-inline-start: 10px; }
    .lg-fs-t .is-i2 { padding-inline-start: 16px; }
    .lg-fs-t.is-ag td.is-l, .lg-fs-t.is-eq td.is-l { min-inline-size: 140px; }
    .lg-fs-toc a { padding-block: 12px; }
}
/* the equity table: the row names keep their line; on narrow screens and on paper the figures give way */
.lg-fs-t.is-eq td.is-l { min-inline-size: 200px; }
@media (max-width: 1023px) {
    .lg-fs-t.is-eq .is-n { inline-size: auto; }
}
.lg-fs-t.is-ag td.is-l { min-inline-size: 140px; max-inline-size: 200px; }
/* «طباعة / PDF» prints the statements alone (dev review 2026-11-03: the top bar, the section tabs, the page header,
   the install sheet and the assistant came out on the paper) — each statement on one page of its own, on white */
@media print {
    body:has(.lg-fs) :is(.fi-topbar-ctn, .fi-sidebar, .fi-sidebar-close-overlay, .hn-install-wrap, .hr-strip, .fi-header, .hoas-fab, .hoas-panel) { display: none !important; }
    body:has(.lg-fs) :is(.fi-layout, .fi-main-ctn, .fi-main, .fi-page, .fi-page-content) { padding: 0 !important; margin: 0 !important; max-inline-size: none !important; background: var(--lm-d-surface) !important; }
    body:has(.lg-fs) { background: var(--lm-d-surface) !important; }
    .lg-fs { gap: 0; }
    .lg-fs-bar { display: none !important; }
    .lg-fs-sheet { padding: 4px 6px 0; border: 0; box-shadow: none; max-inline-size: none; }
    .lg-fs-sheet ~ .lg-fs-sheet { break-before: page; }   /* before, not after: no blank page at the end */
    /* paper rows are tighter than screen rows, so the balance sheet and each notes page keep to one page */
    .lg-fs-h { margin-block-end: 10px; }
    .lg-fs-h h2 { font-size: 18px; }
    .lg-fs-t { font-size: 13px; }
    .lg-fs-t th { padding-block: 4px; }
    .lg-fs-t td { padding-block: 2px; }
    .lg-fs-t tr.is-head td { padding-block: 8px 2px; }
    .lg-fs-t tr.is-head2 td { padding-block: 4px 1px; }
    .lg-fs-t tr.is-total td { padding-block: 4px; }
    .lg-fs-t tr.is-total, .lg-fs-t tr.is-pct { break-before: avoid; break-inside: avoid; }   /* a total never starts a page */
    .lg-fs-nt + .lg-fs-nt { margin-block-start: 14px; }
    .lg-fs-pol { line-height: 1.6; gap: 2px; max-inline-size: none; }
    .lg-fs-f { margin-block-start: 12px; break-before: avoid; }   /* a sheet's foot never stands alone on a page */
    /* paper does not scroll: the aging tables fit the page width */
    .lg-fs-wrap { overflow: visible; }
    .lg-fs-t.is-ag { font-size: var(--ho-text-xs); }
    .lg-fs-t.is-ag td, .lg-fs-t.is-ag th { padding-inline: 3px; }
    .lg-fs-t.is-ag td.is-l { min-inline-size: 0; max-inline-size: none; }
    .lg-fs-t.is-ag tr.is-total td { font-size: var(--ho-text-xs); }
}
