/* ==========================================================================
   THE BIG SECTION CARD, ONE COMPONENT (Peter, 12 Oct 2026: "We have a standard look and feel, and you keep
   editing it. The big cards are meant to be FULL WIDTH every time, with the SAME padding. Why do I have to
   custom edit every single one.")

   The coloured card at the top of a section home: the Ask box, ONE answer sentence, then that section's own
   content (bars, a rail of cards, pills). Measured off the Invoices steel card at 1512x982 and made the one
   rule: Home's yellow card width (13 Oct: 1228px at 1512, 184 to 1412), 48px inside on every side, 32px corners, the Ask box
   48px in, 36px down to the sentence, 20px under the lede, 60px down to the row under it. Phones: 28px 22px
   inside, 24px corners.

   A PAGE SETS ONLY ITS COLOUR (and its own content):
     Home yellow (dashboard's own canvas) · Invoices / Proposals steel #2c4f6b · Projects light #e1f0f4
     Bank, Tax and Payroll are WHITE cards (.sec-canvas--white, Peter 12 Oct 2026: "the navy, the green and the
     orange are horrible, too strong"): the card surface, a hairline, Home's .dcard elevation, dark text, and the
     section colour ONLY on the picked rail card (--sec-pick: Bank navy #0b1d3a, Tax green #0f766e, Payroll
     orange #e07a2a).
   with --sec-canvas-bg, and for a light card the ink variables. Yellow while Bullet answers is THIS file's job
   (add .sec-canvas--keep to stay in colour, the Projects light).

   ONE HEADER, ONE FOLD (Peter, 12 Oct 2026: "Bank and Payroll look right"). Every section home has the same head:
   the title, then ONE row (the lede on the left; the doors, the primary CTA and Actions on the right), the note
   line, then this card. When the page scrolls the header pins, the lede and note fold, the right-hand row lifts
   onto the title row, and THIS CARD SLIMS TO ITS ASK BOX (Bank's fold, made the component's): everything but the
   box folds away, so Ask is one tap away all the way down the list. The fold is here, never per page.

   THE FRAME: body.sec-wide puts the page on the Invoices wide frame (the main opens to 1400px and blooms there
   from a narrow page, ui.js) while everything under the header keeps its reading measure, --sec-body (800px;
   the Projects home sets 1228px, its card grid's width).
   The yellow canvas rules in dashboard.css read --ask-canvas-bg / -pad / -radius, which this file sets.
   ========================================================================== */
.sec-canvas {
  --sec-canvas-bg: #2c4f6b;
  --sec-canvas-ink: #fff;
  --sec-canvas-soft: rgba(255, 255, 255, 0.72);
  --sec-canvas-quiet: rgba(255, 255, 255, 0.5);
  --sec-canvas-pick: #8fd3ee;             /* a picked card on the colour: light, the colour's own ink on it */
  --sec-canvas-pickink: var(--sec-canvas-bg);
  --ask-canvas-bg: var(--sec-canvas-bg);
  --ask-canvas-pad: 48px;
  --ask-canvas-pad-phone: 22px;          /* Home's card on a phone (Peter, 22 Oct 2026: "look like the dashboard on the homepage") */
  --ask-canvas-radius: 32px;
  box-sizing: border-box;
  background: var(--sec-canvas-bg);
  color: var(--sec-canvas-ink);
  border-radius: var(--ask-canvas-radius);
  padding: var(--ask-canvas-pad);
  margin: 20px 0 60px;
  min-width: 0;
  container-type: inline-size;
  transition: background-color .35s ease;
}
/* in a flex content stack (the Projects home) the stack's own gap is part of the 60px */
.app__content > .sec-canvas { margin-bottom: calc(60px - var(--space-8)); }
@media (max-width: 640px) {
  .sec-canvas { padding: var(--ask-canvas-pad-phone); }   /* Home's 32px corners on a phone too (22 Oct 2026; was 24px) */
}

