/* ui.css — the shared Optima design system for every page.
   Single source for tokens, layout shells, components, states and the login card.
   Load BEFORE the page's own <style> so page-specific rules can still override.

   TOKEN CONTRACT (read before editing):
   - The LEGACY names (--navy, --magenta, --cyan, --purple, --indigo, --muted, --ios,
     --android) are what public.brand_skin.css_vars overrides. They are the skin's
     interface and must not be renamed without migrating every skin row.
   - The CANONICAL names (--brand, --accent, --accent-2, --support, --support-2) alias
     the legacy ones, so a skin change flows through automatically. New code uses the
     canonical names; a missed legacy reference degrades to the same value, not to nothing.
   - SEMANTIC tokens (--ok/--warn/--bad and their fills) are NEVER skinned. A client's
     brand may not recolour "this failed". No skin row may carry them.
   - --accent and --on-accent are a PAIR. White does not clear 4.5:1 on house magenta
     (3.36:1), which is why --on-accent is ink, not white. Any skin setting --accent must
     set --on-accent with it. Same for --brand / --on-brand.
   - --focus is deliberately not shared with a brand colour. Binding it to --cyan gave a
     1.94:1 ring under the Visa skin, against a 3:1 requirement. */

:root{
  /* ---- brand: the skin's interface (public.brand_skin.css_vars overrides these) ---- */
  --navy:#2F2158; --magenta:#F34B94; --cyan:#34A8CF; --purple:#9556AF; --indigo:#39468D;
  --ios:#39468D; --android:#34A8CF;
  /* canonical aliases — new code uses these */
  --brand:var(--navy); --accent:var(--magenta); --accent-2:var(--cyan);
  --support:var(--purple); --support-2:var(--indigo);
  /* paired foregrounds and the focus ring — skinnable, contrast-constrained */
  --on-accent:#22203A;   /* 4.68:1 on house magenta; white would be 3.36:1 */
  --on-brand:#ffffff;    /* 14.20:1 on house navy */
  --focus:#39468D;       /* 8.63:1 on white, 8.01:1 on --bg */

  /* ---- neutrals ---- */
  --ink:#22203a;
  --muted:#6E6480;       /* 5.13:1 on --bg. Was #81768F at 3.96:1 — failed AA at every size used */
  --line:#e7e6ef;
  --surface:#ffffff;
  --surface-2:#faf9fd;
  --bg:#f6f6fb;
  --na:#cfc9d8;
  --hover-line:#b6aed0;
  /* Button edges only. Deliberately darker than --line: a control's border has to say "press me",
     a table rule only has to say "these are different rows". */
  --btn-line:#c9c3dc;

  /* ---- semantics: never skinned ---- */
  --ok:#1E7D43;        --ok-bg:#e6f6ee;
  --warn:#8A5A00;      --warn-bg:#fdf3e2;   --warn-line:#f0dcb0;
  --bad:#c0143c;       --bad-bg:#fbe6ec;
  --neutral:#75707F;
  --star:#e0a30c;      --star-outline:#b08a2e;
  /* legacy semantic aliases */
  --green:var(--ok); --red:var(--bad);

  /* ---- type scale ---- */
  --t-xs:10px; --t-sm:11px; --t-base:12.5px; --t-md:13.5px;
  --t-lg:17px; --t-xl:20px; --t-2xl:24px; --t-hero:42px;

  /* ---- spacing (4px grid) ---- */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:24px; --s-6:40px;

  /* ---- radius ---- */
  --r-sm:6px; --r-md:9px; --r-lg:12px; --r-pill:999px;

  /* ---- elevation ---- */
  --shadow-sm:0 3px 12px rgba(34,32,58,.08);
  --shadow-pop:0 10px 30px rgba(34,32,58,.16);
  --shadow-modal:0 20px 60px rgba(34,32,58,.25);
  --scrim:rgba(34,32,58,.45);
  --scrim-heavy:rgba(34,32,58,.9);

  /* ---- page widths ---- */
  --w-page:1180px; --w-page-wide:1320px; --header-h:90px;
}

