/*
 * Hawkins & Co. practice application.
 *
 * Two things this stylesheet is trying to be at once.
 *
 * It is **Hawkins & Co.** — the blue from the hex mark, the working blue from
 * the website, the coral on its call-to-action arrows, and a warm humanist
 * sans in place of the neutral one, so the application looks like it belongs
 * to the firm rather than to whoever built it.
 *
 * And it is **shaped like ClickUp**, because the team already spends its day
 * in ClickUp and a second tool that works differently is a second tool nobody
 * opens. So: an icon rail, a contextual sidebar, a breadcrumb, view tabs, a
 * toolbar with a primary action on the right, status pills, assignee avatars,
 * grouped and collapsible tables, and a slide-over for detail.
 *
 * The **capacity heat map is untouched**. Its ramp, its buckets and its cell
 * markup are exactly as the firm reviewed them; only the chrome around it has
 * changed.
 */

:root{
  /* --- Hawkins & Co. -------------------------------------------------
     Sampled from the logo and hawkins-accounting.ca: the hex mark is
     #0F6CB6, the site's working blue is #3D6DB6, and the soft coral on the
     call-to-action arrows is #E28169. Body ink #2B2B2B, headings #55626E.

     The surfaces are white rather than the old cream, because the shell is
     modelled on ClickUp and the team spends its day in ClickUp. */
  --brand:#0F6CB6; --brand-2:#3D6DB6; --brand-dark:#0C558F; --brand-wash:#EAF2FA;
  --coral:#E28169; --coral-wash:#FCEFEB;

  --paper:#FFFFFF; --surface:#FFFFFF; --surface-2:#F7F8FA; --surface-3:#EEF1F4;
  /* Allison, 23 September 2026: "the contrast between font colours on the
     entire app [is] too muted where you use the light grey - please make it
     darker." The old --ink-3 sat at 3.1:1 on white, under the 4.5:1 that
     small text needs; .muted, .help, .cap and .meta all use it. Now 5.5:1,
     and --ink-2 at 9:1. Still greys, just legible ones. */
  --ink:#2B2B2B; --ink-2:#3F4A54; --ink-3:#5F6B76;
  --rule:#E7EAEE; --rule-strong:#D4DAE1;
  --accent:#0070B8; --accent-ink:#005A94; --accent-wash:#EAF3FA;
  --surplus:#2A78D6; --deficit:#D03B3B; --warn:#C98500; --good:#0C7A3E; --violet:#5B4AA8;
  --cell-bg:#FFFFFF;

  /* The capacity heat map is unchanged, deliberately. The firm has already
     read this grid and the ramp is what they read it by. */
  --hm-g3:#3F9A45; --hm-g2:#6DB648; --hm-g1:#A3CD5B; --hm-g0:#CBE096;
  --hm-y0:#F9D86C; --hm-y1:#F2B62B; --hm-o:#E4842E; --hm-r:#D5503F; --hm-ink-d:#2A2A16;

  /* ClickUp's status colours, so a status here reads as the same status there. */
  --st-todo:#8B949C; --st-todo-bg:#EEF1F4;
  --st-progress:#3D6DB6; --st-progress-bg:#EAF2FA;
  --st-blocked:#D03B3B; --st-blocked-bg:#FBECEC;
  --st-done:#1E8E4B; --st-done-bg:#E7F5ED;

  --shadow:0 1px 2px rgba(43,43,43,.05), 0 8px 24px rgba(43,43,43,.08);
  --shadow-pop:0 4px 12px rgba(43,43,43,.10), 0 18px 48px rgba(43,43,43,.16);
  --rail-w:72px; --side-w:252px;
  --font-ui:"Figtree","Proxima Nova",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-num:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --font-display:"Barlow","PF Handbook Pro",system-ui,-apple-system,"Segoe UI",sans-serif;
  /* Tells the browser which theme the page is in, so what it draws itself —
     date and month pickers, checkboxes, dropdown lists, the file button —
     follows the theme instead of staying light (#126). Each dark block below
     says dark. */
  color-scheme:light;
}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]){
  color-scheme:dark;
  --paper:#15181C; --surface:#1B1F24; --surface-2:#22262C; --surface-3:#2A2F36;
  --ink:#ECEFF2; --ink-2:#AEB7C0; --ink-3:#7C868F;
  --rule:#2C3138; --rule-strong:#3B424A;
  --brand:#4C97DE; --brand-2:#6AA6E2; --brand-dark:#2E7BC4; --brand-wash:#1C2B3B;
  --coral:#E8917B; --coral-wash:#3A2620;
  --accent:#6AA6E2; --accent-ink:#8FBEEC; --accent-wash:#1C2B3B;
  --surplus:#3987E5; --deficit:#E06A64; --warn:#E0A63B; --good:#3DA96B; --violet:#9085E9;
  --cell-bg:#1B1F24;
  --hm-g3:#35833B; --hm-g2:#5C9A3E; --hm-g1:#86AB4A; --hm-g0:#9FAF6E;
  --hm-y0:#CFAF4E; --hm-y1:#C9932A; --hm-o:#BE6E2A; --hm-r:#B24438; --hm-ink-d:#FFFFFF;
  --st-todo:#9AA3AC; --st-todo-bg:#2A2F36;
  --st-progress:#6AA6E2; --st-progress-bg:#1C2B3B;
  --st-blocked:#E06A64; --st-blocked-bg:#3A2124;
  --st-done:#3DA96B; --st-done-bg:#16301F;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.45);
  --shadow-pop:0 4px 12px rgba(0,0,0,.5), 0 18px 48px rgba(0,0,0,.6);
}}
:root[data-theme="dark"]{
  color-scheme:dark;
  --paper:#15181C; --surface:#1B1F24; --surface-2:#22262C; --surface-3:#2A2F36;
  --ink:#ECEFF2; --ink-2:#AEB7C0; --ink-3:#7C868F;
  --rule:#2C3138; --rule-strong:#3B424A;
  --brand:#4C97DE; --brand-2:#6AA6E2; --brand-dark:#2E7BC4; --brand-wash:#1C2B3B;
  --coral:#E8917B; --coral-wash:#3A2620;
  --accent:#6AA6E2; --accent-ink:#8FBEEC; --accent-wash:#1C2B3B;
  --surplus:#3987E5; --deficit:#E06A64; --warn:#E0A63B; --good:#3DA96B; --violet:#9085E9;
  --cell-bg:#1B1F24;
  --hm-g3:#35833B; --hm-g2:#5C9A3E; --hm-g1:#86AB4A; --hm-g0:#9FAF6E;
  --hm-y0:#CFAF4E; --hm-y1:#C9932A; --hm-o:#BE6E2A; --hm-r:#B24438; --hm-ink-d:#FFFFFF;
  --st-todo:#9AA3AC; --st-todo-bg:#2A2F36;
  --st-progress:#6AA6E2; --st-progress-bg:#1C2B3B;
  --st-blocked:#E06A64; --st-blocked-bg:#3A2124;
  --st-done:#3DA96B; --st-done-bg:#16301F;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.45);
  --shadow-pop:0 4px 12px rgba(0,0,0,.5), 0 18px 48px rgba(0,0,0,.6);
}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font-ui);font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}
button,input,select{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:3px}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}

.seg{display:inline-flex;background:var(--surface-3);border-radius:8px;padding:2px;gap:2px}
.seg button{border:0;background:transparent;padding:6px 11px;border-radius:6px;font-size:13.5px;font-weight:500;color:var(--ink-2);cursor:pointer;white-space:nowrap}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.10);font-weight:600}
.seg button:disabled{opacity:.5;cursor:not-allowed}
.cap{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3)}
.sec-head{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:baseline;margin:0 0 10px}
.sec-head h2{font-family:var(--font-display);font-weight:700;font-size:21px;margin:0;letter-spacing:-.01em;text-wrap:balance}
.sec-head p{margin:0;color:var(--ink-2);font-size:13.5px}
.controls{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:12px 0}

/* Page notes. An "i" beside a heading that opens a short note. No script: it is a
   <details>, so it opens on click, closes on a second click, and works with the keyboard.
   Allison, 30 September 2026: "All notes should have the same Blue treatment" — the box is
   brand blue with a thick outline, open or popped. */
.infotip{position:relative;display:inline-block;align-self:center}
.infotip>summary{list-style:none;cursor:pointer;display:inline-flex;width:20px;height:20px;border-radius:50%;align-items:center;justify-content:center;color:var(--brand);border:1.5px solid var(--brand);background:var(--surface)}
.infotip>summary::-webkit-details-marker{display:none}
.infotip>summary svg{width:13px;height:13px}
.infotip>summary:hover,.infotip[open]>summary{background:var(--brand);color:var(--paper)}
.infotip-pop{position:absolute;left:0;top:26px;z-index:20;width:min(52ch,calc(100vw - 48px));padding:12px 14px;border:2px solid var(--brand);border-radius:10px;background:var(--brand-wash);box-shadow:var(--shadow-pop);font-size:13px;line-height:1.5;color:var(--ink)}
.infotip-pop p{margin:0 0 8px;max-width:none}
.infotip-pop p:last-child{margin-bottom:0}
.infotip-pop b{color:var(--brand-dark)}
/* The guided version: the note shown open beneath the heading until the person hides notes
   across the app. The <details> dissolves into the heading row, so the i stays beside the
   heading and the note takes the full row below it. The i is a label for a hidden checkbox,
   so it folds the note on this page in every browser without a script. */
.infotip-cb{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.infotip-i{cursor:pointer;display:inline-flex;width:20px;height:20px;border-radius:50%;align-items:center;justify-content:center;color:var(--paper);border:1.5px solid var(--brand);background:var(--brand);align-self:center}
.infotip-i svg{width:13px;height:13px}
.infotip-cb:checked~.infotip-i{background:var(--surface);color:var(--brand)}
.infotip-cb:focus-visible~.infotip-i{outline:2px solid var(--brand);outline-offset:2px}
.infotip-pop.shown{position:static;flex:0 0 100%;width:auto;max-width:none;margin-top:2px;box-shadow:none}
.infotip-cb:checked~.infotip-pop.shown{display:none}
.infotip-hide{margin-top:8px}
.linkish{background:none;border:0;padding:0;font:inherit;font-size:12px;color:var(--brand);cursor:pointer;text-decoration:underline}
.side-foot .infotip-toggle{background:none;border:1.5px solid var(--rule-strong);border-radius:50%;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;color:var(--ink-3);cursor:pointer;margin-right:4px}
.side-foot .infotip-toggle.on{color:var(--brand);border-color:var(--brand)}
.side-foot .infotip-toggle svg{width:13px;height:13px}

.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:1px;background:var(--rule);border:1px solid var(--rule);border-radius:11px;overflow:hidden;margin:14px 0}
.tile{background:var(--surface);padding:11px 13px}
.tile .k{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);display:block}
.tile .v{font-family:var(--font-num);font-size:21px;font-weight:600;display:block;margin-top:3px;letter-spacing:-.02em}
.tile .n{font-size:12.5px;color:var(--ink-3);display:block;line-height:1.35;margin-top:2px}
.tile.alert .v{color:var(--deficit)}
.tile.warn .v{color:var(--warn)}
a.tile{text-decoration:none;color:inherit}
a.tile:hover .k{color:var(--brand)}
.tile.on{box-shadow:inset 0 -2px 0 var(--brand)}

.legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:14px 0 8px;font-size:12.5px;color:var(--ink-2)}
.ramp{display:flex;align-items:center}
.ramp i{width:20px;height:13px;display:block;border:1px solid var(--rule);border-right:0}
.ramp i:last-child{border-right:1px solid var(--rule)}

.gridbox{background:var(--surface);border:1px solid var(--rule);border-radius:12px;overflow:auto;max-height:76vh}
table.grid{border-collapse:separate;border-spacing:0;width:100%;min-width:760px}
table.grid th,table.grid td{padding:0;text-align:right}
table.grid thead th{position:sticky;top:0;z-index:12;background:var(--surface-2);border-bottom:1px solid var(--rule-strong);padding:8px 9px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);white-space:nowrap}
table.grid thead th.mon{min-width:58px;width:64px}
table.grid thead th.mon .yr{display:block;font-size:11px;letter-spacing:.06em;color:var(--ink-3);font-weight:500;opacity:.8}
/* Months after somebody leaves (#536): dark grey across the whole column, so a
   planner is not read as if they were still here. The cells are tagged by the
   planner's own script from the month headers. Grey from the ink and surface
   tokens, nothing new; the capacity grid's heat-map colours are not touched. */
table.grid thead th.mon.gone,table.grid td.gone{background:color-mix(in oklab,var(--ink) 34%,var(--surface)) !important;color:var(--surface) !important}
table.grid td.gone *{color:inherit !important;background:transparent !important;border-color:transparent !important}
table.grid thead th.mon.gone .yr{color:var(--surface);opacity:1}
table.grid thead th.mon .yr.leaves{color:var(--deficit);opacity:1;font-weight:600}
.stub{position:sticky;left:0;z-index:14;background:var(--surface);text-align:left!important;padding:0 12px!important;width:232px;min-width:186px;max-width:250px;border-right:1px solid var(--rule)}
/* The header corner has to sit above the month headings, which slide under
   it when the box is scrolled sideways. Written as plain `thead .stub` this
   lost to `table.grid thead th` above (z-index 12), so the corner tied with
   the headings and they painted over it — on the planner that hid the month
   arrows and This month (#561). The selector is spelled out so 16 applies. */
thead .stub,table.grid thead th.stub{z-index:16;background:var(--surface-2);padding:8px 12px!important}
tbody tr:hover .stub{background:var(--surface-2)}
.grp td{background:var(--surface-3);padding:6px 12px!important;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2);font-weight:600;text-align:left;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.rowl .stub{padding-block:7px!important}
.pname{font-weight:600;font-size:13.5px;display:block;line-height:1.25;overflow-wrap:anywhere;max-width:232px}
.prole{font-size:12px;color:var(--ink-3);display:block;line-height:1.3;overflow-wrap:anywhere;max-width:232px}
.flag{display:inline-block;font-size:11px;letter-spacing:.05em;text-transform:uppercase;font-weight:600;padding:1px 5px;border-radius:4px;margin-left:5px;vertical-align:1px;background:var(--surface-3);color:var(--ink-2);border:1px solid var(--rule)}
.flag.bad{color:var(--deficit);border-color:color-mix(in oklab,var(--deficit) 40%,var(--rule))}
td.cell{border-bottom:1px solid var(--rule);border-left:1px solid var(--rule);padding:0;position:relative}
tbody tr:last-child td{border-bottom:0}
.cellbtn{width:100%;height:100%;min-height:42px;display:flex;flex-direction:column;justify-content:center;align-items:flex-end;border:0;background:transparent;padding:7px 9px;font-family:var(--font-num);font-variant-numeric:tabular-nums;font-size:13.5px;font-weight:500;cursor:pointer;color:var(--ink)}
.cellbtn:hover,.cellbtn[aria-pressed="true"]{box-shadow:inset 0 0 0 2px var(--accent)}
.cellbtn.na{color:var(--ink-3);cursor:default;font-weight:400;font-family:var(--font-ui);font-size:12px;align-items:center}
.cellbtn.na:hover{box-shadow:none}
.cellbtn .mv{display:block;font-size:11px;font-family:var(--font-ui);letter-spacing:.04em;color:var(--accent-ink);font-weight:600;line-height:1.1;margin-top:1px}
.cellbtn.mark{align-items:center;font-size:15px}
/* Time off on the planner (#258), in three states. Allison, 3 October 2026:
   "the items they haven't submitted should be red. Those they have amber
   with ? and those approved green." Red is --deficit, amber --warn, green
   --good; red and amber are darkened toward ink a little so they read as text
   on white. Colour is never the only signal: waiting carries a ?, a draft a
   hollow dotted ring. Every figure is counted — the colour only says how far
   along the asking is. */
