/* Inter, self-hosted (SIL OFL, fonts/OFL.txt): the design's face. Latin only; 400, 500, 600, 700. font-display: block, so a page never shows a fallback face first. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: block; src: url("/static/nd/fonts/inter-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: block; src: url("/static/nd/fonts/inter-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: block; src: url("/static/nd/fonts/inter-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: block; src: url("/static/nd/fonts/inter-latin-700.woff2") format("woff2"); }
/* Core Product Design: styles.
   Layout concept: a documentation shell (sticky section nav + one column of "specimens"), each specimen being a framed Double-style app panel.
   Palette: white app ground, grey and lavender surfaces, one purple accent, green/red/amber for state only. Measured from the screenshots (design/09-DESIGN-TOKENS.md).
   Type: Inter (clean grotesque like the product). */
:root {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f4f4f6; --surface-lav: #eeeef8; --surface-lav-2: #f6f6fc;
  --line: #e4e4ea; --line-2: #d6d6de; --ink: #2c2c34; --ink-2: #5a5a66; --ink-3: #6a6a77;
  --bad-btn: #d92d5b; --accent: #5c44ec; --accent-ink: #ffffff; --accent-soft: #ececfc; --accent-line: #c9c1fb;
  --ok: #167a47; --ok-soft: #e3f5ec; --warn: #8a5f00; --warn-soft: #fcf4cc; --bad: #c9254f; --bad-soft: #fde8ee;
  --ai: #4b3fe0; --rule: #167a47; --unc: #e8871e;
  --shade: rgba(30, 30, 44, .42); --shadow: 0 10px 40px rgba(20, 20, 40, .22);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-ctl: 6px; --r-card: 10px; --r-modal: 8px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #12131a; --surface: #171923; --surface-2: #1f2230; --surface-lav: #23263a; --surface-lav-2: #1c1f2e;
  --line: #2b2f42; --line-2: #3a3f57; --ink: #e8e9f2; --ink-2: #b4b7ca; --ink-3: #979bb1;
  --bad-btn: #c2314f; --accent: #8e7dff; --accent-ink: #14112e; --accent-soft: #1f1d3d; --accent-line: #4a4590;
  --ok: #4cd08a; --ok-soft: #153a29; --warn: #e5b84a; --warn-soft: #3b3115; --bad: #ff6b8e; --bad-soft: #43202c;
  --ai: #a79bff; --rule: #4cd08a; --unc: #ffa24d; --shade: rgba(0, 0, 0, .55); --shadow: none; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #12131a; --surface: #171923; --surface-2: #1f2230; --surface-lav: #23263a; --surface-lav-2: #1c1f2e;
  --line: #2b2f42; --line-2: #3a3f57; --ink: #e8e9f2; --ink-2: #b4b7ca; --ink-3: #979bb1;
  --bad-btn: #c2314f; --accent: #8e7dff; --accent-ink: #14112e; --accent-soft: #1f1d3d; --accent-line: #4a4590;
  --ok: #4cd08a; --ok-soft: #153a29; --warn: #e5b84a; --warn-soft: #3b3115; --bad: #ff6b8e; --bad-soft: #43202c;
  --ai: #a79bff; --rule: #4cd08a; --unc: #ffa24d; --shade: rgba(0, 0, 0, .55); --shadow: none; color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.45 var(--font);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 80px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 13px; height: 13px; } svg.i.f { fill: currentColor; stroke: none; }
.num { font-variant-numeric: tabular-nums; }

/* docs shell */
main { padding-block: 24px 0; min-width: 0; }
/* load speed (v97): a section off the screen is not laid out or painted until it comes near; what it shows does not change */
/* a section holding something fixed to the window (full view, an open dialog) is laid out normally, so the containment does not trap it */
html.cv-off section.doc { content-visibility: visible; }
h1 { font-size: 26px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 18px; margin: 0 0 6px; text-wrap: balance; } h3 { font-size: 14px; margin: 22px 0 6px; }
.note { background: var(--surface-lav-2); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 12px; color: var(--ink-2); max-width: 78ch; }
.cap { color: var(--ink-3); font-size: 12px; margin: 6px 0 12px; max-width: 80ch; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tag.later { background: var(--surface-2); color: var(--ink-2); }
.tscroll { overflow-x: auto; max-width: 100%; }
.tscroll table.t { min-width: 760px; }

/* app frame */
.app { position: relative; background: var(--bg); color: var(--ink); font-size: 13px; }
.hdr { display: flex; align-items: center; gap: 6px; padding: 10px 16px 0; height: 46px; }
.hdr .sel { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); white-space: nowrap; }
.hdr .sel.client { min-width: 190px; justify-content: space-between; } .hdr .sel.home { padding: 0 6px; }
.hdr .lnk { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 7px; border: 0; background: none; border-radius: var(--r-ctl); }
.hdr .lnk:hover, .iconbtn:hover { background: var(--surface-2); }
.hdr .sp { flex: 1; }
.bubble { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 6px; font-size: 11px; font-weight: 600; min-width: 18px; text-align: center; }
.avs { display: inline-flex; } .av { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; border: 2px solid var(--bg); margin-left: -6px; }
.av.a { background: #f0a020; } .av.b { background: #e0642c; } .av.c { background: #1fb978; } .av.n { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.mods { display: flex; gap: 18px; padding: 0 16px; height: 30px; border-bottom: 1px solid var(--line); }
.mods > button { border: 0; background: none; padding: 0; color: var(--ink-2); border-bottom: 2px solid transparent; height: 30px; }
.mods > button.on { color: var(--accent); border-color: var(--accent); }
.ctrls { display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
.ctrls .sp { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; } .btn.pri:hover { filter: brightness(1.08); }
.btn.sm { height: 24px; padding: 0 9px; font-size: 12px; } .btn:disabled { opacity: .45; cursor: not-allowed; }
.iconbtn { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink-2); position: relative; }
.iconbtn.on { color: var(--accent); }

.band { background: var(--surface-lav); padding: 14px 16px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; text-align: left; }
.tile .ic { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.tile .t { font-weight: 600; font-size: 14px; } .tile .s { color: var(--ink-2); font-size: 12px; }
.tile .grow { flex: 1; min-width: 0; }
.sec { margin: 6px 16px; } .sec > .shead { display: flex; align-items: center; gap: 10px; height: 56px; }
.pillbar { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-lav); border-radius: 999px; padding: 4px 12px 4px 6px; font-weight: 600; border: 0; }
.tog { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.tog svg { width: 10px; height: 10px; transition: transform .15s; } .sec.open .tog svg { transform: rotate(90deg); }
.cnt { color: var(--ink-3); margin-left: auto; } .sec .body { display: none; } .sec.open .body { display: block; }
.grp { border: 1px solid var(--line); border-radius: var(--r-card); margin: 0 0 10px; background: var(--surface); }
.grp > .ghead { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 12px; border-top: 1px solid var(--line); }
.row .title { flex: 1; min-width: 0; font-weight: 500; } .row .title.over { color: var(--bad); }
.stat { width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid var(--line-2); display: grid; place-items: center; background: var(--surface); padding: 0; flex: none; }
.stat[data-s="done"] { background: var(--ok); border-color: var(--ok); color: var(--accent-ink); } .stat[data-s="prog"] { background: var(--ink-2); border-color: var(--ink-2); color: var(--accent-ink); }
.stat svg { width: 10px; height: 10px; stroke-width: 2.4; } .stat[data-s="todo"] svg { display: none; }
.mini { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 7px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink-2); font-size: 12px; }
.mini:hover { border-color: var(--line-2); } .mini.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.star.on { color: #e9a400; } .date { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--ink-3); background: var(--surface); }
.date.over { color: var(--bad); } .date.set { color: var(--ink); }
.who { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.who.on { background: #1fb978; color: #fff; } .who.off { border: 1px solid var(--line-2); color: var(--ink-3); background: var(--surface-2); }
.sel2 { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; height: 24px; min-width: 104px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }

.cmp { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--surface-2); } .cmp.eq { background: var(--ok-soft); color: var(--ok); }
.cmp.diff { background: var(--surface-2); } .cmp.warn { background: var(--warn-soft); color: var(--warn); }
.rec { display: grid; grid-template-columns: 24px minmax(190px, 1.4fr) 120px 140px 150px auto; gap: 10px; align-items: center; min-height: 48px; padding: 4px 12px; border-top: 1px solid var(--line); }
.rec .acct.diff { color: var(--bad); } .rec .acts { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }

table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th { text-align: left; font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t th.sorted { background: var(--accent-soft); color: var(--accent); }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.sync td { background: var(--ok-soft); } table.t td.money { text-align: right; font-variant-numeric: tabular-nums; } table.t td.neg { color: var(--bad); }
.exp { border: 0; background: none; color: var(--ink-2); width: 22px; height: 22px; border-radius: 50%; } .exp:hover { background: var(--surface-2); }
.tabs { display: inline-flex; gap: 4px; } .tabs button { border: 1px solid var(--line-2); background: var(--surface); height: 26px; padding: 0 10px; border-radius: var(--r-ctl); }
.tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ask { width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; color: var(--ink-3); position: relative; display: inline-grid; place-items: center; }
.ask.asked { color: var(--ink); } .ask.asked::after { content: ""; position: absolute; top: 2px; right: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--unc); }
.thumb { border: 0; background: none; color: var(--ink-3); width: 26px; height: 26px; border-radius: var(--r-ctl); display: inline-grid; place-items: center; } .thumb.on { color: var(--accent); background: var(--accent-soft); }
.mk { display: inline-flex; vertical-align: -3px; margin-right: 4px; } .mk.ai { color: var(--ai); } .mk.rule { color: var(--rule); } .mk.unc { color: var(--unc); }
.conf { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.conf.hi { background: var(--ok-soft); color: var(--ok); } .conf.med { background: var(--warn-soft); color: var(--warn); } .conf.low { background: var(--bad-soft); color: var(--bad); }
.pct { font-style: italic; color: var(--ink-2); }
.detail { background: var(--surface-lav-2); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.detail .tabs { margin-bottom: 8px; }

.shade { position: absolute; inset: 0; background: var(--shade); z-index: 20; display: none; align-items: flex-start; justify-content: center; padding-top: 80px; }
.shade.show { display: flex; }
.modal { width: min(460px, 92%); background: var(--surface); border-radius: var(--r-modal); box-shadow: var(--shadow); padding: 18px; border: 1px solid var(--line); }
.modal h4 { margin: 0 0 6px; font-size: 15px; } .modal p { margin: 0 0 12px; color: var(--ink-2); }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 9px 10px; margin-bottom: 8px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
/* B3 (small 8, 11 Nov 2026): a dialog's sticky foot is SOLID in the dialog's own surface (the same var(--surface) .modal paints), above the scrolling rows (z-index), and it also paints the dialog's 18px bottom padding band
   under it (the shadow is clipped by the dialog's own overflow), so no row shows behind or beneath "Undo last action" and "Close" while the list scrolls. One rule for every dialog with a sticky foot; tests/test_dialog_foot_solid.py. */
.modal .foot { z-index: 5; background: var(--surface); box-shadow: 0 18px 0 0 var(--surface); }
.toast { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--r-ctl); z-index: 30; display: none; }
.toast.show { display: block; }
[data-tip] { position: relative; } [data-tip]:hover::before { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 4px 8px; border-radius: 4px; font-size: 11.5px; font-weight: 500; white-space: nowrap; z-index: 40; pointer-events: none; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.cl { display: grid; grid-template-columns: var(--clcols, 24px minmax(170px, 1.2fr) 90px 100px 100px 120px 110px 70px); gap: 8px; align-items: center; min-height: 44px; padding: 3px 12px; border-top: 1px solid var(--line); }
.cl.h { background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 12px; min-height: 34px; border-top: 0; }
.cl .ov { color: var(--bad); } .cl .ok { color: var(--ok); }

@media (max-width: 860px) {
}
/* Responsive: the app panels adapt to their own width (container queries), so they also work inside a phone-width page. */
.mods { overflow-x: auto; scrollbar-width: none; } .mods button { white-space: nowrap; }
.hdr { flex-wrap: nowrap; min-width: 0; } .hdr > * { flex: none; } .hdr .sel.client { flex: 0 1 190px; min-width: 120px; overflow: hidden; }
@container spec (max-width: 1180px) { .hdr .lnk .lbl { display: none; } }
@container spec (max-width: 900px) { .hdr { flex-wrap: wrap; height: auto; min-height: 46px; row-gap: 6px; padding-bottom: 6px; } .hdr .sel.client { flex: 0 1 auto; } }
.ctrls { flex-wrap: wrap; }
.row { flex-wrap: wrap; }
@container spec (max-width: 900px) {
  .hdr .sel.client { min-width: 140px; }
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .row .title { flex-basis: calc(100% - 40px); }
  .row .push { margin-left: 28px; }
  .rec { grid-template-columns: 24px minmax(0, 1fr) auto; row-gap: 4px; }
  .rec > :nth-child(3), .rec > :nth-child(4), .rec > :nth-child(5) { grid-column: 2 / -1; font-size: 12px; color: var(--ink-2); }
  .rec > :nth-child(3)::before { content: "Reconciled through  "; color: var(--ink-3); } .rec > :nth-child(4)::before { content: "Balance @ EOM  "; color: var(--ink-3); } .rec > :nth-child(5)::before { content: "Compare to  "; color: var(--ink-3); }
  .rec .acts { grid-column: 2 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .cl { grid-template-columns: 24px minmax(0, 1fr) auto; row-gap: 4px; }
  .cl > :nth-child(n+4) { grid-column: 2 / -1; font-size: 12px; color: var(--ink-2); }
  .cl.h { display: none; }
  .cl [data-l]::before { content: attr(data-l) "  "; color: var(--ink-3); }
}
@container spec (max-width: 560px) {
  .hdr .sel.client { flex: 1 1 100%; } .hdr .sp { display: none; }
  .ctrls .sp { display: none; } .tile { padding: 11px; }
  .band { padding: 10px; } .sec { margin: 4px 8px; } .shade { padding-top: 24px; }
  .kv { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tog svg { transition: none; } }

/* additions: native details groups, expandable review rows */
details.grp > summary.ghead { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.grp > summary.ghead::-webkit-details-marker { display: none; }
details.grp > summary.ghead svg { width: 10px; height: 10px; transition: transform .15s; }
details.grp[open] > summary.ghead svg { transform: rotate(90deg); }
.detail-r[hidden] { display: none; }
tr.synced td { background: color-mix(in srgb, var(--ok) 14%, transparent); }
tr.done-r td { color: var(--ink-2); }
.acct input { font: inherit; width: 100%; min-width: 180px; padding: 6px 8px; border: 1px solid var(--accent); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); }
.exp.open svg { transform: rotate(90deg); }
.thumb.on { color: var(--ok); }

/* portal, vendor page, switches, chat, signature, drop zone */
.app.brand { --accent: #0b6b57; --accent-soft: #d7ece5; }
.brandbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--accent); color: #fff; }
.brandbar b { font-size: 15px; } .brandbar .sp { flex: 1; } .brandbar .mini, .brandbar .who { color: #fff; background: transparent; border-color: rgba(255,255,255,.5); }
/* the firm's logo at the size its clients see it (the portal brand bar, the Settings logo row): one part (settings-s3; was in portal.css) */
.pt-logo { height: 28px; width: auto; max-width: 120px; object-fit: contain; border-radius: 4px; background: #fff; }
.pnav { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.pnav button { font: inherit; background: none; border: 0; padding: 8px 10px; border-radius: var(--r-ctl); color: var(--ink-2); cursor: pointer; }
.pnav button.on { background: var(--surface-lav); color: var(--accent); font-weight: 600; }
.swt { position: relative; width: 36px; height: 20px; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; flex: none; }
.swt::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.swt.on { background: var(--accent); } .swt.on::after { left: 18px; }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); } .msg.me { align-self: flex-end; background: var(--surface-lav); }
.msg small { display: block; color: var(--ink-3); margin-top: 2px; }
.sig { font: italic 26px Georgia, serif; border-bottom: 1px solid var(--ink); padding: 6px 4px; min-height: 40px; }
.drop { margin: 12px 16px; padding: 22px; border: 1.5px dashed var(--line); border-radius: var(--r-tile); text-align: center; color: var(--ink-2); cursor: pointer; }
.drop:hover, .drop.on { border-color: var(--accent); color: var(--accent); }
.docprev { margin: 0 16px; padding: 14px; background: var(--surface-2); border-radius: var(--r-ctl); border: 1px solid var(--line); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; padding: 8px 0; } .bars i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; padding: 12px 16px; } .kpi > div { border: 1px solid var(--line); border-radius: var(--r-tile); padding: 10px 12px; } .kpi b { font-size: 20px; display: block; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

.links { margin: -4px 0 12px; font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.links a { color: var(--accent); text-decoration: none; background: var(--surface-lav); padding: 1px 7px; border-radius: 99px; font-weight: 600; }

/* shared data-grid behavior: search, sort, per-column filter */
.gridbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px; }
.gridbar input { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); min-width: 180px; flex: 1; max-width: 280px; }
.gridbar .gcount { color: var(--ink-3); font-size: 12px; }
.gridbar input[type=search]:not(:placeholder-shown) { border-color: var(--line); }  /* a search box with a word typed in it is a search, not a selected filter chip: its border stays the neutral one (the focus ring still shows) */
th .sortb { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 0 0 0 4px; vertical-align: middle; }
th .sortb svg { width: 12px; height: 12px; }
th[aria-sort="ascending"] .sortb, th[aria-sort="descending"] .sortb { color: var(--accent); }
tr.fltrow th { background: var(--bg); padding: 4px 6px; }
tr.fltrow input { font: inherit; width: 100%; min-width: 60px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); }
.gnone td { text-align: center; color: var(--ink-3); padding: 14px; }

[hidden] { display: none !important; }

.bulk { position: sticky; bottom: 10px; margin: 10px auto; width: min(620px, 94%); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-lav); border: 1.5px solid var(--accent); border-radius: var(--r-tile); box-shadow: var(--shadow); z-index: 5; }
.bulk .sp { flex: 1; }
.bulk .mut { color: var(--ink-2); font-size: 12px; }

.rep { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); }
.plist { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-right: 1px solid var(--line); }
.plist b { margin: 8px 6px 4px; font-size: 13px; }
.plist button { display: flex; gap: 8px; align-items: center; text-align: left; font: inherit; border: 0; background: none; padding: 7px 8px; border-radius: var(--r-ctl); color: var(--ink); cursor: pointer; }
.plist button:hover { background: var(--surface-2); } .plist button.on { background: var(--accent); color: var(--accent-ink); }
.preview { position: relative; margin: 12px 16px 16px; padding: 24px; min-height: 260px; border: 1px solid var(--line); border-radius: var(--r-tile); }
.gen { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); background: var(--bg); border: 1px solid var(--accent); padding: 14px 20px; text-align: center; box-shadow: var(--shadow); }
.gen .dots { display: block; width: 14px; height: 14px; margin: 0 auto 8px; border-radius: 50%; border: 3px solid var(--surface-lav); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@container spec (max-width: 700px) { .rep { grid-template-columns: 1fr; } .plist { border-right: 0; border-bottom: 1px solid var(--line); } }

.rec.h { min-height: 30px; border-top: 0; font-weight: 600; color: var(--ink-3); font-size: 12px; }
@container spec (max-width: 560px) { .rec.h { display: none; } }

.lnk { border: 0; background: none; font: inherit; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); padding: 4px 6px; }
.lnk:disabled { color: var(--ink-3); cursor: not-allowed; }

.rowc { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; } .rowc .sel2 { min-width: 120px; }

.app:has(.shade.show) { min-height: 700px; }

.cap .sel2 { color: var(--ink); }

.qsplit { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); }
.qhead { font-weight: 600; padding: 10px 14px; background: var(--surface-2); }
.qlist { border-right: 1px solid var(--line); min-width: 0; }
.qrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.qrow:hover { background: var(--surface-2); } .qrow.sel { outline: 1.5px solid var(--accent); outline-offset: -1.5px; }
.qrow.done-r { color: var(--ink-2); }
.qthumb { background: var(--surface-2); border-radius: var(--r-ctl); min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-3); font-size: 11px; }
.qmain { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .qpills { display: flex; gap: 6px; flex-wrap: wrap; } .qtext { overflow-wrap: anywhere; }
.qdet { padding: 12px 14px; }
@container spec (max-width: 700px) { .qsplit { grid-template-columns: 1fr; } .qlist { border-right: 0; border-bottom: 1px solid var(--line); } }

.donut { width: 170px; height: 170px; border-radius: 50%; margin: 10px auto; display: grid; place-items: center; position: relative; }
.donut::before { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: var(--bg); }
.donut span { position: relative; font-weight: 600; }
.mrow:nth-child(even) { background: var(--surface-2); }
@container spec (max-width: 560px) { .mrow { grid-template-columns: 1fr !important; } }

.mrow .cmp.diff { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }

/* undo: global dialogs and toast action */
.gshade { position: fixed; inset: 0; z-index: 100; align-items: center; padding: 16px; }
.toast .toast-undo { color: #fff; text-decoration: underline; padding: 0 4px; }
.alist { display: flex; flex-direction: column; margin: 8px 0; }
.alist .arow { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.alist .arow:first-child { border-top: 0; } .alist .arow .grow { flex: 1; min-width: 0; }
.badge-n { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 10px; padding: 0 5px; margin-left: -8px; margin-top: -14px; }

.aigrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; margin-top: 10px; }
.aidoc, .aiside { min-width: 0; }
@container spec (max-width: 800px) { .aigrid { grid-template-columns: 1fr; } }

.sumrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; padding: 12px 16px; }
.sumcard { border: 1px solid var(--line); border-radius: var(--r-tile); padding: 12px; display: grid; gap: 6px; background: var(--bg); }
.sumbox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .sumbox > div { background: var(--surface-2); border-radius: var(--r-ctl); padding: 8px 10px; display: grid; gap: 2px; }
.sumbox > div.bad { background: var(--warn-soft); outline: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); } .sumbox > div.good { background: color-mix(in srgb, var(--ok) 14%, transparent); }
tr.subg td { background: var(--surface-2); }
.menuwrap { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 180px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-tile); box-shadow: var(--shadow); padding: 6px; z-index: 15; display: grid; }
.menu button { text-align: left; border: 0; background: none; font: inherit; color: var(--ink); padding: 8px 10px; border-radius: var(--r-ctl); cursor: pointer; } .menu button:hover { background: var(--surface-2); } .menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* FORM CONTROLS: one definition for every state. Demo classes .is-hover .is-focus .is-active force a state for the specimen sheet. */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select, .in) { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 4px 9px; line-height: 18px; min-height: 28px; box-sizing: border-box; transition: border-color .12s, box-shadow .12s; }
textarea { padding: 6px 9px; line-height: 1.45; min-height: 64px; resize: vertical; }
.btn, .sel2, .iconbtn, .tabs button { line-height: 18px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:not([type=checkbox]):not([type=radio]):not(:disabled):hover, textarea:not(:disabled):hover, select:not(:disabled):hover, .in:hover, .is-hover { border-color: var(--ink-3); }
input:not([type=checkbox]):not([type=radio]):focus-visible, textarea:focus-visible, select:focus-visible, .in:focus-visible, .is-focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input:disabled, textarea:disabled, select:disabled, .in.is-disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; border-style: dashed; }
input[readonly], textarea[readonly], .in.is-readonly { background: var(--surface-2); color: var(--ink-2); }
input[aria-invalid="true"], textarea[aria-invalid="true"], .is-error { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 16%, transparent); }
input.is-ok, .is-ok { border-color: var(--ok); }
.field-msg { color: var(--bad); font-size: 12px; margin-top: 3px; display: block; } .field-help { color: var(--ink-3); font-size: 12px; margin-top: 3px; display: block; }
.req { color: var(--bad); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; flex: none; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox]:disabled, input[type=radio]:disabled { cursor: not-allowed; opacity: .5; }
.swt:focus-visible, .is-focus.swt { outline: 2px solid var(--accent); outline-offset: 2px; } .swt:disabled { opacity: .5; cursor: not-allowed; } .swt:hover { filter: brightness(.95); }
.btn:active, .btn.is-active { transform: translateY(1px); background: var(--surface-3, var(--surface-2)); } .btn.pri:active, .btn.pri.is-active { filter: brightness(.92); background: var(--accent); }
.btn:focus-visible, .btn.is-focus, .iconbtn:focus-visible, .tabs button:focus-visible, .sel2:focus-visible, .date:focus-visible, .lnk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.is-hover { background: var(--surface-2); } .btn.pri.is-hover { filter: brightness(1.08); background: var(--accent); }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; left: calc(50% - 6px); top: calc(50% - 6px); }
.btn.pri.loading::after { border-color: rgba(255,255,255,.4); border-top-color: #fff; }
.tabs button:hover { background: var(--surface-2); } .tabs button.is-hover { background: var(--surface-2); }
.sel2:hover, .date:hover, .iconbtn:hover, .is-hover.sel2 { border-color: var(--ink-3); }
.sel2:disabled, .sel2.is-disabled { opacity: .5; cursor: not-allowed; }
a:hover { text-decoration: underline; }
[data-tip]:focus-visible::before { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 4px 8px; border-radius: 4px; font-size: 11.5px; font-weight: 500; white-space: nowrap; z-index: 40; pointer-events: none; }

/* SIZE SCALE: small 24 (pills inside rows), standard 28 (inputs, buttons, selects), touch 44 (phones and touch screens). Text 13px; 16px on phones so the browser does not zoom on focus. */
@media (max-width: 520px), (pointer: coarse) {
  :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select, .in) { font-size: 16px; min-height: 44px; padding: 9px 12px; }
  textarea { min-height: 88px; padding: 9px 12px; }
  .btn, .btn.sm, .sel2, .date, .iconbtn, .tabs button, .lnk, .mini { min-height: 44px; height: auto; }
  .btn.sm, .mini, .date, .sel2 { padding-block: 0; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  .swt { width: 46px; height: 28px; } .swt::after { width: 22px; height: 22px; } .swt.on::after { left: 22px; }
}

.ctrls .sel2, .ctrls .date, .sel2.md { height: 28px; }

/* ACTION HIERARCHY: primary (filled) > secondary (outlined) > tertiary (text) ; destructive variants. Footer order: tertiary far left, then secondary, then primary at the right. */
.btn.ter { background: none; border-color: transparent; color: var(--accent); font-weight: 500; }
.btn.ter:hover, .btn.ter.is-hover { background: var(--accent-soft); filter: none; } .btn.ter:active, .btn.ter.is-active { background: var(--accent-line); }
.btn.dng { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; } .btn.dng:hover, .btn.dng.is-hover { filter: brightness(1.08); background: var(--bad); } .btn.dng:active, .btn.dng.is-active { filter: brightness(.92); background: var(--bad); }
.btn.ter.dng { background: none; border-color: transparent; color: var(--bad); } .btn.ter.dng:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); filter: none; }
.foot > .btn.ter:first-child, .foot > .ml { margin-right: auto; }
/* OTHER ACTIVE STATES */
.is-selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.is-current { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.is-dragging { opacity: .7; transform: rotate(1deg); box-shadow: var(--shadow); background: var(--bg); }
.is-drop { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.skeleton { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); } .dot.warn { background: var(--unc); } .dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.stage { position: relative; min-height: 220px; border-top: 1px solid var(--line); background: var(--surface-2); }
.fl { position: absolute; right: 76px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-tile); box-shadow: var(--shadow); }
.helpfab { position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer; z-index: 12; }
.app { position: relative; }
/* floating layer, bottom right: help launcher in the corner, floating action bar beside it, toast stack above */
.bulk { margin: 10px 76px 10px auto; }
.app.has-float .toast { bottom: 84px; }
.toast { left: auto; right: 76px; transform: none; }