*{box-sizing:border-box}
body{margin:0;font-family:'Aptos','Segoe UI',system-ui,Arial,sans-serif;color:var(--ink);background:var(--bg)}

/* ---- page shells ---- */
.wrap{max-width:var(--w-page);margin:0 auto;padding:20px 24px 60px}
.wrap.narrow{max-width:460px;margin:32px auto}
.layout{display:grid;grid-template-columns:230px 1fr;max-width:var(--w-page-wide);margin:0 auto;
  min-height:calc(100vh - var(--header-h))}
.layout>nav,nav.side{padding:20px 16px;border-right:1px solid var(--line)}
.layout>nav h3,nav.side h3{font-size:var(--t-sm);text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin:16px 8px 8px}
.layout>nav button,nav.side button{display:block;width:100%;text-align:left;font:inherit;font-size:var(--t-md);
  background:transparent;border:none;border-radius:var(--r-sm);padding:8px 12px;cursor:pointer;color:var(--ink)}
.layout>nav button:hover,nav.side button:hover{background:var(--surface-2)}
.layout>nav button.active,nav.side button.active{background:var(--brand);color:var(--on-brand);font-weight:600}
.layout>main,main{padding:20px 24px 60px;min-width:0}

/* The accent strip is its own token pair so a tenant's two brand colours can drive it
   without an inline style. Defaults to the skin's accents; the portal points them at the
   signed-in organisation's accents (see §6.2 of the design principles). */
.bar{height:4px;background:linear-gradient(90deg,var(--bar-1,var(--accent)) 0 50%,var(--bar-2,var(--accent-2)) 50% 100%)}
/* The old in-flow footer. Kept only so a page that still hand-writes one does not look broken
   before nav.js removes it; nothing should be adding these. See .footband below. */
footer{max-width:var(--w-page);margin:0 auto;padding:0 24px 40px;color:var(--muted);font-size:var(--t-sm)}

/* FOOTER BAND. Full bleed at the very bottom, in the skin's own brand colour, so the page closes
   the way the header opens it. One line, small, quiet — it is a signature, not a paragraph.
   Body padding keeps it clear of the content instead of overlapping the last row of a table. */
body{padding-bottom:44px}
.footband{position:fixed;left:0;right:0;bottom:0;z-index:30;
  background:var(--brand);color:var(--on-brand);opacity:.96;
  padding:9px 24px;font-size:11.5px;line-height:1.3;letter-spacing:.2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media print{ .footband{position:static;opacity:1} body{padding-bottom:0} }

/* ---- headings ----
   Two levels only: a sentence-case page-region heading (h2.sec) for the sidebar shells,
   and an uppercase in-page section heading for everything else. Scoped to .wrap/.layout so
   a page rule can never outrank a shared component's own heading (the portal login-card bug). */
.wrap h2,.layout h2{font-size:var(--t-sm);font-weight:600;color:var(--brand);margin:var(--s-5) 0 var(--s-3);
  text-transform:uppercase;letter-spacing:.5px;display:flex;align-items:center;flex-wrap:wrap;gap:var(--s-2)}
.wrap h2.sec,.layout h2.sec{font-size:var(--t-lg);text-transform:none;letter-spacing:0;margin:0 0 4px;display:block}
.wrap h3.sec,.layout h3.sec,.panel>h3{font-size:var(--t-sm);font-weight:600;color:var(--brand);
  text-transform:uppercase;letter-spacing:.5px;margin:0 0 12px}
.sub{color:var(--muted);font-size:var(--t-base)}
/* a heading that carries a control on its right */
.wrap h2>.btn:last-child,.layout h2>.btn:last-child,h2.sec>.btn:last-child{margin-left:auto}

/* ---- panel + card ---- */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:16px 20px;margin-bottom:var(--s-4)}
.panel.flush{padding:0;overflow:hidden}
.panel.scroll{overflow:auto}
.panel.tight{padding:16px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);padding:12px}
.card.selectable{cursor:pointer}
.card.selectable:hover{border-color:var(--hover-line);background:var(--surface-2)}
.card.selectable.on{border-color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand);background:var(--surface-2)}

