/* -----------------------------------------------------------------------------
   ONE new type step, deliberately added.
   base.css ships an 8-step ladder and states "nothing off-ladder". It has no
   step between --t-h2 (21px) and --t-hero (34px). The dashboard needs one: a
   KPI figure in a 3-across grid is too big at 34 and too weak at 21. So this
   is a documented 9th step rather than two ad-hoc numbers — .kpi-v and .mval
   had drifted to 27px and 26px, one pixel apart for no reason.
   ----------------------------------------------------------------------------- */
:root{ --t-fig:26px; }

/* ---- display typeface -------------------------------------------------------
   Plus Jakarta Sans on headline-scale text only (page/card/record titles, the
   rail wordmark, the sign-in brand, and every big figure) -- IBM Plex Sans
   (set as the base.css body default) carries everything else, including all
   dense/tabular text. Added 2026-09-04 with the Zoho-leaning pass; listed
   here rather than in base.css because it touches selectors defined in both
   files and app.css is where cross-cutting additions like this belong. */
.pg-title,.hello h1,.card-t,.rail-word,.signin-brand b,.lv-title h2,.dr-name,
.rec-t,.dlg-t,.tile-v,.cat-v,.hl-t,.hl-num,.zh-t,.zh-n,.kpi-v,.mval,.pstage-n,
.gsx-t{
  font-family:'Plus Jakarta Sans',system-ui,sans-serif;
}

/* Home's navy band -- fixed colour, not theme-swapped, same reasoning base.css
   already gives --rail: "always dark" regardless of the light/dark toggle.
   One deliberate flat moment, approved 2026-09-02 after three mockup rounds
   (v4 flat-navy-white read "dead"; v5/v6 added this band back for a pulse). */
:root{ --navy-hero:#0f2a4a; --navy-hero-ink-2:#c3cede; --navy-hero-ink-3:#7f93ab; }

/* =============================================================================
   app.css — ADDITIONS ONLY. Loads after base.css and never redefines a token.
   Everything here is either new to this panel or a state base.css had no need
   for (permission gating, the action dialog, the guided-setup strip).
   ============================================================================= */

/* ---- guided setup: the rail's standing call to action ---------------------- */
.gs{display:flex;align-items:center;gap:9px;width:100%;padding:10px 11px;border-radius:var(--r);
    background:var(--rail-2);border:1px solid var(--rail-line);color:var(--rail-ink-2);
    font:600 var(--t-meta)/1 ui-sans-serif,system-ui,sans-serif;letter-spacing:.03em;
    text-transform:uppercase;cursor:pointer;transition:background .16s var(--ease)}
.gs:hover{background:var(--rail-3);color:var(--rail-ink)}
.gs-dot{width:7px;height:7px;border-radius:50%;background:var(--rail-active);flex:0 0 auto;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--rail-active) 22%,transparent)}
.app.rail-collapsed .gs-t{display:none}
.app.rail-collapsed .gs{justify-content:center;padding:10px 0}

/* ---- tier switcher (fixture mode only) ------------------------------------- */
.tier{display:flex;align-items:center;gap:6px;height:var(--h-ctl);padding:0 9px;
    border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);
    box-shadow:var(--sh-ctl);font:600 var(--t-meta)/1 inherit;color:var(--ink-2);cursor:pointer}
.tier:hover{box-shadow:var(--sh-ctl-h)}
.tier select{border:0;background:none;font:inherit;color:inherit;cursor:pointer;outline:0}
.tier-k{font-size:var(--t-micro);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3)}

/* ---- "needs you" grouped rows ---------------------------------------------- */
.nu-g{padding:13px 15px 4px;font:600 var(--t-label)/1 inherit;letter-spacing:.09em;
    text-transform:uppercase;color:var(--ink-3);display:flex;align-items:center;gap:7px}
.nu-g svg{width:13px;height:13px;stroke-width:2.1;color:var(--ink-3)}
.nu{display:flex;align-items:center;gap:10px;width:100%;padding:9px 15px;background:none;border:0;
    text-align:left;cursor:pointer;font:inherit;color:var(--ink);border-radius:var(--r-xs);
    transition:background .13s var(--ease)}
.nu:hover{background:var(--raised)}
.nu-c{width:11px;height:11px;stroke-width:2.4;color:var(--ink-3);flex:0 0 auto}
.nu-t{flex:1 1 auto;font-size:var(--t-body);letter-spacing:-.006em}
.nu-t em{font-style:normal;color:var(--ink-3);font-size:var(--t-meta)}
.nu-n{font:700 var(--t-body)/1 'IBM Plex Sans',system-ui,sans-serif;
    font-variant-numeric:tabular-nums;color:var(--ink-2)}
