/* =============================================================================
   dashboard.css : shared style foundation for Celero / Acelero dashboards
   -----------------------------------------------------------------------------
   Distilled from celero_brand_direction.html, celero_ui_components.html and
   product-dashboard.htm so every new dashboard starts from one vocabulary.

   Usage, in each dashboard's <head>:
     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
     <link rel="stylesheet" href="../shared/dashboard.css">
   Then add only the dashboard-specific rules in a local <style> block.

   The @import below is a fallback so the file also works when linked alone;
   the explicit <link> tags above are faster (preconnect + no CSS-in-CSS wait).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================ DESIGN TOKENS ================================
   These are also the canonical chart palette: CeleroDashboard.initCharts()
   in dashboard.js reads --cobalt/--cobalt-bright/--coral/--ink/--slate/
   --slate-light/--good/--bad/--paper-dim live off :root at runtime, so a
   dashboard's Chart.js colours never drift from these values - change a
   token here and every chart picks it up, no hunting through per-dashboard
   hex codes. ========================================================== */
:root{
  /* Brand */
  --ink:#0C0F14;
  --cobalt:#1B3A6B;
  --cobalt-bright:#3462AD;
  --coral:#FF6247;
  --coral-dim:rgba(255,98,71,0.12);

  /* Surfaces */
  --paper:#F6F3EC;
  --paper-dim:#EDE8DE;
  --card:#FFFFFF;

  /* Text + lines */
  --slate:#5B6472;
  --slate-light:#8891A0;
  --line:rgba(12,15,20,0.14);

  /* Status */
  --good:#1B8A5A;
  --bad:#B23A2E;

  /* Shape */
  --radius:14px;
  --radius-sm:5px;

  /* Type stacks */
  --font-display:'Space Grotesk', -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body:'Inter', -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* --- Aliases: names used by older dashboards, kept so they can adopt this
         file without a rename pass. Prefer the canonical names above. --- */
  --bg:var(--paper);
  --border:var(--line);
  --dim:var(--slate);
  --green:var(--good);
  --red:var(--bad);

  /* --- Theme-internal helpers: not part of the brand vocabulary above, just
         plumbing so component rules stay theme-agnostic instead of hardcoding
         a light-mode value (#fff, a specific grey) that would go wrong under
         :root[data-theme="dark"] below. --- */
  --ink-contrast:#fff;             /* text/icon colour on top of a var(--ink) chip */
  --row-tint:rgba(237,232,222,.55); /* subtle stripe (row-group / row-cat) over a card */
  --scrollbar-thumb:#b7b7bb;
  --scrollbar-thumb-hover:#8f8f94;
}

/* ============================= DARK THEME ==================================
   Toggled via the moon/sun row in the sidebar Settings menu - see
   mountSettingsMenu() in dashboard.js, which sets data-theme on <html> and
   persists the choice to localStorage. Each dashboard's own <head> also runs
   a small inline script before this stylesheet's first paint that applies
   the stored (or OS-preferred) theme, so there's no light-mode flash on load.
   Every rule elsewhere in this file is written against the tokens below, not
   literal colours, so this block is the only place a light/dark swap has to
   happen - component rules never need their own dark variant. The handful
   that still do (alpha-blended backgrounds baked from a light-mode hex, e.g.
   .badge/.alert) get a targeted override at the bottom of this block instead
   of a new token, since they're one-offs rather than reused values. */