/* ---- buttons: one set everywhere ---- */
.btn{font:inherit;font-weight:600;letter-spacing:normal;text-transform:none;border:none;
  border-radius:var(--r-sm);padding:8px 16px;cursor:pointer}
.btn.primary{background:var(--accent);color:var(--on-accent)}
/* A ghost button's border was --line (#e7e6ef), the same hairline used to separate table rows. At
   that weight it read as text sitting on the page rather than something to press — reported on the
   Tracker's "Mark every invite sent" and "Copy the chase list", and true of every ghost button in
   the tool. --btn-line is a step darker: still quiet next to a primary, but unmistakably an edge.
   Changed globally on purpose. Two patched pages would have left the same doubt everywhere else. */
.btn.ghost{background:var(--surface);border:1px solid var(--btn-line);color:var(--ink);font-weight:500}
.btn.confirm,.btn.green{background:var(--ok);color:#fff}          /* .green kept as a legacy alias */
.btn.danger{background:var(--surface);border:1px solid var(--bad);color:var(--bad);font-weight:500}
.btn.small{padding:4px 12px;font-size:var(--t-base);font-weight:500}
.btn.end{margin-left:auto}
.btn.bottom{align-self:flex-end}
.btn:disabled{opacity:.45;cursor:default}
.btn.primary:not(:disabled):hover,.btn.confirm:not(:disabled):hover,.btn.green:not(:disabled):hover{filter:brightness(.92)}
.btn.ghost:not(:disabled):hover{background:var(--surface-2);border-color:var(--hover-line)}
.btn.danger:not(:disabled):hover{background:var(--bad-bg)}
/* round icon button — resets a filter bar back to its defaults (use with .ghost) */
.btn.reset,.btn.icon{width:38px;height:38px;padding:0;border-radius:50%;display:inline-flex;
  align-items:center;justify-content:center;color:var(--muted);flex:0 0 auto}
.btn.reset svg,.btn.icon svg{width:17px;height:17px;display:block}
.btn.reset:not(:disabled):hover,.btn.icon:not(:disabled):hover{background:var(--surface-2);border-color:var(--hover-line);color:var(--brand)}

/* ---- keyboard focus for every interactive control ---- */
button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,
a:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--focus);outline-offset:2px}

/* ---- filter rows and form controls ---- */
.controls{display:flex;gap:16px;flex-wrap:wrap;margin:8px 0 16px;align-items:flex-end}
.controls label,label.fl{display:block;font-size:var(--t-sm);text-transform:uppercase;letter-spacing:.6px;
  color:var(--muted);margin-bottom:4px}
select,input[type=search],input[type=email],input[type=password],input[type=text],
input[type=number],input[type=url],input[type=date],textarea{font:inherit;padding:8px 12px;
  border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);color:var(--ink)}
.controls select{min-width:170px}
input[aria-invalid="true"],select[aria-invalid="true"],textarea[aria-invalid="true"]{border-color:var(--bad)}
.fieldnote{font-size:var(--t-base);color:var(--muted);margin-top:4px}
.fieldnote.err{color:var(--bad)}
input[type=color]{width:46px;height:34px;padding:4px;border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--surface);cursor:pointer}

/* segmented control — one implementation. .sm for in-panel, .on-dark for the navy header. */
.seg{display:inline-flex;border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden;background:var(--surface)}
.seg button{font:inherit;font-size:var(--t-md);border:none;background:var(--surface);color:var(--ink);
  padding:8px 16px;cursor:pointer;display:flex;gap:8px;align-items:center}
.seg button+button{border-left:1px solid var(--line)}
.seg button.on,.seg button[aria-selected="true"]{background:var(--brand);color:var(--on-brand);font-weight:600}
.seg button[aria-disabled="true"]{opacity:.45;cursor:default}
.seg.sm button{padding:4px 12px;font-size:var(--t-base)}
.seg button img{width:14px;height:14px;filter:saturate(0) brightness(0)}
.seg button.on img,.seg button[aria-selected="true"] img{filter:saturate(0) brightness(0) invert(1)}
/* the inverse treatment, for a segmented control sitting on the brand-coloured header.
   The flags are inline SVG rather than <img>, so the greyscale filter above does not reach them. */