/* YELLOW WHILE BULLET ANSWERS, colour back when it closes (the rule everywhere) */
.sec-canvas.sec-canvas--never-yellow:not(.sec-canvas--keep):has(> .ask-box.is-answering) { --ask-canvas-bg: #FFE000; background: #FFE000; color: var(--color-text); }
.sec-canvas > .ask-answer-wrap { color: var(--color-text); }
.sec-canvas.sec-canvas--keep > .ask-answer-wrap { color: inherit; }
/* while it answers, the card is the answer: the sentence and the rail step aside */
.sec-canvas:has(> .ask-box.is-answering) > :is(.sec-canvas__line, .rail-wrap, .sec-canvas__rail) { display: none; }

/* the note line above the card hands its 48px to the card's own 20px (the lede's gap on Invoices) */
.page-header__note:has(+ .sec-canvas) { padding-bottom: 0; }

/* THE ASK BOX, 48px in, 36px down to the sentence */
.sec-canvas > .ask-box { margin: 0 0 36px; }
/* THE SLIM CARD (a section's list view: RCT's lists, Projects' list) holds only the box, so the box keeps no 36px under
   it: the card's own 48px is the same all round (22 Oct 2026, Signal's RCT screen check: an 84px empty band under the box) */
.sec-canvas:is(.rct-canvas--slim, .pj-canvas--slim) > .ask-box:not(.is-answering) { margin-bottom: 0; }

/* the greeting under a focused box sits in the 36px, the sentence keeps its place */
/* no greeting line inside a section card (Home keeps it; Peter, 12 Oct, and the cursor now starts in the box) */
.sec-canvas > .ask-hello { display: none; }

/* THE ONE SENTENCE: the figures in full ink, the words quieter */
.sec-canvas__line { margin: 0 0 22px; font-size: clamp(20px, 2.1vw, 28px); line-height: 1.35; font-weight: var(--weight-medium); letter-spacing: -0.01em; color: var(--sec-canvas-soft); text-wrap: pretty; }
.sec-canvas__line strong { color: var(--sec-canvas-ink); font-weight: inherit; }
.sec-canvas__line:empty { display: none; }

/* A RAIL OF CARDS INSIDE THE CARD (Bank's accounts, the taxes, the people): it stays inside the padding, the
   first card on the sentence's left edge. When the cards do not fit, the rail scrolls inside the card with the
   global chevrons (ui.js); when they fit there is no fade and no chevron. Cards are the 200 x 105 standard. */
.sec-canvas .rail-wrap { margin: 0 -2px; }
.sec-canvas :is(.acct-rail, .taxrail) { padding: 4px 2px; margin: 0; scroll-padding-left: 2px; }
.sec-canvas :is(.acct-card, .taxrail__card) { box-shadow: none; border-color: transparent; }
.sec-canvas :is(.acct-card, .taxrail__card):focus-visible { outline: 2px solid var(--sec-canvas-pick); outline-offset: 2px; }
.sec-canvas .rail-chev { border-color: transparent; }

/* THE FOLD ON SCROLL, ONE BEHAVIOUR (Bank's, 12 Oct 2026): pinned, the card slims to its Ask box. Works under the
   shared .page-stickyhead (ui.js) and Bank's own .tx-stickyhead engine alike. */
/* THE FOLD IS EASED (Peter, 13 Oct 2026: "the card snaps closed, it's very jarring... Bank is smoother"). A max-height
   transition can never be smooth (it sits still until the cap passes the real height, then races), and the Ask glide's
   own `transition: none !important` was killing it anyway, so the card snapped 588px in one frame. ui.js (SECTION CARD
   FOLD) now animates the card's real height, padding, margin and corners from where it was to where it lands, 0.5s on
   one ease-in-out, on all five pages (Bank's own engine too). These rules are only the two end states. */
:is(.page-stickyhead, .tx-stickyhead) .sec-canvas { max-height: 900px; }
@media (max-width: 900px) { :is(.page-stickyhead, .tx-stickyhead) .sec-canvas { max-height: 1600px; } }
:is(.page-stickyhead, .tx-stickyhead) .sec-canvas:has(> .ask-box.is-answering) { max-height: none; }
/* the fade itself is played by ui.js (SECTION CARD FOLD, fadeParts) as an animation on each part: a CSS transition
   was cancelled whenever a part left the layout for a measure, so the cards blinked (16 Oct 2026). No transition here. */
:is(.page-stickyhead, .tx-stickyhead) .sec-canvas > :not(.ask-box), :is(.page-stickyhead, .tx-stickyhead) .sec-canvas > :not(.ask-box) > * { transition: none; }
/* SEARCHING FOLDS THE CARD TOO (Peter, 16 Oct 2026: "keep that card closed when I type something into the search...
   when you start typing the blue block collapses and then you just see those quick filter pills"). ui.js puts
   .is-searching on the pinned header while the card's box has text (and Bullet is not answering); it folds exactly as
   pinned does, ONE look on every section home. The quick filters sit IN the card under the box on every page. */
.sec-canvas > :is(.inv-sugg, .tax-sugg) { justify-content: flex-start; margin: 12px 0 0; padding: 0; }
/* the quick filters belong to the FOLDED card only (Peter, 16 Oct 2026: "the quick filters pill is exposed when the
   cards are all on display. So that's not right") */
:is(.page-stickyhead, .tx-stickyhead):not(.is-stuck):not(.is-searching) .sec-canvas > :is(.tx-sugg, .inv-sugg, .tax-sugg) { display: none !important; }
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas > :is(.tx-sugg, .inv-sugg, .tax-sugg) { padding: 10px 6px 4px 58px; margin: 0; }   /* lined up with the search text */
/* PINNED: the card slims to its Ask box (the card clips to the box, whatever the page puts in it) */
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas { max-height: 74px; overflow: hidden; padding: 10px; margin: 12px 0 6px; border-radius: 37px; }
/* THE LINE UNDER THE BOX STAYS WHERE IT IS WHILE THE CARD FOLDS (Peter, 16 Oct 2026: "it should just stay as it is and
   just fade"): the box keeps its 36px under it until the fold lands (.is-compact); dropping it at the start pulled the
   sentence up against the box. During the ride the quick filters sit straight under the box, where they land. */
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas.is-compact > .ask-box { margin: 0; }
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas:not(.is-compact) > :is(.tx-sugg, .inv-sugg, .tax-sugg) { margin-top: -36px; }
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas > :not(.ask-box):not(.tx-sugg):not(.inv-sugg):not(.tax-sugg),
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas > :not(.ask-box):not(.tx-sugg):not(.inv-sugg):not(.tax-sugg) > * { opacity: 0; pointer-events: none; }   /* > * too: a display:contents wrapper (Invoices) has no opacity of its own */
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas > :is(.ask-hello, .ask-find) { display: none; }
/* an open answer stays in the layout while the card folds (it fades with the rest) and goes once the fold lands (the
   .is-compact rule below): hiding it the moment the page scrolled snapped the card shut (Peter, 16 Oct 2026, "fix 3") */
/* Bank's quick filters under the one box stay reachable while pinned */
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas:has(> :is(.tx-sugg, .inv-sugg, .tax-sugg):not([hidden])) { max-height: 220px; }
/* NOTHING MATCHES, ONE NOTE ON EVERY SECTION HOME (Peter, 16 Oct 2026: "make sure that no transaction match is always
   centered... not hidden underneath the filter", then "push it out to all the pages"). Bank's note, shared: a search
   mark, the sentence, Clear filters, in the middle of the space you can see under the header. It sticks under the
   pinned header and ui.js (uiFitEmpty) makes it as tall as the space left, so its words sit in the middle. */
.list-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px; box-sizing: border-box; color: var(--color-text-muted); position: sticky; top: var(--ph-stickyh, 0px); }
.list-empty[hidden] { display: none; }
.list-empty svg { width: 40px; height: 40px; color: var(--color-border-strong); }
.list-empty p { margin: 0; font-size: var(--text-base); color: var(--color-text); max-width: 560px; }
/* quick filters only ever show under a box with text in it (16 Oct 2026: a closed answer emptied the box without telling
   the page, and the folded card showed filters under nothing) */