.nu-n.hot{color:var(--accent)}
.nu-n.zero{color:var(--ink-3);font-weight:600}

/* ---- action dialog ---------------------------------------------------------- */
.dlg-scrim{position:fixed;inset:0;background:rgba(10,7,14,.42);backdrop-filter:blur(2px);
    opacity:0;pointer-events:none;transition:opacity .18s var(--ease);z-index:80}
.dlg-scrim.on{opacity:1;pointer-events:auto}
/* Every prior action fit one screen; record_payout's 8 fields is the first
   dialog tall enough to push Confirm off a short window with no way back --
   found by actually filling the form, not by reading the markup. .dlg is
   now a column with a viewport cap; only .dlg-b scrolls, so the header and
   the Cancel/Confirm row stay reachable regardless of form length or
   window height. */
.dlg{position:fixed;left:50%;top:50%;transform:translate(-50%,-46%) scale(.985);
    width:min(468px,calc(100vw - 32px));max-height:min(640px,calc(100vh - 48px));
    display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);
    border-radius:var(--r-lg);box-shadow:var(--sh-3);z-index:81;opacity:0;pointer-events:none;
    transition:opacity .18s var(--ease),transform .18s var(--ease)}
.dlg.on{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.dlg-h{padding:17px 19px 0;flex:0 0 auto}
.dlg-t{font:700 var(--t-h3)/1.25 inherit;letter-spacing:-.018em;color:var(--ink)}
.dlg-s{margin-top:5px;font-size:var(--t-meta);color:var(--ink-3);line-height:1.5}
.dlg-b{padding:15px 19px 4px;flex:1 1 auto;overflow-y:auto;min-height:0}
.dlg-f{display:flex;gap:8px;justify-content:flex-end;padding:15px 19px 17px;flex:0 0 auto}
.dlg-code{font:700 var(--t-micro)/1 'IBM Plex Sans',system-ui,sans-serif;
    letter-spacing:.04em;color:var(--ink-3);background:var(--sunken);border-radius:var(--r-xs);
    padding:4px 7px;display:inline-block;margin-top:9px}
.dlg textarea{width:100%;min-height:74px;resize:vertical;padding:9px 11px;border-radius:var(--r-sm);
    border:1px solid var(--line);background:var(--raised);color:var(--ink);
    font:400 var(--t-body)/1.55 inherit;outline:0}
.dlg textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-wash)}
.dlg-warn{display:flex;gap:9px;padding:11px 12px;border-radius:var(--r-sm);
    background:var(--danger-wash);border:1px solid color-mix(in srgb,var(--danger) 24%,transparent);
    font-size:var(--t-meta);line-height:1.5;color:var(--ink-2)}
.dlg-warn svg{width:15px;height:15px;stroke-width:2.2;color:var(--danger);flex:0 0 auto;margin-top:1px}

/* ---- blocked / gated affordances -------------------------------------------
   A gated action stays visible and explains itself. Hiding it just moves the
   question to a person instead of answering it on screen. */
.act-blocked{position:relative}
.act-blocked[disabled]{opacity:1;cursor:not-allowed;color:var(--ink-3);
    background:var(--sunken);border-color:var(--line-soft);box-shadow:none}
.why{display:block;margin-top:5px;font-size:var(--t-micro);line-height:1.45;color:var(--ink-3);
    max-width:34ch}
.why.reauth{color:var(--warn)}

/* ---- hero: the one number that matters -------------------------------------- */
/* Zoho-leaning pass (2026-09-04): a plain white/surface card with a simple
   divider, matching the approved artifact's .headline exactly -- no fixed
   navy wrapper (removed from homeHTML() -- .home-navy's own rules are now
   unused, left in place as dead CSS rather than hunted down and deleted
   under time pressure) and no warn-tinted fig background. */
.zero-hero{display:flex;align-items:stretch;gap:0;border:1px solid var(--line);
    border-radius:var(--r-lg);overflow:hidden;background:var(--surface);box-shadow:var(--sh-1)}
.zh-fig{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:2px;padding:20px 28px;border-right:1px solid var(--line-soft);min-width:132px}
/* NOT Space Mono -- its zero is a fat dotted oval, fine in a table column at
   13px, but this is the single largest digit on the page at 34px+ and it
   rendered like a broken icon instead of a number. Caught from a screenshot
   Lucas sent (2026-09-03), not from re-reading my own work -- a single hero
   digit needs no monospace alignment anyway, only one number is ever shown
   here. Colour changed warn(amber)->danger(red) 2026-09-04 to match the
   approved artifact -- "0 hires" is an alarm, and danger already carries
   that meaning everywhere else in this panel. */
.zh-n{font:800 var(--t-hero)/1 'Plus Jakarta Sans',system-ui,sans-serif;
    font-variant-numeric:tabular-nums;color:var(--danger);letter-spacing:-.02em}
