/* PropBW Pro. Inter is shipped with the app (public/fonts), so every machine shows the same thing
   and nothing is fetched from another company's servers. */
@font-face{font-family:Inter;src:url(/a/iQmQSrbI/fonts/inter-400.woff2) format("woff2");font-weight:400;font-display:swap;font-style:normal}
@font-face{font-family:Inter;src:url(/a/83efHvzM/fonts/inter-500.woff2) format("woff2");font-weight:500;font-display:swap;font-style:normal}
@font-face{font-family:Inter;src:url(/a/-aBuec06/fonts/inter-600.woff2) format("woff2");font-weight:600;font-display:swap;font-style:normal}
@font-face{font-family:Inter;src:url(/a/b1ZAn9PW/fonts/inter-700.woff2) format("woff2");font-weight:700;font-display:swap;font-style:normal}

/* The fallback, carrying Inter's own vertical metrics so that the swap does not move the page.
   Seven of the `font:` shorthands below spell no line-height, and the shorthand resets what it omits, so those
   elements use `normal` — a box computed from the active font's ascent and descent. Inter's are 1984 and -494
   on a 2048 em (read from public/fonts, identical in all four weights, and hhea agrees with OS/2 sTypo), which
   is 96.88% and 24.12% and a normal line-height of 1.21em. Without this, every heading and the brand changed
   height the moment Inter arrived, and everything under them moved.
   No size-adjust: matching the width would need the width of whatever font the machine actually substitutes,
   and that differs by platform, so one ratio would fix Windows and spoil macOS. Width re-wraps text; it does
   not change the height of a line box, which is what was moving.
   Measured in Chrome at a 100px font size with line-height:normal — Inter itself 120.996px, this fallback
   120.80px, the same local() sources without the overrides 132.80px. So a heading used to shrink by 11.8% of
   its font size when Inter arrived and now moves by 0.196%.
   Do not bother refining these two percentages. Five pairs were tried, including the exact fractions
   96.875% and 24.12109375%, and every one rendered the identical 120.80px: the engine quantises overridden
   metrics, so the remaining fifth of a pixel is its rounding and not ours. */
@font-face{font-family:"Inter fallback";src:local("Segoe UI"),local("Roboto"),local("Helvetica Neue"),local("Arial"),local("DejaVu Sans");
  ascent-override:96.88%;descent-override:24.12%;line-gap-override:0%}

/* --line draws a separator, which is decoration; --control draws the edge of something you type into or
   press, which WCAG 1.4.11 asks for 3:1 against what is behind it. The grey these used before was 1.47:1 on a
   card and 1.39:1 on the page — a box whose edge nobody finds in ordinary light. This one is 3.67 and 3.45.
   The separators are unchanged, because a separator is not a control. */
:root{--ink:#12161C;--muted:#5B6472;--line:#E4E7EC;--control:#7E8694;--ground:#F7F8FA;--accent:#2563EB;--accent-soft:#EFF4FF;
  --ok:#15803D;--ok-soft:#ECFDF3;--warn:#B45309;--warn-soft:#FEF6E7;--bad:#B42318;--bad-soft:#FEF0EE;
  --shadow:0 1px 2px rgba(16,24,40,.04);--radius:10px;
  /* Spacing: a 4px scale, so a gap is chosen from a list rather than typed from memory. */
  --s1:4px;--s2:8px;--s3:12px;--s4:16px;--s5:20px;--s6:24px;--s7:32px;--s8:40px;
  /* Type: seven sizes and no more. Financial figures use tabular numerals wherever they appear. */
  --t-xs:12px;--t-sm:13px;--t-md:14px;--t-base:15px;--t-lg:17px;--t-xl:20px;--t-2xl:26px;
  /* Surfaces, and the ink that goes on them. --surface is every card, header, sidebar, input and button;
     --on-accent is the text on a filled accent button, which is the one white that is not a surface. */
  --surface:#fff;--on-accent:#fff;--ink-mid:#3B4452;--placeholder:#6A717D;
  --hover:#F9FAFB;--tint:#F2F4F7;--line-soft:#F1F3F7;--line-hover:#C9D2E0;--control-hover:#6B7483;
  --accent-hover:#1D4FD7;--accent-line:#C7D7FE;
  /* The two chart series, from the validated categorical order (blue, then orange): checked for colour-blind
     separation and 3:1 against the card in this theme and in the dark one below. */
  --series-1:#2a78d6;--series-2:#eb6834;
  /* Each state already had a fill and an ink. These are the border and the darker ink a flash needs to carry
     14px text at 4.5:1, which the badge's lighter ink does not have to do. */
  --ok-line:#ABEFC6;--ok-strong:#12693A;--warn-line:#F5D9A8;--warn-strong:#93370D;
  --bad-line:#F5C9C4;--bad-strong:#912018;--danger-line:#CC6861;
  /* Elevation, named by what is lifted rather than by a number, and the sheet behind a dialog or a drawer. */
  --shadow-lift:0 2px 6px rgba(16,24,40,.07);--shadow-drawer:0 12px 40px rgba(16,24,40,.18);
  --shadow-dialog:0 16px 48px rgba(16,24,40,.22);--scrim:rgba(18,22,28,.40);
  --top-h:60px;--side-w:236px;color-scheme:light dark;
  /* How tall a row and a card are. Named so that a density setting has one place to reach, rather than
     reaching into every rule that happens to use a spacing step. */
  --row-y:11px;--card-y:18px}