:is(.page-stickyhead, .tx-stickyhead) .sec-canvas:has(> .ask-box input:placeholder-shown) > :is(.tx-sugg, .inv-sugg, .tax-sugg) { display: none !important; }
/* the folded Bank, Tax and Payroll cards drop the open card's 64px bottom too (16 Oct 2026: it only hid behind the 74px
   cap, and showed as an empty band whenever the cap lifted) */
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas:is(.tax-canvas, .pr-canvas, .tx-canvas):not(:has(> .ask-box.is-answering)) { padding-bottom: 10px; }
@media (max-width: 640px) { :is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas:is(.tax-canvas, .pr-canvas, .tx-canvas):not(:has(> .ask-box.is-answering)) { padding-bottom: 8px; } }
/* the quick filters showing on a folded card: the faded parts leave the layout, so the card is as tall as the bar and
   the chips, with no empty band under them (Peter, 16 Oct 2026: "dead space") */
/* ...but only once the fold has finished (.is-compact, set by ui.js at the end of the animation): taking them out of
   the layout mid-fold left a big empty card and dropped the box (Peter, 16 Oct 2026: "total shit") */
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas.is-compact > :not(.ask-box):not(.tx-sugg):not(.inv-sugg):not(.tax-sugg) { display: none; }
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas:has(> :is(.tx-sugg, .inv-sugg, .tax-sugg):not([hidden])) { padding-bottom: 10px !important; }   /* the unfolded card's 64px bottom (line 185) is not for the folded one */
@media (max-width: 640px) { :is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas { padding: 8px; max-height: 70px; } }
/* the note line folds with the header on every section home */
:is(.page-stickyhead, .tx-stickyhead) .page-header__note:has(+ .sec-canvas) { overflow: hidden; max-height: 80px; transition: max-height .62s cubic-bezier(0.4, 0, 0.2, 1), opacity .82s cubic-bezier(0.4, 0, 0.2, 1); }
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .page-header__note:has(+ .sec-canvas) { max-height: 0; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  :is(.page-stickyhead, .tx-stickyhead) .sec-canvas, :is(.page-stickyhead, .tx-stickyhead) .sec-canvas > * { transition: none !important; }
}

/* ===== THE WHITE CARD (Bank, Tax, Payroll; 12 Oct 2026) =====
   The card surface, a hairline, Home's .dcard elevation, dark text. The section colour lives ONLY on the picked rail
   card (--sec-pick); every other rail card is white with a hairline. Still yellow while Bullet answers. */
