/* BCLMA Admin. Light-blue wordmark on BCLMA navy; accents from the BCLMA palette
   (rust #C16237, gold #B7A92C, lime #99C926, forest #4F6E18). Money in tabular figures. */
:root {
  --page-max: 100rem;                 /* 0.9.61: 1600px; fluid below */
  --page-pad: clamp(1.25rem, 2.5vw, 2.5rem);
  --read-max: 52rem;                  /* paragraphs */
  --form-max: 56rem;                  /* form columns (the old page width) */
  --navy: #00325F;
  --ink: #0F2540;
  --ink-soft: #4F6178;
  --brand: #96ADC5;
  --action: #00325F;
  --action-hover: #00244A;
  --lime: #99C926;
  --ground: #DBE1E6;
  --paper: #FFFFFF;
  --line: #CBD4DE;
  --ok: #4F6E18;
  --ok-bg: #EAF3D6;
  --wait: #6B6216;
  --wait-bg: #F4F0CF;
  --danger: #A9502A;
  --radius: 10px;
  --font: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.5 var(--font); }
a { color: var(--action); text-underline-offset: 2px; }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 2.5rem 0 1rem; }

/* header */
.top { background: var(--navy); color: #fff; }
.top-inner { max-width: var(--page-max); margin: 0 auto; padding: .75rem var(--page-pad); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mark { display: flex; align-items: flex-end; gap: .75rem; text-decoration: none; }
.mark img { height: 2.1rem; width: auto; display: block; }
.mark-sub { display: grid; line-height: 1.15; color: var(--brand); font-size: .8rem; padding-bottom: .05rem; }
.mark-sub strong { color: #fff; font-weight: 600; font-size: .95rem; }
.nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; position: relative; }
.nav > a, .nav summary { text-decoration: none; color: #DCE5EF; font-weight: 500; }
.nav > a:hover, .nav summary:hover { color: #fff; }
.nav > a.here { color: #fff; box-shadow: inset 0 -3px 0 var(--lime); padding-bottom: .2rem; }
.nav form { margin: 0; }

/* header menus (details/summary; see app/nav.py) */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; padding-bottom: .2rem; border-radius: 4px; user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu.here > summary { color: #fff; box-shadow: inset 0 -3px 0 var(--lime); }
.menu[open] > summary { color: #fff; }
.menu .caret { width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); margin-left: .15rem; transition: transform .15s; }
.menu[open] .caret { transform: translateY(1px) rotate(-135deg); }
.menu-icon summary { position: relative; padding: .15rem .1rem .3rem; }
.menu-icon .icon { display: block; }
.nav > :not(.menu-icon) + .menu-icon { margin-left: .5rem; }
.menu .dot { position: absolute; top: 0; right: -.2rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--navy); }
.menu-panel { position: absolute; z-index: 20; top: calc(100% + .5rem); left: 0; min-width: 12rem; background: var(--paper); color: var(--ink); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 20, 45, .25); padding: .4rem 0; display: grid; }
.menu-icon .menu-panel { left: auto; right: 0; }
.menu-panel a, .menu-panel .linkish { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1rem; color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; width: 100%; text-align: left; font: inherit; font-weight: 500; }
.menu-panel a:hover, .menu-panel .linkish:hover { background: var(--ground); color: var(--ink); }
.menu-panel a.here { box-shadow: inset 4px 0 0 var(--lime); background: #F1F4F7; color: var(--navy); font-weight: 600; }
.menu-panel .badge { background: var(--navy); color: #fff; }
.menu-head { margin: 0 0 .3rem; padding: .35rem 1rem .6rem; border-bottom: 1px solid var(--line); display: grid; line-height: 1.3; }
.menu-head span { color: var(--ink-soft); font-size: .88rem; }
.menu-panel form { border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .3rem; }

.page { max-width: var(--page-max); margin: 0 auto; padding: 2rem var(--page-pad) 7rem; }
/* 0.9.61 (Allan, 2026-11-12: "use more of the screen"): every page is as wide as the screen up to --page-max, so lists
   and tables use it; text and form columns keep a readable width inside it. A page that must stay narrow (sign-in,
   Your account) says page-narrow in its page_class block. */
.page.page-narrow { max-width: 56rem; }
.page p { max-width: var(--read-max); }
.page :is(td, th, .grid, .table-wrap, .pl, .inc, .hp-list, .menu-panel, .help-cloud) p { max-width: none; }
.page form.stack:not(.stack-wide) { max-width: var(--form-max); }
.narrow { max-width: 30rem; }
.lede { color: var(--ink-soft); margin: 0 0 1.5rem; max-width: 40rem; }
.hint { color: var(--ink-soft); font-size: .9rem; margin: 0; }
.tag { display: inline-block; padding: 0 .4rem; border-radius: 4px; background: var(--lime); color: var(--navy); font-size: .75rem; font-weight: 600; line-height: 1.3rem; vertical-align: middle; }
.crumb { margin: 0 0 .75rem; font-size: .95rem; }
.after { margin-top: 1.5rem; color: var(--ink-soft); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .25rem; }
.head-row h1 { margin: 0; }

/* messages */
.notice { background: var(--ok-bg); color: var(--ok); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.5rem; font-weight: 500; }
.problem { background: #F8E7DF; color: var(--danger); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.5rem; }
.problem p { margin: 0; }
.problem p + p { margin-top: .25rem; }
.empty { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem 1.5rem; color: var(--ink-soft); }
.empty p { margin: 0; }

/* forms */
.stack { display: grid; gap: 1.1rem; }
label, .field-label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
input, select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; min-height: 2.9rem; }
input:focus, select:focus { border-color: var(--action); outline: none; box-shadow: 0 0 0 3px rgba(150,173,197,.5); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.money-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.money-input span { padding-left: .8rem; color: var(--ink-soft); }
.money-input input { border: 0; font-variant-numeric: tabular-nums; }
.money-input:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px rgba(150,173,197,.5); }
.money-input input:focus { box-shadow: none; }
input.code { font-size: 1.75rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.check input { width: 1.2rem; min-height: 0; height: 1.2rem; }
.drop { border: 2px dashed var(--brand); border-radius: var(--radius); padding: 1.25rem; background: var(--paper); font-weight: 400; }
.drop-title { font-weight: 600; color: var(--action); }
.drop-hint { color: var(--ink-soft); font-size: .9rem; }
.drop input { border: 0; padding: .25rem 0; min-height: 0; }
.actions { display: flex; align-items: center; gap: .75rem 1.25rem; flex-wrap: wrap; }
.copy-row { display: flex; gap: .5rem; margin-bottom: 1rem; }
.for-picker { margin-bottom: 1.5rem; max-width: 22rem; }

button, .button { font: inherit; font-weight: 600; border-radius: 8px; padding: .7rem 1.2rem; min-height: 2.9rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.primary { background: var(--action); border-color: var(--action); color: #fff; }
.primary:hover { background: var(--action-hover); color: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
.small { min-height: 0; padding: .35rem .7rem; font-size: .9rem; font-weight: 500; }
.linkish { background: none; border: 0; padding: 0; min-height: 0; color: var(--action); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.danger { color: var(--danger); }
.push-right { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.edit-note { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.25rem; display: grid; gap: .75rem; justify-items: start; }
.edit-note p { margin: 0; }
.danger-button { color: var(--danger); border-color: #E2B9A6; background: var(--paper); }
.danger-button:hover { background: #F8E7DF; color: var(--danger); }

/* the tally: one expense per line, amounts lined up like a till tape */
.tally { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.tally-row { display: grid; grid-template-columns: 1fr auto 7.5rem; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.tally-row:last-child { border-bottom: 0; }
.tally-row:target { background: #fff4cc; scroll-margin-top: 5rem; }
.tally-row.pick { grid-template-columns: auto 1fr auto 7.5rem; }
.tally-row.pick input { width: 1.3rem; height: 1.3rem; min-height: 0; accent-color: var(--action); }
.tally-main { display: grid; gap: .1rem; min-width: 0; font-size: 1rem; cursor: inherit; }
.tally-desc { font-weight: 500; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.tally-desc:hover { color: var(--action); text-decoration: underline; }
.tally-date { color: var(--ink-soft); font-size: .88rem; font-weight: 400; }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1.1rem; text-align: right; white-space: nowrap; }
.tally-foot { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem; padding: 1rem 1.1rem; background: var(--navy); color: #fff; border-radius: 0 0 var(--radius) var(--radius); }
.tally-foot.static { position: static; grid-template-columns: 1fr auto; }
.tally-foot .total { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; }
.tally-count { color: var(--brand); }
.tally-foot .primary { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.tally-foot .primary:hover { background: #ADD94A; color: var(--navy); }

.thumbs { display: flex; gap: .35rem; }
.thumb { width: 2.75rem; height: 2.75rem; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; background: var(--ground); text-decoration: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .doc { font-size: .72rem; font-weight: 700; color: var(--action); }
.no-receipt { font-size: .85rem; color: var(--wait); }
.attached { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.attached li { display: flex; align-items: center; gap: .75rem; }
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }

/* work lists: approvals and payments */
.worklist { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.worklist > li { display: grid; grid-template-columns: 1fr 7.5rem auto; align-items: center; gap: .75rem 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.worklist > li:last-child { border-bottom: 0; }
.worklist .pay-row { grid-template-columns: 1fr 7.5rem; }
.work-main { display: grid; gap: .1rem; text-decoration: none; min-width: 0; }
.work-title { font-weight: 600; color: var(--ink); }
.work-main:hover .work-title { color: var(--action); text-decoration: underline; }
.work-sub { color: var(--ink-soft); font-size: .88rem; }
.pay-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem 1.5rem; }
.pay-section { margin-bottom: 2.5rem; }
.pay-section h2 { margin-top: 0; display: flex; align-items: center; gap: .5rem; }
.count { font-size: .85rem; font-weight: 600; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .55rem; color: var(--ink-soft); }
.tick { margin: 0; }
.tick .check { background: var(--wait-bg); color: var(--wait); border-radius: 8px; padding: .55rem .8rem; font-weight: 600; cursor: pointer; }
.tick .check:has(input:checked) { background: var(--ok-bg); color: var(--ok); }
.tick .check input { accent-color: var(--ok); }
details.pay summary { cursor: pointer; font-weight: 600; color: var(--action); padding: .55rem 0; }
details.pay[open] { flex-basis: 100%; }
.pay-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: .75rem; align-items: end; background: #F6F8FB; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-top: .25rem; }
.action-box { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.action-box p { margin: 0; }
.action-box .tick { justify-self: start; }
.action-box > .stack, form.action-box { grid-template-columns: 1fr auto; align-items: end; }
.after-tally { margin-top: 1.5rem; }
.note { background: var(--paper); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.5rem; }

/* officer notice and nav counts */
.banner { display: block; background: var(--lime); color: var(--navy); text-decoration: none; }
.banner strong, .banner span { display: block; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad); }
.banner strong { padding-top: .7rem; }
.banner span { padding-bottom: .7rem; font-size: .92rem; }
.banner:hover { background: #ADD94A; color: var(--navy); }
.badge { display: inline-block; min-width: 1.35rem; padding: 0 .35rem; border-radius: 999px; background: var(--lime); color: var(--navy); font-size: .78rem; font-weight: 700; text-align: center; line-height: 1.35rem; margin-left: .15rem; }

/* receipt picker */
.pick-btn { justify-self: start; margin-top: .5rem; border: 1px solid var(--brand); color: var(--action); }
.picked { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .5rem; }
.picked li { display: flex; align-items: center; gap: .75rem; }
.picked img, .picked .doc { width: 2.75rem; height: 2.75rem; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--action); background: var(--ground); flex: none; }
.drop { display: grid; gap: .2rem; transition: background .15s, border-color .15s; }
.drop.dragging { background: #EAF3D6; border-color: var(--lime); border-style: solid; }
.drag-only { display: none; }
@media (hover: hover) and (pointer: fine) { .drag-only { display: inline; } }
.drop-msg { display: block; color: var(--danger); font-weight: 600; font-size: .9rem; }
.drop-msg[hidden] { display: none; }
.button.drop-ready { outline: 2px dashed var(--lime); outline-offset: 2px; }
.button.dragging { background: #EAF3D6; border-color: var(--lime); color: var(--ink); }
.button.busy { opacity: .7; pointer-events: none; }

/* payees and bills */
.wide-ish { max-width: 38rem; }
.flag { background: #F8E7DF; color: var(--danger); border-radius: 8px; padding: .55rem .8rem; margin: 0 0 1rem; font-weight: 600; }
.flag-inline { color: var(--danger); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.flag-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.flag-row span { flex: 1 1 18rem; }
.note-link { display: block; background: var(--paper); border-left: 4px solid var(--lime); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.25rem; text-decoration: none; color: var(--ink); }
.note-link strong { color: var(--action); text-decoration: underline; }
.small-link { font-size: .88rem; font-weight: 600; margin-left: .4rem; }
.ok-inline { color: var(--ok); font-weight: 600; font-size: .85rem; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.bill-no { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
h1 .bill-no { font-weight: 500; }
/* 0.9.25: a record's number (D12, PM7) as a small secondary tag beside its readable label */
.ref-tag { display: inline-block; font-size: .72rem; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; vertical-align: middle; white-space: nowrap; }
.pre { white-space: pre-line; }
.pay-to { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
.pay-to-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.pay-to-facts { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 0; }
.pay-to-facts dt { font-size: .82rem; color: var(--ink-soft); }
.pay-to-facts dd { margin: 0; font-weight: 600; font-size: 1.05rem; }
.trio { display: grid; grid-template-columns: 5rem 7rem 1fr; gap: .75rem; }
.pay-fields { display: grid; gap: 1rem; }
fieldset.new-payee { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 1rem 1.1rem; margin: 0; display: grid; gap: .9rem; }
fieldset.new-payee legend { font-weight: 600; padding: 0 .3rem; }
[hidden] { display: none !important; }
textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; resize: vertical; }
textarea:focus { border-color: var(--action); outline: none; box-shadow: 0 0 0 3px rgba(150,173,197,.5); }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.filters a { text-decoration: none; padding: .35rem .8rem; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: .9rem; font-weight: 500; border: 1px solid var(--line); }
.filters a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
/* 0.9.46 month picker: the latest 4 months, then "More" with the earlier ones */
.month-picker { align-items: flex-start; }
.month-more { position: relative; }
.month-more > summary { list-style: none; cursor: pointer; padding: .35rem .8rem; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: .9rem; font-weight: 500; border: 1px solid var(--line); }
.month-more > summary::-webkit-details-marker { display: none; }
.month-more > summary::after { content: " ▾"; font-size: .8em; }
.month-more[open] > summary::after { content: " ▴"; }
.month-more > ul { position: absolute; z-index: 20; top: calc(100% + .3rem); right: 0; min-width: 11rem; max-height: 18rem; overflow-y: auto; margin: 0; padding: .3rem; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.month-more > ul a { display: block; border: 0; border-radius: 6px; background: none; padding: .35rem .6rem; }
.month-more > ul a:hover { background: var(--bg, #eef1f4); }
.month-more > ul a.on { background: var(--navy); color: #fff; }
@media (max-width: 600px) { .month-more > ul { right: auto; left: 0; } }
/* 0.9.46 activity pages: download steps and coverage folded at the bottom */
.page-tools { margin-top: 1.5rem; }
.page-tools > summary { cursor: pointer; font-weight: 600; }
.page-tools > .tools-body { margin-top: .75rem; }
.other-dates { margin: 0 0 1rem; }
/* 0.9.47 activity rows open their backup */
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: #f3f6f9; }
.row-main { font-weight: 600; }
.bank-words { font-size: .78rem; }
.bank-rows td.what { max-width: 19rem; }
.trunc { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-rows .status { font-size: .75rem; padding: .1rem .5rem; }
.row-main.bank-only { font-weight: 500; }
.bank-rows .phone-only { display: none; }
@media (max-width: 600px) {
  .grid.stmt-lines.bank-rows td.what { max-width: 7.5rem; min-width: 0; }
  .grid.bank-rows th { white-space: normal; }
  .bank-rows .trunc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .bank-rows td.amount { font-size: .85rem; }
  .bank-rows .yr { display: none; }
  .bank-rows th, .bank-rows td { padding-left: .45rem; padding-right: .45rem; }
  .bank-rows .col-status, .bank-rows .col-bal { display: none; }
  .bank-rows .phone-only { display: block; margin-top: .2rem; }
}
.other-dates > summary { cursor: pointer; font-size: .9rem; }
.search { display: flex; gap: .5rem; align-items: center; margin: 0 0 1rem; max-width: 30rem; }
.invoice-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; padding: 1rem 1.1rem; display: grid; gap: .75rem; }
.invoice-desc { margin: 0; font-weight: 500; }
.invoice-files .thumb { width: 4.5rem; height: 4.5rem; }
.field-hint { margin-top: -.75rem; }
.inline-form { display: flex; gap: .5rem; margin-top: .5rem; max-width: 30rem; }
.account-edit summary { cursor: pointer; font-weight: 600; color: var(--action); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.plain-list li { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.plain-list .amount { font-size: 1rem; }
h2 + .flag { margin-top: -.25rem; }
form h2 { margin: 1.5rem 0 0; }

/* GST */
.gst-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .75rem; }
.gst-row .small { min-height: 2.9rem; }
.gst-row label { flex: 1 1 9rem; max-width: 11rem; }
.gst-note { font-size: .82rem; color: var(--brand); }

/* card charges */
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; }
fieldset.paid-by { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
fieldset.paid-by legend { font-weight: 500; font-size: .95rem; padding: 0; margin-bottom: .4rem; }
.option { display: flex; gap: .7rem; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; cursor: pointer; font-weight: 400; }
.option input { width: 1.15rem; height: 1.15rem; min-height: 0; margin-top: .15rem; accent-color: var(--navy); flex: none; }
.option > span { display: grid; gap: .15rem; }
.option > span > span { color: var(--ink-soft); font-size: .88rem; }
.option:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.card-month { margin-bottom: 2rem; }
.card-month h2 { margin: 0 0 .75rem; }
.card-group { margin-bottom: 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; background: var(--navy); color: #fff; padding: .6rem 1.1rem; border-radius: var(--radius) var(--radius) 0 0; }
.card-head .amount { font-size: 1.15rem; }
.card-group .worklist { border-radius: 0 0 var(--radius) var(--radius); border-top: 0; }
.card-group .worklist > li { grid-template-columns: 1fr 7.5rem auto; }

/* month end */
.worklist .stmt-row { grid-template-columns: 1fr 14rem auto; }
.checklist { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.checklist > li { padding: .8rem 1.1rem .8rem 2.6rem; border-bottom: 1px solid var(--line); position: relative; font-weight: 500; }
.checklist > li:last-child { border-bottom: 0; }
.checklist > li::before { content: "!"; position: absolute; left: 1rem; top: .8rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #F8E7DF; color: var(--danger); font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.checklist > li.done { color: var(--ink-soft); font-weight: 400; }
.checklist > li.done::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.checklist .sub { margin: .4rem 0 0; padding-left: 1rem; font-weight: 400; font-size: .92rem; }
.grid.stmt-lines td { white-space: normal; vertical-align: top; overflow-wrap: anywhere; }
.grid.stmt-lines td:first-child, .grid.stmt-lines td.amount { white-space: nowrap; }
.grid.stmt-lines td:nth-child(2) { min-width: 14rem; }
.line-actions form { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: 0; }
.line-actions select { width: auto; min-height: 0; padding: .3rem .4rem; font-size: .85rem; }
.summary-link { cursor: pointer; font-weight: 600; color: var(--action); }

/* file viewer */
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.viewer-name { font-weight: 600; flex: 1 1 12rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.viewer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.viewer-img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.viewer-frame { display: block; width: 100%; height: 80vh; border: 0; background: #fff; }
.email-frame { height: 65vh; border-top: 1px solid var(--line); }
.viewer-text { white-space: pre-wrap; font: .95rem/1.55 var(--font); margin: 0; }
.email-head { display: grid; gap: .25rem; margin: 0 0 1rem; }
.email-head > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; }
.email-head dt { color: var(--ink-soft); font-size: .88rem; }
.email-head dd { margin: 0; overflow-wrap: anywhere; }
.grid.csv td { font-size: .88rem; }
.viewer-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.viewer-strip a { width: 3.5rem; height: 3.5rem; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--paper); text-decoration: none; }
.viewer-strip a.on { border-color: var(--navy); }
.viewer-strip img { width: 100%; height: 100%; object-fit: cover; }
.viewer-strip .doc, .thumb .doc { font-size: .7rem; font-weight: 700; color: var(--action); }

/* tables */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid th { font-size: .88rem; font-weight: 600; color: var(--ink-soft); background: #F7F9FC; }
.grid tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; }
.grid td.amount { font-size: 1rem; }
.grid form { margin: 0; }
tr.inactive td { color: var(--ink-soft); }

.status { display: inline-block; font-size: .85rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--ground); color: var(--ink-soft); }
.status-submitted { background: var(--wait-bg); color: var(--wait); }
.status-paid { background: var(--ok-bg); color: var(--ok); }
.status-approved { background: #E0E9F3; color: var(--navy); }
.status-initiated { background: #F8E7DF; color: var(--danger); }
.status-approved { background: var(--wait-bg); color: var(--wait); }

.facts { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 1rem 0 1.5rem; }
.facts dt { font-size: .85rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 500; }

@media (max-width: 640px) {
  .page { padding-top: 1.25rem; }
  .nav { width: 100%; gap: 1rem; }
  .menu { position: static; }
  .menu-panel, .menu-icon .menu-panel { left: 0; right: 0; min-width: 0; }
  .nav > :not(.menu-icon) + .menu-icon { margin-left: auto; }
  .mark-sub span { display: none; }
  h1 { font-size: 1.5rem; }
  .pair { grid-template-columns: 1fr; }
  .tally-row { grid-template-columns: 1fr auto; }
  .tally-row .thumbs, .tally-row .no-receipt { grid-column: 1; grid-row: 2; }
  .tally-row .amount { grid-column: 2; grid-row: 1; }
  .tally-row.pick { grid-template-columns: auto 1fr auto; }
  .tally-row.pick .thumbs, .tally-row.pick .no-receipt { grid-column: 2; grid-row: 2; }
  .tally-row.pick .amount { grid-column: 3; grid-row: 1; }
  .tally-foot { grid-template-columns: 1fr auto; }
  .tally-foot .button, .tally-foot button { grid-column: 1 / -1; }
  .head-row .button { width: 100%; }
  .worklist > li { grid-template-columns: 1fr auto; }
  .worklist > li > .button { grid-column: 1 / -1; }
  .worklist .stmt-row { grid-template-columns: 1fr auto; }
  .pay-form { grid-template-columns: 1fr; }
  .trio { grid-template-columns: 1fr 1fr; }
  fieldset.paid-by { grid-template-columns: 1fr; }
  .card-group .worklist > li { grid-template-columns: 1fr auto; }
  .trio label:last-child { grid-column: 1 / -1; }
  form.action-box { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .nav, .crumb, .after, .tally-foot .primary { display: none; }
  .top { background: #fff; } .top .mark-sub strong { color: var(--navy); }
  body { background: #fff; }
  .tally-foot { background: #fff; color: var(--ink); border: 1px solid var(--line); position: static; }
}

/* 0.8.0 Money in */
.status-open { background: var(--wait-bg); color: var(--wait); }
.status-no_charge { background: var(--ground); color: var(--ink-soft); }
a.status { text-decoration: none; }
.money-tiles { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 1.25rem; }
.tile { display: grid; gap: .15rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.2rem; min-width: 14rem; }
.tile-label { font-size: .88rem; color: var(--ink-soft); font-weight: 500; }
.tile-value { font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.tile-sub { font-size: .85rem; color: var(--ink-soft); }
.filter-form { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin: 0 0 1.25rem; }
.filter-form label { display: grid; gap: .2rem; font-size: .88rem; font-weight: 500; }
.filter-form select { max-width: 22rem; }
.reg-filters label.wide { flex: 1 1 100%; }
.reg-filters label.wide select { max-width: 100%; width: 100%; }
.reg-filters input[type=search] { width: 14rem; max-width: 100%; }
.filter-buttons { display: flex; gap: .75rem; align-items: center; padding-bottom: .2rem; }
.result-line { margin: -.5rem 0 1rem; }
.venue-box { background: #F4F7FA; border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; margin: 0 0 1.5rem; }
.venue-box h2 { margin: 0; }
.venue-box p { margin: .5rem 0; }
.venue-counts { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .4rem .6rem; }
.venue-counts li { border: 1px solid var(--line); border-radius: 999px; padding: .15rem .7rem; background: #fff; }
.change-list { margin: .5rem 0; padding-left: 1.2rem; }
.compare-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 0 0 1.5rem; }
.compare-files h3 { margin: 0 0 .25rem; }
.compare tr.same td, .compare tr.same th { color: var(--ink-soft); }
.compare tr.changed th { color: var(--ink); }
.compare .diff-on { background: #FFF3C4; border-radius: 4px; padding: 0 .25rem; }
.compare tr.changed td.pre { background: #FFF8DD; }
.email-box .email-text { background: #F4F7FA; border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; max-height: 28rem; overflow: auto; white-space: pre-wrap; }
.tag-warn { background: #F6D365; }
.tag-edit { background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); }
details.history summary { cursor: pointer; }
.form.narrow { display: grid; gap: .75rem; max-width: 26rem; }
.form.narrow label { display: grid; gap: .25rem; font-weight: 500; }
@media (max-width: 600px) { .filter-form label, .reg-filters input[type=search] { flex: 1 1 100%; width: 100%; } .filter-form select { max-width: 100%; width: 100%; } }
.filter-form label.check { display: flex; align-items: center; gap: .4rem; padding-bottom: .55rem; }
.grid td.wrap { white-space: normal; min-width: 14rem; }
.grid td.soft { white-space: normal; }
.totals { display: grid; gap: .3rem; margin: 1rem 0 0 auto; max-width: 20rem; }
.totals div { display: flex; justify-content: space-between; gap: 1rem; }
.totals dt { color: var(--ink-soft); }
.totals dd { margin: 0; }
.totals .grand { border-top: 1px solid var(--line); padding-top: .35rem; font-weight: 700; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.check-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.check-item p { margin: .5rem 0; }
.check-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.check-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: .75rem; }
.check-actions form { margin: 0; }
.grid.diff td, .grid.diff th { white-space: pre-wrap; vertical-align: top; }
.event-group { margin: 0 0 2rem; }
.event-group h2 { margin: 0; }

/* 0.8.3 card activity */
.range-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin: 0 0 1rem; }
.range-form label { flex: 0 1 11rem; }
.range-form button { min-height: 2.6rem; }
.tail { display: block; font-size: .88rem; margin-top: .25rem; }
.checklist .how { display: block; font-weight: 400; font-size: .9rem; color: var(--ink-soft); }
.howto { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.25rem; }
.howto summary { cursor: pointer; font-weight: 600; }
.howto-steps { margin: .75rem 0 .5rem; padding-left: 1.4rem; display: grid; gap: .3rem; }
.howto p { margin: .4rem 0 0; }
.nowrap { white-space: nowrap; }
.tail .flag-inline, .tail .ok-inline { white-space: normal; display: block; }
.tail { overflow-wrap: anywhere; }

/* 0.8.4 Events: same-day suggestions, aliases */
.suggest-box { background: #FFF8E1; border: 1px solid #F6D365; border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 2rem; }
.suggest-box h2 { margin: 0 0 .4rem; }
.suggest-group { margin-top: 1.2rem; }
.suggest-group h3 { font-size: 1rem; margin: 0 0 .5rem; }
.suggest-group form { margin: 0; }
.suggest-merge { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .6rem !important; }
.alias-list ul { margin: .25rem 0 .5rem; padding-left: 1.2rem; }
.alias-list li { margin: .15rem 0; }
form.inline { display: inline; }
.suggest-group .grid td { white-space: normal; }
.suggest-group .grid td:last-child, .suggest-group .grid th, .suggest-group .grid th.num, .suggest-group .grid td.num { white-space: nowrap; }
.suggest-group .grid td:first-child { min-width: 13rem; }
.not-same { margin-top: .3rem !important; }
.not-same button { font-size: .85rem; }

/* 0.9.0 Payments received, other invoices, notes on records */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.status-part_paid { background: #E0E9F3; color: var(--navy); }
.status-void, .status-cancelled { background: var(--ground); color: var(--ink-soft); text-decoration: line-through; }
.cheque-shot { display: grid; gap: .75rem; justify-items: start; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1.5rem; }
.big-button { font-size: 1.1rem; padding: .9rem 1.5rem; min-height: 3.4rem; cursor: pointer; }
.big-button.busy { opacity: .7; pointer-events: none; }
.shot-more { display: grid; gap: .75rem; width: 100%; max-width: 26rem; }
.reading { font-weight: 600; color: var(--action); margin: 0; }
.reading::before { content: ""; display: inline-block; width: .9rem; height: .9rem; margin-right: .5rem; border: 2px solid var(--brand); border-top-color: var(--action); border-radius: 50%; vertical-align: -2px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.after-tabs { margin: -.25rem 0 1rem; }
.pr-tabs { margin-top: 1.5rem; }
.pr-list > li { grid-template-columns: 1fr 7.5rem auto; }
.pr-layout { display: grid; gap: 1.5rem; margin-bottom: 1.5rem; }
.pr-layout.with-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.pr-photo { display: grid; gap: .75rem; position: sticky; top: 1rem; }
.pr-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.pr-facts { margin-top: 0; }
.pr-facts .pr-paid { flex-basis: 100%; }
.pr-paid-list { margin: .1rem 0 0; padding: 0; }
.pr-paid-list li { margin: 0 0 .35rem; }
.pr-paid-sub { font-weight: 400; color: var(--ink-soft); font-size: .92rem; }
.dep-paid { max-width: 32rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
@media (max-width: 600px) { .dep-paid { max-width: 11rem; } }
.unsure input, .unsure .money-input { border-color: #E2A33B; background: #FFF8EA; box-shadow: 0 0 0 2px rgba(226, 163, 59, .25); }
.check-this { font-size: .75rem; font-weight: 700; color: #9A5B00; background: #FFE9C2; border-radius: 4px; padding: 0 .35rem; margin-left: .3rem; }
details.bank summary { cursor: pointer; font-weight: 600; color: var(--action); padding: .3rem 0; }
details.bank[open] { display: grid; gap: .5rem; }
.apply-list { list-style: none; margin: 0 0 1rem; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.apply-row { display: grid; grid-template-columns: 1fr 9rem; gap: .75rem; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.apply-row:last-child { border-bottom: 0; }
.apply-pick { display: flex; gap: .75rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.apply-pick input { width: 1.4rem; height: 1.4rem; min-height: 0; margin-top: .1rem; accent-color: var(--action); flex: none; }
.apply-main { display: grid; gap: .1rem; min-width: 0; }
.apply-title { font-weight: 600; overflow-wrap: anywhere; }
.apply-row:has(input[name=pick]:checked) { background: #F2F8E6; }
.empty-line { color: var(--ink-soft); margin: 0 0 1rem; }
.lookup-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: 0 0 1.5rem; }
.lookup-row label { flex: 1 1 16rem; max-width: 24rem; }
.new-other { border: 1px dashed var(--brand); border-radius: var(--radius); padding: 1rem; margin: 0 0 .75rem; display: grid; gap: .75rem; background: var(--paper); }
.new-other legend { font-weight: 600; padding: 0 .3rem; }
.pr-total { margin: 1.25rem 0 .75rem; font-weight: 600; font-size: 1.05rem; }
.pr-total.left { color: var(--wait); }
.pr-total.over { color: var(--danger); }
.pr-save { position: sticky; bottom: 0; background: var(--ground); padding: .75rem 0; }
.pr-box { margin-top: 2rem; }
.history-list li { display: block; }
/* notes */
.notes-btn { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--action); border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .25rem .7rem; }
.notes-btn.has-waiting { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.notes-btn .count { padding: 0 .45rem; }
.notes-panel { margin-top: 2.5rem; }
.note-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.note-item { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: .75rem 1rem; display: grid; gap: .35rem; }
.note-item.waiting { border-left-color: var(--lime); }
.note-meta { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .9rem; }
.note-meta span { color: var(--ink-soft); }
.note-body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.note-seen { margin: 0; color: var(--ok); font-size: .88rem; font-weight: 600; }
.note-wait { margin: 0; color: var(--wait); font-size: .88rem; font-weight: 600; }
.note-actions { display: flex; align-items: center; gap: .75rem; margin: 0; }
.note-edit summary { cursor: pointer; }
.note-edit form { margin-top: .5rem; }
.note-add { max-width: 40rem; }
.note-mark { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 .4rem; vertical-align: middle; white-space: nowrap; }
.note-mark.waiting { background: var(--lime); color: var(--navy); border-color: var(--lime); }
.note-rows > li { grid-template-columns: 1fr 0 auto; }
.note-rows > li.waiting { box-shadow: inset 4px 0 0 var(--lime); }
.cat-list li { display: grid; gap: .25rem; }
@media (max-width: 40rem) {
  .pr-layout.with-photo { grid-template-columns: 1fr; }
  .pr-photo { position: static; }
  .apply-row { grid-template-columns: 1fr; }
  .apply-amt { margin-left: 2.1rem; }
  .pr-list > li { grid-template-columns: 1fr auto; }
  .pr-list > li > :last-child { grid-column: 1 / -1; }
  .drop-target { display: none; }
  .big-button { width: 100%; }
  .cheque-shot { justify-items: stretch; }
}

/* BCLMA invoices (0.9.2) */
.status-replaced { background: #F8E7DF; color: var(--danger); }
.revised-flag { display: inline-block; border: 2px solid var(--danger); color: var(--danger); font-weight: 700; letter-spacing: .04em; padding: .2rem .6rem; border-radius: 4px; }
.revised-flag a { color: inherit; }
.lines-table td { vertical-align: top; }
.lines-table label { font-size: .85rem; }
.lines-table .pair.tight { gap: .5rem; margin-bottom: .3rem; }
.lines-table .money-input input { width: 7rem; }
fieldset.choice { border: 1px solid var(--line, #c9d2da); border-radius: 6px; padding: .6rem .9rem; }
fieldset.choice input[name=outside_number] { margin-top: .3rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin: .5rem 0 1rem; }
h2.inline { display: inline; font-size: 1.1rem; }

/* Payments made (0.9.4) */
.status-void { background: #ECEEF1; color: var(--ink-soft); }
.void-row td { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.void-row td:nth-child(7) { text-decoration: none; }
.pay-group { margin: 1rem 0 0; }
.pay-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .7rem 1.1rem; background: #F7F9FC; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.pay-group-head strong { flex: 1 1 auto; }
.worklist.grouped { border-radius: 0 0 var(--radius) var(--radius); margin-bottom: 1rem; }
.worklist.grouped .pay-row { grid-template-columns: auto 1fr 7.5rem; }
.worklist.grouped .pay-row .pick { margin: 0; }
.pay-alone { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: .5rem; }
.pm-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1rem; margin: 0 0 1rem; }
.pm-filters label { display: flex; flex-direction: column; font-size: .88rem; }
.pm-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.pm-totals h2 { font-size: 1rem; }

/* 0.9.5 monthly archive */
.password-shown code { font-size: 1.25rem; letter-spacing: .04em; padding: .35rem .6rem; background: #fff; border: 1px solid #9aa6b2; border-radius: 4px; user-select: all; }
.status-failed { background: #F8E7DF; color: var(--danger); }

/* 0.9.7: footer with the privacy link; the privacy notice */
.site-footer { max-width: var(--page-max); margin: 2rem auto 1.5rem; padding: 0 var(--page-pad); font-size: .85rem; color: #555; }
.site-footer a { color: inherit; }
.privacy { max-width: 46rem; }
.privacy ul { padding-left: 1.2rem; }

/* 0.9.9 Monthly report */
.banner-draft { background: #fff7e6; border: 1px solid #e0a43a; border-radius: 6px; padding: .6rem .8rem; }
.filters-form { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; margin: 1rem 0; }
.filters-form label { display: flex; flex-direction: column; font-size: .85rem; }
.bk { white-space: nowrap; font-size: .85rem; }
.bk-backed { color: #1d6b3a; } .bk-record { color: #8a6100; } .bk-none { color: #b42318; font-weight: 600; }
.report-lines td:nth-child(2) a { font-weight: 500; }
.check-line { margin: .4rem 0 .8rem; }
.trail { padding-left: 1.4rem; } .trail li { margin: .2rem 0; }
/* 0.9.16 lines made by the bank, not by BCLMA */
.bk-explained { color: #1d5b8a; }
.made-by-bank { background: #eef4fb; border: 1px solid #8fb0d3; border-left: 6px solid var(--navy); border-radius: var(--radius);
  padding: .9rem 1.1rem; margin: 0 0 1.4rem; display: grid; gap: .45rem; }
.made-by-bank p { margin: 0; }
.made-by-bank .made-title { font-size: 1.1rem; color: var(--navy); }
.made-by-bank.made-fee, .made-by-bank.made-interest { border-left-color: var(--brand); }
.made-label { font-weight: 600; }
.tag-bank { display: inline-block; background: var(--navy); color: #fff; border-radius: 4px; padding: 0 .4rem;
  font-size: .78rem; font-weight: 600; white-space: nowrap; }
tr.by-bank td { background: #f3f7fc; }
.transfer-guess { background: #fff9e8; border: 1px dashed #c99a2e; border-radius: var(--radius); padding: .8rem 1.1rem;
  margin: 0 0 1.4rem; display: grid; gap: .5rem; }
.transfer-guess p, .transfer-guess ul { margin: 0; }
.transfer-guess .worklist > li { grid-template-columns: 1fr auto; }
.tag-guess { color: #8a6100; font-weight: 600; white-space: nowrap; }
@media print {
  header, nav, .no-print, .site-footer, .notes-btn, .banner { display: none !important; }
  body { background: #fff; } .page { max-width: none; padding: 0; }
  .report-account { break-inside: auto; } .table-wrap { overflow: visible; }
  a { color: inherit; text-decoration: none; }
}
.mail-in .flag-inline { white-space: normal; }
.email-backup { margin: .5rem 0 1rem; padding-left: 1.2rem; }

/* Data tables (0.9.15; Allan, 2026-11-10): smaller text and tighter cells so most of a list fits on screen. Short
   columns (dates, types, statuses, numbers like B…/INV…/PM…, money and balances) never wrap; only descriptive columns
   (td.wrap, td.soft, the description column of statement/bank lines and of the monthly report) wrap. A table too wide
   for the screen scrolls sideways inside its own .table-wrap box, never the page. */
.grid { font-size: .85rem; }
.grid th, .grid td { padding: .45rem .65rem; }
.grid th { font-size: .78rem; }
.grid td.amount, .grid td.num, .grid th.num { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.grid td.amount { font-size: .9rem; }
.grid.stmt-lines td { white-space: nowrap; overflow-wrap: normal; }
.grid.stmt-lines td:nth-child(2), .grid.report-lines td:nth-child(2), .grid td.wrap, .grid td.soft { white-space: normal; overflow-wrap: anywhere; }
.grid.stmt-lines td:nth-child(2), .grid.report-lines td:nth-child(2) { min-width: 12rem; }
.grid td.wrap { min-width: 10rem; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media print { .grid { font-size: 8.5pt; } .grid th, .grid td { padding: 2pt 4pt; } }
/* 0.9.25 Payments received: filters, totals, sortable table */
.pr-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .8rem; margin: 0 0 .8rem; padding: .8rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.pr-filters label { display: flex; flex-direction: column; font-size: .85rem; gap: .15rem; }
.pr-filters input, .pr-filters select { min-width: 0; }
.pr-filters input[name=amount], .pr-filters input[name=min], .pr-filters input[name=max] { width: 7.5rem; }
.pr-filters .pr-q { flex: 1 1 18rem; }
.pr-filters .pr-q input { width: 100%; }
.pr-filter-buttons { display: flex; gap: .6rem; align-items: center; }
.pr-totals { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin: 0 0 .8rem; }
.pr-totals p { margin: 0; }
.grid td.wrap { white-space: normal; min-width: 9rem; }
.grid td.pr-dep { min-width: 12rem; max-width: 18rem; }
.grid td.pr-dep .hint { font-size: .8rem; }
.grid th a.sort { color: inherit; text-decoration: none; }
.grid th a.sort:hover, .grid th a.sort.on { color: var(--navy); text-decoration: underline; }
abbr.est { font-size: .8rem; color: var(--ink-soft); text-decoration: none; }
@media (max-width: 600px) { .pr-filters label { flex: 1 1 45%; } .pr-filters .pr-q { flex-basis: 100%; } .pr-filters input[name=amount], .pr-filters input[name=min], .pr-filters input[name=max] { width: 100%; } }
/* 0.9.25 deposit builder: find cheques, running total against the bank */
.dep-find { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .8rem; margin: 0 0 .5rem; }
.dep-find label { display: flex; flex-direction: column; font-size: .85rem; gap: .15rem; }
.dep-find .pr-q { flex: 1 1 16rem; }
.dep-find label.tick-only { flex-direction: row; align-items: center; gap: .35rem; }
.dep-cheques li[hidden] { display: none; }
.dep-tally { position: sticky; bottom: 0; z-index: 2; background: var(--navy); color: #fff; border-radius: var(--radius); padding: .8rem 1rem; }
.dep-tally p { margin: 0; }
.dep-tally .ok-inline { color: #CDEB8B; font-size: 1rem; }
.dep-tally .flag-inline { color: #fff; background: var(--danger); padding: 0 .3rem; border-radius: 4px; }
@media (max-width: 600px) { .dep-find label { flex: 1 1 45%; } .dep-find .pr-q { flex-basis: 100%; } }
.dep-cheques > li { display: block; padding: .55rem 1.1rem; }
.dep-cheques .tick-row { display: grid; grid-template-columns: auto 1fr 7.5rem; align-items: center; gap: .9rem; font-weight: 400; }
/* 0.9.52: the tick box's own tap area (44px), so the rest of the row can hold links */
label.tick-hit { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -.35rem; cursor: pointer; flex: none; }
label.tick-hit input { width: 1.3rem; height: 1.3rem; min-height: 0; padding: 0; margin: 0; accent-color: var(--action); cursor: pointer; }
.new-tab { color: var(--ink-soft); font-size: .85em; }
.dep-cheques .tick-row input, .dep-find .tick-only input { width: 1.3rem; height: 1.3rem; min-height: 0; padding: 0; accent-color: var(--action); }
.dep-cheques .tick-row .amount { text-align: right; }
.dep-find input:not([type=checkbox]) { min-height: 2.5rem; padding: .45rem .6rem; }
.dep-find #dep-amount { width: 12rem; }
/* 0.9.26 many stubs or cheques at once */
.stub-upload { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin: 0 0 1.5rem; padding: 1.1rem 1.25rem; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: var(--radius); }
.stub-upload .hint, .stub-upload .reading { flex-basis: 100%; }
.stub-drop { flex: 1 1 14rem; border: 2px dashed var(--line); border-radius: var(--radius); padding: .9rem 1rem; text-align: center; color: var(--ink-soft); cursor: pointer; }
.stub-drop.over { border-color: var(--action); background: #EEF4FB; color: var(--ink); }
.stub-progress { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; margin: 0 0 1.25rem; }
.stub-progress p { margin: 0; }
.stub-progress progress { flex: 1 1 100%; height: .7rem; accent-color: var(--action); }
.stub-list > li.stub-row { grid-template-columns: 4.5rem 1fr 7.5rem; }
.stub-thumb { display: flex; align-items: center; justify-content: center; width: 4.5rem; height: 3rem; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--ground); font-size: .7rem; color: var(--ink-soft); text-decoration: none; }
.stub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.received-box { display: grid; gap: .35rem; }
.received-box label.held { font-weight: 500; font-size: .9rem; display: flex; gap: .45rem; align-items: center; }
.received-box label.held input { width: 1.2rem; height: 1.2rem; min-height: 0; padding: 0; }
.problem.already .worklist { margin: .5rem 0 0; }
.problem.already form { margin: 0; }
@media (max-width: 600px) { .stub-list > li.stub-row { grid-template-columns: 4.5rem 1fr; } .stub-list .amount { grid-column: 2; } }
.problem.already .worklist > li.pay-row { grid-template-columns: 1fr auto; }
/* 0.9.27 a deposit's bank lines, in the bank's words */
.bank-cands { margin: .3rem 0 0; padding-left: 1.1rem; }
.bank-cands li { margin: .3rem 0; }
.bank-cands .inline-form { margin-left: .4rem; }

/* 0.9.29 Deposits list: one row per bank money-in line */
.dep-controls { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: flex-end; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: 1rem 0; }
.dep-controls label { display: flex; flex-direction: column; font-size: .85rem; font-weight: 600; color: var(--ink-soft); gap: .2rem; }
.dep-controls label.check { flex-direction: row; align-items: center; gap: .4rem; font-size: 1rem; color: var(--ink); padding-bottom: .35rem; }
.dep-controls select { min-width: 11rem; }
.dep-summary { margin: 0 0 1rem; }
.dep-missing-total { color: #8A4B00; font-weight: 600; }
.dep-list { display: flex; flex-direction: column; gap: .6rem; }
.dep-row { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; }
.dep-row.dep-complete { border-left-color: var(--lime); }
.dep-row.dep-missing { border-left-color: #E39A3B; }
.dep-row.dep-over { border-left-color: var(--danger); }
.dep-row.dep-notbank { border-left-color: #C9B83A; }
.dep-head { display: grid; grid-template-columns: 7.5rem 1fr auto auto; gap: .25rem 1rem; align-items: center; }
.dep-date { font-weight: 600; white-space: nowrap; }
.dep-bank { overflow-wrap: anywhere; }
.dep-amt { font-weight: 700; white-space: nowrap; text-align: right; }
.dep-status { text-align: right; }
.status-complete { background: var(--ok-bg); color: var(--ok); }
.status-missing { background: #FBE6CC; color: #8A4B00; }
.status-over { background: #F8E7DF; color: var(--danger); }
.status-explained { background: var(--ground); color: var(--ink-soft); }
.status-notbank { background: var(--wait-bg); color: var(--wait); }
.dep-pays { width: 100%; border-collapse: collapse; margin: .5rem 0 0; font-size: .92rem; }
.dep-pays th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--line); padding: .15rem .4rem; }
.dep-pays td { padding: .2rem .4rem; border-bottom: 1px solid #EEF1F4; }
.dep-pays th:first-child, .dep-pays td:first-child { width: 8rem; padding-left: 0; }
.dep-pays .num { text-align: right; padding-right: 0; }
.dep-explain, .dep-note { margin: .45rem 0 0; }
.dep-could { margin: .5rem 0 0; padding: .45rem .7rem; background: #FFF8EC; border-radius: 8px; }
.dep-could-head { margin: 0 0 .2rem; font-size: .85rem; font-weight: 600; color: #8A4B00; }
.dep-could ul { list-style: none; margin: 0; padding: 0; }
.dep-could li { padding: .2rem 0; }
.dep-could li + li { border-top: 1px dashed #EBD9BC; }
.dep-could .inline-form { display: inline; margin-left: .4rem; }
.dep-actions { margin: .5rem 0 0; font-size: .92rem; }
@media (max-width: 40rem) {
  .dep-head { grid-template-columns: 1fr auto; }
  .dep-bank { grid-column: 1 / -1; grid-row: 2; }
  .dep-status { grid-column: 1 / -1; text-align: left; }
  .dep-controls select { min-width: 0; width: 100%; }
}
.dep-note .inline-form { display: inline; margin: 0 0 0 .4rem; }

/* 0.9.30 uploads that stay on the page (app/static/drop.js) */
.upload-results { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; margin: 1rem 0; }
.upload-results-head { margin: 0 0 .3rem; font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.upload-results ul { list-style: none; margin: 0; padding: 0; }
.upload-results li { padding: .35rem 0; border-top: 1px solid #EEF1F4; overflow-wrap: anywhere; }
.upload-results li:first-child { border-top: 0; }
.upload-results .up-mark { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 0 .5rem; margin-right: .45rem; background: var(--ground); color: var(--ink-soft); }
.upload-results .up-ok .up-mark { background: var(--ok-bg); color: var(--ok); }
.upload-results .up-person .up-mark { background: #FBE6CC; color: #8A4B00; }
.upload-results .up-problem .up-mark { background: #F8E7DF; color: var(--danger); }
.upload-results .up-said { display: block; color: var(--ink-soft); font-size: .92rem; }
.upload-results .up-problem .up-said { color: var(--danger); font-weight: 600; }
.upload-results .up-link { font-size: .9rem; }
.upload-results .up-busy, .upload-results .up-waiting { color: var(--ink-soft); font-style: italic; }

/* 0.9.30 account names ("Chequing" + quiet "CIBC") and highlighted accounts (BMO, closing soon: light blue) */
:root { --acct-blue-bg: #E3F0FB; --acct-blue-edge: #7FB0DA; }
.acct-bank { font-size: .78em; font-weight: 500; color: var(--ink-soft); letter-spacing: .02em; margin-left: .15em; }
.filters a.on .acct-bank, .top .acct-bank { color: inherit; opacity: .8; }
.acct-hl-blue { background: var(--acct-blue-bg); }
li.acct-hl-blue, section.acct-hl-blue { box-shadow: inset 4px 0 0 var(--acct-blue-edge); }
section.report-account.acct-hl-blue { padding: .5rem 1rem 1rem; border-radius: var(--radius); }
tr.acct-hl-blue td { background: var(--acct-blue-bg); }
.filters a.acct-hl-blue:not(.on) { background: var(--acct-blue-bg); border-color: var(--acct-blue-edge); }
@media print {
  .acct-hl-blue, tr.acct-hl-blue td { background: none !important; box-shadow: none !important; }
  section.acct-hl-blue { border-left: 2pt solid #7FB0DA; padding-left: 6pt; }
}

/* 0.9.32 subsections */
.tag-sub { background: #E3ECF5; color: var(--navy); font-weight: 600; }
.sub-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .75rem; margin: 1rem 0 1.25rem; }
.sub-tile { background: #fff; border-radius: var(--radius); padding: .8rem 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.sub-tile .k { display: block; font-size: .8rem; color: #55606B; }
.sub-tile .v { display: block; font-size: 1.35rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.sub-tile .s { display: block; font-size: .78rem; color: #55606B; }
.sub-tile.left-neg .v { color: #A4282A; }
td.neg, span.neg { color: #A4282A; }
.event-share { margin: .25rem 0 .5rem; }
.event-share summary { cursor: pointer; font-size: .9rem; }
.sub-tile.muted .v { color: #7A848D; }
.chair-form select { max-width: 12rem; }
.row-total td { font-weight: 700; border-top: 2px solid var(--navy); }
.sub-lines select { max-width: 16rem; }

/* 0.9.34 help clouds */
.help-cloud { position: absolute; z-index: 40; max-width: 22rem; background: #fff; color: var(--ink); border: 2px solid var(--navy); border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 20, 45, .28); padding: .8rem 1rem; }
.help-cloud:focus { outline: 3px solid var(--lime); outline-offset: 2px; }
.help-cloud.help-below::before { content: ""; position: absolute; top: -10px; left: 1.4rem; border: 9px solid transparent; border-top: 0; border-bottom-color: var(--navy); }
.help-cloud.help-floating { position: absolute; }
.help-cloud.help-right::before { left: auto; right: 1.1rem; }
.help-title { margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; color: #55606B; text-transform: uppercase; letter-spacing: .03em; }
.help-body { line-height: 1.45; }
.help-actions { display: flex; gap: .5rem; align-items: center; margin-top: .7rem; }
.help-target { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
.help-q { float: right; position: relative; z-index: 5; margin: 0 0 .5rem .75rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 0; background: var(--navy); color: #fff; font-size: 1.25rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 20, 45, .3); }
.help-q:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.help-edit-bar { position: fixed; z-index: 35; left: 1rem; bottom: 1rem; right: 1rem; max-width: 40rem; background: var(--lime); color: var(--navy); border-radius: var(--radius); padding: .5rem .8rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-weight: 600; }
.help-pick { outline: 3px dashed var(--navy) !important; cursor: crosshair; }
.help-preview { background: #F7F9FB; border-radius: var(--radius); padding: .6rem .8rem; margin-top: .4rem; }
@media (max-width: 640px) {
  .help-cloud, .help-cloud.help-floating { position: fixed; left: .5rem; right: .5rem; bottom: 1rem; top: auto; max-width: none; }
  .help-cloud.help-below::before { display: none; }
}
@media print { .help-cloud, .help-q, .help-edit-bar { display: none; } }
/* 0.9.35 member firms */
.firm-check { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: .7rem 1rem; }
.firm-check form { margin-top: .4rem; }
fieldset.plain { border: 0; padding: 0; margin: 0; display: contents; }
.member-title { color: var(--ink-soft); font-size: .85rem; }

/* 0.9.36 What is this cheque for? */
.purpose-q { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1.1rem; margin: 1.5rem 0; display: grid; gap: .35rem; }
.purpose-q legend { font-weight: 700; font-size: 1.1rem; padding: 0 .3rem; }
.purpose-q.must { border: 2px solid #c99a2e; background: #fff9e8; }
.purpose-q .hint { margin: 0 0 .25rem; }
.purpose-choice { font-size: 1rem; }
.problem ul { margin: .35rem 0 .35rem 1.2rem; padding: 0; }
.problem.payee-check .worklist, .problem.own-cheque .worklist { margin: .5rem 0; }
.problem.payee-check form { margin: 0; }
.override { border-left: 3px solid var(--danger); padding: .4rem .8rem; margin: .8rem 0; display: grid; gap: .4rem; }
.own-mark fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; display: grid; gap: .3rem; }
.own-cheque-box .cheque-thumb { max-width: 22rem; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-top: .5rem; display: block; }
.needs-admin { color: var(--danger); font-weight: 600; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* 0.9.37 coverage: "every transaction up to today?" and "No transactions up to…" */
.complete-dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; max-width: 30rem; width: calc(100% - 32px); }
.complete-dialog::backdrop { background: rgba(0, 30, 60, .35); }
.complete-dialog form { display: grid; gap: .6rem; }
.complete-dialog p { margin: 0; }
.complete-dialog .fname { font-family: var(--mono, monospace); font-size: .9rem; word-break: break-all; }
.complete-q { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; display: grid; gap: .3rem; }
.coverage-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; margin: .8rem 0; }
.coverage-box p { margin: .2rem 0; }

/* 0.9.38 Month end drop box */
.month-drop { margin: 0 0 1.2rem; }
.month-drop-zone { display: grid; gap: .3rem; justify-items: start; border: 2px dashed var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; background: #fff; cursor: pointer; }
.month-drop-zone.dragging { background: #EAF3D6; border-color: var(--lime); border-style: solid; }  /* 0.9.56: green, as every drop box */
.month-drop-zone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.md-rows { list-style: none; margin: .6rem 0; padding: 0; display: grid; gap: .5rem; }
.md-row { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; }
.md-row .md-name { font-weight: 600; word-break: break-all; }
.md-row .md-note, .md-row .md-opts { flex-basis: 100%; }
.md-row .md-opts { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
.md-busy { opacity: .6; }

/* 0.9.44 Payment details for CMO */
.cmo-box { margin: .5rem 0; padding: .6rem .8rem; border: 1px solid var(--line, #d6dde3); border-radius: 8px; background: #F6F9FB; }
.cmo-head { margin: 0 0 .3rem; }
.cmo-line { margin: 0 0 .4rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.cmo-text { font-size: 1.05rem; padding: .15rem .4rem; background: #fff; border-radius: 4px; }
.pay-to-row { flex-basis: 100%; font-size: .9rem; }
.pay-to .flag-inline { margin-left: .2rem; }

/* 0.9.51 Invoices list (Money in -> Invoices): Total and Owing always in view. Wide page, tighter cells, the event or
   description clamped to 2 lines (full text in its tooltip), status and how it's paid on one line; on a phone each
   invoice is a small card with the amounts on the right. */
.grid.inv-list th, .grid.inv-list td { padding: .55rem .65rem; vertical-align: top; }
.grid.inv-list td.who { white-space: normal; min-width: 8rem; max-width: 14rem; overflow-wrap: anywhere; }
.grid.inv-list td.what { white-space: normal; min-width: 11rem; max-width: 24rem; }
.grid.inv-list td.what .hint { display: block; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid.inv-list td.st .status { font-size: .78rem; padding: .1rem .5rem; }
@media (max-width: 640px) {
  .grid.inv-list thead { display: none; }
  .grid.inv-list, .grid.inv-list tbody { display: block; }
  .grid.inv-list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .75rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
  .grid.inv-list tr:last-child { border-bottom: 0; }
  .grid.inv-list td { display: block; padding: 0; border: 0; min-width: 0; max-width: none; }
  .grid.inv-list td.inv { grid-column: 1; grid-row: 1; }
  .grid.inv-list td.inv br { display: none; }
  .grid.inv-list td.total { grid-column: 2; grid-row: 1; }
  .grid.inv-list td.who { grid-column: 1; grid-row: 2; }
  .grid.inv-list td.owing { grid-column: 2; grid-row: 2; }
  .grid.inv-list td.what { grid-column: 1 / -1; grid-row: 3; }
  .grid.inv-list td.date { grid-column: 1 / -1; grid-row: 4; display: inline; font-size: .85rem; color: var(--ink-soft); }
  .grid.inv-list td.st { grid-column: 1 / -1; grid-row: 5; }
  .grid.inv-list td.total::before { content: "Total "; font-weight: 400; font-size: .78rem; color: var(--ink-soft); }
  .grid.inv-list td.owing:not(:empty)::before { content: "Owing "; font-weight: 400; font-size: .78rem; color: var(--ink-soft); }
}
.worklist .pay-row:has(> label.tick-hit) { grid-template-columns: auto 1fr 7.5rem; }
/* 0.9.52 note markers show their notes on hover, focus or tap (static/note_peek.js) */
button.note-mark { font: inherit; font-size: .75rem; font-weight: 700; line-height: 1.35; min-height: 0; margin: 0; cursor: pointer; background: transparent; box-shadow: none; text-transform: none; letter-spacing: 0; }
button.note-mark.waiting { background: var(--lime); }
button.note-mark:hover { border-color: var(--action); color: var(--ink); }
button.note-mark:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
@media (pointer: coarse) { button.note-mark { position: relative; } button.note-mark::after { content: ""; position: absolute; inset: -12px -8px; } }
.note-peek { position: absolute; z-index: 60; width: min(22rem, calc(100vw - 16px)); max-height: 60vh; overflow: auto; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(15, 30, 60, .18); padding: .65rem .85rem; font-size: .88rem; text-align: left; }
.note-peek.sheet { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; max-height: 50vh; }
.note-peek p { margin: 0; }
.note-peek .peek-list { list-style: none; margin: 0; padding: 0; }
.note-peek .peek-list li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.note-peek .peek-list li:first-child { padding-top: 0; }
.note-peek .peek-meta { font-size: .78rem; color: var(--ink-soft); font-weight: 600; }
.note-peek .peek-body { white-space: pre-line; overflow-wrap: anywhere; }
.note-peek .peek-wait { font-size: .78rem; font-weight: 700; color: var(--navy); background: var(--lime); display: inline-block; padding: 0 .35rem; border-radius: 4px; margin-top: .2rem; }
.note-peek .peek-foot { padding-top: .45rem; font-size: .82rem; }
@media print { .note-peek { display: none; } }
@media (max-width: 600px) { .dep-cheques > li { padding: .45rem .7rem; } .dep-cheques .tick-row { grid-template-columns: auto 1fr auto; gap: .5rem; } }
/* 0.9.54 Receivables by firm (Invoices -> By firm) */
.adds-up { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; margin: .8rem 0; background: var(--card, #fff); }
.adds-up h2 { font-size: 1rem; margin: 0 0 .4rem; }
.combo-list { margin: 0 0 .4rem; padding-left: 1.1rem; }
.combo-list li { margin: .2rem 0; }
.firm-ar-sum { margin: .8rem 0 .4rem; }
.firm-ar { border: 1px solid var(--line); border-radius: 8px; background: var(--card, #fff); }
.firm-ar-head, .firm-ar-row > summary { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 8rem 8rem; gap: .75rem; align-items: baseline; padding: .5rem .8rem; }
.firm-ar-head { font-size: .8rem; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.firm-ar-head .num, .firm-ar-row > summary .num { text-align: right; font-variant-numeric: tabular-nums; }
.firm-ar-row { border-bottom: 1px solid var(--line); }
.firm-ar-row:last-child { border-bottom: 0; }
.firm-ar-row > summary { cursor: pointer; list-style: none; }
.firm-ar-row > summary::-webkit-details-marker { display: none; }
.firm-ar-row > summary .firm-name::before { content: "▸ "; color: var(--ink-soft); }
.firm-ar-row[open] > summary .firm-name::before { content: "▾ "; }
.firm-ar-row > summary .firm-name { font-weight: 600; overflow-wrap: anywhere; }
.firm-ar-row > summary .firm-name .hint { font-weight: 400; }
.firm-ar-row > summary .unit { display: none; }
.firm-ar-row > summary .owing { font-weight: 600; white-space: nowrap; }
.firm-ar-row[open] > summary { background: rgba(0, 0, 0, .03); }
.firm-ar-invoices { margin: 0 .8rem .7rem 1.6rem; width: calc(100% - 2.4rem); }
.firm-ar-invoices td.what { white-space: normal; }
@media (max-width: 640px) {
  .firm-ar-head { display: none; }
  .firm-ar-row > summary { grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .75rem; }
  .firm-ar-row > summary .firm-name { grid-column: 1; grid-row: 1; }
  .firm-ar-row > summary .owing { grid-column: 2; grid-row: 1; }
  .firm-ar-row > summary .n-inv, .firm-ar-row > summary .oldest { grid-column: 1 / -1; text-align: left; font-size: .85rem; color: var(--ink-soft); display: inline; }
  .firm-ar-row > summary .n-inv { grid-row: 2; }
  .firm-ar-row > summary .oldest { grid-row: 3; }
  .firm-ar-row > summary .unit { display: inline; }
  .firm-ar-invoices { margin: 0 .5rem .6rem; width: calc(100% - 1rem); }
  .firm-ar-invoices thead { display: none; }
  .firm-ar-invoices, .firm-ar-invoices tbody { display: block; }
  .firm-ar-invoices tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
  .firm-ar-invoices td { display: block; padding: 0; border: 0; }
  .firm-ar-invoices td.inv { grid-column: 1; grid-row: 1; }
  .firm-ar-invoices td.amount { grid-column: 2; grid-row: 1; }
  .firm-ar-invoices td.date { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-soft); }
  .firm-ar-invoices td.what { grid-column: 1 / -1; }
}
/* 0.9.55 an expense line whose payment has started: amount and GST shown, not changeable */
.money-input input[readonly] { background: #eef1f4; color: #444; }
.locked-hint { margin: 0; align-self: end; }
/* 0.9.57 "What is this line?" on a Monthly report line, and its notes near the top */
.fix-box { border-left-color: #c99a2e; }
.fix-box h2 { margin: 0; font-size: 1.15rem; }
.fix-box h3 { margin: 0; font-size: 1rem; }
.fix-box details.more { margin: 0; }
.fix-box .worklist { margin: 0; }
.line-notes-top { background: #f3f6fb; border: 1px solid var(--line); border-left: 4px solid #4a6fa5; border-radius: var(--radius);
  padding: .8rem 1.1rem; margin: 0 0 1.25rem; }
.line-notes-top p { margin: 0 0 .4rem; }
.line-notes-top blockquote { margin: 0 0 .6rem; white-space: pre-wrap; }
.line-notes-top blockquote footer { font-size: .85rem; color: var(--muted, #667); white-space: normal; }
@media print { .fix-box { display: none; } }
/* 0.9.58 Credit card income (Stripe): one row per group with Payments, Refunds and Net always in view; the name is
   clamped to two lines; opened lines are clamped too, amount on the right. A phone gets small cards. */
.inc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: .88rem; overflow: hidden; }
.inc-row { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem 7.5rem 8.5rem; gap: .2rem .8rem; align-items: center;
  padding: .5rem .8rem; border-bottom: 1px solid var(--line); }
.inc-head { background: #F7F9FC; color: var(--ink-soft); font-size: .78rem; font-weight: 600; padding-top: .45rem; padding-bottom: .45rem; }
.inc-head .inc-pay, .inc-head .inc-ref, .inc-head .inc-net { text-align: right; }
.inc .inc-pay, .inc .inc-ref, .inc .inc-net { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inc .amount { font-size: .9rem; }
.inc-net.amount { font-weight: 700; }
.inc-ref.amount { font-weight: 500; }
.inc-none { color: var(--ink-soft); font-weight: 400; }
.inc-word { display: none; }
.inc-name { min-width: 0; display: flex; flex-direction: column; gap: .05rem; }
.inc-label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-weight: 500; }
.inc-flag { color: var(--danger); font-weight: 700; }
.inc-sub { color: var(--ink-soft); font-size: .8rem; }
.inc-sub:empty { display: none; }
.inc-caret { display: inline-block; width: 1rem; color: var(--ink-soft); transition: transform .15s; }
details.inc-group[open] > summary .inc-caret { transform: rotate(90deg); }
.inc-group > summary { cursor: pointer; list-style: none; }
.inc-group > summary::-webkit-details-marker { display: none; }
.inc-group > summary:hover { background: #F4F7FA; }
.inc-group > summary:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }
.inc-group[open] > summary { background: #EEF4FB; }
.inc-unknown > summary, div.inc-unknown { background: #FFF6F4; }
.inc-lines { list-style: none; margin: 0; padding: 0 0 0 1.8rem; background: #FBFCFD; }
.inc-line { display: grid; grid-template-columns: 6.2rem 4.2rem minmax(0, 1.1fr) minmax(0, 1.3fr) 7rem; gap: .6rem; align-items: baseline;
  padding: .3rem .8rem .3rem 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.inc-line > span { min-width: 0; }
.inc-date, .inc-kind { white-space: nowrap; color: var(--ink-soft); }
.inc-refund .inc-kind { color: var(--danger); font-weight: 600; }
.inc-who, .inc-what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inc-what { color: var(--ink-soft); }
.inc-amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inc-more > summary { cursor: pointer; padding: .4rem .8rem .4rem 1.8rem; font-weight: 600; font-size: .82rem; color: var(--action); background: #FBFCFD; border-bottom: 1px solid var(--line); }
.inc-more[open] > summary { display: none; }
.inc-go { margin: 0; padding: .45rem .8rem .45rem 1.8rem; font-size: .82rem; background: #FBFCFD; border-bottom: 1px solid var(--line); }
.inc-foot .inc-row { grid-template-columns: minmax(0, 1fr) 8.5rem; background: #F7F9FC; }
.inc-foot .inc-total .inc-name { font-weight: 700; }
.inc-foot .inc-row:last-child { border-bottom: 0; }
.inc-unknown-note { white-space: normal; display: block; margin-top: .6rem; }
@media (max-width: 640px) {
  .inc-head { display: none; }
  .inc-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name net" "pay ref"; gap: .15rem .8rem; padding: .6rem .75rem; }
  .inc-row > .inc-name { grid-area: name; } .inc-row > .inc-net { grid-area: net; align-self: start; }
  .inc-row > .inc-pay { grid-area: pay; text-align: left; color: var(--ink-soft); font-size: .8rem; }
  .inc-row > .inc-ref { grid-area: ref; font-size: .8rem; }
  .inc-row .inc-pay b { font-weight: 600; }
  .inc-word { display: inline; }
  .inc-none { display: none; }
  .inc-foot .inc-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name net"; }
  .inc-lines { padding-left: .75rem; }
  .inc-line { grid-template-columns: 5.6rem minmax(0, 1fr) auto; grid-template-areas: "who who amt" "date what what"; gap: 0 .5rem; padding: .4rem .75rem .4rem 0; }
  .inc-line .inc-who { grid-area: who; } .inc-line .inc-amt { grid-area: amt; }
  .inc-line .inc-kind { display: none; }
  .inc-line .inc-date { grid-area: date; font-size: .78rem; }
  .inc-line .inc-what { grid-area: what; font-size: .78rem; }
  .inc-more > summary, .inc-go { padding-left: .75rem; }
}
@media print { .inc { font-size: 8.5pt; } .inc-row { padding: 2pt 4pt; } .inc-lines { display: none; } .inc-caret { display: none; } }
/* 0.9.59 a Stripe payout's "Every line in the payout": amount always in view on the right (fee and net under it), the
   name on one line and the description clamped to two; a phone gets small cards. */
.pl { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: .85rem; overflow: hidden; }
.pl-row { display: grid; grid-template-columns: 8.6rem minmax(0, 1.5fr) minmax(0, 1fr) 8.5rem; gap: .2rem .8rem; align-items: baseline;
  padding: .45rem .8rem; border-bottom: 1px solid var(--line); }
.pl-row > span { min-width: 0; }
.pl-head { background: #F7F9FC; color: var(--ink-soft); font-size: .78rem; font-weight: 600; }
.pl-date { white-space: nowrap; display: flex; flex-direction: column; }
.pl-kind { color: var(--ink-soft); font-size: .78rem; }
.pl-refund .pl-kind { color: var(--danger); font-weight: 600; }
.pl-who { display: flex; flex-direction: column; }
.pl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pl-desc { color: var(--ink-soft); font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pl-inv { overflow-wrap: anywhere; }
.pl-amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; }
.pl-amt .amount { font-weight: 600; }
.pl-fee { color: var(--ink-soft); font-size: .76rem; }
.pl-foot { grid-template-columns: minmax(0, 1fr) 8.5rem; background: #F7F9FC; font-weight: 700; border-bottom: 0; }
@media (max-width: 640px) {
  .pl-head { display: none; }
  .pl-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who amt" "date date" "inv inv"; gap: .15rem .6rem; padding: .55rem .75rem; }
  .pl-row > .pl-who { grid-area: who; } .pl-row > .pl-amt { grid-area: amt; }
  .pl-row > .pl-date { grid-area: date; flex-direction: row; gap: .4rem; font-size: .78rem; color: var(--ink-soft); }
  .pl-row > .pl-inv { grid-area: inv; font-size: .8rem; }
  .pl-foot { grid-template-areas: "who amt"; }
  .pl-foot > span:first-child { grid-area: who; }
}
/* 0.9.59 How it was paid: one line per payment, the amount on the right; deposit / bank line / refunds in small text. */
.how-paid { margin: 1rem 0 .6rem; }
.how-paid h2 { font-size: 1.05rem; margin-bottom: .4rem; }
.hp-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.hp-item { padding: .5rem .8rem; border-bottom: 1px solid var(--line); }
.hp-item:last-child { border-bottom: 0; }
.hp-main { display: grid; grid-template-columns: minmax(0, 1fr) auto 7.5rem; gap: .2rem .9rem; align-items: baseline; }
.hp-what { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.hp-date { white-space: nowrap; color: var(--ink-soft); font-size: .88rem; }
.hp-amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.hp-small { color: var(--ink-soft); font-size: .8rem; margin-top: .1rem; }
.hp-void .hp-what, .hp-void .hp-amt { text-decoration: line-through; color: var(--ink-soft); }
.hp-unlinked { margin: 0; }
.added-note { color: var(--ink-soft); font-size: .8rem; margin: .4rem 0 1.25rem; }
.how-paid + .hint { margin: 0; }
@media (max-width: 640px) {
  .hp-main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what amt" "date date"; }
  .hp-what { grid-area: what; } .hp-amt { grid-area: amt; } .hp-date { grid-area: date; font-size: .8rem; }
}
/* 0.9.60 Users list: wide page; names, firms and payment wrap at words, email at the @; no inline edits (the user
   page has every option); a phone gets one card per person. */
.grid.users-list td { white-space: normal; vertical-align: top; }
.grid.users-list th, .grid.users-list td { padding: .55rem .6rem; }
.grid.users-list td.u-name { min-width: 6rem; font-weight: 500; }
.grid.users-list td.u-email { overflow-wrap: anywhere; min-width: 8rem; }
.grid.users-list td.u-firm { min-width: 7.5rem; }
.grid.users-list td.u-pay { min-width: 7rem; }
.users-list .u-pay .flag-inline { white-space: normal; }
.grid.users-list td.u-chair { min-width: 7rem; }
.grid.users-list td.u-role { white-space: nowrap; }
.grid.users-list td.u-seen { min-width: 5.5rem; }
.users-list .u-role .u-inv { display: block; width: max-content; margin-top: .2rem; }
.grid.users-list td.u-act { white-space: nowrap; text-align: right; }
.users-list .u-act form { display: inline; margin-left: .35rem; }
.add-user { margin-top: .5rem; }
@media (max-width: 640px) {
  .users-wrap { border: 0; background: none; overflow: visible; }
  .grid.users-list, .users-list tbody, .users-list tr, .users-list td { display: block; width: auto; }
  .users-list thead { display: none; }
  .users-list tr { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; padding: .55rem .8rem; }
  .grid.users-list td, .grid.users-list td.u-act { border: 0; padding: .1rem 0; min-width: 0; text-align: left; }
  .users-list .u-name { font-size: 1.02rem; }
  .users-list .u-email { color: var(--ink-soft); font-size: .88rem; }
  .users-list td[data-label] { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem; font-size: .88rem; white-space: normal; }
  .users-list td[data-label]::before { content: attr(data-label); color: var(--ink-soft); font-size: .8rem; }
  .users-list .u-role .u-inv { display: inline-block; margin: 0 0 0 .3rem; }
  .users-list .u-act { padding-top: .4rem; }
  .users-list .u-act form { margin-left: .35rem; }
}
/* 0.9.60 a deposit's facts (e.g. "Bank statement" with the bank's words) wrap inside the page on a phone. */
.facts > div { min-width: 0; max-width: 100%; }
.facts dd { overflow-wrap: anywhere; }
.bank-ref .mono { overflow-wrap: anywhere; }
/* 0.9.61: card-style totals (an expense report, a bill's invoice and total) keep the form width on the wide page. */
.tally, .tally-foot, .invoice-card { max-width: var(--form-max); }
/* 0.9.61: wide tables whose words may wrap (Email in, Bank statements): text columns wrap, dates and money don't. */
.grid.wrap-cells td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.grid.wrap-cells td:first-child, .grid.wrap-cells td.num, .grid.wrap-cells td.amount { white-space: nowrap; overflow-wrap: normal; }

/* 0.9.63 View as / Use the portal as, and the training copy */
.is-view .top { background: #5A1F6B; }
.is-acting .top { background: #0E5E5A; }
.viewas-bar { background: #FFD34E; color: #2B1600; border-bottom: 3px solid #5A1F6B; }
.viewas-acting { border-bottom-color: #0E5E5A; }
.viewas-inner { max-width: var(--page-max); margin: 0 auto; padding: .5rem var(--page-pad); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.viewas-what { margin: 0; font-size: 1rem; flex: 1 1 18rem; }
.viewas-ro { font-weight: 600; }
.viewas-switch summary { cursor: pointer; font-weight: 600; text-decoration: underline; }
.viewas-switch[open] { flex-basis: 100%; order: 3; }
.viewas-panel { display: grid; gap: .6rem; padding: .6rem 0; }
.viewas-panel form { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: end; }
.viewas-panel label { display: grid; gap: .15rem; font-size: .88rem; }
.viewas-panel select { max-width: 100%; min-width: 0; }
.viewas-panel p { margin: 0; }
.viewas-stop { margin: 0; }
.viewas-bar button { background: #2B1600; color: #fff; border-color: #2B1600; }
.training-bar { background: repeating-linear-gradient(-45deg, #C2410C 0 14px, #D9480F 14px 28px); color: #fff; text-align: center; padding: .4rem var(--page-pad); }
.training-bar strong { letter-spacing: .06em; margin-right: .5rem; }
.training-code { font-size: 1.1rem; background: #FFF4D6; border: 1px solid #E0A43A; border-radius: 6px; padding: .6rem .8rem; }
.viewas-section { margin: 1.5rem 0; }
.viewas-roles { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin: .6rem 0; }
.viewas-roles form { margin: 0; }
.viewas-chair { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; }
.viewas-chair label { display: grid; gap: .15rem; font-size: .88rem; }
.viewas-search { display: grid; gap: .2rem; max-width: 24rem; margin: .8rem 0; }
.approve-blocked { font-weight: 600; color: #8a1c1c; }
@media print { .viewas-bar, .training-bar { display: none !important; } }