*{box-sizing:border-box}
body{margin:0;display:flex;flex-direction:column;min-height:100vh;background:var(--ground);color:var(--ink);
  font:var(--t-base)/1.55 Inter,"Inter fallback",system-ui,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}

/* The first thing in the tab order, so a keyboard user is not walked through fifty menu links on every page. */
.skip{position:absolute;left:-9999px;top:0;z-index:60;background:var(--surface);color:var(--accent);padding:var(--s3) var(--s4);
  border:1px solid var(--accent);border-radius:0 0 var(--radius) 0;font-weight:600;text-decoration:none}
.skip:focus{left:0}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* A cell's own column heading. display:none rather than .vh on purpose: on a desktop the <th> is the heading
   and a screen reader must not hear it twice. Below 576px the <th> is gone and this becomes the only one. */
.lab{display:none}

/* ---- the header: brand, search, company, alerts, who you are. One row, sticky, on every screen size. ---- */
.top{display:flex;align-items:center;gap:var(--s4);height:var(--top-h);flex-shrink:0;background:var(--surface);
  border-bottom:1px solid var(--line);padding:0 var(--s5);position:sticky;top:0;z-index:30}
.top .brand{font:700 var(--t-lg) Inter,"Inter fallback",system-ui,sans-serif;letter-spacing:-.01em;color:var(--ink);text-decoration:none;white-space:nowrap}
.top .brand small{display:block;font:500 var(--t-xs) Inter,"Inter fallback",system-ui,sans-serif;color:var(--muted);letter-spacing:0}
.gsearch{display:flex;gap:var(--s2);flex:1;max-width:460px;margin-left:var(--s3)}
.gsearch input{min-height:38px;padding:var(--s2) var(--s3);width:100%;font-size:var(--t-md)}
.gsearch button{min-height:38px}
.topright{display:flex;align-items:center;gap:var(--s3);margin-left:auto}
.topright form{margin:0}
.copick{display:flex;gap:var(--s2);min-width:0}
.copick-side{display:none}   /* the drawer's copy: shown only where the header cannot hold it (below 768px) */
.copick select{min-height:38px;padding:var(--s2) var(--s3);font-size:var(--t-md);max-width:200px}
.copick button{min-height:38px}
.bell{display:inline-flex;align-items:center;gap:var(--s2);min-height:38px;padding:0 var(--s3);border-radius:8px;
  border:1px solid var(--line);text-decoration:none;color:var(--ink-mid);font-weight:500;font-size:var(--t-md);background:var(--surface)}
.bell:hover{background:var(--hover)}
.bell .count{background:var(--warn-soft);color:var(--warn);border-radius:10px;padding:0 var(--s2);font-size:var(--t-xs);font-weight:600}
.me{display:flex;flex-direction:column;line-height:1.25;text-decoration:none;color:var(--ink);font-weight:600;font-size:var(--t-md);
  min-height:38px;justify-content:center;padding:0 var(--s2)}
.me small{color:var(--muted);font-weight:500;font-size:var(--t-xs)}
.topright button{min-height:38px}

.shell{display:flex;flex:1;min-height:0}
/* Sidebar: white, quiet, grouped, with the current page picked out in the accent colour. */
.side{width:var(--side-w);flex-shrink:0;background:var(--surface);border-right:1px solid var(--line);color:var(--ink);
  padding:var(--s3) var(--s3) var(--s6);display:flex;flex-direction:column;gap:2px;overflow-y:auto}
.navgroup{margin:0 0 2px}
.navgroup>summary{cursor:pointer;list-style:none;padding:var(--s2) var(--s3);border-radius:8px;color:var(--muted);
  font-size:var(--t-xs);font-weight:600;text-transform:uppercase;letter-spacing:.05em;min-height:34px;display:flex;align-items:center;gap:var(--s2)}
.navgroup>summary::-webkit-details-marker{display:none}
.navgroup>summary::after{content:"";margin-left:auto;width:6px;height:6px;border-right:1.6px solid currentColor;
  border-bottom:1.6px solid currentColor;transform:rotate(45deg);transition:transform .12s}
