/* LAMONT. One stylesheet, no build step, no web fonts (it must work offline).
   Every colour comes from one hue (--h) so each building can have its own scheme;
   lightness is fixed, so text contrast holds for any hue. --cm 0 = graphite. */
/* Source Sans 3 (SIL Open Font License), kept in static/fonts so the app works offline. One variable file per style.
   font-display: fallback waits about 100ms for the font before using a backup, so a reload draws straight in Source Sans 3
   instead of drawing in Segoe UI and shifting (the upright file is also preloaded in base.html). */
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: fallback; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: fallback; }
:root {
  --h: 270; --cm: 1;
  --accent: oklch(46% calc(.115 * var(--cm)) var(--h));
  --accent-deep: oklch(38% calc(.105 * var(--cm)) var(--h));
  --accent-soft: oklch(95.5% calc(.026 * var(--cm)) var(--h));
  --accent-line: oklch(85% calc(.05 * var(--cm)) var(--h));
  --rail: oklch(24% calc(.045 * var(--cm)) var(--h));
  --rail-on: oklch(33% calc(.06 * var(--cm)) var(--h));
  --rail-ink: oklch(93% calc(.015 * var(--cm)) var(--h));
  --rail-mute: oklch(74% calc(.03 * var(--cm)) var(--h));
  --ground: oklch(97.4% calc(.006 * var(--cm)) var(--h));
  --paper: #fff;
  --ink: oklch(23% calc(.02 * var(--cm)) var(--h));
  --ink-2: oklch(44% calc(.02 * var(--cm)) var(--h));
  --line: oklch(90.5% calc(.01 * var(--cm)) var(--h));
  --line-2: oklch(80% calc(.015 * var(--cm)) var(--h));
  --on-accent: #fff;                 /* text on a filled button */
  --placeholder: oklch(52% calc(.02 * var(--cm)) var(--h));
  --link: #1c1d22;                   /* links, focus rings and "more" toggles: ink (links are underlined) */
  --ok: oklch(43% .1 155); --ok-soft: oklch(95% .035 155); --ok-line: oklch(86% .06 155);
  --warn: oklch(45% .1 70); --warn-soft: oklch(95% .045 85); --warn-line: oklch(85% .08 85); --warn-ink: oklch(34% .08 70);
  --bad: oklch(46% .16 27); --bad-soft: oklch(95.5% .025 27); --bad-line: oklch(86% .06 27);
  --r: 8px;
  --sans: "Source Sans 3", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* The house scheme, Ink and chop: blue-black ink on cool greys of the same blue-black family (the warm paper greys were replaced on 25 Nov 2026, Francis: one temperature of grey, to match the menu), and no brand colour at all. Buttons and
   links are ink (links underlined), and there is no logo mark, so the only colours on a page are the statuses:
   red for Overdue and VOID, amber for warnings, green for Paid. Set by hand, outside the one-hue tokens. */
:root[data-brand] {
  --accent: #1c1d22; --accent-deep: #000; --on-accent: #fff;
  --accent-soft: #ebebee; --accent-line: #d2d3d9;
  --rail: #16181f; --rail-on: #262933; --rail-ink: #e9e9ec; --rail-mute: #9a9ca6;
  --ground: #f5f5f7; --ink: #1c1d22; --ink-2: #5f6068; --line: #e3e4e8; --line-2: #c8c9cf;
  --placeholder: #8a8b92;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }   /* 15px: Source Sans 3 runs small */
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--ground); line-height: 1.45;
  font-variant-numeric: tabular-nums; caret-color: var(--accent); scrollbar-color: var(--line-2) transparent; }