.zh-k{font:600 var(--t-micro)/1.3 inherit;letter-spacing:.08em;text-transform:uppercase;
    color:var(--ink-3);text-align:center}
.zh-b{flex:1 1 auto;display:flex;align-items:center;gap:18px;padding:17px 19px}
.zh-txt{flex:1 1 auto}
.zh-t{font:700 var(--t-lead)/1.35 inherit;letter-spacing:-.014em;color:var(--ink)}
.zh-s{margin-top:4px;font-size:var(--t-meta);line-height:1.55;color:var(--ink-2)}
.zh-s b{color:var(--ink);font-weight:650}
@media(max-width:860px){
  .zero-hero{flex-direction:column}
  .zh-fig{flex-direction:row;gap:12px;border-right:0;
      border-bottom:1px solid var(--line-soft);padding:13px 16px}
  .zh-b{flex-direction:column;align-items:flex-start;gap:12px}
}

/* ---- KPI grid ---------------------------------------------------------------
   Individual cards with a real gap between them, matching the approved
   artifact -- was one shared-border box with internal divider lines, which is
   the other thing that read as "not the same design" 2026-09-04 even after
   the palette/type/rail passes landed. Shared with Reports (see the comment
   below on .home-navy) so this propagates there too. */
.kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
    box-shadow:var(--sh-1);padding:15px 17px 16px;text-align:left;cursor:pointer;
    font:inherit;transition:background .14s var(--ease),box-shadow .14s var(--ease),border-color .14s var(--ease)}
.kpi:hover{background:var(--raised);box-shadow:var(--sh-2);border-color:var(--line-soft)}
.kpi-k{font:600 var(--t-label)/1 inherit;letter-spacing:.085em;text-transform:uppercase;color:var(--ink-3)}
.kpi-v{margin-top:9px;font:700 var(--t-fig)/1 'Plus Jakarta Sans',system-ui,sans-serif;
    font-variant-numeric:tabular-nums;letter-spacing:-.028em;color:var(--ink)}
.kpi-v small{font-size:var(--t-body);font-weight:600;color:var(--ink-3);letter-spacing:0}
.kpi-s{margin-top:7px;font-size:var(--t-meta);line-height:1.45;color:var(--ink-3)}
.kpi-s.warn{color:var(--warn)}
@media(max-width:900px){.kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.kpis{grid-template-columns:1fr}}

/* ---- list filter bar -- every list's real, useful filters, derived from
   the rows actually on screen rather than a guessed enum (filterOptions in
   app.js). Sits under the page title, above the note/table. ---------------- */
.fbar{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 14px}
.fbar-s{height:32px;padding:0 26px 0 11px;border:1px solid var(--line);border-radius:var(--r-sm);
    background:var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238a8e97" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>') no-repeat right 6px center/14px;
    background-color:var(--surface);color:var(--ink-2);font:500 var(--t-meta)/1 inherit;
    appearance:none;cursor:pointer;transition:border-color .12s var(--ease)}
.fbar-s:hover{border-color:var(--ink-3)}
.fbar-s:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-wash)}

/* ---- Home only: the navy band carries the day's one insight; the KPI grid
   overlaps its bottom edge for an anchor instead of sitting on plain white.
   .pg-head and .kpis are shared classes used on every other page's title bar
   and every Reports card -- scoped overrides only, nothing above touched. */
.home-navy{background:var(--navy-hero);color:#fff;margin:-20px -24px 0;
    padding:22px 24px 30px;border-radius:0 0 var(--r-lg) var(--r-lg)}