/* Then, the same day: "the colour isn't obvious - can you just make the back
   of the cell tinted red or tinted amber leave the ones approve just
   regular." So the cell carries the colour, the figure stays readable ink,
   and approved time off is plain. */
.toff-wait{color:var(--ink);font-weight:600}
.toff-ok{color:inherit}
.toff-draft{color:var(--ink);font-weight:600}
td:has(.toff-wait),.toff-wait.chip-key{background:color-mix(in oklab,var(--warn) 22%,var(--surface))}
td:has(.toff-draft),.toff-draft.chip-key{background:color-mix(in oklab,var(--deficit) 18%,var(--surface))}
.chip-key{padding:0 5px;border-radius:4px}
/* The TOIL line's typed months on your own planner (#256): the box takes
   #258's three colours: a ? after a figure waiting for approval, a hollow
   ring after a draft.
   TOIL that is not a plan — booked on the calendar, or in final timesheets —
   is the small figure beneath. */
td.cell.toil-waiting{background:color-mix(in oklab,var(--warn) 22%,var(--surface))}
td.cell.toil-waiting input.cellin{background:transparent;color:var(--ink);font-weight:600;padding-right:16px}
td.cell.toil-approved input.cellin{color:inherit}
/* A draft box: a red-tinted cell, with the hollow ring where the ? would be. */
td.cell.toil-draft{background:color-mix(in oklab,var(--deficit) 18%,var(--surface))}
td.cell.toil-draft input.cellin{background:transparent;color:var(--ink);font-weight:600;padding-right:16px}
td.cell .cellring{display:none}
td.cell.toil-draft .cellring{display:block;position:absolute;right:5px;top:50%;transform:translateY(-50%);width:7px;height:7px;border:1.5px dotted var(--ink);border-radius:50%;box-sizing:border-box;pointer-events:none}
td.cell .cellq{display:none}
td.cell.toil-waiting .cellq{display:block;position:absolute;right:5px;top:50%;transform:translateY(-50%);pointer-events:none;font-family:var(--font-num);font-size:13.5px;font-weight:600;color:var(--ink)}
td.cell .toil-also{position:absolute;left:4px;bottom:1px;font-family:var(--font-num);font-size:10.5px;line-height:1.1;pointer-events:none}
.toff-draft::after{content:"";display:inline-block;width:7px;height:7px;margin-left:3px;border:1.5px dotted currentColor;border-radius:50%;vertical-align:middle;box-sizing:border-box}
.b0{background:var(--cell-bg)}
.sp1{background:var(--hm-g0)}
.sp2{background:var(--hm-g1)}
.sp3{background:var(--hm-g2)}
.sp4{background:var(--hm-g3)}
.df1{background:var(--hm-y0)}
.df2{background:var(--hm-y1)}
.df3{background:var(--hm-o)}
.df4{background:var(--hm-r)}
.ld1{background:var(--hm-g0)}
.ld2{background:var(--hm-y0)}
.ld3{background:var(--hm-o)}
.ld4{background:var(--hm-r)}
.sp1 .cellbtn,.sp2 .cellbtn,.df1 .cellbtn,.df2 .cellbtn,.ld1 .cellbtn,.ld2 .cellbtn{color:var(--hm-ink-d);font-weight:600}
.sp3 .cellbtn,.sp4 .cellbtn,.df3 .cellbtn,.df4 .cellbtn,.ld3 .cellbtn,.ld4 .cellbtn{color:#FFFFFF;font-weight:600}
.sp1 .cellbtn .mv,.sp2 .cellbtn .mv,.df1 .cellbtn .mv,.df2 .cellbtn .mv,.ld1 .cellbtn .mv,.ld2 .cellbtn .mv{color:color-mix(in oklab,var(--hm-ink-d) 78%,transparent)}
.sp3 .cellbtn .mv,.sp4 .cellbtn .mv,.df3 .cellbtn .mv,.df4 .cellbtn .mv,.ld3 .cellbtn .mv,.ld4 .cellbtn .mv{color:rgba(255,255,255,.9)}
.cellbtn:hover,.cellbtn[aria-pressed="true"]{box-shadow:inset 0 0 0 2px var(--ink)}
tr.sub td{background:var(--surface-2);border-top:1px solid var(--rule-strong);border-bottom:1px solid var(--rule-strong)}
tr.sub td.stub{background:var(--surface-2);font-weight:600;font-size:12.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-2);padding-block:7px!important}
tr.sub .val{display:block;padding:7px 9px;font-family:var(--font-num);font-variant-numeric:tabular-nums;font-size:13.5px;font-weight:600;border-left:1px solid var(--rule)}
tr.total td{background:var(--surface-3)}
tr.total td.stub{background:var(--surface-3);color:var(--ink);font-weight:700}
.neg{color:var(--deficit)}
tr.ddl td{background:var(--surface-2);border-bottom:1px solid var(--rule-strong);padding:0!important}
tr.ddl td.stub{background:var(--surface-2);font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);font-weight:600;padding-block:5px!important}
.ddm{display:block;padding:4px 6px;font-size:11px;font-weight:600;line-height:1.2;color:var(--deficit);border-left:1px solid var(--rule);text-align:center;min-height:22px}
.scrollhint{font-size:12.5px;color:var(--ink-3);margin:8px 2px 0}

.scenario{margin:12px 0 0;border:1px solid color-mix(in oklab,var(--accent) 40%,var(--rule));background:var(--accent-wash);border-radius:10px;padding:11px 13px;display:flex;flex-wrap:wrap;gap:10px 16px;align-items:flex-start}
.scenario h3{margin:0 0 4px;font-size:12.5px;letter-spacing:.07em;text-transform:uppercase;color:var(--accent-ink)}
.scenario ul{margin:0;padding-left:18px;font-size:13.5px;display:grid;gap:3px}
.scenario .grow{flex:1 1 280px}
.btn{border:1px solid var(--rule-strong);background:var(--surface);color:var(--ink);padding:7px 13px;border-radius:7px;font-size:13.5px;font-weight:500;cursor:pointer;white-space:nowrap}
.btn:hover{border-color:var(--accent)}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
:root[data-theme="dark"] .btn-primary{color:#1A1813}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .btn-primary{color:#1A1813}}

.scrim{position:fixed;inset:0;background:rgba(26,24,19,.34);z-index:50;opacity:0;pointer-events:none;transition:opacity .16s ease}
.scrim.on{opacity:1;pointer-events:auto}
.drawer{position:fixed;top:0;right:0;height:100%;width:min(500px,100%);background:var(--surface);border-left:1px solid var(--rule);z-index:60;transform:translateX(102%);transition:transform .2s ease;display:flex;flex-direction:column;box-shadow:var(--shadow)}
.drawer.on{transform:none}
.dr-head{padding:16px 18px 12px;border-bottom:1px solid var(--rule);flex:0 0 auto;padding-top:calc(16px + env(safe-area-inset-top,0px))}
.dr-head .row{display:flex;align-items:flex-start;gap:12px}
.dr-head h3{margin:0;font-family:var(--font-display);font-weight:500;font-size:21px;letter-spacing:-.01em;overflow-wrap:anywhere}
.dr-head .when{font-size:12.5px;color:var(--ink-3);letter-spacing:.06em;text-transform:uppercase;margin-top:1px}
.x{margin-left:auto;border:1px solid var(--rule);background:var(--surface-2);width:30px;height:30px;border-radius:7px;cursor:pointer;font-size:16px;line-height:1;color:var(--ink-2);flex:0 0 auto}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--rule);border:1px solid var(--rule);border-radius:9px;overflow:hidden;margin-top:13px}
.stat{background:var(--surface-2);padding:8px 10px}
.stat .k{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);display:block}
.stat .v{font-family:var(--font-num);font-variant-numeric:tabular-nums;font-size:17px;font-weight:600;display:block;margin-top:2px}
.dr-body{overflow-y:auto;padding:4px 18px 28px;flex:1 1 auto;padding-bottom:calc(28px + env(safe-area-inset-bottom,0px))}
.sectitle{font-size:12px;letter-spacing:.09em;text-transform:uppercase;color:var(--ink-3);font-weight:600;margin:16px 0 5px;padding-bottom:5px;border-bottom:1px solid var(--rule);display:flex;justify-content:space-between;gap:10px}
.sectitle span{font-family:var(--font-num);color:var(--ink-2);letter-spacing:0;text-transform:none}
.item{display:flex;gap:9px;align-items:flex-start;padding:7px 0;border-bottom:1px solid var(--rule)}
.item:last-child{border-bottom:0}
.item .txt{flex:1 1 auto;min-width:0}
.item .cl{font-size:13.5px;font-weight:500;line-height:1.3;overflow-wrap:anywhere}
.item .meta{font-size:12.5px;color:var(--ink-3);line-height:1.35;margin-top:1px;overflow-wrap:anywhere}
.item .hrs{font-family:var(--font-num);font-variant-numeric:tabular-nums;font-size:13.5px;font-weight:500;flex:0 0 auto;padding-top:1px}
.item .hrs .up{display:block;font-size:12px;color:var(--warn);font-family:var(--font-ui);font-weight:600;text-align:right}
.mvbtn{flex:0 0 auto;border:1px solid var(--rule-strong);background:var(--surface);border-radius:6px;padding:3px 9px;font-size:12.5px;font-weight:600;cursor:pointer;color:var(--ink-2)}
.mvbtn:hover{border-color:var(--accent);color:var(--accent-ink)}
.src{display:inline-block;font-size:11px;letter-spacing:.05em;text-transform:uppercase;font-weight:600;padding:1px 5px;border-radius:4px;border:1px solid var(--rule);color:var(--ink-3)}
.src.over{color:var(--accent-ink);border-color:color-mix(in oklab,var(--accent) 45%,var(--rule));background:var(--accent-wash)}
.src.none{color:var(--deficit);border-color:color-mix(in oklab,var(--deficit) 40%,var(--rule))}
.src.dl{color:var(--deficit);border-color:color-mix(in oklab,var(--deficit) 40%,var(--rule))}
.picker{background:var(--surface-2);border:1px solid var(--rule);border-radius:9px;padding:10px 11px;margin:2px 0 10px}
.picker p{margin:0 0 8px;font-size:12.5px;color:var(--ink-2)}
.picker .opts{display:flex;flex-wrap:wrap;gap:6px}
.opt{border:1px solid var(--rule-strong);background:var(--surface);border-radius:7px;padding:5px 9px;font-size:13px;cursor:pointer;text-align:left;line-height:1.3}
.opt:hover:not(:disabled){border-color:var(--accent)}
.opt small{display:block;font-size:12px;color:var(--ink-3)}
.opt:disabled{opacity:.42;cursor:not-allowed}
.opt .tr{color:var(--warn);font-weight:600}
.empty{color:var(--ink-3);font-size:13.5px;padding:14px 0}

.tbl-box{background:var(--surface);border:1px solid var(--rule);border-radius:12px;overflow-x:auto;margin-top:12px}
table.dt{border-collapse:separate;border-spacing:0;width:100%;min-width:900px;font-size:13px}
table.dt th{background:var(--surface-2);text-align:left;padding:8px 11px;font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);font-weight:600;border-bottom:1px solid var(--rule-strong);white-space:nowrap;position:sticky;top:0;z-index:5}
table.dt td{padding:8px 11px;border-bottom:1px solid var(--rule);vertical-align:top}
table.dt tbody tr:last-child td{border-bottom:0}
table.dt tbody tr:hover td{background:var(--surface-2)}
table.dt td.num,table.dt th.num{text-align:right;font-family:var(--font-num);font-variant-numeric:tabular-nums}
.pill{display:inline-block;font-size:12px;font-weight:600;padding:1.5px 7px;border-radius:999px;border:1px solid var(--rule);white-space:nowrap;color:var(--ink-2)}
.pill.pp{color:var(--surplus);border-color:color-mix(in oklab,var(--surplus) 40%,var(--rule))}
.pill.sa{color:var(--violet);border-color:color-mix(in oklab,var(--violet) 40%,var(--rule))}
.pill.z{color:var(--ink-3)}
.pill.bad{color:var(--deficit);border-color:color-mix(in oklab,var(--deficit) 40%,var(--rule))}
.pill.warn{color:var(--warn);border-color:color-mix(in oklab,var(--warn) 45%,var(--rule))}
.pill.ok{color:var(--good);border-color:color-mix(in oklab,var(--good) 40%,var(--rule))}
/* Time charged without a role (#215): greyed, at the bottom of client work. */
.rowl.charged .pname,.rowl.charged .val,.rowl.charged .cellbtn{color:var(--ink-3)}
.rowl.charged td{background:var(--surface-2)}
/* A client on its way out (#210): the brand coral, darkened to read as text. */
.pill.exiting{color:color-mix(in oklab,var(--coral) 70%,var(--ink));border-color:color-mix(in oklab,var(--coral) 55%,var(--rule));background:var(--coral-wash)}
a.cname{color:inherit;text-decoration:none}
a.cname:hover{text-decoration:underline}
.banner.exiting{border-color:color-mix(in oklab,var(--coral) 45%,var(--rule));background:var(--coral-wash)}
.banner.exiting b{color:color-mix(in oklab,var(--coral) 70%,var(--ink))}
.cname.exiting,a.cname.exiting,.plain.exiting,.meta .exiting,h1.exiting{color:color-mix(in oklab,var(--coral) 70%,var(--ink))}
/* A client that is no longer a client (Allison, 3 October 2026: "Shouldn't it
   be obvious once a client is marked No longer a client?"): grey, with a small
   "former" label after the name so the grey is not the only signal. */
.cname.former,a.cname.former,.plain.former,h1.former{color:var(--ink-3)}
.former-tag{display:inline-block;margin-left:5px;padding:0 6px;border:1px solid var(--rule-strong);border-radius:999px;background:var(--surface-2);color:var(--ink-3);font-size:11px;font-weight:600;line-height:16px;vertical-align:1px}
/* A former client is pink, so it is obvious at a glance (#540, Allison, 20
   November 2026: "no longer clients banner should be pink so it's obvious").
   Mixed from --deficit, so no new colour comes in; coral stays for Exiting. */
.banner.former{border-color:color-mix(in oklab,var(--deficit) 40%,var(--rule));background:color-mix(in oklab,var(--deficit) 9%,var(--surface))}
.banner.former b{color:color-mix(in oklab,var(--deficit) 75%,var(--ink))}
.pill.former{color:color-mix(in oklab,var(--deficit) 75%,var(--ink));border-color:color-mix(in oklab,var(--deficit) 40%,var(--rule));background:color-mix(in oklab,var(--deficit) 9%,var(--surface))}
/* The banner's first line says where the client stands, in words. */
.banner.standing .standing-line{font-size:15px;font-weight:700;color:var(--ink-2);margin-bottom:2px}
.banner.exiting .standing-line{color:color-mix(in oklab,var(--coral) 70%,var(--ink))}
.banner.former .standing-line{color:color-mix(in oklab,var(--deficit) 75%,var(--ink))}
/* Every box you type in looks the same, in either theme. Only text, search
   and number boxes and dropdowns used to be styled here, so a date, month,
   email, password or web-address box, a box with no type, and a text area
   outside a form field fell back to the browser's white — unreadable in dark
   mode (Andrew, 30 September and 13 October 2026; #126). Rules further down
   still win where a box is meant to look different (planner cells, the
   search bar). */