:root[data-theme="dark"]{
  --ink:#EDEBE4;
  --cobalt:#3D6CB0;
  --cobalt-bright:#6C9BDE;
  --coral:#FF6247;
  --coral-dim:rgba(255,98,71,0.18);

  --paper:#14161C;
  --paper-dim:#1D212A;
  --card:#20242E;

  --slate:#9BA3B4;
  --slate-light:#6B7383;
  --line:rgba(255,255,255,0.12);

  --good:#2FBE81;
  --bad:#E2594A;

  --ink-contrast:#14161C;
  --row-tint:rgba(255,255,255,.05);
  --scrollbar-thumb:#3a3f4a;
  --scrollbar-thumb-hover:#4d5361;
}
:root[data-theme="dark"] .badge.up{background:rgba(47,190,129,.18);}
:root[data-theme="dark"] .badge.down{background:rgba(226,89,74,.18);}
:root[data-theme="dark"] .badge.signal{background:rgba(255,98,71,.18);}
:root[data-theme="dark"] .alert-info{background:rgba(52,98,173,0.16);border-color:rgba(108,155,222,0.35);}
:root[data-theme="dark"] .alert-warn{background:rgba(255,98,71,0.14);border-color:rgba(255,98,71,0.4);color:#FF9478;}

/* ==================== REFERENCE-BRAND PALETTES (design exploration) ====================
   Not Celero brand options - borrowed swatches from outside companies, added so the
   sidebar palette switcher (mountPaletteSwitcher() in dashboard.js) can preview how the
   dashboard's layout/type/charts read under a completely different colour identity.
   Each overrides the same token set as :root / :root[data-theme="dark"] above; --good/
   --bad are left close to their originals across all three so up/down still reads at a
   glance. Swap or delete freely - see the comment above PALETTES in dashboard.js. */

/* Polestar: monochrome graphite + a single muted gold accent, minimal automotive feel. */
:root[data-palette="polestar"]{
  --ink:#141414;
  --cobalt:#3C3C3C;
  --cobalt-bright:#6E6E6E;
  --coral:#C9A227;
  --coral-dim:rgba(201,162,39,0.14);
  --paper:#F5F5F3;
  --paper-dim:#EAEAE6;
  --card:#FFFFFF;
  --slate:#63635F;
  --slate-light:#93938D;
  --line:rgba(20,20,20,0.14);
  --good:#1B8A5A;
  --bad:#B23A2E;
}
:root[data-palette="polestar"][data-theme="dark"]{
  --ink:#F2F2F0;
  --cobalt:#8A8A8A;
  --cobalt-bright:#B5B5B0;
  --coral:#D9B84A;
  --coral-dim:rgba(217,184,74,0.18);
  --paper:#0A0A0A;
  --paper-dim:#161616;
  --card:#1C1C1C;
  --slate:#9C9C97;
  --slate-light:#6E6E6A;
  --line:rgba(255,255,255,0.12);
  --good:#2FBE81;
  --bad:#E2594A;
  --ink-contrast:#0A0A0A;
}

/* Stripe: signature indigo + navy ink, warm pink-coral accent for contrast. */
:root[data-palette="stripe"]{
  --ink:#0A2540;
  --cobalt:#635BFF;
  --cobalt-bright:#8C85FF;
  --coral:#FF5C93;
  --coral-dim:rgba(255,92,147,0.12);
  --paper:#F6F5FF;
  --paper-dim:#ECEAFE;
  --card:#FFFFFF;
  --slate:#425466;
  --slate-light:#7C8CA3;
  --line:rgba(10,37,64,0.12);
  --good:#1B8A5A;
  --bad:#B23A2E;
}
:root[data-palette="stripe"][data-theme="dark"]{
  --ink:#F6F9FC;
  --cobalt:#8C85FF;
  --cobalt-bright:#A8A2FF;
  --coral:#FF7FAE;
  --coral-dim:rgba(255,127,174,0.18);
  --paper:#0A2540;
  --paper-dim:#112D4E;
  --card:#16325C;
  --slate:#9BA9C0;
  --slate-light:#6B7C94;
  --line:rgba(255,255,255,0.12);
  --good:#2FBE81;
  --bad:#E2594A;
}

/* Bloomberg Terminal: black/amber data-terminal look. --cobalt drives the sidebar bg
   (white nav text sits on it) and stays near-black in both modes - the terminal's
   chrome is always dark - so the amber identity lives in --coral/--cobalt-bright
   instead, which only ever sit on light card/paper surfaces or as accents, never as
   a full-bleed background under white text. Light variant is a warm cream stand-in
   since the source has no real light mode - the dark variant is the point. */
:root[data-palette="bloomberg"]{
  --ink:#161616;
  --cobalt:#161616;
  --cobalt-bright:#45433C;
  --coral:#B45F06;
  --coral-dim:rgba(180,95,6,0.12);
  --paper:#FAF6EE;
  --paper-dim:#F0EADA;
  --card:#FFFFFF;
  --slate:#6B6558;
  --slate-light:#9A9382;
  --line:rgba(22,22,22,0.14);
  --good:#1B8A5A;
  --bad:#B23A2E;
}
:root[data-palette="bloomberg"][data-theme="dark"]{
  --ink:#E8E6DE;
  --cobalt:#0A0A0A;
  --cobalt-bright:#D9A54A;
  --coral:#FF9F1C;
  --coral-dim:rgba(255,159,28,0.18);
  --paper:#000000;
  --paper-dim:#0D0D0D;
  --card:#111111;
  --slate:#8A8578;
  --slate-light:#5C584D;
  --line:rgba(255,159,28,0.18);
  --good:#3ED598;
  --bad:#FF3B5C;
  --ink-contrast:#000000;
}

/* Finance/tech reference-brand palettes, same convention as Polestar/
   Stripe/Bloomberg above: --coral and --cobalt-bright carry the brand's
   actual Accent colour (the single-metric "Signal Coral" marker and the
   light/focus accent respectively), each mode using that scheme's own
   light/dark Accent value. --good/--bad take each scheme's Positive/
   Negative directly.

   --cobalt (sidebar background, under white nav text, plus primary chart/
   button colour - by far the most visible token) uses that same Accent
   value too where it's dark/saturated enough for white text to stay
   readable on it (checked against WCAG contrast, matching the existing
   Stripe palette's ~4.7:1 precedent): Bridgewater, Nasdaq, Mercury.
   Where the given Accent is too pale in a mode (Wise, Plaid in both modes;
   American Express in dark mode only - all below ~4:1), --cobalt falls
   back to that scheme's own dark-mode Surface colour instead, the same
   safe-neutral approach Bloomberg Terminal uses, so the sidebar never gets
   a low-contrast background under white text.

   Palantir, Interactive Brokers and Datadog were dropped - too close to
   Plaid (Palantir/IBKR: same near-black fallback --cobalt plus a
   cyan/teal accent in the same family as Plaid's) and Mercury (Datadog:
   same purple-accent family) respectively to read as distinct options. */
:root[data-palette="bridgewater"]{
  --ink:#14161A;
  --cobalt:#2E5AAC;
  --cobalt-bright:#2E5AAC;
  --coral:#2E5AAC;
  --coral-dim:rgba(46,90,172,0.12);
  --paper:#F5F5F3;
  --paper-dim:#E7E7E5;
  --card:#FFFFFF;
  --slate:#5A5F68;
  --slate-light:#898E97;
  --line:rgba(20,22,26,0.14);
  --good:#2E8A57;
  --bad:#A8402C;
}
:root[data-palette="bridgewater"][data-theme="dark"]{
  --ink:#F2F2F0;
  --cobalt:#2E5AAC;
  --cobalt-bright:#2E5AAC;
  --coral:#2E5AAC;
  --coral-dim:rgba(46,90,172,0.18);
  --paper:#14161A;
  --paper-dim:#222428;
  --card:#1E2126;
  --slate:#8B909A;
  --slate-light:#5C616B;
  --line:rgba(255,255,255,0.12);
  --good:#3FA66B;
  --bad:#C0503A;
  --ink-contrast:#14161A;
}

:root[data-palette="nasdaq"]{
  --ink:#0A0F1E;
  --cobalt:#2258C7;
  --cobalt-bright:#2258C7;
  --coral:#2258C7;
  --coral-dim:rgba(34,88,199,0.12);
  --paper:#F3F5FA;
  --paper-dim:#E5E7EC;
  --card:#FFFFFF;
  --slate:#4E5A78;
  --slate-light:#7D89A7;
  --line:rgba(10,15,30,0.14);
  --good:#22915F;
  --bad:#C93438;
}
:root[data-palette="nasdaq"][data-theme="dark"]{
  --ink:#EDEFF5;
  --cobalt:#2F6FED;
  --cobalt-bright:#2F6FED;
  --coral:#2F6FED;
  --coral-dim:rgba(47,111,237,0.18);
  --paper:#0A0F1E;
  --paper-dim:#181D2C;
  --card:#101832;
  --slate:#7480A0;
  --slate-light:#455171;
  --line:rgba(255,255,255,0.12);
  --good:#2FB37C;
  --bad:#E5484D;
  --ink-contrast:#0A0F1E;
}

:root[data-palette="wise"]{
  --ink:#10130C;
  --cobalt:#191B14;
  --cobalt-bright:#4C9A2A;
  --coral:#4C9A2A;
  --coral-dim:rgba(76,154,42,0.12);
  --paper:#F6F8EF;
  --paper-dim:#E8EAE1;
  --card:#FFFFFF;
  --slate:#5C6455;
  --slate-light:#8B9384;
  --line:rgba(16,19,12,0.14);
  --good:#4C9A2A;
  --bad:#C23F39;
}
:root[data-palette="wise"][data-theme="dark"]{
  --ink:#F0F5E8;
  --cobalt:#191B14;
  --cobalt-bright:#9FE870;
  --coral:#9FE870;
  --coral-dim:rgba(159,232,112,0.18);
  --paper:#0E0F0C;
  --paper-dim:#1C1D1A;
  --card:#191B14;
  --slate:#9AA391;
  --slate-light:#6B7462;
  --line:rgba(255,255,255,0.12);
  --good:#9FE870;
  --bad:#E5625C;
  --ink-contrast:#0E0F0C;
}

:root[data-palette="mercury"]{
  --ink:#0F0D14;
  --cobalt:#6446C7;
  --cobalt-bright:#6446C7;
  --coral:#6446C7;
  --coral-dim:rgba(100,70,199,0.12);
  --paper:#F7F5FA;
  --paper-dim:#E9E7EC;
  --card:#FFFFFF;
  --slate:#5C5665;
  --slate-light:#8B8594;
  --line:rgba(15,13,20,0.14);
  --good:#2E9E6E;
  --bad:#C93438;
}
:root[data-palette="mercury"][data-theme="dark"]{
  --ink:#F3EFF9;
  --cobalt:#7B5FE0;
  --cobalt-bright:#7B5FE0;
  --coral:#7B5FE0;
  --coral-dim:rgba(123,95,224,0.18);
  --paper:#0F0D14;
  --paper-dim:#1D1B22;
  --card:#1B1723;
  --slate:#8B8494;
  --slate-light:#5C5565;
  --line:rgba(255,255,255,0.12);
  --good:#4CC38A;
  --bad:#E5484D;
  --ink-contrast:#0F0D14;
}

:root[data-palette="plaid"]{
  --ink:#0C0C0D;
  --cobalt:#18181A;
  --cobalt-bright:#009688;
  /* Was the same teal as --cobalt-bright, so any 2-colour chart (Actual vs
     Budget bars etc.) rendered as a single indistinguishable colour. A warm
     amber against the black/teal pairing gives a real second series colour
     without displacing the brand's own teal accent. */
  --coral:#E8A23D;
  --coral-dim:rgba(232,162,61,0.12);
  --paper:#F6F6F6;
  --paper-dim:#E8E8E8;
  --card:#FFFFFF;
  --slate:#5C5C60;
  --slate-light:#8B8B8F;
  --line:rgba(12,12,13,0.14);
  --good:#009688;
  --bad:#C93F30;
}
:root[data-palette="plaid"][data-theme="dark"]{
  --ink:#F5F5F5;
  --cobalt:#18181A;
  --cobalt-bright:#00C2B2;
  --coral:#F2B84D;
  --coral-dim:rgba(242,184,77,0.18);
  --paper:#0C0C0D;
  --paper-dim:#1A1A1B;
  --card:#18181A;
  --slate:#8A8A8E;
  --slate-light:#5B5B5F;
  --line:rgba(255,255,255,0.12);
  --good:#00C2B2;
  --bad:#EC5A4B;
  --ink-contrast:#0C0C0D;
}

:root[data-palette="amex"]{
  --ink:#0D1B2A;
  --cobalt:#5E6B7A;
  --cobalt-bright:#5E6B7A;
  /* Was the same flat grey as --cobalt/--cobalt-bright (all three
     identical), so no 2-colour chart could show a real second series
     regardless of which pair it used. A warm gold, evoking the card's own
     gold accent, gives a genuine second colour. */
  --coral:#B8935A;
  --coral-dim:rgba(184,147,90,0.12);
  --paper:#F4F6F8;
  --paper-dim:#E6E8EA;
  --card:#FFFFFF;
  --slate:#4C6478;
  --slate-light:#7B93A7;
  --line:rgba(13,27,42,0.14);
  --good:#2E8A57;
  --bad:#A8402C;
}
:root[data-palette="amex"][data-theme="dark"]{
  --ink:#EAF0F5;
  --cobalt:#142A3F;
  --cobalt-bright:#C9CDD3;
  --coral:#D4AF6A;
  --coral-dim:rgba(212,175,106,0.18);
  --paper:#0D1B2A;
  --paper-dim:#1B2938;
  --card:#142A3F;
  --slate:#7B93A6;
  --slate-light:#4C6477;
  --line:rgba(255,255,255,0.12);
  --good:#3FA66B;
  --bad:#C0503A;
  --ink-contrast:#0D1B2A;
}

/* ================================ BASE ==================================== */
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:14px;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--cobalt-bright);}

/* ============================= TYPOGRAPHY ================================= */
h1,h2,h3,h4{font-family:var(--font-display);font-weight:600;margin:0;}
h1{font-size:19px;letter-spacing:-.01em;}
h2{font-size:17px;}
h3{font-size:13.5px;letter-spacing:.005em;}

/* Mono uppercase eyebrow, the recurring label treatment across dashboards. */
.eyebrow,
.section-label{
  font-family:var(--font-mono);
  font-size:10.5px;font-weight:500;
  text-transform:uppercase;letter-spacing:.1em;
  color:var(--coral);
  display:flex;align-items:center;gap:10px;
  margin-bottom:14px;
}
.section-label::after{content:"";flex:1;height:1px;background:var(--line);}
.section-title{font-family:var(--font-display);font-weight:600;font-size:19px;margin:0 0 6px;}
.section-sub{color:var(--slate);font-size:13px;line-height:1.6;max-width:560px;margin:0 0 20px;}

/* ============================ APP LAYOUT ================================= */
/* Capped to the viewport (not min-height) so .content is the one part that
   actually scrolls internally - .topbar/.view-tabs (flex-shrink:0)
   stay pinned above it, and position:sticky inside .content (see
   .grid-2-ai) has a real scrolling ancestor to stick against. Previously
   this was min-height:100vh, which let .app/.main grow past the viewport
   and pushed scrolling onto the document instead - so .content's own
   overflow:auto never activated and nothing above ever actually stayed
   pinned despite flex-shrink:0 saying so. */
.app{display:flex;height:100vh;}