.navgroup[open]>summary::after{transform:rotate(-135deg)}
.navgroup>summary:hover{background:var(--tint);color:var(--ink)}
.side a{color:var(--ink-mid);text-decoration:none;padding:var(--s2) var(--s3);border-radius:8px;min-height:40px;display:flex;align-items:center;font-size:var(--t-md);font-weight:500}
/* The account and the way out stay in the sidebar as well as the header, because the header's copy is hidden
   on a phone and signing out must never be the one thing a small screen cannot do. */
.side .who{margin-top:auto;padding:var(--s3) var(--s3) 0;border-top:1px solid var(--line);font-size:var(--t-sm);display:flex;flex-direction:column;gap:var(--s2);color:var(--muted)}
.side .who button{background:var(--surface);border:1px solid var(--line);color:var(--ink-mid);border-radius:8px;min-height:36px;cursor:pointer;font-weight:500}
.side .who button:hover{background:var(--tint)}
.side .who a{color:var(--ink);padding:0;min-height:0;text-decoration:none;font-weight:600;display:block}
.side a.on{background:var(--accent-soft);color:var(--accent);font-weight:600}
.side a:hover{background:var(--tint);color:var(--ink)}.side a.on:hover{background:var(--accent-soft);color:var(--accent)}
main{flex:1;padding:var(--s6) var(--s7);min-width:0;max-width:1300px}
main:focus{outline:none}
/* Where you are, and the way back out of a record. */
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2);font-size:var(--t-sm);color:var(--muted);margin:0 0 var(--s2)}
.crumbs>*+*::before{content:"/";margin-right:var(--s2);color:var(--line)}
.crumbs a{text-decoration:none;font-weight:500}
.crumbs a:hover{text-decoration:underline}

h1{font:700 var(--t-2xl) Inter,"Inter fallback",system-ui,sans-serif;letter-spacing:-.02em;margin:0 0 var(--s4)}
h2{font:600 var(--t-lg) Inter,"Inter fallback",system-ui,sans-serif;letter-spacing:-.01em;margin:0 0 var(--s3)}
h3{font:600 var(--t-md) Inter,"Inter fallback",system-ui,sans-serif;margin:18px 0 var(--s2);color:var(--ink)}
.sub{color:var(--muted);margin-top:-8px;font-size:var(--t-md)}