.seg.on-dark{background:transparent;border-color:rgba(255,255,255,.35)}
.seg.on-dark button{background:rgba(255,255,255,.08);color:var(--on-brand)}
.seg.on-dark button+button{border-left:1px solid rgba(255,255,255,.25)}
.seg.on-dark button.on{background:var(--on-brand);color:var(--brand)}
.seg.on-dark button:focus-visible{outline:2px solid var(--on-brand);outline-offset:-2px}

/* staff-only skin preview picker in the header (#skinSlot) */
.skinwrap{display:inline-flex;align-items:center;gap:8px}
.skinwrap:empty{display:none}
.skinwrap .skinlbl{font-size:var(--t-sm);text-transform:uppercase;letter-spacing:.6px;color:rgba(255,255,255,.7);margin:0}
.skinwrap select{min-width:auto;padding:8px 8px;font-size:var(--t-base)}

/* ---- status chip: ONE name, one geometry ---- */
/* INFO MARK AND ITS TIP. Promoted from review.html on 25 August 2026 when Admin's bug reports
   became the second user (§8.1: anything that turns up on a second page moves here that day).
   It is how a page explains itself without spending height on prose you have read once.
   Hover AND focus, so the text is reachable from the keyboard as well as the pointer. */
.info{position:relative;display:inline-flex;width:18px;height:18px;color:var(--muted);cursor:help;vertical-align:-3px;border-radius:4px}
.info svg{width:14px;height:14px;margin:auto}
.info:hover,.info:focus{color:var(--indigo);outline:2px solid var(--focus);outline-offset:1px}
.deftip{display:none;position:absolute;bottom:calc(100% + 6px);left:-8px;z-index:40;width:280px;
  background:var(--navy);color:#fff;font-size:12px;line-height:1.45;font-weight:400;
  border-radius:6px;padding:8px 10px;box-shadow:0 6px 20px rgba(0,0,0,.22);text-transform:none;letter-spacing:0}
.info:hover .deftip,.info:focus .deftip{display:block}

.chip{display:inline-block;font-size:var(--t-sm);font-weight:600;border-radius:var(--r-pill);
  padding:4px 8px;white-space:nowrap}
.chip.ok{background:var(--ok-bg);color:var(--ok)}
.chip.warn{background:var(--warn-bg);color:var(--warn);border:1px solid var(--warn-line)}
.chip.bad{background:var(--bad-bg);color:var(--bad)}
.chip.mut{background:var(--surface-2);color:var(--muted)}
.chip.info{background:var(--surface-2);color:var(--support-2)}

/* ---- tables: one base, opt-in modifiers ---- */
table.data{width:100%;border-collapse:collapse;font-size:var(--t-base)}
table.data th{font-size:var(--t-sm);font-weight:600;text-transform:uppercase;letter-spacing:.5px;
  color:var(--support-2);text-align:left;background:var(--surface-2);padding:8px 12px;
  border-bottom:1px solid var(--line)}
table.data td{padding:8px 12px;border-bottom:1px solid var(--line);vertical-align:top}
table.data tr:last-child td{border-bottom:none}
table.data td.num,table.data th.num{text-align:right;font-variant-numeric:tabular-nums}
table.data.sticky th{position:sticky;top:0;z-index:2}
table.data.bordered th,table.data.bordered td{border:1px solid var(--line)}
table.data.compact th,table.data.compact td{padding:4px 8px;font-size:var(--t-sm)}
table.data tr.retired td{opacity:.5}

/* ---- info (i) hover on charts (chart-info.js) ---- */
.ci-badge{display:inline-flex;width:16px;height:16px;border-radius:50%;background:var(--muted);color:#fff;
  font-size:var(--t-sm);font-weight:700;font-style:italic;align-items:center;justify-content:center;cursor:help;
  position:relative;margin-left:8px;vertical-align:middle;user-select:none}
.ci-badge .ci-pop{display:none;position:absolute;top:130%;left:0;z-index:60;width:300px;max-width:78vw;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:var(--shadow-pop);
  padding:12px 12px;font-size:12px;font-style:normal;font-weight:400;color:var(--ink);text-align:left;
  line-height:1.42;white-space:normal}
