/* COPY of figitrade/hub/accounting.css for the demo hub (2026-11-28). One change: the rules for a brand's Finance and
   Expenses pages (#content .bm-page[data-sub=...]) also reach the demo's own #finance-view and #expenses-view. */
/* figitrade/hub/accounting.css: the Accounting section (accounting.js, 2026-11-27).
   Tokens only (the hub's own roles through the macOS layer: --mac-ink, --mac-muted, --line, --at-paper), so light and
   dark follow the hub. The brand tabs (.subtabs), the month row (.seg), the tags (.stchip), the brand chip and the
   buttons (.export, .exp-cancel) are hub-core's: nothing here restyles them. What is here is the page's own shape:
   ruled sheets, the Debit and Credit columns, the forms.
   Phone first; wider layouts from 760px. */

.acc-view .acc-head{ margin:0; }
.acc-view .va-brand-tabs{ margin:0 0 18px; }
.acc-body{ min-width:0; }
.acc-brief{ margin:0 0 22px; }
.acc-bar{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 14px; margin:0 0 16px; }
.acc-months{ display:inline-flex; flex-wrap:nowrap; gap:2px; max-width:100%; padding:3px; overflow-x:auto; scrollbar-width:none; margin:0 0 16px; }
.acc-bar .acc-months{ margin:0; }
.acc-months::-webkit-scrollbar{ display:none; }
.acc-months .seg-btn{ flex:none; min-height:32px; padding:6px 13px; border:0; border-radius:999px; background:transparent; color:var(--mac-muted); font:500 12.5px/1.2 var(--sans); white-space:nowrap; cursor:pointer; }
.acc-months .seg-btn.on{ color:var(--mac-ink); }
.acc-months .seg-btn:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:2px; }
.acc-lock{ font-size:8px; vertical-align:2px; color:var(--tag-green-dot, var(--mac-muted)); }

/* A section: its title, a line of explanation, then one ruled sheet. */
.acc-block{ min-width:0; margin:0 0 32px; }
.acc-block-head{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; margin:0 0 12px; }
.acc-title{ margin:0; font:600 14px/1.3 var(--sans); letter-spacing:0; color:var(--mac-ink); }
.acc-note{ max-width:78ch; margin:10px 2px 12px; font-size:12.5px; line-height:1.5; color:var(--mac-muted); }
.acc-block > .acc-note:first-of-type{ margin-top:0; }
.acc-mute{ color:var(--mac-muted); font-weight:400; }
.acc-sub{ display:block; margin-top:2px; font-size:12px; font-weight:400; line-height:1.35; color:var(--mac-muted); white-space:normal; }
.acc-strong{ font-weight:600; }
.acc-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.acc-warn{ margin:0 0 14px; padding:10px 14px; border-radius:12px; background:var(--tag-red-bg); color:var(--tag-red-fg); font-size:13px; line-height:1.45; }
.acc-ok, .acc-state{ margin:0 0 14px; font-size:13.5px; line-height:1.5; color:var(--mac-ink); }
.acc-state .stchip, .acc-ok .stchip, .acc-warn .stchip{ margin-inline-end:8px; vertical-align:1px; }
.acc-empty{ padding:22px 16px; border-radius:14px; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); font-size:13px; line-height:1.5; color:var(--mac-muted); text-align:start; }
.acc-todo{ margin:-18px 0 28px; padding:0; list-style:none; }
.acc-todo a{ font:500 13px/1.4 var(--sans); color:var(--mac-ink); }