/* ROW ACTIONS: 1 primary (text) + up to 2 icon buttons (name on hover) + "..." menu. Learns from use; customisable. */
.ract { display: inline-flex; gap: 4px; align-items: center; }
.ract .iconbtn { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: var(--r-ctl); display: inline-grid; place-items: center; background: var(--bg); color: var(--ink-2); }
.ract .iconbtn:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.ract .menu button { display: flex; gap: 8px; align-items: center; }
.ract .menu .rc { color: var(--ink-3); font-size: 11px; margin-left: auto; }
.rrow { display: grid; grid-template-columns: minmax(0, 1.6fr) 110px 90px auto; gap: 10px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); min-height: 48px; }
@container spec (max-width: 700px) { .rrow { grid-template-columns: minmax(0, 1fr) auto; } .rrow > :nth-child(2), .rrow > :nth-child(3) { font-size: 12px; color: var(--ink-2); } }
@media (max-width: 520px), (pointer: coarse) { .ract .iconbtn { width: 44px; height: 44px; } }

.ract .menuwrap .iconbtn[data-tip]:hover::before { left: auto; right: 0; transform: none; }
.menuwrap .menu { max-height: 280px; overflow: auto; }

/* BUTTON LOOK (owner 2026-10-28: one consistent look, white). Primary = solid accent. Every other button = WHITE with a visible border; only the text colour differs (secondary: ink, tertiary: accent). Danger = solid red, or white with a red border. Hover tints, rest never grey. */
.btn { background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); font-weight: 500; }
.btn:hover, .btn.is-hover { background: var(--accent-soft); border-color: var(--accent-line); }
.btn:active, .btn.is-active { background: var(--accent-line); transform: translateY(1px); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.pri:hover, .btn.pri.is-hover { background: var(--accent); filter: brightness(1.08); } .btn.pri:active, .btn.pri.is-active { background: var(--accent); filter: brightness(.92); }
.btn.ter { background: var(--bg); border-color: var(--line-2); color: var(--accent); }
.btn.ter:hover, .btn.ter.is-hover { background: var(--accent-soft); border-color: var(--accent-line); } .btn.ter:active, .btn.ter.is-active { background: var(--accent-line); }
.btn.dng { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ter.dng { background: var(--bg); border-color: color-mix(in srgb, var(--bad) 50%, var(--bg)); color: var(--bad); }
.btn.ter.dng:hover, .btn.ter.dng.is-hover { background: color-mix(in srgb, var(--bad) 10%, var(--bg)); } .btn.ter.dng:active, .btn.ter.dng.is-active { background: color-mix(in srgb, var(--bad) 20%, var(--bg)); }
.iconbtn, .thumb, .ask, .exp { background: var(--bg); border: 1px solid var(--line-2); color: var(--ink-2); }
.iconbtn:hover, .thumb:hover, .ask:hover, .exp:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.lnk { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-ctl); color: var(--accent); padding: 3px 9px; } .lnk:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.hdr .lnk { background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); padding: 0 8px; } .hdr .lnk:hover { background: var(--accent-soft); }
.lnk.dng { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--bg)); }
.sel, .sel2, .date, .mini, .tabs button { background: var(--bg); }
.hdr .sel { background: var(--bg); }