.ci-badge:hover .ci-pop,.ci-badge:focus .ci-pop,.ci-badge:focus-within .ci-pop{display:block}
.ci-pop .ci-h{display:block;font-weight:700;color:var(--brand);margin-bottom:4px}
.ci-pop .ci-b{display:block}
.ci-pop .ci-m{display:block;margin-top:8px;color:var(--muted)}
.ci-pop .ci-s{display:block;margin-top:8px;color:var(--muted);font-size:var(--t-sm)}

/* ---- shared data-region states ---- */
.loading,.empty{padding:32px;text-align:center;color:var(--muted)}
.error{padding:32px;text-align:center;color:var(--bad)}
/* Inline status beside the control it belongs to. The state modifier is what makes a failure
   distinguishable from a success without reading it — four of the five old page-level .msg
   declarations had no state colours at all, so "✓ Uploaded." and "Failed: …" were the same grey. */
.msg{font-size:var(--t-base);min-height:16px;color:var(--muted)}
.msg.ok{color:var(--ok)}
.msg.err{color:var(--bad)}
.msg.busy{color:var(--muted)}
.msg.after{margin-left:12px}
.msg.below{margin-top:12px}
.note{font-size:var(--t-base);color:var(--muted)}
.muted{color:var(--muted)}

/* ---- dialog: one overlay, one modal. Behaviour lives in ui.js (Modal/Confirm).
   The class sets display:flex, so [hidden] MUST be re-asserted or the dialog is
   permanently on screen — this has bitten twice. ---- */
.overlay{position:fixed;inset:0;background:var(--scrim);display:flex;align-items:flex-start;
  justify-content:center;padding:6vh 16px;z-index:50;overflow:auto}
.overlay[hidden]{display:none}
.modal{background:var(--surface);border-radius:var(--r-lg);max-width:560px;width:100%;
  box-shadow:var(--shadow-modal);max-height:88vh;overflow:auto}
.modal>header{background:var(--surface);color:var(--ink);border-bottom:1px solid var(--line);padding:16px 20px}
.modal>header h2,.modal>header h3{margin:0;font-size:var(--t-lg);color:var(--brand);
  text-transform:none;letter-spacing:0}
.modal .body{padding:20px 20px}
.modal .foot{padding:16px 20px;border-top:1px solid var(--line);display:flex;
  justify-content:flex-end;gap:12px;align-items:center}
.modal .foot.spread{justify-content:space-between}
.modal label{display:block;font-size:var(--t-sm);text-transform:uppercase;letter-spacing:.6px;
  color:var(--muted);margin:12px 0 4px}
/* Text-like fields fill the dialog; swatches, files and tick boxes keep their intrinsic size.
   A blanket `.modal input{width:100%}` sits later in the cascade than input[type=color] at the
   same specificity, so it would stretch the skin editor's colour swatches to full width. */
.modal input:not([type=color]):not([type=file]):not([type=checkbox]):not([type=radio]),
.modal select,.modal textarea{width:100%}
.modal .row2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.field{margin-bottom:16px}
.field label{display:block;font-size:var(--t-sm);text-transform:uppercase;letter-spacing:.6px;
  color:var(--muted);margin-bottom:4px}
.field .hint{font-size:var(--t-base);color:var(--muted);margin-top:4px}

/* ---- toast (ui.js) ---- */
.toasts{position:fixed;top:16px;right:16px;z-index:80;display:flex;flex-direction:column;gap:8px}
.toast{background:var(--surface);border:1px solid var(--line);border-left:3px solid var(--ok);
  border-radius:var(--r-sm);box-shadow:var(--shadow-pop);padding:12px 16px;font-size:var(--t-base);
  max-width:340px;color:var(--ink)}
.toast.err{border-left-color:var(--bad)}
.toast.warn{border-left-color:var(--warn)}