/* The ruled sheet. Wide tables scroll inside it; the page never scrolls sideways. */
.acc-wrap{ max-width:100%; overflow-x:auto; border-radius:14px; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
.acc-table{ width:100%; border-collapse:collapse; font:400 13.5px/1.4 var(--sans); color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.acc-table thead th{ padding:9px 14px; border-bottom:1px solid var(--line); text-align:start; font:500 11.5px/1.3 var(--sans); letter-spacing:.02em; color:var(--mac-muted); white-space:nowrap; }
.acc-table tbody th, .acc-table td{ padding:10px 14px; border-bottom:1px solid var(--line); font-weight:400; text-align:start; vertical-align:top; }
.acc-table tbody tr:last-child > *{ border-bottom:0; }
.acc-table tfoot th, .acc-table tfoot td{ padding:12px 14px; border-top:1px solid var(--mac-ink); font-weight:600; text-align:start; vertical-align:middle; }
.acc-table tfoot .stchip{ margin-inline-start:8px; font-weight:500; }
.acc-table .acc-num{ text-align:end; white-space:nowrap; }
.acc-table .acc-day, .acc-table .acc-code{ white-space:nowrap; color:var(--mac-muted); }
.acc-table .acc-how{ color:var(--mac-muted); font-size:12.5px; }
.acc-table .acc-wraptext{ min-width:16ch; white-space:normal; }
.acc-table .acc-act{ text-align:end; white-space:nowrap; }
.acc-table .brand-chip{ white-space:nowrap; }
.acc-narrow{ max-width:none; }
.acc-sec > th{ padding-top:16px !important; font:600 12px/1.3 var(--sans) !important; letter-spacing:.03em; text-transform:uppercase; color:var(--mac-muted); }
.acc-sec .acc-mute{ text-transform:none; letter-spacing:0; font-weight:400; }
.acc-acct.on > *{ background:var(--hoverbg, color-mix(in oklch, var(--mac-ink) 5%, transparent)); }
.acc-link{ padding:0; border:0; background:none; font:500 13.5px/1.4 var(--sans); color:var(--mac-ink); text-align:start; cursor:pointer; text-decoration:underline; text-decoration-color:var(--line); text-underline-offset:3px; }
.acc-link:hover{ text-decoration-color:currentColor; }
.acc-link:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:2px; border-radius:4px; }
.acc-detail > td{ padding:12px 14px 16px; background:color-mix(in oklch, var(--mac-ink) 3%, transparent); }
.acc-inner{ font-size:13px; }
.acc-detail .acc-wrap{ box-shadow:0 0 0 1px var(--line); }

/* The figures strip (fixed assets). */
.acc-strip{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:0; margin:0 0 16px; border-radius:14px; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); overflow:hidden; }
.acc-strip > div{ padding:14px 16px; border-bottom:1px solid var(--line); }
.acc-strip dt{ margin:0 0 4px; font:500 11.5px/1.3 var(--sans); color:var(--mac-muted); }
.acc-strip dd{ margin:0; font:500 20px/1.2 var(--sans); letter-spacing:-.02em; font-variant-numeric:tabular-nums; color:var(--mac-ink); }
.acc-strip small{ font-size:11.5px; font-weight:400; letter-spacing:0; color:var(--mac-muted); }

/* Forms: labelled fields in a row that wraps, the lines table, then the actions at the end. */
.acc-form{ min-width:0; }
.acc-fields{ display:grid; grid-template-columns:1fr; gap:12px 14px; margin:0 0 14px; }
.acc-field{ display:flex; flex-direction:column; gap:5px; min-width:0; font:500 12px/1.3 var(--sans); color:var(--mac-muted); }
.acc-field i{ font-style:normal; font-weight:400; }
.acc-view input:not([type=radio]):not([type=checkbox]), .acc-view select{
  width:100%; min-height:40px; box-sizing:border-box; padding:8px 11px; border:0; border-radius:10px; background:var(--at-paper);
  box-shadow:inset 0 0 0 1px var(--line); font:400 13.5px/1.3 var(--sans); color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.acc-view input::placeholder{ color:var(--mac-faint, var(--mac-muted)); }
.acc-view input:focus-visible, .acc-view select:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:1px; }
.acc-entry td{ padding:6px 8px; vertical-align:middle; }
.acc-entry td:first-child{ min-width:210px; }
.acc-entry input[name=debit], .acc-entry input[name=credit], .acc-budget-in{ min-width:96px; text-align:end; }
.acc-entry input[name=note]{ min-width:140px; }
.acc-x{ width:32px; height:32px; border:0; border-radius:8px; background:transparent; color:var(--mac-muted); font:400 18px/1 var(--sans); cursor:pointer; }
.acc-x:hover{ background:var(--hoverbg, color-mix(in oklch, var(--mac-ink) 6%, transparent)); color:var(--mac-ink); }
.acc-actions{ display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; margin:14px 0 0; }
.acc-actions .acc-mute{ margin-inline-end:auto; font-size:12.5px; }
/* The one primary action of a page: the ink inversion (the hub has no chromatic accent). Two classes, so it beats
   the hub's own .export paint in both themes. */