input[type=search],input[type=text],select,
input[type=date],input[type=month],input[type=time],input[type=email],input[type=url],
input[type=password],input[type=tel],input:not([type]),textarea{border:1px solid var(--rule-strong);background:var(--surface);color:var(--ink);border-radius:7px;padding:6px 10px;font-size:13.5px;min-width:0}
textarea{font-family:inherit}
::placeholder{color:var(--ink-3);opacity:1}
input[type=number]{border:1px solid var(--rule-strong);background:var(--surface);border-radius:6px;padding:3px 6px;font-size:13px;width:72px;font-family:var(--font-num);text-align:right}
.note{margin-top:20px;border-top:1px solid var(--rule);padding-top:13px;color:var(--ink-3);font-size:12.5px}
.note b{color:var(--ink-2)}
/* A change to something already recorded. The border carries the warning so
   the words don't have to shout. */
.note.warn{border:1px solid color-mix(in oklab,var(--warn) 45%,var(--rule));
  background:color-mix(in oklab,var(--warn) 7%,var(--surface));
  border-radius:8px;padding:12px 14px;margin-top:16px}
.note.warn label{display:inline-flex;align-items:center;gap:8px;margin-right:10px}
/* A queue to work through, not a paragraph to read: the whole width, one
   line a row, so an approver sees as many as the screen holds (#169). */
.note.wide{max-width:none}
.note.wide .dt{width:100%;min-width:0}
.note.wide .dt td{vertical-align:top;white-space:nowrap}
.note.wide .dt td.grow{white-space:normal;width:100%}
/* A fortnight and its workings read as one (#167): the workings open in a row of their own underneath, across the table. */
table.dt tr:has(+ tr.workings) td{border-bottom:0}
table.dt tr.workings td{padding-top:0}
.note.wide .row-actions{flex-wrap:nowrap}
.note.wide details.inline{display:inline-block}
.note.wide details.inline[open]{display:flex;gap:6px;align-items:center}
/* A stage the service line does not carry. Visible, so the shape of the
   service line is legible, but not selectable. */
.sheet tr.off{opacity:.45}
.sheet tr.off .stage-why{font-style:italic}
.card{background:var(--surface);border:1px solid var(--rule);border-radius:12px;padding:15px 16px;margin-top:14px}
.card h3{margin:0 0 6px;font-family:var(--font-display);font-weight:500;font-size:18px}
.card p{margin:0 0 10px;font-size:13.5px;color:var(--ink-2)}
.row-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.status{font-size:13px;color:var(--ink-2);margin-top:8px;min-height:18px}
.status.err{color:var(--deficit)}
.status.ok{color:var(--good)}
@media (max-width:640px){
  .drawer{width:100%;top:auto;bottom:0;height:88%;border-left:0;border-top:1px solid var(--rule);border-radius:14px 14px 0 0;transform:translateY(102%)}
  .drawer.on{transform:none}
  .stats{grid-template-columns:1fr 1fr}
  .brand b{font-size:18px}
}

/* ======================================================================
   Beyond the mockup
   ====================================================================== */

/* --- Links ------------------------------------------------------------ */
a{color:var(--brand-2)}
a.plain{color:inherit;text-decoration:none}
a.plain:hover{text-decoration:underline}

/* --- Banners ---------------------------------------------------------- */
.banner{border:1px solid color-mix(in oklab,var(--warn) 42%,var(--rule));background:color-mix(in oklab,var(--warn) 9%,var(--surface));border-radius:10px;padding:11px 14px;margin:14px 0;font-size:13.5px;color:var(--ink);display:flex;gap:12px;align-items:flex-start}
.banner b{display:block;font-size:12.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--warn);margin-bottom:3px}
.banner.bad{border-color:color-mix(in oklab,var(--deficit) 42%,var(--rule));background:color-mix(in oklab,var(--deficit) 8%,var(--surface))}
.banner.bad b{color:var(--deficit)}
.banner.good{border-color:color-mix(in oklab,var(--good) 40%,var(--rule));background:color-mix(in oklab,var(--good) 8%,var(--surface))}
.banner.good b{color:var(--good)}
.banner.info{border-color:var(--rule-strong);background:var(--surface-2)}
.banner.info b{color:var(--ink-3)}
/* The one-time welcome about page notes. Allison, 30 September 2026: "make it a Blue box
   with a thick outline so it's obvious." Bold inside it is a heading only on the first line;
   in the body it stays inline, so the sentences wrap as sentences. */
.banner.welcome{border:2px solid var(--brand);background:var(--brand-wash);color:var(--ink)}
.banner.welcome>.grow>b:first-child{display:block;color:var(--brand);font-size:13px;letter-spacing:.06em;text-transform:uppercase;margin-bottom:6px}
.banner.welcome p b{display:inline;font-size:inherit;letter-spacing:0;text-transform:none;color:var(--brand-dark);margin:0}
.banner.welcome p{max-width:none;line-height:1.5}
.banner p{margin:0;color:var(--ink-2)}
.banner .grow{flex:1 1 auto;min-width:0}
/* A contact who has died (#534). Allison, 20 November 2026: "make the deceased
   banner more obvious". Solid ink rather than the grey of archived or former,
   so it is not mistaken for either; ink inverts with the theme. */
.banner.deceased{border:1px solid var(--ink);border-left-width:6px;background:var(--surface-2);align-items:center}
.banner.deceased b{color:var(--ink);font-size:15px}
.deceased-tag{display:inline-block;margin-left:6px;padding:0 7px;border-radius:999px;background:var(--ink);color:var(--surface);font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;line-height:17px;vertical-align:1px}
/* Pages use the width of the screen (#251): Allison, 2 October 2026, "Stuff's
   only filling the left side of the screen". Text, banners, notes and forms
   run the full width, and so do the help guides: they first kept a reading
   width, until Allison, 2 October 2026, on a guide: "again info isn't filling
   the page..... It only fits half way across both on my big screen and my
   laptop screen." Long lines are her choice over half a screen of white. A bold
   word inside a banner's sentence is a word, not the banner's heading. */
.banner .grow p b,.banner .grow li b{display:inline;font-size:inherit;letter-spacing:0;text-transform:none;color:inherit;margin:0;font-weight:700}

/* --- Provenance ------------------------------------------------------- */
.prov{display:inline-block;font-size:11px;letter-spacing:.05em;text-transform:uppercase;font-weight:600;padding:1px 6px;border-radius:4px;border:1px solid var(--rule);color:var(--ink-3);white-space:nowrap}
.prov.quoted{color:var(--good);border-color:color-mix(in oklab,var(--good) 40%,var(--rule))}
.prov.measured{color:var(--surplus);border-color:color-mix(in oklab,var(--surplus) 40%,var(--rule))}
.prov.estimated{color:var(--warn);border-color:color-mix(in oklab,var(--warn) 45%,var(--rule));background:color-mix(in oklab,var(--warn) 10%,transparent)}
/* A figure's full source in words (#519): sentence case, so "from Kale's planner workbook" reads as words, not a code. */
.prov.words{text-transform:none;letter-spacing:0;font-weight:500;white-space:normal}
.prov.low{color:var(--deficit);border-color:color-mix(in oklab,var(--deficit) 40%,var(--rule))}

/* --- Forms ------------------------------------------------------------ */
form.stack{display:grid;gap:12px}
form.wide{max-width:none}
.field{display:grid;gap:4px}
.field label{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);font-weight:600}
.field .help{font-size:12.5px;color:var(--ink-3)}
.field input,.field select,.field textarea{border:1px solid var(--rule-strong);background:var(--surface);border-radius:7px;padding:7px 10px;font-size:13.5px;width:100%;font-family:inherit;color:var(--ink)}
/* A client record edited in the app (#207): fields side by side, wrapping on a phone. */
.formgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px 14px}
form.tagchip,label.tagchip{display:inline-flex;align-items:center;gap:4px}
.field textarea{min-height:76px;resize:vertical}
/* Edit record's Status panel: four even columns with their tops aligned,
   so Status, the client tick, what it is if not, and the partner-firm tick sit on
   one row, and Came from, Referred by and the note on the next. A tick gets a
   heading like any other field and sits at the height of the boxes beside it. */
.statusgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 14px;align-items:start}
.statusgrid + .statusgrid,.restart-block + .statusgrid{margin-top:12px}
.statusgrid:not(:has(> .field:not([hidden]))){display:none}
.statusgrid .field.wide{grid-column:span 2}
.field .fhead{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);font-weight:600}
.field label.checkline{min-height:34px}
.lastgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,260px));gap:10px 14px;align-items:start}
.field select.monthpick{width:auto;min-width:11em}
@media (max-width:900px){.statusgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.statusgrid{grid-template-columns:1fr}.statusgrid .field.wide{grid-column:auto}}
/* display:grid above beats [hidden], as a.guide's flex did (#218): a field
   shown only for one choice stayed on screen for every choice. */
.field[hidden]{display:none}
.field label:has(> input[type=checkbox]){display:flex;align-items:center;gap:8px;text-transform:none;letter-spacing:0;font-size:13.5px;color:var(--ink)}
.field input[type=checkbox]{width:auto}
.field.err input,.field.err select,.field.err textarea{border-color:var(--deficit)}
.field .errmsg,p.errmsg{font-size:12.5px;color:var(--deficit)}
.fieldrow{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
fieldset{border:1px solid var(--rule);border-radius:10px;padding:13px 15px;margin:0}
legend{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);font-weight:600;padding:0 6px}
.checks{display:flex;flex-wrap:wrap;gap:8px 16px}
.checks label{display:flex;gap:6px;align-items:center;font-size:13.5px;color:var(--ink)}
.checks input{width:auto}
.btn-danger{border-color:color-mix(in oklab,var(--deficit) 50%,var(--rule));color:var(--deficit)}
.btn-sm{padding:4px 9px;font-size:12.5px}

/* --- Definition lists ------------------------------------------------- */
dl.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:1px;background:var(--rule);border:1px solid var(--rule);border-radius:10px;overflow:hidden;margin:13px 0}
dl.facts div{background:var(--surface);padding:9px 12px}
dl.facts dt{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);font-weight:600}
dl.facts dd{margin:3px 0 0;font-size:13.5px;overflow-wrap:anywhere}
dl.facts dd.num{font-family:var(--font-num);font-variant-numeric:tabular-nums}
dl.facts dd .prov{margin-left:5px;vertical-align:1px}

/* --- Grid extras ------------------------------------------------------ */
tr.ddl td{background:var(--surface-2);border-bottom:1px solid var(--rule-strong);padding:4px 6px!important;text-align:center}
tr.ddl td.stub{text-align:left!important;font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);font-weight:600}
.ddm{font-size:11px;line-height:1.25;color:var(--accent-ink);font-weight:600;display:block}
.cellbtn .fl{display:block;font-size:12px;line-height:1;margin-top:1px}
.scrollhint{margin:7px 0 0;font-size:12.5px;color:var(--ink-3)}
.freshness{font-size:12.5px;color:var(--ink-3)}
.freshness.stale{color:var(--warn)}

/* --- Detail drawer / panel ------------------------------------------- */
.panel{background:var(--surface);border:1px solid var(--rule);border-radius:12px;padding:0;margin-top:14px;overflow:hidden}
.panel > h3{margin:0;padding:11px 15px;border-bottom:1px solid var(--rule);font-family:var(--font-display);font-weight:500;font-size:17px;background:var(--surface-2)}
.panel .inner{padding:13px 15px}
.split{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:900px){.split{grid-template-columns:1fr}}
.stackm{display:grid;gap:10px}

/* --- Misc ------------------------------------------------------------- */
.muted{color:var(--ink-3)}
.num{font-family:var(--font-num);font-variant-numeric:tabular-nums}
.neg{color:var(--deficit)}
.pos{color:var(--good)}
.crumbs{font-size:12.5px;color:var(--ink-3);margin-bottom:6px}
.crumbs a{color:var(--ink-3)}
.pager{display:flex;gap:8px;align-items:center;margin-top:12px;font-size:13px;color:var(--ink-2)}
.msg{border-radius:9px;padding:9px 13px;margin:10px 0;font-size:13.5px;border:1px solid var(--rule)}
.msg.success{border-color:color-mix(in oklab,var(--good) 40%,var(--rule));background:color-mix(in oklab,var(--good) 8%,var(--surface))}
.msg.error{border-color:color-mix(in oklab,var(--deficit) 40%,var(--rule));background:color-mix(in oklab,var(--deficit) 8%,var(--surface))}
.msg.warning{border-color:color-mix(in oklab,var(--warn) 40%,var(--rule));background:color-mix(in oklab,var(--warn) 8%,var(--surface))}
.signin{max-width:380px;margin:9vh auto;background:var(--surface);border:1px solid var(--rule);border-radius:14px;padding:26px 24px;box-shadow:var(--shadow)}
.signin h1{font-family:var(--font-display);font-weight:500;font-size:26px;margin:0 0 4px}
.signin p{color:var(--ink-2);font-size:13.5px;margin:0 0 18px}

/* The grid cell is a link rather than a button, so it can carry the selected
   cell in the URL and survive a reload. It must not read as body-text link. */
a.cellbtn{text-decoration:none;color:inherit}
a.cellbtn:hover{text-decoration:none;box-shadow:inset 0 0 0 2px var(--ink)}
.sp1 a.cellbtn,.sp2 a.cellbtn,.df1 a.cellbtn,.df2 a.cellbtn,.ld1 a.cellbtn,.ld2 a.cellbtn{color:var(--hm-ink-d)}
.sp3 a.cellbtn,.sp4 a.cellbtn,.df3 a.cellbtn,.df4 a.cellbtn,.ld3 a.cellbtn,.ld4 a.cellbtn{color:#FFFFFF}
.b0 a.cellbtn{color:var(--ink)}

/* ======================================================================
   The shell: icon rail, sidebar, breadcrumb, view tabs, toolbar
   ----------------------------------------------------------------------
   Modelled on ClickUp, because the team already works in ClickUp and a tool
   that behaves differently is a tool people bounce off. The furniture is in
   the same places and does the same things.
   ====================================================================== */
body{display:flex;min-height:100vh;background:var(--paper)}

/* --- Far-left icon rail ------------------------------------------------ */
.rail{position:fixed;inset:0 auto 0 0;width:var(--rail-w);z-index:60;
  background:var(--surface);border-right:1px solid var(--rule);
  display:flex;flex-direction:column;align-items:center;
  padding:10px 0 calc(10px + env(safe-area-inset-bottom,0px));gap:2px;overflow-y:auto;overscroll-behavior:contain}
.rail::-webkit-scrollbar{width:0}
.rail .mark{display:block;width:34px;height:auto;margin-bottom:10px;flex:0 0 auto}
.rail a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  width:58px;padding:7px 2px;border-radius:9px;text-decoration:none;color:var(--ink-2);
  font-size:11px;font-weight:600;letter-spacing:.01em;text-align:center;line-height:1.15;flex:0 0 auto;position:relative}
.rail a svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.rail a:hover{background:var(--surface-2);color:var(--ink)}
.rail a[aria-current="page"]{background:var(--brand-wash);color:var(--brand-dark)}
.rail a[aria-current="page"] svg{stroke-width:2}
.rail .spacer{flex:1 1 auto}
.rail .count{position:absolute;top:3px;right:7px;min-width:15px;height:15px;padding:0 4px;
  border-radius:999px;background:var(--coral);color:#fff;font-family:var(--font-num);
  font-size:9px;font-weight:600;display:flex;align-items:center;justify-content:center;line-height:1}

/* --- Contextual sidebar ------------------------------------------------ */
.side{position:fixed;inset:0 auto 0 var(--rail-w);width:var(--side-w);z-index:50;
  background:var(--surface);border-right:1px solid var(--rule);
  display:flex;flex-direction:column;overflow:hidden}