/* ---- login card (identical on every page) ---- */
.login-wrap{max-width:380px;margin:8vh auto;padding:0 24px}
.login-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:28px 24px;box-shadow:var(--shadow-sm)}
.login-card h2{margin:0 0 4px;font-size:18px;color:var(--brand);text-transform:none;letter-spacing:0;display:block}
.login-card p{margin:0 0 20px;font-size:13px;color:var(--muted)}
.login-card label{display:block;font-size:var(--t-sm);text-transform:uppercase;letter-spacing:.6px;
  color:var(--muted);margin:12px 0 4px}
.login-card input{width:100%;min-width:0}
.login-card button{width:100%;margin-top:20px;font:inherit;font-weight:600;background:var(--accent);
  color:var(--on-accent);border:none;border-radius:var(--r-sm);padding:12px;cursor:pointer}
.login-card button:disabled{opacity:.6}
.err{color:var(--bad);font-size:var(--t-base);margin-top:12px;min-height:16px}

/* ---- the Explorer view (explorer-view.js) ----
   Shared by the staff Explorer and the client portal's Explorer section, which used to hold
   two copies of every rule below. The only structural difference is the quarter-on-quarter
   delta column, which is staff-only — hence .catrow.with-delta rather than a second .catrow. */
.provhdr{display:flex;gap:12px;align-items:center;margin:4px 0 16px}
.provhdr img.logo{width:40px;height:40px;border-radius:var(--r-md);object-fit:contain;background:var(--surface);border:1px solid var(--line);padding:4px}
.provhdr .pn{font-size:var(--t-xl);font-weight:700;color:var(--brand)}
.provhdr .pm{font-size:var(--t-base);color:var(--muted)}

.sarow{display:flex;gap:12px;padding:8px 4px;border-bottom:1px solid var(--line);font-size:13px;align-items:baseline}
.sarow:last-of-type{border-bottom:none}
.sarow .sad{color:var(--muted);font-size:var(--t-sm);white-space:nowrap;font-variant-numeric:tabular-nums;flex:none;width:86px}
.sarow .sav{color:var(--support-2);font-weight:600;font-size:var(--t-sm);white-space:nowrap;flex:none}
.sarow .san{color:var(--ink)}

.head{display:flex;gap:28px;flex-wrap:wrap;align-items:flex-end;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:20px 20px}
.head .big{font-size:var(--t-hero);font-weight:800;color:var(--brand);line-height:1}
.head .big small{font-size:var(--t-xl);font-weight:600;color:var(--muted)}
.head .k{font-size:var(--t-sm);text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin-bottom:8px}
.head .rate{font-size:22px;font-weight:700;color:var(--brand-text,var(--accent))}
.head .split{display:flex;gap:20px;flex-wrap:wrap;align-items:center;font-size:13px;border-left:1px solid var(--line);padding-left:24px}
.head .split .pf{display:flex;gap:8px;align-items:center}
.head .split img{width:17px;height:17px}
.head .split b{color:var(--brand)}
.head .diff{font-size:var(--t-base);color:var(--muted)}

.legend{display:flex;gap:16px;align-items:center;font-size:12px;color:var(--muted);margin-bottom:12px;flex-wrap:wrap}
.legend span{display:flex;gap:8px;align-items:center}
.legend img{width:14px;height:14px}
.legend i.sw{width:14px;height:10px;border-radius:3px;display:inline-block}
.legend i.mk{width:2px;height:12px;display:inline-block}

/* a real <button>, so the category drill-down is keyboard-operable; the UA button styling is
   reset back to the row it looks like */
.catrow{display:grid;grid-template-columns:200px 1fr 116px;align-items:center;gap:16px;padding:8px 12px;
  border:1px solid #d2cce0;border-radius:7px;margin-bottom:4px;cursor:pointer;
  width:100%;font:inherit;color:inherit;text-align:left;background:var(--surface)}