.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:var(--card-y) var(--s5);margin:0 0 var(--s4);overflow-x:auto;box-shadow:var(--shadow)}
.narrow{max-width:520px}
.grid3{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:0 14px}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));gap:0 18px}
.bank{border-top:1px solid var(--line);padding-top:12px;margin-top:12px}
/* The twelve months of a fiscal year, each a badge, wrapping on a narrow screen. */
.months{display:flex;flex-wrap:wrap;gap:var(--s1);margin:6px 0}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:var(--s3);margin-bottom:18px}
/* The dashboard's billed-against-collected chart: thin bars on one axis, a recessive grid, text in text ink. */
.chart{margin:var(--s3) 0 0}
/* On a phone the plot scrolls sideways at a size its labels can be read at; the legend above it stays put. */
.chart .plot{overflow-x:auto}
.chart svg{width:100%;min-width:680px;max-width:860px;height:auto;display:block}
.chart .b1{fill:var(--series-1)}.chart .b2{fill:var(--series-2)}
.chart .grid{stroke:var(--line);stroke-width:1}
.chart .ax{fill:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.chart .legend{display:flex;gap:var(--s4);font-size:var(--t-sm);color:var(--ink-mid)}
.chart .legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;vertical-align:-1px}
.chart .legend .k1{background:var(--series-1)}.chart .legend .k2{background:var(--series-2)}
.filters{flex-wrap:wrap;align-items:end;margin-bottom:var(--s5)}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px var(--s4);display:flex;flex-direction:column;gap:3px;box-shadow:var(--shadow)}
a.kpi{color:inherit;text-decoration:none}a.kpi:hover{border-color:var(--line-hover);box-shadow:var(--shadow-lift)}
.kpi span{font-size:var(--t-sm);color:var(--muted);font-weight:500}
.kpi strong{font:700 var(--t-xl) Inter,"Inter fallback",system-ui,sans-serif;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.kpi small{color:var(--muted);font-size:var(--t-sm)}

table{width:100%;border-collapse:collapse}
th{text-align:left;font-size:var(--t-xs);letter-spacing:.04em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:var(--s2) 10px;border-bottom:1px solid var(--line)}
td{padding:var(--row-y) 10px;border-bottom:1px solid var(--line-soft);font-size:var(--t-md)}
tbody tr:last-child td{border-bottom:0}
.num{text-align:right;font-variant-numeric:tabular-nums}
/* The roles matrix: a permission per row, a role per column. Its own card scrolls on a narrow screen,
   through the table.wide rule further down. */
table.matrix td.mid{text-align:center}
table.matrix tr.group th{padding-top:16px;color:var(--ink);font-size:var(--t-sm)}
/* The permission's name heads its row, so it is a <th scope="row"> — and has to read as the cell it replaced
   rather than as a column heading, which is uppercase micro-text. */
table.matrix tbody th[scope="row"]{font-size:var(--t-md);letter-spacing:0;text-transform:none;color:var(--ink);
  font-weight:500;padding:11px 10px;border-bottom:1px solid var(--line-soft)}
table.matrix .tick{color:var(--ok);font-size:var(--t-sm)}
td small.d{display:block;color:var(--muted);font-size:var(--t-xs);margin-top:1px}

label{display:flex;flex-direction:column;gap:6px;font-size:var(--t-sm);font-weight:500;color:var(--ink-mid);margin-bottom:14px}
label:has(input[type=checkbox]){flex-direction:row;align-items:center;font-weight:400;color:var(--ink);font-size:var(--t-md)}
input,select,textarea{font:inherit;color:var(--ink);border:1px solid var(--control);border-radius:8px;padding:10px var(--s3);background:var(--surface);min-height:44px}
input:hover,select:hover,textarea:hover{border-color:var(--control-hover)}
input::placeholder,textarea::placeholder{color:var(--placeholder)}
input[type=checkbox]{min-height:0;width:18px;height:18px;accent-color:var(--accent)}
button,.btn{font:inherit;font-weight:600;font-size:var(--t-md);min-height:44px;padding:0 var(--s4);border-radius:8px;border:1px solid var(--control);background:var(--surface);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;text-decoration:none;box-shadow:var(--shadow)}
button:hover,.btn:hover{background:var(--hover)}
button[disabled]{opacity:.55;cursor:default}
.pri{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.pri:hover{background:var(--accent-hover);color:var(--on-accent)}
.danger{background:var(--surface);border-color:var(--danger-line);color:var(--bad)}.danger:hover{background:var(--bad-soft)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
a{color:var(--accent)}

.inline{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}.inline label{margin:0}
.inline small,.card small{color:var(--muted);display:block;margin-top:8px;font-size:var(--t-sm)}
.badge{display:inline-block;padding:2px 10px;border-radius:999px;font-size:var(--t-xs);font-weight:600;white-space:nowrap;border:1px solid transparent}
.badge.ok{background:var(--ok-soft);color:var(--ok);border-color:var(--ok-line)}
.badge.warn{background:var(--warn-soft);color:var(--warn);border-color:var(--warn-line)}
.badge.bad{background:var(--bad-soft);color:var(--bad);border-color:var(--bad-line)}
.badge.info{background:var(--accent-soft);color:var(--accent);border-color:var(--accent-line)}
.badge.muted{background:var(--tint);color:var(--muted);border-color:var(--line)}
.flash{padding:var(--s3) var(--s4);border-radius:var(--radius);border:1px solid transparent;font-size:var(--t-md)}
.flash.ok{background:var(--ok-soft);color:var(--ok-strong);border-color:var(--ok-line)}
.flash.bad{background:var(--bad-soft);color:var(--bad-strong);border-color:var(--bad-line)}
.flash.warn{background:var(--warn-soft);color:var(--warn-strong);border-color:var(--warn-line)}
/* A rejected form, re-filled by src/forms.js. The message sits at the top of the form it belongs to, and the
   one field it is about is marked. The mark is a 2px border and a ring rather than only a red line, because a
   border colour alone is not a mark to everybody looking at the screen. */
form>.flash.bad:first-child{margin-bottom:var(--s3)}
[aria-invalid="true"]{border-color:var(--bad);border-width:2px;box-shadow:0 0 0 3px var(--bad-soft)}
/* A sortable column header. The arrow is decoration — aria-sort on the <th> is what says which column the
   list is ordered by and which way — so it is hidden from a screen reader rather than read as an arrow. */
th>a.sortcol{color:inherit;text-decoration:none;display:inline-flex;align-items:baseline;gap:4px;white-space:nowrap}
th>a.sortcol:hover{text-decoration:underline}
th>a.sortcol>span{color:var(--muted);font-weight:400}
th[aria-sort="ascending"]>a.sortcol>span,th[aria-sort="descending"]>a.sortcol>span{color:var(--accent)}
/* The table toolbar: a find box at every width, and the sort selects only below 576px, where each row is a
   card and the header row is not drawn — above it the column headers are the control, and two ways to do one
   thing is one too many. .forphone is that rule, whether it is on the whole form or on the selects inside. */
.toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--s3);margin-bottom:var(--s4)}
.toolbar label{margin:0}
.toolbar .find{flex:1 1 16rem;max-width:28rem}
.toolbar .clear{align-self:center}
.toolbar>.forphone{display:none;flex-wrap:wrap;align-items:flex-end;gap:var(--s3)}
.toolbar.forphone{display:none}
@media (max-width:575.98px){.toolbar.forphone{display:flex}
  .toolbar>.forphone{display:flex;flex:1 1 100%}
  .toolbar>.forphone label{flex:1 1 40%}}
.empty{color:var(--muted)}
/* A list with nothing in it. Left-aligned where the first row of the table would have been, not centred:
   this is a register that happens to be empty, and a centred block in a wide card reads as an error page. */
.nothing{padding:var(--s5) 0 var(--s3);display:flex;flex-direction:column;align-items:flex-start;gap:var(--s2);max-width:62ch}
.nothing-t{margin:0;font-weight:600;font-size:var(--t-base);color:var(--ink)}
.nothing-b{margin:0;color:var(--muted);font-size:var(--t-md)}
.nothing .btn{margin-top:var(--s2)}

/* The application's own question, in place of window.confirm. A panel rather than a centred alert box:
   it carries a sentence about money, and the two answers are far enough apart not to be hit by mistake. */
.ask{border:1px solid var(--line);border-radius:var(--radius);padding:var(--s5);max-width:min(460px,92vw);
  box-shadow:var(--shadow-dialog);color:var(--ink);font:var(--t-base)/1.55 Inter,"Inter fallback",system-ui,sans-serif}
.ask::backdrop{background:var(--scrim)}
.ask-m{margin:0 0 var(--s5)}
.ask-a{display:flex;gap:var(--s3);justify-content:flex-end;flex-wrap:wrap}
@media (max-width:575.98px){.ask-a{flex-direction:column-reverse}.ask-a button{width:100%;justify-content:center}}
.tot{text-align:right;font-size:var(--t-lg);font-weight:600}
.note{background:var(--warn-soft);border:1px solid var(--warn-line);color:var(--warn-strong);padding:10px 14px;border-radius:var(--radius);font-size:var(--t-md)}
.links li{margin:var(--s2) 0}.actions{display:flex;gap:10px;flex-wrap:wrap}
.pager{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:14px 0 0;font-size:var(--t-md)}
.pager .of{color:var(--muted)}
.pager a{min-height:38px;display:inline-flex;align-items:center;padding:var(--s2) 14px;border:1px solid var(--line);border-radius:999px;background:var(--surface);text-decoration:none;font-weight:500}
.pager a:hover{background:var(--hover)}
.pager .d{padding:var(--s2) 14px;color:var(--muted)}  /* the end of the list: shown in place, not hidden, so the controls stay put */
.tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 14px}
@media (min-width:992px){.portal-tabs{display:none}}  /* the sidebar carries these links once it is on screen */
.tabs a{padding:var(--s2) 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink-mid);text-decoration:none;min-height:38px;display:inline-flex;align-items:center;gap:6px;font-size:var(--t-md);font-weight:500}
.tabs a:hover{background:var(--hover)}
.tabs a.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:600}
/* An index of the page's own sections, not navigation between pages: same pills, no .on state, and the count
   is how many rows are in the section it points at. */