.acc-view .export.acc-primary{ min-height:40px; padding:0 20px; border:0; box-shadow:none; background:var(--mac-ink); color:var(--mac-bg); font:500 13px/1 var(--sans); cursor:pointer; }
.acc-view .export.acc-primary:hover:not([disabled]){ opacity:.88; }
.acc-view .export.acc-primary[disabled]{ opacity:.4; cursor:not-allowed; }
.acc-errors{ margin:10px 0 0; }
.acc-errors:empty{ display:none; }
.acc-errors p{ margin:0 0 6px; padding:9px 13px; border-radius:10px; background:var(--tag-red-bg); color:var(--tag-red-fg); font-size:13px; line-height:1.45; }
.acc-choice{ margin:0 0 4px; padding:0; border:0; display:grid; gap:10px; }
.acc-choice legend{ padding:0; margin:0 0 8px; font:500 12px/1.3 var(--sans); color:var(--mac-muted); }
.acc-choice label{ display:grid; grid-template-columns:auto 1fr; align-items:center; gap:8px 10px; font-size:13.5px; line-height:1.4; color:var(--mac-ink); }
.acc-choice label > select, .acc-choice label > input:not([type=radio]){ grid-column:2; max-width:340px; }
.acc-inline{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.acc-inline input{ flex:1 1 200px; max-width:360px; }
.acc-reopen{ margin-top:16px; }
.acc-budget-in{ max-width:150px; margin-inline-start:auto; }

/* A journal entry in the list. */
.acc-entry-card{ margin:0 0 14px; }
.acc-entry-card > header{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:0 0 8px; font-size:13px; }
.acc-entry-card .acc-day{ color:var(--mac-muted); white-space:nowrap; }
.acc-entry-memo{ font-weight:600; color:var(--mac-ink); }
.acc-entry-card > footer{ display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; margin:8px 0 0; font-size:12.5px; }
.acc-entry-card.is-void .acc-wrap{ opacity:.55; }
.acc-entry-card.is-void .acc-entry-memo{ text-decoration:line-through; }

/* The close checklist. */
.acc-checks{ margin:0 0 16px; padding:0; list-style:none; border-radius:14px; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
.acc-check{ display:grid; grid-template-columns:118px 1fr; align-items:start; gap:10px 12px; padding:11px 14px; border-bottom:1px solid var(--line); font-size:13.5px; line-height:1.4; }
.acc-check:last-child{ border-bottom:0; }
.acc-check b{ font-weight:500; }
.acc-check > .stchip{ justify-self:start; }

@media (min-width:760px){
  .acc-fields{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
  .acc-field.acc-grow{ grid-column:span 2; }
  .acc-strip{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
  .acc-strip > div{ border-bottom:0; border-inline-end:1px solid var(--line); }
  .acc-strip > div:last-child{ border-inline-end:0; }
  .acc-narrow{ max-width:720px; }
  .acc-wrap:has(> .acc-narrow){ max-width:720px; }
}
@media (max-width:759px){
  /* The journal form on a phone: each line is its own block (account, then Debit beside Credit, then the note),
     so nothing is cut off at the edge. The fields name themselves by their placeholders. */
  .acc-entry, .acc-entry tbody, .acc-entry tfoot{ display:block; }
  .acc-entry thead{ display:none; }
  .acc-entry tr.acc-line{ display:grid; grid-template-columns:1fr 1fr 36px; gap:8px; padding:12px; border-bottom:1px solid var(--line); }
  .acc-entry tr.acc-line > td{ display:block; padding:0; border:0; min-width:0; }
  .acc-entry tr.acc-line > td:nth-child(1){ grid-column:1 / -1; }
  .acc-entry tr.acc-line > td:nth-child(4){ grid-column:1 / 3; grid-row:3; }
  .acc-entry tr.acc-line > td:nth-child(5){ grid-column:3; grid-row:2; align-self:center; }
  .acc-entry input[name=debit], .acc-entry input[name=credit], .acc-entry input[name=note]{ min-width:0; }
  .acc-entry tfoot tr{ display:grid; grid-template-columns:1fr 1fr 36px; gap:8px; align-items:center; padding:12px; border-top:1px solid var(--mac-ink); }
  .acc-entry tfoot th{ grid-column:1 / -1; padding:0; border:0; }
  .acc-entry tfoot td{ display:block; padding:0; border:0; }
  .acc-entry tfoot td[data-label]::before{ content:attr(data-label) " "; font-weight:400; color:var(--mac-muted); }
  .acc-entry tfoot td[colspan]{ display:none; }
  .acc-table thead th, .acc-table tbody th, .acc-table td, .acc-table tfoot th, .acc-table tfoot td{ padding-inline:11px; }
  .acc-check{ grid-template-columns:1fr; }
  /* The chart on a phone: the code, the name and the three figures. The explanations and the "how it is filled"
     column are for a wide screen (open an account to see its postings either way). */
  .acc-chart .acc-how, .acc-chart thead th:nth-child(3), .acc-chart .acc-acct .acc-sub{ display:none; }
  .acc-chart .acc-code{ padding-inline-end:4px; }
  .acc-view .acc-actions .export.acc-primary{ flex:1 1 100%; min-height:44px; }
}

/* ---- THE ACCOUNTING SIDEBAR (app.js setRail, 2026-11-27) ----
   Opening Accounting swaps the sidebar's rows for its own: a back row, the eight accountant pages, then "Old
   accounting" (the Money pages by kind). The rows, the section headings and the lit row are hub-core's own
   (.rail-sec, .rail-sec-label, .rail-btn); only the back row and the phone menu's headings are drawn here. */
#rail .rail-back-sec{ margin-bottom:6px; padding-bottom:6px; border-bottom:1px solid var(--glass-rule, var(--line)); }
#rail .rail-btn.rail-back{ color:var(--glass-label, var(--mac-muted)); }
#rail .rail-btn.rail-back:hover{ color:var(--glass-ink, var(--mac-ink)); }
#rail .rail-btn.rail-back .ni{ width:16px; height:16px; }
.pm-sec-label{ margin:14px 12px 4px; font:500 12px/1.2 var(--sans); color:var(--mac-muted); }
.pm-item.pm-back{ color:var(--mac-muted); }
.pm-item.pm-back .ni{ width:18px; height:18px; }

/* ---- THE FULL FINANCE LAYOUT (finance-mode.js 'full'; <html data-finance="full">, app.js) ----
   The sidebar picks the page and the tabs along the top pick Group or a brand, so each brand page's own row of kind
   tabs (brand-money/<brand>/page.js .bm-tabs, GENERATED and still driven by the address) is not shown. In the simple
   layout those tabs are the navigation and stay. */
html[data-finance="full"] :is(#fin-figihome-view, #fin-yeganen-view, #fin-defragile-view) > .bm-tabs{ display:none; }

/* The long Finance page, one part at a time (app.js showPart puts data-part on the view; finance-nav.js FINANCE_PARTS).
   Group page (index.html): a block lists its parts in data-parts; a block with none shows in every part. */
#finance-view[data-part="cash"] > [data-parts]:not([data-parts~="cash"]),
#finance-view[data-part="couriers"] > [data-parts]:not([data-parts~="couriers"]),
#finance-view[data-part="pnl"] > [data-parts]:not([data-parts~="pnl"]),
#finance-view[data-part="statements"] > [data-parts]:not([data-parts~="statements"]){ display:none; }
/* A brand's Finance page (generated markup, so its blocks are named here by what they hold):
   cash = Where the money is now; pnl = the period, the sentence, At a glance, Profit and loss, the trend;
   statements = the period and Financial statements. */
[id^="fin-"][data-part="cash"] .bm-page[data-sub="finance"] > :is(.gf-period, .brief, .fin-two, .gf-block:not(:has(#fin-position))),
[id^="fin-"][data-part="pnl"] .bm-page[data-sub="finance"] > :is(.gf-block:has(#fin-position), .gf-block:has(#fin-statements)),
[id^="fin-"][data-part="statements"] .bm-page[data-sub="finance"] > :is(.brief, .fin-two, .gf-block:has(#fin-position), .gf-block:has(#fin-summary)){ display:none; }
/* One part is one block: its heading would only repeat the page title above it. */
#finance-view[data-part] > .gf-block > .lead-title,
[id^="fin-"][data-part="cash"] .bm-page[data-sub="finance"] > .gf-block > .lead-title,
[id^="fin-"][data-part="statements"] .bm-page[data-sub="finance"] > .gf-block > .lead-title{ display:none; }

/* ---- THE EXPENSES PAGE (2026-11-27, Yassin: "tidy up expenses tab, it looks messy and hard on the eye") ----
   One look for the three brands' Expenses pages, written once here over the generated brand-money/money.css (#content
   in front outweighs its #bm-<brand>-expenses-view rules). The markup is finance.js renderExpenses (FigiHome's, generated
   for the others). Top to bottom: the dates (month picker in the head, "Custom dates" folded away), two figures, then
   By type beside the rows as a table with aligned columns. Tokens only, so light and dark both hold. */
:is(#content .bm-page[data-sub="expenses"], #expenses-view) > .view-head{ align-items:center; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .view-actions{ display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px 12px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .view-actions .fin-picker{ flex:none; }
/* The page is not a card holding cards: the outer panel only holds the blocks. */
:is(#content .bm-page[data-sub="expenses"], #expenses-view) > .panel,
:is(#content .bm-page[data-sub="expenses"], #expenses-view) > .panel:hover{ margin:0; padding:0; border:0; border-radius:0; background:none; box-shadow:none; transform:none; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) > .panel > .lead-title{ display:none; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) #fin-expenses > .pl-empty{ padding:0 0 12px; font-size:12.5px; line-height:1.5; }

/* Custom dates: a quiet line until it is opened. */
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-custom{ margin:0 0 16px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-custom > summary{ display:inline-flex; align-items:center; gap:7px; min-height:28px; cursor:pointer; list-style:none; font:500 12.5px/1 var(--sans); color:var(--mac-muted); border-radius:6px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-custom > summary::-webkit-details-marker{ display:none; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-custom > summary::before{ content:''; width:6px; height:6px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); transition:transform .18s var(--ease, ease); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-custom[open] > summary::before{ transform:rotate(45deg) translate(-1px,-1px); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-custom > summary:hover{ color:var(--mac-ink); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-custom > summary:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:3px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-range{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin:8px 0 0; padding:12px 14px; border-radius:12px; background:color-mix(in srgb, var(--mac-ink) 4%, transparent); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-range label{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--mac-muted); }

/* The two figures. */
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-stats{ display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:12px; margin:0 0 14px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-stat{ display:flex; flex-direction:column; gap:6px; min-width:0; padding:16px 18px; border-radius:14px; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-stat-k{ font:500 12.5px/1.3 var(--sans); color:var(--mac-muted); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-stat-v{ font:600 26px/1.1 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); font-variant-numeric:tabular-nums; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-stat-v small{ font-size:12.5px; font-weight:500; letter-spacing:0; color:var(--mac-muted); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-stat-n{ font:400 12px/1.4 var(--sans); color:var(--mac-muted); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-stat-due .exp-stat-k{ color:var(--mac-bad); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-notes{ margin:0 0 14px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-notes:not(:has(.pl-empty)){ display:none; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-notes .pl-empty{ margin:0; padding:0 2px 4px; font-size:12px; line-height:1.5; color:var(--mac-muted); }

/* By type beside the rows (on a wide screen), above them otherwise. */
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-body{ display:grid; grid-template-columns:minmax(0, 1fr); gap:14px; align-items:start; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) :is(.exp-side, .exp-table){ min-width:0; border-radius:14px; overflow:hidden; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) :is(.exp-side-h, .exp-head){ font:500 12px/1.2 var(--sans); color:var(--mac-muted); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-side-h{ display:flex; justify-content:space-between; gap:10px; padding:12px 16px 10px; border-bottom:1px solid var(--line); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-types{ display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:0; margin:0; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type{ position:relative; display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:3px 10px; width:100%; min-height:44px; margin:0; padding:10px 16px; border:0; border-radius:0; background:none; box-shadow:0 0 0 .5px var(--line); text-align:start; cursor:pointer; font:500 13px/1.3 var(--sans); color:var(--mac-ink); transition:background .15s var(--ease, ease); -webkit-tap-highlight-color:transparent; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type:hover{ background:color-mix(in srgb, var(--mac-ink) 4%, transparent); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type.on{ background:color-mix(in srgb, var(--mac-ink) 9%, transparent); font-weight:600; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:-2px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type-n{ display:flex; align-items:center; gap:8px; min-width:0; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type-n > span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type-n .fic{ flex:none; width:15px; height:15px; margin:0; color:var(--mac-muted); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type-v{ font-variant-numeric:tabular-nums; white-space:nowrap; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type-due{ grid-column:1 / -1; font:500 11.5px/1.3 var(--sans); color:var(--mac-bad); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type-bar{ grid-column:1 / -1; display:block; height:3px; margin-top:4px; border-radius:2px; background:color-mix(in srgb, var(--mac-ink) 9%, transparent); overflow:hidden; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type-bar::after{ content:''; display:block; width:var(--w, 0%); height:100%; border-radius:2px; background:color-mix(in srgb, var(--mac-ink) 38%, transparent); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type-quiet, :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type-quiet .exp-type-v{ color:var(--mac-muted); }
@media (min-width:1280px){
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-body{ grid-template-columns:280px minmax(0, 1fr); }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-types{ grid-template-columns:minmax(0, 1fr); }
}

/* The rows: a bar (how many, paid or not), the column names, then one aligned row each. */
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-bar{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 10px 9px 16px; border-bottom:1px solid var(--line); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-count{ font:500 12px/1.2 var(--sans); color:var(--mac-muted); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-statuses{ display:inline-flex; gap:2px; padding:3px; border-radius:10px; background:color-mix(in srgb, var(--mac-ink) 7%, transparent); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-status{ min-height:28px; padding:0 12px; border:0; border-radius:8px; background:none; cursor:pointer; font:500 12.5px/1 var(--sans); color:var(--mac-muted); transition:background .15s var(--ease, ease), color .15s var(--ease, ease); -webkit-tap-highlight-color:transparent; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-status:hover{ color:var(--mac-ink); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-status.on{ background:color-mix(in srgb, var(--mac-ink) 15%, transparent); color:var(--mac-ink); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-status:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:1px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) :is(.exp-head, .exp-row){ display:grid; grid-template-columns:108px minmax(0, 1fr) auto 128px; column-gap:14px; padding-inline:16px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-head{ padding-block:10px; border-bottom:1px solid var(--line); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-head > span:nth-child(2){ grid-column:2 / 4; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-head > span:last-child{ grid-column:4; text-align:end; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-list{ display:block; margin:0; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-list > .pl-empty{ padding:22px 16px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-row{ align-items:start; row-gap:10px; margin:0; padding-block:12px; border:0; border-top:1px solid var(--line); opacity:1; transition:background .15s var(--ease, ease); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-row:first-child{ border-top:0; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-row:hover{ background:color-mix(in srgb, var(--mac-ink) 3%, transparent); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-cat{ grid-column:1; grid-row:1; display:block; padding-top:1px; font:400 12.5px/1.5 var(--sans); color:var(--mac-muted); font-variant-numeric:tabular-nums; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-name{ grid-column:2; grid-row:1; display:flex; flex-direction:column; gap:2px; min-width:0; font:400 13.5px/1.45 var(--sans); color:var(--mac-ink); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-what{ display:block; overflow-wrap:anywhere; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-what strong{ font-weight:600; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-what .fic{ width:15px; height:15px; margin:0 5px 0 0; vertical-align:-3px; color:var(--mac-muted); }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-note{ font:400 12px/1.4 var(--sans); color:var(--mac-muted); overflow-wrap:anywhere; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-due{ display:contents; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-notpaid{ grid-column:3; grid-row:1; align-self:start; margin:1px 0 0; padding:3px 9px; border-radius:999px; background:var(--at-bad-tint, color-mix(in srgb, var(--mac-bad) 16%, transparent)); color:var(--mac-bad); font:600 11px/1.3 var(--sans); letter-spacing:0; text-transform:none; white-space:nowrap; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-amt{ grid-column:4; grid-row:1; text-align:end; font:600 13.5px/1.5 var(--sans); color:var(--mac-ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-pay{ grid-column:2 / -1; grid-row:2; justify-self:end; display:flex; align-items:center; gap:8px; max-width:100%; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-pay .exp-in{ min-width:0; max-width:230px; }
:is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-row.exp-nocost :is(.exp-name, .exp-amt, .exp-what strong){ color:var(--mac-muted); }
@media (max-width:760px){
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .view-actions{ justify-content:flex-start; width:100%; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-stat-v{ font-size:23px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-types{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-type{ padding-inline:12px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-status{ min-height:36px; font-size:13px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-range :is(.exp-in, .export, .chip){ min-height:44px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-range .exp-in{ font-size:16px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-head{ display:none; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-row{ grid-template-columns:minmax(0, 1fr) auto; row-gap:4px; padding-block:13px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-cat{ grid-column:1; grid-row:1; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-notpaid{ grid-column:2; grid-row:1; justify-self:end; font-size:11.5px; padding:3px 9px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-name{ grid-column:1; grid-row:2; font-size:14px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-amt{ grid-column:2; grid-row:2; font-size:14px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-pay{ grid-column:1 / -1; grid-row:3; justify-self:stretch; margin-top:8px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-pay .exp-in{ flex:1 1 auto; max-width:none; min-height:44px; font-size:16px; }
  :is(#content .bm-page[data-sub="expenses"], #expenses-view) .exp-pay .exp-pay-go{ min-height:44px; padding-inline:20px; }
}

/* A possible double count of Meta ads (finance.js adsAlarmHTML): the red box above the Expenses page and the Profit and loss. */
#content .ads-twice{ margin:0 0 14px; padding:12px 14px; border-radius:12px; font:400 12.5px/1.5 var(--sans); }
#content .ads-twice-list{ margin:6px 0; padding-inline-start:18px; }
#content .ads-twice-list li{ margin:2px 0; overflow-wrap:anywhere; }

/* ---- RECORDING MONEY BY HAND, on Cash and accounts (2026-11-27, Yassin: "make the recording money in and out more
   arranged too") ----
   finance.js renderMoney: a row of three tabs (Money out, Money in, Move between accounts), ONE form at a time with a
   name over every field, its explanation folded away, and what was recorded of that kind under it. Written once here
   for the three brands, over the generated brand-money/money.css. Tokens only. */
:is(#content .bm-page[data-sub="finance"], #finance-view) .pos-cols{ grid-template-columns:minmax(0, 1fr); gap:22px; align-items:start; }
@media (min-width:1180px){ :is(#content .bm-page[data-sub="finance"], #finance-view) .pos-cols{ grid-template-columns:minmax(0, 1.7fr) minmax(280px, 1fr); } }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv > .exp-sec-head{ margin-bottom:12px; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-tabs{ display:inline-flex; max-width:100%; gap:2px; padding:3px; margin:0 0 12px; border-radius:11px; background:color-mix(in srgb, var(--mac-ink) 7%, transparent); overflow-x:auto; scrollbar-width:none; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-tabs::-webkit-scrollbar{ display:none; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-tab{ flex:none; min-height:32px; padding:0 14px; border:0; border-radius:8px; background:none; cursor:pointer; font:500 13px/1 var(--sans); color:var(--mac-muted); white-space:nowrap; transition:background .15s var(--ease, ease), color .15s var(--ease, ease); -webkit-tap-highlight-color:transparent; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-tab:hover{ color:var(--mac-ink); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-tab.on{ background:color-mix(in srgb, var(--mac-ink) 15%, transparent); color:var(--mac-ink); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-tab:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:1px; }
/* The tab names the form: its old heading stays in the page for a screen reader's ear only by the tab, so it is not drawn. */
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-panel > .exp-sec-head.sub{ display:none; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-form{ display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:14px 12px; align-items:end; margin:0 0 14px; padding:16px; border-radius:14px; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mf{ display:flex; flex-direction:column; gap:6px; min-width:0; margin:0; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mf-wide{ grid-column:span 2; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mf-l{ font:500 12px/1.2 var(--sans); color:var(--mac-muted); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mf > .exp-in{ flex:none; width:100%; min-width:0; max-width:none; min-height:38px; margin:0; box-sizing:border-box; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-form > .exp-add{ justify-self:start; min-width:96px; min-height:38px; margin:0; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-how{ grid-column:1 / -1; margin:0; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-how > summary{ display:inline-flex; align-items:center; gap:7px; cursor:pointer; list-style:none; font:500 12px/1.2 var(--sans); color:var(--mac-muted); border-radius:6px; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-how > summary::-webkit-details-marker{ display:none; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-how > summary::before{ content:''; width:6px; height:6px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); transition:transform .18s var(--ease, ease); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-how[open] > summary::before{ transform:rotate(45deg) translate(-1px, -1px); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-how > summary:hover{ color:var(--mac-ink); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-how > summary:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:3px; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-how .inv-hint{ margin:8px 0 0; max-width:70ch; font:400 12px/1.55 var(--sans); color:var(--mac-muted); }
/* What was recorded of that kind: one quiet card under the form. */
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-hist{ padding:4px 16px 8px; border-radius:14px; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-hist:empty{ display:none; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-hist .out-totals{ padding:12px 0 10px; margin:0 0 4px; font-size:12.5px; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-hist .exp-grp{ margin:0; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-hist .exp-grp + .exp-grp{ border-top:1px solid var(--line); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-hist .exp-grp-head{ padding:11px 0; font-size:13px; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .mv-hist .pl-empty{ padding:14px 0; }
@media (max-width:760px){
  :is(#content .bm-page[data-sub="finance"], #finance-view) .mv-tab{ min-height:40px; padding:0 14px; font-size:13.5px; }
  :is(#content .bm-page[data-sub="finance"], #finance-view) .mv-form{ grid-template-columns:repeat(2, minmax(0, 1fr)); padding:14px 12px; }
  :is(#content .bm-page[data-sub="finance"], #finance-view) .mf > .exp-in{ min-height:44px; font-size:16px; }
  :is(#content .bm-page[data-sub="finance"], #finance-view) .mv-form > .exp-add{ grid-column:1 / -1; justify-self:stretch; min-height:46px; }
  :is(#content .bm-page[data-sub="finance"], #finance-view) .mv-hist{ padding-inline:12px; }
}
@media (max-width:420px){
  :is(#content .bm-page[data-sub="finance"], #finance-view) .mf:has(> input[type="date"]), :is(#content .bm-page[data-sub="finance"], #finance-view) .mf:has(> select){ grid-column:1 / -1; }
}
/* ---- THE CASH ACCOUNTS AND THEIR COUNTED BALANCES (finance.js countedAccountsHTML / accountsHTML) ----
   One row per account with its latest count, a Count again action on the row, and one small labelled form. */
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca > .exp-sec-head{ margin-bottom:12px; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-table{ border-radius:14px; overflow:hidden; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
:is(#content .bm-page[data-sub="finance"], #finance-view) :is(.ca-head, .ca-row){ display:grid; grid-template-columns:minmax(0, 1fr) auto 112px; column-gap:14px; align-items:center; padding-inline:16px; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-head{ padding-block:11px 9px; border-bottom:1px solid var(--line); font:500 12px/1.2 var(--sans); color:var(--mac-muted); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-head > span:nth-child(2){ text-align:end; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-row{ min-height:56px; margin:0; padding-block:10px; border:0; border-top:1px solid var(--line); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-head + .ca-row{ border-top:0; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-row .exp-name{ display:flex; flex-direction:column; gap:2px; min-width:0; font:500 13.5px/1.35 var(--sans); color:var(--mac-ink); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-kind{ font:400 12px/1.4 var(--sans); color:var(--mac-muted); font-variant-numeric:tabular-nums; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-kind bdi{ white-space:nowrap; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-row .exp-amt{ text-align:end; font:600 13.5px/1.3 var(--sans); color:var(--mac-ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-acts{ display:flex; align-items:center; gap:8px; justify-self:end; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-acts .acc-recount{ font:500 12px/1.2 var(--sans); white-space:nowrap; }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-form{ margin-top:12px; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-form-h{ grid-column:1 / -1; font:600 13.5px/1.3 var(--sans); color:var(--mac-ink); }
:is(#content .bm-page[data-sub="finance"], #finance-view) .ca-form > .inv-hint{ grid-column:1 / -1; margin:0; max-width:70ch; font:400 12px/1.55 var(--sans); color:var(--mac-muted); }
@media (max-width:760px){
  :is(#content .bm-page[data-sub="finance"], #finance-view) .ca-head{ display:none; }
  :is(#content .bm-page[data-sub="finance"], #finance-view) .ca-row{ grid-template-columns:minmax(0, 1fr) auto; row-gap:6px; padding-block:13px; }
  :is(#content .bm-page[data-sub="finance"], #finance-view) .ca-row .exp-name{ grid-column:1; grid-row:1; }
  :is(#content .bm-page[data-sub="finance"], #finance-view) .ca-row .exp-amt{ grid-column:2; grid-row:1; }
  :is(#content .bm-page[data-sub="finance"], #finance-view) .ca-acts{ grid-column:1 / -1; grid-row:2; justify-self:start; }
  :is(#content .bm-page[data-sub="finance"], #finance-view) .ca-acts .acc-recount{ min-height:36px; }
}