/* COMPONENT COMPLETENESS: states and variants that screens used to fake with inline styles. */
a, .tlink { color: var(--accent); text-decoration: none; } a:hover, .tlink:hover { text-decoration: underline; }
a.btn { text-decoration: none; }
button.tlink { border: 0; background: none; font: inherit; cursor: pointer; padding: 0; text-align: left; } .tlink.strong { font-weight: 600; } td.tlink { cursor: pointer; } td.tlink:hover { text-decoration: underline; }
.listbtn { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font: inherit; color: var(--ink); cursor: pointer; padding: 10px 12px; min-height: 44px; } .listbtn:first-child { border-top: 0; } .listbtn:hover { background: var(--surface-2); }
.iconbtn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .iconbtn.pri:hover { filter: brightness(1.08); background: var(--accent); color: var(--accent-ink); }
.iconbtn.is-hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); } .iconbtn.is-active { transform: translateY(1px); background: var(--accent-line); } .iconbtn.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.iconbtn:disabled { opacity: .45; cursor: not-allowed; }
.swt.is-hover { filter: brightness(.95); } .swt.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox].is-focus, input[type=radio].is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.tabs button:disabled { opacity: .45; cursor: not-allowed; } .tabs button.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
button.who { border: 0; cursor: pointer; font: inherit; font-size: 10px; font-weight: 700; padding: 0; }

.iconbtn.dng { color: var(--bad); } .iconbtn.dng:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }
.exp.open { background: var(--surface-2); }

/* FILE DROP: one component for drag-and-drop and click-to-choose. States: default, hover, focus, drag-over, disabled, error. */
.drop { position: relative; margin: 12px 16px; padding: 22px; border: 1.5px dashed var(--line-2); border-radius: var(--r-tile); text-align: center; color: var(--ink-2); cursor: pointer; background: var(--bg); transition: border-color .12s, background .12s; }
.drop:hover, .drop.is-hover { border-color: var(--accent); color: var(--accent); }
.drop:focus-visible, .drop.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop.on, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop.is-disabled, .drop[aria-disabled="true"] { cursor: not-allowed; opacity: .55; border-style: dotted; }
.drop.is-error { border-color: var(--bad); color: var(--bad); }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.frows { margin: 0 16px 12px; display: grid; gap: 6px; }
.frow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); }
.frow .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .frow .fp { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 4px; } .frow .fp i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .9s ease; }
.frow.bad { border-color: var(--bad); } .frow.bad .fs { color: var(--bad); }
.frow .thumbimg { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; }
@media (max-width: 520px) { .frow { grid-template-columns: auto minmax(0, 1fr) auto; } .frow .fs { grid-column: 2 / -1; } }

/* PROCESSING: indicators that keep moving so nobody wonders if the page froze. Slower (not stopped) when the system asks for reduced motion. */
.spinner, .i.spin { animation: spin .8s linear infinite; }
.spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); flex: none; vertical-align: middle; }
.spinner.sm { width: 12px; height: 12px; border-width: 2px; } .spinner.lg { width: 32px; height: 32px; border-width: 3px; }
.pbar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; } .pbar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width .4s ease; }
.pbar.ind i { width: 35%; animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.working { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .spinner, .i.spin, .btn.loading::after, .gen .dots { animation-duration: 2.4s; } .pbar.ind i { animation-duration: 3s; } .skeleton { animation-duration: 3s; } }

/* DRILL-DOWN AND BREAKDOWN: tree table (caret rows, totals, variance pills), nested transaction box, charts. */
:root { --viz-1: #3b82f6; --viz-2: #e0b81b; --viz-3: #e03c4f; --viz-4: #2fb86c; --viz-grid: #e4e4ea; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --viz-1: #6ea0ff; --viz-2: #f0cb3c; --viz-3: #ff6b7a; --viz-4: #4fd38a; --viz-grid: #2b2f42; } }
:root[data-theme="dark"] { --viz-1: #6ea0ff; --viz-2: #f0cb3c; --viz-3: #ff6b7a; --viz-4: #4fd38a; --viz-grid: #2b2f42; }
table.tree td:first-child { white-space: nowrap; } table.tree tr[hidden] { display: none; }
table.tree tr.open > td:first-child .car svg { transform: rotate(90deg); }
table.tree tr.d1 td:first-child { padding-left: 18px; } table.tree tr.d2 td:first-child { padding-left: 38px; } table.tree tr.d3 td:first-child { padding-left: 58px; }
table.tree tr.d3 { background: var(--surface-2); } table.tree tr.d3:nth-of-type(even) { background: var(--bg); }
table.tree tr.tot td { font-weight: 700; border-top: 1.5px solid var(--ink); }
table.tree tr[data-vtx] { cursor: pointer; } table.tree tr[data-vtx]:hover td { background: var(--accent-soft); }
.vp { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; margin-left: 6px; border: 1px solid; }
.vp.good { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.vp.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.nested { margin: 6px 0; padding: 8px; border: 1.5px solid var(--accent); border-radius: var(--r-tile); background: var(--bg); }
.chart { position: relative; } .chart svg { width: 100%; height: auto; display: block; } .chart .ct { position: absolute; pointer-events: none; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-ctl); box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; min-width: 170px; z-index: 5; }
.chart .ct b { display: block; margin-bottom: 4px; } .chart .ct div { display: flex; justify-content: space-between; gap: 14px; } .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin: 4px 0; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

table.tree tr.d0 td:first-child { font-weight: 600; }

/* ACTION ROWS: any group of buttons sits in .foot (end-aligned, dialogs and panels) or .btnrow (inline). Both space their children; nothing relies on stray text spaces. */
.foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; margin-top: 12px; } .foot.start { justify-content: flex-start; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.app.has-help { padding-bottom: 64px; }
.btnrow.inline { display: inline-flex; }

/* GROUP TO ITEM: a summary row opens into its exact items; every level can be decided (approve, change, exclude). */
table.grp td:first-child { white-space: nowrap; }
table.grp tr.ghd td { background: var(--bg); font-weight: 500; } table.grp tr.ghd.open > td:first-child .car svg { transform: rotate(90deg); }
table.grp tr.itm td { background: var(--surface-2); } table.grp tr.itm td:first-child { padding-left: 66px; } table.grp tr[hidden] { display: none; }
table.grp tr.itm.is-off td { color: var(--ink-3); text-decoration: line-through; } table.grp tr.itm.is-done td, table.grp tr.ghd.is-done td { color: var(--ink-2); }
table.grp .gsum { color: var(--ink-3); font-size: 12px; font-weight: 400; }

.btnrow.nowrap { flex-wrap: nowrap; } table.grp td:last-child { min-width: 210px; }

.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); vertical-align: middle; }

table.grp .car[data-tip]:hover::before { left: 0; transform: none; }
table.grp .moreRow td { background: var(--surface-2); }

/* EXPANDER (one component for every caret: tree rows, group rows, nested rows). White, bordered, same size everywhere; .car-sp keeps rows without children aligned. */
.car { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); color: var(--ink-2); cursor: pointer; vertical-align: middle; }
.car:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.car svg { width: 10px; height: 10px; transition: transform .12s; }
.car-sp { display: inline-block; width: 22px; height: 22px; margin-right: 6px; vertical-align: middle; }
table.grp tr.ghd.open > td:first-child .car svg, table.tree tr.open > td:first-child .car svg { transform: rotate(90deg); }

/* POPOVERS and PICKERS: select menu, date picker, assignee menu, badge popovers. One look. */
.pop { position: fixed; z-index: 120; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-tile); box-shadow: var(--shadow); padding: 6px; min-width: 170px; max-width: 320px; max-height: 320px; overflow: auto; display: grid; gap: 1px; }
.pop .pi { display: flex; gap: 8px; align-items: center; text-align: left; border: 0; background: var(--bg); font: inherit; color: var(--ink); padding: 7px 10px; border-radius: var(--r-ctl); cursor: pointer; width: 100%; }
.pop .pi:hover { background: var(--accent-soft); } .pop .pi.on { color: var(--accent); font-weight: 600; background: var(--accent-soft); } .pop .pi.dng { color: var(--bad); } .pop .pi:disabled { color: var(--ink-3); cursor: not-allowed; background: var(--bg); }
.pop.cal { width: 268px; padding: 10px; } .calh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .calg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.calday { border: 1px solid transparent; background: var(--bg); border-radius: var(--r-ctl); padding: 5px 0; font: inherit; color: var(--ink); cursor: pointer; } .calday:hover { background: var(--accent-soft); border-color: var(--accent-line); } .calday.on { background: var(--accent); color: var(--accent-ink); }
[aria-disabled="true"] { opacity: .45; cursor: not-allowed; } [aria-current="page"] { cursor: default; }

/* PAGER: every list shows 25 rows first; rows per page 25, 50, 100, 200, 400 or All; remembered. Breakdown groups show 5 first; 5, 10, 50, 100 or All. */
.pager { display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--line); }
.pager[hidden] { display: none; } .pager .pinfo { color: var(--ink-2); font-size: 12px; } .pager .pnav .btn { min-width: 28px; justify-content: center; padding: 0 8px; }
.pager .btn[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; cursor: default; }
.pager .pgap { color: var(--ink-3); padding: 0 2px; }
.tfound { padding: 8px 16px; text-align: right; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); }
.tfound[hidden] { display: none; }
.limitrow { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; color: var(--ink-2); font-size: 12px; }

tr.done-r .ract { pointer-events: none; } .listwrap { display: block; }

/* ROW ALIGNMENT: checkbox, expander and label share one vertical centre in every row. */
td input[type=checkbox], td input[type=radio], th input[type=checkbox] { margin: 0 6px 0 0; vertical-align: middle; }
td .car, td .car-sp, td .mk, td .vp, td .mini { vertical-align: middle; }
table.tree td:first-child, table.grp td:first-child { line-height: 22px; }

td.hl { background: color-mix(in srgb, var(--warn) 22%, var(--bg)); }

.in-edit { min-height: 28px; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--bg); } .in-edit:hover { border-color: var(--ink-3); } .in-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.phone { width: min(300px, calc(100% - 32px)); margin: 0 auto 16px; border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--bg); } .phone .listbtn { border-top: 1px solid var(--line); }