.sidebar{
  width:220px;flex-shrink:0;
  background:var(--cobalt);color:#fff;
  padding:22px 0 64px;
  position:fixed;top:0;left:0;bottom:0;overflow-y:auto;
  /* Flex column so .sidebar-palette (appended last, after the nav items and
     any per-dashboard sidebar-tools) can self-centre with margin:auto in
     whatever vertical space is left above the fixed-bottom Settings trigger
     - see .sidebar-palette below. */
  display:flex;flex-direction:column;
}
/* Environment watermark - see mountEnvBadge()/ENV_LABEL in dashboard.js.
   z-index:-1 paints it above .sidebar's own background (step 1 of the
   paint order) but below every other (non-positioned) sidebar child, which
   paint at the next step regardless of DOM order once anything in between
   is positioned - so it reads as "behind" the real sidebar content without
   needing to touch that content's own stacking. Non-interactive throughout. */
.sidebar-env-badge{
  position:absolute; inset:0; z-index:-1;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; pointer-events:none;
}
.sidebar-env-badge span{
  writing-mode:vertical-rl;
  transform:rotate(180deg);
  font-family:var(--font-display); font-weight:800;
  font-size:64px; letter-spacing:.35em;
  color:rgba(255,255,255,.14);
  text-transform:uppercase; white-space:nowrap;
}
.sidebar .brand,
.brand{
  padding:0 22px 18px;
  font-family:var(--font-display);font-weight:700;
  font-size:15.5px;letter-spacing:.01em;color:#fff;
}
.brand span{color:var(--coral);}
/* Lockup image (e.g. celero-lockup-white-coral-accent.png) in place of a text
   wordmark; renders to the sidebar's content width. */