.side-head{padding:13px 14px 9px;display:flex;align-items:center;gap:8px;flex:0 0 auto}
.side-head h2{margin:0;font-family:var(--font-display);font-weight:800;font-size:17px;letter-spacing:-.01em}
.side-head .add{margin-left:auto;width:26px;height:26px;border-radius:7px;border:1px solid var(--rule-strong);
  background:var(--surface);color:var(--ink-2);display:grid;place-items:center;cursor:pointer;
  text-decoration:none;font-size:15px;line-height:1}
.side-head .add:hover{border-color:var(--brand-2);color:var(--brand-2)}
.side-body{flex:1 1 auto;overflow-y:auto;padding:0 8px 18px}
.side-group{margin:10px 0 3px;padding:0 6px;font-size:12px;letter-spacing:.09em;text-transform:uppercase;
  color:var(--ink-3);font-weight:700}
.side a.item{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:7px;
  text-decoration:none;color:var(--ink-2);font-size:13.5px;line-height:1.3;font-weight:500}
.side a.item:hover{background:var(--surface-2);color:var(--ink)}
.side a.item[aria-current="page"]{background:var(--brand-wash);color:var(--brand-dark);font-weight:700}
.side a.item .ic{flex:0 0 auto;width:15px;height:15px;display:grid;place-items:center;color:var(--ink-3)}
.side a.item[aria-current="page"] .ic{color:var(--brand-2)}
.side a.item svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.side a.item .n{margin-left:auto;font-family:var(--font-num);font-size:12px;font-weight:600;color:var(--ink-3)}
.side a.item .n.hot{color:var(--coral)}
.side a.item .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side .nested{padding-left:14px}
.side-foot{flex:0 0 auto;border-top:1px solid var(--rule);padding:9px 12px;display:flex;align-items:center;gap:9px}
.side-foot .who{min-width:0}
.side-foot .who b{display:block;font-size:13.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-foot .who span{display:block;font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);font-weight:700}
.side-foot form{margin-left:auto}

/* --- Main column -------------------------------------------------------- */
.main{flex:1 1 auto;min-width:0;margin-left:calc(var(--rail-w) + var(--side-w));display:flex;flex-direction:column}
.crumbbar{position:sticky;top:0;z-index:30;background:var(--surface);border-bottom:1px solid var(--rule);
  padding:9px 18px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.crumbbar .path{display:flex;align-items:center;gap:7px;font-size:14px;min-width:0;flex-wrap:wrap}
.crumbbar .path a{color:var(--ink-2);text-decoration:none;font-weight:600}
.crumbbar .path a:hover{color:var(--brand-2)}
.crumbbar .path .sep{color:var(--ink-3);font-weight:400}
.crumbbar .path b{font-weight:800;font-family:var(--font-display);font-size:15px;letter-spacing:-.01em}
.crumbbar .right{margin-left:auto;display:flex;align-items:center;gap:8px}
.searchbox{display:flex;align-items:center;gap:7px;background:var(--surface-2);border:1px solid var(--rule);
  border-radius:9px;padding:5px 10px;min-width:220px;color:var(--ink-3)}
.searchbox input{border:0;background:transparent;font-size:13.5px;width:100%;color:var(--ink);padding:0}
.searchbox input:focus{outline:none}
.searchbox kbd{font-family:var(--font-num);font-size:12px;border:1px solid var(--rule-strong);border-radius:4px;
  padding:0 4px;color:var(--ink-3);background:var(--surface)}

/* --- View tabs ---------------------------------------------------------- */
.viewtabs{display:flex;align-items:center;gap:4px;padding:0 18px;background:var(--surface);
  border-bottom:1px solid var(--rule);overflow-x:auto}
.viewtabs a{padding:8px 10px 7px;font-size:13.5px;font-weight:600;color:var(--ink-2);text-decoration:none;
  border-bottom:2px solid transparent;white-space:nowrap;display:flex;align-items:center;gap:6px}
.viewtabs a:hover{color:var(--ink)}
.viewtabs a[aria-current="page"]{color:var(--ink);border-bottom-color:var(--brand)}
.viewtabs a .n{font-family:var(--font-num);font-size:12px;color:var(--ink-3);font-weight:600}
.viewtabs svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* --- Toolbar ------------------------------------------------------------ */
.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 18px;
  background:var(--surface);border-bottom:1px solid var(--rule)}
.toolbar .grow{flex:1 1 auto}
.chip{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:8px;
  border:1px solid var(--rule-strong);background:var(--surface);color:var(--ink-2);
  font-size:13px;font-weight:600;text-decoration:none;cursor:pointer;white-space:nowrap}
.chip:hover{border-color:var(--brand-2);color:var(--brand-2)}
.chip[aria-pressed="true"],.chip.on{background:var(--brand-wash);border-color:color-mix(in oklab,var(--brand) 35%,transparent);color:var(--brand-dark)}
.chip svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.chip .n{font-family:var(--font-num);font-size:12px;opacity:.75}

.wrap{padding:16px 18px 72px;min-width:0}
.wrap.flush{padding-top:12px}

/* --- Status pills, as ClickUp draws them ------------------------------- */
.st{display:inline-flex;align-items:center;gap:5px;padding:2px 9px 2px 7px;border-radius:5px;
  font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap;
  background:var(--st-todo-bg);color:var(--st-todo)}
.st::before{content:"";width:9px;height:9px;border-radius:999px;border:1.8px solid currentColor;flex:0 0 auto}
.st.progress{background:var(--st-progress-bg);color:var(--st-progress)}
.st.progress::before{border-style:solid;background:linear-gradient(to right,currentColor 50%,transparent 50%)}
.st.blocked{background:var(--st-blocked-bg);color:var(--st-blocked)}
.st.blocked::before{border-style:dashed}
.st.done{background:var(--st-done);color:#fff}
.st.done::before{border-color:#fff;background:#fff;box-shadow:inset 0 0 0 1.5px var(--st-done)}
.st.unknown{background:transparent;color:var(--ink-3);border:1px dashed var(--rule-strong)}
.st.unknown::before{border-style:dotted}

/* --- Assignee avatars --------------------------------------------------- */
.av{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:999px;
  font-size:9.5px;font-weight:800;letter-spacing:.02em;color:#fff;flex:0 0 auto;
  background:var(--ink-3);box-shadow:0 0 0 1.5px var(--surface)}
.av.sm{width:20px;height:20px;font-size:8.5px}
.av.lg{width:32px;height:32px;font-size:12.5px}
.av.none{background:transparent;color:var(--ink-3);border:1.5px dashed var(--rule-strong);box-shadow:none;font-weight:700}
.av-c0{background:#3D6DB6}.av-c1{background:#1E8E4B}.av-c2{background:#8A5CD1}.av-c3{background:#C2601E}
.av-c4{background:#0F8E9E}.av-c5{background:#C0397A}.av-c6{background:#5C6BC0}.av-c7{background:#7A8B22}
.avstack{display:inline-flex;align-items:center}
.avstack .av+.av{margin-left:-7px}
.who-cell{display:inline-flex;align-items:center;gap:7px;min-width:0}
.who-cell .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* --- Priority flags ----------------------------------------------------- */
.prio{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;color:var(--ink-2);white-space:nowrap}
.prio svg{width:13px;height:13px;fill:currentColor;stroke:none}
.prio.high{color:var(--deficit)}
.prio.normal{color:var(--brand-2)}
.prio.low{color:var(--ink-3)}

/* --- Progress bars ------------------------------------------------------ */
.prog{display:inline-flex;align-items:center;gap:7px;min-width:92px}
.prog .track{flex:1 1 auto;height:5px;border-radius:999px;background:var(--surface-3);overflow:hidden}
.prog .track i{display:block;height:100%;border-radius:999px;background:var(--brand-2)}
.prog .track i.full{background:var(--st-done)}
.prog b{font-family:var(--font-num);font-size:12px;font-weight:600;color:var(--ink-3);min-width:30px;text-align:right}

/* --- Grouped, collapsible tables --------------------------------------- */
.grouphead{display:flex;align-items:center;gap:9px;padding:9px 2px 7px;cursor:pointer;list-style:none}
.grouphead::-webkit-details-marker{display:none}
.grouphead .caret{width:16px;height:16px;display:grid;place-items:center;color:var(--ink-3);
  transition:transform .12s ease;flex:0 0 auto}
details[open]>.grouphead .caret{transform:rotate(90deg)}
.grouphead .n{font-family:var(--font-num);font-size:12.5px;font-weight:600;color:var(--ink-3)}
.grouphead .meta{margin-left:auto;font-size:12.5px;color:var(--ink-3);font-family:var(--font-num)}
.grouphead svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.addrow{display:flex;align-items:center;gap:7px;padding:8px 11px;font-size:13px;font-weight:600;
  color:var(--ink-3);text-decoration:none;border-top:1px solid var(--rule)}
.addrow:hover{color:var(--brand-2)}

/* --- Slide-over --------------------------------------------------------- */
.slide{position:fixed;inset:0 0 0 auto;width:min(560px,100%);z-index:70;background:var(--surface);
  border-left:1px solid var(--rule);box-shadow:var(--shadow-pop);display:flex;flex-direction:column}
.slide-head{padding:14px 18px 11px;border-bottom:1px solid var(--rule);flex:0 0 auto}
.slide-head .path{font-size:12.5px;color:var(--ink-3);display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.slide-head .row{display:flex;align-items:flex-start;gap:12px;margin-top:5px}
.slide-head h3{margin:0;font-family:var(--font-display);font-weight:800;font-size:20px;letter-spacing:-.01em}
.slide-body{flex:1 1 auto;overflow-y:auto;padding:4px 18px 30px}
.slide .x{margin-left:auto;border:1px solid var(--rule);background:var(--surface-2);width:28px;height:28px;
  border-radius:7px;cursor:pointer;color:var(--ink-2);flex:0 0 auto;display:grid;place-items:center;text-decoration:none}
.slide .x:hover{border-color:var(--brand-2);color:var(--brand-2)}
.fieldgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:9px 20px;margin:12px 0}
.fieldgrid .f{display:flex;align-items:center;gap:10px;font-size:13.5px;min-height:26px}
.fieldgrid .f .k{color:var(--ink-3);font-size:13px;width:104px;flex:0 0 auto;display:flex;align-items:center;gap:6px}
.fieldgrid .f .k svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.7}
.fieldgrid .f .v{min-width:0;overflow-wrap:anywhere}
.fieldgrid .f .v.empty{color:var(--ink-3)}

/* --- Buttons, restyled to the brand ------------------------------------ */
/* No white buttons (#536). Allison, 20 November 2026: "no buttons should be
   white - they are too hard to see - they either need to be light blue or dark
   blue". So every button is light blue — the brand's accent wash and ink —
   unless it is .btn-primary, the dark brand blue, which every Save is. */
.btn{border:1px solid color-mix(in oklab,var(--accent) 45%,var(--rule));background:var(--accent-wash);color:var(--accent-ink);padding:6px 12px;
  border-radius:8px;font-size:13.5px;font-weight:600;cursor:pointer;white-space:nowrap;text-decoration:none;
  display:inline-flex;align-items:center;gap:6px}
.btn:hover{border-color:var(--accent);color:var(--accent-ink)}
.btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-dark);border-color:var(--brand-dark);color:#fff}
:root[data-theme="dark"] .btn-primary{color:#0B1218}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .btn-primary{color:#0B1218}}
/* A destructive button keeps its red text on the light blue, after .btn so it wins. */
.btn-danger{border-color:color-mix(in oklab,var(--deficit) 50%,var(--rule));color:var(--deficit)}
.btn-danger:hover{border-color:var(--deficit);color:var(--deficit)}

/* --- Segmented control, brand blue ------------------------------------- */
.seg{background:var(--surface-2);border:1px solid var(--rule)}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--brand-dark);box-shadow:0 1px 2px rgba(43,43,43,.10)}

/* --- Narrow screens ------------------------------------------------------ */
/* The section menu opens from the rail and closes with its × (#184). Closed,
   only the rail shows and the page takes the width. Wide screens only: on a
   phone the menu is already a strip of chips above the page. */
.side-close{margin-left:auto}
.side-head .add + .side-close{margin-left:4px}
.side-close button{width:26px;height:26px;border-radius:7px;border:1px solid var(--rule-strong);
  background:var(--surface);color:var(--ink-2);cursor:pointer;font-size:16px;line-height:1}
.side-close button:hover{border-color:var(--brand-2);color:var(--brand-2)}
@media (min-width:861px){
  body.menu-closed .side{display:none}
  body.menu-closed .main{margin-left:var(--rail-w)}
}
@media (max-width:860px){ .side-close, .rail .menu-open{display:none} body.menu-closed .side{display:flex} }
@media (max-width:1100px){
  :root{--side-w:214px}
}
@media (max-width:860px){
  body{display:block}
  .rail{position:static;flex-direction:row;width:auto;inset:auto;border-right:0;border-bottom:1px solid var(--rule);
    overflow-x:auto;padding:6px 8px;gap:4px;align-items:center}
  .rail .mark{margin:0 6px 0 0;width:26px}
  .rail a{flex-direction:row;width:auto;gap:6px;font-size:12.5px;padding:7px 10px}
  .rail .spacer{display:none}
  .rail .count{position:static;margin-left:2px}
  /* On a phone the sidebar becomes one scrolling strip of chips rather than
     a screen-height list that pushes the content out of sight. Everything in
     it is still reachable; it just lies down. */
  .side{position:static;width:auto;inset:auto;border-right:0;border-bottom:1px solid var(--rule)}
  .side-head{display:none}
  .side-body{display:flex;gap:6px;overflow-x:auto;padding:8px 14px;align-items:center}
  .side-group{margin:0;padding:0 2px 0 8px;white-space:nowrap;align-self:center;
    border-left:1px solid var(--rule)}
  .side-group:first-child{border-left:0;padding-left:0}
  .side a.item{padding:5px 10px;border:1px solid var(--rule-strong);border-radius:999px;white-space:nowrap}
  .side a.item[aria-current="page"]{border-color:color-mix(in oklab,var(--brand) 40%,transparent)}
  .side-foot{border-top:0;border-bottom:1px solid var(--rule);padding:8px 14px}
  .main{margin-left:0}
  .slide{width:100%;inset:auto 0 0 0;height:88%;border-left:0;border-top:1px solid var(--rule);border-radius:14px 14px 0 0}
  .wrap{padding-inline:14px}
  .crumbbar,.viewtabs,.toolbar{padding-inline:14px}
  .searchbox{min-width:0;flex:1 1 140px}
}

/* --- Sign in ------------------------------------------------------------ */
.signin{max-width:404px;margin:8vh auto;background:var(--surface);border:1px solid var(--rule);
  border-radius:16px;padding:30px 28px;box-shadow:var(--shadow);text-align:left}
.signin .logo{display:block;width:222px;height:auto;margin:0 0 18px}
.signin h1{font-family:var(--font-display);font-weight:800;font-size:25px;margin:0 0 4px;letter-spacing:-.015em}
.signin p{color:var(--ink-2);font-size:13.5px;margin:0 0 20px}
:root[data-theme="dark"] .signin .logo{filter:brightness(1.6)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .signin .logo{filter:brightness(1.6)}}

/* Every inline icon is 24×24 and stroke-based; without a default size an SVG
   with no width attribute fills its container, which is a startling bug. */
svg{width:1em;height:1em;stroke:currentColor;fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.searchbox svg{width:15px;height:15px;color:var(--ink-3)}
.side-foot .btn{padding:6px 8px}
.side-foot .btn svg{width:15px;height:15px}
.grouphead .caret svg{width:14px;height:14px}
.prio svg{fill:currentColor;stroke:none;width:13px;height:13px}
.st svg,.pill svg{width:12px;height:12px}

/* Avatars in the capacity grid's row stub, the way ClickUp puts a face on
   every row. The text column shrinks so a long name still truncates. */
.stubrow{display:flex;align-items:center;gap:8px;min-width:0}
.stubtext{min-width:0}
.stub .pname{max-width:none}
.stub .prole{max-width:none}
.flag{background:var(--surface-3);color:var(--ink-2);border-color:var(--rule)}

/* Pages that keep their filter row inline get the toolbar's look, so the
   furniture is in the same visual language wherever it sits. */
.controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 14px}
.controls .cap,.toolbar .cap{font-size:12px;letter-spacing:.09em;text-transform:uppercase;
  color:var(--ink-3);font-weight:700}
.controls select,.controls input[type=search],.controls input[type=text],
.toolbar select,.toolbar input[type=search]{border:1px solid var(--rule-strong);background:var(--surface);
  border-radius:8px;padding:5px 10px;font-size:13px}
.btn-sm{padding:4px 9px;font-size:12.5px;border-radius:7px}

/* Data tables, closer to ClickUp's list view: quieter rules, a hover row,
   and a sticky header so a long list keeps its column names. */
.tbl-box{border-radius:12px;border-color:var(--rule)}
table.dt th{background:var(--surface);position:sticky;top:0;z-index:2;
  border-bottom:1px solid var(--rule-strong);font-size:12px;letter-spacing:.08em;color:var(--ink-3)}
table.dt td{border-bottom:1px solid var(--rule);font-size:13.5px}
table.dt tbody tr:hover td{background:var(--brand-wash)}
table.dt td b,table.dt td a.plain b{font-weight:700}

/* Pills, in the brand rather than the old mustard. */
.pill{border-radius:6px;font-size:12px;letter-spacing:.03em}
.pill.pp{color:var(--brand-2);border-color:color-mix(in oklab,var(--brand) 40%,var(--rule));background:var(--brand-wash)}
.pill.sa{color:var(--violet);border-color:color-mix(in oklab,var(--violet) 40%,var(--rule))}
.pill.ok{color:var(--st-done);border-color:color-mix(in oklab,var(--st-done) 40%,var(--rule));background:var(--st-done-bg)}
.pill.bad{color:var(--deficit);border-color:color-mix(in oklab,var(--deficit) 40%,var(--rule));background:var(--st-blocked-bg)}

/* Cards and panels, squared up to ClickUp's flatter surfaces. */
.card,.panel{border-radius:12px;border-color:var(--rule)}
.panel>h3{font-family:var(--font-display);font-weight:800;font-size:15px;background:var(--surface-2)}
.card h3{font-family:var(--font-display);font-weight:800;font-size:16px}
.tiles{border-radius:12px;border-color:var(--rule);background:var(--rule)}
.tile .v{font-family:var(--font-num);letter-spacing:-.02em}
dl.facts{border-radius:12px;border-color:var(--rule)}
.banner{border-radius:12px}
.msg{border-radius:10px}

/* A task page, the shape ClickUp draws one: title, a grid of fields, then
   the detail beneath. */
.tasktitle{font-family:var(--font-display);font-weight:800;font-size:26px;margin:0;letter-spacing:-.02em;text-wrap:balance}
.fieldgrid .f .v.num{font-family:var(--font-num);font-variant-numeric:tabular-nums}
.item .cl.who-cell{gap:6px}

/* A grouped, collapsible work list — ClickUp's list view, which is how the
   team already reads a folder of jobs. */
.worklist{margin:0 0 6px}
.worklist>.grouphead{padding:8px 2px}
.worklist .tbl-box{border:1px solid var(--rule);margin-bottom:4px}
.worklist table.dt th{font-size:11px}

/* A photo avatar sits in the same circle as an initials one, so a row with a
   mix of the two still lines up. */
img.av{object-fit:cover;display:inline-block}
.avpick{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:4px 0 2px}
.avpick label{position:relative;cursor:pointer;display:grid;place-items:center;
  width:30px;height:30px;border-radius:999px}
.avpick input{position:absolute;opacity:0;width:0;height:0}
.avpick label:hover{box-shadow:0 0 0 2px var(--rule-strong)}
.avpick input:checked+.av{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--brand)}
.avpick input:focus-visible+.av{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--brand-2)}
.avpick .auto{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  color:var(--ink-3);border:1.5px dashed var(--rule-strong);background:transparent}
.avcurrent{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.avcurrent .av{width:52px;height:52px;font-size:17px}
.avcurrent img.av{width:52px;height:52px}

/* --- Roles ------------------------------------------------------------- */
.permgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:10px}
.perm{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--rule);
  border-radius:10px;cursor:pointer;background:var(--surface)}