/* NOTIFICATIONS: success fades after 4s (8s with Undo); delete shows a bin; warning; error stays until dismissed; busy shows a spinner until the result replaces it. */
.toast { display: none; align-items: center; gap: 8px; max-width: min(520px, calc(100% - 24px)); } .toast.show { display: flex; flex-wrap: wrap; }
.toast .ti { flex: none; width: 16px; height: 16px; } .toast.t-ok .ti { color: #4fd38a; } .toast.t-del .ti { color: #ffb4c0; } .toast.t-warn .ti { color: #f0cb3c; } .toast.t-err .ti { color: #ff8a9b; } .toast.t-busy .ti { color: #b8b0ff; }
.toast.t-err { background: #8c1d3a; color: #fff; } 
.toast .toast-x { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; } .toast .toast-undo { border-color: rgba(255,255,255,.5); background: transparent; }

/* SELECTED STATE KEEPS ITS OWN COLOURS ON HOVER / FOCUS / PRESS: a state change may tint a control, never change the text colour without changing the background to match (text and background always come in pairs). */
.tabs button.on, .tabs button.on:hover, .tabs button.on:active, .tabs button.on:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs button.on:hover { filter: brightness(1.08); }
/* TAB RULE (owner, 11 Nov 2026: "the parent tab stays dark and the child tabs are light, so the tree is easy to understand"). The selected PARENT tab is the dark filled one (rule above).
   Where a tab row sits under another, the selected CHILD tab uses the quiet light look the Rules tabs use (--accent-soft fill, accent text, a 1 px --accent outline); a THIRD level is quieter still (no fill, accent text, an accent
   line under it). Never two levels in the same filled colour. ONE shared part: a row marked .tabs-child / .tabs-grand, and the Workflows / Firm profile sub-tab row (.wf-sub). */
.tabs.tabs-child button.on, .tabs.tabs-child button.on:hover, .tabs.tabs-child button.on:active, .tabs.tabs-child button.on:focus-visible, .tabs.tabs-child .tablink.on, .tabs.tabs-child .tablink.on:hover,
.wf-sub .tabs button.on, .wf-sub .tabs button.on:hover, .wf-sub .tabs button.on:active, .wf-sub .tabs button.on:focus-visible { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tabs.tabs-child button.on:hover, .wf-sub .tabs button.on:hover { filter: none; }
.tabs.tabs-grand button.on, .tabs.tabs-grand button.on:hover, .tabs.tabs-grand button.on:active, .tabs.tabs-grand button.on:focus-visible, .tabs.tabs-grand .tablink.on { background: transparent; border-color: transparent; color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; filter: none; }
.pnav button.on:hover { background: var(--surface-lav); color: var(--accent); }
.mods button.on:hover { color: var(--accent); border-color: var(--accent); }
.mini.on:hover, .btn.pri:hover, .btn.dng:hover { color: inherit; }
.btn.pri:hover, .btn.pri:active { color: var(--accent-ink); } .btn.dng:hover, .btn.dng:active { color: #fff; }
.mini.on:hover { color: var(--accent); background: var(--accent-soft); }

/* CONTRAST FIXES (contrast-audit): text and background always come in readable pairs in every state and theme. */
.date { color: var(--ink-2); } .date.over { color: var(--bad); }
.who.on { background: #12804f; }
.btn.dng, .btn.dng:hover, .btn.dng:active, .btn.dng.is-hover, .btn.dng.is-active { background: var(--bad-btn); border-color: var(--bad-btn); color: #fff; }
.btn:active, .btn.is-active, .btn.ter:active, .btn.ter.is-active, .iconbtn:active, .iconbtn.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn.pri:active, .btn.pri.is-active { background: var(--accent); color: var(--accent-ink); }
.btn.dng:active { background: var(--bad-btn); color: #fff; }

/* D169 (11 Nov 2026, "Readable text and reachable boxes"): a control that cannot act is never a pale fill. A disabled button is the outlined secondary in the readable ink (--ink-3, 5.3:1 and up),
   a disabled filled main button (pri, dng) is that same outline, never the accent at low opacity; its reason is its tip (D14). */
.btn:disabled, .btn[aria-disabled="true"] { opacity: 1; cursor: not-allowed; background: var(--surface-2); border-color: var(--line); color: var(--ink-3); filter: none; transform: none; }
.btn.pri:disabled, .btn.pri[aria-disabled="true"], .btn.dng:disabled, .btn.dng[aria-disabled="true"],
.btn.pri:disabled:hover, .btn.pri[aria-disabled="true"]:hover, .btn.dng:disabled:hover, .btn.dng[aria-disabled="true"]:hover,
.btn.pri:disabled:active, .btn.pri[aria-disabled="true"]:active, .btn.dng:disabled:active, .btn.dng[aria-disabled="true"]:active { opacity: 1; cursor: not-allowed; background: var(--surface); border-color: var(--line-2); color: var(--ink-3); font-weight: 500; filter: none; transform: none; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app.brand { --accent: #4fd1b0; --accent-soft: #12332c; --accent-ink: #06231c; --accent-line: #2c6b5b; } }
:root[data-theme="dark"] .app.brand { --accent: #4fd1b0; --accent-soft: #12332c; --accent-ink: #06231c; --accent-line: #2c6b5b; }
.brandbar { color: var(--accent-ink); } .brandbar .mini, .brandbar .who { color: var(--accent-ink); border-color: var(--accent-ink); }
.brandbar .who.on { background: transparent; }

/* DATE RANGE: always shows explicit From and To dates. Month and quarter presets. */
.sel2-range { }
.pop.rng { max-width: min(560px, calc(100vw - 16px)); width: 540px; padding: 10px; } .rngb { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; } .rngl { display: grid; gap: 1px; align-content: start; border-right: 1px solid var(--line); padding-right: 8px; }
.rngf { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; } .rngm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; }
@media (max-width: 520px) { .rngb { grid-template-columns: 1fr; } .rngl { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; grid-template-columns: 1fr 1fr; } }

.rngf .in { width: 150px; }

/* DATE LABELS: every date control says what it is. */
.dl { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 5px 0 2px; } .date.over .dl { color: var(--bad); } .sel2-range .dl { color: var(--accent); }

/* GUIDED TOUR: a small card, top right, walks the demo flow; the current screen gets an outline. */

/* TAGS: chips, count badge, tag popover and filter. Six colours (fill and text always a readable pair). */
.tchip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 99px; border: 1px solid transparent; margin-left: 6px; vertical-align: middle; }
.tchip.t0 { background: #e7f0ff; color: #1d4aa8; } .tchip.t1 { background: #fdeede; color: #8a4a06; } .tchip.t2 { background: #e5f6ec; color: #17683d; } .tchip.t3 { background: #f1e8ff; color: #5b2fb0; } .tchip.t4 { background: #fff3c4; color: #6b5200; } .tchip.t5, .tchip.t9 { background: #eceef3; color: #3f4658; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tchip.t0 { background: #1b2c52; color: #a9c4ff; } :root:not([data-theme="light"]) .tchip.t1 { background: #4a2e12; color: #ffd0a0; } :root:not([data-theme="light"]) .tchip.t2 { background: #14382a; color: #9be0bb; } :root:not([data-theme="light"]) .tchip.t3 { background: #33224f; color: #d2b8ff; } :root:not([data-theme="light"]) .tchip.t4 { background: #473a0a; color: #f5dc7a; } :root:not([data-theme="light"]) .tchip.t5, :root:not([data-theme="light"]) .tchip.t9 { background: #2a2f3d; color: #c5cadb; } }
:root[data-theme="dark"] .tchip.t0 { background: #1b2c52; color: #a9c4ff; } :root[data-theme="dark"] .tchip.t1 { background: #4a2e12; color: #ffd0a0; } :root[data-theme="dark"] .tchip.t2 { background: #14382a; color: #9be0bb; } :root[data-theme="dark"] .tchip.t3 { background: #33224f; color: #d2b8ff; } :root[data-theme="dark"] .tchip.t4 { background: #473a0a; color: #f5dc7a; } :root[data-theme="dark"] .tchip.t5, :root[data-theme="dark"] .tchip.t9 { background: #2a2f3d; color: #c5cadb; }
.tagchips { white-space: nowrap; } .tcount { font-weight: 600; }
.pop.tagpop { width: 260px; } .pop.tagpop > input { width: 100%; margin-bottom: 4px; } .taglist { display: grid; gap: 1px; max-height: 220px; overflow: auto; }
.sel.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.pop.rng { max-height: none; overflow: visible; }
/* 07-54 / 08-32: portal tabs show the selected tab with an accent underline; list rows push count and chevron to the far right */
.brand .pnav { gap: 2px; padding: 0 16px; }
.brand .pnav button { border-radius: 0; padding: 12px 12px 10px; border-bottom: 2px solid transparent; }
.brand .pnav button.on, .brand .pnav button.on:hover { background: none; color: var(--accent); border-bottom-color: var(--accent); }
.listbtn > .title { flex: 1; min-width: 0; }

/* 09-39..09-54: Questions for Us list rows and message blocks */
.qrow.qc { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.qmsg { margin-bottom: 10px; overflow-wrap: anywhere; } .qmsg > div { margin-top: 2px; }

/* client list: clickable rows, name + subtitle, Kanban board, hidden columns */
.cl[data-client]:not(.h) { cursor: pointer; } .cl[data-client]:not(.h):hover { background: var(--surface-2); }
.cname { display: flex; flex-direction: column; min-width: 0; } .cname .cap { margin: 0; }
.board { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 10px; padding: 12px; overflow-x: auto; border-top: 1px solid var(--line); }
.kcol { background: var(--surface-2); border-radius: var(--r-tile); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; } .kcol > b { padding: 2px 4px; }
.kcard { text-align: left; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; } .kcard:hover { border-color: var(--accent); }
.hc-Close [data-l="Close"], .hc-Tasks [data-l="Tasks"], .hc-Portal [data-l="Portal"], .hc-Preparer [data-l="Preparer"], .hc-Reviewer [data-l="Reviewer"], .hc-Report [data-l="Report"] { display: none; }


/* Rule builder (22-48, 23-21): real field selects, condition rows, then-set rows */
.rb { width: min(640px, 94%); max-height: 92%; overflow: hidden; padding: 0; display: flex; flex-direction: column; } .rb > h4 { padding: 16px 20px 0; margin: 0 0 8px; } .rb-body { overflow: auto; padding: 0 20px 8px; flex: 1; min-height: 0; } .rb > .foot { margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); }
.rb-sec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; } .rb-sec:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.rb .req { color: var(--bad); }
.rb-row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1.3fr) 28px; gap: 8px; align-items: start; margin: 8px 0; }
.rb-row.set { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr) 28px; align-items: center; }
.rb-row .rsel, .rb-row .in { width: 100%; box-sizing: border-box; min-height: 32px; }
.rsel { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.rsel:hover { border-color: var(--ink-3); } .rsel:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.rsel > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rsel i { font-size: 11px; color: var(--ink-3); margin-left: auto; padding-left: 8px; white-space: nowrap; }
.rsel.bad, .in.bad { border-color: var(--bad); }
.rb-err { color: var(--bad); font-size: 12px; margin-top: 4px; }
.rb-if { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.rb-if .rsel { width: 110px; }
.rb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.rb-to { color: var(--ink-2); }
.pop .rb-search { width: calc(100% - 16px); margin: 4px 8px; }
@media (max-width: 560px) { .rb-row, .rb-row.set { grid-template-columns: minmax(0, 1fr) 28px; } .rb-row > :nth-child(1), .rb-row > :nth-child(2), .rb-row > :nth-child(3) { grid-column: 1; } .rb-row > :nth-child(4) { grid-column: 2; grid-row: 1; } .rb-row.set > .rb-to { display: none; } .rb-row.set > :nth-child(3) { grid-column: 1; } .rb-row.set > :nth-child(4) { grid-column: 2; grid-row: 1; } }


.rb-row .iconbtn { margin-top: 2px; } .rb-row.set .iconbtn { margin-top: 0; }

.app.tall { min-height: 800px; }

.rsel[data-fs] { width: auto; min-width: 150px; max-width: 100%; display: inline-flex; }

/* Rules group: a header per rule (22-21) */
.rulehd { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface-2); border-top: 1px solid var(--line); flex-wrap: wrap; }

td.nw { white-space: nowrap; }

/* Add accrual dialog (29-33, 29-49) */
.modal.acc { width: min(1000px, 96%); max-height: 92%; display: flex; flex-direction: column; overflow: hidden; padding: 0; } .modal.acc > h4 { padding: 16px 20px 0; margin: 0 0 8px; } .acc-body { overflow: auto; padding: 0 20px 8px; flex: 1; min-height: 0; } .modal.acc > .foot { margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); }
.acc-set { background: var(--surface-2); border-radius: var(--r-tile); padding: 12px 14px; margin-top: 12px; } .acc-set .rsel[data-fs]:not([data-fs-tag]) { width: 100%; }
.acc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 10px; align-items: start; } .acc-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acc-grid .rsel, .acc-grid .in { width: 100%; box-sizing: border-box; min-height: 32px; } .acc-grid .rsel[data-fs] { width: 100%; }
.acc-sched { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); } .acc-sched thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.rsel:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 700px) { .acc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acc-grid.two { grid-template-columns: 1fr; } }


.rsel.md { width: 220px; max-width: 100%; display: inline-flex; } .rsel .i { flex: none; }
.pop .pgh { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 6px 10px 2px; }

#m-conf { z-index: 110; }

.fulltip { position: fixed; z-index: 130; max-width: min(320px, 86vw); background: var(--ink); color: var(--bg); padding: 8px 10px; border-radius: var(--r-ctl); font-size: 12px; line-height: 1.4; box-shadow: var(--shadow); pointer-events: none; overflow-wrap: anywhere; }
[data-full]:hover, [data-full]:focus-visible { outline: 1px dashed var(--line-2); outline-offset: 2px; }

.qrow:not(.qc) > .mini:last-child::after { content: ''; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid var(--ink-3); border-top: 1.5px solid var(--ink-3); transform: rotate(45deg); margin-left: 10px; }

.docbar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); margin-bottom: 8px; background: var(--surface-2); }

#clPL tr.sec td { background: var(--surface-2); } #clPL tr.tot td { border-top: 1.5px solid var(--ink-3); } #clPL tr.plk td { background: var(--surface-2); color: var(--ink-2); }
#clPL th:not(:first-child) { text-align: right; }

.unc-n { color: var(--warn); } .rsel[data-vsel] { display: flex; width: 260px; max-width: 100%; margin-top: 6px; }

.bfdet > td { background: var(--surface-lav); padding: 10px 14px; } .bfdet .aipanel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 10px 14px; line-height: 1.6; } .bfdet .t { background: var(--bg); } td.bfx { width: 34px; padding-right: 0; }

.warnt { color: var(--warn); }

.modal.vf { width: min(560px, 96%); max-height: 92%; overflow: auto; } .vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; } @media (max-width: 520px) { .vgrid { grid-template-columns: 1fr; } }

/* bank account tiles (21-03) */
.atiles { display: flex; gap: 12px; flex-wrap: wrap; padding: 4px 16px 10px; }
.atile { display: flex; align-items: center; gap: 8px; min-width: 170px; justify-content: space-between; text-align: left; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 8px 12px; cursor: pointer; flex-wrap: wrap; }
.atile .atn { font-weight: 600; flex: 1 1 100%; } .atile .num { margin-right: auto; } .atile:hover { border-color: var(--ink-3); }
.atile.on, .atile.on:hover { border-color: var(--accent); background: var(--surface-lav); box-shadow: 0 0 0 1px var(--accent); }
.atile .iconbtn { margin-left: auto; order: 2; } .atile .num { order: 1; }