::selection { background: var(--accent-line); color: var(--ink); }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 1.57rem; font-weight: 650; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h2 { font-size: 1.07rem; font-weight: 650; margin: 0; }
h3 { font-size: .93rem; font-weight: 650; margin: 0; }
p { margin: 0 0 .7em; }
small, .small { font-size: .86rem; }
.mute { color: var(--ink-2); }
.n { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
/* The menu is dark, so it stands apart from the light work area, in a plain grey with no blue or violet in it, and
   nothing on it moves (Francis, 23 Nov 2026: the tinted rail and the gliding mark were disliked; a light rail tried the
   same day was "too similar to the whole thing"). The rail tokens are redefined here only, so LAMONTcore's top bar and
   the sign-in panel keep theirs. */
.side { --rail: #232323; --rail-on: #3a3a3a; --rail-ink: #ededed; --rail-mute: #a6a6a6;
  background: var(--rail); color: var(--rail-ink); padding: 18px 12px 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-color: var(--rail-on) transparent; }
.brand { display: block; padding: 4px 10px 18px; color: #fff; }
.brand:hover { text-decoration: none; }
/* the LAMONT wordmarks: LAMONT in capitals at black weight + the module's word in light at 80% of its size, one word, in Source Sans 3 (Francis, 22 Nov 2026) */
.wm { display: inline-flex; align-items: flex-start; gap: .4em; font-size: 1.3rem; line-height: 1; color: #fff; }
.wm-text { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.wm-name { display: inline-flex; align-items: baseline; }
.wm b { font-weight: 900; letter-spacing: .01em; }
.wm i { font-style: normal; font-weight: 300; letter-spacing: 0; font-size: .8em; }   /* light, at 80% of the size of "LAMONT" (Francis, 22 Nov 2026; 70% and 50% were tried), on the same baseline */
.wm small { font-size: 12px; font-weight: 400; letter-spacing: .03em; color: var(--rail-mute); }   /* fine print */
.side h3 { color: var(--rail-mute); font-size: .86rem; font-weight: 600; padding: 14px 10px 5px; }
/* Menu groups fold open and shut, as CSS's menu groups do (menus rebuilt on CSS's, 22 Nov 2026); the one holding the
   page you're on starts open. */
/* A group's name is a heading, not a quiet label (Francis, 23 Nov 2026: the smaller text "is not differentiating
   much"): full size, semibold and white (bold was "too much"), with a rule above each group; the pages inside sit indented under it in a softer
   grey, so the two levels read apart at a glance. */
.side details.grp { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--rail-on); }
.side .grp-links a.nav { padding-left: 22px; color: #cfcfcf; }
.side .grp-links a.nav:hover { color: #fff; }
.side .links > a.nav:not(.modules-link) { font-weight: 600; color: #fff; }
.side details.grp > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  color: #fff; font-size: 1rem; font-weight: 600; padding: 8px 10px; border-radius: 6px; user-select: none; }
.side details.grp > summary::-webkit-details-marker { display: none; }
.side details.grp > summary::after { content: "\203A"; font-size: 1.1rem; line-height: 1; }
.side details.grp[open] > summary::after { transform: rotate(90deg); }
.side details.grp > summary:hover { color: var(--rail-ink); background: var(--rail-on); }
.side details.grp[open] > summary { color: var(--rail-ink); }
.side .grp-links { padding: 0 0 6px; }
.side a.nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px;
  color: var(--rail-ink); position: relative; }
/* The open page's item: a white fill with dark text, the strongest contrast on the rail. It is drawn at once; the
   glide between items (a cross-page view transition, tried 23 Nov 2026) was removed the same day. */
.side a.nav { z-index: 0; }
.side a.nav > * { position: relative; z-index: 1; }
.side a.nav:hover { background: var(--rail-on); text-decoration: none; }
.side a.nav.on { color: #161616; font-weight: 600; background: transparent; }
/* the open item's dark text must win over the white of the top-level items and of a hovered page (it was white on
   white for Dashboard and Checks, 23 Nov 2026) */
.side .links > a.nav.on:not(.modules-link), .side .grp-links a.nav.on, .side .grp-links a.nav.on:hover, .side a.nav.on:hover { color: #161616; }
.side a.nav .nav-mark { position: absolute; inset: 0; z-index: -1; background: #fff; border-radius: 6px; }
.side a.nav.on .count { background: #161616; color: #fff; }
.side :focus-visible { outline-color: #fff; }
/* Links are ink like the text, so they carry a thin underline that darkens on hover. */
.page a:not([class]), .top a:not([class]) { text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; }
.page a:not([class]):hover, .top a:not([class]):hover { text-decoration-color: currentColor; }
.count { background: #fff; color: var(--rail); font-size: .86rem; font-weight: 700; border-radius: 10px; padding: 0 7px; line-height: 1.5; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 28px; background: var(--paper);
  border-bottom: 1px solid var(--line); min-height: 52px; }
.top .where { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.top .where select { width: auto; max-width: 46vw; font-weight: 600; }
.top .who { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.top .who form { margin: 0; }
.page { padding: 26px 28px 60px; max-width: 1320px; }
.side .menu-btn { display: none; }
.bare-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: var(--rail); color: #fff; }
.bare-top .brand { padding: 0; }

/* ---------- page head ---------- */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head p { margin: 4px 0 0; color: var(--ink-2); max-width: 110ch; }   /* 110 characters a line: at 70 a two-line description broke early beside empty space (Francis, 23 Nov 2026) */
.head .acts, .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: .86rem; margin-bottom: 6px; }
/* one back link everywhere (Francis, 24 Nov 2026): an arrow and the name of the page above */
.crumb a::before, a.up::before { content: "\2190\00a0"; }
.crumb a, a.up { text-decoration: none; }
.crumb a:hover, a.up:hover { text-decoration: underline; }

/* ---------- the summary band: the answer first ---------- */
.band { display: flex; flex-wrap: wrap; align-items: stretch; background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--r); margin-bottom: 22px; }
.band .fig { padding: 14px 22px 13px; border-right: 1px solid var(--accent-line); min-width: 150px; flex: 1 1 150px; }
.band .fig:last-of-type, .band .fig:has(+ .do) { border-right: 0; }   /* the button block draws its own dividing line */
.band .fig b { display: block; font-size: 1.36rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; }
.band .fig.lead { flex: 1.5 1 200px; }
.band .fig.lead b { font-size: 2rem; letter-spacing: -.025em; }
.band .fig span { display: block; color: var(--ink-2); font-size: .86rem; margin-top: 2px; }
.band .fig b.bad { color: var(--bad); }
.band .fig b.ok { color: var(--ok); }
.band .cur { font-size: .55em; font-weight: 600; letter-spacing: 0; margin-right: 3px; vertical-align: .32em; color: var(--ink-2); }
.band .do { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-left: 1px solid var(--accent-line); }
/* owner pages are narrow, so the buttons always take their own row under the figures, split evenly */
.owner .band .do { flex-basis: 100%; border-left: 0; border-top: 1px solid var(--accent-line); padding: 14px 22px; }
.owner .band .do .btn { flex: 1; }

/* ---------- panels and layout ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 22px; }
.panel > .ph { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px;
  border-bottom: 1px solid var(--line); }
.panel > .pb, .panel.pb { padding: 16px; }   /* .panel.pb: a panel that is its own body, as report filters (23 Nov 2026) */
.panel > .pb > :last-child { margin-bottom: 0; }
.cols { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.cols.wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.cols > .panel, .cols > div > .panel:last-child { margin-bottom: 0; }
.cols { margin-bottom: 22px; }
.stack > * + * { margin-top: 22px; }

/* ---------- tables ---------- */
.scroll { overflow-x: auto; position: relative; }   /* hidden labels inside stay inside the scroll */
/* Charts' figures folded under one button at the foot (24 Nov 2026); printed open */
.fold-figures > summary { list-style: none; margin: 0 0 16px; }
.fold-figures > summary::-webkit-details-marker { display: none; }
@media print { .fold-figures > summary { display: none; } }
.scroll-top { overflow-x: auto; overflow-y: hidden; height: 14px; }   /* the matching bar above a wide table (24 Nov 2026) */
.scroll-top > div { height: 1px; }
@media print { .scroll-top { display: none !important; } }
.panel, .stack, .cols > * { min-width: 0; }   /* a wide table scrolls inside its panel instead of widening the page (21 Nov 2026) */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: .86rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; vertical-align: bottom; background: var(--paper); }
th.n, td.n { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--ground); }
tfoot td { border-top: 1px solid var(--line-2); border-bottom: 0; font-weight: 650; }
td.unit, .unitno { font-weight: 600; white-space: nowrap; }
tr.void td { color: var(--ink-2); }
[hidden] { display: none !important; }
th a.sorth { color: inherit; text-decoration: none; white-space: nowrap; }   /* a column heading that sorts its list */
th a.sorth:hover, th a.sorth.on { text-decoration: underline; text-underline-offset: 3px; }   /* hidden stays hidden even on styled elements such as .btn */
th button.sorth { all: unset; cursor: pointer; white-space: nowrap; }   /* a whole list sorted on the page (base.html) */
th button.sorth:hover, th[aria-sort] button.sorth { text-decoration: underline; text-underline-offset: 3px; }
th button.sorth:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media print { th button.sorth .arr { display: none; } }
table.gl tr.acct td { border-top: 1px solid var(--line-2); padding-top: 14px; }   /* an account's heading row in a general ledger batch */
tr.void td.strike { text-decoration: line-through; }
td .sub { display: block; color: var(--ink-2); font-size: .86rem; }
.show-s, td .sub.show-s { display: none; }   /* shown only on phone width, where a column it stands in for is hidden; td .sub would otherwise win */
.empty { padding: 28px 16px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
table.plain th, table.plain td { padding-left: 0; }
/* Label-and-value detail panels are not lists: no row highlight on hover. */
table.facts tbody tr:hover td, table.kv tr:hover td { background: none; }
/* label and value share one line per row, on the same baseline; no line under the last row */
table.facts th, table.facts td { vertical-align: baseline; padding-top: 10px; padding-bottom: 10px; }
table.facts th { width: 1%; padding-right: 24px; background: none; }
table.facts tr:last-child th, table.facts tr:last-child td { border-bottom: 0; }
table.kv th { width: 44%; font-size: 1rem; font-weight: 400; color: var(--ink-2); background: none; vertical-align: top; }
table.kv th, table.kv td { border: 0; padding: 4px 0; }

/* workings: quantity x rate = amount, the way a utility bill shows a tariff */
.workings { background: var(--ground); border: 1px solid var(--line); border-radius: 6px; margin: 6px 0 2px; font-size: .9rem; }
.workings th, .workings td { padding: 5px 10px; background: none; }
.workings caption { text-align: left; padding: 7px 10px 3px; font-weight: 600; caption-side: top; }
.workings .formula { padding: 6px 10px 8px; color: var(--ink-2); }

/* ---------- states ---------- */
.tag { display: inline-block; font-size: .8rem; font-weight: 600; line-height: 1.5; padding: 0 8px; border-radius: 10px; white-space: nowrap;
  background: var(--accent-soft); color: var(--accent-deep); border: 1px solid var(--accent-line); }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.tag.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.tag.off { background: var(--ground); color: var(--ink-2); border-color: var(--line-2); }
.amt-bad { color: var(--bad); font-weight: 600; }
.amt-ok { color: var(--ok); }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; border: 1px solid; border-left-width: 4px; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); border-left-color: var(--ok); }
.flash.err { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); border-left-color: var(--bad); }
.note { background: var(--ground); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; color: var(--ink-2); }
.note.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); }
.note b { color: var(--ink); }

/* ---------- forms ---------- */
label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 4px; }
label .opt { font-weight: 400; color: var(--ink-2); }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=month], input[type=number], input[type=search],
input[type=file], input:not([type]), select, textarea {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); }
textarea { height: auto; padding: 8px 10px; }
/* Drop-downs draw their own arrow, set in from the edge; the browser's own sits too close to it. */
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235f6068' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px; }
input[type=file] { padding: 5px 8px; height: auto; }
input::placeholder { color: var(--placeholder); }
input:hover, select:hover { border-color: var(--ink-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 0; border-color: var(--link); }
input.amt { text-align: right; }
input.big { height: 44px; font-size: 1.07rem; }   /* matches a .btn.big beside it */
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; vertical-align: -3px; }
.form { display: grid; gap: 14px 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
.form > * { grid-column: span 12; }
.form .c2 { grid-column: span 2; } .form .c3 { grid-column: span 3; } .form .c4 { grid-column: span 4; }
.form .c5 { grid-column: span 5; } .form .c6 { grid-column: span 6; } .form .c8 { grid-column: span 8; }
.form .help { font-size: .86rem; color: var(--ink-2); margin: -6px 0 0; }
.form h3 { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.form h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.dl-row { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }   /* download buttons on one line (Posting export, 24 Nov 2026) */
.dl-row form { margin: 0; }
.inline > div { flex: 1 1 130px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 1rem; margin: 0; }
.check input { margin-top: 3px; flex: none; }
.batch-form div > label { margin-bottom: 0; }   /* the box is inside the label here, so the label's own gap under it lifted the box 4px above a button beside it (24 Nov 2026) */
/* Credit notes for multiple lots: the two groups of choices side by side, each row's text level with the box in it (24 Nov 2026) */
.bulk-choose fieldset.extra { margin: 4px 0 0; align-self: start; gap: 8px; }
.bulk-choose .b-type, .bulk-choose .b-how { grid-column: 1 / span 5; } .bulk-choose .b-month, .bulk-choose .b-lots { grid-column: 6 / span 5; }
@media (max-width: 760px) { .bulk-choose .b-type, .bulk-choose .b-how, .bulk-choose .b-month, .bulk-choose .b-lots { grid-column: 1 / -1; } }
.bulk-choose .check { align-items: center; min-height: 34px; }
.bulk-choose .check input[type=radio] { margin-top: 0; }
.bulk-choose .check input.amt { width: 110px; } .bulk-choose .check select { width: auto; } .bulk-choose .check input[name=units] { width: 220px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color .12s ease-out, border-color .12s ease-out; }
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); text-decoration: none; }
.btn.quiet { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn.quiet:hover { background: var(--ground); border-color: var(--ink-2); }
.btn.danger { background: var(--paper); color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { height: 28px; padding: 0 10px; font-size: .86rem; }
.btn.big { height: 44px; padding: 0 22px; font-size: 1.07rem; }
.btn.onrail { background: transparent; border-color: var(--rail-mute); color: #fff; }
.tabs { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: var(--paper);
  max-width: 100%; overflow-x: auto; }   /* never wider than the screen: on a phone the rest scrolls sideways (24 Nov 2026) */
.tabs a { padding: 5px 12px; color: var(--ink); border-right: 1px solid var(--line-2); white-space: nowrap; }
.tabs a:last-child { border-right: 0; }
.tabs a:hover { background: var(--ground); text-decoration: none; }
.tabs a.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 650; box-shadow: inset 0 -2px 0 var(--accent); }
.tabs.long { display: flex; width: fit-content; max-width: 100%; overflow-x: auto; }   /* many tabs: scroll sideways on a phone */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters > div { min-width: 120px; }
details.more > summary { cursor: pointer; color: var(--link); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease-out; margin-right: 2px; }
details.more[open] > summary::before { transform: rotate(45deg); }
details.more[open] > summary { margin-bottom: 12px; }
details.btnlike > summary { color: var(--ink); }
/* the focus ring on a fold's line sits inside its own padding, so a table's edge never clips it (Francis, 25 Nov 2026:
   "the pill ... look slightly off") */
details.more > summary { padding: 3px 8px 3px 6px; border-radius: 8px; }
details.more > summary:focus-visible { outline-offset: 0; border-radius: 8px; }
details.more > summary:focus:not(:focus-visible) { outline: none; }
/* Remove access: a dialog that asks for the name in capitals before anything goes (Francis, 25 Nov 2026); a dialog,
   not a fold, so the staff table's scrolling never cuts it off */
dialog.rmacc { border: 1px solid var(--bad-line); border-radius: 12px; padding: 0; max-width: min(440px, calc(100vw - 32px));
  background: var(--paper); color: var(--ink); box-shadow: 0 20px 50px rgb(0 0 0 / .25); text-align: left; white-space: normal; }
dialog.rmacc::backdrop { background: rgb(15 20 30 / .45); }
.rmacc-box { padding: 18px 20px; display: grid; gap: 10px; font-weight: 400; }
.rmacc-box h2 { margin: 0; font-size: 1.05rem; color: var(--bad); }
.rmacc-box p, .rmacc-box label { margin: 0; font-size: .92rem; }
.rmacc-box input { width: 100%; }
.rmacc-box .acts { justify-content: flex-start; gap: 8px; }
/* receipt form: pick all charges of a type, then what happens to money beyond them */
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.picks .btn[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chooser .pick { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 10px;
  font-weight: 500; font-size: .93rem; margin: 0; cursor: pointer; background: var(--paper); }
.chooser .pick:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chooser .singles { display: grid; gap: 4px; margin-top: 4px; }
fieldset.extra { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
fieldset.extra legend { font-size: .86rem; font-weight: 600; padding: 0; margin-bottom: 6px; }
/* Lots and owners, Choose the columns (Francis, 24 Nov 2026: "ui is fucked"): the form inside the fold-out had no panel
   padding, so it touched the box's edge, and its 25 ticks ran down one long column; now padded, the ticks in columns */
.colpick { padding: 4px 16px 16px; }
.colpick fieldset.extra { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 16px; }
.colpick fieldset.extra legend { grid-column: 1 / -1; }
details.rename > summary { font-weight: 400; font-size: .86rem; color: var(--ink-2); }
details.rename[open] > summary { margin-bottom: 8px; }
details.rename form { justify-content: flex-end; flex-wrap: nowrap; }
details.rename input { width: 240px; height: 28px; }
details.rename form.acct-edit { flex-direction: column; align-items: stretch; gap: 6px; text-align: left; min-width: 260px; }
details.rename form.acct-edit label { font-size: .8rem; color: var(--ink-2); display: block; }
details.rename form.acct-edit select { width: 100%; height: 28px; }
details.rename form.acct-edit input { width: 100%; }
details.rename .acct-num { display: flex; align-items: center; gap: 4px; }
details.rename .acct-num input { width: 110px; }
details.rename form.acct-edit .btn { align-self: flex-end; }
/* the boxes keep their own height: .inline's boxes grow to 130px wide in a row, which in this column made each 130px tall (Francis, 25 Nov 2026) */
details.rename form.acct-edit > div { flex: none; }

/* ---------- dashboard ---------- */
/* the dashboard's line charts (25 Nov 2026): SVG drawn from app.rate_chart and app.pace_chart */
.dchart { width: 100%; height: auto; display: block; overflow: visible; }
.dchart .g { stroke: var(--line); stroke-width: 1; }
.dchart .tk { fill: var(--ink-2); font-size: 11px; }
.dchart .tk.off { opacity: .45; }   /* a month with no bills: named, no point */
.dchart .ln { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.dchart .avg { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .6; }
.dchart .pt { fill: var(--accent); stroke: var(--paper); stroke-width: 2; }
.dchart .now { fill: var(--paper); stroke: var(--accent); stroke-width: 2.5; }
.kfig { margin: 0 0 10px; font-size: .9rem; }
.kfig b { font-size: 1.35rem; font-weight: 600; margin-right: 4px; }
.legend i.dash { width: 14px; height: 0; border-top: 2px dashed var(--ink-2); background: none; border-radius: 0; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.todo li:last-child { border-bottom: 0; }
.todo b { font-weight: 650; }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; height: 170px; padding: 0 4px; }
.bars .m { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 6px; text-align: center; font-size: .86rem; color: var(--ink-2); }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 100%; }
.bars .pair i { display: block; width: 42%; max-width: 30px; border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
/* pointing at a bar shows what it is and its amount, straight away (no darkening of the bar: a filter would grey the label too) */
.bars .pair i[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -6px);
  background: var(--paper); color: var(--ink); border: 1px solid var(--line-2); font-size: .86rem; font-weight: 400; font-style: normal;
  line-height: 1.4; padding: 2px 8px; border-radius: 4px; white-space: nowrap; z-index: 2; pointer-events: none; }
.bars .pair i.b { background: var(--accent-line); }
.bars .pair i.c { background: var(--accent); }
.legend { display: flex; gap: 16px; font-size: .86rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.age { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: var(--ground); margin-bottom: 12px; }
.age i { display: block; height: 100%; }
.a0 { background: var(--accent-line); } .a1 { background: oklch(80% .1 85); } .a2 { background: oklch(70% .13 60); }
.a3 { background: oklch(60% .16 40); } .a4 { background: var(--bad); }
.band .cur { font-style: normal; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); }
.signin .pitch { background: var(--rail); color: var(--rail-ink); padding: 44px 56px 40px; display: flex; flex-direction: column;
  justify-content: center; gap: 48px; }
/* the silver-violet light trails, anchored right so the headline sits on the plain dark left; the colour behind matches the image's black */
.signin .pitch { background: #0a0a10 url("signin-trails.jpg") right center / cover no-repeat; }
.signin .pitch .brand { padding: 0; }
/* the headline sits a little above the middle (the optical centre), not exactly halfway between logo and fine print */
.signin .pitch > div { padding-bottom: 10vh; }
.signin .pitch h1 { color: #fff; font-size: clamp(2.2rem, 3.5vw, 3.4rem); font-weight: 650; line-height: 1.06; letter-spacing: -.03em; max-width: 13ch; }
.signin .lede { color: oklch(85% calc(.02 * var(--cm)) var(--h)); font-size: 1.14rem; line-height: 1.55; max-width: 40ch; margin: 22px 0 0; }
.signin .lede + .lede { margin-top: 10px; }
.signin .lede, .signin .defn { text-wrap: pretty; }
.signin .defn { margin: 0; padding-top: 14px; border-top: 1px solid var(--rail-on); color: var(--rail-mute); max-width: 52ch;
  font-size: 12px; font-style: italic; letter-spacing: .01em; }   /* fine print */
.signin .defn b { color: #fff; font-weight: 600; }
/* The form's top is pinned, so opening "Try the demo" grows the list downward instead of re-centring and jumping
   the form up. It sits where centring the closed form (about 342px tall) would put it, but no lower than lets the
   open form (about 622px) end 48px above the bottom of the screen. */
.signin .formside { padding: 48px; padding-top: max(48px, min(50vh - 210px, 100vh - 750px)); display: flex; align-items: flex-start; justify-content: center; }
.signin .formbox { width: 100%; max-width: 360px; }
.signin .formbox h2 { font-size: 1.71rem; letter-spacing: -.02em; }
/* the LAMONTcore wordmark sits on top of the form, in ink on the white side (Francis: "like PayPal") */
.signin-mark { margin-bottom: 34px; }
.signin-mark .wm { font-size: 2.1rem; color: var(--ink); }
.signin .formbox .flash { margin: 16px 0 0; }
.signin form { display: grid; gap: 16px; margin: 24px 0 28px; }
.signin form input { height: 42px; }
.signin form .btn { width: 100%; margin-top: 4px; }
/* Back on print pages (address labels, bulk statements): a button above the heading, where it is seen (Francis, 22 Nov 2026) */

/* A refused form: the reason sits on the form itself, across its full width (Francis, 22 Nov 2026) */
.flash.in-form { grid-column: 1 / -1; flex-basis: 100%; width: 100%; margin: 0 0 14px; }
/* Water: a reading Save couldn't keep stays on its row with the reason beside it (Francis, 22 Nov 2026) */
tr.wbad > td { background: var(--bad-soft); }
tr.wbad input { border-color: var(--bad); }
.werr { display: block; margin-top: 4px; color: var(--bad); font-size: .86rem; text-align: left; white-space: normal; min-width: 160px; }
/* ---------- LAMONTcore: the module cards after signing in (Francis, 22 Nov 2026) ---------- */
/* One card per module, home, manager, accounting. The wordmark is the card's title; a card that doesn't open for this
   login stays in place, quieter, and says why. No colour: like the rest of the app, ink on paper. */
.modules-page { max-width: 1120px; margin: 0 auto; padding-top: 7vh; }
.modules-head { margin-bottom: 26px; }
.modules-head h1 { font-size: 1.9rem; letter-spacing: -.02em; }
.modules-head p { color: var(--ink-2); margin: 6px 0 0; }
.building-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.building-pick label { font-weight: 600; }
.building-pick select { width: auto; min-width: 240px; max-width: 100%; font-weight: 600; }
/* four cards fit one row on a laptop (240px each; was 270px for three, until LAMONTaccounting's card, 25 Nov 2026) */
.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.module { display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 22px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; min-height: 250px; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.module:hover { text-decoration: none; border-color: var(--ink); box-shadow: 0 10px 28px -18px rgba(20, 20, 30, .45); transform: translateY(-2px); }
a.module:focus-visible { outline-offset: 3px; border-radius: 12px; }
.module-mark { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.module-mark .wm { font-size: 1.75rem; color: var(--ink); }
.module-title { font-weight: 650; font-size: 1.07rem; }
.module-desc { color: var(--ink-2); line-height: 1.5; text-wrap: pretty; }
.module-go { margin-top: auto; padding-top: 12px; font-weight: 600; }
a.module:hover .module-go span { display: inline-block; transform: translateX(3px); transition: transform .15s; }
.module.off { background: transparent; border-style: dashed; border-color: var(--line-2); }
.module.off .module-mark .wm, .module.off .module-title { color: var(--ink-2); }
.module-why { margin-top: auto; padding-top: 12px; font-size: .93rem; color: var(--ink-2); }
.module-else { margin: 0; }
.bare-switch { margin: 0; }
.bare-switch select { width: auto; max-width: 40vw; height: 30px; padding: 2px 8px; color: var(--ink); background-color: var(--paper); }
/* "All modules" at the foot of the rail, after the last item (23 Nov 2026): quieter than the pages above it, set off by a rule */
/* All modules: hovered like every other item, a rounded fill; the rule above it is drawn on its own, so the fill
   doesn't take it in and turn square (Francis, 25 Nov 2026: "all module select is a square") */
.side a.nav.modules-link { justify-content: flex-start; color: var(--rail-mute); font-size: .93rem; margin-top: 23px; }
.side a.nav.modules-link::after { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 1px; background: var(--m-rule, rgba(255,255,255,.12)); }
.side a.nav.modules-link::before { content: "\2190"; position: relative; z-index: 1; }
@media (max-width: 640px) {
  .bare-top { flex-wrap: wrap; row-gap: 10px; }
  .bare-top .acts { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .bare-switch { order: 9; flex-basis: 100%; display: flex; justify-content: flex-end; }
  .bare-switch select { max-width: 100%; }
  .modules-page { padding-top: 22px; }
  .modules-head h1 { font-size: 1.6rem; }
  .module { min-height: 0; }
}@media (prefers-reduced-motion: reduce) { .module, a.module:hover, a.module:hover .module-go span { transition: none; transform: none; } }
/* the demo logins are folded away under "Try the demo" until opened */
.demo { padding-top: 20px; border-top: 1px solid var(--line); }
.demo > summary { color: var(--ink); }
.demo-list { display: grid; gap: 8px; }
.demo[open] .demo-list { animation: demo-in .18s ease-out; }   /* the buttons fade in as the arrow turns, instead of popping in */
@keyframes demo-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.demo form { margin: 0; }
.demo form .btn { width: 100%; justify-content: flex-start; height: 38px; margin-top: 0; }
form.seats { display: flex; align-items: center; gap: 8px; margin: 0; }
form.seats input { width: 64px; height: 28px; }

/* ---------- owner portal ---------- */
.owner { max-width: 760px; margin: 0 auto; }
.owner:has(.doc) { max-width: 880px; }
.unitcard { display: block; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; margin-bottom: 12px; }
.unitcard:hover { border-color: var(--link); text-decoration: none; }
.unitcard .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.unitcard .big { font-size: 1.5rem; font-weight: 650; letter-spacing: -.015em; white-space: nowrap; }
.pay-opt { border: 1px solid var(--line); background: var(--paper); border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.pay-opt h2 { margin-bottom: 4px; }
.fine { font-size: .86rem; color: var(--ink-2); margin: 8px 0 0; }
.bankbox { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: start; margin: 14px 0; }
.qr { width: 132px; border: 1px solid var(--line-2); border-radius: 6px; padding: 8px; background: #fff; text-align: center; font-size: .72rem; color: var(--ink-2); }
.qr svg { display: block; width: 100%; height: auto; margin-bottom: 4px; }
.copy { font-weight: 650; font-size: 1.07rem; letter-spacing: .01em; }

/* quick ticks above a charge picker: kinds Oldest first may tick, then the buttons */
.picker .quick { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 10px; }
.picker .quick[hidden] { display: none; }
.picker .quick .kinds { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.picker .quick .kinds .check { align-items: center; font-size: .93rem; }
.picker .quick .qbtns { display: flex; gap: 6px; }

/* amounts kept for charges to come (receipt picker, unit page) */
.keepgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; }
.keepone { display: grid; gap: 3px; font-weight: 400; font-size: .93rem; margin: 0; }
.keepone input { max-width: 140px; }

/* day chooser in a panel heading (dashboard: account transaction items) */
.daypick { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; margin: 0; }
.daypick input { width: auto; max-width: 150px; }

/* ---------- printed documents (A4) ---------- */
.docbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 210mm; margin: 0 auto 14px; }
.doc { background: #fff; color: #16181b; border: 1px solid var(--line); border-radius: 4px; max-width: 210mm; margin: 0 auto 22px;
  padding: 15mm 16mm 12mm; position: relative; font-size: 10pt; line-height: 1.42; }
.doc .lh { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10mm; padding-bottom: 6mm; border-bottom: 1.5pt solid var(--accent, #16181b); }
.doc .lh .org b { display: block; font-size: 15pt; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; margin-bottom: 1.5mm; color: var(--accent, #16181b); }
.doc .lh .org .logo { display: block; max-height: 18mm; max-width: 60mm; margin-bottom: 3mm; }
.doc .lh .title h1, .doc h2 { color: var(--accent, #16181b); }
.doc .bulletin { border-left-color: var(--accent, #16181b); }
.doc .docnote { margin-top: 6mm; }
.doc .lh .org { color: #16181b; font-size: 9pt; }
.doc .lh .org b small { display: block; margin-top: .8mm; font-size: 9pt; font-weight: 400; letter-spacing: 0; color: #16181b; white-space: nowrap; }   /* company number on its own line under the agent name, whatever the name's length */
.doc .lh .title { text-align: right; }
.doc .lh .title h1 { font-size: 19pt; font-weight: 750; letter-spacing: -.01em; margin-bottom: 2.5mm; }   /* bolder (Francis, 23 Nov 2026): was 600 */
.doc .meta { margin-left: auto; width: auto; font-size: 9.5pt; }
.doc .meta th, .doc .meta td { border: 0; padding: .4mm 0 .4mm 5mm; background: none; font-size: 9.5pt; }
.doc .meta th { color: #5a6067; font-weight: 400; text-align: left; vertical-align: top; }   /* the label beside the first line of its value (23 Nov 2026) */
/* The details may wrap, so a long value ("Printed … by Natalie (Building manager)") stays inside the page instead of
   running past its right edge, where print cut it off (Francis, 22 Nov 2026: "the alignment seems a bit off"). */
.doc .meta { max-width: 100%; }
.doc .lh > * { min-width: 0; }
.doc .meta td { text-align: right; font-weight: 600; white-space: normal; overflow-wrap: break-word; }
.doc .meta td .by { display: block; font-weight: 400; color: #5a6067; }
.doc .parties { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10mm; margin: 7mm 0; align-items: start; }
.doc .to span { display: block; color: #5a6067; font-size: 8.5pt; margin-bottom: 1mm; }
.doc .to b { display: block; font-size: 11.5pt; }
.doc .to .prop { display: block; margin-top: 1mm; color: #16181b; }
.doc .to .size { display: block; margin-top: 1.5mm; color: #5a6067; font-size: 8.5pt; }
.doc .due.one { justify-self: end; min-width: 60mm; }
/* the right of the parties: the property's box over the amount box (Francis, 24 Nov 2026, option A) */
.doc .docside { display: grid; gap: 3mm; align-content: start; }
.doc .docside .due:has(> div:only-child) { width: 60%; min-width: 0; justify-self: end; box-sizing: border-box; }
/* with a one-figure amount, the property's box and the amount's side by side at those sizes (Francis, 24 Nov 2026:
   "the sizes are perfect. can you put them next to each other?"); the right column takes what the two need */
.doc .parties:has(.docside .due > div:only-child) { grid-template-columns: minmax(0, 1fr) auto; }
.doc .docside:has(.due > div:only-child) { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: stretch; gap: 3mm; }
.doc .docside:has(.due > div:only-child) > .propbox, .doc .docside:has(.due > div:only-child) > .due { width: 57mm; }
/* ... and as one box, the two halves parted by a thin line (Francis, 24 Nov 2026: "combine into 1 (so middle is not rounded in)") */
.doc .docside:has(.due > div:only-child) { gap: 0; flex-wrap: nowrap; border: .75pt solid #16181b; border-radius: 2mm; justify-self: end; }
.doc .docside:has(.due > div:only-child) > .propbox, .doc .docside:has(.due > div:only-child) > .due { border: 0; border-radius: 0; }
.doc .docside:has(.due > div:only-child) > .propbox { border-right: .5pt solid #b9bec4; }
/* the property's half just as wide as its words; the amount keeps its width, its label on top, the figure 15% larger
   and the label with it (Francis, 24 Nov 2026) */
.doc .docside:has(.due > div:only-child) > .propbox { width: auto; white-space: nowrap; padding-right: 10mm; }   /* about 20% wider than its words, the room on the right (Francis, 24 Nov 2026) */
.doc .docside:has(.due > div:only-child) .due > div { display: flex; flex-direction: column-reverse; justify-content: center; }
.doc .docside:has(.due > div:only-child) .due div:first-child b { font-size: 18.5pt; }
.doc .docside:has(.due > div:only-child) > .due { width: 48.5mm; }   /* 15% narrower than 57 mm (Francis, 24 Nov 2026) */
.doc .docside:has(.due > div:only-child) .due div:first-child b.big { font-size: 16.65pt; }   /* RM 1,000,000.00 and up, 10% smaller, so it fits the fixed box (Francis, 24 Nov 2026) */
.doc .docside:has(.due > div:only-child) .due span { font-size: 10pt; margin-bottom: .5mm; }   /* a one-figure amount box as narrow as the property's (Francis, 24 Nov 2026: "total payable too"); a statement's three figures keep the column's width */
.doc .propbox { border: .75pt solid #16181b; border-radius: 2mm; background: none; padding: 3mm 4mm;   /* drawn as the amount box (Francis, 24 Nov 2026: "no grayish") */
  width: 60%; justify-self: end; box-sizing: border-box;   /* 40% narrower than the column, at its right (Francis, 24 Nov 2026) */
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc .propbox span { display: block; color: #5a6067; font-size: 8.5pt; }
.doc .propbox b { display: block; font-size: 14pt; font-weight: 700; line-height: 1.25; }
/* Pay by (and As at) quieter than the amount (Francis, 24 Nov 2026: "pay by dont need to be so prominent") */
.doc .due div.quiet b { font-size: 10.5pt; font-weight: 600; }
.doc .struck b { text-decoration: line-through; }
.doc .due { border: .75pt solid #16181b; border-radius: 2mm; display: grid; grid-template-columns: repeat(auto-fit, minmax(28mm, 1fr)); }
.doc .due div { padding: 3mm 4mm; border-right: .5pt solid #b9bec4; }
.doc .due div:last-child { border-right: 0; }
.doc .due b { display: block; font-size: 13pt; font-weight: 700; white-space: nowrap; }
.doc .due div:first-child b { font-size: 16pt; }
.doc .due span { display: block; color: #5a6067; font-size: 8.5pt; }
.doc table.lines th { background: none; color: #16181b; border-bottom: .75pt solid #16181b; font-size: 8.5pt; padding: 2mm 0; }
.doc table.lines td { padding: 2.2mm 0; border-bottom: .5pt solid #d5d9dd; }
.doc table.lines th.n, .doc table.lines td.n { padding-left: 4mm; }
/* a document is not a list: no row lights up under the mouse, the workings included (Francis, 24 Nov 2026) */
.doc tbody tr:hover td, .doc tbody tr:hover th { background: none; }
.doc table.lines tfoot td { border: 0; padding: 1.4mm 0; font-weight: 400; }
.doc table.lines tfoot tr:first-child td { padding-top: 3mm; }
.doc table.lines tfoot tr.grand td { font-weight: 700; font-size: 11.5pt; border-top: .75pt solid #16181b; padding-top: 2.2mm; }
.doc h2 { font-size: 10pt; margin: 7mm 0 2mm; }
.doc .workings { background: none; border: 0; border-top: .5pt solid #b9bec4; border-radius: 0; font-size: 8.5pt; margin: 0; }
.doc .workings th, .doc .workings td { padding: 1.3mm 0 1.3mm 3mm; border-bottom: .5pt solid #e3e6e9; }
.doc .workings th:first-child, .doc .workings td:first-child { padding-left: 0; }
.doc .workings .formula { padding: 2mm 0 0; color: #5a6067; }
.doc .pay { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10mm; margin-top: 8mm; padding-top: 5mm; border-top: .5pt solid #b9bec4; font-size: 9pt; }
.doc .pay table th, .doc .pay table td { border: 0; padding: .5mm 0; background: none; font-size: 9pt; }
.doc .pay table th { color: #5a6067; font-weight: 400; width: 32mm; }
.doc .pay table td { font-weight: 600; }
/* a bill's end, on screen and on paper (Francis, 24 Nov 2026): the account summary in a box on the left, How to pay on
   the right with its bank details over its note */
/* the summary's box: a thin grey line around it and its heading on a grey band (Francis chose option D, 24 Nov 2026) */
.doc .acctsum { border: .5pt solid #b9bec4; border-radius: 1.5mm; padding: 0 4mm 2.5mm; margin-top: 8mm; overflow: hidden; }
.doc .acctsum h2 { margin: 0 -4mm 1.5mm !important; padding: 2.2mm 4mm; background: #eef0f2; border-bottom: .5pt solid #d5d9dd;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc .acctsum table.lines tbody tr:last-child td { border-bottom: 0; }
.doc .endrow:has(.acctsum):has(.pay) { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 10mm; align-items: start;
  margin-top: 8mm; break-inside: avoid; }
.doc .endrow:has(.acctsum):has(.pay) .acctsum { margin-top: 0; }
.doc .endrow:has(.acctsum):has(.pay) .pay { display: block; margin-top: 0; padding-top: .5pt; border-top: 0; }
/* How to pay's heading on the same line as the summary's, which sits in its band (Francis, 24 Nov 2026) */
.doc .endrow:has(.acctsum):has(.pay) .pay h2 { margin: 0 0 1.5mm !important; padding: 2.2mm 0; }
.doc .endrow:has(.acctsum):has(.pay) .pay > div + div { margin-top: 3mm; }
.doc .endrow .acctsum tbody td:first-child { white-space: normal; padding-right: 3mm; }   /* the long labels wrap in the half width */
.doc .foot { margin-top: 10mm; padding-top: 3mm; border-top: .5pt solid #d5d9dd; color: #5a6067; font-size: 8pt; display: flex; justify-content: space-between; gap: 10mm; }
.doc .stamp { position: absolute; top: 58mm; right: 20mm; transform: rotate(-12deg); border: 2.5pt solid var(--bad); color: var(--bad);
  font-size: 30pt; font-weight: 800; letter-spacing: .12em; padding: 1mm 6mm; border-radius: 2mm; opacity: .78; }
.doc .ownernote { margin: 0 0 4mm; padding: 2mm 3mm; border-left: 1.5pt solid #16181b; font-size: 9.5pt; }
.doc .voidnote { border: .75pt solid var(--bad); color: var(--bad); border-radius: 2mm; padding: 2.5mm 4mm; margin-bottom: 5mm; }
.doc.report { max-width: 210mm; }   /* portrait like every document (Francis, 22 Nov 2026); was 297mm, landscape */
.doc .rep-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; margin: 6mm 0 4mm; }
.doc .rep-title h1 { font-size: 15pt; }
.doc .sect td { font-weight: 700; padding-top: 4mm !important; border-bottom: .75pt solid #16181b !important; }
.doc .tot td { font-weight: 700; border-top: .75pt solid #16181b; }
.doc .ind { padding-left: 5mm !important; }
.printonly { display: none; }
.rep-print { padding: 0 0 3mm; font-size: 10pt; }

/* ---------- small screens ---------- */
@media screen and (max-width: 900px) {
  html { font-size: 16px; }
  .shell { display: block; }
  .side { position: static; height: auto; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .side .brand { padding: 2px 6px; }
  .side .wm { font-size: 1.15rem; }
  .side .wm-text { flex-direction: row; align-items: baseline; gap: 8px; }
  .side .links { display: none; width: 100%; padding-top: 6px; }
  #navt:checked ~ .links { display: block; }
  .side .menu-btn { display: inline-flex; margin: 0; cursor: pointer; }
  .top { padding: 8px 14px; flex-wrap: wrap; }
  .top .who { flex-wrap: wrap; white-space: normal; gap: 8px 10px; min-width: 0; }   /* name, tags and Sign out wrap instead of running off a phone */
  .top .who > a { overflow-wrap: anywhere; }
  details.more > summary { white-space: normal; }
  .page { padding: 18px 14px 48px; }
  .cols, .cols.wide-left { grid-template-columns: minmax(0, 1fr); }
  .form .c2, .form .c3, .form .c4 { grid-column: span 6; }
  .form .c5, .form .c6, .form .c8 { grid-column: span 12; }
  .band .fig { padding: 12px 16px; min-width: 130px; }
  .band .fig.lead { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--accent-line); }
  .band .do { border-left: 0; border-top: 1px solid var(--accent-line); flex-basis: 100%; flex-wrap: wrap; min-width: 0; }
  .band .do .btn { flex: 1 1 auto; }   /* several buttons wrap onto a second line on a phone */
  th, td { padding: 8px 12px; }
  .hide-s { display: none; }
  .show-s, td .sub.show-s { display: block; }
  .signin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }   /* spare height goes to the form side, so the pitch doesn't shrink when the demo list opens */
  .signin .pitch { padding: 26px 22px 24px; gap: 28px; }
  .signin .pitch > div { padding-bottom: 0; }
  .signin-mark { margin-bottom: 22px; }
  .signin-mark .wm { font-size: 1.8rem; }
  .signin .pitch h1 { font-size: 2rem; }
  .signin .lede { font-size: 1rem; margin-top: 14px; }
  .signin .formside { padding: 28px 22px 40px; align-items: flex-start; }
  /* one centred column: the pitch text and the form share the same width and margins */
  .signin .pitch > *, .signin .formbox { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }
  .doc { padding: 20px 16px; font-size: 13px; }
  .doc .lh, .doc .parties, .doc .pay { grid-template-columns: 1fr; gap: 14px; }
  .doc .endrow:has(.acctsum):has(.pay) { grid-template-columns: 1fr; gap: 14px; }
  .doc .docside:has(.due > div:only-child) { flex-direction: column; justify-self: stretch; }
  .doc .docside:has(.due > div:only-child) > .propbox, .doc .docside:has(.due > div:only-child) > .due { width: auto; }
  .doc .docside:has(.due > div:only-child) > .propbox { border-right: 0; border-bottom: .5pt solid #b9bec4; }
  .doc .lh .title { text-align: left; }
  .doc .meta { margin-left: 0; }
  .doc .meta th { padding-left: 0; }
  .doc .stamp { top: 12px; right: 12px; font-size: 20pt; }
  .bankbox { grid-template-columns: 1fr; }
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=month], input[type=number], input:not([type]), select, .btn { height: 40px; }
  .btn.small { height: 34px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; }
  .demo[open] .demo-list { animation: none; } }

/* ---------- print ---------- */
@page { size: A4; margin: 12mm 14mm; }
/* The app sets the paper and its margins, the same as the on-screen sheet's padding, so a printed document matches the
   screen on every browser (otherwise each browser's own default margins apply and wrapping can differ). */
@page { size: A4; margin: 15mm 16mm 12mm; }
/* Print all: each bill starts on a new page */
.printpage + .printpage { margin-top: 22px; }
@media print { .printpage { break-after: page; } .printpage:last-child { break-after: auto; } }
.calc-off .calc-interest { display: none; }
table th.tick, table td.tick { width: 36px; padding-right: 0; text-align: center; vertical-align: middle; }
th.tick input, td.tick input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); cursor: pointer; }
/* Reminders (Francis, 24 Nov 2026): the options and the two buttons on one bar over the list; each row's tick level with
   its lot number, not with the middle of a two-line row */
.remind-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px;
  border-bottom: 1px solid var(--line); }
.remind-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.remind-opts label.check { margin: 0; }
.remind-table td { vertical-align: top; }
/* Saved groups of lots: the lots ticked from a list that can be searched (Francis, 24 Nov 2026) */
.lotpick-box { border: 1px solid var(--line); border-radius: var(--r, 6px); }
.lotpick-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); }
.lotpick-top input[type=search] { flex: 1 1 180px; width: auto; }
.lotpick-list { max-height: 220px; overflow-y: auto; padding: 6px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 2px 12px; }
.lotpick-list label.check { margin: 0; font-weight: 400; }
.lotpick-list label[hidden] { display: none; }
.remind-table td.tick { vertical-align: top; }
.remind-table td.tick input { margin-top: 3px; }
.inline-pick { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: .92rem; }
.inline-pick select { height: 36px; }
.calc-tick { align-items: center; font-size: .92rem; white-space: nowrap; }
.calc-tick input { margin-top: 0; }

@media print {
  html { font-size: 10pt; }
  body { background: #fff; }
  .side, .top, .bare-top, .docbar, .flash, .noprint, .head .acts { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; max-width: none; }
  .owner { max-width: none; }
  .doc { border: 0; padding: 0; margin: 0; max-width: none; font-size: 10pt; }
  .doc .stamp { top: 40mm; right: 6mm; }
  .panel { border: 0; }
  .printonly { display: block; }
  a { color: inherit; text-decoration: none; }
  tr, .due, .pay { break-inside: avoid; }
  .doc h2 { break-after: avoid; }
  thead { display: table-header-group; }
  tfoot { display: table-row-group; }   /* totals print once, at the end; the browser would otherwise repeat them at the foot of every page */
  tfoot tr { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
details.more > summary { white-space: nowrap; }
.doc table.lines th, .doc table.lines td { padding-right: 4mm; }
.doc table.lines th:last-child, .doc table.lines td:last-child { padding-right: 0; }
@media screen and (max-width: 900px) { th, td { padding: 8px 10px; } .owner th:first-child, .owner td:first-child { padding-left: 14px; } }
.bare-top :focus-visible { outline-color: #fff; }
.bars .m small { display: block; color: var(--ink-2); }
.bars.bars-figs { height: 220px; }
.bars .m small.fig-line { font-size: .74rem; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
table.bank td { vertical-align: middle; }
table.bank .ref { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
table.bank .why { min-width: 260px; }
@media screen and (max-width: 900px) {
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=month], input[type=number], input[type=search], input:not([type]), select, textarea { font-size: 16px; }
  .band .do .btn, .band .do .btn.big { height: 44px; }
}
@media screen and (max-width: 900px) { input.big { height: 44px; } }

/* letters and reminders (21 Nov 2026): the letter's own text, paragraph by paragraph */
.letterbody { margin: 18px 0; }
.letterbody p { margin: 0 0 .9em; line-height: 1.55; }   /* the full width of the letter, as its table (Francis, 24 Nov 2026: "paragraph is fucked"; it stopped at 72 characters) */
.batchbox { max-width: 210mm; margin: 0 auto 14px; }
/* documents sit centred on every page (Francis, 24 Nov 2026: "they shouldnt start on the left. it should sit centred always") */

/* charts (21 Nov 2026): one hue, recessive grid, the table on the page is the data view */
figure.chart { margin: 0; padding: 12px 16px 4px; }
figure.chart svg { width: 100%; height: auto; max-height: 300px; display: block; }   /* capped: at full width the bars and axis text grew huge (23 Nov 2026) */
figure.chart .grid { stroke: var(--line); stroke-width: 1; }
figure.chart .base { stroke: var(--line-2); stroke-width: 1; }
figure.chart .axis { fill: var(--ink-2); font-size: 11px; font-family: var(--sans); }
figure.chart .legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .86rem; color: var(--ink-2); margin-bottom: 6px; }
figure.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
figure.chart rect:hover { opacity: .8; }
@media print {
  figure.chart { break-inside: avoid; }
  /* a heading stays with what is under it (reports benchmark, 24 Nov 2026: a chart's title at the foot of a page, its chart on the next) */
  .ph, h2, h3 { break-after: avoid; }
  section.panel:has(> figure.chart) { break-inside: avoid; }
}

.doc.labels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8mm}.doc.labels address{font-style:normal;min-height:30mm;break-inside:avoid}
@media(max-width:600px){.doc.labels{grid-template-columns:1fr}}
@media print{.doc.labels{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-output .doc{font-size:9pt}.compact-output td,.compact-output th{padding:2px 4px!important}}
fieldset.tpl{border:0;border-top:1px solid var(--line);padding:12px 0 0;margin:0 0 14px;min-width:0}fieldset.tpl legend{font-weight:600;padding:0 8px 0 0}.mailopts{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:flex-end;margin:0 0 12px}.mailopts select{width:auto}


/* ---------- reports on screen ---------- */
/* A report is a working table on screen and a sheet of paper only when printed (Francis, 23 Nov 2026: 'wouldn't it make
   more sense to be in view with table and stuff, not the printed view?'). Documents sent to an owner (bill, receipt,
   statement, notes, letters) keep the paper look on screen. The printed page and the PDF are unchanged. */
@media screen {
  .doc.onscreen { max-width: none; margin: 0 0 22px; padding: 0; border-radius: var(--r); font-size: 1rem; line-height: inherit; color: var(--ink); }
  .doc.onscreen .lh { display: none; }
  .doc.onscreen table.lines { margin-top: 0 !important; }
  .doc.onscreen table.lines + table.lines { border-top: 1px solid var(--line-2); }
  .doc.onscreen table.lines th, .doc.onscreen table.lines th:last-child { background: var(--paper); color: var(--ink-2); border-bottom: 1px solid var(--line);
    font-size: .86rem; padding: 8px 16px; }
  .doc.onscreen table.lines td, .doc.onscreen table.lines td:last-child { padding: 8px 16px; border-bottom: 1px solid var(--line); }
  .doc.onscreen table.lines tbody tr:hover td { background: var(--ground); }
  .doc.onscreen table.lines tfoot td, .doc.onscreen table.lines tfoot tr:first-child td { padding: 8px 16px; border-bottom: 0; }
  .doc.onscreen table.lines tfoot tr.grand td { font-size: 1rem; font-weight: 650; border-top: 1px solid var(--line-2); padding-top: 10px; }
  .doc.onscreen .sect td { padding-top: 16px !important; border-bottom: 1px solid var(--line-2) !important; }
  .doc.onscreen .tot td { border-top: 1px solid var(--line-2); }
  .doc.onscreen .ind { padding-left: 32px !important; }
  .doc.onscreen h2 { font-size: 1.07rem; margin: 0; padding: 14px 16px 6px; color: var(--ink); }
  .doc.onscreen .foot { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
}
/* Statement and Charges due, for the office: working screens as well (class "work"). What belongs to the paper only
   (who it is addressed to, the notice, the legal line, how to pay, the footer) is left to the printed page. */
@media screen {
  .doc.onscreen.work .parties, .doc.onscreen.work .pay, .doc.onscreen.work .legal, .doc.onscreen.work .bulletin,
  .doc.onscreen.work .docnote, .doc.onscreen.work .foot { display: none; }
  .doc.onscreen .ownernote { margin: 12px 16px; }
  /* Bills and settlements on screen: its date filters and figures inside the box's edges (Francis, 24 Nov 2026: "see the edges of the main box") */
  .doc.onscreen > .filters { padding: 12px 16px 0; }
  .doc.onscreen > .due { margin: 0 16px 14px; }
  /* a report's section headings and notes inside the box's edges, as its tables (Francis, 24 Nov 2026: "ui is fucked see the words") */
  .doc.onscreen > h3, .doc.onscreen > p, .doc.onscreen > .fine, .doc.onscreen > .note { padding-left: 16px; padding-right: 16px; }
  .doc.onscreen > h3 { padding-top: 6px; }
  .doc.onscreen .workings { margin: 0 16px 14px; width: calc(100% - 32px); }
  .doc.onscreen .workings.formula { margin: 0 16px 14px !important; }
}
.lotbox { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.lotbox label { margin: 0; font-weight: 600; }
.lotbox input { width: 140px; }
/* Wide tables on screen (24 Nov 2026, after Debtor ageing's nett due was cut off and a check of every page found seven
   more reports wider than their box): a table of more than ten columns lets its page use the whole screen width (the
   page otherwise stops at 1,320 px), has tighter cells, slightly smaller text and headings that may wrap, and keeps its first column (lot,
   code, receipt) in view while it scrolls sideways, as the widest (twelve months side by side) still must. */
@media screen and (min-width: 901px) {
  .page:has(.scroll table tbody tr > :nth-child(11)) { max-width: none; }
  .scroll table:has(tbody tr > :nth-child(11)) { font-size: .93rem; }
  .scroll table:has(tbody tr > :nth-child(11)) th, .scroll table:has(tbody tr > :nth-child(11)) td,
  .scroll table:has(tbody tr > :nth-child(11)) th:last-child, .scroll table:has(tbody tr > :nth-child(11)) td:last-child { padding-left: 7px; padding-right: 7px; }
  .scroll table:has(tbody tr > :nth-child(11)) thead th { white-space: normal; vertical-align: bottom; }
  .scroll table:has(tbody tr > :nth-child(11)) tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); box-shadow: 1px 0 0 var(--line); }
}
}
@media screen and (max-width: 900px) { .doc.onscreen table.lines th, .doc.onscreen table.lines td, .doc.onscreen table.lines th:last-child, .doc.onscreen table.lines td:last-child { padding: 8px 10px; } }

/* ---------- the lot box's own list (see the script at the foot of base.html) ---------- */
.lotdrop { position: absolute; z-index: 60; background: var(--paper); border: 1px solid var(--line-2); border-radius: 6px; max-height: 300px;
  overflow-y: auto; padding: 4px; }
.lotdrop[hidden] { display: none; }
.lotpick { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 10px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.lotpick b { font-weight: 600; }
.lotpick span { color: var(--ink-2); font-size: .93rem; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.lotpick:hover { background: var(--ground); }
.lotpick.on { background: var(--accent-soft); }
.lotnone { padding: 6px 10px; color: var(--ink-2); font-size: .93rem; }

/* ---------- choosing what a payment pays (templates/_picker.html, laid out again 23 Nov 2026) ---------- */
/* The top block: figures on the left, the two buttons on the right, and under a rule what Pay oldest first includes.
   It scrolls away with the page (Francis, 25 Nov 2026: "i dont need it floating"). */
.pk-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--paper); margin: 0 0 12px; }
.pk-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pk-sum .bad b, .keepleft.bad b { color: var(--bad); }
.pk-sum > div { padding: 10px 16px; border-right: 1px solid var(--line); }
.pk-sum span { display: block; color: var(--ink-2); font-size: .86rem; }
.pk-sum .pk-note { font-style: normal; }
.pk-sum b { font-size: 1.36rem; font-weight: 650; letter-spacing: -.01em; }
.pk-top .quick { display: contents; }
.pk-top .quick[hidden] { display: none; }
.pk-top .qbtns { display: flex; gap: 8px; padding: 10px 16px; }
.pk-top .kinds { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 8px 16px; border-top: 1px solid var(--line);
  font-size: .93rem; }
.pk-top .kinds .mute { margin-right: 4px; }
.pk-top .kinds .check { align-items: center; margin: 0; font-weight: 400; }
@media screen and (max-width: 900px) {
  .pk-top { grid-template-columns: minmax(0, 1fr); }
  .pk-sum > div { padding: 8px 12px; } .pk-sum > div:last-child { border-right: 0; }
  .pk-top .qbtns { border-top: 1px solid var(--line); }
}
/* The list: a bill is a bold line with a heavier rule above it and no band of its own (a grey band clashed with the
   shading of ticked charges, Francis); its charges sit indented under it. Only a ticked charge is shaded. */
.pk-list label { font-weight: 400; font-size: 1rem; margin: 0; cursor: pointer; }
.pk-list .pk-code { color: var(--ink-2); font-size: .86rem; margin-right: 6px; white-space: nowrap; }
.pk-list tr.pk-bill td { background: none; border-top: 2px solid var(--line-2); padding-top: 10px; padding-bottom: 6px; border-bottom: 0; }
.pk-list tbody tr.pk-bill:first-child td { border-top: 0; }
.pk-list tr.pk-bill label, .pk-list tr.pk-bill td.n { font-weight: 650; }
.pk-list tr.pk-bill:hover td { background: none; }
.pk-list tbody tr:not(.pk-bill) td:first-child { padding-left: 30px; }
.pk-list tr.on td { background: var(--accent-soft); }
.pk-list td.will { font-weight: 600; }
.pk-list td.pos { color: var(--ink-2); }
.pk-list th:first-child, .pk-list td:first-child { padding-left: 8px; width: 56px; }

/* Keep money for charges to come: a box of its own, with the left-over figure in its heading, as on top */
.keepamts { border: 1px solid var(--line-2); border-radius: 8px; padding: 0; margin: 14px 0 0; min-width: 0; }
.keephead { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.keephead b { font-weight: 650; }
.keephead .left { margin: 0 0 6px; font-size: 1.07rem; font-weight: 600; }
.keephead .left:empty { display: none; }
.keepleft { text-align: right; white-space: nowrap; }
.keepleft span { display: block; color: var(--ink-2); font-size: .86rem; }
.keepleft b { font-size: 1.36rem; font-weight: 650; letter-spacing: -.01em; }
.keepamts .keepgrid { padding: 12px 16px 14px; }
@media screen and (max-width: 900px) { .keephead { flex-wrap: wrap; } .keepleft { text-align: left; } }

/* A report's cells stay on one line (Francis, 23 Nov 2026: "ui is off again"): lot numbers, receipt numbers and names
   were breaking at their hyphens and spaces (OR- / 000567, A2- / 12- / 05) once a table had many columns. The table
   scrolls sideways inside its panel instead. */
@media screen {
  td.nw { white-space: nowrap; }
  table.rt th, table.rt td, .doc.onscreen table.lines td { white-space: nowrap; }
  table.rt td.long, .doc.onscreen table.lines td.long { white-space: normal; min-width: 28ch; }
  .doc.onscreen table.lines td.long.short { min-width: 16ch; }   /* the ledger's Party beside its Details (25 Nov 2026) */
}

/* the three views of one lot's account (Statement, Charges due, Bills and settlements): one row of tabs on each */
.lottabs { display: flex; width: fit-content; max-width: 100%; margin: 0 0 14px; }
.lottabs a { padding-left: 16px; padding-right: 16px; }

/* On paper a status is plain text, not a pill (Francis, 23 Nov 2026: "lose all the pill, make them just text in all
   printed document. screenwise still okay to have the pill"): Overdue, Paid, Unpaid, Void, Balanced and the rest print
   in the type of the line they sit in, with no border, fill or colour. */
@media print {
  .tag, .tag.ok, .tag.warn, .tag.bad, .tag.off { display: inline; background: none !important; border: 0; border-radius: 0; padding: 0;
    color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
}

/* The lot page's Open credit box (23 Nov 2026, Francis: "what happened to the ui"): its two halves sit inside .cols, so
   .panel > .pb never padded them and the left half touched the box's edge. Each half gets a small heading of its own. */
.credit-cols { margin-bottom: 0; }
.credit-cols > .pb { padding: 16px; }
.credit-sub, .credit-cols fieldset.extra legend.credit-sub { font-size: .95rem; font-weight: 650; margin: 0 0 4px; padding: 0; }
@media screen and (max-width: 900px) { .credit-cols { grid-template-columns: 1fr; gap: 0; } }

/* The heading of a printed list or report (ui.listhead): the accounts reports' heading (.doc .lh), with a gap under it */
@media print { .printonly.listdoc { margin-bottom: 5mm; } }

/* Nothing is cut off on paper, on any page (Francis, 23 Nov 2026: "looks like they got chopped off halfway. make sure
   the whole app doesnt do this"). On screen a wide table scrolls inside .scroll; a printed page can't scroll, so the
   wrapper clipped the right-hand columns and whatever crossed a page break. When printing: no clipping anywhere,
   every table fits the page width, headings may wrap, and the wider a table the smaller its type and spacing, so a
   ten-column report still fits A4 portrait. */
@media print {
  .scroll, .panel, .doc, section, article, .page, .shell { overflow: visible !important; }
  table { width: 100% !important; max-width: 100% !important; }
  /* headings wrap only in wide tables; a document's four columns keep "Amount (RM)" on one line (Francis, 23 Nov 2026:
     a receipt printed it on two, which left a tall blank band above the table) */
  table:has(> thead > tr > th:nth-child(7)) th, table:has(> thead > tr > th:nth-child(7)) th a.sorth { white-space: normal !important; }
  .doc .parties { margin-bottom: 5mm; }
  tbody td:first-child, tfoot td:first-child { white-space: nowrap; }   /* a lot number or date never breaks at its dashes */
  /* raised the same night (Francis: "the word is getting so small"): 7 pt was too small to read */
  table:has(> thead > tr > th:nth-child(7)) { font-size: 9pt; }
  table:has(> thead > tr > th:nth-child(9)) { font-size: 8.5pt; }
  table:has(> thead > tr > th:nth-child(11)) { font-size: 8pt; }
  table:has(> thead > tr > th:nth-child(7)) th { font-size: .95em !important; }
  table:has(> thead > tr > th:nth-child(7)) tfoot td { font-size: 1.05em !important; }
  table:has(> thead > tr > th:nth-child(7)) th.n { width: 1px; }   /* figures' columns as narrow as their figures: long headings wrap, names get the room */
  table:has(> thead > tr > th:nth-child(7)) th, table:has(> thead > tr > th:nth-child(7)) td { padding-left: 1mm !important; padding-right: 1mm !important; }
  table:has(> thead > tr > th:nth-child(7)) th:first-child, table:has(> thead > tr > th:nth-child(7)) td:first-child { padding-left: 0 !important; }
}

/* The report heading's left side (ui.orgline): the building's name, the managing agent's under it; no address */
.doc .lh .orgline b { font-size: 13pt; margin-bottom: 1mm; }
.doc .lh .orgline span { display: block; font-size: 9.5pt; color: #16181b; }
.doc .lh:has(.orgline) { align-items: end; padding-bottom: 4mm; }

/* The heading every office page carries for printing (base.html, "autohead"): shown only when the page has no heading
   of its own. A document's letterhead or a report's heading (any .lh outside the autohead) hides it, and so do address
   labels, which carry none. When it shows, the screen heading under it doesn't print, so the title isn't printed twice. */
@media print {
  body:has(.doc:not(.autohead) .lh) .autohead, body:has(.doc.labels) .autohead { display: none !important; }
  body:not(:has(.doc:not(.autohead) .lh)):not(:has(.doc.labels)) .page > .head,
  body:not(:has(.doc:not(.autohead) .lh)):not(:has(.doc.labels)) .page > .crumb { display: none !important; }
}
@media print { .btn, button { display: none !important; } }   /* buttons never print (23 Nov 2026: a lot's page printed its buttons) */

/* One layout for every page heading (Francis, 23 Nov 2026: Debtor ageing's date and Print sat beside the title when its
   description was short and under it when long): the title and description on the left; buttons on the right, Print
   last; any form of choices (dates, a search, a month, a year) on its own full row underneath, the same on every page. */
.head > div:first-child { flex: 1 1 320px; min-width: 0; }
.head > .acts, .head > .tools { margin-left: auto; align-self: flex-end; }
.head > form:has(input:not([type=hidden]), select) { flex: 1 0 100%; order: 3; justify-content: flex-start; margin: 2px 0 0; }
.head + form.filters { margin: -4px 0 18px; }


/* Required fields and refusals beside a field (Francis, 23 Nov 2026). A small red * after the label; a refused field
   gets a red outline and its reason in red under it, as Water meter reading's rows do. */
.req { color: var(--bad, #b42318); font-weight: 600; margin-left: 3px; }
label .req + .opt { margin-left: 4px; }
.is-bad, input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--bad, #b42318) !important; box-shadow: 0 0 0 1px var(--bad, #b42318); }
.ferr { display: block; margin-top: 4px; color: var(--bad, #b42318); font-size: .86rem; font-weight: 500; }
@media print { .req, .ferr { display: none; } }

/* The sign-in time in the top bar, and the bar that warns of signing out (23 Nov 2026) */
.top .who .signedin { font-size: .8rem; white-space: nowrap; }
@media (max-width: 900px) { .top .who .signedin { display: none; } }
.idlewarn { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80; display: flex; gap: 12px; align-items: center;
  background: var(--ink, #16181b); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.idlewarn[hidden] { display: none; }

/* The temporary password shown once on a lot's page (23 Nov 2026): large and easy to read out or type */
.temppw { font: 600 1.3rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .02em; margin: 6px 0; user-select: all; }

/* A green notice in a box (the lot's Logins, 23 Nov 2026) */
.note.okn { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.note.okn b { color: var(--ok); }
.loginrow .sub { white-space: normal; }


/* Group headers in their own tone (Francis, 23 Nov 2026: "maybe a different color or tone, so it's clear they are only
   the group / collapsible header. let's try that"): a soft sand colour on a faint band, so they read as headings and
   the pages under them (light grey) as places to go. A trial. */
.side details.grp > summary { color: var(--grp-ink, oklch(82% .07 80)); background: rgba(255,255,255,.045); }   /* sand by default; each login may choose another on My login (Francis, 23 Nov 2026) */
.side details.grp > summary:hover { color: color-mix(in oklch, var(--grp-ink, oklch(82% .07 80)) 75%, white); background: rgba(255,255,255,.09); }
.side details.grp[open] > summary { margin-bottom: 2px; color: var(--grp-ink, oklch(82% .07 80)); }

/* The colour choice on My login: a swatch beside each name */
.tonepick { display: flex; flex-wrap: wrap; gap: 8px; }
.tonepick label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.tonepick label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tonepick .sw { display: inline-block; width: 16px; height: 16px; border-radius: 4px; background: #232323; position: relative; }
.tonepick .sw::after { content: ""; position: absolute; inset: 4px; border-radius: 2px; background: var(--c); }

/* One place for each message (Francis, 23 Nov 2026). Green sits under the page heading (base.html). Red: a box at the
   top of the form that was sent, listing every problem, each a link to its field; the fields turn red with their
   reason under them. A refused form lines its fields up from the top, so a reason under one box doesn't push the
   labels beside it out of line. */
.errsum { grid-column: 1 / -1; flex-basis: 100%; width: 100%; margin: 0 0 16px; padding: 12px 16px; border-radius: 6px;
  border: 1px solid var(--bad-line); border-left: 4px solid var(--bad); background: var(--bad-soft); color: var(--bad); }
.errsum:focus { outline: none; }
.errsum-t { margin: 0; font-weight: 500; }
.errsum-t b { font-weight: 700; }
.errsum ul { margin: 6px 0 0; padding-left: 18px; }
.errsum li { margin: 2px 0; }
.errsum a { color: var(--bad); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
form.form.has-err { align-items: start; }
@media print { .errsum { display: none; } }

/* Settings in tabs (24 Nov 2026): the bar under the heading; one tab shows at a time once the script runs */
.settabs { margin: 0 0 16px; }
.settabs[hidden], .settab[hidden] { display: none; }
.settab > .panel + .panel, .settab > section + section { margin-top: 16px; }
/* a row of tabs in a panel's heading may shrink to the screen and scroll sideways (phone width, 24 Nov 2026) */
.panel > .ph > .tabs { min-width: 0; }
.settabs a.bad::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--bad); vertical-align: middle; }
/* a code in a column heading with its name under it (24 Nov 2026: codes where staff read figures) */
th .sub { display: block; font-weight: 400; }

/* Documents on paper, tighter (Francis, 24 Nov 2026, after the full check: a normal monthly bill printed on two sheets,
   the second holding only the footer). Rows and gaps on paper were about twice as tall as on the bills owners know;
   these keep a bill with its charges, water workings, account summary and How to pay on one A4 (and with the interest
   workings ticked, up to about six interest lines). Only top and bottom spacing changes: column gaps stay. Screen unchanged. */
@media print {
  .doc { line-height: 1.25; }
  .doc .lh, .doc .parties .to { line-height: 1.42; }   /* the letterhead, the details (Number, Date...) and Billed to spaced as on screen (Francis, 24 Nov 2026: the receipt's details "on printed doc it looks different") */
  .doc .lh { padding-bottom: 3mm; }
  .doc .lh .org .logo { max-height: 15mm; margin-bottom: 2mm; }
  .doc .lh .title h1 { margin-bottom: 1.5mm; }
  .doc .parties { margin: 3.5mm 0 !important; }
  .doc .due div { padding: 2mm 3.5mm; }
  .doc .propbox { padding: 2mm 3.5mm; }
  .doc table.lines tfoot tr:first-child td { padding-top: 1.8mm; }
  .doc table.lines tfoot tr.grand td { font-size: 11pt; padding-top: 1.4mm; }
  .doc h2 { margin: 3.5mm 0 1mm; }
  .doc .workings th, .doc .workings td { padding-top: .5mm; padding-bottom: .5mm; }
  /* the interest workings' column headings on one line each: wrapped, "Amount overdue (RM)" took three */
  .doc table.workings th { white-space: nowrap !important; }
  .doc table.workings { font-size: 8.5pt !important; }
  .doc .fine { margin: 1.5mm 0 0; font-size: 8pt; line-height: 1.35; }
  .doc .ownernote { margin-bottom: 3mm; padding: 1.5mm 3mm; }
  .doc .pay { margin-top: 4mm; padding-top: 3mm; gap: 8mm; }
  .doc .pay p { margin: 0 0 1mm; line-height: 1.3; }
  .doc .foot { margin-top: 3mm; padding-top: 1.5mm; }
  .doc .docnote { margin-top: 3mm; }
  /* a statement's How to pay stays on the last page of figures when it can (reports benchmark, 24 Nov 2026: a one-page
     statement sent How to pay onto a sheet of its own): a smaller Details text keeps rows to one or two lines */
  /* statements only (Francis, 24 Nov 2026: bills looked cramped once every document table printed smaller) */
  .doc.statement table.lines td { font-size: 8.5pt; line-height: 1.2; }
  .doc.statement table.lines th { font-size: 8pt; }
  /* a wide document table (Bills and settlements: CSS's eleven columns) on portrait: smaller still, so its description keeps its width */
  .doc table.lines.wide td, .doc table.lines.wide th { font-size: 7.5pt; padding-right: 2mm; }
  /* the bill's end on paper: tighter than on screen */
  .doc .endrow:has(.acctsum):has(.pay) { margin-top: 5mm; }
  .doc .endrow:has(.acctsum):has(.pay) .pay h2 { margin: 0 0 1mm !important; padding: 1.8mm 0; }
  .doc .endrow:has(.acctsum):has(.pay) .pay > div + div { margin-top: 2mm; font-size: 8.5pt; }
  .doc .acctsum { padding: 0 3.5mm 2mm; }
  .doc .acctsum h2 { margin: 0 -3.5mm 1mm !important; padding: 1.8mm 3.5mm; }
  .doc .endrow .acctsum table.lines td { padding-top: .6mm; padding-bottom: .6mm; }
  /* rows with room between their lines, closer to the screen: first on bills (Francis, 24 Nov 2026: "the line spacing is
     still too slim ... retain in 1 page for general monthly billing"), then on every document (the same day: "charges,
     statement, bill and settlement, and im afraid more, still having that slim horizontal space") */
  .doc table.lines td { padding-top: 1.7mm; padding-bottom: 1.7mm; }
  .doc table.lines th { padding-top: 1.8mm; padding-bottom: 1.8mm; }
  .doc table.lines tfoot td { padding-top: 1.5mm; padding-bottom: 1.5mm; }
  .doc.bill .endrow .acctsum table.lines td { padding-top: .9mm; padding-bottom: .9mm; }
}

/* Print and Export to Excel on a list's own box (Francis, 24 Nov 2026), at the right of its heading; Print there prints
   that box only: the other boxes, figures and notes of the page stay off the paper. */
.panel > .ph > .tools { margin-left: auto; }
@media print {
  body.print-box .page .panel:not(.print-this):not(.print-this *),
  body.print-box .page .band, body.print-box .page > .note, body.print-box .page > p, body.print-box .page > .tabs,
  body.print-box .page > form:not(:has(.print-this)), body.print-box .page > .cols > :not(:has(.print-this)):not(.print-this) { display: none !important; }
  body.print-box .page .cols { display: block; }
}

/* A voucher as a document (templates/_voucher_doc.html, 24 Nov 2026): who it was paid to or received from, the lines,
   and signature boxes. The owner's and the supplier's payment vouchers are working screens; on paper only the voucher
   prints (class "paperonly"), as the cash book's does. */
.doc .vparty { margin: 6mm 0 3mm; }
.doc .vparty span { display: block; color: #5a6067; font-size: 8.5pt; margin-bottom: 1mm; }
.doc .vparty b { font-size: 11.5pt; }
.doc .signs { display: flex; gap: 18mm; margin-top: 16mm; break-inside: avoid; }
.doc .signs > div { flex: 1; border-top: .75pt solid #16181b; padding-top: 2mm; }
.doc.paperonly { display: none; }
@media print {
  .doc.paperonly { display: block; }
  body:has(.doc.paperonly) .page > :not(.doc.paperonly) { display: none !important; }
}

/* Screen controls stay off paper (full check, 24 Nov 2026): the period tabs above a list, the "Pay" opener in a table
   (an unpaid bill prints "Unpaid" instead, class "onpaper"), the bank reconciliation's tick boxes (its Cleared column
   says the same in words), and the underline of links, which printed under account names on the trial balance. */
.onpaper { display: none; }
@media print {
  .onpaper { display: inline; }
  .tabs, .lottabs, .settabs { display: none !important; }
  td details.more { display: none !important; }
  table.rec-table th.tick, table.rec-table td.tick { display: none !important; }
  .page a, .top a, .doc a { text-decoration: none !important; color: inherit !important; }
}

/* The line under an accounts report's heading when it includes entries not yet posted (full check B8, 24 Nov 2026) */
.note.unposted { margin: 10px 0 0; }
@media print { .doc .note.unposted { margin: 3mm 0 0; padding: 1.5mm 3mm; font-size: 9pt; background: none; } }

/* Wide reports on landscape A4 (Francis, 24 Nov 2026: "Landscape printing for wide reports. Do it.", reversing "portrait
   for everything" of 22 Nov): a report of more than ten columns (months side by side, a column per code) prints across
   the page instead of shrinking its type; report_table.html and daily_payments.html mark it. Documents stay portrait. */
@page wide { size: A4 landscape; margin: 12mm 14mm; }
@media print { .page:has(.print-wide-marker) { page: wide; } }

/* filters apply as they are chosen: their Show / Find buttons are hidden when the page's script runs (Francis, 24 Nov 2026) */
.js [data-apply] { display: none !important; }

/* action-only columns (Edit, Remove...) stay off paper: marked by hideActionColumns in base.html (24 Nov 2026) */
@media print { .print-off { display: none !important; } }

/* ---- Printing faults from the bug hunt (24 Nov 2026; Francis: "lets go for round 1-4"), found on real PDFs ---- */
/* I1: a statement's three figures. The box shared its width in three equal parts and a four-digit "RM 1,154.10" ran
   into the next figure. Each part is now at least as wide as its own figure, all three figures one size, and the
   property box is as wide as the figures box under it, so the two line up. */
.doc.statement .docside .due { grid-template-columns: repeat(3, minmax(max-content, 1fr)); }
.doc.statement .docside .due div:first-child b { font-size: 13pt; }
.doc.statement .docside .propbox { justify-self: stretch; }
@media print {
  /* I2, I3: a statement or a list of charges due with six months on it keeps How to pay on the same sheet: rows a
     little closer, and the notes under the table tighter. Block A1's 64 statements took 120 sheets. */
  .doc.statement table.lines th, .doc.statement table.lines td,
  .doc.duelist table.lines th, .doc.duelist table.lines td { padding-top: 1.05mm !important; padding-bottom: 1.05mm !important; }
  .doc.statement table.lines, .doc.duelist table.lines { font-size: 9.2pt; }
  .doc.statement .pay, .doc.duelist .pay { margin-top: 3mm; padding-top: 2.5mm; }
  .doc.statement .foot, .doc.duelist .foot { margin-top: 3mm; padding-top: 2mm; }
  .doc.statement .lh, .doc.duelist .lh { padding-bottom: 2mm; }
  .doc.statement .parties, .doc.duelist .parties { margin: 2.5mm 0 !important; }
  /* I5: the choices that narrow a list (dates, stage, search) are for the screen: never on paper */
  main form[method="get"], main form.filters { display: none !important; }
  /* I6: Daily payments. The Day column took the slack of a full-width table, nearly half the sheet */
  table.daily th:first-child, table.daily td:first-child { width: 24mm; white-space: nowrap; }
  table.daily th, table.daily td { padding-top: 1mm !important; padding-bottom: 1mm !important; }
  /* I7: the arrow that marks the sorted column is a screen control; and the credit line never breaks over lines */
  a.sorth span[aria-hidden] { display: none; }
  .doc .foot span:last-child, .foot span:last-child { white-space: nowrap; }
}

/* ---- Bug hunt, round 4 (24 Nov 2026): layout ---- */
/* J1: on the office's working screens the interest workings are the size of the table above them. They had kept the
   paper's 8.5 pt under a screen-size statement (Francis: "statement ui seems weird ... but print is good"). */
@media screen {
  .doc.onscreen .workings, .doc.onscreen table.workings { font-size: .93rem; }
  .doc.onscreen .workings th, .doc.onscreen .workings td { padding: 7px 10px; }
  .doc.onscreen .workings th:first-child, .doc.onscreen .workings td:first-child { padding-left: 0; }
  .doc.onscreen .workings caption { font-size: .93rem; padding: 8px 0 4px; }
  .doc.onscreen .workings .formula, .doc.onscreen p.formula { font-size: .9rem; }
}
/* D1 to D4: on a phone a wide table scrolls inside its own box; the page itself never runs wider than the screen */
@media screen and (max-width: 900px) {
  .doc, main .panel { overflow-x: auto; }
}
/* I1, the rest: the property box as wide as the figures under it */
.doc.statement .docside .propbox { width: auto; box-sizing: border-box; }
/* C12: Reminders prints its list without the tick column */
@media print { .remind-table .tick { display: none; } }

/* The line over Nett due on a working screen (Francis, 24 Nov 2026: "the horizontal line under 0.27 is chopped off"): the
   last column kept the rows' own bottom line, so the totals' rule broke before the amount and a stray line sat under it.
   The totals have no lines of their own but the one over Nett due, right across. */
@media screen {
  .doc.onscreen table.lines tfoot td:last-child { border-bottom: 0; }
  .doc.onscreen table.lines tfoot tr.grand td, .doc.onscreen table.lines tfoot tr.grand td:last-child { border-top: 1px solid var(--line-2); border-bottom: 0; }
}

/* "Includes n entries not yet posted to the general ledger" on the trial balance, balance sheet, income and expenditure
   and a ledger (Francis, 24 Nov 2026: "UI is not great"): it sat as a grey bordered band jammed against the top of the
   sheet. On screen it is a quiet line of the sheet itself, in the sheet's own margins, with a rule under it. */
@media screen {
  .note.unposted { margin: 0; padding: 11px 16px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink-2); font-size: .9rem; }
}

/* On a phone, long words wrap instead of pushing the page sideways (release check, 24 Nov 2026: Supplier bills' link to
   Suppliers and a receipt's "Correct the description…" ran 20 to 27 pixels off a 375-pixel screen). Last in the file,
   so it wins over the nowrap above. */
@media (max-width: 640px) {
  details.more > summary { white-space: normal; }
  .head .acts .btn { white-space: normal; height: auto; min-height: 40px; padding-top: 6px; padding-bottom: 6px; text-align: center; }
}
/* ---------- the New menu (Francis, 25 Nov 2026) ----------
   The only menu style since 25 Nov 2026 (Francis: "this is the only menu style"; Classic, the rules above it override, was removed). The menu
   is the buttons' near-black (#1c1d22) a step lighter, so text, buttons and menu are one family of dark ("is the button
   black color... should i use it for the menu bar too?"); every fill is flat ("my main view is solid button but gradient
   on the side bar... doesn't look so coherent"); an icon on each group (Tabler Icons, MIT, static/icons), drawn here from
   the entry's --ic so the menu's words are untouched; the open page is a grey pill, not white, so the strongest contrast
   on screen is the page and not the menu; the building's colour (--grp-ink) is a bar on the menu's edge beside the group
   holding the page, and the counts of work waiting. */
.side[data-menu="new"] { --rail: #25262c; --rail-on: #30313a; --rail-ink: #ececf0; --rail-mute: #a3a4ae; --ink-ic: #a3a4ae;
  --m-text: #e6e6ea; --m-chev: #8d8e98; --m-hair: #3f404a; --m-tree: #474852; --m-sub: #b9bac4; --m-pill: #3b3c46; --m-rule: #3a3b44; }
@media (min-width: 901px) { .shell:has(> .side[data-menu="new"]) { grid-template-columns: 256px minmax(0, 1fr); } }
/* the icon: a picture of the line drawing, filled in the icon colour */
.side[data-menu="new"] details.grp[style] > summary::before, .side[data-menu="new"] a.nav[style]::before {
  content: ""; position: relative; z-index: 1; flex: none; width: 19px; height: 19px; background: var(--ink-ic);
  -webkit-mask: var(--ic) center / 19px 19px no-repeat; mask: var(--ic) center / 19px 19px no-repeat; }
/* the groups: no rule between them, no fill, white names; the chevron stays, at the right */
.side[data-menu="new"] details.grp { margin-top: 2px; padding-top: 0; border-top: 0; position: relative; }
.side[data-menu="new"] details.grp > summary { justify-content: flex-start; gap: 10px; color: var(--m-text); background: transparent; font-weight: 400;
  padding: 7px 10px; border-radius: 8px; }
.side[data-menu="new"] details.grp > summary::after { margin-left: auto; color: var(--m-chev); }
.side[data-menu="new"] details.grp > summary:hover { color: #fff; background: var(--rail-on); }
.side[data-menu="new"] details.grp[open] > summary { color: #fff; margin-bottom: 2px; }
/* the group holding the page: a flat fill with a hairline, its icon white, and the colour bar on the menu's edge */
.side[data-menu="new"] details.grp.here > summary { background: var(--rail-on); box-shadow: inset 0 0 0 1px var(--m-hair); }
.side[data-menu="new"] details.grp.here > summary::before, .side[data-menu="new"] a.nav.on[style]::before { background: #fff; }
.side[data-menu="new"] details.grp.here::before, .side[data-menu="new"] .links > a.nav.on:not(.modules-link) .nav-mark::before {
  content: ""; position: absolute; left: -12px; top: 7px; width: 3px; height: 22px; border-radius: 2px; background: var(--grp-ink, oklch(82% .07 80)); }
/* the pages of a group: indented on a thin line */
.side[data-menu="new"] .grp-links { margin: 2px 0 6px 19px; padding: 0 0 0 6px; border-left: 1px solid var(--m-tree); }
.side[data-menu="new"] .grp-links a.nav { padding: 5px 10px; color: var(--m-sub); border-radius: 7px; }
.side[data-menu="new"] .grp-links a.nav:hover { color: #fff; }
/* Dashboard, Checks and All modules: an icon, not bold */
.side[data-menu="new"] .links > a.nav { justify-content: flex-start; gap: 10px; }
.side[data-menu="new"] .links > a.nav .count { margin-left: auto; }
.side[data-menu="new"] .links > a.nav:not(.modules-link) { font-weight: 400; color: var(--m-text); padding: 7px 10px; border-radius: 8px; }
.side[data-menu="new"] a.nav.modules-link { color: var(--rail-mute); font-size: inherit; padding: 7px 10px; border-radius: 8px; }
.side[data-menu="new"] a.nav.modules-link::before { top: 0; }
/* the open page: a grey pill and white text */
.side[data-menu="new"] a.nav .nav-mark { background: var(--m-pill); border-radius: 7px; }
.side[data-menu="new"] .links > a.nav.on:not(.modules-link), .side[data-menu="new"] .grp-links a.nav.on,
.side[data-menu="new"] .grp-links a.nav.on:hover, .side[data-menu="new"] a.nav.on:hover { color: #fff; font-weight: 600; }
/* the counts of work waiting, in the building's colour */
.side[data-menu="new"] .count, .side[data-menu="new"] a.nav.on .count { background: var(--grp-ink, #dcc091); color: var(--grp-on, #24211b); }

/* a report option that belongs to another view stays out of sight (report_table.html, data-when) */
[data-when][hidden] { display: none !important; }
/* ---------- Pine and Navy (Francis, 25 Nov 2026: "pine classy software" and "navy blue ... financial app"; from the
   mock-ups he chose "Pine with a dark menu" and "Navy") ----------
   Pine: a near-black menu with a breath of green, pine green buttons and links, greys with green in them; LAMONTbooks'
   default. Navy: a navy menu, navy buttons and links, blue-grey greys. Statuses keep their own colours. */
:root[data-brand][data-scheme="pine"] {   /* lighter on 25 Nov 2026 (Francis: "pine is too dark"; option A, then "just slightly darker"): a forest green menu, not near-black */
  --accent: #275a4b; --accent-deep: #1d4439; --on-accent: #fff; --accent-soft: #e4efea; --accent-line: #c6dbd2;
  --ground: #f4f7f6; --line: #dfe7e3; --line-2: #c3d1cb; --ink: #1a211e; --ink-2: #56635e; --link: #275a4b; --placeholder: #84918c;
  --rail: #203b33; --rail-on: #2b4d43; --rail-ink: #ecf2ef; --rail-mute: #abc0b8;
}
:root[data-scheme="pine"] .side[data-menu="new"] { --rail: #203b33; --rail-on: #2b4d43; --rail-ink: #ecf2ef; --rail-mute: #abc0b8; --ink-ic: #abc0b8;
  --m-text: #e8efeb; --m-chev: #96ada4; --m-hair: #35554a; --m-tree: #3d5e52; --m-sub: #c2d3cc; --m-pill: #325246; --m-rule: #304f43; }
:root[data-brand][data-scheme="navy"] {
  --accent: #1b3460; --accent-deep: #11234a; --on-accent: #fff; --accent-soft: #e8edf5; --accent-line: #cdd7e8;
  --ground: #f3f5f9; --line: #e0e5ee; --line-2: #c4cddc; --ink: #141c2b; --ink-2: #53607a; --link: #1b3460; --placeholder: #828da3;
  --rail: #13213d; --rail-on: #1e3154; --rail-ink: #e5eaf4; --rail-mute: #9aa8c2;
}
:root[data-scheme="navy"] .side[data-menu="new"] { --rail: #13213d; --rail-on: #1e3154; --rail-ink: #e5eaf4; --rail-mute: #9aa8c2; --ink-ic: #9aa8c2;
  --m-text: #e2e8f3; --m-chev: #8492ad; --m-hair: #2c4069; --m-tree: #334873; --m-sub: #b6c2d8; --m-pill: #2a3f66; --m-rule: #283b60; }
/* Cool, done the way Pine and Navy are (Francis, 25 Nov 2026: "pine and blue was done beautifully ... we go for that cool
   feel but use your pattern of logic from that 2 other color schemes"): a family of one colour, here a cool slate, with
   a button that visibly deepens on hover (ink to black barely changed), soft and line tints from the same slate for
   chosen tabs and highlighted rows, slate links, and greys and a menu with the same blue-grey in them. */
:root[data-brand][data-scheme="cool"] {
  --accent: #2d3443; --accent-deep: #191d27; --on-accent: #fff; --accent-soft: #eceef3; --accent-line: #d2d6e0;
  --ground: #f4f5f7; --line: #e1e3e8; --line-2: #c5c9d1; --ink: #1a1d24; --ink-2: #5a5f6b; --link: #2d3443; --placeholder: #858a95;
  --rail: #171a21; --rail-on: #262b36; --rail-ink: #e7e9ee; --rail-mute: #9aa0ac;
}
:root[data-scheme="cool"] .side[data-menu="new"] { --rail: #171a21; --rail-on: #262b36; --rail-ink: #e7e9ee; --rail-mute: #9aa0ac; --ink-ic: #9aa0ac;
  --m-text: #e3e6ec; --m-chev: #868c99; --m-hair: #333845; --m-tree: #3a404d; --m-sub: #b7bcc7; --m-pill: #313745; --m-rule: #2f3441; }
/* a printed document stays in ink in every scheme (a building's own document colour, set in Document settings, still wins) */
:where(:root[data-scheme="cool"], :root[data-scheme="pine"], :root[data-scheme="navy"]) .doc { --accent: #1c1d22; --accent-deep: #000; --accent-soft: #ebebee; --accent-line: #d2d3d9; --link: #1c1d22; }
/* Settings → Colours: a card for each scheme, a picture of its menu and its button */
.schemes { display: flex; flex-wrap: wrap; gap: 10px; }
.schemecard { position: relative; display: flex; flex-direction: column; gap: 7px; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--paper); cursor: pointer; min-width: 120px; transition: border-color .12s ease, box-shadow .12s ease; }
.schemecard:hover { border-color: var(--ink-2); }
.schemecard input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schemecard:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.schemecard:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.sc-pic { display: flex; height: 44px; border-radius: 6px; overflow: hidden; background: #f4f5f5; border: 1px solid var(--line); }
.sc-pic i { width: 34%; }
.sc-pic b { align-self: center; margin-left: 12%; width: 38%; height: 12px; border-radius: 3px; }
.sc-name { font-size: .93rem; font-weight: 600; }
.sc-name .mute { font-weight: 400; }
/* Settings → Colours: Cool or Warm on one switch, in ink, never the accent; the accent's picker and hex box */
.schemeswitch { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; cursor: pointer; user-select: none; position: relative; }
.schemeswitch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schemeswitch i { position: relative; width: 44px; height: 24px; border-radius: 12px; background: var(--line-2); transition: background .15s; }
.schemeswitch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.schemeswitch input:checked + i { background: var(--ink); }
.schemeswitch input:checked + i::after { transform: translateX(20px); }
.schemeswitch input:focus-visible + i { outline: 2px solid var(--link); outline-offset: 2px; }
.schemeswitch span { color: var(--ink-2); }
.schemeswitch:has(input:not(:checked)) span:first-child, .schemeswitch:has(input:checked) span:last-of-type { color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .schemeswitch i, .schemeswitch i::after { transition: none; } }
.accentpick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.accentpick input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); cursor: pointer; }
.accentpick input[name=accent] { width: 8.5em; font-family: ui-monospace, Consolas, monospace; }

/* ---------- LAMONTbooks' dashboard (Francis, 25 Nov 2026) ----------
   Money in and out as horizontal bars, a month a row ("instead of vertical bar chart we do horizontal professional bar
   chart"): the month, its two bars (in light, out in ink, as the manager's chart), the two amounts, and the net. */
/* each month: its name, two lines (a bar on a light track with its amount at the end of the line), and the net beside both */
.hb-row, .hb-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 100px 108px; column-gap: 14px; align-items: center; }
.hb-head { padding: 0 0 8px; border-bottom: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.hb-row { grid-template-rows: auto auto; row-gap: 5px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hb-row:last-child { border-bottom: 0; padding-bottom: 0; }
.hb-m { grid-row: 1 / 3; font-weight: 600; font-size: .93rem; }
.hb-track { display: block; height: 12px; border-radius: 3px; background: var(--ground); overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 3px; min-width: 2px; }
.hb-in { background: var(--accent); }
.hb-out { background: #a7a9b2; }
.hb-v { text-align: right; font-size: .9rem; line-height: 1.2; white-space: nowrap; }
.hb-vout { color: var(--ink-2); }
.hb-net { grid-column: 4; grid-row: 1 / 3; text-align: right; font-size: .93rem; font-weight: 650; white-space: nowrap; }
.hb-net.up { color: var(--ok); }
.hb-net.down { color: var(--bad); }
.hb-legend { margin-top: 4px; font-size: .84rem; }
.hb-legend i { border-radius: 2px; }
/* against the budget: a bar a line, the budget to date as the full width, red where spending runs over */
.bva { width: 100%; }
.bva tr.sec td { font-weight: 650; font-size: .86rem; color: var(--ink-2); background: var(--ground); }
.bva .bva-bar { width: 26%; min-width: 110px; }
.bva .meter { position: relative; height: 6px; border-radius: 3px; background: var(--line); }
.bva .meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); }
.bva .meter i.over { background: var(--bad); }
.bva .pct { width: 64px; color: var(--ink-2); }
.bva .pct.over { color: var(--bad); font-weight: 650; }
tr.total td { border-top: 1px solid var(--line-2); }

/* ---------- the menu folds to icons (Francis, 25 Nov 2026: option A of three mock-ups) ----------
   A button level with the logo folds the menu to a 68px strip of icons and opens it again; folded, the logo goes and the
   button stays at the top (its arrow turned to say "open"), each icon names itself on hover, a group's pages open beside
   its icon, a dot on a group's icon says work is waiting there, and the wordmark stands upright at the foot of the strip
   when it fits (the L of the first build was replaced the same day). Desktop only. */
.side .brand-row { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; min-height: 34px; }
.side .brand-row .brand { flex: 1; min-width: 0; padding: 4px 10px; }
.side .vmark { display: none; }
/* the upright wordmark: real vertical text, read from the bottom up, in the menu's soft grey (a signature, not a heading) */
.vmark .wm { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 1.05rem; color: var(--rail-mute); transition: color .12s ease; }
.vmark:hover { text-decoration: none; }
.vmark:hover .wm { color: #fff; }
.side-btn { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--rail-mute); cursor: pointer; transition: background-color .12s ease, color .12s ease, transform .12s ease; }
.side-btn:hover { background: var(--rail-on); color: #fff; }
.side-btn:active { transform: scale(.94); }
.side-btn::before { content: ""; width: 19px; height: 19px; background: currentColor; transition: transform .22s cubic-bezier(.2, 0, 0, 1);
  -webkit-mask: var(--ic) center / 19px 19px no-repeat; mask: var(--ic) center / 19px 19px no-repeat; }
.side details.grp > summary { position: relative; }
/* the name beside an icon, and the group's pages beside its icon */
.menutip { position: fixed; z-index: 80; padding: 5px 9px; border-radius: 6px; background: #0f1014; color: #fff; font-size: .84rem; line-height: 1.3;
  white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(2px); transition: opacity .11s ease, transform .11s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.menutip.show { opacity: 1; transform: none; }
.menutip kbd { font: inherit; font-size: .78rem; margin-left: 8px; padding: 0 5px; border-radius: 4px; background: #2a2b33; color: #c9cad2; }
.menufly { position: fixed; z-index: 60; min-width: 232px; padding: 6px; border-radius: 10px; background: var(--rail);
  border: 1px solid var(--m-hair, #3f404a); box-shadow: 0 14px 36px rgba(10, 11, 15, .32), 0 2px 6px rgba(10, 11, 15, .2);
  opacity: 0; visibility: hidden; transform: translateX(-4px); transition: opacity .13s ease, transform .16s cubic-bezier(.2, 0, 0, 1), visibility 0s .16s; }
.menufly.show { opacity: 1; visibility: visible; transform: none; transition: opacity .13s ease, transform .16s cubic-bezier(.2, 0, 0, 1), visibility 0s; }
.menufly::before { content: ""; position: absolute; top: 0; bottom: 0; left: -14px; width: 14px; }   /* the mouse can cross the gap */
.menufly-t { margin: 0; padding: 7px 10px 6px; font-size: .86rem; font-weight: 600; color: #fff; }
.menufly a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 7px; color: var(--m-sub, #b9bac4); white-space: nowrap; }
.menufly a:hover, .menufly a:focus-visible { background: var(--rail-on); color: #fff; text-decoration: none; outline: none; }
.menufly a.on { background: var(--m-pill, #3b3c46); color: #fff; font-weight: 600; }
.menufly a .count { margin-left: auto; background: var(--grp-ink, #dcc091); color: var(--grp-on, #24211b); }
@media screen and (min-width: 901px) {
  html.menu-ready .shell { transition: grid-template-columns .22s cubic-bezier(.2, 0, 0, 1); }
  html.menu-ready .side a.nav, html.menu-ready .side details.grp > summary { transition: color .14s ease, background-color .12s ease; }
  .side[data-menu="new"] { overflow-x: hidden; }
  html.menu-folded .shell:has(> .side[data-menu="new"]) { grid-template-columns: 68px minmax(0, 1fr); }
  html.menu-folded .side a.nav, html.menu-folded .side details.grp > summary,
  html.menu-moving .side a.nav, html.menu-moving .side details.grp > summary { white-space: nowrap; }
  /* folded, the words fade out and only the icons stay (the icon is drawn from the background, not the text colour) */
  html.menu-folded .side .links > a.nav, html.menu-folded .side details.grp > summary { color: transparent !important; }
  html.menu-folded .side details.grp > summary::after { opacity: 0; }
  /* work waiting in a group: its chevron becomes a dot on the icon */
  html.menu-folded .side details.grp:has(.count) > summary::after { content: ""; opacity: 1; position: absolute; left: 26px; top: 5px;
    width: 8px; height: 8px; margin: 0; border-radius: 50%; transform: none; background: var(--grp-ink, #dcc091); box-shadow: 0 0 0 2px var(--rail); }
  html.menu-folded .side .grp-links, html.menu-folded .side .links > a.nav .count { display: none; }
  /* centred on the 68px strip; [data-menu] so it outweighs the New menu's padding on Dashboard and Checks (they sat 2.5px
     left of the group icons, Francis, 25 Nov 2026) */
  html.menu-folded .side[data-menu="new"] details.grp > summary, html.menu-folded .side[data-menu="new"] .links > a.nav { padding-left: 12.5px; padding-right: 12.5px; }
  html.menu-folded .side .brand-row { flex-direction: column; gap: 4px; margin-bottom: 10px; }
  html.menu-folded .side .brand-row .brand { display: none; }
  /* the upright wordmark at the foot: laid out unseen so its height can be measured, then shown only when it fits
     (base.html adds vmark-fits); it fades in once the strip has settled, never spins */
  html.menu-folded .side[data-menu="new"] { display: flex; flex-direction: column; }
  html.menu-folded .side[data-menu="new"] > * { flex-shrink: 0; }
  html.menu-folded .side .vmark { display: block; position: absolute; left: 0; top: 0; visibility: hidden; opacity: 0; pointer-events: none; }
  html.menu-folded .side.vmark-fits .vmark { position: static; align-self: center; margin-top: auto; padding-top: 8px;
    visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .2s ease .12s; }
  html.menu-folded .side-btn::before { transform: rotate(180deg); }
  html.menu-folded .side .brand-row::after { content: ""; width: 28px; height: 1px; margin-top: 6px; background: var(--m-rule, #3a3b44); }
  html.menu-folded .side details.grp.flyon > summary { background: var(--rail-on); color: #fff; }
}
@media screen and (max-width: 900px) {
  .side .side-btn, .side .vmark, .menufly, .menutip { display: none; }
  .side .brand-row { margin: 0; min-height: 0; }
  .side .brand-row .brand { padding: 2px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html.menu-ready .shell, html.menu-ready .side a.nav, html.menu-ready .side details.grp > summary, .side-btn, .side-btn::before, .menutip, .menufly, .menufly.show, html.menu-folded .side.vmark-fits .vmark { transition: none; }
}
@media print { .menutip, .menufly, .vmark { display: none !important; } }

/* the books dashboard's months open Receipts and payments for the month (25 Nov 2026) */
.hb-row a { color: inherit; text-decoration: none; }
.hb-row a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hb-row .hb-m a { font-weight: inherit; }

/* a figure box that opens the detail behind it (drill-down, Francis, 25 Nov 2026): the whole box is the link, with an
   arrow after its words; it lifts a little on hover, as a card */
a.fig-link { color: inherit; text-decoration: none; transition: background-color .12s ease; }
a.fig-link:hover { background: var(--accent-soft); text-decoration: none; }
a.fig-link:hover .fig-go { transform: translateX(2px); }
a.fig-link .fig-go { display: inline-block; color: var(--ink-2); transition: transform .12s ease; }
a.fig-link:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
@media print { a.fig-link .fig-go { display: none; } }

/* a report's heading and subtotal rows (Receipts and payments as CSS's, 25 Nov 2026) */
table.rt tr.sect td { font-weight: 600; color: var(--ink-2); padding-top: 14px; border-bottom: 1px solid var(--line); }
table.rt tr.sect.big td { color: var(--ink); font-size: 1rem; padding-top: 18px; }
table.rt tr.tot td { font-weight: 600; border-top: 1px solid var(--line-2); }
table.rt tr.tot.big td { background: var(--ground); }

/* a document's ▲ ▼ (CSS's buttons beside the document box): the one before and the one after; greyed at either end */
.docnav { display: inline-flex; gap: 4px; }
.docnav .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