.perm:hover{border-color:var(--brand-2)}
.perm input{margin-top:2px;width:auto;flex:0 0 auto}
.perm:has(input:checked){border-color:color-mix(in oklab,var(--brand) 45%,transparent);background:var(--brand-wash)}
.perm b{display:block;font-size:13.5px;font-weight:700}
.perm small{display:block;font-size:12.5px;color:var(--ink-2);margin-top:2px;line-height:1.4}
td .yes{color:var(--st-done);display:inline-grid;place-items:center}
td .yes svg{width:15px;height:15px;stroke-width:2.6}
td .no{color:var(--ink-3)}

/* --- Expanding a planner category into its clients ---------------------- */
/* The rows ship with the page and are shown or hidden here, so a category
   cannot half-open and the grid never reflows while somebody is reading it. */
/* A deliverables list's period line, which opens to its roles (#387): the same caret as the grid's. */
table.dt tr.period-line { cursor: pointer; }
table.dt tr.period-line .caret { display: inline-flex; width: 14px; margin-right: 4px; vertical-align: -2px; color: var(--ink-3); transition: transform .12s ease; }
table.dt tr.period-line .caret svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
table.dt tr.period-line.open .caret { transform: rotate(90deg); }
table.dt tr.period-line:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
table.dt tr.child td:first-child { padding-left: 26px; }
.grid tr.expandable { cursor: pointer; }
.grid tr.expandable .caret { transition: transform .12s ease; display: inline-flex; margin-right: 4px; }
.grid tr.expandable.open .caret { transform: rotate(90deg); }
.grid tr.expandable:hover .pname { color: var(--brand); }
.grid tr.expandable:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.grid tr.child .stub { padding-left: 26px; }
.grid tr.child .pname { font-weight: 400; color: var(--ink-2); }
.grid tr.child .cellbtn { opacity: .85; }
button.linkish {
  background: none; border: 0; padding: 0 0 0 10px; font: inherit;
  color: var(--brand); cursor: pointer; text-decoration: underline;
}
/* --- A grid cell that opens the month rather than navigating -------------- */
/* On a row that expands, every cell is part of the button. The affordance has
   to survive a dark heat-map background, so it is an underline on hover rather
   than a colour change. */
.grid tr.expandable .cellbtn.opens { cursor: pointer; }
.grid tr.expandable:hover .cellbtn.opens { text-decoration: underline; text-underline-offset: 3px; }
.grid tr.expandable:hover .stub .pname { color: var(--brand); }
.grid tr.child .stub .pname { font-weight: 400; color: var(--ink-2); padding-left: 22px; }
/* A role heading inside a type of work is a heading, one step in; the clients
   beneath it one step further (#386). */
.grid tr.expandable.child .stub .pname { font-weight: 600; color: inherit; padding-left: 0; }
.grid tr.expandable.child:hover .stub .pname { color: var(--brand); }
.grid tr.expandable.child .cellbtn { opacity: 1; }
.grid tr.child.grand .stub { padding-left: 48px; }
/* --- Two panels down the page rather than across it ---------------------- */
/* Used where the panels have different shapes or very different row counts,
   so putting them side by side squeezes both into half a column for no gain. */
.stacked { display: flex; flex-direction: column; gap: 16px; }
.stacked > .panel { width: 100%; }

/* --- A dialog that sets a whole service line at once ---------------------- */
dialog.sheet {
  border: 0; border-radius: 10px; padding: 20px; max-width: 560px; width: calc(100% - 32px);
  box-shadow: 0 16px 48px rgba(0,0,0,.22); color: var(--ink); background: var(--surface);
}
dialog.sheet::backdrop { background: rgba(20,28,36,.42); }
dialog.sheet h3 { color: var(--brand); }

/* --- The permission matrix ----------------------------------------------- */
/* Headers read across rather than down. Vertical text needed 150px of height
   and still overflowed its line; horizontal needs a narrow column and a
   wrapped label, which is both shorter and readable at a glance. */
table.dt th.permhead {
  writing-mode: horizontal-tb;
  vertical-align: bottom;
  text-align: center;
  padding: 10px 6px;
  font-size:12px;
  line-height: 1.25;
  letter-spacing: .01em;
  text-transform: none;
  min-width: 88px;
  max-width: 104px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* --- Sections that roll up ------------------------------------------------ */
/* A page of stacked panels is easier to scan than panels side by side, and
   easier still when the ones nobody touches are shut. The blurb stays visible
   when the fold is closed, so a rolled-up page still says what is in it. */
details.fold { padding: 0; }
details.fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid transparent;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before {
  content: "›"; font-size:17px; line-height: 1; color: var(--ink-3);
  transition: transform .12s ease; display: inline-block; transform: translateY(1px);
}
details.fold[open] > summary::before { transform: rotate(90deg) translateX(1px); }
details.fold[open] > summary { border-bottom-color: var(--rule); }
details.fold > summary:hover .ftitle { color: var(--brand); }
details.fold .ftitle { font-weight: 600; font-size:13.5px; color: var(--ink); }
details.fold .fblurb { font-size:12.5px; color: var(--ink-3); }
details.fold > .inner { padding-top: 14px; }
@media (max-width: 720px) { details.fold .fblurb { display: none; } }

/* Past deliverables on a client (#508): an engagement header, its years under
   it, each year opening to months and each month to its staff. The arrow is
   the fold's, so a rolled-up list reads the same everywhere. */
.past-eng + .past-eng { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.past-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
details.past > summary { list-style: none; cursor: pointer; padding: 5px 0; }
details.past > summary::-webkit-details-marker { display: none; }
details.past > summary::before {
  content: "›"; display: inline-block; width: 14px; color: var(--ink-3);
  transition: transform .12s ease;
}
details.past[open] > summary::before { transform: rotate(90deg); }
details.past > summary:hover b { color: var(--brand); }
details.past-year { margin-left: 4px; }
details.past-month { margin-left: 18px; }
details.past-month > table { margin: 4px 0 8px 14px; }

/* --- The time-off calendar ------------------------------------------------
   A month at a glance. Approved time is solid; a request still waiting is
   outlined, because only approved time changes what the firm plans on and the
   two should never read the same. */
table.cal{width:100%;border-collapse:collapse;margin-top:12px;table-layout:fixed}
table.cal th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--ink-3);
  text-align:left;padding:6px 8px;border-bottom:1px solid var(--rule);font-weight:600}
table.cal th.we{color:var(--ink-4, var(--ink-3));opacity:.7}
table.cal td{border:1px solid var(--rule);vertical-align:top;height:86px;padding:5px 6px;
  background:var(--surface)}