.rowtools { display: inline-flex; gap: 4px; margin-left: 10px; vertical-align: middle; opacity: 0; transition: opacity .12s; } tr:hover .rowtools, .rowtools:focus-within, .rowtools .iconbtn.on { opacity: 1; } .rowtools .iconbtn.on { color: #e9a400; } @media (hover: none) { .rowtools { opacity: 1; } }

/* Reminders: bell, panel, items, task-row pill */
.bellbtn { position: relative; } .bellbtn .bubble { position: absolute; top: -7px; right: -7px; } .bubble.hot { background: var(--bad-btn); color: #fff; }
.pop.bellpop { width: min(400px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow: auto; padding: 10px; }
.rmh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .rmh b { flex: 1; }
.rmi { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; padding: 10px 4px; border-top: 1px solid var(--line); align-items: start; }
.rmi .rmt { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; } .rmi .cap { margin: 0; }
.rmi .rma { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rmi.is-due { background: var(--bad-soft, transparent); } .rmi.is-seen .rmt b { font-weight: 500; color: var(--ink-2); }
.rmx { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 0 0; }
.rpill { gap: 4px; } .rpill.hot { color: var(--bad); border-color: var(--bad); }
.pop .rmrow { display: flex; align-items: center; gap: 8px; padding: 4px 6px; } .pop .rmrow > span { flex: 1; }
@media (max-width: 560px) { .pop.bellpop { left: 8px !important; right: 8px; width: auto; } }

.plg { }
#m-final { z-index: 112; }
.bellbtn .bubble { top: 0; right: 0; min-width: 14px; height: 14px; line-height: 14px; font-size: 10px; padding: 0 3px; }
.mods .bubble { margin-left: 6px; } .mods button .bubble.hot { background: var(--bad-btn); color: #fff; }

/* Reminders wave 1+2: row bells, flash, held state */
.rowtools .rpill { opacity: 1; } .rowtools:has(.rpill) { opacity: 1; }
@keyframes rmflash { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
.rm-flash { animation: rmflash 1.6s ease-out 1; } @media (prefers-reduced-motion: reduce) { .rm-flash { animation: none; outline: 2px solid var(--accent); } }
.rmi.is-held { opacity: .8; }
#rmFilters { gap: 8px; flex-wrap: wrap; } tr.rmgrp td { background: var(--surface-2); }


/* Rich text editor component (03-57): [data-rte] gets a toolbar above .rte-body */
.rtb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-ctl) var(--r-ctl) 0 0; background: var(--surface-2); }
.rtb .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.rtb .iconbtn.on, .rtb .iconbtn.on:hover { background: var(--surface-lav); color: var(--accent); border-color: var(--accent); }
.rtb .tx { font-weight: 700; min-width: 24px; justify-content: center; } .rtb .tx.i { font-style: italic; font-weight: 500; } .rtb .tx.u { text-decoration: underline; font-weight: 500; } .rtb .tx.s { text-decoration: line-through; font-weight: 500; }
[data-rte] .rte-body { border-top-left-radius: 0; border-top-right-radius: 0; min-height: 140px; } [data-rte] .rte-body img { max-width: 100%; }
.pop .swatches { display: grid; grid-template-columns: repeat(4, 24px); gap: 6px; padding: 6px; } .pop .swatch { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-2); padding: 0; cursor: pointer; }
.pop .emojis { display: grid; grid-template-columns: repeat(6, 32px); gap: 4px; padding: 6px; } .pop .emojis button { font-size: 18px; min-height: 32px; background: none; border: 0; cursor: pointer; border-radius: 6px; } .pop .emojis button:hover { background: var(--surface-2); }
.pop .linkbox { display: flex; gap: 6px; padding: 6px; align-items: center; } .pop .linkbox .in { min-width: 200px; }


.pdft { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--line); margin: 6px 16px 0; border-radius: var(--r-ctl) var(--r-ctl) 0 0; background: var(--surface-2); } .pdft .sp { flex: 1; } .pg-dark { filter: invert(1) hue-rotate(180deg); } .pg-sepia { filter: sepia(.55); }

/* Client financials: breakdowns */
[data-kpi], [data-mrow] { cursor: pointer; } [data-kpi]:hover, [data-mrow]:hover { border-color: var(--accent); } [data-kpi]:focus-visible, [data-mrow]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dnbox { display: grid; gap: 6px; justify-items: center; } .dnbox svg { width: 170px; height: 170px; } .dnbox .dn-s { cursor: pointer; transition: stroke-width .12s; } .dnbox .dn-s:hover, .dnbox .dn-s:focus-visible { stroke-width: 19; outline: none; }
.dnbox .dn-leg { display: grid; gap: 2px; width: 100%; } .dn-leg .lnk { justify-content: flex-start; gap: 8px; text-align: left; } .dn-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
#clBS tr.sec td, #clPL tr.sec td { background: var(--surface-2); } #clBS tr.tot td { border-top: 1.5px solid var(--ink-3); } #clBS tr.plk td, #clPL tr.plk td { background: var(--surface-2); color: var(--ink-2); } #clBS th:not(:first-child) { text-align: right; }
#cvtTable tfoot td { border-top: 1.5px solid var(--ink-3); font-weight: 600; } #cvtTable th.num, #cvtTable td.num { text-align: right; }

.dnbox svg text { pointer-events: none; }

[data-recd], [data-recb] { cursor: pointer; } [data-recd]:hover { outline: 1.5px solid var(--accent); outline-offset: 1px; } [data-recb]:hover { text-decoration: underline; } [data-recd]:focus-visible, [data-recb]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

[data-sumc], [data-sumt] { cursor: pointer; } [data-sumc]:hover { border-color: var(--accent); } [data-sumt]:hover { text-decoration: underline; } [data-sumc]:focus-visible, [data-sumt]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

[data-fx] { cursor: pointer; } [data-fx]:hover { text-decoration: underline; } [data-fx]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

[data-frv] { cursor: pointer; } [data-frv]:hover { text-decoration: underline; } [data-frv]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- CLIENT PORTAL round 2 (29 Oct 2026, nd-portal-mock): portal variants, prefix pt-. Added only; no earlier rule changed. ---- */
.pt-addr { font-size: 12px; font-weight: 500; }
.pt-s { display: none; }
@container spec (max-width: 700px) { .pt-l { display: none; } .pt-s { display: inline; } .brand .pnav.pt-nav { flex-wrap: nowrap; overflow: visible; } .brand .pnav.pt-nav button { padding: 12px 7px 10px; } }
@media (max-width: 520px), (pointer: coarse) { .pnav button { min-height: 44px; } }
.pt-wrap { max-width: 640px; margin: 0 auto; padding: 14px 16px 18px; display: grid; gap: 12px; }
.pt-title { font-size: 18px; font-weight: 700; margin: 0; line-height: 1.3; color: var(--ink); }
.pt-lead { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.pt-paper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; display: grid; gap: 10px; min-width: 0; }
.pt-phead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pt-phead > b { flex: 1; min-width: 0; font-size: 14px; }
.pt-fact, .pt-attn, .pt-ok, .pt-warn { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 10px; border-radius: var(--r-ctl); font-size: 12px; line-height: 1.4; background: var(--surface-2); color: var(--ink-2); }
.pt-attn { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pt-ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.pt-warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.pt-line-box { display: flex; width: 100%; box-sizing: border-box; padding: 8px 12px; }
.pt-list { display: grid; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; background: var(--bg); }
.pt-month { padding: 8px 12px 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); }
.pt-month + .pt-item > .listbtn, .pt-list > .pt-item:first-child > .listbtn { border-top: 0; }
.listbtn.pt-line { align-items: flex-start; }
.pt-what { flex: 1; min-width: 0; display: grid; gap: 2px; } .pt-what small { color: var(--ink-2); font-size: 12px; line-height: 1.4; }
.pt-item.is-open > .listbtn { background: var(--accent-soft); }
.pt-item.is-done > .listbtn .pt-what > b { color: var(--ink-2); font-weight: 500; }
.pt-item.is-passed > .listbtn { color: var(--ink-2); }
.pt-card { padding: 12px; display: grid; gap: 10px; border-top: 1px solid var(--line); background: var(--bg); }
.pt-card[hidden], .pt-sub[hidden], .pt-step[hidden], .pt-thread[hidden] { display: none; }
.pt-q { font-size: 15px; font-weight: 600; margin: 0; line-height: 1.4; color: var(--ink); }
.pt-meta { font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.pt-chip { min-height: 44px; height: auto; padding: 6px 14px; white-space: normal; text-align: left; line-height: 1.3; }
.btn.pt-chip.on, .btn.pt-chip.on:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.btn.pt-chip.usual { border-color: var(--accent-line); }
.pt-tag { font-size: 11px; font-weight: 600; color: var(--accent); }
.pt-row2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .pt-row2 > .sp { flex: 1; }
.pt-sub { display: grid; gap: 8px; padding: 10px 0 0; border-top: 1px dashed var(--line); }
.pt-step { display: grid; gap: 8px; padding: 10px; border-radius: var(--r-ctl); background: var(--surface-2); }
label.btn.pt-pick { position: relative; cursor: pointer; min-height: 44px; height: auto; }
.pt-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pt-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pt-file { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface-2); }
.pt-file.is-ok { background: var(--ok-soft); } .pt-file.is-fix { background: var(--warn-soft); } .pt-file.is-busy { background: var(--accent-soft); }
.pt-file > .i, .pt-file > .pt-spin { margin-top: 2px; } .pt-file > div { display: grid; gap: 4px; min-width: 0; }
.pt-file.is-ok b { color: var(--ok); } .pt-file.is-fix b { color: var(--warn); } .pt-file.is-busy b { color: var(--accent); }
.pt-fn { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; } .pt-file p { margin: 0; color: var(--ink); line-height: 1.4; }
.pt-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .pt-spin { animation-duration: 2.4s; } }
.pt-mark { font-size: 12px; font-weight: 600; color: var(--ok); }
.pt-mark.is-off { color: var(--warn); }
.pt-dock { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.pt-prog { display: grid; gap: 4px; flex: 0 1 220px; font-size: 12px; color: var(--ink-2); } .pt-prog progress { width: 100%; height: 8px; accent-color: var(--accent); }
.pt-dock .pt-sent { flex: 1 1 100%; text-align: right; }
.pt-empty { display: grid; gap: 8px; justify-items: start; padding: 18px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.pt-empty .pt-title { font-size: 16px; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start; }
.pt-state > .cap { margin: 0 0 6px; } .pt-state > .cap b { color: var(--ink); }
.pt-thread { display: grid; gap: 10px; }
.pt-msg { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface-2); max-width: 92%; justify-self: start; line-height: 1.45; }
.pt-msg.me { justify-self: end; background: var(--accent-soft); }
.pt-code { font-size: 20px; letter-spacing: .3em; max-width: 220px; text-align: center; }
.pt-field { display: grid; gap: 4px; justify-items: start; } .pt-field > span { font-weight: 600; } .pt-field textarea, .pt-field input:not([type=file]) { width: 100%; box-sizing: border-box; }
.pt-tpl { background: var(--surface-2); border-radius: var(--r-ctl); padding: 10px 12px; line-height: 1.55; margin: 0; }
.pt-var { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 4px; font-weight: 600; }
.pt-cc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 12px; color: var(--ink-2); }
.pt-files { display: grid; gap: 8px; }
.pt-dl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .pt-dl > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pt-mail { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); line-height: 1.5; } .pt-mail p { margin: 0; } .pt-mail ul { margin: 0; padding-left: 18px; }
[class*="pt-"][hidden] { display: none !important; }
.pt-item:not(.is-passed) [data-pt-held] { display: none; }
.pt-item.is-passed .pt-card > :not([data-pt-held]) { display: none; }

/* D82 (owner 29 Oct 2026): account and tax code shown together on every transaction row, and the
   Net / tax / Total split where the accountant decides. One pattern everywhere:
   the account cell keeps the account name, the tax code sits under it as a second line (.txc). */