.sec-canvas--white {
  --sec-canvas-bg: var(--color-surface);
  --sec-canvas-ink: var(--color-text);
  --sec-canvas-soft: rgba(17, 17, 17, 0.62);   /* 5.4:1 on white */
  --sec-canvas-quiet: rgba(17, 17, 17, 0.55);
  --sec-canvas-pick: var(--sec-pick, #0b1d3a);
  --sec-canvas-pickink: var(--sec-pick-ink, #fff);
  /* the hairline is inside the 48px, so everything in the card sits exactly where it does on a colour card */
  --ask-canvas-pad: calc(48px - var(--border-width));
  --ask-canvas-pad-phone: calc(28px - var(--border-width)) calc(22px - var(--border-width));
  border: var(--border-width) solid var(--color-border);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.032), 0 12px 32px -18px rgba(17, 17, 17, 0.11);
}
.sec-canvas--white:has(> .ask-box.is-answering) { border-color: transparent; }
/* the Ask box on white needs an edge (on a colour it floats without one) */
.sec-canvas.sec-canvas--white > .ask-box:not(.is-answering) { border: var(--border-width) solid var(--color-border); box-shadow: none; }
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas.sec-canvas--white { padding: calc(10px - var(--border-width)); }
:is(.page-stickyhead, .tx-stickyhead):is(.is-stuck, .is-searching) .sec-canvas.sec-canvas--white > .ask-box:not(.is-answering) { border-color: transparent; }
/* the rail on white: hairline cards, the picked one in the section colour with white text */
.sec-canvas.sec-canvas--white :is(.acct-card, .taxrail__card) { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); }
.sec-canvas.sec-canvas--white .acct-card--add { background: transparent; border-style: dashed; color: var(--color-text-muted); }
.sec-canvas.sec-canvas--white .acct-card--add:hover { border-color: var(--color-border-strong); color: var(--color-text); }
.sec-canvas.sec-canvas--white :is(.acct-card.is-sel, .acct-card--all, .taxrail__card.is-sel) { background: var(--sec-canvas-pick); border-color: var(--sec-canvas-pick); color: var(--sec-canvas-pickink); }
.sec-canvas.sec-canvas--white :is(.acct-card.is-sel, .acct-card--all, .taxrail__card.is-sel) :is(.acct-card__bal, .acct-card__eye, .taxrail__name) { color: var(--sec-canvas-pickink); }
.sec-canvas.sec-canvas--white :is(.acct-card.is-sel, .acct-card--all, .taxrail__card.is-sel) :is(.acct-card__dec, .acct-card__sub, .acct-card__name, .taxrail__sub, .taxrail__nil) { color: var(--sec-canvas-pickink); opacity: .88; }   /* .88 keeps the small line AA on the green (4.6:1) */
.sec-canvas.sec-canvas--white :is(.acct-card--all, .taxrail__card.is-sel) :is(.acct-card__logo, .taxrail__icon) { background: rgba(255, 255, 255, 0.2); color: var(--sec-canvas-pickink); }
.sec-canvas.sec-canvas--white :is(.acct-card, .taxrail__card):focus-visible { outline-color: var(--color-text); }

/* ===== THE SANA COLOURS (Peter, 13 Oct 2026, from his SANA Figma colour cards: "Card / Sub card / Text") =====
   Each section card: the card colour, its sub cards (the rail cards inside) and its text colour. Black text is
   always our own --color-text, never a custom black (Peter). Invoices pink, Bank navy, Tax & Docs forest with
   yellow text, Payroll orange. Home's yellow and Projects' light blue are unchanged; Proposals keeps its own. */