table.cal td.out{opacity:.35}
table.cal td.we{background:color-mix(in oklab,var(--rule) 22%,var(--surface))}
table.cal td.today{box-shadow:inset 0 0 0 2px color-mix(in oklab,var(--accent, #3b82f6) 55%,transparent)}
/* Past the end of the statutory holiday list the app cannot say which days are
   working days, so the calendar says so rather than guessing. */
table.cal td.beyond{background:repeating-linear-gradient(135deg,
  var(--surface), var(--surface) 6px,
  color-mix(in oklab,var(--rule) 40%,var(--surface)) 6px,
  color-mix(in oklab,var(--rule) 40%,var(--surface)) 12px)}
table.cal .dnum{font-size:12.5px;color:var(--ink-3);margin-bottom:3px}
table.cal .tag{font-size:12px;border-radius:5px;padding:2px 5px;margin-bottom:3px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Approved is the brand's green (--good). It was a fallback green from no
   token at all, so it was off-brand and never followed dark mode (#360). */
table.cal .tag.ok{background:color-mix(in oklab,var(--good) 20%,var(--surface));
  border:1px solid color-mix(in oklab,var(--good) 45%,var(--rule))}
table.cal .tag.pend{background:transparent;
  border:1px dashed color-mix(in oklab,var(--warn) 60%,var(--rule))}
table.cal .tag .hasnote{color:var(--ink-3);font-size:11px;margin-left:3px}
table.cal .tag.stat{background:color-mix(in oklab,var(--rule) 45%,var(--surface));
  color:var(--ink-2);border:1px solid var(--rule)}

/* --- Everyone's time off (#360) -------------------------------------------
   People down the side, days across. The same rule as the month calendar:
   approved is solid, waiting is outlined. A part day is a half-height band;
   any kind other than time off is violet, so cover planning sees who is out
   without the page saying why. A day with two or more off is tinted amber
   down its whole column. Scrolls sideways on a phone with the names fixed. */
.tofirm-box{max-width:100%}
table.tofirm{border-collapse:collapse;table-layout:fixed;font-size:12.5px}
table.tofirm th,table.tofirm td{border:1px solid var(--rule);padding:0;width:30px;min-width:30px;height:30px;
  text-align:center;vertical-align:middle;background:var(--surface)}
table.tofirm thead th{background:var(--surface-2);font-weight:600;color:var(--ink-3);height:auto;padding:4px 0;
  position:sticky;top:0;z-index:5}
table.tofirm thead th .wd{display:block;font-size:10.5px;text-transform:uppercase;letter-spacing:.04em}
table.tofirm thead th .dn{display:block;font-size:13px;color:var(--ink-2)}
table.tofirm thead th .many{display:block;font-size:10.5px;color:var(--ink);font-weight:700}
table.tofirm .who{position:sticky;left:0;z-index:6;width:170px;min-width:150px;text-align:left;padding:0 10px;
  background:var(--surface);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
table.tofirm thead .who{z-index:7;background:var(--surface-2)}
table.tofirm .we{background:color-mix(in oklab,var(--rule) 22%,var(--surface))}
table.tofirm td.stat{background:color-mix(in oklab,var(--rule) 45%,var(--surface))}
table.tofirm td.nd{background:color-mix(in oklab,var(--rule) 30%,var(--surface))}
table.tofirm th.crowded,table.tofirm td.crowded{background:color-mix(in oklab,var(--warn) 16%,var(--surface))}
table.tofirm th.today .dn{color:var(--brand);font-weight:700}
.band{display:inline-block;width:22px;height:18px;border-radius:4px;vertical-align:middle;
  background:color-mix(in oklab,var(--good) 55%,var(--surface));border:1px solid var(--good)}
.band.part{height:9px}
.band.away{background:color-mix(in oklab,var(--violet) 45%,var(--surface));border-color:var(--violet)}
.band.pend{background:transparent;border:1px dashed var(--warn)}
.band.key{width:16px;height:12px}.band.key.part{height:6px}
.band .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* A day somebody can book on. The grid used to be display-only, which read as
   broken to anybody who tried to click it. */
table.cal td.pick{cursor:pointer}
table.cal td.pick:hover{background:color-mix(in oklab,var(--accent,#3b82f6) 8%,var(--surface))}
table.cal td.pick:focus-visible{outline:2px solid var(--accent,#3b82f6);outline-offset:-2px}
table.cal td.chosen{background:color-mix(in oklab,var(--accent,#3b82f6) 18%,var(--surface))}
table.cal td.chosen .dnum{color:var(--ink);font-weight:600}

/* Choosing what sort of code you are adding. Jules, 20 September 2026: "the
   first question is what sort of code is this?" */
.tilegrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin:14px 0}
a.tile.pickable{display:flex;flex-direction:column;gap:5px;text-decoration:none;padding:14px;
  border:1px solid var(--rule);border-radius:10px;background:var(--surface);color:inherit}
a.tile.pickable:hover{border-color:color-mix(in oklab,var(--accent,#3b82f6) 45%,var(--rule))}
a.tile.pickable.on{border-color:var(--accent,#3b82f6);
  box-shadow:inset 0 0 0 1px color-mix(in oklab,var(--accent,#3b82f6) 45%,transparent)}
a.tile.pickable .k{font-weight:650;font-size:14px}
a.tile.pickable .blurb{font-size:12.5px;color:var(--ink-2);line-height:1.45}
a.tile.pickable .n{font-size:12px;color:var(--ink-3)}

/* A role on an engagement type, with the T-Sheets code it books to. The tick
   box and the code are one thing, so they are one control. */
.tickcodes{display:flex;flex-wrap:wrap;gap:6px}
.freqs{display:flex;flex-direction:column;gap:2px;font-size:12px}
.freqs label{display:flex;align-items:center;gap:5px;white-space:nowrap}
.freqs input{width:auto}
label.tickcode{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;
  border:1px solid var(--rule);border-radius:7px;padding:3px 7px;background:var(--surface)}
label.tickcode .rn{font-size:12.5px}
label.tickcode input[type=text]{width:62px;font-family:var(--font-num);font-size:12.5px;
  text-transform:uppercase;padding:1px 4px}
label.tickcode.nocode{border-color:color-mix(in oklab,var(--warn) 50%,var(--rule));
  background:color-mix(in oklab,var(--warn) 7%,var(--surface))}

/* --- Help -----------------------------------------------------------------
   The guides. Text has to stand on its own here: no screenshots, because a
   screenshot goes stale silently and cannot be searched. */
.guidelist{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px;margin:16px 0}
a.guide{display:flex;flex-direction:column;gap:4px;text-decoration:none;color:inherit;
  border:1px solid var(--rule);border-radius:10px;padding:14px 16px;background:var(--surface)}
/* display:flex above beats the browser's own [hidden] rule, so a search that
   hid a card left it on screen: "2 of 20 match" over twenty cards (#218). */
a.guide[hidden]{display:none}
/* Settings → Tags: fixed columns, every box the same width in every row. */
table.tagtable{table-layout:fixed;width:100%}
table.tagtable col.c-name{width:22%} table.tagtable col.c-for{width:16%}
table.tagtable col.c-means{width:28%} table.tagtable col.c-on{width:10%} table.tagtable col.c-act{width:24%}
table.tagtable td{vertical-align:top}
table.tagtable td input[type=text],table.tagtable td select{width:100%;box-sizing:border-box}
table.tagtable .row-actions select{width:auto;max-width:150px}
table.tagtable .lock{font-size:11.5px;color:var(--ink-3);margin-top:2px}
/* Settings → CRM fields (#261): fixed columns like Settings → Tags, so the
   rows line up however long a label or help text is. */
table.crmfieldtable{table-layout:fixed;width:100%}
table.crmfieldtable col.c-label{width:26%} table.crmfieldtable col.c-type{width:14%}
table.crmfieldtable col.c-req{width:10%} table.crmfieldtable col.c-order{width:8%}
table.crmfieldtable col.c-help{width:22%} table.crmfieldtable col.c-on{width:9%} table.crmfieldtable col.c-act{width:11%}
table.crmfieldtable td.err input,table.crmfieldtable td.err select{border-color:var(--deficit)}
table.crmfieldtable .errmsg{font-size:12px;color:var(--deficit);margin-top:2px}
table.crmfieldtable td{vertical-align:top}
table.crmfieldtable td input[type=text],table.crmfieldtable td input[type=number],table.crmfieldtable td select{width:100%;box-sizing:border-box}
table.crmfieldtable .choices-row input[type=text]{width:220px}
/* The record's own fields and their lists (#452). */
table.owntable .lock{font-size:11.5px;color:var(--ink-3)}
table.owntable textarea{width:100%;box-sizing:border-box;font:inherit;font-size:12.5px;resize:vertical}
details.choicelist{border:1px solid var(--rule);border-radius:6px;padding:8px 10px}
details.choicelist > summary{cursor:pointer;font-size:13px}
details.choicelist > summary .muted{font-size:12.5px}
table.crmfieldtable .choices-row input[type=number]{width:70px}
table.crmfieldtable .lock{font-size:11.5px;color:var(--ink-3);margin-top:2px}
/* Settings → Where clients come from (#260): the Tags table's shape, its own column widths. */
table.srctable col.c-name{width:40%} table.srctable col.c-order{width:10%} table.srctable col.c-for{width:18%}
table.srctable col.c-on{width:12%} table.srctable col.c-act{width:20%}
table.srctable td input[type=number]{width:70px}
table.srctable td.err input{border-color:var(--deficit)}
table.srctable .errmsg{font-size:12px;color:var(--deficit);margin-top:2px}
/* Hover (or tab to) a tag's count for who carries it. No script: :hover and :focus-within. */
.whohas{position:relative;cursor:default;border-bottom:1px dotted var(--rule-strong)}
.whohas-list{display:none;position:absolute;right:0;top:100%;z-index:20;min-width:260px;max-height:280px;overflow:auto;
  text-align:left;font-family:var(--font-ui);font-size:13px;background:var(--surface);border:1px solid var(--rule-strong);
  border-radius:8px;box-shadow:var(--shadow-pop);padding:6px 0}
.whohas-list a{display:block;padding:4px 12px;color:var(--ink);text-decoration:none;white-space:nowrap}
.whohas-list a:hover{background:var(--surface-2)}
.whohas:hover .whohas-list,.whohas:focus-within .whohas-list{display:block}
a.guide:hover{border-color:color-mix(in oklab,var(--accent,#3b82f6) 45%,var(--rule))}
a.guide .gt{font-weight:650;font-size:14.5px}
a.guide .gd{font-size:13px;color:var(--ink-2);line-height:1.5}
a.guide .gm{font-size:12px;color:var(--ink-3);margin-top:2px}
a.guide .gw{font-size:12.5px;color:var(--ink-3);font-style:italic;margin-top:4px}

.guidepage{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:32px;align-items:start}
@media (max-width:900px){.guidepage{grid-template-columns:1fr}.guidetoc{display:none}}
.guidetoc{position:sticky;top:16px;border-left:1px solid var(--rule);padding-left:14px}
.guidetoc ul{list-style:none;margin:6px 0 0;padding:0}
.guidetoc li{margin:5px 0;font-size:13px;line-height:1.4}
.guidetoc a{color:var(--ink-2);text-decoration:none}
.guidetoc a:hover{color:var(--ink);text-decoration:underline}
.guidetoc ul ul{padding-left:12px}

/* No max-width: a guide runs the width of the main column like every other
   page (#251), with "On this page" kept at the right on a wide screen. */
.prose{min-width:0;font-size:14.5px;line-height:1.65;overflow-wrap:anywhere}
/* A wide table scrolls inside itself on a phone rather than the page. */
@media (max-width:900px){.prose table{display:block;overflow-x:auto}}
.prose h1{font-size:25px;margin:0 0 6px;letter-spacing:-.01em}
.prose h2{font-size:18px;margin:30px 0 8px;padding-top:14px;border-top:1px solid var(--rule)}
.prose h3{font-size:15px;margin:22px 0 6px}
.prose p{margin:11px 0}
.prose ul,.prose ol{margin:11px 0;padding-left:22px}
.prose li{margin:5px 0}
.prose code{font-family:var(--font-num);font-size:13px;background:var(--surface-3);
  padding:1px 5px;border-radius:4px}
.prose pre{background:var(--surface-3);padding:12px 14px;border-radius:8px;overflow-x:auto}
.prose pre code{background:none;padding:0}
.prose table{border-collapse:collapse;margin:14px 0;width:100%}
.prose th,.prose td{border:1px solid var(--rule);padding:7px 10px;text-align:left;font-size:13.5px}
.prose th{background:var(--surface-3);font-weight:650}
.prose blockquote{margin:14px 0;padding:10px 14px;border-left:3px solid var(--rule);
  background:var(--surface-3);border-radius:0 8px 8px 0}
.prose blockquote p{margin:4px 0}
.prose a{color:var(--accent,#3b82f6)}

/* Somebody archived, still listed so they can be found and restored. Greyed
   rather than hidden: hiding them outright leaves no way back. */
tr.archived-row td{opacity:.55}
tr.archived-row td:first-child{opacity:1}
tr.archived-row td:first-child b{text-decoration:line-through;text-decoration-thickness:1px}

/* Committee members: a line of names rather than a checkbox each, so several
   committees fit on one screen. */
.members{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:10px;
  min-height:30px;padding:8px;border:1px solid var(--rule);border-radius:9px;background:var(--surface-2)}
.members .memberchip{display:inline-flex;align-items:center;gap:5px;font-size:13px;
  background:var(--surface);border:1px solid var(--rule);border-radius:999px;padding:3px 5px 3px 11px}
.members .memberchip .x{border:0;background:none;cursor:pointer;font-size:15px;line-height:1;
  color:var(--ink-3);padding:0 4px;border-radius:50%}
.members .memberchip .x:hover{color:var(--danger,#dc2626);background:var(--surface-3)}
.members .noneyet{font-size:13px;padding:2px 4px}
select.addwho{min-width:230px}

/* Filter bar and sortable headings on the staff list. */
.filterbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.filterbar select{min-width:150px}
.filterbar .searchbox{min-width:220px}
.filterbar label.inline{display:inline-flex;align-items:center;gap:6px;font-size:13px;
  white-space:nowrap}
a.sortcol{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:2px}
a.sortcol:hover{text-decoration:underline}
a.sortcol.on{color:var(--accent,#3b82f6);font-weight:700}

/* Surname cell: avatar, a link through to the person, then the editable name. */
td.namecell{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
td.namecell a.plain{display:inline-flex;opacity:.5}
td.namecell a.plain:hover{opacity:1}


/* A person's page: the name and its two actions on one line. Allison,
   30 September 2026: bigger, "and on the same level with the name". */
.namerow{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.namerow .tasktitle{margin:0}
.namerow .btn{font-size:14px;padding:9px 16px}

/* Planner notes on the number. A marker in the cell's corner: an empty ring when the cell has no
   note, filled when it has. Click it and the notes and a short form open in place. */
.cellnote{position:absolute;top:2px;right:2px;margin:0}
.cellnote>summary{list-style:none;cursor:pointer;display:block;width:9px;height:9px;border-radius:50%;border:1.5px solid var(--rule-strong);background:var(--surface);opacity:.55}
.cellnote>summary::-webkit-details-marker{display:none}
td.cell:hover .cellnote>summary,.cellnote[open]>summary{opacity:1;border-color:var(--brand)}
.cellnote.has>summary,.cellnote-dot{background:var(--brand);border-color:var(--brand);opacity:1}
/* The same filled dot on a cell you type into, whose notes are behind ⋯. */
.cellnote-dot{position:absolute;top:4px;right:4px;width:9px;height:9px;box-sizing:content-box;border-radius:50%;border:1.5px solid var(--brand);cursor:pointer}
.cellnote-pop{position:absolute;right:-2px;top:14px;z-index:30;width:min(38ch,calc(100vw - 48px));padding:10px 12px;border:2px solid var(--brand);border-radius:10px;background:var(--brand-wash);box-shadow:var(--shadow-pop);text-align:left;font-family:var(--font-ui);font-size:12.5px;line-height:1.4;color:var(--ink);font-weight:400}
.cellnote-pop p{margin:0 0 6px}
/* The cell a popup belongs to, while it is open (#214). */
td.cell.popping{outline:2px solid var(--brand);outline-offset:-2px}
.cellnote-where{color:var(--brand-dark)}
.cellnote-one{padding:4px 0;border-top:1px solid var(--rule-strong)}
.cellnote-pop textarea{width:100%;box-sizing:border-box;margin:6px 0;font:inherit;padding:6px;border:1px solid var(--rule-strong);border-radius:6px;background:var(--surface)}
tr.sub.total td.cell{border-left:0}

/* Planner hours filled from history (#213, #376): the same colours,
   in italics, so a person can see which numbers they have not set themselves. */
.hist, input.hist { font-style: italic; }

/* Where each planner client figure came from (predicted-hours design, 21
   October 2026; #370). Six staff said predicted hours looked like typed hours.
   The first version drew a 7px triangle in the cell's corner, and on 30
   October 2026 Allison found violet and green could not be told apart at that
   size: "can't the cell carry a colour". A client line's cell has no
   background meaning of its own, so now the whole cell is tinted, and the
   corner marks are gone — the tint says the same thing, larger.

   The tints are brand tokens mixed into the cell's own background, so the
   dark theme, which redefines every one of them, gets its own: hours from
   history violet (and still italic), a budget the brand blue, typed over the
   coral. Never a heat-map colour: the totals rows below read green as spare
   and amber to red as short, and a green "budget" would read as spare. The
   blue is strong enough to stand apart from the tinted planner's pale blue
   client rows, which these override for that one cell. Ink on every tint is
   at least 8.9:1 in both themes.

   An estimated budget is not tinted (it is most of the planner, and a tint
   would bury the sourced figures) and must read without colour: a dotted
   underline and a ~ at the cell's left edge, where Excel's accounting format
   puts the $. A due month with an estimated nought shows ? instead and needs
   neither. Typed is the default and stays plain. These sit alongside .b0 and
   never change it: the heat map's colours are untouched. The key under
   Client work draws its chips from the same rules, so it cannot drift. */
table.grid td.cell.src-history,table.grid.tinted tbody.sec-client tr.rowl td.cell.src-history,
.srcchip.src-history .srcswatch{background:color-mix(in oklab,var(--violet) 24%,var(--cell-bg))}
table.grid td.cell.src-budget,table.grid.tinted tbody.sec-client tr.rowl td.cell.src-budget,
.srcchip.src-budget .srcswatch{background:color-mix(in oklab,var(--brand) 30%,var(--cell-bg))}
table.grid td.cell.src-over,table.grid.tinted tbody.sec-client tr.rowl td.cell.src-over,
.srcchip.src-over .srcswatch{background:color-mix(in oklab,var(--coral) 30%,var(--cell-bg))}
td.cell.src-history input.cellin,td.cell.src-history .cellbtn,.srcchip.src-history .srcswatch{font-style:italic}
td.cell.src-estimated input.cellin,td.cell.src-estimated .cellbtn,.srcchip.src-estimated .srcswatch{text-decoration:underline dotted var(--warn);text-decoration-thickness:1.5px;text-underline-offset:3px}
td.cell.src-estimated::after{content:"~";position:absolute;left:4px;top:50%;transform:translateY(-50%);font-family:var(--font-num);font-size:13.5px;font-weight:600;line-height:1;color:var(--ink-2);pointer-events:none}
.srcchip.src-estimated .srcswatch::before{content:"~";font-weight:600;color:var(--ink-2)}
.srckey{display:inline-flex;flex-wrap:wrap;gap:4px 6px;align-items:center;margin-left:10px;vertical-align:middle;text-transform:none;letter-spacing:0;font-weight:400;font-size:11.5px;color:var(--ink-2)}
.srcchip{display:inline-flex;align-items:center;gap:5px;padding:0 7px 0 0;border:1px solid var(--rule-strong);border-radius:6px;background:var(--surface);white-space:nowrap;overflow:hidden}
.srcswatch{position:relative;display:inline-block;min-width:34px;padding:1px 6px;border-right:1px solid var(--rule);background:var(--cell-bg);color:var(--ink);font-family:var(--font-num);font-variant-numeric:tabular-nums;text-align:right}
.srcchip-hint{color:var(--ink-3)}
/* The ⋯ popup's line saying where the figure came from. */
#cellpop .popsrc{font-style:italic}

/* A planner cell you can change is a number box you type into. Allison,
   3 October 2026: "allow the editing to be done right in the cells". It reads
   like the figures around it until it is pointed at or typed in; ⋯ in its
   corner opens the shared popup for notes, moving and clearing (#214). */
.cellform{margin:0}
input.cellin{display:block;width:100%;min-width:0;box-sizing:border-box;min-height:42px;margin:0;border:0;border-radius:0;background:transparent;padding:7px 9px;text-align:right;font-family:var(--font-num);font-variant-numeric:tabular-nums;font-size:13.5px;font-weight:500;color:var(--ink);-moz-appearance:textfield;appearance:textfield}
input.cellin::-webkit-outer-spin-button,input.cellin::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
input.cellin::placeholder{color:var(--ink-3);opacity:1;font-family:var(--font-ui);font-size:12px;text-align:center}
input.cellin:hover{box-shadow:inset 0 0 0 1px var(--rule-strong);cursor:text}
input.cellin:focus{outline:none;box-shadow:inset 0 0 0 2px var(--brand);background:var(--surface)}
input.cellin:focus::placeholder{color:transparent}
td.cell.saving input.cellin{color:var(--ink-3)}
/* Saved: a tick in the corner for a moment. Refused: the field error's red
   edge, and the reason beneath the cell. */
td.cell.saved::before{content:"✓";position:absolute;left:4px;top:2px;font-family:var(--font-ui);font-size:11px;font-weight:700;color:var(--good);pointer-events:none}
td.cell.err input.cellin{box-shadow:inset 0 0 0 2px var(--deficit)}
.cellerr{position:absolute;z-index:31;right:0;top:100%;width:max-content;max-width:min(34ch,calc(100vw - 48px));padding:6px 8px;border:1.5px solid var(--deficit);border-radius:6px;background:var(--surface);color:var(--deficit);font-family:var(--font-ui);font-size:12px;font-weight:500;line-height:1.35;text-align:left;white-space:normal;box-shadow:var(--shadow-pop)}
a.cellmore{position:absolute;top:0;right:1px;padding:0 3px;border-radius:4px;font-family:var(--font-ui);font-size:13px;line-height:1.1;font-weight:700;letter-spacing:0;color:var(--ink-3);text-decoration:none;opacity:0}
td.cell:hover a.cellmore,td.cell:focus-within a.cellmore,td.cell.popping a.cellmore{opacity:1}
a.cellmore:hover,a.cellmore:focus{background:var(--brand-wash);color:var(--brand-dark);text-decoration:none;opacity:1}
/* With notes, the dot has the corner and ⋯ sits beside it. */
a.cellmore.has{right:16px}
/* The note card: a cell's notes, newest first, beside the cell while the
   pointer is over it — the app's own card rather than the browser's title
   tooltip, which floated away from the cell (Allison, 3 October 2026: "when I
   hover I can't read the note"). */
#notecard{right:auto;left:0;top:0;pointer-events:none;z-index:40}
/* The same dot on the capacity grid and the no-owner page, where it is only a
   mark — no popup sits behind it, so a click goes through to the cell. On a
   heat-map colour it keeps a white ring so it reads on the darkest cells; the
   heat-map's own colours are untouched. */
.cellnote-dot.passive{pointer-events:none;box-shadow:0 0 0 1.5px var(--surface)}
#notecard .cellnote-one:first-child{border-top:0;padding-top:0}
#cellpop{position:absolute;right:auto;top:0;left:0}
#cellpop .popform{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}
#cellpop .popform input[type=number]{width:70px}
#cellpop .popform select{max-width:160px}
#cellpop .popsection{border-top:1px solid var(--rule-strong);padding-top:6px;margin-top:4px}
#cellpop .popsection>p{margin:0}
#cellpop [hidden]{display:none}


/* --- WIP dashboard (#329) ------------------------------------------------
   Ported from WIP-Report's static/dashboard.css and recoloured with this
   file's tokens only. The --hm-* heat-map tokens are deliberately not used.
   The charts are inline SVG drawn on the server; the svg{} icon rule above
   would draw them 1em wide with invisible text, so each rule here sets its
   own size, fill and stroke. */
.wip-dash-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(380px,100%),1fr));gap:0 16px;align-items:start}
table.dt.wip-compact{min-width:0}
table.dt td.wip-strong{font-weight:600}
.wip-exceptions ul{list-style:none;margin:0;padding:0}
.wip-exceptions li{display:grid;grid-template-columns:3.2em 1fr;gap:10px;align-items:baseline;padding:8px 0 8px 10px;border-bottom:1px solid var(--rule);box-shadow:inset 3px 0 var(--rule);font-size:13.5px}
.wip-exceptions li:last-child{border-bottom:0}
.wip-exceptions .n{font-family:var(--font-num);font-size:18px;font-weight:600;text-align:right;font-variant-numeric:tabular-nums}
.wip-exceptions li.bad{box-shadow:inset 3px 0 var(--deficit)}
.wip-exceptions li.bad .n{color:var(--deficit)}
.wip-exceptions li.warn{box-shadow:inset 3px 0 var(--warn)}
.wip-exceptions li.warn .n{color:var(--warn)}
.wip-exceptions li.good .n,.wip-exceptions li.unknown .n{color:var(--ink-3)}
.wip-chart{margin:0;overflow-x:auto}
svg.wip-chart-svg{width:100%;min-width:460px;height:auto;display:block;fill:none;stroke:none;flex:none}
.wip-chart-svg text{font-family:var(--font-ui);font-size:12px;fill:var(--ink-3);stroke:none;font-variant-numeric:tabular-nums}
.wip-chart-svg .value-label,.wip-chart-svg .end-label{fill:var(--ink);font-weight:600}
.wip-chart-svg .end-label .end-name{fill:var(--ink-3);font-weight:400}
.wip-chart-svg .cat-label{fill:var(--ink)}
.wip-chart-svg line.tick{stroke:var(--rule);stroke-width:1}
.wip-chart-svg line.zero{stroke:var(--rule-strong);stroke-width:1.5}
.wip-chart-svg .series path{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.wip-chart-svg .series circle{stroke:var(--surface);stroke-width:2}
.wip-chart-svg .series.ending path{stroke:var(--brand)}
.wip-chart-svg .series.ending circle{fill:var(--brand)}
.wip-chart-svg .series.opening path{stroke:var(--ink-3);stroke-dasharray:5 4}
.wip-chart-svg .series.opening circle{fill:var(--ink-3)}
.wip-chart-svg .bar rect{fill:var(--brand);stroke:none}
.wip-chart-svg .bar.negative rect{fill:var(--coral)}
.wip-chart-svg .bar.unallocated rect{fill:var(--st-todo)}
.wip-legend{display:flex;gap:16px;font-size:13px;color:var(--ink-3);margin:4px 0 8px}
.wip-legend .key{display:inline-flex;align-items:center;gap:6px}
.wip-legend svg{width:26px;height:12px;fill:none}
.wip-legend .key line{stroke-width:2}
.wip-legend .key.ending line{stroke:var(--brand)}
.wip-legend .key.ending circle{fill:var(--brand);stroke:none}
.wip-legend .key.opening line{stroke:var(--ink-3);stroke-dasharray:5 4}
.wip-legend .key.opening circle{fill:var(--ink-3);stroke:none}
.wip-trend{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:16px;align-items:start}
.wip-trend-table tr.current td{background:var(--brand-wash)}
.wip-groups-form input{width:100%}
.wip-groups-form input.codes{min-width:320px}
@media (max-width:700px){.wip-dash-grid,.wip-trend{grid-template-columns:1fr}.wip-groups-form input.codes{min-width:0}}
/* --- end WIP dashboard --------------------------------------------------- */

/* Your own colours on your planner lines (#359). The colour is the person's own choice, any #rrggbb
   (DECISIONS D59), so it is written inline from a validated value: a bar at the left of the line's name and a
   fill mixed with the surface on a month's cell, which reads in light and dark. Drawn only into the
   owner's own planner. The heat map is untouched. */
.lcdot{display:inline-block;width:10px;height:10px;border-radius:3px;vertical-align:-1px}
.colourrow .swatches{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:4px 0}
.colourrow .swatch{width:22px;height:22px;border-radius:50%;border:2px solid var(--surface);box-shadow:0 0 0 1px var(--rule-strong);cursor:pointer;padding:0}
.colourrow .swatch:hover,.colourrow .swatch:focus-visible{box-shadow:0 0 0 2px var(--ink-3)}
.colourrow .swatch-none{width:auto;border-radius:11px;padding:0 8px;background:var(--surface);font-size:11.5px;color:var(--ink-3)}
.colourrow .swatchwords{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:11.5px;color:var(--ink-3)}
.colourrow .wholeline{display:flex;gap:6px;align-items:center;font-weight:normal;margin-top:6px}
.colourrow details.colouredit{margin-top:6px}
.colourrow details.colouredit summary{cursor:pointer;color:var(--ink-3);font-size:12px}
.colourrow .favrow{display:flex;gap:6px;align-items:center;margin:4px 0}
.colourrow .favrow input[type=color]{width:34px;height:26px;padding:0;border:1px solid var(--rule-strong);background:none}
.colourrow .favrow input[type=text]{flex:1;min-width:0}
.colourrow .favrow label{font-weight:normal;font-size:12px;display:flex;gap:3px;align-items:center}

/* The planner's sections, tinted and outlined so a long expanded planner reads
   at a glance (#217). Jules, 1 October 2026: "Do it, and if we say we don't
   like it, we turn it off" — Settings → Firm settings → Tint the planner. Only the
   planner's table carries .tinted; the capacity grid's heat map is untouched.
   Every colour starts as an existing token: time off the greys, client work
   the brand wash, non-chargeable the green wash, and a service line's total
   row a shade darker than its client rows. The firm can pick its own on
   Firm settings (core.tints); a picked colour arrives as a --pt-* property,
   in light mode only. */
.gridbox.tinted{border:2px solid var(--pt-outline,var(--brand-dark))}
table.grid.tinted tbody.sec-client{border-top:1px solid var(--pt-outline,var(--brand-dark))}
table.grid.tinted tr.toff td{background:var(--pt-time-off-total,var(--surface-3))}
table.grid.tinted tr.toff.child td{background:var(--pt-time-off-rows,var(--surface-2))}
/* A time-off cell waiting for approval or not yet submitted keeps its tint
   over the section's own (issue 258) — the tint is the signal Allison asked for. */
table.grid.tinted tr.toff td:has(.toff-wait){background:color-mix(in oklab,var(--warn) 22%,var(--surface))}
table.grid.tinted tr.toff td:has(.toff-draft){background:color-mix(in oklab,var(--deficit) 18%,var(--surface))}
table.grid.tinted tr.toff td.toil-waiting{background:color-mix(in oklab,var(--warn) 22%,var(--surface))}
table.grid.tinted tr.toff td.toil-draft{background:color-mix(in oklab,var(--deficit) 18%,var(--surface))}
table.grid.tinted tbody.sec-client tr.rowl td{background:var(--pt-client-rows,var(--brand-wash))}
table.grid.tinted tbody.sec-client tr.rowl.expandable td{background:var(--pt-client-total,color-mix(in oklab,var(--brand-wash),var(--brand) 14%))}
table.grid.tinted tbody.sec-internal tr.rowl td{background:var(--pt-internal-rows,var(--st-done-bg))}
table.grid.tinted tbody.sec-client tr.grp td,table.grid.tinted tbody.sec-internal tr.grp td{border-top:2px solid var(--pt-outline,var(--brand-dark))}
table.grid.tinted tr.rowl.charged td{background:var(--pt-charged,var(--surface-2))}

/* The reconcile rows under a closed month are a check on the plan, not part of
   it, so they stand apart: a gap below Over / under, then their own block with
   its own rule across the top (Allison, 2 October 2026: "Can you put a gap
   between the main table and the Reconciles to quickbooks time"). They stay in
   the same table so every figure keeps its month's column. */
table.grid tbody.sec-reconcile tr.gap td{height:22px;padding:0;background:var(--paper);border-top:1px solid var(--rule-strong);border-bottom:0}
table.grid tbody.sec-reconcile tr.gap:hover td{background:var(--paper)}
table.grid tbody.sec-reconcile tr.grp td{border-top:2px solid var(--rule-strong)}
table.grid.tinted tbody.sec-reconcile tr.grp td{border-top-color:var(--pt-outline,var(--brand-dark))}
table.grid.tinted tbody.sec-reconcile tr.rowl td{background:var(--surface-2)}

/* The planner's month arrows sit on the table's own header, beside the months
   they move (Allison, 2 October 2026), and the collapse and expand buttons
   sit beside the person's name at the top of the planner. */
.monthnav{display:inline-flex;gap:4px;align-items:center;text-transform:none;letter-spacing:0}
.monthnav .chip{padding:2px 8px}
.allbtns{display:inline-flex;gap:6px;margin-left:12px;vertical-align:middle}
.swatch{display:inline-block;width:18px;height:18px;border-radius:4px;border:1px solid var(--rule-strong);vertical-align:-4px}

/* The planner's messages, pinned to the top of the window (issue 257). A save there
   reloads and scrolls back to where the person was, so a message at the top
   of the page was off-screen and a refused save looked silent. The pin takes
   no height of its own, so nothing on the page moves when a message goes. */
.msgpin{position:sticky;top:52px;z-index:31;height:0}
.msgpin .msgstack{position:absolute;top:0;right:0;width:min(520px,100%);display:flex;flex-direction:column;gap:6px}
.msgpin .msg{margin:0;display:flex;align-items:flex-start;gap:10px;background:var(--surface);box-shadow:var(--shadow-pop);transition:opacity .4s ease}
.msgpin .msg.success{background:color-mix(in oklab,var(--good) 8%,var(--surface))}
.msgpin .msg.error{background:color-mix(in oklab,var(--deficit) 8%,var(--surface))}
.msgpin .msg.warning{background:color-mix(in oklab,var(--warn) 8%,var(--surface))}
.msgpin .msg.gone{opacity:0}
.msgpin .msgx{border:0;background:transparent;color:var(--ink-3);font-size:18px;line-height:1;padding:0 2px;cursor:pointer}
.msgpin .msgx:hover{color:var(--ink)}
.msgpin .msgtext{flex:1 1 auto;min-width:0}

/* --- WIP overview (issue 326) --- */
/* Compact on purpose: about 22 columns have to share one screen, so the table fills the
   width it is given instead of keeping the base table's 900px minimum, and the headings wrap. */
.wip-scroll{max-height:calc(100vh - 200px);overflow:auto}
table.dt.wip-table{font-size:12px;min-width:0;width:100%}
table.dt.wip-table th,table.dt.wip-table td{padding:2px 4px;white-space:nowrap}
table.dt.wip-table thead th{white-space:normal;vertical-align:bottom;line-height:1.15;font-size:10.5px;letter-spacing:.02em;padding:4px 4px}
table.dt.wip-table td{font-size:12px;text-align:right;font-family:var(--font-num);font-variant-numeric:tabular-nums;vertical-align:middle}
table.dt.wip-table .client{position:sticky;left:0;z-index:3;background:var(--surface);text-align:left;font-family:var(--font-ui);
  min-width:110px;max-width:170px;white-space:normal;box-shadow:inset -1px 0 var(--rule)}
table.dt.wip-table thead th.client{z-index:6}
table.dt.wip-table tbody th.client{font-weight:400;text-transform:none;letter-spacing:0;font-size:12px;color:var(--ink)}
table.dt.wip-table .client .row-form{display:inline}
table.dt.wip-table.js .row-save{display:none}
table.dt.wip-table .strong{font-weight:700}
table.dt.wip-table td input{width:62px;height:20px;text-align:right;padding:1px 3px;font-size:12px;border:1px solid var(--rule-strong);border-radius:5px;background:var(--surface)}
table.dt.wip-table td select{font-size:12px;height:20px;padding:0 2px}
table.dt.wip-table td.flag{text-align:center}
table.dt.wip-table td.note{min-width:130px;white-space:pre-line;text-align:left;font-family:var(--font-ui)}
table.dt.wip-table td.note textarea{width:100%;min-width:120px;height:22px;min-height:0;display:block;resize:vertical;font-size:12px;line-height:1.2;padding:1px 3px}
table.dt.wip-table td.note .last-note{display:block;max-width:240px;margin-top:2px;font-size:11px;line-height:1.25;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wip-last-note{white-space:pre-line}
.wip-last-note-box{margin:0 0 10px}
table.dt.wip-table tfoot th,table.dt.wip-table tfoot td{position:sticky;bottom:0;background:var(--surface-2);font-weight:700;box-shadow:inset 0 1px var(--rule-strong)}
table.dt.wip-table tfoot th.client{z-index:6}
table.dt.wip-table tr.check-off>th.client,table.dt.wip-table tr.check-off>td{background:color-mix(in oklab,var(--deficit) 8%,var(--surface))}
table.dt.wip-table tr.check-off>th.client{box-shadow:inset 3px 0 var(--deficit),inset -1px 0 var(--rule)}
.check-cell{color:var(--deficit);font-weight:700}
table.dt.wip-table tr.saving{opacity:.6}
table.dt.wip-table .invalid{border-color:var(--deficit);background:color-mix(in oklab,var(--deficit) 8%,var(--surface))}
.wip-status{min-height:1.4em;margin:4px 0;font-size:13px;color:var(--ink-3)}
.wip-status.err{color:var(--deficit)}
.wip-summary{margin:6px 0 0;font-size:13px}
/* Issue 332: the (PTX) suggestions on Client mapping can run to a hundred or more names */
.wip-checklist{max-height:320px;overflow:auto;columns:2 220px;font-size:13px}
.wip-checklist label{display:block;break-inside:avoid;padding:2px 0}
.wip-table tfoot tr.not-in-wip th,.wip-table tfoot tr.not-in-wip td{font-weight:400}
/* A client's page: cards side by side, as many as fit, each table fitting its card. */
.wip-client-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:12px;align-items:start}
.wip-client-grid>.card,.wip-client-grid>div>.card{margin-top:0}
.wip-client-grid>div{display:grid;gap:12px}
table.dt.wip-mini{min-width:0;font-size:12.5px}
table.dt.wip-mini th,table.dt.wip-mini td{padding:3px 8px}
table.dt.wip-mini th{position:static;white-space:normal}
table.dt.wip-mini tbody th,table.dt.wip-mini tfoot th{background:transparent;text-transform:none;letter-spacing:0;font-size:12.5px;font-weight:500;color:var(--ink-2)}
table.dt.wip-mini td.num{white-space:nowrap}
table.dt.wip-mini tr.check-off td,table.dt.wip-mini tr.check-off th{background:color-mix(in oklab,var(--deficit) 8%,var(--surface))}
table.dt.wip-mini tbody tr:hover td{background:transparent}
.wip-client-grid h4,.wip-time-card h4,.wip-history-card h4{margin:10px 0 4px;font-size:13px}
.wip-inputs{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px}
.wip-inputs label{display:flex;flex-direction:column;gap:2px;font-size:12px;color:var(--ink-3)}
.wip-inputs label.wide,.wip-inputs button{grid-column:1/-1}
.wip-inputs input,.wip-inputs select,.wip-inputs textarea{font-size:13px;padding:3px 6px}
.wip-inputs input{text-align:right}
.wip-history tr.current td{background:var(--brand-wash)}

/* --- WIP client summary for paper (issue 337): wip:client?print=1 ---------------------- */
/* Its own page with no rail or sidebar, always light (data-theme="light"), A4 or Letter. */
body.wip-print{background:var(--surface-2);color:var(--ink);font-family:var(--font-ui);margin:0}
.wip-print-bar{display:flex;gap:8px;justify-content:center;padding:12px}
.wip-print-page{max-width:760px;margin:0 auto 24px;padding:28px 32px;background:var(--paper);box-shadow:var(--shadow);font-size:12px}
.wip-print-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border-bottom:2px solid var(--brand);padding-bottom:10px;margin-bottom:12px}
.wip-print-head h1{font-family:var(--font-display);font-size:22px;margin:0 0 4px;color:var(--brand-dark)}
.wip-print-head p{margin:0;color:var(--ink-2)}
.wip-print-page h2{font-family:var(--font-display);font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--brand-dark);margin:14px 0 4px}
.wip-print-page section{break-inside:avoid}
.wip-print-cols{display:grid;grid-template-columns:1fr 1fr;gap:4px 24px;align-items:start}
.wip-print-table{border-collapse:collapse;width:100%}
.wip-print-table th,.wip-print-table td{padding:2px 6px;border-bottom:1px solid var(--rule);text-align:left;font-weight:400;vertical-align:top}
.wip-print-table td{text-align:right;font-family:var(--font-num);white-space:nowrap}
.wip-print-table thead th,.wip-print-table thead td{font-family:var(--font-ui);font-weight:600;color:var(--ink-3);font-size:11px}
.wip-print-table tr.sum th,.wip-print-table tr.sum td{font-weight:600;border-top:1px solid var(--rule-strong)}
.wip-print-table tr.off td{color:var(--deficit);font-weight:600}
.wip-print-table tr.current th,.wip-print-table tr.current td{background:var(--brand-wash)}
.wip-print-table.history th.note{white-space:pre-line;font-size:11px;color:var(--ink-2)}
.wip-print-note{white-space:pre-line;margin:0;padding:6px 8px;background:var(--surface-2);border-left:3px solid var(--brand)}
.wip-print-warn{padding:6px 8px;background:var(--coral-wash);border-left:3px solid var(--deficit)}
.wip-print-foot{margin-top:16px;padding-top:6px;border-top:1px solid var(--rule);color:var(--ink-3);font-size:10px}
@media print{
  @page{margin:12mm}
  body.wip-print{background:var(--paper)}
  .wip-print-bar{display:none}
  .wip-print-page{max-width:none;margin:0;padding:0;box-shadow:none}
  .wip-print-page *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
@media (max-width:640px){.wip-print-page{padding:16px}.wip-print-cols{grid-template-columns:1fr}}

/* Unmapped Xero names: one card per set of related names */
.ucard{margin:0 0 14px;max-width:920px}
.ucard .uhead{display:flex;gap:10px;align-items:center}
.ucard .utitle{margin:0}
.ucard .ucols{display:grid;grid-template-columns:1fr 1fr;gap:6px 28px;margin:10px 0}
.ucard h4{margin:0 0 6px;font-size:12px;color:var(--ink-3);font-weight:600}
.ucard .ux,.ucard .uc{display:flex;gap:6px;align-items:baseline;padding:2px 0}
.ucard .uamt{margin-left:auto}
.ucard .uhours{font-size:12px}
.ucard .uadd{display:block;margin-top:8px;font-size:12.5px;color:var(--ink-3)}
.ucard .usearch{width:100%;margin-top:6px}
.ucard .usearch-msg{margin:2px 0 0;font-size:12px}
.ucard .unew{margin-top:6px;font-size:12.5px}
.ucard .ugroupname{display:block;margin:6px 0}
/* display:block above, and .btn's inline-flex, beat [hidden]: a one-to-one card showed
   Group name and Map separately instead, which do nothing there (issue 356). */
.ucard [hidden]{display:none}
.ucard .upreview{margin:8px 0;padding:6px 8px;background:var(--surface-2);border-left:3px solid var(--brand)}
.ucard .upreview.bad{border-left-color:var(--deficit);color:var(--deficit)}
@media (max-width:640px){.ucard .ucols{grid-template-columns:1fr}}

/* The Fill from history preview (issue 376), shaped like the planner: lines down
   the side, months across. Allison, 30 October 2026: "Should it just be a
   grid where you can untick what you dont want to import". Each figure
   offered sits in its cell with a tick box; a month that already has hours
   is greyed, because a fill never goes into it; an unticked figure fades, so
   what will be filled is what stands out. */
.fillgrid table.grid{min-width:0;width:auto}
.fillgrid .fill-name{display:flex;gap:6px;align-items:flex-start;cursor:pointer}
.fillgrid .fill-name input{margin:2px 0 0;flex:none}
.fillgrid .prole{margin-top:2px}
td.cell.fillcell{background:var(--cell-bg)}
.fillpick{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-height:42px;padding:7px 9px;cursor:pointer;font-family:var(--font-num);font-variant-numeric:tabular-nums;font-size:13.5px;font-weight:500;color:var(--ink);white-space:nowrap}
.fillpick input{margin:0;flex:none}
.fillpick:hover{box-shadow:inset 0 0 0 1px var(--rule-strong)}
.fillpick:has(input:not(:checked)) span{color:var(--ink-3);text-decoration:line-through}
td.cell.fillheld{background:var(--surface-2)}
td.cell.fillheld .cellbtn{font-family:var(--font-num);font-size:13.5px;align-items:flex-end;color:var(--ink-3)}

/* --- Planner fixes from Andrew's planning test (card 439), 5 November 2026 ---- */

/* Headings and Over / under stay in view. The grid used to scroll inside its
   own box (76vh tall); once the page itself had scrolled even a little, the
   box's top went under the sticky crumb bar and the month headings went with
   it. A box that scrolls sideways can never also stick things to the page,
   so with the script on (it adds .pagescroll) the box stops scrolling
   downward and the script slides the heading row, and the Over / under row,
   to stay in view as the page scrolls. Without the script nothing changes. */
.gridbox.pagescroll{max-height:none;overflow-y:hidden}
.gridbox.pagescroll thead th{will-change:transform}
.gridbox.pagescroll tr.total.pinned td{z-index:11;box-shadow:0 -1px 0 var(--rule-strong),0 -6px 10px -8px rgba(0,0,0,.35)}
.gridbox.pagescroll tr.total.pinned td.stub{z-index:15}
.gridbox.pagescroll thead.lifted th{box-shadow:0 6px 10px -8px rgba(0,0,0,.35)}

/* A figure waiting for approval that links to the request (card 439). */
a.toff-wait{text-decoration:underline;text-underline-offset:2px;cursor:pointer}
a.toff-wait:hover{color:var(--accent-ink)}

/* Fill from history on a line with nothing to offer says so where you are. */
.fillnote{margin:6px 0 0;font-size:12.5px;color:var(--ink-2)}

/* Planner colours in dark mode. A fill is the picked colour mixed 35% into the
   page surface, which is right on white but washes out on the dark surface
   (Andrew, 5 November 2026). The inline style carries the colour as --fill,
   and here the dark theme mixes it stronger. 50% keeps the figure (--ink)
   readable on the default favourites: measured at 4.5:1 or better on all ten
   quick picks (yellow lowest, the rest 5.2:1 and up). The light
   theme is untouched, and so is the heat map. */
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) td.cell[style*="--fill:"]{background:color-mix(in oklab,var(--fill) 50%,var(--surface))!important}}
:root[data-theme="dark"] td.cell[style*="--fill:"]{background:color-mix(in oklab,var(--fill) 50%,var(--surface))!important}


/* A client's mapping page (issue 437): one system per panel, stacked, compact — Allison, 6 November
   2026: "way too much white space ... one under the other and using more of the width". */
.map-sys{margin-top:10px}
.map-sys > h3{padding:8px 14px;font-size:15.5px}
.map-sys .inner{padding:4px 14px 10px}
.map-sys table.dt{width:100%;min-width:0;table-layout:fixed}
.map-sys table.dt td{padding:5px 10px}
.map-sys table.dt td.nm{width:30%;font-weight:500}
.map-sys table.dt td.act{width:34%}
.map-sys table.dt td.act label{display:inline-flex;align-items:center;gap:6px;margin:0 14px 2px 0;cursor:pointer}
.map-sys table.dt td.act input{width:auto;margin:0}
.map-sys tr.lane th{position:static;padding:7px 10px 4px;background:none;border-bottom:1px solid var(--rule-strong);font-size:11.5px}
.map-sys tr.lane + tr td{border-top:0}
.map-sys .find{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.map-sys .find label{color:var(--ink-2);font-size:13px}
.map-sys .find input[type=search]{flex:0 1 380px;border:1px solid var(--rule-strong);background:var(--surface);border-radius:8px;padding:5px 9px;font:inherit;font-size:13px}
.map-sys .hint{margin:6px 0 0;color:var(--ink-3);font-size:12.5px}

/* Contacts that match a client search, issue 487. */
.contact-matches{margin:0 0 10px;font-size:13.5px}
.dt td.linked a{display:inline-block;margin-right:12px}
.company-pick{border:1px solid var(--rule);border-radius:8px;padding:10px 14px;display:flex;flex-direction:column;gap:6px;margin:0}
.company-pick legend{font-weight:600;padding:0 4px}

/* Systems access on the client's page, issue 501: short headers that explain themselves on hover,
   clear lines between platforms, names kept on one line, and a sideways scroll before any wrapping. */
.sa-scroll{overflow-x:auto}
.sa-table{min-width:auto;width:100%;border-collapse:collapse}
.sa-table th,.sa-table td{white-space:nowrap;vertical-align:top;border-bottom:1px solid var(--rule-strong)}
.sa-table td.sa-notes{white-space:normal;min-width:180px}
.sa-hint{text-decoration:underline dotted;text-underline-offset:3px;cursor:help}
.sa-actions{margin-bottom:10px;flex-wrap:wrap}
.sa-add[open]{flex-basis:100%;order:9}
.sa-add>summary{list-style:none}
.sa-add>summary::-webkit-details-marker{display:none}
.sa-pick{margin-top:8px;border:1px solid var(--rule-strong);border-radius:8px;padding:8px 12px}
.sa-pick-note{margin:0 0 4px;font-size:12.5px}
.sa-groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:4px 20px}
.sa-pick label{display:flex;align-items:baseline;gap:8px;padding:3px 0;font-size:13.5px}
.sa-pick input{width:auto}
.sa-pick-head{font-size:11.5px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);font-weight:600;margin:6px 0 2px}
.sa-edit input[type=text],.sa-edit select{border:1px solid var(--rule-strong);background:var(--surface);border-radius:6px;padding:4px 6px;font:inherit;font-size:13px;color:var(--ink)}
.sa-edit .sa-notes-in{min-width:200px}
.sa-edit .sa-or{display:block;margin-top:4px;min-width:150px}

/* A non-chargeable line that only arrives as actuals — its code is set to
   "Can be forecast: off" (issue 527 review). Its open months are hatched in the
   section's own ink so nobody looks for a box there, and clicking one says why
   (.cellinfo). Closed months show what was booked, as every line does. */
table.grid tbody.sec-internal tr.rowl.actuals-only .pname{color:var(--ink-3)}
table.grid tbody.sec-internal tr.rowl.actuals-only td.cell.open,
table.grid.tinted tbody.sec-internal tr.rowl.actuals-only td.cell.open{
  background-image:repeating-linear-gradient(135deg,transparent 0 6px,color-mix(in oklab,var(--ink-3) 18%,transparent) 6px 7px);
  cursor:help;position:relative}
.cellinfo{position:absolute;z-index:31;right:0;top:100%;width:max-content;max-width:min(36ch,calc(100vw - 48px));padding:6px 8px;border:1px solid var(--rule-strong);border-radius:6px;background:var(--surface);color:var(--ink);font-family:var(--font-ui);font-size:12px;font-weight:400;line-height:1.35;text-align:left;white-space:normal;box-shadow:var(--shadow-pop)}