.txc { display: block; margin-top: 2px; font-size: 12px; line-height: 1.3; font-weight: 400; color: var(--ink-2); white-space: nowrap; }
.btnrow > .txc, .nowrap > .txc { margin-top: 0; align-self: center; }
.txsplit { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.txsplit > span { display: inline-flex; align-items: baseline; gap: 6px; min-height: 28px; padding: 4px 10px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); font-size: 12px; }
.txsplit b { color: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.txsplit-note { color: var(--ink-2); font-size: 12px; margin: 6px 0 0; max-width: 80ch; }
.fromto { display: grid; grid-template-columns: 110px minmax(0, 1fr) 20px minmax(0, 1fr); gap: 8px 10px; align-items: center; margin: 10px 0 0; }
.fromto > .ft-k { color: var(--ink-2); } .fromto > .ft-old { color: var(--ink-2); text-decoration: line-through; overflow-wrap: anywhere; } .fromto > .ft-new { font-weight: 600; overflow-wrap: anywhere; }
.fromto > .ft-old.ft-same { text-decoration: none; } /* D84: 'Not in the books yet' / 'None yet' / the account that stays are not struck through */
.fromto > .ft-new .rsel { width: 100%; } .fromto > .ft-ar { color: var(--ink-2); text-align: center; }
.acc-read { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 560px) { .fromto { grid-template-columns: 1fr; gap: 2px; } .fromto > .ft-ar { display: none; } .fromto > .ft-k { margin-top: 8px; } }
.acc-set .txsplit > span { background: var(--surface); border: 1px solid var(--line); }

/* D88 (owner, 30 Oct 2026): the Close tiles in one row of six that fills the width; 3 per row below 900 px, 2 per row below 560 px (the icon drops). */
.tiles.fit { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tiles.fit .tile { padding: 8px 10px; gap: 8px; min-height: 44px; }
.tiles.fit .tile .ic { width: 26px; height: 26px; flex: none; }
.tiles.fit .tile .ic svg { width: 14px; height: 14px; }
.tiles.fit .tile .t { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band:has(> .tiles.fit) { padding: 8px 16px; }
@container spec (max-width: 900px) { .tiles.fit { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container spec (max-width: 560px) { .tiles.fit { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles.fit .tile .ic { display: none; } .band:has(> .tiles.fit) { padding: 8px; } }

/* D89 (owner, 30 Oct 2026): columns that line up. A reconciliation row and its head share one column grid; dates and amounts sit flush
   right in figures of equal width; each kind of icon has a fixed slot, so a row without one keeps the slot empty. Task and review rows in
   a section get the same slots. Only rows made of these kinds of parts (bell, reminder pill, small pills, due date, owner, status) take the slots; any other row keeps its flex layout. */
@container spec (min-width: 561px) {
  .rec { grid-template-columns: 24px minmax(150px, 1fr) 104px 116px 116px 564px; }
  .rec > :nth-child(3), .rec > :nth-child(4), .rec > :nth-child(5) { grid-column: auto; text-align: right; font-variant-numeric: tabular-nums; font-size: inherit; color: inherit; }
  .rec > :nth-child(3)::before, .rec > :nth-child(4)::before, .rec > :nth-child(5)::before { content: none; }
  .rec .acts:not(:has(> :not(.mini, .date, .who, .sel2, [data-rc-open]))) { display: grid; grid-template-columns: 40px 40px 40px 40px 150px 84px 24px 124px; gap: 4px; justify-content: end; justify-items: end; align-items: center; grid-column: auto; }
  .rec .acts > * { grid-row: 1; }
  .rec .acts > .mini:has(use[href="#i-marker"]) { grid-column: 1; }
  .rec .acts > .mini:has(use[href="#i-tag"]) { grid-column: 2; }
  .rec .acts > .mini:has(use[href="#i-chat"]) { grid-column: 3; }
  .rec .acts > .mini:has(use[href="#i-page"]) { grid-column: 4; }
  .rec .acts > .date { grid-column: 5; white-space: nowrap; }
  .rec .acts > [data-rc-open] { grid-column: 6; }
  .rec .acts > .who { grid-column: 7; }
  .rec .acts > .sel2 { grid-column: 8; width: 100%; }
}
@container spec (min-width: 561px) and (max-width: 900px) {
  .rec { grid-template-columns: 24px minmax(0, 1fr) 100px 112px 112px; }
  .rec .acts { grid-column: 2 / -1; }
}
@container spec (min-width: 700px) {
  .sec .grp > .row > .push:not(:has(> :not([data-remind], .rpill, .mini, .date, .who, .sel2)))
    { display: grid; grid-template-columns: 26px 36px 76px 40px 40px 40px 124px 24px 144px; gap: 4px; justify-items: end; align-items: center; margin-left: auto; }
  .sec .grp > .row > .push > .mini, .sec .grp > .row > .push > .date { white-space: nowrap; }
  .sec .grp > .row > .push > * { grid-row: 1; }
  .sec .grp > .row > .push > [data-remind] { grid-column: 1; }
  .sec .grp > .row > .push > .rpill { grid-column: 2; }
  .sec .grp > .row > .push > .mini:not(:has(svg)), .sec .grp > .row > .push > .mini:has(use[href="#i-list"]), .sec .grp > .row > .push > .mini:has(use[href="#i-pen"]), .sec .grp > .row > .push > .mini:has(use[href="#i-marker"]) { grid-column: 3; }
  .sec .grp > .row > .push > .mini:has(use[href="#i-tag"]) { grid-column: 4; }
  .sec .grp > .row > .push > .mini:has(use[href="#i-chat"]) { grid-column: 5; }
  .sec .grp > .row > .push > .mini:has(use[href="#i-page"]) { grid-column: 6; }
  .sec .grp > .row > .push > .date { grid-column: 7; }
  .sec .grp > .row > .push > .who { grid-column: 8; }
  .sec .grp > .row > .push > .sel2 { grid-column: 9; width: 100%; }
}
/* ---- v95 the shared table kit (D90-D94; kit.js). Existing parts and tokens only; these rules place them. ---- */
/* the heading is the menu button: it reads as the heading it replaces */
table.kit-t th .ppf-h { border: 0; background: none; font: inherit; color: inherit; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-align: left; border-radius: var(--r-ctl); }
table.kit-t th .ppf-h svg { width: 12px; height: 12px; color: var(--ink-3); }
table.kit-t th .ppf-h:hover, table.kit-t th .ppf-h[aria-expanded="true"] { color: var(--accent); }
table.kit-t th .ppf-h:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
table.kit-t th .ppf-h .dot { margin-left: 2px; }
table.kit-t td .ract { flex-wrap: nowrap; white-space: nowrap; }
/* Actions is never cut off: it stays at the right edge of the scroll box */
table.t.kit-act tr > :last-child { position: sticky; right: 0; z-index: 1; box-shadow: inset 1px 0 0 var(--line); }
table.t.kit-act tbody tr:not(.detail-r) > td:last-child { background: var(--surface); }
table.t.kit-act tr.detail-r > td:last-child { position: static; box-shadow: none; }
table.t.kit-act tr.done-r > td:last-child { opacity: 1; } table.t.kit-act tr.done-r > td:last-child > * { opacity: .55; }
/* the conversation badge is a press */
table.kit-t [data-pp-thread], table.kit-t [data-pp-files] { cursor: pointer; }
table.kit-t [data-pp-thread]:focus-visible, table.kit-t [data-pp-files]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mini .dot { width: 7px; height: 7px; }
/* the key under the conversation table */
.pp-key { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; margin: 10px 0 0; max-width: 78ch; }
.pp-key .mini { justify-self: start; } .pp-key .cap { margin: 0; }
/* filter chips above the table, and the menu */
[data-ppf-chips] { flex-wrap: wrap; gap: 6px; } [data-ppf-chips]:empty { display: none; }
[data-ppf-chips] .tchip { margin-left: 0; display: inline-flex; align-items: center; gap: 2px; padding-right: 2px; }
.pop.ppf-pop { width: 280px; max-width: calc(100vw - 16px); max-height: min(520px, calc(100vh - 16px)); }
.pop.ppf-pop .in { width: 100%; box-sizing: border-box; min-height: 32px; }
.pop.ppf-pop .ppf-grp { display: grid; gap: 6px; padding: 2px 8px 6px; }
.pop.ppf-pop .ppf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pop.ppf-pop .ppf-sa { display: flex; gap: 12px; padding: 0 8px; }
.pop.ppf-pop .ppf-vals { display: grid; gap: 1px; max-height: 190px; overflow: auto; }
.pop.ppf-pop .ppf-vals .cap { margin: 0 0 0 auto; }
.pop.ppf-pop > .btn { justify-self: start; margin: 6px 8px 2px; }
.pop.ppf-pop .pi .i { flex: none; }
@media (max-width: 520px), (pointer: coarse) { .pop.ppf-pop .pi { min-height: 44px; } }
/* spreadsheet habits */
table.t.kit-t .ppf-frz { position: sticky; z-index: 1; }
table.t.kit-t td.ppf-frz { background: var(--surface); }
table.t.kit-t th.ppf-frz { z-index: 2; }
table.t.kit-t .ppf-frz-last { box-shadow: inset -1px 0 0 var(--line); }
table.t.kit-t th { position: relative; }
.ppf-grip { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 2; }
.ppf-grip:hover { box-shadow: inset -2px 0 0 var(--accent-line); }
table.t td.ppf-hit { background: var(--accent-soft); } table.t td.ppf-hit-on { outline: 2px solid var(--accent); outline-offset: -2px; }
table.kit-t td[data-ppf-edit] { cursor: text; }
table.kit-t td[data-ppf-edit]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
[data-ppf-find] { align-items: center; gap: 6px; }
/* narrow screens: Actions scrolls with its row; only the date is frozen */
/* round 2: the one-line legend, the note mark and the hover preview */
.pp-key { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; max-width: none; }
.pp-key .cap { margin: 0 10px 0 0; }
.mini .ppn-mark { width: 12px; height: 12px; color: var(--ink-2); }
.pop.ppn-pop { width: 280px; max-width: calc(100vw - 16px); padding: 4px 8px 8px; pointer-events: none; }
.pop.ppn-pop .ppn-text, .pop.ppn-pop .ppn-line { padding: 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pop.ppn-pop .ppn-line { -webkit-line-clamp: 2; }
.pop.ppn-pop .cap { margin: 2px 10px 0; }
.pop.ppn-pop .ppn-hint { margin-top: 8px; }
#ppnBox .lnk { margin-top: 4px; }
[data-pp-asnote] { margin-left: 0; padding-left: 0; }
/* full view: only the table box, filling the window, headings pinned (D92) */
html.ppf-lock { overflow: hidden; }
.kit-box.ppf-full { position: fixed; inset: 0; z-index: 90; margin: 0; display: flex; flex-direction: column; background: var(--surface); }
.kit-box.ppf-full > .ctrls, .kit-box.ppf-full > .gridbar, .kit-box.ppf-full > .pager, .kit-box.ppf-full > .pp-key { flex: none; padding-top: 6px; padding-bottom: 6px; }
.kit-box.ppf-full > .tscroll { flex: 1; min-height: 0; overflow: auto; max-width: none; }
.kit-box.ppf-full table.t thead th { position: sticky; top: 0; z-index: 2; } .kit-box.ppf-full table.t thead th.ppf-frz { z-index: 4; } .kit-box.ppf-full table.t.kit-act thead th:last-child { z-index: 3; }
.app:has(.kit-box.ppf-full) .toast { position: fixed; z-index: 120; }
table.t.kit-t th { position: relative; } table.t.kit-act th:last-child { position: sticky; }
/* narrow screens: Actions scrolls with its row; only the date is frozen */
.kit-box.ppf-narrow table.t.kit-act tr > :last-child, .kit-box.ppf-narrow table.t.kit-act th:last-child { position: static; box-shadow: none; }
.kit-box > .pp-key { margin: 8px 16px 4px; }
/* a row "..." menu opens fixed to the window so a table scroll box never clips it */
.menu.fixed { position: fixed; right: auto; top: auto; z-index: 125; }
/* a heading menu button wraps rather than run into the next heading (narrow columns) */
table.t.kit-t th { white-space: normal; } table.kit-t th .ppf-h { white-space: normal; }
/* grouped bank tables keep the heading label flowing like plain text (their columns sit on a fixed grid) */
table.kit-t[data-bgroup] th .ppf-h { display: inline; }
/* D101: on the Reviewed tab a reviewed line stays solid */
table.t tr.done-r.kit-solid td, table.t.kit-act tr.done-r.kit-solid > td:last-child > * { opacity: 1; }
/* D99 the tile row is the Close navigation: every title and count shows in full at every width; tiles wrap to the next row before
   anything is cut (owner, 30 Oct 2026: "I want ALL tiles visible on all screens always"); the chosen tile uses the selected style of .sel.on */
.tiles.fit.tnav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tiles.fit.tnav .tile .t, .tiles.fit.tnav .tile .s { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
@container spec (max-width: 900px) { .tiles.fit.tnav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
@container spec (max-width: 560px) { .tiles.fit.tnav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tiles.tnav .tile[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tiles.tnav .tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-tile-sec] > .shead { display: none; }

/* v97 */
/* D103: the client answered: a green dot with a soft ring; steady when the computer asks for less motion */
.dot.ok.pulse { animation: okpulse 1.6s ease-out infinite; }
@keyframes okpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 100% { box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .dot.ok.pulse { animation: none; } }
/* D106: OK is the primary on a done line with Undo; Undo is the quiet button beside it */
.toast .toast-ok { margin-left: 2px; }
/* D107: Time logged: the done line sits in the dialog, above its foot; "What I did" fills its cell */
#m-time .toast { position: static; transform: none; margin: 8px 0 0; max-width: none; }
#m-time td .in { display: block; width: 100%; margin-top: 4px; box-sizing: border-box; }
/* D105: Favourites (heart), the list next to My Reminders */
[data-fav-toggle].fav-h { width: 28px; height: 28px; min-height: 28px; padding: 0; margin: 0 4px; vertical-align: middle; }
[data-fav-toggle][aria-pressed="true"] { color: var(--accent); } [data-fav-toggle][aria-pressed="true"] .i { fill: currentColor; }
@media (prefers-reduced-motion: reduce) { [data-fav-toggle] { transition: none; } }
.mods [data-fav-tab] { display: inline-flex; align-items: center; gap: 6px; }
.fav-pop { position: fixed; z-index: 120; width: 340px; max-width: calc(100vw - 16px); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-tile); box-shadow: var(--shadow); padding: 6px; display: grid; gap: 1px; max-height: min(80vh, 560px); overflow: auto; }
.fav-pop .pi { display: flex; gap: 8px; align-items: center; text-align: left; border: 0; background: var(--bg); font: inherit; color: var(--ink); padding: 7px 10px; border-radius: var(--r-ctl); cursor: pointer; width: 100%; } .fav-pop .pi:hover { background: var(--accent-soft); }
.fav-pop .pgh { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 6px 10px 2px; }
.fav-pop .favrow { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: var(--r-ctl); } .fav-pop .favrow.drag { opacity: .5; } .fav-pop .favrow .pi { flex: 1; } .fav-pop .favrow[draggable="true"] { cursor: grab; }
.fav-pop .favsug { flex: 1; padding: 4px 6px; }
/* D104: a statement for an account not in the books */
#stmtPrev .sp-new { display: grid; gap: 6px; margin: 8px 0; } #stmtPrev .sp-warn { display: flex; gap: 8px; align-items: center; background: var(--warn-soft); }
#stmtPrev .sp-form { margin-top: 10px; }

/* ---------- v99 (owner answers 30 Oct 2026, D114-D121) ---------- */
/* D116 the Close's sections as one compact strip: icon, short name, count; the full tile on hover or focus; wraps before anything is cut */
.band.strip-band { padding: 6px 16px; }
.tiles.strip { display: flex; flex-wrap: wrap; gap: 6px; }
.tiles.strip .tile { flex: 1 1 0; min-width: max-content; justify-content: center; gap: 6px; padding: 4px 8px; min-height: 36px; border-radius: var(--r-ctl); }
.tiles.strip .tile .ic { width: 20px; height: 20px; flex: none; } .tiles.strip .tile .ic svg { width: 12px; height: 12px; }
.tiles.strip .tile .tn { font-size: 13px; font-weight: 600; white-space: nowrap; }
.tiles.strip .tile .num { font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tiles.strip .tile .grow { display: none; }
.tiles.strip .tile[aria-selected="true"] .num { color: var(--accent); }
@container spec (max-width: 960px) { .tiles.strip .tile .ic { display: none; } }
@container spec (max-width: 560px) { .tiles.strip .tile { flex: 1 1 calc(25% - 6px); padding: 4px 6px; } }
.pop.tilepop { width: 240px; pointer-events: none; } .pop.tilepop .tile { border: 0; padding: 6px; }
/* D116, D117 the path inside the module-tab row, after Favourites; Previous / Next check at the row's end or beside the title */
.crumb { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--ink-2); flex: none; }
.mods .crumb { padding-left: 18px; border-left: 1px solid var(--line); height: 18px; align-self: center; }
.crumb .cpart { display: inline-flex; align-items: center; gap: 4px; } .crumb .cmore .lnk { font-weight: 600; }
.crumb .lnk { height: auto; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; }
.crumb .lnk:hover { text-decoration: underline; }
.crumb [aria-current="page"] { color: var(--ink); font-weight: 600; }
.crumbnav { margin-left: auto; align-items: center; flex: none; } .mods .crumbnav { align-self: center; }
.crumbnav .cap { margin: 0; white-space: nowrap; }
.crumbnav.intitle { margin-left: 0; }
.crumbline { display: flex; align-items: center; min-height: 30px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
/* D114 the person menu under MK */
.menu.pmenu { position: fixed; right: auto; top: auto; width: 240px; z-index: 125; }
.pmenu .pm-head { display: grid; padding: 6px 10px 4px; } .pmenu .pm-head .cap { margin: 0; }
.pmenu .pm-out { font-weight: 600; }
/* D115 the guide line on pages with no client; the empty client list */
.gline-wrap { padding: 8px 16px 0; }
.opt.gline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border-color: var(--accent-line); margin: 0; cursor: default; }
#clients .app.firm-new > :not(.cl-new):not(.toast):not(.shade) { display: none !important; }
.cl-new { display: grid; gap: 12px; padding: 16px; }
/* D118 the guided reconciliation panel */
.rec > b[role="button"], .rec .cmp { cursor: pointer; } .rec > b[role="button"]:hover { text-decoration: underline; }
#m-recon .toast { position: static; transform: none; margin: 8px 0 0; max-width: none; }
.opt.rcleft { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; cursor: default; }
.opt.rcleft.is-ok { background: var(--ok-soft); border-color: var(--ok); } .opt.rcleft.is-warn { background: var(--warn-soft); }
#rcDiff.rc-bad { color: var(--bad); } #rcDiff.rc-ok { color: var(--ok); }

/* v100c (B6): the guided panels on a phone: steps stacked, the lines table as labelled rows (as .cl and .rec do), no sideways scroll */
@media (max-width: 560px) {
  :is(#m-stmt, #m-askp) .kv { grid-template-columns: minmax(0, 1fr); }
  :is(#m-stmt, #m-askp) .modal { width: calc(100% - 16px); }
  :is(#m-stmt, #m-askp) .rsel { max-width: 100%; white-space: normal; }
  :is(#m-stmt, #m-askp) .opt, :is(#m-stmt, #m-askp) .detail, :is(#m-stmt, #m-askp) .pt-fact { overflow-wrap: anywhere; }
  #m-stmt .t { min-width: 0 !important; } #m-stmt .t thead { display: none; }
  #m-stmt .t, #m-stmt .t tbody, #m-stmt .t tr, #m-stmt .t td { display: block; }
  #m-stmt .t tr { padding: 6px 0; border-bottom: 1px solid var(--line); } #m-stmt .t td { border: 0; padding: 1px 8px; }
  #m-stmt .t td[data-l]::before { content: attr(data-l) "  "; color: var(--ink-3); }
  #m-stmt .t td.money { text-align: left; }  /* v100d: the amount sits next to its label */
}

/* v101 D129 (owner 31A with his change, 31 Oct 2026): Full view is a full-size button at the right end of the table bar; ONE soft glow
   every time a long table (more than 25 rows) comes into view; with the device's reduce-motion setting a still ring shows instead.
   The glow is a box-shadow on its own class, so the keyboard focus ring (:focus-visible outline) is never touched. */
.gridbar > .sp { flex: 1; }  /* Full view sits at the right end of the table bar (card Q31 A; Sheets, Excel, QuickBooks keep it top right) */
@keyframes fv-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); } }
[data-ppf-full][data-fv-glow] { animation: fv-glow 2.4s ease-in-out infinite; }  /* v101e: always on (owner 31 Oct ~20:40 IST) */
@media (prefers-reduced-motion: reduce) { [data-ppf-full][data-fv-glow] { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); } }
/* kit-twinkle (owner 5 Nov 2026, same approach as the Full view glow above, Decisions q31 / D129): an icon that must never be lost twinkles slowly and softly, always. Opacity and tint only, no movement, no layout change. */
@keyframes kit-twinkle { 0%, 100% { opacity: .5; color: color-mix(in srgb, var(--accent) 55%, currentColor); } 50% { opacity: 1; color: var(--accent); } }
.kit-twinkle { display: inline-flex; animation: kit-twinkle 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .kit-twinkle { animation: none; opacity: 1; color: color-mix(in srgb, var(--accent) 75%, currentColor); } }
[data-ppf-full][data-tip]:hover::before, [data-ppf-full][data-tip]:focus-visible::before { left: auto; right: 0; transform: none; }
@media (max-width: 560px) { [data-ppf-full][data-tip]:hover::before, [data-ppf-full][data-tip]:focus-visible::before { white-space: normal; width: 190px; } }
.kit-box.ppf-full [data-ppf-full][data-tip]:hover::before, .kit-box.ppf-full [data-ppf-full][data-tip]:focus-visible::before { bottom: auto; top: calc(100% + 6px); }

/* v101 D130 (owner 38A, 31 Oct 2026): the column menu's values wait for OK; OK and Cancel sit at the foot of the menu */
.ppf-pop .ppf-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 6px 8px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.ppf-pop .ppf-foot .btn.ter { margin-right: auto; }
.ppf-pop .ppf-will { margin: 4px 10px 0; }
.ppf-pop .ppf-msg { margin: 2px 10px 0; }

/* v101 D131 (owner 39A and his rule of 31 Oct 2026): ONE cue for pressable values, the same in every table. A value you can press is in
   the link blue with an underline on point, as the transaction date; a value you cannot press is plain. A value chosen from a list
   (account, role, purpose, who sees it) is that value in the link blue, not a box. Buttons, icons and ticks keep their own look. */
table.t td.acct[data-edit], table.t td[data-fx], table.t td[data-frv], table.t td[data-sumt], table.t td button.lnk, .rec [data-recb], .rec > b[role="button"],
table.tree tr[data-vtx] > td:first-child { color: var(--accent); cursor: pointer; }
table.t td.acct[data-edit]:hover, table.t td[data-fx]:hover, table.t td[data-frv]:hover, table.t td[data-sumt]:hover, table.t td button.lnk:hover, .rec [data-recb]:hover,
table.tree tr[data-vtx]:hover > td:first-child { text-decoration: underline; }
table.t td.acct[data-edit] .txc { display: inline-block; width: 100%; text-decoration: none; }  /* the tax code under the account stays grey and is never underlined */
table.t td.acct[data-edit] .txc { color: var(--ink-2); }
table.t td button.lnk { padding: 0; border-color: transparent; background: none; min-height: 24px; }
table.t td button.lnk:hover { background: none; border-color: transparent; }
table.t td :is(button.rsel, button.sel2, span.sel2:has(> svg):not([aria-readonly="true"])) { border-color: transparent; background: none; padding: 0; min-width: 0; height: auto; min-height: 24px; color: var(--accent); justify-content: flex-start; cursor: pointer; }
table.t td :is(button.rsel, button.sel2, span.sel2) > svg { display: none; }
table.t td :is(button.rsel, button.sel2, span.sel2:has(> svg):not([aria-readonly="true"])):hover { border-color: transparent; text-decoration: underline; }
table.t td :is(button.rsel, button.sel2) > span { color: var(--accent); }
table.t td span.sel2:is([aria-readonly="true"], :not(:has(> svg))) { border-color: transparent; background: none; padding: 0; min-width: 0; height: auto; color: var(--ink); }  /* a value nobody can change here is plain */
@media (max-width: 560px) { table.t td :is(button.rsel, button.sel2, span.sel2:has(> svg):not([aria-readonly="true"])) { min-height: 44px; } }

/* v101c B4 (Fable): a pressable change figure is in the link blue like every pressable value; its direction is its own sign (+ or -) */
table.t td[data-fx] .vp { color: var(--accent); background: none; border-color: transparent; padding: 0; margin-left: 0; font-size: inherit; font-weight: inherit; }
table.t td[data-fx]:hover .vp { text-decoration: underline; }

/* G3 (14 Nov 2026): the transfer panel is the artifact's width (core-design.html #m-xfer: width min(620px, 96%), max-height 92%, scrolls); without it the from -> to
   names broke letter by letter at 1440 px (persona walk H28) */
#m-xfer .modal { width: min(620px, 96%); max-height: 92%; overflow: auto; }

/* v101c D133: the transfer panel on a phone, as #m-stmt and #m-askp (v100c B6): the steps stack, nothing scrolls sideways */
@media (max-width: 560px) { #m-xfer .kv { grid-template-columns: minmax(0, 1fr); } #m-xfer .modal { width: calc(100% - 16px); } #m-xfer .opt, #m-xfer .rcleft { overflow-wrap: anywhere; } }

/* v101d N9: the transfer panel's foot stays in view while its steps scroll (the .pt-dock pattern) */
#m-xfer .modal > .foot { position: sticky; bottom: -18px; z-index: 5; background: var(--surface); border-top: 1px solid var(--line); margin: 12px -18px -18px; padding: 10px 18px; border-radius: 0 0 var(--r-modal) var(--r-modal); }

/* v101f N13: the glow invites into Full view; leaving it needs no invitation, so Exit full view does not glow */
[data-ppf-full][data-fv-glow][aria-pressed="true"] { animation: none; box-shadow: none; }

/* v101g (owner 31 Oct ~21:16 IST; correction to D129): numbers and their heading align right, on every table of the shared kit. The
   heading's sort chevron sits on its left, so the word ends on the same edge as the figures. A money column takes only its content's
   width, in Full view too; the extra width goes to the text columns (Description, Vendor), never to a gap between heading and figures. */
:is(table.kit-t, table.kit-view) th[data-ppf-type="money"], :is(table.kit-t, table.kit-view) td.ppf-num { text-align: right; }
table.kit-t th[data-ppf-type="money"] .ppf-h { flex-direction: row-reverse; text-align: right; }
:is(table.kit-t, table.kit-view) th[data-ppf-type="money"], :is(table.kit-t, table.kit-view) td.ppf-num { width: 1%; white-space: nowrap; }
table.kit-t td.ppf-num { font-variant-numeric: tabular-nums; }
/* v101g: the tick column and date columns also take only their content's width, so the extra width goes to the text columns */
table.kit-t th:has(> input[type="checkbox"]), table.kit-t td:has(> input[type="checkbox"]:only-child), table.kit-t th[data-ppf-type="date"] { width: 1%; white-space: nowrap; } table.kit-t th[data-ppf-type="date"] .ppf-h { white-space: nowrap; }

/* D136 (design v104): a list table that becomes labelled rows on a phone (the Billing list, the Clients pane); each cell names its column */
table.t.t-stack { min-width: 560px; }
@container spec (max-width: 560px) { table.t.t-stack { min-width: 0; } table.t.t-stack thead { display: none; } table.t.t-stack tr, table.t.t-stack td { display: block; } table.t.t-stack tr { border-bottom: 1px solid var(--line); padding: 6px 0; } table.t.t-stack td { border: 0; padding: 2px 16px; } table.t.t-stack td[data-l]::before { content: attr(data-l); display: block; color: var(--ink-3); font-size: 12px; } table.t.t-stack td[colspan] { padding: 8px 16px; } }

/* v104b (AD1): the way to pay chosen shows as chosen, with the kit's one chosen look (.theme button[aria-pressed]) */
[data-choice] > button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* v104d (N7): an archived firm with no clients still shows its archived line and Bring it back */
#clients .app.firm-new > #clArch:not([hidden]) { display: flex !important; }
/* v104d (N4): Connect in the client cell's own slot, under the name */
#clients .cname > [data-reconn], #clients .cname > [data-xreq], #clients .cname > [data-xwait] { align-self: flex-start; margin-top: 4px; }

/* D144-D147 (design v105, owner Q47 A, Q48 A, Q49 A, Q50 A, 1 Nov 2026) */
/* the Close tables: one shared table (the kit) with the tick box first, the name as the link, the Status column, the room rule */
table.t.ckt-t { min-width: 0; width: 100%; }
table.ckt-t td, table.ckt-t th { vertical-align: middle; }
table.ckt-t td:is([data-l="Due"], [data-l="Assigned"], [data-l="Status"], [data-l="Reconciled to"], [data-l="Reconciled through"]) { white-space: nowrap; }
table.ckt-t th:first-child, table.ckt-t td.ckt-sel { width: 40px; }
table.ckt-t .ckt-nm { font-weight: 500; } table.ckt-t .ckt-nm.over > span, table.ckt-t .ckt-nm.over > .lnk { color: var(--bad); }
table.ckt-t td.ckt-name { max-width: 420px; min-width: 200px; }
table.ckt-t .ckt-lc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); }
table.ckt-t .ckt-lc b { color: var(--ink); font-weight: 600; }
.ckt-q { color: var(--ink-3); } .ckt-bad, .ckt-over, table.ckt-t button.lnk.ckt-over { color: var(--bad); }
table.ckt-t .crow-nil { border-color: transparent; background: transparent; color: var(--ink-3); }
table.ckt-t tr:hover .crow-nil, table.ckt-t tr:focus-within .crow-nil, table.ckt-t .crow-nil:focus-visible { border-color: var(--line); background: var(--bg); opacity: 1; }
@media (hover: none) { table.ckt-t .crow-nil { opacity: 1; border-color: var(--line); } }
table.ckt-t .crow-bar { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--ink-2); }
table.ckt-t .crow-bar i { display: inline-block; width: 48px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
table.ckt-t .crow-bar i b { display: block; height: 100%; background: var(--ok); }
table.ckt-t .sel2 .ckt-st { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
table.ckt-t .sel2 .stat { width: 14px; height: 14px; flex: none; } table.ckt-t .sel2 .stat svg { width: 8px; height: 8px; display: block; }
.menu.ckt-menu .stat { width: 14px; height: 14px; display: inline-grid; vertical-align: -2px; } .menu.ckt-menu .stat svg { width: 8px; height: 8px; }
table.ckt-t tr.ckt-on > td { background: var(--accent-soft); }
table.ckt-t[data-ckt-room-now="0"] [data-ckt-room="1"], table.ckt-t[data-ckt-room-now="0"] [data-ckt-room="2"], table.ckt-t[data-ckt-room-now="0"] [data-ckt-room="3"],
table.ckt-t[data-ckt-room-now="1"] [data-ckt-room="2"], table.ckt-t[data-ckt-room-now="1"] [data-ckt-room="3"], table.ckt-t[data-ckt-room-now="2"] [data-ckt-room="3"] { display: none; }
table.ckt-t:not([data-ckt-room-now="0"]) .rmx { display: none !important; }
table.ckt-t .ckt-date { height: 30px; padding: 0 6px; }
.ckt-scroll { max-width: 100%; } .ckt-mk { flex: none; } .rmx { display: block; } .ckt-after { padding: 4px 0 0; } table.ckt-t :is(.rm1, .rm2, .rm3) { white-space: nowrap; } .note-new textarea { resize: vertical; }
.bulk.ckt-bulk { margin: 10px 16px 6px auto; width: auto; max-width: calc(100% - 32px); }
.bulk.ckt-bulk .ckt-said { flex-basis: 100%; display: flex; gap: 8px; align-items: center; }
.bulk.ckt-bulk .ckt-due { display: inline-flex; gap: 6px; align-items: center; } .bulk.ckt-bulk .ckt-due[hidden] { display: none; }
/* Q49 A level 2: the small Saved with Undo beside what changed; fades after 5 seconds */
.ckt-saved { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ok); margin-left: 8px; white-space: nowrap; transition: opacity .6s; }
.ckt-saved .i { width: 12px; height: 12px; } .ckt-saved.fade { opacity: 0; }
.ckt-saved .lnk { padding: 0 6px; font-size: 12px; min-height: 24px; }
@media (prefers-reduced-motion: reduce) { .ckt-saved { transition: none; } }
/* Back to top (UX-16): one shared part, after one screen of scroll; it lifts above a message so it never covers it */
.cr-jump { position: sticky; float: right; bottom: 16px; margin: -48px 16px 0 0; display: grid; gap: 6px; justify-items: end; z-index: 25; transition: transform .2s; }
.cr-jump[hidden] { display: none; }
.cr-jump .btn { box-shadow: var(--shadow); } .cr-jump .cr-up { transform: rotate(180deg); } .cr-jump.lift { transform: translateY(-56px); }
@media (prefers-reduced-motion: reduce) { .cr-jump { transition: none; } }
@media (pointer: coarse) { .cr-jump .btn { min-height: 44px; } }
/* Q50 A data first: one toolbar line, one chip row of accounts (name and true count), quiet empty sections, sticky table heads */
.app[data-df] .df-bar { flex-wrap: wrap; }
.df-i { position: relative; display: inline-flex; }
.df-ipop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 340px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); box-shadow: var(--shadow); font-size: 13px; color: var(--ink-2); white-space: normal; }
.df-ipop[hidden] { display: none; }
/* THE (i) INSIDE ITS CONTROL (owner rule, 15 Nov 2026; docs/INFO-IN-BUTTON-SWEEP-2026-11-15.md; mock docs/mocks/info-in-button/). ONE kit part, templates/nd/_kit/info.html:
   k.info_in draws a control and its (i) as one split control (.ibtn): the action part, then the (i) part at its right end, each its own <button> (never a button in a button).
   The (i) opens the tip (.df-ipop, static/nd/d144.js) and never runs the action. k.info_head is the same (i) for a heading or a row label. Sizes from the kit scale: 28, 44 on touch. */
.ibtn { display: inline-flex; align-items: stretch; position: relative; vertical-align: middle; flex: none; }
.ibtn > form { display: inline-flex; margin: 0; }
.ibtn > .btn, .ibtn > form > .btn, .ibtn > .rsel-wrap > .rsel, .ibtn > label.opt { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ibtn > label.opt { margin: 0; }
.ibtn > .df-i { display: inline-flex; }
.ibtn-i { display: inline-grid; place-items: center; width: 28px; padding: 0; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; background: var(--surface); color: var(--ink-2); cursor: pointer; font: inherit; }
.ibtn-i:hover, .ibtn-i.is-hover, .ibtn-i[aria-expanded="true"] { background: var(--surface-2); color: var(--accent); }
.ibtn.is-pri > .df-i > .ibtn-i { position: relative; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ibtn.is-pri > .df-i > .ibtn-i::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--accent-ink); opacity: .75; }
.ibtn.is-pri > .df-i > .ibtn-i:hover, .ibtn.is-pri > .df-i > .ibtn-i.is-hover, .ibtn.is-pri > .df-i > .ibtn-i[aria-expanded="true"] { filter: brightness(1.08); }
.ibtn-i:focus-visible, .ibtn-i.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; position: relative; z-index: 1; }
.ibtn > .df-i > .df-ipop { left: auto; right: 0; }
/* a page's tab set and its (i): one band (Box, band, paper), the (i) its last segment */
.ibtn.is-band { gap: 4px; padding: 3px; background: var(--surface-2); border-radius: var(--r-card); }
.ibtn.is-band > .df-i > .ibtn-i { border-left: 1px solid var(--line-2); border-radius: var(--r-ctl); }
/* a heading's or a row's (i) */
/* G167 Group 1 (owner screenshot 15 Nov 21:46): a section heading (.ghead) that carries the kit's heading (i) keeps the artifact's .ghead heading weight
   (design/core/core.css:108, .grp > .ghead 600). Proven cause: that weight only reaches a .ghead inside a .grp, so a section heading outside one (Settings >
   Workflows "Month-end steps", Close due dates, Month sign-off, Monday summary, Message templates) drew at the body's 400. Ratchet: tests/test_info_in_button.py I11,
   tests/e2e_local/test_info_tips_inside.py T5. */
.ghead:has(> .df-i.ihead) { font-weight: 600; }
.ihead > .ibtn-i { min-height: 26px; border: 0; border-radius: var(--r-ctl); background: none; width: 26px; min-height: 26px; }
.ihead > .ibtn-i:hover, .ihead > .ibtn-i[aria-expanded="true"] { background: var(--surface-2); }
/* the tip: a bold title, then short icon items (rule 17) */
.df-ipop .u54-ipop { display: grid; gap: 6px; padding: 0; max-width: none; }
.df-ipop .u54-ipt { color: var(--ink); font-size: 13px; }
.df-ipop .u54-ipi { padding: 0; } .df-ipop .u54-ipi > span { display: flex; gap: 8px; align-items: flex-start; }
.df-ipop .u54-ipi svg { flex: none; margin-top: 2px; }
@media (max-width: 520px), (pointer: coarse) { .ibtn-i, .ihead > .ibtn-i { width: 44px; min-height: 44px; } .df-ipop { width: min(340px, calc(100vw - 32px)); }
  .ibtn > .btn, .ibtn > form > .btn, .ibtn > .rsel-wrap > .rsel, .ibtn > label.opt { min-height: 44px; } }
@media (max-width: 520px) { .ibtn.is-band { flex: 1 1 100%; max-width: 100%; flex-wrap: wrap; } .ibtn.is-band > .tabs { flex-wrap: wrap; flex: 1 1 auto; min-width: 0; } }
.atiles.df-chips { gap: 6px; padding: 0 16px 8px; align-items: center; }
.atiles.df-chips .atile { min-width: 0; height: 28px; padding: 0 4px 0 10px; border-radius: 99px; flex-wrap: nowrap; gap: 6px; font-size: 13px; background: var(--surface); }
.atiles.df-chips .atile .atn { flex: none; font-weight: 500; } .atiles.df-chips .atile .num { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.atiles.df-chips .atile .iconbtn { width: 22px; height: 22px; min-height: 22px; border-color: transparent; background: none; }
.atiles.df-chips .atile.on, .atiles.df-chips .atile.on:hover { background: var(--accent-soft); border-color: var(--accent); box-shadow: none; color: var(--accent); }
.atiles.df-chips .atile.on .num { color: var(--accent); }
.atiles.df-chips .atile[data-n="0"] { color: var(--ink-3); }
.app[data-df] > details.grp > summary.ghead { height: 38px; }
.app[data-df] > details.grp.df-quiet-g { margin-top: 0; margin-bottom: 0; border-color: transparent; background: none; }
.app[data-df] > details.grp.df-quiet-g > summary.ghead { height: 28px; color: var(--ink-3); font-weight: 500; font-size: 13px; }
.app[data-df] table.t td, .app[data-df] table.t th { padding-top: 7px; padding-bottom: 7px; }
@container spec (min-width: 900px) { .app[data-df] :not(.ppf-full) > .tscroll { overflow: visible; } .app[data-df] .kit-box:not(.ppf-full) { overflow: clip; } .app[data-df] table.t thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); } }
/* UX-29: the firm app on a phone: at most two columns (the name and its status); work pages carry the note; the client portal is untouched */
.wide-note { display: none; align-items: center; gap: 8px; margin: 8px 16px; padding: 8px 12px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); font-size: 13px; }
@container spec (max-width: 560px) { .wide-note { display: flex; }
  table.ckt-t th:not(:nth-child(2)):not(:last-child), table.ckt-t td:not(.ckt-name):not([data-l="Status"]) { display: none; }
  table.ckt-t td :is(.lnk, .sel2) { min-height: 44px; } }
/* D147: on a data-first page a long description stays on one line (the full text is on the row's expand and its tip) */
@container spec (min-width: 900px) { .app[data-df] table.t td { white-space: nowrap; } .app[data-df] table.t td:has(> .mini:first-child), .app[data-df] table.t td:has(> b + .cap), .app[data-df] table.t td:has(> .cap) { max-width: 420px; overflow: hidden; text-overflow: ellipsis; } .app[data-df] table.t td .cap { overflow: hidden; text-overflow: ellipsis; } }

/* D148-D150 (Q50 A on every work page, 1 Nov 2026): the data-first frame on Review, Uncategorized, Receipts, Final review and the Accruals
   queue. D149, the Split cell: the account is line 1 and its tax code a small line 2 in the SAME cell; that cell never truncates and never
   runs the two together; the Description cell is the one that gives way (one line, ellipsis, the full text in the row's expand); the
   kit keeps Actions pinned at the right edge, so Amount and Actions are always on the screen at 1,440. */
@container spec (min-width: 900px) {
  .app[data-df] table.t td:has(> .txc) { max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }
  .app[data-df] table.t td > .txc { display: block; width: auto; margin-top: 1px; font-size: 12px; line-height: 15px; color: var(--ink-2); }
  .app[data-df] table.t td > .btnrow.nw { flex-wrap: nowrap; }
  /* F13 (14 Nov 2026): a note under the account (a reconciled line's lock, a draft's marker) wraps; on one line it made the Pending table 1,577 px at 1,440 and the
     clipped box hid Post, Ask and More actions. The account and its tax code keep their one line each (D149). */
  .app[data-df] table.t td > .locked-note, .app[data-df] table.t td:has(> .txc) > .pill { white-space: normal; max-width: 280px; }
  .app[data-df] table.t td.vnd { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
  .app[data-df] table.t td.dsc { max-width: 180px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
  .app[data-df] .df-bar .tabs .num { margin-left: 4px; }
  /* D150: a flux reason shows one line until you click it to edit */
  .app[data-df] .in-edit:not(:focus) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 440px; }
  .app[data-df] td:has(> .in-edit) { white-space: nowrap; }
  .app[data-df] td:has(> .in-edit) > .in-edit:not(:focus) { display: inline-block; vertical-align: middle; }
}

/* Hand patches kept by tools/dev/nd_port_core.py across regeneration (appended at the end of core.css; edit here, not in core.css).
   1. Mobile table cards (nd-port, D72): under 560 px a .tscroll table becomes stacked rows labelled by data-l, so a phone never scrolls sideways. */
@container spec (max-width: 560px) {
  .tscroll table.t { min-width: 0; display: block; } .tscroll table.t thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tscroll table.t tbody, .tscroll table.t tfoot { display: block; }
  .tscroll table.t tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .tscroll table.t td { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; border: 0; text-align: right; min-width: 0; }
  .tscroll table.t td[data-l]::before { content: attr(data-l); color: var(--ink-3); text-align: left; flex: none; }
  .tscroll table.t td:not([data-l]) { justify-content: flex-start; }
  .tscroll table.t .at-pair .at-acct { white-space: normal; overflow: visible; text-align: right; }
  .tscroll table.t tr { position: relative; } .tscroll table.t tr:has(> td > input[data-sel]) { padding-left: 44px; }
  .tscroll table.t td:has(> input[data-sel]) { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); padding: 0; }
  .tscroll table.t tr[hidden], .tscroll table.t tr.detail-r[hidden] { display: none; }
  .tscroll, .nd-frame .tscroll { overflow-x: visible; }
}
/* 2. Floating-layer padding (D33/D41): the sticky .pt-dock never covers the last chip. */
/* floating layer reserves space (D33/D41): the sticky bar never covers the last chip, and a focused or scrolled-to control keeps clear of it */
html:has(.pt-dock) { scroll-padding-bottom: 140px; }
.pt-wrap:has(+ .pt-dock) { padding-bottom: 96px; }

/* D151-D153 (owner Q51 A, 2 Nov 2026; UX-31, UX-32): the ONE heading menu, screen-aware (kit.js fitMenu sets top, left and max-height).
   One column: the action row, the filter, the value list (the only part that shrinks and scrolls), the condition, the foot pinned. */
.pop.ppf-pop.ppf-menu { display: flex; flex-direction: column; gap: 2px; width: 300px; max-width: calc(100vw - 16px); max-height: none; overflow: hidden; }
.pop.ppf-pop.ppf-menu > * { flex: none; }
.ppf-menu .ppf-acts { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 8px 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.ppf-menu .ppf-acts .btn { gap: 4px; }
.ppf-menu .ppf-why { margin: 0 10px 4px; }
.pop.ppf-pop .ppf-grp.ppf-q { grid-template-columns: 112px minmax(0, 1fr); }
.ppf-menu .ppf-sa { align-items: center; } .ppf-menu .ppf-sa .cap { margin: 0 0 0 auto; }
.pop.ppf-pop.ppf-menu > .ppf-vals { flex: 0 1 auto; max-height: none; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); align-content: start; }
.ppf-menu .ppf-empty { padding: 10px; color: var(--ink-2); }
.pop.ppf-pop.ppf-menu.ppf-tight { overflow: auto; }
.pop.ppf-pop.ppf-menu.ppf-tight > .ppf-vals { flex: none; min-height: 0 !important; overflow: visible; }
.ppf-menu.ppf-tight .ppf-foot { position: sticky; bottom: 0; background: var(--bg); }
/* D152: the hidden-columns button in the table bar, its level-2 line, and its list */
.ppf-hid { display: inline-flex; align-items: center; gap: 6px; } .ppf-hid[hidden] { display: none; }
.ppf-hid .ckt-saved { margin-left: 0; }
.pop.ppf-pop.ppf-hpop { width: 260px; max-height: min(420px, calc(100vh - 16px)); }
.ppf-hpop .ppf-hrow { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; } .ppf-hpop .ppf-hrow span { flex: 1; }
.ppf-hpop .ppf-hfoot { display: flex; justify-content: flex-end; padding: 6px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
/* D153: on a phone the menu is a fitted popover the width of the screen less 8 px each side; rows stay 44 px (the rule above) */
@media (max-width: 560px) { .pop.ppf-pop.ppf-menu { width: calc(100vw - 16px); } }

/* UX-29 (owner, 1 Nov 2026): EVERY firm work table on a phone shows two columns, the name and one key value (cells marked data-m="name" / data-m="key"),
   with the wide-screen note above (kit macro ckt.wide_note). Replaces the stacked every-field card on the data-first pages; the client portal is untouched. */
@container spec (max-width: 560px) {
  .app[data-df] .tscroll table.t tr { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; }
  .app[data-df] .tscroll table.t tr[hidden], .app[data-df] .tscroll table.t tr.detail-r { display: none; }
  .app[data-df] .tscroll table.t :is(td, th):not([data-m]) { display: none; }
  .app[data-df] .tscroll table.t td[data-m] { display: block; padding: 4px 0; text-align: left; }
  .app[data-df] .tscroll table.t td[data-m="key"] { text-align: right; }
  .app[data-df] .tscroll table.t td[data-m]::before { content: none; }
  .app[data-df] .tscroll table.t tr { padding-left: 12px; }
  .app[data-df] .tscroll table.t td[data-m="name"] .bk-hit, .app[data-df] .tscroll table.t td[data-m="name"] .lnk { display: inline-block; min-height: 44px; line-height: 44px; margin: -12px -6px; padding: 0 6px; }
}
/* Q55 (owner, 2 Nov 2026, D154-D156), copied from design/core/core.css:955-957 and :1197-1213: every heart bare; the heart inside a place tab; the answer under it. A module tab is an <a> in the app (a button in the artifact). */
/* D154: every heart is bare (no border, no box): a hover tint and a focus ring only; check-row and check-page hearts always show */
[data-fav-toggle].fav-h, button.fav-th { border: 0 !important; background: none !important; box-shadow: none; color: var(--ink-3); }
[data-fav-toggle]:hover { color: var(--accent); } [data-fav-toggle]:focus { outline: none; } [data-fav-toggle]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* D154 (owner Q55 A, 2 Nov 2026; v114cards.py): the heart inside a place tab. The tab keeps room on its right and the bare heart (its next
   sibling) sits in it. Shown on the tab you are on and on favourites (.show), on other tabs when the pointer is on the tab or the heart. */
.mods > :is(a, button).fav-pl { padding-right: 20px; }
.tabs > button.fav-pl { padding-right: 28px; }
button.fav-th { width: 18px; height: 18px; min-height: 18px; padding: 0; display: inline-grid; place-items: center; align-self: center; border-radius: 4px; opacity: 0; position: relative; z-index: 1; cursor: pointer; }
.mods > button.fav-th { margin-left: -38px; height: 18px; }
.tabs > button.fav-th { margin-left: -28px; margin-right: 6px; height: 18px; }
button.fav-th .i { width: 13px; height: 13px; }
/* owner Check 49 (5 Nov 2026): on the selected tab the heart is still the dark-blue accent: filled when it is a favourite, an outline in the same blue when it is not. Never the tab's ink (white on the tint). */
.tabs > button.on + button.fav-th, .mods > :is(a, button).on + button.fav-th, button.fav-th[aria-pressed="true"], .tabs > button.on + button.fav-th[aria-pressed="true"] { color: var(--accent); }
button.fav-th[aria-pressed="true"] .i { fill: currentColor; }
.fav-said .fav-sa .btn { text-decoration: none; }
button.fav-th.show, .fav-pl:hover + button.fav-th, button.fav-th:hover, button.fav-th:focus-visible { opacity: 1; }
@media (hover: none), (pointer: coarse) { button.fav-th { opacity: 1; } }
/* D155: the answer under the heart (Q49 A level 2), organised: title, one item, actions */
.fav-said { position: fixed; z-index: 125; display: grid; gap: 2px; padding: 6px 10px; min-width: 230px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-ctl); box-shadow: var(--shadow); }
.fav-said .fav-st { display: flex; gap: 6px; align-items: center; color: var(--ok); font-size: 13px; }
.fav-said .fav-si { display: flex; gap: 4px; align-items: center; font-size: 12px; color: var(--ink-2); }
.fav-said .fav-sa { display: flex; gap: 4px; }
.fav-said .lnk { font-size: 12px; padding: 0 4px; min-height: 24px; }
/* Q53 (owner, 2 Nov 2026, D157-D159), copied from design/core/core.css:1215-1258: the Create Close dialog, Create previous closes, the done line at the top. */
.u5x-paper { margin: 10px 16px 0; border: 1px solid var(--line); border-radius: var(--r-paper, 12px); background: var(--surface); }
.u5x-fact { background: var(--surface-2); border-radius: var(--r-ctl); padding: 6px 10px; color: var(--ink-2); font-size: 12px; }
.u5x-why { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-2); max-width: 340px; white-space: normal; }
.u5x-note { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--ok-soft); border-radius: var(--r-ctl); padding: 8px 12px; margin: 8px 16px; }
.u5x-note .sp { flex: 1; } .u5x-note .i { color: var(--ok); }
table.u5x-t { min-width: 0; width: 100%; }
table.u5x-t td, table.u5x-t th { vertical-align: top; padding-top: 9px; padding-bottom: 9px; }
table.u5x-t tr.no td { color: var(--ink-3); background: var(--surface-2); }
table.u5x-t tr.no td .u5x-why { color: var(--ink-2); }
.u5x-shade { align-items: flex-start; padding-top: 24px; }
.u5x-shade .modal { width: min(720px, 96%); max-height: none; }
.u5x-shade table.u5x-t { table-layout: fixed; width: 100% !important; min-width: 0 !important; } .u5x-shade table.u5x-t th:nth-child(1) { width: 36px; } .u5x-shade table.u5x-t th:nth-child(3) { width: 110px; } .u5x-shade table.u5x-t th:nth-child(4) { width: 130px; }
.u5x-shade table.u5x-t td { white-space: normal; overflow-wrap: anywhere; }
.u5x-shade .modal .rb-body { padding: 0 20px 8px; }
.u5x-field { display: grid; gap: 4px; margin: 8px 0; } .u5x-field > .cap { margin: 0; }
.u5x-band { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface-2); border-radius: 10px; padding: 4px 8px; margin: 8px 0; }
.u5x-nomar { margin: 0; }
.u5x-band .in { min-height: 32px; flex: 1; min-width: 160px; }
.u5x-live { background: var(--accent-soft); border-radius: var(--r-ctl); padding: 8px 12px; margin: 8px 0; }
.u5x-safe { display: flex; gap: 6px; align-items: flex-start; margin-right: auto; max-width: 380px; color: var(--ink-2); font-size: 12px; }
.u5x-safe .i { flex: none; color: var(--ok); margin-top: 1px; }
.u5x-mt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 6px 0; }
.u5x-mt label { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 4px 6px; align-items: start; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); font-size: 12.5px; }
.u5x-mt label.no { background: var(--surface-2); color: var(--ink-3); }
.u5x-mt label .u5x-why { grid-column: 2; margin: 0; font-size: 11.5px; }
.pop .pm-actions { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.pop .pm-actions .cap, #pop-period .cap { margin: 0 12px 6px; font-size: 11.5px; max-width: 320px; white-space: normal; }
#pop-period button.pi:disabled { color: var(--ink-3); cursor: not-allowed; background: none; }
@media (max-width: 760px) { .u5x-mt { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.u5x-x { float: right; } .u5x-what { margin: 4px 0 8px; } .u5x-c0 { margin: 0; } .u5x-all { display: inline-flex; gap: 6px; align-items: center; }
.u5x-scroll300 { max-height: 300px; overflow: auto; } .u5x-year { flex: 0 0 120px; min-width: 0; } .u5x-band .sp { flex: 1; }
.u5x-why.u5x-right { margin: 0 16px 8px auto; text-align: right; max-width: none; }

.u5x-fact.att { background: var(--accent-soft); color: var(--ink); }
/* D160-D162 (owner Q54 A, 2 Nov 2026; v113cards.py, copied from design/core/core.css:1260-1270 for the Close Status cells (Q54)): the one-section tiles, the status cell, manual marks, set-aside note */
.u54-sec { margin: 12px 16px 0; border: 1px solid var(--line); border-radius: var(--r-paper, 12px); background: var(--surface); overflow: visible; }
.u54-sec > h5 { margin: 0; padding: 10px 16px; font-size: 14px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); }
.u54-sec > h5 .cnt { color: var(--ink-2); font-weight: 400; }
.u54-st { display: grid; gap: 3px; min-width: 210px; }
.u54-st .menuwrap { position: relative; }
.u54-st .u5x-why { margin: 0; }
.u54-st .u54-man { color: var(--ink); font-weight: 600; }
.u54-st .u54-set { background: var(--warn-soft); border-radius: var(--r-ctl); padding: 4px 8px; color: var(--ink); }
.u54-sec table.u5x-t td:first-child { min-width: 220px; }
.u54-quiet td { color: var(--ink-2); padding: 14px 16px; }
.pop .pi.kb { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.pop .pnote { padding: 4px 10px; color: var(--ink-2); font-size: 13px; }
.pop .pfoot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
/* table more 1 (12 Nov 2026): a group heading of "Group by" (count and money out and in beside the name); the colours and sizes are the table kit's own */
tr.kgh > td { background: var(--surface-2); border-top: 1px solid var(--line); padding: 8px 16px; }
tr.kgh .kgh-b { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-decoration: none; }
tr.kgh .kgh-s { margin-left: 8px; font-variant-numeric: tabular-nums; }
/* table more 2 (12 Nov 2026): a heading being dragged, and the heading it would land on (the kit's own accent) */
th.ppf-dragging { opacity: .55; }
th.ppf-dropat { box-shadow: inset 3px 0 0 var(--accent-line); }