.catrow.with-delta{grid-template-columns:200px 1fr 116px 40px}
.catrow:hover{background:var(--surface-2);border-color:var(--hover-line)}
.catname{display:flex;gap:8px;align-items:center;font-size:13px;line-height:1.2}
.catname img{width:18px;height:18px;flex:none}
.cbar{position:relative;height:22px;background:#efe9f4;border-radius:5px}
.cfill{position:absolute;left:0;top:0;bottom:0;background:var(--accent);border-radius:5px;opacity:.9}
.cmk{position:absolute;width:0;border-left:2px solid;border-radius:1px}
.cmk.ios{top:0;height:11px;border-color:var(--ios)}
.cmk.and{bottom:0;height:11px;border-color:var(--android)}
.ccount{font-size:12px;text-align:right}
.ccount b{color:var(--brand);font-variant-numeric:tabular-nums}
.ccount span{display:block;color:var(--muted);font-size:var(--t-xs)}
.cdelta{text-align:right;font-weight:700;font-size:13px}
.cdelta.pos{color:var(--ok)}.cdelta.neg{color:var(--bad)}.cdelta.zero{color:var(--muted)}

.flt{display:flex;gap:16px;align-items:center;margin-bottom:8px;flex-wrap:wrap}
.flt label.cb{font-size:13px;display:flex;gap:8px;align-items:center;cursor:pointer}

.acc{margin-bottom:16px}
.acchdr{width:100%;display:flex;gap:12px;align-items:center;background:#f1eef8;border:1px solid #c2bbd7;
  border-bottom:none;border-radius:var(--r-sm) var(--r-sm) 0 0;font:inherit;padding:12px 12px;cursor:pointer;text-align:left}
.acchdr:hover{background:#e9e4f3}
.acchdr img.ci{width:19px;height:19px;flex:none}
.acchdr .an{font-weight:600;color:var(--ink);font-size:var(--t-md);flex:1}
.acchdr .ac{font-size:var(--t-base);color:var(--muted);font-variant-numeric:tabular-nums;margin-right:8px}
.acchdr .ex{width:20px;height:20px;border-radius:5px;background:var(--surface);border:1px solid #c2bbd7;
  color:var(--brand);font-weight:700;display:flex;align-items:center;justify-content:center;font-size:15px}
.accbody{padding:0}

/* the feature matrix: centred, fully bordered — a genuinely different table from table.data */
table.fd{font-size:13px}
table.fd th{font-size:var(--t-sm);text-transform:uppercase;letter-spacing:.4px;color:var(--muted);
  text-align:center;padding:8px 12px;border:1px solid #c2bbd7;background:var(--surface-2);font-weight:600}
table.fd th.fn{text-align:left}
table.fd th img{width:14px;height:14px;vertical-align:-2px;margin-right:4px}
table.fd td{padding:8px 12px;border:1px solid #c2bbd7;vertical-align:top}
table.fd td.p{text-align:center;width:96px}
table.fd td .def{color:var(--muted);font-size:12px}

.tick{color:var(--ok)}.cross{color:var(--bad)}.na{color:var(--na)}
.tick svg,.cross svg{width:15px;height:15px;vertical-align:-2px}
svg.trend{width:100%;height:200px;display:block}

/* ---- layout utilities ----
   An inline style on an HTML element is a missing utility class. These cover the nudges that
   recur across pages; anything genuinely one-off stays inline rather than growing this list.
   Spacing is on the 4px grid — an off-grid inline value (6px, 10px) is left alone rather than
   silently snapped, because that would be a visual change made for tidiness. */
.m-0{margin:0}
.mt-1{margin-top:var(--s-1)}   .mb-1{margin-bottom:var(--s-1)}
.mt-2{margin-top:var(--s-2)}   .mb-2{margin-bottom:var(--s-2)}
.mt-3{margin-top:var(--s-3)}   .mb-3{margin-bottom:var(--s-3)}
.mt-4{margin-top:var(--s-4)}   .mb-4{margin-bottom:var(--s-4)}
.mt-5{margin-top:var(--s-5)}   .mb-5{margin-bottom:var(--s-5)}
.w-full{width:100%}
.nowrap{white-space:nowrap}
.right{text-align:right}
.scroll-y{overflow:auto}
.end{margin-left:auto}
.grow{flex:1;min-width:0}

/* a redirect/notice page borrows the card geometry but is not a login card */
.notice-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:28px 24px;box-shadow:var(--shadow-sm)}
.notice-card h2{margin:0 0 4px;font-size:18px;color:var(--brand)}
.notice-card p{margin:0;font-size:13px;color:var(--muted)}