.home-navy .pg-title{color:#fff}
.home-navy .pg-sub{color:var(--navy-hero-ink-2)}
.home-navy .src.live{color:#7be3b0}
.home-navy .zero-hero{background:transparent;border:0;box-shadow:none}
.home-navy .zh-fig{background:transparent;border-right:1px solid rgba(255,255,255,.14)}
.home-navy .zh-n{color:#fff}
.home-navy .zh-k{color:var(--navy-hero-ink-3)}
.home-navy .zh-t{color:#fff}
.home-navy .zh-s{color:var(--navy-hero-ink-2)}
.home-navy .zh-s b{color:#fff}
/* Was a white pill for max punch on the navy band (approved 2026-09-02); the
   Zoho-leaning pass makes the structural-blue button the one consistent
   primary-action treatment everywhere, navy hero included, rather than a
   one-off. Blue-on-navy still reads: not overridden to white/pri-2 below. */
.home-navy .zh-b>.btn.pri{box-shadow:0 6px 16px -6px rgba(0,0,0,.45),var(--sh-action)}
@media(max-width:860px){.home-navy .zh-fig{border-right:0;
    border-bottom:1px solid rgba(255,255,255,.14)}}

.kpis.overlap{position:relative;margin:-22px 0 0;z-index:2;box-shadow:var(--sh-2)}

/* ---- money split cards ------------------------------------------------------- */
.money-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:860px){.money-2{grid-template-columns:1fr}}
.mbar{height:7px;border-radius:99px;background:var(--sunken);overflow:hidden;display:flex;margin-top:11px}
.mbar i{display:block;height:100%}
.mkey{display:flex;flex-wrap:wrap;gap:13px;margin-top:9px;font-size:var(--t-meta);color:var(--ink-3)}
.mkey span{display:flex;align-items:center;gap:6px}
.mkey i{width:8px;height:8px;border-radius:2px;display:block}
.mval{font:700 var(--t-fig)/1 'Plus Jakarta Sans',system-ui,sans-serif;font-variant-numeric:tabular-nums;
    letter-spacing:-.026em;color:var(--ink)}
.mval small{font-size:var(--t-body);font-weight:600;color:var(--ink-3)}

/* ---- table ------------------------------------------------------------------- */
.tbl{width:100%;border-collapse:collapse;font-size:var(--t-body)}
.tbl th{text-align:left;font:600 var(--t-label)/1 inherit;letter-spacing:.075em;
    text-transform:uppercase;color:var(--ink-3);padding:0 13px 9px;white-space:nowrap}
.tbl td{padding:10px 13px;border-top:1px solid var(--line-soft);color:var(--ink-2);
    vertical-align:middle}
.tbl tr{cursor:pointer}
.tbl tbody tr:hover td{background:var(--raised)}
.tbl .num{font-family:'IBM Plex Sans',system-ui,sans-serif;font-variant-numeric:tabular-nums;
    text-align:right}
.tbl .who{font-weight:620;color:var(--ink)}
.tbl-wrap{overflow-x:auto}
.st{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:99px;
    font:600 var(--t-micro)/1.7 inherit;letter-spacing:.02em;white-space:nowrap}
.st-ok{background:var(--ok-wash);color:var(--ok)}
.st-warn{background:var(--warn-wash);color:var(--warn)}
.st-dang{background:var(--danger-wash);color:var(--danger)}
.st-info{background:var(--info-wash);color:var(--info)}
.st-mute{background:var(--sunken);color:var(--ink-3)}

/* ---- source badge: never let sample data pass as live ------------------------ */
.src{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:99px;
    font:600 var(--t-micro)/1.7 inherit;letter-spacing:.05em;text-transform:uppercase;
    background:var(--info-wash);color:var(--info)}
.src.live{background:var(--ok-wash);color:var(--ok)}

.stack-lg{display:flex;flex-direction:column;gap:14px}

/* ---- home: work on the left, what needs you on the right -------------------- */
.home-grid{display:grid;grid-template-columns:minmax(0,1fr) 372px;gap:16px;align-items:start;
    margin-top:16px}
.home-side .card{position:sticky;top:0}
@media(max-width:1180px){.home-grid{grid-template-columns:1fr}}

/* ---- topbar search (NOT .pal — that is the command-palette popup) ----------- */
.omnibtn{display:flex;align-items:center;gap:9px;height:var(--h-ctl);flex:1 1 auto;
    max-width:520px;padding:0 11px;border:1px solid var(--line);border-radius:var(--r-sm);
    background:var(--raised);color:var(--ink-3);cursor:pointer;font:400 var(--t-body)/1 inherit;
    text-align:left;transition:background .13s var(--ease),border-color .13s var(--ease)}
.omnibtn:hover{background:var(--surface);border-color:var(--ink-3)}
.omnibtn span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.omnibtn .ico{color:var(--ink-3)}

/* base.css sizes icons per context; these contexts are new here */
.rail-collapse .ico,.icon-btn .ico,.rs-btn .ico,.bb .ico{width:16px;height:16px}
.rs-btn .ico{width:17px;height:17px}
.bb .ico{width:14px;height:14px}

/* ---- page container --------------------------------------------------------
   NOT .app-c — that name belongs to the apps-launcher tile in base.css, which is
   a centred, clickable flex item. Borrowing it centred every page. */
.page{padding:20px 24px 28px;max-width:1560px}
@media(max-width:760px){.page{padding:16px 15px 24px}}

.pg-head{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:2px}
.pg-title{font:700 var(--t-h2)/1.2 inherit;letter-spacing:-.025em;color:var(--ink)}
.pg-sub{margin-top:5px;font-size:var(--t-meta);color:var(--ink-3);display:flex;
    align-items:center;gap:7px;flex-wrap:wrap}

/* rail items are anchors here (real URLs, middle-clickable) — base.css styled
   them as buttons, which never needed this reset */
.rail a.nav-a,.rail a.nav-a:visited{text-decoration:none}

/* the hero CTA must not sit on top of the sentence it belongs to */
.zh-b>.btn{flex:0 0 auto;white-space:nowrap;align-self:center}

/* A flex child will not shrink below its content width without this, which was
   pushing the hero CTA out past the card's right edge. */
.zh-txt{min-width:0}
.kpi-v,.mval{overflow-wrap:anywhere}

/* ---- action row -------------------------------------------------------------
   base.css makes .btn a flex container, so as a flex CHILD it happily shrinks
   to nothing. Every button in this row must keep its intrinsic width. */
.act-row{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start;padding:0 15px 14px}
.act-row>*{flex:0 0 auto}
.act-row .btn{flex:0 0 auto;white-space:nowrap}
.act-foot{padding:0 15px 15px;margin:0;font-size:var(--t-meta);color:var(--ink-3);line-height:1.5}
.act-foot b{color:var(--ink-2);font-weight:650}

/* a blocked action is a button plus its explanation, kept as one column */
.act-blk{display:flex;flex-direction:column;align-items:flex-start}

/* ---- record drawer ----------------------------------------------------------- */
.rec-scrim{position:fixed;inset:0;background:rgba(10,7,14,.38);backdrop-filter:blur(2px);
    opacity:0;pointer-events:none;transition:opacity .18s var(--ease);z-index:70}
.rec-scrim.on{opacity:1;pointer-events:auto}
.rec{position:fixed;top:0;right:0;height:100vh;width:min(470px,100vw);z-index:71;
    background:var(--surface);border-left:1px solid var(--line);box-shadow:var(--sh-3);
    display:flex;flex-direction:column;transform:translateX(102%);
    transition:transform .22s var(--ease)}
.rec.on{transform:none}
.rec-h{display:flex;align-items:flex-start;gap:12px;padding:16px 16px 14px;
    border-bottom:1px solid var(--line)}
.rec-h>div:first-child{flex:1 1 auto;min-width:0}
.rec-t{font:700 var(--t-h3)/1.25 inherit;letter-spacing:-.02em;color:var(--ink);
    overflow-wrap:anywhere}
.rec-s{margin-top:4px;font:400 var(--t-meta)/1.4 'IBM Plex Sans',system-ui,sans-serif;
    color:var(--ink-3)}
.rec-b{flex:1 1 auto;overflow-y:auto;padding:14px 16px}
.rkv{display:grid;grid-template-columns:minmax(96px,34%) 1fr;gap:1px 14px;align-items:baseline}
.rk{font:600 var(--t-label)/1.9 inherit;letter-spacing:.06em;text-transform:uppercase;
    color:var(--ink-3);padding:7px 0;border-bottom:1px solid var(--line-soft)}
.rv{font-size:var(--t-body);color:var(--ink);padding:7px 0;border-bottom:1px solid var(--line-soft);
    overflow-wrap:anywhere}
.rec-f{flex:0 0 auto;border-top:1px solid var(--line);padding:13px 16px;background:var(--raised)}
.rec-fk{font:600 var(--t-label)/1 inherit;letter-spacing:.08em;text-transform:uppercase;
    color:var(--ink-3);margin-bottom:10px}

/* ---- command palette --------------------------------------------------------- */
.pal-wrap{position:fixed;inset:0;z-index:90;display:flex;justify-content:center;
    align-items:flex-start;padding:11vh 16px 16px;background:rgba(10,7,14,.42);
    backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:opacity .16s var(--ease)}
.pal-wrap.on{opacity:1;pointer-events:auto}
.pal-in input::placeholder{color:var(--ink-3)}
.pal-i{display:flex;align-items:baseline;gap:10px;width:100%;padding:9px 12px;border:0;
    background:none;border-radius:var(--r-sm);cursor:pointer;text-align:left;font:inherit;
    color:var(--ink)}
.pal-i:hover,.pal-i.on{background:var(--raised)}
.pal-k{flex:0 0 auto;font:600 var(--t-micro)/1.7 inherit;letter-spacing:.05em;text-transform:uppercase;
    color:var(--ink-3);background:var(--sunken);border-radius:99px;padding:1px 8px}
.pal-l{flex:1 1 auto;font-size:var(--t-body);font-weight:600;overflow:hidden;
    text-overflow:ellipsis;white-space:nowrap}
.pal-sub{flex:0 0 auto;font-size:var(--t-meta);color:var(--ink-3)}

/* ---- mobile: the topbar search must not push its shortcut off-screen --------- */
@media(max-width:720px){
  .omnibtn .kbd{display:none}
  .omnibtn span{font-size:var(--t-meta)}
  .tier-k{display:none}
  /* the live/sample + environment + email readout is the least essential
     thing in an already-crowded topbar at this width -- tier and the
     avatar matter more for "who am I, what can I do" */
  #srcState{display:none}
  /* touch targets */
  .bb,.rs-btn,.nu{min-height:44px}
  .pal-i{min-height:44px}
}

/* Raise the control height on touch widths — one token lifts the topbar
   buttons, the tier control, the avatar and the search field together. */
@media(max-width:720px){
  :root{--h-ctl:44px}
  .nav-a{padding:11px 9px}
  .rs-btn{width:44px;height:44px}
  .rail-collapse{padding:12px 9px}
}

/* ---- sortable column headers -------------------------------------------------- */
.tbl th{padding:0 0 9px}
/* Zero horizontal padding above is deliberate for a SORTABLE header -- .th-s (the
   button inside it) carries its own 13px so the click target fills the cell edge
   to edge. Reports' hand-built tables use plain <th> with no sort button, so they
   got the zero too, and two adjacent narrow columns (Failed / Last sent) ran
   together with no gap -- caught live, "FAILEDLAST SENT". Restore the padding
   wherever there's no .th-s to supply it. */
.tbl th:not(:has(.th-s)){padding:0 13px 9px}
.th-s{display:inline-flex;align-items:center;gap:5px;width:100%;padding:0 13px 0;border:0;
    background:none;cursor:pointer;font:inherit;color:var(--ink-3);text-align:left;
    letter-spacing:inherit;text-transform:inherit;border-radius:var(--r-xs);
    transition:color .12s var(--ease)}
.tbl th.num .th-s{justify-content:flex-end}
.th-s:hover{color:var(--ink)}
.th-s.on{color:var(--ink)}
.th-i{font-size:var(--t-micro);opacity:.5}
.th-s.on .th-i{opacity:1;color:var(--accent)}

/* ---- stage pipeline board ----------------------------------------------------
   Added 2026-09-04, replacing the funnel card's bar list with a pastel-header
   count board — the single most recognizable piece of Zoho's own UI language,
   built from the same real T.applications/T.familiesWithApplicant/
   T.familiesEverTalked/T.hiresEver figures funnelHTML() already used; no new
   numbers, just a different encoding for the same funnel. */
.section-label{font:600 var(--t-label)/1 'Plus Jakarta Sans',system-ui,sans-serif;color:var(--ink-3);
    letter-spacing:.08em;text-transform:uppercase;margin:18px 0 9px}
.pipeline{display:flex;gap:2px;border-radius:var(--r-lg);overflow:visible;box-shadow:var(--sh-1);margin-bottom:4px}
.pstage{flex:1;min-width:0;background:var(--surface);position:relative;border:1px solid var(--line);
    cursor:pointer;font:inherit;text-align:left;padding:0;transition:background .14s var(--ease)}
.pstage:hover{background:var(--raised)}
.pstage:first-child{border-radius:var(--r-lg) 0 0 var(--r-lg)}
.pstage:last-child{border-radius:0 var(--r-lg) var(--r-lg) 0}
.pstage:not(:first-child){border-left:none}
.pstage-h{padding:8px 14px;font:600 var(--t-label)/1.4 inherit;letter-spacing:.06em;text-transform:uppercase}
.pstage:first-child .pstage-h{border-radius:calc(var(--r-lg) - 1px) 0 0 0}
.pstage:last-child .pstage-h{border-radius:0 calc(var(--r-lg) - 1px) 0 0}
.pstage-h.info{background:var(--info-wash);color:var(--info)}
.pstage-h.danger{background:var(--danger-wash);color:var(--danger)}
.pstage-body{padding:12px 14px 15px}
.pstage-n{font:800 var(--t-fig)/1 'Plus Jakarta Sans',system-ui,sans-serif;font-variant-numeric:tabular-nums;
    letter-spacing:-.025em;color:var(--ink)}
.pstage-n.zero{color:var(--danger)}
.pstage-l{margin-top:3px;font-size:var(--t-meta);color:var(--ink-3)}
.pstage-arrow{position:absolute;right:-11px;top:29px;width:22px;height:22px;background:var(--surface);
    border:1px solid var(--line);border-radius:99px;display:flex;align-items:center;justify-content:center;
    color:var(--ink-3);z-index:2}
.pstage-arrow svg{width:12px;height:12px}
@media(max-width:640px){
  .pipeline{flex-direction:column}
  .pstage{border-left:1px solid var(--line)!important;border-top:none}
  .pstage:first-child{border-radius:var(--r-lg) var(--r-lg) 0 0}
  .pstage:last-child{border-radius:0 0 var(--r-lg) var(--r-lg)}
  .pstage:not(:first-child){border-top:1px solid var(--line)}
  .pstage-arrow{right:auto;left:14px;top:-11px;transform:rotate(90deg)}
}

/* ---- funnel + city bars ------------------------------------------------------- */
.fn-note{margin:0 0 12px;font-size:var(--t-meta);line-height:1.5;color:var(--ink-3)}
.fn{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"l n" "t t";
    align-items:center;gap:3px 11px;width:100%;padding:7px 0;border:0;background:none;
    cursor:pointer;font:inherit;text-align:left;color:var(--ink-2)}
.fn-l{grid-area:l} .fn-n{grid-area:n} .fn-track{grid-area:t}
.fn:hover .fn-l{color:var(--ink)}
.fn-l{font-size:var(--t-meta);line-height:1.4;transition:color .12s var(--ease)}
.fn-track{height:8px;border-radius:99px;background:var(--sunken);overflow:hidden}
.fn-track i{display:block;height:100%;border-radius:99px;transition:width .3s var(--ease)}
.fn-n{font:700 var(--t-body)/1 'IBM Plex Sans',system-ui,sans-serif;
    font-variant-numeric:tabular-nums;color:var(--ink);min-width:34px;text-align:right}
.fn-n.zero{color:var(--danger)}

/* Sort controls are the newest tap targets and the smallest; give them a real
   hit area on touch without changing the header's visual density. */
@media(max-width:720px){
  .tbl th{padding-bottom:0}
  .th-s{min-height:44px;align-items:flex-end;padding-bottom:9px}
}

/* ---- topbar overflow at phone widths -------------------------------------------
   Measured: at 375px the topbar's content is 555px — 180px past the viewport,
   clipped rather than wrapped. Root cause is the classic flexbox trap: .omnibtn
   is flex:1 1 auto but flex items default to min-width:auto, so it refuses to
   shrink past its own content width no matter what flex-shrink says. Search
   was the item meant to give way and never could. */
.omnibtn{min-width:0}
@media(max-width:520px){
  .omnibtn span{display:none}          /* icon + placeholder-as-tooltip is enough at this width */
  .omnibtn{flex:0 0 auto;padding:0 10px}
  .tier{padding:0 8px;gap:4px}
  .tier b{max-width:64px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}
  .top-right{gap:4px}
}

/* ---- reports: supply against demand ------------------------------------------- */
.sd-key{display:flex;gap:14px;margin:0 0 10px;font-size:var(--t-meta);color:var(--ink-3)}
.sd-key span{display:flex;align-items:center;gap:6px}
.sd-key i{width:8px;height:8px;border-radius:2px;display:block}
.sd{display:grid;grid-template-columns:minmax(78px,20%) 1fr auto;align-items:center;gap:11px;
    padding:6px 0}
.sd-c{font-size:var(--t-meta);color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;
    white-space:nowrap}
.sd-bars{display:flex;flex-direction:column;gap:3px}
.sd-bars i{display:block;height:7px;border-radius:99px;min-width:2px;
    transition:width .3s var(--ease)}
.sd-n{font:700 var(--t-meta)/1 'IBM Plex Sans',system-ui,sans-serif;
    font-variant-numeric:tabular-nums;color:var(--ink);min-width:52px;text-align:right}
.sd-n em{font-style:normal;font-weight:600;color:var(--warn)}

/* ---- guided setup ------------------------------------------------------------- */
.gsx-h{display:flex;align-items:flex-start;gap:12px;padding:16px 16px 14px;
    border-bottom:1px solid var(--line)}
.gsx-h>div:first-child{flex:1 1 auto;min-width:0}
.gsx{display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:12px;width:100%;
    padding:13px 12px;margin-bottom:8px;border:1px solid var(--line);border-radius:var(--r);
    background:var(--surface);cursor:pointer;font:inherit;text-align:left;
    transition:border-color .13s var(--ease),background .13s var(--ease)}
.gsx:hover{background:var(--raised);border-color:var(--ink-3)}
.gsx-n{width:23px;height:23px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;
    background:var(--sunken);color:var(--ink-2);
    font:700 var(--t-meta)/1 'IBM Plex Sans',system-ui,sans-serif}
.gsx-n.ok{background:var(--ok-wash);color:var(--ok)}
.gsx-b{min-width:0}
.gsx-t{display:block;font-size:var(--t-body);font-weight:650;color:var(--ink);line-height:1.35}
.gsx-d{display:block;margin-top:4px;font-size:var(--t-meta);line-height:1.5;color:var(--ink-3)}
.gsx-c{font:700 var(--t-body)/1 'IBM Plex Sans',system-ui,sans-serif;
    font-variant-numeric:tabular-nums;flex:0 0 auto}
.gsx-c.hot{color:var(--accent)} .gsx-c.ok{color:var(--ok)}
.gsx-c{text-align:right;line-height:1.15}
.gsx-c em{display:block;margin-top:3px;font:600 var(--t-micro)/1.2 ui-sans-serif,system-ui,sans-serif;
    font-style:normal;color:var(--ink-3);letter-spacing:.02em}

/* ---- prose measure ------------------------------------------------------------
   A console can be 1440px wide; a sentence cannot. Explanatory text was running
   to ~179 characters per line on Reports at desktop width — roughly twice the
   readable maximum. Charts and tables still get the full width. */
.fn-note,.zh-s,.act-foot,.chart-note{max-width:74ch}
.sd-wrap{max-width:920px}
.kpi-s,.gsx-d{max-width:46ch}

/* ---- a finding, shown only when there is one ---------------------------------- */
.finding{display:flex;gap:11px;align-items:flex-start;padding:13px 15px;border-radius:var(--r);
    background:var(--warn-wash);border:1px solid color-mix(in srgb,var(--warn) 26%,transparent);
    font-size:var(--t-body);line-height:1.55;color:var(--ink-2);max-width:88ch}
.finding .ico{width:17px;height:17px;color:var(--warn);flex:0 0 auto;margin-top:1px}
.finding b{color:var(--ink);font-weight:650}

/* ---- page action slot ---------------------------------------------------------- */
.pg-head{justify-content:space-between}
.pg-act{flex:0 0 auto;display:flex;gap:8px}

/* ---- weekly trend columns ------------------------------------------------------ */
.trend{display:flex;align-items:flex-end;gap:5px;height:76px;padding:0 0 2px;
    border-bottom:1px solid var(--line)}
.tr-col{flex:1 1 0;height:100%;display:flex;align-items:flex-end;min-width:0}
.tr-col i{display:block;width:100%;border-radius:3px 3px 0 0;transition:height .3s var(--ease)}
.trend-x{display:flex;justify-content:space-between;margin-top:7px;
    font-size:var(--t-micro);color:var(--ink-3)}

/* ---- finding: severity carried by a word, not by the colour alone -------------- */
.finding{align-items:center}
.finding-k{flex:0 0 auto;font:700 var(--t-micro)/1.7 inherit;letter-spacing:.07em;
    text-transform:uppercase;color:var(--warn);background:var(--surface);
    border:1px solid color-mix(in srgb,var(--warn) 40%,transparent);
    border-radius:99px;padding:2px 9px}

/* a table nobody can click should not pretend otherwise */
.tbl-static tbody tr{cursor:default}
.tbl-static tbody tr:hover td{background:none}
.why.missing{color:var(--info)}

/* ---- sign-in --------------------------------------------------------------- */
body.signed-out .app,body.signed-out .toast{display:none}
.signin{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:24px;
    background:var(--ground)}
.signin-card{width:min(374px,100%);background:var(--surface);border:1px solid var(--line);
    border-radius:var(--r-lg);box-shadow:var(--sh-2);padding:24px}
.signin-brand{display:flex;align-items:center;gap:11px;margin-bottom:20px}
.signin-brand b{display:block;font-size:var(--t-h3);font-weight:700;letter-spacing:-.022em;color:var(--ink)}
.signin-brand span{display:block;font-size:var(--t-micro);font-weight:600;letter-spacing:.09em;
    text-transform:uppercase;color:var(--ink-3);margin-top:-1px}
.fld{width:100%;height:var(--h-ctl);padding:0 11px;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--raised);color:var(--ink);
    font:400 var(--t-body)/1 inherit;outline:0}
.fld:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-wash)}
.signin-err{margin-top:13px;padding:9px 11px;border-radius:var(--r-sm);
    background:var(--danger-wash);border:1px solid color-mix(in srgb,var(--danger) 26%,transparent);
    font-size:var(--t-meta);line-height:1.5;color:var(--ink-2)}
.signin-foot{margin:14px 0 0;font-size:var(--t-micro);line-height:1.55;color:var(--ink-3)}
.tier b{font-weight:650;color:var(--ink)}

/* The real logo is a filled mark, not a stroked icon; the rail tile was styled
   for a stroke. Let it paint its own fill and stop inheriting stroke rules. */
.rail-logo svg path{fill:currentColor;stroke:none}
.signin-brand .rail-logo svg path{fill:currentColor;stroke:none}
/* A figure that was never computed must not look like a measured zero. */
.nowired{color:var(--ink-3);cursor:help;border-bottom:1px dotted var(--line)}

/* ---- audited funnel section --------------------------------------------------- */
.fn-g{font:700 var(--t-label)/1 inherit;letter-spacing:.08em;text-transform:uppercase;
    color:var(--ink-3);padding-bottom:6px;border-bottom:1px solid var(--line-soft)}
.fn-g b{color:var(--ink-2);font-weight:700}