.tabs.sections{margin-bottom:var(--s4)}
.tabs .count{font-size:var(--t-xs);background:var(--warn-soft);color:var(--warn);border-radius:10px;padding:0 7px;font-weight:600}
.facts{display:grid;grid-template-columns:max-content 1fr;gap:9px var(--s5);margin:0}
.facts dt{color:var(--muted);font-size:var(--t-sm);font-weight:500}
.facts dd{margin:0;font-variant-numeric:tabular-nums;font-size:var(--t-md)}
.facts.inline-facts{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--s1) var(--s2);margin-bottom:12px}.facts.inline-facts dd{margin-right:18px}
details.card>summary{cursor:pointer;font-weight:600;color:var(--accent);min-height:28px;font-size:var(--t-md)}
/* A form for changing the record, inside the card that shows it. Closed by default: a lease page is read
   every month and its charges are set once, so the form that sets them should not be 617px of the page
   every time somebody opens it to check the rent. One click, no JavaScript, and the browser remembers
   nothing — which is right, because the next visit is a reading visit too. */
details.more{margin-top:var(--s4);border-top:1px solid var(--line);padding-top:var(--s2)}
details.more>summary{cursor:pointer;color:var(--accent);font-weight:600;font-size:var(--t-md);min-height:38px;display:flex;align-items:center;gap:var(--s2)}
details.more>summary::marker,details.more>summary::-webkit-details-marker{color:var(--accent)}
details.more[open]>summary{margin-bottom:var(--s3)}
details.card[open]>summary{margin-bottom:14px}
fieldset.checks{border:1px solid var(--line);border-radius:var(--radius);padding:10px 14px;margin:0 0 var(--s3)}
fieldset.checks legend{font-size:var(--t-xs);font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
fieldset.checks label{margin-bottom:6px}
.logo-row{display:flex;flex-wrap:wrap;gap:18px;align-items:flex-start;margin-bottom:12px}
.logo-preview{max-width:220px;max-height:80px;width:auto;height:auto;border:1px solid var(--line);border-radius:var(--radius);padding:6px;background:var(--surface)}
.decide{border:1px solid var(--accent-line);background:var(--accent-soft);border-radius:var(--radius);padding:var(--s3) 14px;margin:10px 0}.decide p{margin:0 0 var(--s2)}
ul.codes{columns:2;list-style:none;padding:0;font-size:var(--t-lg)}ul.codes li{margin:var(--s1) 0}
code.key{font-size:var(--t-lg);letter-spacing:1px;word-break:break-all}
a.todo{display:block;color:var(--warn);font-size:var(--t-sm);font-weight:600}
/* The clauses of a lease agreement, as the approver reads them before approving. */
ol.clauses{padding-left:22px;margin:0}
ol.clauses li{margin:0 0 14px}
ol.clauses strong{display:block;margin-bottom:2px}
ol.clauses p{margin:0;color:var(--muted);font-size:var(--t-md);max-width:75ch}
.stack{display:flex;flex-direction:column;gap:6px}
.stack details summary{cursor:pointer;color:var(--accent);font-size:var(--t-sm);font-weight:600}
.stack .inline{flex-wrap:nowrap}
/* ---------------------------------------------------------------------------
   Responsive. Desktop (>= 992px) keeps the layout above unchanged: the header
   sits above a .shell row holding the sidebar and main, and the toggle that
   opens the drawer is inert. Everything below only takes effect on smaller
   screens, where the sidebar leaves the row and becomes that drawer.
   Breakpoints: <=575.98 phone, 576-767.98 large phone, 768-991.98 tablet,
   992-1199.98 small laptop, >=1200 desktop.
--------------------------------------------------------------------------- */
.navtoggle,.bar{display:none}
img{max-width:100%}
/* Inspection photographs: a contact sheet that stays readable on a phone, and the quiet text button that
   removes one line of an inspection without looking like a decision. */
.shots{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:var(--s3)}
.shots figure{margin:0}
.shots img{width:100%;aspect-ratio:4/3;object-fit:cover;border:1px solid var(--line);border-radius:8px;background:var(--ground)}
.shots figcaption{font-size:var(--t-sm);color:var(--muted);margin-top:4px}
.shots figcaption form{display:inline}
button.link{min-height:0;padding:0;border:0;background:none;box-shadow:none;color:var(--accent);text-decoration:underline;font-weight:500;font-size:var(--t-sm)}
button.link:hover{background:none}


@media (max-width:991.98px){
  main{padding:var(--s5) var(--s4);max-width:100%}
  /* A bar you can tap and a panel that slides over the page. The checkbox does the opening, so no JavaScript
     is needed and the menu comes back closed after every page load. */
  /* .bar is a <label>, so the form-label rules above have to be turned off here. */
  .bar{display:flex;align-items:center;justify-content:center;margin:0;padding:0;min-height:40px;width:40px;flex-shrink:0;
    cursor:pointer;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
  .burger{width:18px;height:2px;background:var(--ink);position:relative;flex-shrink:0;box-shadow:0 -5px 0 var(--ink),0 5px 0 var(--ink)}
  .navtoggle{display:block;position:absolute;width:1px;height:1px;opacity:0;margin:0}   /* still focusable by keyboard */
  .navtoggle:focus-visible~.top .bar{outline:2px solid var(--accent);outline-offset:2px}
  .top{gap:var(--s3);padding:0 var(--s4)}
  .top .brand small{display:none}
  .gsearch{display:none}          /* the search has its own screen on a phone: /search, reached from the menu */
  .side{display:none}
  .navtoggle:checked~.shell .side{display:flex;position:fixed;inset:var(--top-h) auto 0 0;width:min(320px,86vw);z-index:31;
    box-shadow:var(--shadow-drawer);padding:var(--s3);border-right:1px solid var(--line)}
  .navtoggle:checked~.shell main::before{content:"";position:fixed;inset:var(--top-h) 0 0 0;background:var(--scrim);z-index:29}
  .side a{min-height:46px}
}

@media (max-width:767.98px){
  /* The header keeps the menu, the brand and the alerts; the company, the name and the sign-out are in the
     drawer, because a 210px selector in a 320px bar pushed the page sideways. */
  .me{display:none}
  .copick-top{display:none}
  .copick-side{display:flex;margin-top:var(--s3);padding-top:var(--s3);border-top:1px solid var(--line)}
  .copick-side select{flex:1;min-width:0}
  .bell .count{padding:0 var(--s1)}
  /* Forms and fact lists go to one column; fixed input widths stop mattering. */
  .grid2,.grid3{grid-template-columns:1fr}
  .inline{gap:var(--s2)}
  .inline label,.inline input,.inline select{width:100%}
  .inline button,.inline .btn{width:auto}
  .stack .inline{flex-wrap:wrap}
  input[size],select[size],textarea{max-width:100%}
  .facts{grid-template-columns:max-content 1fr;gap:6px 14px}
  .facts dd{margin-bottom:0}
  .kpis{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
}

@media (max-width:575.98px){
  main{padding:var(--s4) var(--s3)}
  .top{gap:var(--s2);padding:0 var(--s3)}
  .bell{padding:0 var(--s2)}
  .copick button{padding:0 var(--s3)}
  h1{font:700 clamp(20px,5.5vw,24px) Inter,"Inter fallback",system-ui,sans-serif;letter-spacing:-.02em}
  .card{padding:14px}
  .kpis{grid-template-columns:1fr}
  .actions>.btn,.actions>button,.actions>form,.actions>form>button{width:100%;justify-content:center}
  /* Tables become one card per row: each cell shows its column heading. Wide
     reports keep the real table (class "wide") and scroll inside their card. */
  table.cards,table.cards tbody,table.cards tr,table.cards td{display:block;width:100%}
  table.cards thead{display:none}          /* each cell carries its own heading instead, as text */
  table.cards tr{border:1px solid var(--line);border-radius:12px;padding:6px var(--s3);margin:0 0 10px}
  /* The heading sits above its value, so a cell holding a link and a note underneath still reads cleanly. */
  table.cards td{border:0;border-bottom:1px solid var(--line-soft);padding:7px 0;text-align:left}
  table.cards td.num{text-align:left}
  table.cards td:last-child{border-bottom:0}
  table.cards td>.lab{display:block;color:var(--muted);font-size:var(--t-xs);font-weight:600;margin-bottom:2px}
  table.cards td:empty{display:none}
  table.wide{min-width:560px}          /* keep columns readable; the card scrolls */
  .card:has(table.wide){overflow-x:auto}
  ul.codes{columns:1}
}

@media (min-width:576px) and (max-width:767.98px){
  .kpis{grid-template-columns:repeat(2,1fr)}
}

@media (min-width:768px) and (max-width:991.98px){
  /* Tablet: two columns where there is room, not a stretched phone layout. */
  main{padding:22px var(--s6)}
  .kpis{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
  .grid2{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid3{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (min-width:992px) and (max-width:1199.98px){
  main{padding:var(--s6) var(--s6)}
}

/* ---------------------------------------------------------------------------------------------------------
   A phone held in one hand, and a tablet touched rather than clicked.

   The card layout below 576px turned every row into a stack of labelled lines, which reads well and scrolls
   forever: one page of 100 rows measured 87.9 phone screens on /properties, 49.9 on /arrears and 48 on
   /receipts. A hundred rows is a hundred rows, but a row did not have to be seven lines of two.
   --------------------------------------------------------------------------------------------------------- */

@media (max-width:575.98px){
  /* A label and its value now share a line: the label on the left, where the eye goes down the cards, and the
     value on the right. The cell is a wrapping flex row rather than a stack, so what fits on the line stays
     on it. */
  table.cards td{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px var(--s4);text-align:right}
  /* The label is pushed left and everything else packs against the right edge: with space-between, a cell of
     three parts — a value and the note after it — left the value floating in the middle of the line. */
  table.cards td::before{margin:0 auto 0 0;flex:0 0 auto;max-width:45%;text-align:left}
  /* A note under a value — the company under the tenant's name, the due date under the days — takes a line of
     its own, which is what it was for. A cell that is nothing but a note ("none", "the system") stays on the
     label's line: two of those on the arrears screen were costing 116px a row to say "none" twice. */
  table.cards td>small.d{flex:1 1 100%;text-align:right}
  table.cards td>small.d:first-child{flex:0 1 auto}
  table.cards td:has(.shots){display:block;text-align:left}
  table.cards td:has(.shots)::before{max-width:none;margin-bottom:2px}
  /* The first cell is what the row is, so it reads as the card's heading rather than as another line of two. */
  table.cards td:first-child{font-weight:600}
  /* A column the screen marks as minor is on the record's own page, one tap away, and is not worth a line of
     a card. Nothing is marked minor that is the only copy of a figure. */
  table.cards td.minor{display:none}
}

/* A tablet with a finger on it is not a desktop with a mouse, and the width does not say which you have: a
   1024px touch tablet was getting the desktop layout's 38px controls and a 40px menu row. These are keyed on
   the pointer rather than on the viewport, so the same screen gets touch targets whatever size it is. */
@media (pointer:coarse){
  button,.btn,input,select,textarea{min-height:44px}
  .topright button,.me{min-height:44px}
  .side a,.navgroup>summary{min-height:44px}
  button.link{min-height:0}       /* a link that happens to be a button is text; 44px of text is a hole */
  td a,.links a{display:inline-block;padding:5px 0}
  table.cards td{padding-top:9px;padding-bottom:9px}
}

/* A phone turned sideways is 360px tall. A 60px header and the page's own heading left room for about three
   rows, and the menu drawer — the height of the page less the header — had 150px for thirty links. */
@media (max-height:480px) and (orientation:landscape){
  :root{--top-h:48px}
  main{padding:var(--s3) var(--s4)}
  h1{margin-bottom:var(--s2)}
  .sub{margin-bottom:var(--s2)}
  .kpis{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin-bottom:10px}
  .navtoggle:checked~.shell .side{overflow-y:auto;padding-bottom:var(--s5)}
  .side a{min-height:38px}
  .navgroup>summary{min-height:34px}
}

/* There is almost nothing here to animate — one chevron turning — but somebody whose vestibular system
   objects to movement should not have to find out which pages move before they trust the application. */
@media (prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

@media print{.side,.bar,.top,.skip,button,form{display:none}body{background:#fff}.card{border:none}.shell{display:block}}

/* ---- Dark mode ------------------------------------------------------------------------------------------
   The same stylesheet with a second set of values. Not one rule below :root is repeated here, which is what
   made it worth tokenising 57 literals first: a dark mode built on hardcoded colour is a second stylesheet to
   keep in step, and it goes out of step on the first hurried change.

   It follows the operating system and offers no switch. A switch needs somewhere to keep the choice -- a
   column, a migration, a settings screen -- and a person who wants a dark screen has already said so to their
   computer. That is the same argument that left column choice unbuilt, and it is recorded in the status
   document rather than left to be rediscovered.

   The ladder is the light one turned over: the page ground is darker than a card, so elevation still reads the
   same way round, and the greys keep the cool hue the light palette uses (b* negative, hue 256-272) instead of
   drifting warm. Every pair below is held by test/a11y.test.js at 4.5:1 for text and 3:1 for a control's edge,
   the same list that holds the light palette -- which the tokens made possible, because the list now names
   --surface rather than white.

   Two things change meaning rather than value. --on-accent is near-black here, because the accent has to
   lighten to stay legible on a dark card and black is what reads on a light blue button; that token existed
   for exactly this reason. And the shadows become real black at high opacity, because a shadow tinted with
   the light palette's blue-grey is invisible against a dark ground -- on dark screens the border carries the
   elevation and the shadow only deepens it. */
/* ---- Compact rows -------------------------------------------------------------------------------------
   A person looking at a thousand properties on a 27-inch monitor and a person looking at the same register on
   a laptop want different row heights, and neither of them is wrong. The choice is a cookie, not a column:
   it describes the screen rather than the account, which is also why the same person gets a different answer
   at their desk and on the train. It costs no migration and no settings model.

   Behind (pointer:fine) on purpose. A finger needs 44px and phases 6 and 8 settled that; a compact row is
   about 34px, so offering it to a touch screen would undo a decision that was made for a good reason. On a
   phone a row is not a row anyway -- it is a card -- so there is nothing here for compact to shrink. */
@media (pointer:fine){
  :root[data-density="compact"]{--row-y:6px;--card-y:12px}
}
@media (prefers-color-scheme: dark){
  :root{
    --series-1:#3987e5;--series-2:#d95926;
    --ground:#0F131A;--surface:#181E28;--tint:#222A36;--hover:#1F2631;
    --ink:#E9ECF2;--ink-mid:#C2C9D6;--muted:#9AA3B2;--placeholder:#848D9C;
    --line:#2C3440;--line-soft:#232A35;--line-hover:#3C4654;--control:#8A93A2;--control-hover:#A4ADBC;
    --accent:#8AADFF;--accent-hover:#A6C1FF;--accent-soft:#1A2334;--accent-line:#31405E;--on-accent:#0B1120;
    --ok:#5FD598;--ok-soft:#10231B;--ok-line:#235240;--ok-strong:#8FE6B8;
    --warn:#F0B45C;--warn-soft:#271B0C;--warn-line:#4D3817;--warn-strong:#FFD08C;
    --bad:#FF8E84;--bad-soft:#2A1412;--bad-line:#532421;--bad-strong:#FFB5AE;--danger-line:#A86461;
    --shadow:0 1px 2px rgba(0,0,0,.5);--shadow-lift:0 2px 6px rgba(0,0,0,.55);
    --shadow-drawer:0 12px 40px rgba(0,0,0,.6);--shadow-dialog:0 16px 48px rgba(0,0,0,.65);
    --scrim:rgba(0,0,0,.66)}
  /* A photograph and a company's logo are not ours to re-colour, so they keep their own white and are dimmed
     a little instead, which stops a white logo burning a hole in a dark header. Hovering restores it. */
  .shots img,.logo-preview{filter:brightness(.92)}
  .shots img:hover,.logo-preview:hover{filter:none}
}