.sec-canvas--pink   { --sec-canvas-bg: #F88AF6; --sec-canvas-ink: var(--color-text); --sec-canvas-soft: rgba(17, 17, 17, 0.72); --sec-canvas-quiet: rgba(17, 17, 17, 0.6); --sec-sub: #F6E6F5; --sec-sub-ink: var(--color-text); --sec-canvas-pick: var(--color-text); --sec-canvas-pickink: #fff; --sec-bar: var(--color-text); --sec-bar-hover: #3a3a3a; --sec-on-bar: #fff; --sec-pill: rgba(17, 17, 17, 0.08); --sec-pill-hover: rgba(17, 17, 17, 0.14); }
.sec-canvas--navy   { --sec-canvas-bg: #06173B; --sec-canvas-ink: #fff; --sec-canvas-soft: rgba(255, 255, 255, 0.72); --sec-canvas-quiet: rgba(255, 255, 255, 0.55); --sec-sub: #75D2E7; --sec-sub-ink: var(--color-text); --sec-canvas-pick: #fff; --sec-canvas-pickink: var(--color-text); }
.sec-canvas--forest { --sec-canvas-bg: #14271F; --sec-canvas-ink: #FFEC03; --sec-canvas-soft: rgba(255, 236, 3, 0.75); --sec-canvas-quiet: rgba(255, 236, 3, 0.6); --sec-sub: #fff; --sec-sub-ink: var(--color-text); --sec-canvas-pick: #FFEC03; --sec-canvas-pickink: var(--color-text); }
.sec-canvas--orange { --sec-canvas-bg: #FF6C15; --sec-canvas-ink: #fff; --sec-canvas-soft: rgba(255, 255, 255, 0.85); --sec-canvas-quiet: rgba(255, 255, 255, 0.75); --sec-sub: #fff; --sec-sub-ink: var(--color-text); --sec-canvas-pick: var(--color-text); --sec-canvas-pickink: #fff; }
/* the sub cards (the rail inside the card): the sub colour with black text; the picked one in the pick colour */
.sec-canvas.sec-canvas--sana :is(.acct-card, .taxrail__card) { border-color: transparent; background: var(--sec-sub); color: var(--sec-sub-ink); }
.sec-canvas.sec-canvas--sana :is(.acct-card, .taxrail__card) :is(.acct-card__bal, .acct-card__eye, .taxrail__name) { color: var(--sec-sub-ink); }
.sec-canvas.sec-canvas--sana :is(.acct-card, .taxrail__card) :is(.acct-card__dec, .acct-card__sub, .acct-card__name, .taxrail__sub, .taxrail__nil) { color: var(--sec-sub-ink); opacity: .72; }
.sec-canvas.sec-canvas--sana .acct-card--add { background: transparent; border: var(--border-width) dashed currentColor; color: var(--sec-canvas-soft); }
.sec-canvas.sec-canvas--sana :is(.acct-card.is-sel, .acct-card--all, .taxrail__card.is-sel) { background: var(--sec-canvas-pick); border-color: var(--sec-canvas-pick); color: var(--sec-canvas-pickink); }
.sec-canvas.sec-canvas--sana :is(.acct-card.is-sel, .acct-card--all, .taxrail__card.is-sel) :is(.acct-card__bal, .acct-card__eye, .taxrail__name, .acct-card__dec, .acct-card__sub, .acct-card__name, .taxrail__sub, .taxrail__nil) { color: var(--sec-canvas-pickink); }
.sec-canvas.sec-canvas--sana :is(.acct-card--all, .taxrail__card.is-sel) :is(.acct-card__logo, .taxrail__icon) { background: rgba(127, 127, 127, 0.18); color: var(--sec-canvas-pickink); }
.sec-canvas.sec-canvas--sana :is(.acct-card, .taxrail__card):focus-visible { outline-color: var(--sec-canvas-ink); }

/* ===== THE ONE HEADER (12 Oct 2026) =====
   Title (33px down, the global back arrow, the chevron) · ONE row: the lede left, the doors / CTA / Actions right ·
   the note · the card 20px under it. Pages add nothing to place it. */
body.sec-wide .page-header > .header-sub { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; }
/* the CTA and Actions are one height side by side (Actions' caret makes it 44px) */
body.sec-wide .page-header > .header-sub .btn--primary { min-height: 44px; }
body.sec-wide .page-header > .header-sub > .spacer { flex: 1; }
body.sec-wide .page-header > .header-sub > .page-header__lede { margin: 0; }
body.sec-wide .page-header > .header-sub .sec-doors { display: inline-flex; align-items: center; gap: var(--space-1); }
@media (max-width: 640px) { body.sec-wide .page-header > .header-sub { flex-wrap: wrap; row-gap: var(--space-2); } }

/* NO FADE ON A RAIL INSIDE A CARD (Peter, 13 Oct 2026: "that black gradient on Tax & Docs is terrible, get rid of it").
   The rail engine fades the last card when more are off to the side; on a coloured card that reads as a dirty
   smear. Here the chevron alone says there is more. */
.sec-canvas :is(.rail-more-r, .rail-more-l) { -webkit-mask-image: none; mask-image: none; }
/* Payroll and Bank get a little more room under their rail (Peter, 13 Oct 2026). NOT Tax & Docs since 22 Oct 2026: it is
   Home's card, 48px all round (22px on a phone), Peter, Change 42 item 10 */
.sec-canvas.pr-canvas:not(:has(> .ask-box.is-answering)), .sec-canvas.tx-canvas:not(:has(> .ask-box.is-answering)) { padding-bottom: 64px; }   /* + Bank (Peter, 13 Oct) */
@media (max-width: 640px) { .sec-canvas.pr-canvas, .sec-canvas.tx-canvas { padding-bottom: 32px; } }

/* ===== THE HEADER IS ONE LINE (Peter, 13 Oct 2026: "get rid of the subtext, it's self-explanatory, keep the call to
   actions up at the top level beside the breadcrumb, like the Studio view, and bring the whole card up") =====
   On every section home the lede and the note are gone, and the doors / Actions row sits on the title row from the
   start (the pinned layout, always), stopping short of the logout and Mariana (cornerClear in ui.js, and Bank's
   txCornerClear, now run whenever the page is .sec-wide). Phones keep the row under the title. */
body.sec-wide :is(.page-stickyhead, .tx-stickyhead) .page-header__note:has(+ .sec-canvas),
body.sec-wide :is(.page-stickyhead, .tx-stickyhead) .page-header__note,
body.sec-wide :is(.page-stickyhead, .tx-stickyhead) .header-sub .page-header__lede { display: none; }
@media (min-width: 769px) {
  body.sec-wide :is(.page-stickyhead, .tx-stickyhead) .page-header__title { padding-bottom: 16px; }
  body.sec-wide :is(.page-stickyhead, .tx-stickyhead) .header-sub { margin-top: -51px; justify-content: flex-end; }
}

/* ===== THE WIDE FRAME = HOME'S (Peter, 13 Oct 2026: "make all of the cards the width of the yellow card. The spacing
   and padding at the side I like.") ===== Home's own frame (dashboard.css .app--wide .app__main): 1356px with 64px of
   air each side, 48 at laptop widths, 16 under 900, 12 on phones. At 1512 the card runs 184 to 1412, exactly Home's
   yellow canvas, and the title sits on the card's left edge as Home's greeting does. */
body.sec-wide .app__main,
body.sec-wide .app.app--wide > .app__main { max-width: 1356px; width: 100%; margin-inline: auto; padding-inline: 64px; }
@media (max-width: 1200px) { body.sec-wide .app__main, body.sec-wide .app.app--wide > .app__main { padding-inline: 48px; } }
@media (max-width: 900px)  { body.sec-wide .app__main, body.sec-wide .app.app--wide > .app__main { padding-inline: var(--space-4); } }
@media (max-width: 640px)  { body.sec-wide .app__main, body.sec-wide .app.app--wide > .app__main { padding-inline: var(--space-3); } }
body.sec-wide .app__main > .ask-dock { max-width: 800px; margin-inline: auto; }
body.sec-wide .app:not(.app--wide) > .app__main:not(:has(> .ask-dock.is-styled))::before { max-width: 800px; margin-left: auto; margin-right: auto; }
/* the title row and the card run the frame; everything under them keeps the reading measure */
body.sec-wide :is(.page-stickyhead, .tx-stickyhead) > :not(.page-header),
body.sec-wide .app__main > .app__content:not(:has(> .sec-canvas)),
body.sec-wide .app__main > .app__content:has(> .sec-canvas) > :not(.sec-canvas) {
  box-sizing: border-box; width: 100%; max-width: var(--sec-body, 800px); margin-left: auto; margin-right: auto;
}
/* phones: nothing in the frame may push the page sideways (a row's 44px tap target, a door's no-JS tip) */
@media (max-width: 640px) { body.sec-wide .app__main { overflow-x: clip; } }

/* ===== WORDS, NOT ICONS: THE SECTION HEADER'S LINKS, ONE BUTTON, AND THE THREE DOTS (Peter, 13 Oct 2026: "icons with no
   words are a guessing game, and Actions says nothing") =====
   LEFT, right after the title on the same line: the section's other pages as quiet words (.sec-head__links, inside the
   h1 so they sit on its baseline and wrap under it on a phone). RIGHT: ONE dark button that names the main job, then
   .sec-head__more: a small three-dots button that opens the page's existing .menu (aria-label and tooltip "More
   actions"). At most three words; anything else lives in the menu. Built once; pages add no offsets. */
.sec-head__icons { display: inline-flex; align-items: center; gap: 4px; }   /* Bank's three icon doors (16 Oct 2026) */
.sec-head__icons a[href="inbox.html"] svg { transform: translateY(-1.5px); }   /* the tray's weight sits low: lifted so it reads level with its neighbours */
.sec-head__links { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin-left: var(--space-4); font-size: var(--text-base); font-weight: var(--weight-regular); letter-spacing: 0; line-height: var(--leading-body); }
.sec-head__links a, .page-header .sec-head__links a { position: relative; color: var(--color-text-muted); text-decoration: none; }
.sec-head__links a:hover, .page-header .sec-head__links a:hover { color: var(--color-text); }
.sec-head__links a[hidden] { display: none; }
.sec-head__links a[aria-current="page"] { display: none; }
.sec-head__more { position: relative; }
.sec-head__more > .btn--icon, .sec-head__morebtn { width: 44px; min-height: 44px; border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); }
.sec-head__more > .btn--icon:hover, .sec-head__more > .btn--icon[aria-expanded="true"], .sec-head__morebtn:hover, .sec-head__morebtn[aria-expanded="true"] { background: var(--color-bg-subtle); }
body.sec-wide .page-header > .header-sub > :is(.sec-head__more, .sec-head__morebtn) { flex: none; }
body.sec-wide .page-header > .header-sub .btn--primary[hidden] { display: none; }
@media (max-width: 768px) {
  /* the phone title reserves room on its right for the corner buttons; the words sit BELOW them, so they use it */
  .sec-head__links { flex: 0 0 calc(100% + 158px); max-width: calc(100vw - 24px); margin-left: 0; margin-top: var(--space-1); gap: var(--space-1) var(--space-3); }
  body.sec-wide .page-header > .header-sub { justify-content: flex-end; }
}
.sec-head__links a:has(.tin-doordot) { padding-right: 12px; }
/* ===== HEADER DOORS ARE ICONS WITH INSTANT TOOLTIPS (Peter, 22 Oct 2026, Signal Change 42: "get rid of all the words
   and put in icons, please, with tooltips") =====
   Replaces the 13 Oct words. The pages still write the words (.sec-head__links); ui.js uiIconDoors turns them into Bank's
   .sec-head__icons (icon buttons, aria-label, the #ui-tip tooltip at once). Until it has, the words take their place
   unseen, so a word never flashes before its icon. The page you are on and a hidden door are not shown. SHARED FILE. */
.sec-head__links { visibility: hidden; }
.sec-head__icons a[hidden], .sec-head__icons a[aria-current="page"] { display: none; }
.page-header > .header-sub > .sec-head__icons { flex: none; align-self: center; }
.sec-head__icons a:has(.tin-doordot) { padding-right: 0; }
.sec-head__icons .tin-doordot { top: 8px; right: 8px; margin-top: 0; }
/* a small laptop or an iPad on its side: the words tighten so they never reach the button (measured at 800) */
@media (min-width: 769px) and (max-width: 900px) { .sec-head__links { gap: var(--space-1) var(--space-3); margin-left: var(--space-3); } }

/* NO JUMP ON LOAD (Peter, 13 Oct 2026): the right-hand row (main button and three dots) is measured against the logout and
   Mariana by cornerClear (ui.js, Bank's txCornerClear) a moment after load. It stays invisible, taking its place, until that
   first measurement is done (html.cc-ready), so it never slides out from behind them. */
/* RETIRED 13 Oct 2026 (it hid the row for ~0.5s). The clearance is now CSS from the first paint, see the block at the foot of this file. */

/* ===== ONE BOX FOR SEARCH AND ASK (Peter, 13 Oct 2026: "remove the search icons from above the body cards") =====
   The Ask box in the card filters the page's list live (js/ask-search.js), so the separate page search is gone from
   above the lists. The page's own search input stays in the DOM as the engine the box drives (its filter, chips and
   bolding), out of sight. */
.sec-search-driven, #inv-search-field, #tax-search-field, #pr-search-field, #pj-search-field, .pb-canvas__search { display: none !important; }

/* THE PAGE WORDS SIT IN THE RIGHT-HAND ROW (Peter, 13 Oct 2026: "move them to the right, into the same row as the main
   button and the three dots, all vertically centred"). [words] [main button] [three dots] on one line; the words sit just
   left of the button. Phones: the row wraps and the words take their own line under the title, as before. */
.page-header > .header-sub > .sec-head__links { margin: 0 var(--space-2) 0 0; align-self: center; flex: none; max-width: none; }
.page-header > .header-sub > .sec-head__links a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 768px) {
  .page-header > .header-sub > .sec-head__links { flex: 1 1 100%; max-width: none; margin: 0; }
  .page-header > .header-sub > .sec-head__links a { min-height: 0; }
}

/* ===== ONE COLOUR FOR EVERY SECTION CARD: THE PROJECTS LIGHT BLUE (Peter, 13 Oct 2026: "ALL section cards use the Projects
   light blue. Home stays yellow") =====
   Invoices, Proposals, Bank, Tax & Docs and Payroll are exactly the Projects card: #e1f0f4, our black text, the soft grey
   sentence, the slate #46707e for quiet text and the Invoices bars. Set ONCE here; the per-page pink / navy / forest /
   orange / steel / white modifiers still sit on the pages, harmlessly, because this block outranks them. Sub cards (Bank's
   accounts, the taxes, the people, the Invoices lanes) are white with black text; the PICKED one is black with white
   text. The card stays blue while Bullet answers (the yellow rule above is retired), like Projects. */
.sec-canvas, .sec-canvas.sec-canvas--pink, .sec-canvas.sec-canvas--navy, .sec-canvas.sec-canvas--forest, .sec-canvas.sec-canvas--orange, .sec-canvas.sec-canvas--white, .sec-canvas.sec-canvas--sana {
  --sec-canvas-bg: #e1f0f4;
  --ask-canvas-bg: #e1f0f4;
  --sec-canvas-ink: var(--color-text);
  --sec-canvas-soft: rgba(17, 17, 17, 0.62);
  --sec-canvas-quiet: #46707e;
  --sec-canvas-pick: var(--color-text);
  --sec-canvas-pickink: #fff;
  --sec-sub: #fff;
  --sec-sub-ink: var(--color-text);
  --sec-bar: #46707e;
  --sec-bar-hover: #3a5e6b;
  --sec-on-bar: #fff;
  --sec-pill: rgba(17, 17, 17, 0.08);
  --sec-pill-hover: rgba(17, 17, 17, 0.14);
  background: #e1f0f4;
  color: var(--color-text);
}
.sec-canvas.sec-canvas--white { border: 0; box-shadow: none; --ask-canvas-pad: 48px; }
.sec-canvas:has(> .ask-box.is-answering) { background: #e1f0f4; --ask-canvas-bg: #e1f0f4; color: var(--color-text); }
.sec-canvas.sec-canvas--white > .ask-box:not(.is-answering) { border: 0; }
/* sub cards: white, black text, a hairline so they read on the blue; the picked one black with white text */
.sec-canvas :is(.acct-card, .taxrail__card) { background: #fff; color: var(--color-text); border-color: transparent; }
.sec-canvas :is(.acct-card, .taxrail__card) :is(.acct-card__bal, .acct-card__eye, .taxrail__name) { color: var(--color-text); }
.sec-canvas :is(.acct-card, .taxrail__card) :is(.acct-card__dec, .acct-card__sub, .acct-card__name, .taxrail__sub, .taxrail__nil) { color: var(--color-text); opacity: .72; }
.sec-canvas :is(.acct-card.is-sel, .acct-card--all.is-sel, .taxrail__card.is-sel) { background: var(--color-text); border-color: var(--color-text); color: #fff; }
.sec-canvas :is(.acct-card.is-sel, .acct-card--all.is-sel, .taxrail__card.is-sel) :is(.acct-card__bal, .acct-card__eye, .taxrail__name, .acct-card__dec, .acct-card__sub, .acct-card__name, .taxrail__sub, .taxrail__nil) { color: #fff; opacity: 1; }
.sec-canvas :is(.acct-card.is-sel, .taxrail__card.is-sel) :is(.acct-card__logo, .taxrail__icon) { background: rgba(255, 255, 255, 0.2); color: #fff; }
/* the unpicked "All" card is a normal white sub card (it was drawn picked in the Sana colours) */
.sec-canvas.sec-canvas--sana .acct-card--all:not(.is-sel) { background: #fff; border-color: transparent; color: var(--color-text); }
.sec-canvas.sec-canvas--sana .acct-card--all:not(.is-sel) :is(.acct-card__bal, .acct-card__eye, .acct-card__dec, .acct-card__sub, .acct-card__name) { color: var(--color-text); }
.sec-canvas.sec-canvas--sana .acct-card--add { border-color: rgba(17, 17, 17, 0.35); color: var(--sec-canvas-soft); }
/* Invoices: the picked pill and the picked lane are black with white text */
.sec-canvas .inv-pill.is-on { background: var(--color-text); color: #fff; }
body.sec-invoice .inv-stack .stat-card.is-sel .inv-lane__box { background: var(--color-text); color: #fff; }
body.sec-invoice .inv-stack .stat-card.is-sel .inv-lane__box * { color: inherit; }

/* ===== THE RIGHT-HAND ROW IS IN ITS PLACE ON THE FIRST PAINT (Peter, 13 Oct 2026: "the main button and the three dots
   appear half a second after load") =====
   The row stops short of the logout and Mariana (the corners sit 92px + the logout's 48px + a 12px gap in from the right
   edge). That is a fixed number, so the room is reserved in CSS: the corner room minus the air that is already to the right
   of the frame (the sidebar's 84px, the frame's centring, its side padding). ui.js (cornerClear) and Bank (txCornerClear)
   still measure the real thing on load, scroll and resize and write the same number inline (or 0 when the corners have
   scrolled away), so nothing moves. The row is never hidden any more. */
@media (min-width: 769px) {
  body.sec-wide .page-header > .header-sub { padding-right: max(0px, calc(152px - (max(0px, (100vw - 84px - 1356px) / 2) + 64px))); }
}
@media (min-width: 769px) and (max-width: 1200px) {
  body.sec-wide .page-header > .header-sub { padding-right: max(0px, calc(152px - (max(0px, (100vw - 84px - 1356px) / 2) + 48px))); }
}
@media (min-width: 769px) and (max-width: 900px) {
  body.sec-wide .page-header > .header-sub { padding-right: max(0px, calc(152px - 16px)); }
}
/* the spacer leads the row, so the page words sit just left of the main button, not out by the title */
body.sec-wide .page-header > .header-sub > .page-header__lede { order: -2; }
body.sec-wide .page-header > .header-sub > .spacer { order: -1; }
@media (max-width: 768px) { body.sec-wide .page-header > .header-sub > .spacer { order: 0; } body.sec-wide .page-header > .header-sub > .sec-head__links { order: -3; } }