.brand img{display:block;width:132px;height:auto;}
.nav-item{
  display:flex;align-items:center;gap:10px;
  padding:9px 22px;cursor:pointer;user-select:none;
  color:rgba(255,255,255,.68);
  font-family:var(--font-body);font-size:11.5px;letter-spacing:.01em;
  border-left:3px solid transparent;
  transition:background .15s,color .15s;
}
.nav-item:hover{color:#fff;background:rgba(255,255,255,.08);}
.nav-item.active{color:#fff;background:var(--coral-dim);border-left-color:var(--coral);font-weight:600;}
/* Sidebar dashboard list (Product / Promo / ...). Same look as a sidebar
   item; each click is a full page navigation (see the router in
   dashboard.js). Within a dashboard, .nav-item is the view tab in .view-tabs
   (top of .main), not a sidebar item. */
.dashboard-link{
  display:flex;align-items:center;gap:10px;
  padding:10px 22px;cursor:pointer;user-select:none;
  color:rgba(255,255,255,.68);text-decoration:none;
  font-family:var(--font-body);font-size:12px;letter-spacing:.01em;
  border-left:3px solid transparent;
  transition:background .15s,color .15s;
}
.dashboard-link:hover{color:#fff;background:rgba(255,255,255,.08);}
.dashboard-link.active{color:#fff;background:var(--coral-dim);border-left-color:var(--coral);font-weight:600;}

/* ==================== HIGHLIGHTS PANEL ====================
   Inline panel at the top of .content (see ensureVeroAndHighlights() in
   dashboard.js), under the view tabs and title bar - it belongs to the
   current view, so its content follows whichever view tab is active (see
   activeVeroEntry()), refreshed live as that changes. Collapsible via its
   label. */
.highlights-panel{
  background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:0 1px 2px rgba(0,0,0,.03);
  padding:14px 18px;margin-bottom:20px;
  max-height:240px;overflow-y:auto;
}
/* Label + Print Summary icon share one row, icon pinned right - see
   renderHighlights() in dashboard.js. */
.highlights-panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;}
.highlights-panel-label{
  font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;
  color:var(--coral);
}
/* Label doubles as the collapse toggle (chevron rotates); the print icon beside
   it is a separate button. State lives in renderHighlights(). */
.highlights-panel-toggle{
  display:flex;align-items:center;gap:6px;padding:0;border:none;background:none;cursor:pointer;
}
.highlights-panel-chevron{width:9px;height:9px;flex:none;color:var(--coral);transition:transform .15s;}
.highlights-panel.is-collapsed .highlights-panel-chevron{transform:rotate(-90deg);}
.highlights-panel.is-collapsed .highlights-panel-head{margin-bottom:0;}
.highlights-panel.is-collapsed .highlights-panel-list,
.highlights-panel.is-collapsed .highlights-panel-note{display:none;}
.highlights-panel-list{margin:0;padding:0 0 0 18px;column-count:2;column-gap:36px;}
.highlights-panel-list li{font-size:13px;line-height:1.6;color:var(--ink);margin-bottom:4px;break-inside:avoid;}
.highlights-panel-note{font-size:11.5px;line-height:1.4;color:var(--slate);font-style:italic;margin-top:4px;}
/* Scoped as a descendant selector, not just .highlights-panel-summary, so
   it beats the plain .summary-trigger rule below regardless of source order
   - same class also sits on this button (kept there so each dashboard's
   delegated e.target.closest(".summary-trigger") click listener still
   matches it), same specificity otherwise, and .summary-trigger's own
   padding/border-radius (built for a text pill) would otherwise win and
   squash this into a rounded rect instead of a circle. Icon-only, no
   border - same "quiet tint fill, no outline" language as .topbar-action-btn
   (TOPBAR VERO + DRAWER below), tinted with --coral instead of --ink since
   this action is the Highlights panel's own accent (the coral label next to
   it) rather than a neutral/ambient control. */
.highlights-panel .highlights-panel-summary{
  display:flex;align-items:center;justify-content:center;flex:none;
  width:24px;height:24px;padding:0;border:none;border-radius:50%;
  background:color-mix(in srgb,var(--coral) 16%,transparent);color:var(--coral);
  cursor:pointer;transition:.12s;
}
.highlights-panel .highlights-panel-summary:hover{background:var(--coral);color:#fff;}

/* ==================== VIEW TABS ====================
   Sits as the first child of `.main`, above `.topbar`: the current
   dashboard's own views (Company / Business Unit / ..., or Bridges / Cash),
   as plain text tabs. Each is a .nav-item with a data-view - the page
   scripts wire clicks on `.nav-item` - restyled here from the sidebar look
   to a tab. The dashboards themselves are the sidebar's .dashboard-link
   list (see above). The strip's border-bottom is one continuous line and the
   active tab is a 2px ink underline sitting over it (margin-bottom:-1px
   lands the tab's own bottom border exactly on that line). */
.view-tabs{
  flex-shrink:0;display:flex;gap:6px;flex-wrap:wrap;
  padding:0 30px;background:var(--card);
  border-bottom:1px solid var(--line);
}
.view-tabs .nav-item{
  display:inline-block;padding:13px 14px;margin-bottom:-1px;
  border-left:none;border-bottom:2px solid transparent;background:none;
  font-family:var(--font-body);font-size:13px;font-weight:600;
  color:var(--slate);white-space:nowrap;
  transition:color .12s,border-color .12s;
}
.view-tabs .nav-item:hover{color:var(--ink);background:none;}
.view-tabs .nav-item.active{color:var(--ink);background:none;border-bottom-color:var(--ink);}

/* ==================== SIDEBAR SETTINGS MENU ====================
   Pinned to the bottom of the sidebar (Claude-UI-style), positioned against
   .sidebar's own fixed box so it stays put regardless of nav-item scrolling.
   Opens upward into a read-only On/Off status list of every dashboard in the
   product manifest - see mountSettingsMenu() in dashboard.js. */
.sidebar-settings{
  position:absolute;left:0;right:0;bottom:0;
  border-top:1px solid rgba(255,255,255,.12);
  padding:6px 0;
}
.sidebar-settings-trigger,
.sidebar-howto-trigger{
  width:100%;display:flex;align-items:center;gap:10px;
  padding:12px 22px;cursor:pointer;background:none;border:none;
  color:rgba(255,255,255,.68);
  font-family:var(--font-mono);font-size:12px;letter-spacing:.01em;
  transition:background .15s,color .15s;
}
.sidebar-settings-trigger:hover,
.sidebar-settings-trigger[aria-expanded="true"],
.sidebar-howto-trigger:hover{color:#fff;background:rgba(255,255,255,.08);}
.sidebar-settings-icon{flex-shrink:0;}

.sidebar-settings-menu{
  position:absolute;left:12px;right:12px;bottom:calc(100% + 6px);z-index:20;
  background:var(--card);border:1px solid var(--line);border-radius:8px;
  box-shadow:0 12px 32px rgba(12,15,20,.28);padding:6px;
}
.sidebar-settings-menu[hidden]{display:none;}
.sidebar-settings-menu-label{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;
  color:var(--slate-light);padding:6px 10px 4px;
}
.sidebar-settings-item{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  width:100%;padding:7px 10px;border-radius:6px;border:none;background:none;
  font:inherit;text-align:left;
  font-family:var(--font-body);font-size:12.5px;color:var(--ink);
}
/* An "Off" row is a real <button> (see mountSettingsMenu()) - clicking it
   pops open the .sidebar-settings-note as a floating tooltip anchored to
   this row, not an inline reveal that pushes the rest of the list down. */
.sidebar-settings-row{position:relative;}
.sidebar-settings-item.inactive{cursor:pointer;}
.sidebar-settings-item.inactive:hover,
.sidebar-settings-item.inactive[aria-expanded="true"]{background:var(--paper-dim);}
.sidebar-settings-item.inactive .ss-name{color:var(--slate-light);}
.sidebar-settings-note{
  position:absolute;left:4px;right:4px;top:calc(100% + 5px);z-index:30;
  padding:9px 11px;border-radius:8px;
  background:var(--card);color:var(--slate);font-size:11.5px;line-height:1.5;
  border:1px solid var(--line);box-shadow:0 10px 26px rgba(12,15,20,.22);
}
.sidebar-settings-note[hidden]{display:none;}
/* Pointer arrow tying the tooltip back to the row it belongs to. */
.sidebar-settings-note::before{
  content:"";position:absolute;left:16px;top:-5px;width:9px;height:9px;
  background:var(--card);border-left:1px solid var(--line);border-top:1px solid var(--line);
  transform:rotate(45deg);
}
.sidebar-settings-divider{height:1px;margin:6px 10px;background:var(--line);}
.sidebar-settings-logout,
.sidebar-settings-theme{cursor:pointer;color:var(--slate);}
.sidebar-settings-logout:hover,
.sidebar-settings-theme:hover{background:var(--paper-dim);color:var(--ink);}
.sidebar-settings-logout svg,
.sidebar-settings-theme svg{flex-shrink:0;color:var(--slate-light);}
.badge svg{flex-shrink:0;}
/* Icon-only badge (no text) - a tight circle instead of the text pill's
   wider padding. Used for the Settings menu's On/Off lock icons - sized up
   so the open/closed shackle is actually legible, not just a coloured dot. */
.badge-icon{padding:6px;border-radius:50%;}

/* ==================== SIDEBAR "HOW TO USE" TRIGGER ====================
   See mountHowToUse() in dashboard.js. margin-top:auto pushes this - and
   .sidebar-palette right after it, which takes no auto margin of its own -
   down together to sit just above the pinned Settings trigger, in whatever
   vertical space is left below the nav items. */
.sidebar-divider{height:1px;margin:0 22px;background:rgba(255,255,255,.12);flex-shrink:0;}
.sidebar-howto{margin-top:auto;flex-shrink:0;}
.sidebar-howto-trigger svg{flex-shrink:0;}

/* ==================== "HOW TO USE" POPUP ====================
   Plain-language instructions for a non-technical reviewer - see the
   content in mountHowToUse(). A small centred dialog rather than the
   .summary-overlay pattern (Generate Summary), which is a full document
   viewer with its own print handling this popup doesn't need. */
.howto-overlay{
  position:fixed;inset:0;z-index:80;background:rgba(12,15,20,.55);
  display:flex;align-items:center;justify-content:center;padding:20px;
}
.howto-overlay[hidden]{display:none;}
.howto-sheet{
  background:var(--card);max-width:440px;width:100%;border-radius:14px;
  max-height:86vh;overflow-y:auto;box-shadow:0 24px 64px rgba(0,0,0,.32);
}
.howto-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:18px 20px 14px;border-bottom:1px solid var(--line);
  position:sticky;top:0;background:var(--card);
}
.howto-head h2{font-family:var(--font-display);font-weight:600;font-size:17px;margin:0;}
.howto-close{
  border:none;background:none;color:var(--slate);cursor:pointer;flex-shrink:0;
  width:28px;height:28px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  transition:background .12s,color .12s;
}
.howto-close:hover{background:var(--paper-dim);color:var(--ink);}
.howto-body{padding:16px 20px 20px;color:var(--ink);}
.howto-body h3{
  font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.08em;
  font-size:10.5px;font-weight:500;color:var(--coral);margin:18px 0 8px;
}
.howto-body h3:first-child{margin-top:0;}
.howto-body ul{margin:0;padding-left:18px;}
.howto-body li{font-size:13px;line-height:1.6;margin-bottom:6px;}
.howto-body li:last-child{margin-bottom:0;}

/* ==================== SIDEBAR THEME (LIGHT/DARK) TOGGLE ====================
   See mountPaletteSwitcher() in dashboard.js. Its own labelled section (same
   convention as .sidebar-palette-label below), rendered directly after the
   "How to use" trigger and above Palette - light/dark is chosen before which
   palette. The sun/moon button is the same data-theme toggle as the
   Settings-menu theme row, just surfaced here too. */
.sidebar-theme{flex-shrink:0;padding:4px 0;}
.sidebar-theme-label{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:.14em;text-transform:uppercase;
  color:rgba(255,255,255,.4);padding:14px 22px 10px;
}
.theme-row{display:flex;align-items:center;gap:10px;padding:0 22px;}

/* ==================== SIDEBAR PALETTE SWITCHER ====================
   See mountPaletteSwitcher() in dashboard.js. Rendered directly after the
   theme toggle above (no auto margin of its own - see .sidebar-howto, which
   pushes the whole how-to/theme/palette group down together). Default plus
   thirteen reference palettes (Polestar/Stripe/Bloomberg Terminal and ten
   finance/tech brands, see the tokens above :root[data-theme="dark"]) exist
   for now. */
.sidebar-palette{flex-shrink:0;padding:4px 0;}
.sidebar-palette-label{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:.14em;text-transform:uppercase;
  color:rgba(255,255,255,.4);padding:14px 22px 10px;
}
.palette-row{display:flex;align-items:center;gap:10px;padding:0 22px;flex-wrap:wrap;}
.palette-swatch{
  width:26px;height:26px;border-radius:50%;padding:0;cursor:pointer;flex-shrink:0;
  /* White only, no dark box-shadow ring: a dark outer ring merges visually with
     a swatch's own dark half (Polestar's black, Stripe's navy), reading as part
     of the border instead of part of the circle - which is what made those two
     look lopsided. A light-only border stays visible against both a light AND
     a dark half, and against the sidebar's own dark background either way. */
  border:3px solid rgba(255,255,255,.8);
  transition:border-color .15s,transform .15s;
}
/* Each swatch's preview is hardcoded to its palette's light-mode tokens above (not
   var(--cobalt)/var(--coral), which only reflect whichever palette is active) so all
   swatches preview correctly side by side regardless of the current selection. */
.palette-swatch-default{background:linear-gradient(135deg,#1B3A6B 0 50%,#FF6247 50% 100%);}
.palette-swatch-polestar{background:linear-gradient(135deg,#1A1A1A 0 50%,#C9A227 50% 100%);}
.palette-swatch-stripe{background:linear-gradient(135deg,#635BFF 0 50%,#0A2540 50% 100%);}
.palette-swatch-bloomberg{background:linear-gradient(135deg,#0A0A0A 0 50%,#FF9F1C 50% 100%);}
.palette-swatch-bridgewater{background:linear-gradient(135deg,#1E2126 0 50%,#2E5AAC 50% 100%);}
.palette-swatch-nasdaq{background:linear-gradient(135deg,#101832 0 50%,#2F6FED 50% 100%);}
.palette-swatch-wise{background:linear-gradient(135deg,#191B14 0 50%,#9FE870 50% 100%);}
.palette-swatch-mercury{background:linear-gradient(135deg,#1B1723 0 50%,#7B5FE0 50% 100%);}
.palette-swatch-plaid{background:linear-gradient(135deg,#18181A 0 50%,#00C2B2 50% 100%);}
.palette-swatch-amex{background:linear-gradient(135deg,#142A3F 0 50%,#C9CDD3 50% 100%);}
.palette-swatch:hover{transform:scale(1.08);}
.palette-swatch.active{border-color:#fff;}
.palette-mode-toggle{
  width:26px;height:26px;border-radius:50%;padding:0;cursor:pointer;flex-shrink:0;
  border:1px solid rgba(255,255,255,.24);background:rgba(255,255,255,.06);color:#fff;
  display:flex;align-items:center;justify-content:center;transition:background .15s;
}
.palette-mode-toggle:hover{background:rgba(255,255,255,.14);}

.main{margin-left:220px;flex:1;display:flex;flex-direction:column;height:100vh;overflow:hidden;min-width:0;}
.topbar{
  flex-shrink:0;z-index:5;
  background:var(--card);border-bottom:1px solid var(--line);
  padding:16px 30px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
}
.topbar h1{font-family:var(--font-body);font-size:19px;font-weight:800;}
.topbar-title-group{display:flex;align-items:baseline;gap:10px;min-width:0;}
/* Absorbs all of .topbar's free space so whatever comes after it (period
   toggle, .topbar-actions) sits flush right in source order, whether that's
   two children or three - .topbar's own justify-content:space-between alone
   would instead spread three children out evenly, pushing the period toggle
   away from the right edge once .topbar-actions exists as a third child. */
.topbar-title-group{margin-right:auto;}
/* Data-freshness signal next to the report title - see mountDataFreshness()
   in dashboard.js. Muted so it reads as metadata, not a headline. */
.topbar-timestamp{font-size:11px;font-weight:500;color:var(--slate-light);white-space:nowrap;}

.content{padding:26px 30px 60px;flex:1;overflow:auto;min-height:0;min-width:0;}

/* View switcher (show/hide sections by class) */
.view{display:none;}
.view.active{display:block;}

/* ============================== CARDS ================================== */
.card,
.panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
}
.card{box-shadow:0 1px 2px rgba(0,0,0,.03);margin-bottom:20px;overflow:hidden;min-width:0;}
.panel{padding:28px;}

.card-header{
  display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
  padding:13px 18px;border-bottom:1px solid var(--line);
}
.card-header h3{font-family:var(--font-display);font-size:13.5px;font-weight:600;}
.card-body{padding:16px 18px;}

/* Accent-rail card, reserve for insight / callout panels. */
.card--accent{border-left:4px solid var(--coral);}
.card--accent .card-header{border-bottom:none;padding-bottom:6px;}
.card--accent .card-header h3{
  font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.08em;
  font-size:10.5px;font-weight:500;color:var(--coral);
}
.card--accent-cobalt{border-left-color:var(--cobalt);}
.card--accent-cobalt .card-header h3{color:var(--cobalt);}

/* ============= HIGHLIGHTS + VERO PANEL ============= */
/* Highlights lives as a collapsible panel at the top of .content (HIGHLIGHTS
   PANEL above), Vero opens from a topbar button into a drawer (TOPBAR VERO +
   DRAWER further down) - neither lives inline in a view any more.
   .insights-card and .ai-qa-card - the two cards' actual content/typography -
   stay their own classes here because 1) .highlights-panel and the Vero
   drawer each render their content by hand rather than reusing these two
   directly (the panel is a compact, collapsible variant; the drawer
   reuses .ai-qa-card as-is), and .insights-card is still used for the
   hidden per-view copy mountInsightsVeroRow() keeps around for the One-Page
   Summary feature to read (see its own comment in dashboard.js), and 2)
   design-tool/render.js still builds the old paired .grid-2-ai layout for
   static design mockups. */
.grid-2-ai{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:stretch;}
.grid-2-ai .insights-card{margin-bottom:0;}

.insights-card{border-left:4px solid color-mix(in srgb,var(--ink) 25%,transparent);display:flex;flex-direction:column;}
.insights-card .card-header{border-bottom:none;padding-bottom:6px;}
.insights-card .card-header h3{
  font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.08em;
  font-size:10.5px;font-weight:500;color:var(--coral);
}
.insights-card ul{margin:0;padding:0 18px 4px 34px;}
.insights-card li{font-size:13px;line-height:1.65;color:var(--ink);margin-bottom:3px;}
.insights-card .insights-note{padding:2px 18px 14px 34px;font-size:11px;color:var(--slate);font-style:italic;}

/* Pushed to the bottom of the (stretched) card, right-aligned. */
.insights-card .summary-trigger-wrap{margin-top:auto;padding:6px 18px 16px;text-align:right;}

/* Vero Q&A panel. Fixed height so it stays balanced against Highlights; only
   the thread scrolls, within this budget. */
.ai-qa-card{display:flex;flex-direction:column;height:214px;margin-bottom:0;overflow:hidden;}
.ai-qa-card .card-header{border-bottom:none;padding:16px 16px 12px;align-items:center;}
/* Header lockup: avatar on the left, name over a small muted tagline. */
.ai-qa-id{display:flex;align-items:center;gap:12px;min-width:0;}
.ai-qa-avatar{
  flex:none;width:32px;height:32px;border-radius:50%;
  background-image:url("../images/celero_assets/assets/vero/vero-icon.svg");
  background-repeat:no-repeat;background-position:center;background-size:cover;
}
.ai-qa-card .card-header h3{font-family:var(--font-display);font-size:14px;font-weight:600;color:var(--ink);line-height:1.2;}
.ai-qa-sub{font-family:var(--font-body);font-size:12.5px;line-height:1.35;color:var(--slate);margin-top:2px;}
.ai-qa-body{display:flex;flex-direction:column;flex:1;padding:0 16px 16px;gap:10px;min-height:0;}
.ai-qa-thread{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0;overflow-y:auto;padding-right:2px;}
/* Chat bubbles: the user's question is a cobalt pill, Vero's reply is a white
   card with a soft shadow and the avatar beside it. Thread padding leaves room
   for the card shadows and keeps text clear of the scrollbar. */
.ai-qa-thread{gap:14px;padding:4px 14px 8px 4px;}
.ai-qa-msg{font-size:14px;line-height:1.55;padding:12px 16px;border-radius:14px;max-width:88%;}
.ai-qa-msg-ai{
  background:var(--card);color:var(--ink);align-self:flex-start;
  position:relative;margin-left:48px;border:1px solid var(--line);
  box-shadow:0 1px 2px rgba(12,15,20,.05),0 6px 14px rgba(12,15,20,.07);
}
.ai-qa-msg-ai::before{
  content:"";position:absolute;left:-48px;top:0;width:36px;height:36px;border-radius:50%;
  background-image:url("../images/celero_assets/assets/vero/vero-icon.svg");
  background-repeat:no-repeat;background-position:center;background-size:cover;
}
.ai-qa-msg-user{background:var(--cobalt);color:#fff;align-self:flex-end;font-weight:500;}
.ai-qa-msg.ai-qa-thinking{display:flex;align-items:center;gap:4px;padding:16px 18px;}
.ai-qa-dot{width:4px;height:4px;border-radius:50%;background:var(--slate-light);animation:aiQaTypingBlink 1s infinite ease-in-out;}
.ai-qa-dot:nth-child(2){animation-delay:.15s;}
.ai-qa-dot:nth-child(3){animation-delay:.3s;}
@keyframes aiQaTypingBlink{0%,100%{opacity:.3;transform:translateY(0);}50%{opacity:1;transform:translateY(-2px);}}
.ai-qa-form{position:relative;}
.ai-qa-input{width:100%;padding:9px 34px 9px 12px;border-radius:var(--radius-sm);border:1px solid var(--line);font-size:12.5px;font-family:var(--font-body);min-width:0;}
.ai-qa-input:focus{outline:none;border-color:var(--cobalt-bright);box-shadow:0 0 0 3px rgba(52,98,173,.15);}
/* Sits inside the input as a "press Enter to ask" hint rather than a
   separate send button - still a real type="submit" control, so clicking
   it and pressing Enter both submit the form. */
.ai-qa-return-hint{
  position:absolute;right:10px;top:50%;transform:translateY(-50%);
  width:20px;height:20px;padding:0;border:none;background:none;color:var(--slate-light);
  cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.12s;
}
.ai-qa-return-hint:hover{color:var(--cobalt-bright);}

/* ============================ LAYOUT GRIDS ============================= */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:stretch;}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;}
.row{display:flex;gap:14px;flex-wrap:wrap;align-items:center;}
.stack{display:flex;flex-direction:column;gap:14px;min-width:0;}
.controls-row{display:flex;align-items:center;gap:10px;margin-bottom:18px;flex-wrap:wrap;}

@media (max-width:900px){
  .grid-2,.grid-3{grid-template-columns:1fr;}
}

/* ============================== TABLES =============================== */
table.data-table{width:100%;border-collapse:collapse;font-size:12.5px;}
.data-table th{
  text-align:center;padding:8px 16px;
  font-family:var(--font-mono);font-size:10px;font-weight:500;
  text-transform:uppercase;letter-spacing:.05em;color:var(--slate);
  background:var(--paper-dim);
  border-bottom:1px solid var(--line);
}
.data-table td.label-cell{text-align:left;}
/* Column headings are always centred. Text column cells (e.g. SKU description
   in the Top/Bottom Sellers tables) are left-aligned; the default is
   right-aligned numbers. */
.data-table td.desc-cell{text-align:left;}
/* Sellers tables: keep each header on a single row. */
.sellers-split .data-table th{white-space:nowrap;}
.data-table td.desc-cell{color:var(--slate);white-space:nowrap;}
.data-table td{
  padding:7px 16px;text-align:right;
  border-bottom:1px solid var(--paper-dim);
  white-space:nowrap;font-variant-numeric:tabular-nums;
}
.data-table tbody tr:last-child td{border-bottom:none;}
.data-table .row-total td{font-weight:800;border-top:1px solid var(--line);background:var(--paper-dim);}
.data-table .row-group td{background:var(--row-tint);font-weight:700;}
.clickable-row{cursor:pointer;}
.clickable-row:hover td{background:rgba(52,98,173,.06);}
.clickable-row.selected td{background:rgba(52,98,173,.12);}
.table-scroll{overflow-x:auto;}

/* Grouped header: a first <tr> of .grp cells spanning metric pairs, a second
   <tr> of the individual column labels. */
.data-table thead .grp{text-align:center;background:var(--paper-dim);}
.data-table thead tr:first-child .grp{border-bottom:1px solid var(--line);}

/* Delta / variance chip, carries a prior-period comparator inline. No weight
   of its own - inherits from the cell it sits in, so it reads normal in an
   ordinary row and bold only where the row itself is bold (.row-total /
   .row-group here, or a dashboard-local equivalent like .row-bold). A fixed
   weight here would make every row's variance look equally bold regardless
   of whether that row is actually a total. */
.delta{display:inline-flex;align-items:center;gap:3px;font-variant-numeric:tabular-nums;line-height:1;}
.delta-good{color:var(--good);}
.delta-bad{color:var(--bad);}
.delta-arrow{font-size:9px;}

/* Neutral variance: a signed value with a direction arrow but no favourable /
   unfavourable colour by default. State the figure, let the reader judge it. */
.uplift{font-variant-numeric:tabular-nums;color:var(--ink);white-space:nowrap;}
.uplift-arrow{color:var(--slate-light);font-size:9px;margin-right:3px;}
.uplift-na{color:var(--slate-light);}

/* Opt-in favourable/unfavourable colour, for dashboards where a signed
   uplift is unambiguous (e.g. promo Sales $/GP $/GP % uplift - positive
   always means more $ despite the discount). Base .uplift above stays
   neutral by default; add uplift-good/uplift-bad per cell to colour it. */
.uplift.uplift-good{color:var(--good);}
.uplift.uplift-bad{color:var(--bad);}
.uplift.uplift-good .uplift-arrow,
.uplift.uplift-bad .uplift-arrow{color:inherit;}

/* Hierarchy / drill-down table: a .chevron in each label cell, rotated when
   the row is expanded; .leaf hides it for rows with no children. */
/* Stays a real table-cell (not display:flex): a flex <td> only paints its
   background over its own content height, so shaded rows (.row-total /
   .row-group / .row-cat) lost their tint in the first column. The chevron is
   aligned inline instead. */
.tree-table td.label-cell .chevron{vertical-align:middle;margin-right:6px;}
.chevron{
  display:inline-flex;width:14px;height:14px;align-items:center;justify-content:center;
  cursor:pointer;transition:transform .15s;font-size:9px;color:var(--slate);flex-shrink:0;
}
.chevron.expanded{transform:rotate(90deg);}
/* Expand all / Collapse all in a tree table's card header (see
   treeControlsHTML() in dashboard.js) - an ordinary .toggle-group. Always the
   right-most control in the card header, whatever else sits beside it. */
.tree-controls{order:99;margin-left:auto;}
.chevron.leaf{visibility:hidden;cursor:default;}

/* Two-panel comparison card (e.g. top / bottom lists side by side). */
.sellers-split{display:grid;grid-template-columns:1fr 1fr;gap:0;}
.sellers-split .sub{padding:14px 0 4px;min-width:0;}
.sellers-split .sub:first-child{border-right:1px solid var(--line);}
.sellers-split h4{margin:0 18px 6px;font-size:11.5px;text-transform:uppercase;letter-spacing:.03em;color:var(--slate);}

/* Comparator sub-line under a number (Budget: $x / Prior: $y). */
.compare-sub{
  display:block;margin-top:2px;
  font-family:var(--font-mono);font-size:10.5px;font-weight:400;color:var(--slate);
}

/* ===================== KPI / CLUSTER / HERO ========================= */
.kpi{border:1px solid var(--line);border-radius:12px;padding:16px;background:var(--card);}
.kpi.signal{border-color:rgba(255,98,71,0.4);}
.kpi .klabel{font-family:var(--font-mono);font-size:10px;text-transform:uppercase;color:var(--slate);margin-bottom:6px;}
.kpi .kvalue{font-family:var(--font-display);font-weight:600;font-size:22px;}
.kpi.signal .kvalue{color:var(--coral);}
.kpi .kcompare{font-family:var(--font-mono);font-size:10.5px;color:var(--slate);margin-top:4px;}

.cluster-card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:6px 20px;}
.cluster-item{padding:14px 0;border-top:1px solid var(--paper-dim);display:flex;align-items:baseline;justify-content:space-between;}
.cluster-item:first-child{border-top:none;}
.cluster-item .clabel{font-family:var(--font-mono);font-size:10px;text-transform:uppercase;color:var(--slate);}
.cluster-item .cvals{text-align:right;}
.cluster-item .cvalue{font-family:var(--font-display);font-weight:600;font-size:18px;}
.cluster-item .ccompare{font-family:var(--font-mono);font-size:10.5px;color:var(--slate);display:block;}

/* One hero panel per view, full-saturation weight reserved for the flagship. */
.hero-panel{background:linear-gradient(135deg,var(--cobalt) 0%,#234B8C 100%);border-radius:var(--radius);padding:24px 26px;color:#fff;}
.hero-panel .htitle{font-family:var(--font-display);font-weight:600;font-size:14px;color:rgba(255,255,255,.85);margin-bottom:16px;}
.hero-row{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.hero-stat .hlabel{font-family:var(--font-mono);font-size:9.5px;text-transform:uppercase;letter-spacing:.06em;color:rgba(255,255,255,.6);margin-bottom:6px;}
.hero-stat .hvalue{font-family:var(--font-display);font-weight:600;font-size:25px;color:#fff;}
.hero-stat.signal .hvalue{color:var(--coral);}
.hero-stat .hcompare{font-family:var(--font-mono);font-size:10.5px;color:rgba(255,255,255,.55);margin-top:4px;}

/* ======================== BADGES / ALERTS ========================== */
.badge{font-family:var(--font-mono);font-size:11px;font-weight:500;padding:3px 9px;border-radius:20px;display:inline-flex;align-items:center;gap:5px;}
.badge.up{background:rgba(27,138,90,0.12);color:var(--good);}
.badge.down{background:rgba(178,58,46,0.12);color:var(--bad);}
.badge.neutral{background:var(--paper-dim);color:var(--slate);}
.badge.signal{background:var(--coral-dim);color:var(--coral);}

.alert{border-radius:var(--radius-sm);padding:14px 16px;font-size:13px;display:flex;gap:10px;border:1px solid;}
.alert-info{background:rgba(52,98,173,0.07);border-color:rgba(52,98,173,0.25);color:var(--cobalt);}
.alert-warn{background:rgba(255,98,71,0.08);border-color:rgba(255,98,71,0.3);color:#B0431F;}

/* Full-width data-state bar (freshness / completeness). Sits above .content;
   render only when there is something to say, stay silent otherwise. Shares
   its callout look with .summary-datastate (below). */
.data-notice,
.summary-datastate{
  border-left:3px solid var(--coral);background:var(--coral-dim);
  border-radius:0 6px 6px 0;padding:10px 14px;
  font-size:12.5px;line-height:1.6;color:var(--ink);
}
.data-notice{margin:16px 30px 0;}

/* ============================= BUTTONS ============================= */
.btn{font-family:var(--font-body);font-weight:600;font-size:13.5px;padding:10px 18px;border-radius:var(--radius-sm);border:1px solid transparent;cursor:pointer;transition:opacity .15s ease;}
.btn:hover{opacity:.88;}
.btn:disabled{opacity:.35;cursor:not-allowed;}
.btn-primary{background:var(--ink);color:var(--ink-contrast);}
.btn-accent{background:var(--coral);color:#fff;}
.btn-secondary{background:var(--card);color:var(--ink);border-color:var(--line);}
.btn-ghost{background:transparent;color:var(--cobalt);border-color:transparent;}

/* ========================= FORM CONTROLS ========================== */
select.dropdown,
input.text-input{
  padding:9px 12px;border-radius:var(--radius-sm);border:1px solid var(--line);
  font-family:var(--font-body);font-size:13px;font-weight:600;
  background:var(--card);color:var(--ink);
}
/* Native <select> arrows render in a browser-controlled gutter outside any
   CSS padding, so the same padding:9px 12px above still reads as lopsided
   (text flush left, a much wider gap on the right). appearance:none plus a
   hand-drawn chevron, positioned the same 12px from the right edge as the
   text sits from the left, makes the box actually look symmetric. The
   chevron's colour is baked into the SVG data URI (can't reference a
   custom property from inside one), so - unlike every other icon colour in
   this file - it only follows the light/dark split, not each reference
   palette's own --slate; picked to read fine against every palette's card
   background in both modes rather than matching any one exactly. */
select.dropdown{
  margin-right:10px;
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235B6472' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 16px center;
}
:root[data-theme="dark"] select.dropdown{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238B909A' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Dropdowns use the same quiet tinted fill, no outline, as .toggle-group /
   .pill / .topbar-action-btn, so every filter control reads as one family. */
select.dropdown{
  background-color:color-mix(in srgb,var(--ink) 6%,transparent);
  border-color:transparent;padding-top:10px;padding-bottom:10px;
}
select.dropdown:hover{background-color:color-mix(in srgb,var(--ink) 10%,transparent);}
select.dropdown:focus,
input.text-input:focus{outline:none;border-color:var(--cobalt-bright);box-shadow:0 0 0 3px rgba(52,98,173,.15);}
.field{display:flex;flex-direction:column;gap:6px;}
.field label{font-family:var(--font-mono);font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--slate);}
.opt-row{display:flex;align-items:center;gap:9px;font-size:13.5px;}
.opt-row input[type=checkbox],
.opt-row input[type=radio]{width:16px;height:16px;accent-color:var(--cobalt);}

/* ==================== TABS / TOGGLES / PILLS ===================== */
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);margin-bottom:20px;}
.tab{font-family:var(--font-mono);font-size:11px;text-transform:uppercase;letter-spacing:.04em;padding:10px 16px;cursor:pointer;color:var(--slate);background:none;border:none;border-bottom:2px solid transparent;}
.tab.active{color:var(--ink);border-bottom-color:var(--coral);font-weight:600;}

/* Segmented control (period switchers etc.) - same tinted-fill, no-border
   language as .topbar-action-btn (TOPBAR VERO + DRAWER below): a
   color-mix over --ink instead of a solid --paper fill + --line border,
   so it reads as a peer of the Vero button it sits beside in the topbar. */
.toggle-group[hidden]{display:none;}
.toggle-group{display:inline-flex;background:color-mix(in srgb,var(--ink) 6%,transparent);border:none;border-radius:9px;padding:3px;}
.toggle-group button{border:none;background:transparent;padding:7px 15px;font-size:12.5px;font-weight:600;color:var(--slate);border-radius:6px;cursor:pointer;}
.toggle-group button.active{background:var(--ink);color:var(--ink-contrast);}
/* Card-header (table) filters - Variance $/%, Profit/Loss, Top/Bottom,
   Expand all / Collapse all - are one size: smaller than the topbar's period
   toggle, same as Product's Variance / Columns controls. */
.card-header .toggle-group.compact button{padding:4px 10px;font-size:11.5px;}
/* .compact only tightens spacing in card headers; the active fill is the same
   --ink as the topbar period toggle, so every segmented filter reads alike. */

.pill-row{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap;}
.pill{padding:7px 16px;border-radius:20px;border:none;background:color-mix(in srgb,var(--ink) 6%,transparent);font-size:12.5px;font-weight:700;cursor:pointer;color:var(--ink);transition:.12s;}
.pill:hover{background:color-mix(in srgb,var(--ink) 10%,transparent);}
.pill.active{background:var(--ink);color:var(--ink-contrast);}

/* ============================ FILTERS ========================== */
/* A row of labelled filter controls above a view's content. Each .filter-group
   is a mono label stacked over a control (.pill-row, select.dropdown or
   .check-list). */
.filter-bar{display:flex;gap:26px;flex-wrap:wrap;align-items:flex-start;margin-bottom:22px;}
.filter-group{display:flex;flex-direction:column;gap:9px;}
.filter-label{
  font-family:var(--font-mono);font-size:10px;font-weight:500;
  text-transform:uppercase;letter-spacing:.08em;color:var(--slate);
}
.filter-group .pill-row{margin-bottom:0;}

/* Inline checkbox multi-select. */
.check-list{display:flex;flex-wrap:wrap;gap:7px 14px;font-size:12px;color:var(--ink);max-width:520px;}
.check-list label{display:flex;align-items:center;gap:5px;cursor:pointer;white-space:nowrap;}
.check-list input{accent-color:var(--cobalt);margin:0;}

/* Multi-select dropdown (CeleroDashboard.mountMultiSelect): a button showing the
   selection summary that opens a checkbox panel with Select all / Clear all. */
.msel{position:relative;}
.msel-btn{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-width:170px;padding:7px 12px;border-radius:8px;
  border:1px solid var(--line);background:var(--card);color:var(--ink);
  font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;
}
.msel-btn:hover,.msel.open .msel-btn{border-color:var(--cobalt);}
.msel-btn::after{content:"";width:6px;height:6px;border:solid var(--slate);border-width:0 2px 2px 0;transform:rotate(45deg) translateY(-2px);}
.msel-panel{
  display:none;position:absolute;z-index:30;top:calc(100% + 4px);left:0;
  min-width:100%;max-height:300px;overflow-y:auto;padding:6px;
  border:1px solid var(--line);border-radius:8px;background:var(--card);
  box-shadow:0 8px 24px rgba(0,0,0,.16);
}
.msel.open .msel-panel{display:block;}
.msel-actions{display:flex;gap:6px;padding:2px 4px 8px;margin-bottom:4px;border-bottom:1px solid var(--line);}
.msel-actions button{
  flex:1;padding:4px 8px;border:none;border-radius:6px;cursor:pointer;
  background:color-mix(in srgb,var(--ink) 6%,transparent);color:var(--ink);
  font:inherit;font-size:11.5px;font-weight:700;white-space:nowrap;
}
.msel-actions button:hover{background:color-mix(in srgb,var(--ink) 12%,transparent);}
.msel-panel label{display:flex;align-items:center;gap:8px;padding:5px 6px;border-radius:6px;font-size:12.5px;color:var(--ink);cursor:pointer;white-space:nowrap;}
.msel-panel label:hover{background:color-mix(in srgb,var(--ink) 6%,transparent);}
.msel-panel input{accent-color:var(--cobalt);margin:0;}
.msel-empty{padding:6px;font-size:12px;color:var(--slate);}

/* Pagination for long tables: ‹ 1 2 3 › (see celero_ui_components.html). */
.pagination{display:flex;gap:6px;align-items:center;}
.page-btn{
  min-width:28px;height:28px;padding:0 6px;border-radius:5px;
  border:1px solid var(--line);background:var(--card);color:var(--slate);
  font-family:var(--font-mono);font-size:11px;cursor:pointer;
}
.page-btn:hover:not(:disabled):not(.active){border-color:var(--cobalt);color:var(--ink);}
.page-btn.active{background:var(--ink);color:var(--ink-contrast);border-color:var(--ink);}
.page-btn:disabled{opacity:.4;cursor:default;}
.page-gap{font-family:var(--font-mono);font-size:11px;color:var(--slate);padding:0 2px;}

/* ======================== CHART WRAPPER ========================= */
.chart-wrap{padding:14px 18px 18px;height:250px;}
.chart-controls{display:flex;gap:14px;font-size:12px;align-items:center;color:var(--slate);}
.chart-controls label{display:flex;gap:5px;align-items:center;cursor:pointer;font-weight:600;}
/* Mono caption under a chart (axis / rollup note). */
.chart-note{
  padding:0 18px 14px;
  font-family:var(--font-mono);font-size:11px;
  line-height:1.5;color:var(--slate-light);
}
.placeholder-text{color:#b7b7bb;font-style:italic;}
.empty-note{padding:16px 18px;color:var(--slate);font-size:12.5px;}

/* ===================== AUSTRALIA MAP ===================== */
/* Markup + wiring rendered by CeleroDashboard.mountAustraliaMap() (shared
   dashboard.js) - was hand-duplicated per-dashboard CSS until Store and
   Store Labour's Country Summary map became a shared component. */
.au-map-wrap{padding:16px 18px; position:relative;}
/* Same caption typography as .chart-note above, but sits above the map
   instead of under it, so .au-map-wrap's own padding provides the spacing
   rather than .chart-note's own (bottom-only) padding. */
.au-map-tip{
  font-family:var(--font-mono);font-size:11px;line-height:1.5;
  color:var(--slate-light);margin-bottom:10px;
}
svg.au-map{width:100%;height:auto;display:block;}
.au-state{
  fill:var(--cobalt); fill-opacity:.18; stroke:var(--card); stroke-width:1.5;
  cursor:pointer; transition:fill-opacity .12s, fill .12s;
}
.au-state:hover{fill-opacity:.55;}
.au-state--active{fill-opacity:.65;}

/* Click-triggered popup (State Performance) - floats over the map, next to
   whichever state/territory was clicked. */
.map-popup{
  /* z-index:1, not some high overlay value: this only needs to clear the
     unpositioned map/card content it floats over. */
  position:absolute; z-index:1; min-width:220px; max-width:260px;
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius-sm);
  box-shadow:0 8px 24px rgba(0,0,0,.18); padding:12px 14px;
}
.map-popup h4{font-family:var(--font-display); font-size:13px; font-weight:600; margin:0 0 8px; padding-right:20px;}
.map-popup-close{
  position:absolute; top:8px; right:8px; width:20px; height:20px; padding:0;
  border:none; background:none; color:var(--slate-light); font-size:16px; line-height:1;
  cursor:pointer;
}
.map-popup-close:hover{color:var(--ink);}

/* State Performance mini key/value table (inside the popup) - reuses
   .data-table but without a header row. */
.kv-table td{border-bottom:1px solid var(--paper-dim); padding:5px 0;}
.kv-table tr:last-child td{border-bottom:none;}

/* ===================== SCROLLBAR AFFORDANCE ==================== */
/* Always-visible scrollbars so the scroll cue reads regardless of OS overlay
   defaults. Apply .scroll-visible (or rely on .content / .table-scroll). */
.content,.table-scroll,.scroll-visible{scrollbar-width:auto;scrollbar-color:var(--scrollbar-thumb) var(--paper-dim);}
.content::-webkit-scrollbar,.table-scroll::-webkit-scrollbar,.scroll-visible::-webkit-scrollbar{width:12px;height:12px;}
.content::-webkit-scrollbar-track,.table-scroll::-webkit-scrollbar-track,.scroll-visible::-webkit-scrollbar-track{background:var(--paper-dim);}
.content::-webkit-scrollbar-thumb,.table-scroll::-webkit-scrollbar-thumb,.scroll-visible::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:7px;border:2px solid var(--paper-dim);}
.content::-webkit-scrollbar-thumb:hover,.table-scroll::-webkit-scrollbar-thumb:hover,.scroll-visible::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover);}
.content::-webkit-scrollbar-corner,.table-scroll::-webkit-scrollbar-corner,.scroll-visible::-webkit-scrollbar-corner{background:var(--paper-dim);}

/* ============================ UTILITIES ======================== */
.mono{font-family:var(--font-mono);}
.num{text-align:right;font-family:var(--font-mono);font-variant-numeric:tabular-nums;}
.muted{color:var(--slate);}
.text-good{color:var(--good);}
.text-bad{color:var(--bad);}
.text-signal{color:var(--coral);}
[hidden]{display:none !important;}

/* Fixed slide-in-from-the-right mechanics for .side-drawer. */
.side-drawer{
  position:fixed;top:0;right:0;bottom:0;max-width:92vw;
  background:var(--card);border-left:1px solid var(--line);
  box-shadow:-16px 0 40px rgba(12,15,20,.18);
  display:flex;flex-direction:column;
  transform:translateX(100%);transition:transform .2s ease;
}
.side-drawer.open{transform:translateX(0);}

/* ========================= TOPBAR VERO + DRAWER ======================= */
/* Vero button, next to the period toggle (or, on a dashboard with none -
   Market Snapshot - at the right end of the topbar regardless, via
   .topbar-title-group's margin-right:auto above). Built by
   ensureVeroAndHighlights() in dashboard.js - a fresh button every time
   .topbar itself is rebuilt (dashboard-tab switches replace it wholesale),
   opening a drawer that's only ever built once. */
.topbar-actions{display:flex;align-items:center;gap:8px;}
.topbar-action-btn{
  display:flex;align-items:center;gap:7px;
  /* 6px, not 8px, vertical - matches .toggle-group's own height (3px
     container padding + 7px button padding around its text) now that this
     button's content is dominated by the 24px icon rather than a text line,
     so the two controls read as the same height sitting side by side. */
  padding:6px 14px;border-radius:9px;border:none;
  /* A tinted fill instead of a border for affordance against .topbar's own
     var(--card) background (same color the button used to sit on
     invisibly) - color-mix against --ink so it stays a subtle overlay in
     both light and dark palettes, same technique as .insights-card's
     border-left above. */
  background:color-mix(in srgb,var(--ink) 6%,transparent);color:var(--slate);font-size:12.5px;font-weight:600;
  cursor:pointer;transition:.12s;
}
.topbar-action-btn:hover,.topbar-action-btn[aria-expanded="true"]{
  background:color-mix(in srgb,var(--ink) 10%,transparent);color:var(--ink);
}
/* Same blue-circle/coral-mark avatar as the Vero chat bubbles
   (.ai-qa-msg-ai::before below) - no border, so the button reads as the
   same "face" the user is about to start talking to. Sized up from the
   original 20px so the mark itself is actually legible at this size. */
.topbar-action-icon{
  width:24px;height:24px;border-radius:50%;flex:none;
  background-image:url("../images/celero_assets/assets/vero/vero-icon.svg");
  background-repeat:no-repeat;background-position:center;background-size:cover;
}

/* Same slide-in-from-the-right mechanics as .side-drawer, but built once
   and toggled open/closed (not re-created per open), so Vero's conversation
   thread keeps its history between closes and the drawer doesn't flicker on
   repeat opens. */
/* Vero is a popover anchored under the topbar button (openVero() sets top/right
   from the button's rect), not a full-height drawer: it sizes to its content
   and only the thread scrolls, once it passes 50vh. */
.side-drawer,
.side-drawer.open{
  width:380px;z-index:76;
  top:64px;right:20px;bottom:auto;max-height:calc(100vh - 84px);
  border:1px solid var(--line);border-radius:9px;overflow:hidden;
  box-shadow:0 12px 40px rgba(12,15,20,.16),0 2px 6px rgba(12,15,20,.06);
  transform:translateY(-6px);opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .15s ease,transform .15s ease,visibility 0s linear .15s;
}
.side-drawer.open{
  transform:none;opacity:1;visibility:visible;pointer-events:auto;
  transition:opacity .15s ease,transform .15s ease;
}
.side-drawer>div{display:block;min-height:0;}
/* .ai-qa-card normally sizes itself to sit beside Highlights in a fixed-
   height grid cell (see .ai-qa-card above); here it just wraps its content. */
.side-drawer .ai-qa-card{height:auto;border:none;border-radius:0;box-shadow:none;margin-bottom:0;}
.side-drawer .ai-qa-body{flex:none;}
.side-drawer .ai-qa-thread{flex:none;max-height:50vh;}
.side-drawer .ai-qa-thread:empty{display:none;}
.side-drawer .ai-qa-body{gap:0;}
/* Divider only once there is a conversation to separate from the header. */
.side-drawer .ai-qa-thread:not(:empty){border-top:1px solid var(--line);padding-top:14px;margin-bottom:12px;}

.ai-qa-close{border:none;background:none;padding:4px;cursor:pointer;color:var(--slate);display:flex;flex:none;}
.ai-qa-close:hover{color:var(--ink);}
.ai-qa-close svg{width:10px;height:10px;}

/* ======================== AUTH / LOGIN SCREEN ==================== */
/* Full-page centred card on the paper ground, no app chrome. Sits outside
   .app. */
.auth-screen{
  min-height:100vh;display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  padding:40px 20px;background:var(--paper);
}
.auth-card{
  width:100%;max-width:380px;
  background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:0 12px 40px rgba(12,15,20,.10);
  padding:34px 32px 28px;
}
.auth-card .auth-logo{display:block;height:26px;width:auto;margin:0 auto 22px;}
.auth-card h1{font-size:18px;text-align:center;margin:0 0 4px;}
.auth-card .auth-sub{text-align:center;color:var(--slate);font-size:12.5px;margin:0 0 24px;}
.auth-form{display:flex;flex-direction:column;gap:14px;}
.auth-form input.text-input{width:100%;font-weight:400;}
.auth-card .btn{width:100%;}
.auth-divider{
  display:flex;align-items:center;gap:10px;margin:2px 0;
  font-family:var(--font-mono);font-size:10px;text-transform:uppercase;
  letter-spacing:.08em;color:var(--slate-light);
}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:var(--line);}
.auth-meta{text-align:center;font-size:11.5px;color:var(--slate);margin-top:18px;}
.auth-meta a{color:var(--cobalt-bright);}

/* ========================= ONE-PAGE SUMMARY ========================= */
/* "Generate Summary" overlay: a standalone printable document rendered over
   the dashboard, built by each dashboard's own renderSummaryDoc() (see
   product.htm / promo.html / market-snapshot.html)
   into #summary-doc inside this markup. The trigger button itself
   (.summary-trigger, wrapped in .summary-trigger-wrap - see HIGHLIGHTS + VERO
   PANEL above) is rendered by mountInsightsVeroRow() in dashboard.js.
   Dashboard-specific summary rules (e.g. a headline table's own delta layout)
   still belong in that dashboard's local <style> block, not here. */
.summary-trigger{
  border:none;background:color-mix(in srgb,var(--coral) 12%,transparent);color:var(--coral);
  font-family:var(--font-mono);font-size:10px;font-weight:600;
  text-transform:uppercase;letter-spacing:.06em;
  padding:5px 10px;border-radius:6px;cursor:pointer;transition:.12s;
}
.summary-trigger:hover{background:var(--coral);color:#fff;}

/* Fixed overlay with its own scroll context, so it never shares layout or
   scroll with the dashboard's own tables underneath. */
.summary-overlay{
  position:fixed;inset:0;z-index:50;background:rgba(12,15,20,.55);
  display:flex;justify-content:center;overflow-y:auto;padding:40px 20px;
}
.summary-overlay[hidden]{display:none;}
.summary-sheet{
  background:var(--card);max-width:820px;width:100%;border-radius:14px;
  box-shadow:0 24px 64px rgba(0,0,0,.32);align-self:flex-start;overflow:hidden;
}
.summary-toolbar{
  display:flex;justify-content:flex-end;gap:8px;align-items:center;
  padding:12px 20px;border-bottom:1px solid var(--line);
  position:sticky;top:0;background:var(--card);z-index:1;
}
.summary-btn{
  border:none;background:color-mix(in srgb,var(--ink) 6%,transparent);color:var(--ink);
  font-family:var(--font-body);font-size:12px;font-weight:600;
  padding:8px 14px;border-radius:6px;cursor:pointer;transition:.12s;
}
.summary-btn:hover{background:color-mix(in srgb,var(--ink) 10%,transparent);color:var(--cobalt-bright);}
.summary-btn-close{margin-right:auto;}
.summary-btn-primary{background:var(--cobalt);color:#fff;}
.summary-btn-primary:hover{opacity:.88;color:#fff;}

.summary-doc{padding:32px 44px 48px;color:var(--ink);}
.summary-doc .summary-head{border-bottom:2px solid var(--ink);padding-bottom:14px;margin-bottom:22px;}
.summary-doc .summary-head h2{
  font-family:var(--font-display);font-size:21px;margin:0 0 4px;letter-spacing:-.01em;
}
.summary-doc .summary-head .summary-sub{font-size:13px;color:var(--slate);font-weight:600;}
.summary-doc .summary-head .summary-gen{
  font-family:var(--font-mono);font-size:10.5px;color:var(--slate-light);
  text-transform:uppercase;letter-spacing:.05em;margin-top:6px;
}
.summary-doc h3.summary-section{
  font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.08em;
  font-size:10.5px;font-weight:500;color:var(--coral);margin:26px 0 10px;
}
.summary-doc h3.summary-section:first-of-type{margin-top:0;}

/* Data-freshness / completeness callout inside the summary document; shared
   declarations live with .data-notice above, this just adds doc spacing. */
.summary-datastate{margin-bottom:14px;}
.summary-narrative p{font-size:13px;line-height:1.7;margin:0 0 10px;}
.summary-narrative p:last-child{margin-bottom:0;}

/* Print only the summary document. Scoped with :has() so a plain Ctrl+P with
   no summary open still prints the dashboard normally; browsers without :has()
   fall back to always hiding the dashboard in print, which only matters for
   that manual-print edge case (the Print button always opens the summary
   first). */
@media print{
  body:has(#summary-overlay:not([hidden])) .app{display:none !important;}
  .summary-overlay{position:static;background:none;overflow:visible;padding:0;display:block;}
  .summary-overlay[hidden]{display:none;}
  .summary-sheet{box-shadow:none;max-width:none;width:auto;border-radius:0;}
  .summary-toolbar{display:none;}
  .summary-doc{padding:0;}
}

/* ============================== PRINT ========================= */
@media print{
  .sidebar,.topbar,.no-print{display:none !important;}
  /* .main/.content are capped to the viewport + internally scrolling on
     screen (see APP LAYOUT above) so Highlights/Vero can stick while the
     rest of a view scrolls underneath - undo that for print, or printing
     the raw dashboard (rather than through Generate Summary) would clip
     to one viewport's worth of content instead of paginating normally. */
  .main{margin-left:0;height:auto;overflow:visible;}
  .content{overflow:visible;}
  body{background:#fff;}
  .card,.panel{box-shadow:none;break-inside:avoid;}
}
