/* ============================================================
   CRM — a web port of the SwiftUI "Demo CRM" app, grown into a working CRM.

   The five tabs, the status/stage/kind colour tables and the phone
   interactions (sheets, swipe actions, context menus, search, segmented
   filter) still come from Demo CRM/CRM/CRM/*.swift one-for-one.

   Everything past that is the recommended scope from a survey of Salesforce,
   Zoho CRM, HubSpot, Pipedrive, Attio and Folk — the actions those products
   agree on that a demo needs to read as a CRM rather than five lists:

     · records are linked (contact → account, deal → account + contact)
     · every module pushes a detail view, with related lists and a timeline
     · edit as well as create; notes on any record
     · deal stage changes — a Path ribbon on the phone, a drag on the board
     · Convert Lead → Contact + Account + optional Deal
     · an owner on every record, completion kept as history, and a Dashboard
       tab, because Zoho ships Reports and Dashboards as modules

   Two deliberate departures from the Swift source: completing an activity
   keeps the row (it was a delete there), and the seeds are wider, because two
   unlinked rows per module give a related list and a chart nothing to say.

   Nothing here talks to a server — state lives in memory exactly as @State did.
   ============================================================ */
:root{
  color-scheme: light;

  /* SwiftUI system colours, light appearance — the Swift files name
     these by symbol (.blue, .mint, .indigo…), so keep the names */
  --blue:#007aff; --orange:#ff9500; --green:#34c759; --red:#ff3b30;
  --mint:#00c7be; --purple:#af52de; --teal:#30b0c7; --indigo:#5856d6;
  --gray:#8e8e93;

  /* planes & ink — the UIKit grouped-list greys, warmed toward the brand mark.
     #f2f2f7 already carried a faint violet cast; these commit to it, so the
     blue tint and the blue→indigo brand gradient still sit right on the ground.
     Ink, muted and every tint are unchanged — only the base moved. */
  --plane:#f0eef8;
  --surface:#fdfcff;
  --ink:#000000;
  --ink-2:#3c3c43;
  --muted:#8a8a8e;
  --hairline:#cec8e6;
  --separator:#e2def0;
  /* the chrome behind the sidebar, the page head and the panel head — a step
     lighter than the plane, and its own token now that it is not plain #fbfbfd */
  --chrome:#f7f5fc;

  --tint:var(--blue);
  --radius:14px;
  --shadow:0 1px 2px rgba(16,24,40,.05),0 6px 16px -6px rgba(16,24,40,.10);
  --shadow-lift:0 2px 4px rgba(16,24,40,.06),0 22px 46px -14px rgba(16,24,40,.26);
  --font-body:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",system-ui,sans-serif;
  --font-data:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
body{
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.4;
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  background:var(--plane);
  display:flex;
}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
input,select{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--tint);outline-offset:2px;border-radius:6px}
/* The borderless fields below drop their own outline, and their selectors outrank
   the rule above, so focus is drawn on what holds them. A form row gets a leading
   accent bar and a tinted label, the way a grouped list marks its active row: a
   box ring there reads as a validation error and is clipped by the section's
   rounded corners. The search pill is not a row, so it keeps a ring that follows
   its own radius. */
.field:has(input:focus,select:focus,textarea:focus)::after,
.pg-f:has(select:focus)::after{
  content:"";position:absolute;inset-block:8px;inset-inline-start:0;width:3px;
  border-start-end-radius:3px;border-end-end-radius:3px;background:var(--tint);
  pointer-events:none}
/* playground rows sit flush in a 16px-padded panel, so their bar goes in the gutter */
.pg-f:has(select:focus){position:relative}
.pg-f:has(select:focus)::after{inset-inline-start:-10px}
.field:has(input:focus,select:focus,textarea:focus) > label,
.pg-f:has(select:focus) > label{color:var(--tint)}
.search-field:has(input:focus){box-shadow:0 0 0 2px var(--tint)}
.search-field:has(input:focus) svg{stroke:var(--tint)}
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- shell ----------
   Narrow: the app is the page, phone idiom — bottom tab bar, pushed detail
   screens, sheets from the bottom edge. Wide (>=900px): the same five modules
   become a desktop app — sidebar, tables, a detail side panel. The sidebar and
   the tab bar are the same nav rendered twice; CSS decides which one is real. */
.shell{display:flex;width:100%;height:100vh;overflow:hidden}
.app{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--plane);
  transition:margin-right .3s cubic-bezier(.32,.72,0,1)}

/* ---------- sidebar (wide only) ---------- */
.sidebar{display:none;flex:none;width:232px;flex-direction:column;
  position:relative;z-index:4;
  background:var(--chrome);border-right:1px solid var(--separator);
  transition:width .22s cubic-bezier(.32,.72,0,1)}
.brand{display:flex;align-items:center;gap:9px;padding:20px 18px 16px;
  font-size:17px;font-weight:700;letter-spacing:-.02em}
.brand i{width:26px;height:26px;border-radius:7px;flex:none;
  background:linear-gradient(150deg,var(--blue),var(--indigo));
  display:flex;align-items:center;justify-content:center}
.brand i svg{width:24px;height:24px;stroke:#fff;fill:none;stroke-width:2.2;
  stroke-linecap:round;stroke-linejoin:round}
.sidebar nav{padding:4px 10px;display:flex;flex-direction:column;gap:1px}
.sidebar nav button{display:flex;align-items:center;gap:10px;width:100%;
  padding:8px 10px;border-radius:8px;font-size:14.5px;color:var(--ink-2);text-align:left}
.sidebar nav button svg{width:19px;height:19px;flex:none;stroke:currentColor;fill:none;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:.75}
.sidebar nav button:hover{background:rgba(60,60,67,.06)}
.sidebar nav button[aria-current="page"]{background:rgba(0,122,255,.11);color:var(--tint);
  font-weight:600}
.sidebar nav button[aria-current="page"] svg{opacity:1}

/* the rail toggle sits at the foot of the sidebar and wears the same clothes as
   a destination — it is at the bottom rather than beside the brand so that
   minifying moves nothing but the width */
.nav-foot{margin-top:auto;padding:10px 10px 14px}
.nav-toggle{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;
  border-radius:8px;font-size:13.5px;font-weight:600;color:var(--ink-2);
  background:rgba(60,60,67,.07);text-align:left}
.nav-toggle svg{width:19px;height:19px;flex:none;stroke:currentColor;fill:none;
  stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.nav-toggle:hover{background:rgba(60,60,67,.14);color:var(--ink)}

/* ---------- minified sidebar (wide only) ----------
   All six destinations stay exactly where they are. Each keeps a short label
   UNDER its icon (review round 2) — an icon-only rail made people hover to find
   Activities vs Analytics — so the rail is 76px rather than 60, still handing
   156px back to the content area. The user chip has no room for a name and
   keeps its hover tooltip. */
.sidebar.collapsed{width:76px}
.sidebar.collapsed .brand{justify-content:center;gap:0;padding:20px 0 16px}
.sidebar.collapsed .brand-name{display:none}
.sidebar.collapsed nav,
.sidebar.collapsed .nav-foot{padding-inline:6px}
.sidebar.collapsed nav{gap:2px}
.sidebar.collapsed nav button,
.sidebar.collapsed .nav-toggle{position:relative;flex-direction:column;justify-content:center;
  gap:3px;padding-block:7px 6px;padding-inline:0}
.sidebar.collapsed nav button > span,
.sidebar.collapsed .nav-toggle > span{flex:none;max-inline-size:100%;font-size:10.5px;
  line-height:1.15;font-weight:500;letter-spacing:0;text-align:center;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar.collapsed nav button[aria-current="page"] > span{font-weight:600}
.sidebar.collapsed .nav-user > span{position:absolute;width:1px;height:1px;padding:0;
  margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}
.sidebar.collapsed .nav-user::after{
  content:attr(data-label);position:absolute;left:calc(100% + 12px);top:50%;
  transform:translateY(-50%) scale(.94);transform-origin:left center;
  padding:5px 9px;border-radius:7px;background:rgba(28,28,30,.92);color:#fff;
  font-size:12.5px;font-weight:500;letter-spacing:0;white-space:nowrap;
  box-shadow:0 4px 14px rgba(0,0,0,.18);pointer-events:none;z-index:30;
  opacity:0;transition:opacity .14s ease,transform .14s ease}
.sidebar.collapsed .nav-user:hover::after,
.sidebar.collapsed .nav-user:focus-visible::after{
  opacity:1;transform:translateY(-50%) scale(1)}
@media (prefers-reduced-motion:reduce){
  .sidebar{transition:none}
  .sidebar.collapsed .nav-user::after{transition:none}
}

/* ---------- navigation bar ---------- */
.navbar{
  flex:none;position:relative;z-index:3;
  background:rgba(249,249,251,.86);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--separator);
}
.navbar-row{
  display:flex;align-items:center;gap:8px;
  min-height:44px;padding:6px 8px 0;
}
.navbar-lead,.navbar-trail{display:flex;align-items:center;flex:none;min-width:44px}
.navbar-trail{justify-content:flex-end}
.navbar-inline{
  flex:1;text-align:center;font-size:16px;font-weight:600;letter-spacing:-.01em;
  opacity:0;transition:opacity .2s ease;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.navbar.compact .navbar-inline{opacity:1}
/* .navigationBarTitleDisplayMode(.large) */
.navbar-large{
  padding:0 16px 6px;
  font-size:32px;font-weight:700;letter-spacing:-.028em;line-height:1.2;
  transition:opacity .2s ease,transform .2s ease,max-height .2s ease;
  max-height:48px;transform-origin:left bottom;
}
.navbar.compact .navbar-large{opacity:0;transform:scale(.86);max-height:0;padding-bottom:0}
.bar-btn{
  color:var(--tint);font-size:16px;padding:6px 8px;border-radius:8px;
  display:inline-flex;align-items:center;gap:3px;
}
.bar-btn:hover{background:rgba(0,122,255,.08)}
.bar-btn[disabled]{color:var(--muted);opacity:.55;cursor:default;background:none}
.bar-btn.strong{font-weight:600}
.bar-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;
  stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.back-btn svg{width:20px;height:20px;margin-left:-3px}
/* Ask Zia's launcher — the one header control in the brand gradient, so it
   reads as the way in rather than another toolbar glyph. Label on wide
   screens; on the iOS navbar it shrinks to a round gradient icon. */
.zia-btn{display:inline-flex;align-items:center;gap:7px;flex:none;
  padding:7px 14px;border:0;border-radius:999px;cursor:pointer;color:#fff;
  background:linear-gradient(135deg,#007aff,#5856d6);
  font-size:13.5px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;
  box-shadow:0 2px 8px rgba(88,86,214,.35);transition:filter .15s ease,box-shadow .15s ease}
.zia-btn:hover{filter:brightness(1.08);box-shadow:0 4px 14px rgba(88,86,214,.45)}
.zia-btn svg{width:17px;height:17px;stroke:currentColor;fill:none;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.navbar-trail .zia-btn{padding:7px;margin-right:4px}
.navbar-trail .zia-btn span{display:none}

/* .searchable(placement: .navigationBarDrawer(displayMode: .always)) */
.search-drawer{padding:0 12px 8px}
.search-field{
  display:flex;align-items:center;gap:7px;
  background:rgba(118,118,128,.12);border-radius:10px;padding:7px 9px;
}
.search-field svg{width:15px;height:15px;flex:none;stroke:var(--muted);fill:none;
  stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.search-field input{
  flex:1;border:0;background:none;outline:none;font-size:16px;min-width:0;
}
.search-field input::placeholder{color:var(--muted)}
.search-clear{flex:none;width:17px;height:17px;border-radius:50%;
  background:var(--muted);color:#fff;font-size:11px;line-height:17px;text-align:center;
  display:none}
.search-field.filled .search-clear{display:block}

/* ---------- screen ---------- */
.screen{flex:1;position:relative;overflow:hidden;min-height:0}
.stack{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--plane)}
.scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
/* NavigationStack push/pop */
@keyframes push-in{from{transform:translateX(100%)}to{transform:translateX(0)}}
@keyframes pop-out{from{transform:translateX(0)}to{transform:translateX(100%)}}
.stack.pushing{animation:push-in .3s cubic-bezier(.32,.72,0,1) both;box-shadow:-8px 0 24px rgba(0,0,0,.12)}
.stack.popping{animation:pop-out .28s cubic-bezier(.32,.72,0,1) both;box-shadow:-8px 0 24px rgba(0,0,0,.12)}

/* ---------- List (.insetGrouped) ---------- */
.list{padding:10px 16px 28px}
.list-section{
  background:var(--surface);border-radius:10px;overflow:hidden;
  box-shadow:0 1px 2px rgba(16,24,40,.05);
}
.section-header{
  font-size:12.5px;font-weight:400;letter-spacing:.02em;text-transform:uppercase;
  color:var(--muted);padding:14px 16px 6px;
}
.row{
  display:flex;align-items:center;gap:10px;
  padding:11px 16px;background:var(--surface);
  position:relative;width:100%;text-align:left;
}
.row + .row::before{
  content:"";position:absolute;left:16px;right:0;top:0;height:1px;background:var(--separator);
}
.row.tappable{cursor:pointer}
.row.tappable:active{background:#e7e2f5}
.row-main{flex:1;min-width:0}
/* .font(.headline) / .foregroundStyle(.secondary) */
.headline{font-size:16px;font-weight:600;letter-spacing:-.01em}
.secondary{color:var(--ink-2);opacity:.62;font-size:15px}
.caption{font-size:12.5px}
.disclosure{flex:none;width:9px;height:15px;stroke:#c6c0d8;fill:none;stroke-width:2.4;
  stroke-linecap:round;stroke-linejoin:round}
.value{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}

/* status / stage pills — .background(color.opacity(0.15)) */
.pill{
  display:inline-block;font-size:12px;line-height:1.25;padding:5px 7px;border-radius:6px;
  background:color-mix(in srgb,var(--c) 15%,transparent);
  color:color-mix(in srgb,var(--c) 74%,#000);
  font-weight:500;white-space:nowrap;
}
.pill.capsule{border-radius:999px;padding:5px 10px;font-size:11.5px}

/* LabeledContent, inside a Form */
.labeled{display:flex;align-items:center;gap:12px;padding:11px 16px;background:var(--surface);position:relative}
.labeled + .labeled::before{
  content:"";position:absolute;left:16px;right:0;top:0;height:1px;background:var(--separator);
}
.labeled dt{flex:none;margin:0}
.labeled dd{flex:1;margin:0;text-align:right;color:var(--ink-2);opacity:.62}

/* ---------- Activities: the one screen with a designed look ---------- */
.activities-bg{position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(135deg,rgba(88,86,214,.08) 0%,rgba(88,86,214,0) 65%)}
.activities .scroll{position:relative;z-index:1}
/* .safeAreaInset(edge: .top) { FilterBar } */
.filter-bar{
  position:relative;z-index:2;flex:none;margin:8px 16px 0;padding:8px;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
  border:1px solid rgba(255,255,255,.15);border-radius:12px;
  box-shadow:0 4px 8px rgba(0,0,0,.05);
}
/* .pickerStyle(.segmented) */
.segmented{
  display:flex;position:relative;background:rgba(118,118,128,.12);
  border-radius:8px;padding:2px;
}
.segmented button{
  flex:1;position:relative;z-index:1;padding:5px 4px;font-size:13px;font-weight:500;
  border-radius:7px;color:var(--ink);transition:font-weight .12s ease;
}
.segmented button[aria-selected="true"]{font-weight:600}
.seg-thumb{
  position:absolute;z-index:0;top:2px;bottom:2px;border-radius:7px;background:var(--surface);
  box-shadow:0 3px 8px rgba(0,0,0,.12),0 3px 1px rgba(0,0,0,.04);
  transition:left .24s cubic-bezier(.2,.7,.3,1),width .24s cubic-bezier(.2,.7,.3,1);
}
.activity-list{padding:10px 16px 28px;display:flex;flex-direction:column;gap:10px}
/* one row = the swipe container; the card slides over the action buttons */
.swipe{position:relative;border-radius:14px;isolation:isolate}
.swipe-actions{position:absolute;inset:0;display:flex;border-radius:14px;overflow:hidden;
  opacity:0;pointer-events:none;transition:opacity .14s ease}
.swipe-actions.leading{justify-content:flex-start}
.swipe-actions.trailing{justify-content:flex-end}
/* only the edge the row is being pulled from lights up */
.swipe.reveal-leading .swipe-actions.leading,
.swipe.reveal-trailing .swipe-actions.trailing{opacity:1;pointer-events:auto}
.swipe-actions button{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  width:80px;color:#fff;font-size:11.5px;font-weight:500;
}
.swipe-actions button svg{width:19px;height:19px;stroke:currentColor;fill:none;
  stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.swipe-actions .done{background:var(--green)}
.swipe-actions .delete{background:var(--red)}
/* ActivityRow — .background(.ultraThinMaterial, in: RoundedRectangle(14)) */
.activity-card{
  position:relative;display:flex;align-items:center;gap:12px;padding:12px;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
  border-radius:14px;border:1px solid rgba(255,255,255,.15);
  box-shadow:0 4px 8px rgba(0,0,0,.05);
  touch-action:pan-y;user-select:none;-webkit-user-select:none;
  transition:transform .28s cubic-bezier(.2,.7,.3,1);
  will-change:transform;
}
.activity-card.dragging{transition:none}
.activity-icon{
  flex:none;width:36px;height:36px;border-radius:50%;background:var(--c);
  display:flex;align-items:center;justify-content:center;
}
.activity-icon svg{width:17px;height:17px;stroke:#fff;fill:none;
  stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.activity-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.activity-main .headline{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.due{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink-2);opacity:.62}
.due svg{width:12px;height:12px;flex:none;stroke:currentColor;fill:none;
  stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
/* .animation(.snappy, value: filteredActivities) */
@keyframes snappy-in{from{opacity:0;transform:translateY(-6px) scale(.97)}to{opacity:1;transform:none}}
.swipe.entering{animation:snappy-in .32s cubic-bezier(.2,.9,.3,1.2) both}
.swipe.leaving{
  animation:snappy-out .26s cubic-bezier(.4,0,.6,1) both;pointer-events:none;
}
@keyframes snappy-out{
  from{opacity:1;max-height:120px;margin-bottom:0}
  to{opacity:0;max-height:0;margin-bottom:-10px;transform:scale(.94)}
}
.empty{
  padding:52px 32px;text-align:center;color:var(--muted);font-size:15px;
}

/* ---------- context menu ---------- */
.ctx-backdrop{position:fixed;inset:0;z-index:40;background:rgba(0,0,0,.14);
  backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
.ctx-menu{
  position:fixed;z-index:41;min-width:236px;padding:0;overflow:hidden;
  background:rgba(249,249,251,.94);
  backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);
  border-radius:13px;box-shadow:0 12px 40px rgba(0,0,0,.24);
  transform-origin:top left;animation:ctx-in .2s cubic-bezier(.2,.9,.3,1.1) both;
}
@keyframes ctx-in{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
.ctx-menu button{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  width:100%;padding:12px 16px;font-size:16px;text-align:left;
}
.ctx-menu button:hover{background:rgba(0,0,0,.05)}
.ctx-menu button.destructive{color:var(--red)}
.ctx-menu button svg{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ctx-divider{height:8px;background:rgba(60,60,67,.09)}

/* ---------- sheet ---------- */
.sheet-backdrop{
  position:fixed;inset:0;z-index:50;background:rgba(0,0,0,.28);
  animation:fade-in .3s ease both;
}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
.sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:51;top:34px;
  background:var(--plane);border-radius:12px 12px 0 0;overflow:hidden;
  display:flex;flex-direction:column;
  box-shadow:0 -6px 30px rgba(0,0,0,.18);
  animation:sheet-up .38s cubic-bezier(.32,.72,0,1) both;
}
@keyframes sheet-up{from{transform:translateY(100%)}to{transform:translateY(0)}}
.sheet.closing{animation:sheet-down .3s cubic-bezier(.32,.72,0,1) both}
@keyframes sheet-down{from{transform:translateY(0)}to{transform:translateY(100%)}}
.sheet .navbar{background:rgba(249,249,251,.94)}

/* ---------- Form ---------- */
.form{padding:18px 16px 28px}
.form-section{background:var(--surface);border-radius:10px;overflow:hidden}
.field{display:flex;align-items:center;gap:12px;padding:11px 16px;position:relative;min-height:44px}
.field + .field::before{
  content:"";position:absolute;left:16px;right:0;top:0;height:1px;background:var(--separator);
}
.field label{flex:none}
.field input[type=text],.field input[type=email],.field input[type=number]{
  flex:1;border:0;background:none;outline:none;font-size:16px;min-width:0}
.field input::placeholder{color:var(--muted)}
.field input[type=number]{text-align:right;-moz-appearance:textfield}
/* Picker, in a Form, is a right-aligned menu */
.field select{
  flex:1;border:0;background:none;outline:none;font-size:16px;text-align:right;
  text-align-last:right;color:var(--tint);cursor:pointer;
  appearance:none;-webkit-appearance:none;padding-right:14px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16' fill='none' stroke='%238a8a8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6l3-3 3 3M2 10l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 0 center;background-size:9px 14px;
}
.field input[type=datetime-local]{
  flex:1;border:0;outline:none;font-size:15px;text-align:right;
  background:rgba(118,118,128,.12);border-radius:7px;padding:5px 8px;
  color:var(--ink);min-width:0;
}

/* ---------- TabView ---------- */
.tabbar{
  flex:none;display:flex;position:relative;z-index:3;
  background:rgba(249,249,251,.9);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-top:1px solid var(--separator);
  padding-bottom:env(safe-area-inset-bottom);
}
.tabbar button{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:7px 2px 6px;color:var(--muted);font-size:10px;letter-spacing:-.01em;
}
.tabbar button svg{width:25px;height:25px;stroke:currentColor;fill:none;
  stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tabbar button[aria-current="page"]{color:var(--tint)}
.tabbar button:active{opacity:.6}

/* ---------- hover row actions (stand in for swipe on a pointer device) ---------- */
.row-actions{display:none;flex:none;gap:4px;margin-left:2px}
.row-actions button{width:30px;height:30px;border-radius:8px;display:flex;
  align-items:center;justify-content:center;color:var(--muted);
  transition:background .14s ease,color .14s ease}
.row-actions button svg{width:16px;height:16px;stroke:currentColor;fill:none;
  stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
.row-actions .done:hover{background:rgba(52,199,89,.14);color:#1e8e3e}
.row-actions .delete:hover{background:rgba(255,59,48,.13);color:var(--red)}

/* ---------- stat tiles ----------
   The KPI row every surveyed CRM puts above a module list. A 1px grid gap over
   a separator-coloured ground draws the hairlines, so the strip reads as one
   object and still wraps cleanly to two rows on a phone. */
.stats{
  display:grid;grid-template-columns:repeat(var(--cols,2),minmax(0,1fr));gap:1px;
  margin:10px 16px 0;background:var(--separator);border-radius:10px;overflow:hidden;
  box-shadow:0 1px 2px rgba(16,24,40,.05);
}
.stats dl,.stats > div{margin:0}
.stat{background:var(--surface);padding:11px 14px 12px;min-width:0}
.stat dt{margin:0;font-size:10.5px;font-weight:500;letter-spacing:.045em;text-transform:uppercase;
  color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat dd{margin:3px 0 0;font-size:19px;font-weight:700;letter-spacing:-.022em;
  font-variant-numeric:tabular-nums;line-height:1.15}
.stat .trend{display:block;font-size:11.5px;font-weight:400;letter-spacing:0;
  color:var(--muted);margin-top:2px}


/* ---------- record highlights panel ----------
   Salesforce calls it the Highlights panel, HubSpot the record header: the
   identity of the record, its owner, and the one number that matters. */
.hilite{display:flex;align-items:center;gap:12px;padding:14px 16px;
  background:var(--surface);border-bottom:1px solid var(--separator)}
.avatar{flex:none;width:42px;height:42px;border-radius:50%;background:var(--c,var(--gray));
  color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:15px;font-weight:600;letter-spacing:-.02em}
.avatar.sq{border-radius:11px}
.hilite-main{flex:1;min-width:0}
.hilite-main h2{margin:0;font-size:19px;font-weight:700;letter-spacing:-.024em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hilite-main .secondary{display:block;margin-top:1px;font-size:13.5px}
.hilite .value{font-size:17px}

/* owner chip — initials, so a roll-up by owner is legible without a name column */
.owner{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;min-width:0}
.owner i{flex:none;width:20px;height:20px;border-radius:50%;background:var(--c);color:#fff;
  font-size:9px;font-weight:700;letter-spacing:0;display:flex;align-items:center;
  justify-content:center;font-style:normal}
.owner span{overflow:hidden;text-overflow:ellipsis}

/* ---------- Path ribbon ----------
   Tap a chevron to move the deal. Only the four open stages ride the path;
   the two terminal stages are separate, because closing is a different act. */
.path-wrap{padding:12px 16px;background:var(--surface);border-bottom:1px solid var(--separator)}
.path{display:flex;gap:2px}
.path button{
  flex:1 1 0;min-width:0;position:relative;padding:9px 8px 9px 17px;
  font-size:12px;font-weight:600;letter-spacing:-.01em;color:var(--ink-2);
  background:rgba(118,118,128,.12);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  clip-path:polygon(0 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,0 100%,8px 50%);
}
.path button:first-child{padding-left:11px;
  clip-path:polygon(0 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,0 100%)}
.path button.behind{background:color-mix(in srgb,var(--tint) 15%,transparent);color:var(--tint)}
.path button.current{background:var(--tint);color:#fff}
.path button:hover:not(.current){background:rgba(118,118,128,.2)}
.path-close{display:flex;gap:8px;margin-top:9px}
.path-close button{flex:1;padding:8px;border-radius:8px;font-size:13.5px;font-weight:600}
.btn-won{background:color-mix(in srgb,var(--green) 15%,transparent);color:#1c8b41}
.btn-won:hover{background:color-mix(in srgb,var(--green) 24%,transparent)}
.btn-lost{background:color-mix(in srgb,var(--red) 12%,transparent);color:#c8271c}
.btn-lost:hover{background:color-mix(in srgb,var(--red) 20%,transparent)}
.path-closed{display:flex;align-items:center;gap:9px;font-size:13.5px;font-weight:600}
.path-closed .reopen{margin-left:auto;color:var(--tint);font-size:13px;font-weight:600}

/* ---------- section header carrying an action ---------- */
.section-header.with-action{display:flex;align-items:baseline;gap:10px;padding-right:16px}
.section-header.with-action > span{flex:1;min-width:0}
.hdr-btn{color:var(--tint);font-size:12.5px;font-weight:600;text-transform:none;
  letter-spacing:0;flex:none}
.hdr-btn:hover{text-decoration:underline}

/* ---------- list pager ----------
   Sits under a list or table; the negative margin takes back the bottom
   padding those already reserve, so the pager reads as their footer. */
.pager{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding-block:0 28px;padding-inline:16px;font-size:12.5px}
.list + .pager{margin-block-start:-16px}
.activity-list + .pager{padding-block-start:12px}
.pager-nav{display:flex;align-items:center;gap:14px}
.pager-pos{color:var(--ink-2);font-variant-numeric:tabular-nums}
.pager-range{font-variant-numeric:tabular-nums}
.pager .hdr-btn[disabled]{color:var(--muted);opacity:.55;cursor:default;text-decoration:none}

/* ---------- timeline (notes + logged activity, newest first) ---------- */
.timeline{background:var(--surface);border-radius:10px;overflow:hidden;
  box-shadow:0 1px 2px rgba(16,24,40,.05)}
.tl{display:flex;gap:11px;padding:11px 14px;position:relative}
.tl + .tl::before{content:"";position:absolute;left:14px;right:0;top:0;height:1px;
  background:var(--separator)}
.tl-icon{flex:none;width:26px;height:26px;border-radius:50%;margin-top:1px;
  background:color-mix(in srgb,var(--c) 15%,transparent);
  display:flex;align-items:center;justify-content:center}
.tl-icon svg{width:14px;height:14px;fill:none;stroke-width:2.2;
  stroke:color-mix(in srgb,var(--c) 70%,#000);stroke-linecap:round;stroke-linejoin:round}
.tl-main{flex:1;min-width:0}
.tl-main .t{font-size:14.5px;font-weight:500;letter-spacing:-.006em}
.tl-main .m{display:flex;align-items:center;gap:7px;flex-wrap:wrap;
  font-size:12px;color:var(--muted);margin-top:2px}
.tl-main .body{font-size:13.5px;color:var(--ink-2);margin-top:4px;white-space:pre-wrap;
  overflow-wrap:anywhere}
.tl.is-done .t{text-decoration:line-through;text-decoration-color:rgba(60,60,67,.3);opacity:.6}

/* ---------- charts ----------
   Hand-drawn horizontal bars: magnitude by category, one row per category,
   every row directly labelled with its name and value. Direct labels are what
   licenses the app's own stage/status hues here — identity never rests on
   colour alone, and the low-contrast fills always sit beside real text. */
.charts{display:grid;gap:12px;padding:10px 16px 24px}
.card{background:var(--surface);border-radius:12px;padding:14px 16px 16px;
  box-shadow:0 1px 2px rgba(16,24,40,.05)}
.card h3{margin:0;font-size:15px;font-weight:600;letter-spacing:-.015em}
.card-sub{margin:2px 0 13px;font-size:12.5px;color:var(--muted)}
.chart-legend{display:flex;gap:14px;margin:-4px 0 12px;font-size:12px;color:var(--ink-2)}
.chart-legend span{display:inline-flex;align-items:center;gap:5px}
.chart-legend i{width:9px;height:9px;border-radius:2px;background:var(--c);flex:none}
.bars{display:flex;flex-direction:column;gap:10px}
.bar-row{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:baseline;
  border-radius:6px;margin:0 -4px;padding:1px 4px 2px}
.bar-row:hover{background:rgba(118,118,128,.07)}
.bar-label{font-size:12.5px;font-weight:500;color:var(--ink-2);min-width:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar-val{font-size:12.5px;font-weight:600;color:var(--ink);text-align:right;
  font-variant-numeric:tabular-nums}
.bar-val em{font-style:normal;font-weight:400;color:var(--muted)}
.bar-track{grid-column:1/-1;height:9px;border-radius:5px;display:flex;
  background:rgba(118,118,128,.13);overflow:hidden}
.bar-fill{height:100%;background:var(--c);min-width:2px}
.bar-fill:last-child{border-radius:0 4px 4px 0}
/* a 2px surface gap keeps stacked segments from reading as one mark */
.bar-fill + .bar-fill{border-left:2px solid var(--surface)}
.chart-tip{position:fixed;z-index:60;pointer-events:none;padding:6px 9px;border-radius:8px;
  background:rgba(28,28,30,.94);color:#fff;font-size:12px;line-height:1.4;white-space:nowrap;
  box-shadow:0 6px 20px rgba(0,0,0,.24);transform:translate(-50%,calc(-100% - 10px))}
.chart-tip b{font-weight:600}
.chart-tip .k{opacity:.68}
.embed-note{margin:0 16px 28px;padding:12px 14px;border-radius:10px;font-size:12.5px;
  line-height:1.55;color:var(--ink-2);
  background:rgba(88,86,214,.07);border:1px solid rgba(88,86,214,.15)}
.embed-note b{color:var(--ink);font-weight:600}

/* ---------- kanban board ----------
   Desktop only: dragging a card between columns is the signature CRM gesture,
   and it has no honest phone equivalent — the phone moves a deal on its Path. */
.board{display:flex;gap:12px;padding:14px 16px 28px;overflow-x:auto;align-items:flex-start}
.col{flex:0 0 244px;background:rgba(118,118,128,.07);border-radius:12px;padding:8px;
  transition:background .14s ease}
.col.over{background:rgba(0,122,255,.1);box-shadow:inset 0 0 0 2px rgba(0,122,255,.34)}
.col-head{display:flex;align-items:center;gap:8px;padding:5px 6px 2px}
.col-head .dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--c)}
.col-head h3{margin:0;flex:1;min-width:0;font-size:13px;font-weight:600;letter-spacing:-.01em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.col-head .n{font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.col-sum{padding:0 6px 9px;font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.kcards{display:flex;flex-direction:column;gap:8px;min-height:34px}
.kcard{display:block;width:100%;text-align:left;background:var(--surface);border-radius:10px;
  padding:10px 11px;cursor:grab;border-left:3px solid var(--c);
  box-shadow:0 1px 2px rgba(16,24,40,.07)}
.kcard:hover{box-shadow:0 1px 2px rgba(16,24,40,.07),0 6px 16px -8px rgba(16,24,40,.3)}
.kcard.dragging{opacity:.38;cursor:grabbing}
.kcard .kname{display:block;font-size:13.5px;font-weight:600;letter-spacing:-.012em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kcard .kmeta{display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin-top:7px}
.kcard .kmeta .value{font-size:13px}
.col-empty{padding:12px 8px;font-size:12px;color:var(--muted);text-align:center}

/* ---------- toast ---------- */
.toast{position:fixed;left:50%;z-index:70;bottom:calc(env(safe-area-inset-bottom) + 66px);
  max-width:calc(100% - 32px);padding:11px 16px;border-radius:12px;
  background:rgba(28,28,30,.95);color:#fff;font-size:14px;font-weight:500;
  box-shadow:0 10px 30px rgba(0,0,0,.3);
  animation:toast-in .26s cubic-bezier(.2,.9,.3,1.1) both}
@keyframes toast-in{from{opacity:0;transform:translate(-50%,14px)}
  to{opacity:1;transform:translate(-50%,0)}}
.toast.out{animation:toast-out .22s ease both}
@keyframes toast-out{from{opacity:1;transform:translate(-50%,0)}
  to{opacity:0;transform:translate(-50%,10px)}}

/* ---------- completed activities ---------- */
.activity-card.is-done{background:rgba(255,255,255,.55)}
.activity-card.is-done .headline{text-decoration:line-through;
  text-decoration-color:rgba(60,60,67,.32);opacity:.58}
.activity-card.is-done .activity-icon{opacity:.45}
.rel-tag{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--ink-2);
  opacity:.62;min-width:0}
.rel-tag svg{width:11px;height:11px;flex:none;stroke:currentColor;fill:none;stroke-width:2.2;
  stroke-linecap:round;stroke-linejoin:round}
.rel-tag span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- multi-line form field (notes) ---------- */
.field.stack{flex-direction:column;align-items:stretch;gap:5px;padding:12px 16px}
.field.stack label{font-size:12.5px;color:var(--muted)}
.field textarea{width:100%;border:0;background:none;outline:none;font:inherit;font-size:16px;
  resize:vertical;min-height:92px;line-height:1.45}
.field textarea::placeholder{color:var(--muted)}
.field .static{flex:1;text-align:right;color:var(--ink-2);opacity:.62;font-size:15px}

/* the segmented control also serves as a list/board switcher */
.view-toggle .segmented{width:auto}
.view-toggle .segmented button{padding:5px 12px}

/* the two closing buttons carry an icon beside their label */
.path-close button{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.path-close button svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2.2;
  stroke-linecap:round;stroke-linejoin:round}

/* six tabs instead of five, so a long label has to be allowed to clip */
.tabbar button{min-width:0}
.tabbar button > span{display:block;max-width:100%;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
/* ---------- dashboard browser ---------- */
.dash-note{
  margin:12px 16px;padding:16px;border-radius:12px;background:var(--surface);
  box-shadow:0 1px 2px rgba(16,24,40,.05);
  display:flex;flex-direction:column;gap:7px;align-items:flex-start;
  font-size:14px;color:var(--ink-2);line-height:1.5;
}
.dash-note b{color:var(--ink);font-weight:600;font-size:15px}
.dash-note code{font-family:var(--font-data);font-size:12.5px;
  background:rgba(118,118,128,.14);padding:1px 5px;border-radius:4px}
.dash-note .hint{font-size:13px;color:var(--muted)}
.dash-note.err{border-left:3px solid var(--red)}
.btn-inline{
  align-self:flex-start;margin-top:4px;padding:7px 13px;border-radius:8px;
  background:var(--tint);color:#fff;font-size:13.5px;font-weight:600;
}
.btn-inline:hover{background:#0069db}

.spinner{
  width:15px;height:15px;flex:none;border-radius:50%;
  border:2px solid rgba(118,118,128,.28);border-top-color:var(--tint);
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:2.4s}}

.dash-row{align-items:flex-start}
.dash-icon{
  flex:none;width:32px;height:32px;border-radius:9px;margin-top:1px;
  background:color-mix(in srgb,var(--indigo) 14%,transparent);
  display:flex;align-items:center;justify-content:center;
}
.dash-icon svg{width:17px;height:17px;fill:none;stroke:var(--indigo);
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dash-row .row-main{display:flex;flex-direction:column;gap:2px}
.dash-desc{display:block;overflow:hidden;text-overflow:ellipsis;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

/* An opened dashboard tints its scroll area; every other screen keeps the
   default --plane from .stack. Scoped under .stack on purpose — a sheet's
   .scroll is a sibling of .stack, so dialogs are unaffected. */
.stack.dashboard-open .scroll{background:var(--plane)}

/* the SDK mounts its own frame into .za-host; .viz-wrap owns the chrome and
   the loading overlay so the host stays untouched between renders */
.viz-wrap{
  position:relative;margin:12px 16px;border-radius:12px;overflow:hidden;
  background:var(--surface);border:1px solid var(--separator);
  box-shadow:0 1px 2px rgba(16,24,40,.05);min-height:420px;
}
/* An opened dashboard IS the tab's content, not a card sitting inside it:
   no frame, no shadow, no inset. That framing is most of what made the embed
   read as a separate pane. */
.dashboard-open .viz-wrap{margin:0;border:0;border-radius:0;box-shadow:none;
  background:transparent}
.dashboard-open .embed-note{margin:14px 16px 20px}
/* the dashboard switcher: the chip strip the Deals report picker already uses,
   so moving between dashboards uses a control this app already teaches */
.dash-switch{display:flex;align-items:center;gap:8px;overflow-x:auto;
  padding:12px 16px 2px;scrollbar-width:none}
.dash-switch::-webkit-scrollbar{display:none}
.dash-switch .chip-btn{flex:none;white-space:nowrap}
.dash-switch .chip-btn:not(.on){border-color:var(--separator);background:var(--surface)}
.dash-switch .chip-btn:not(.on):hover{background:rgba(60,60,67,.06);color:var(--ink)}
.dash-switch-sp{flex:1;min-width:8px}
/* Zoho's attribution strip renders at the BOTTOM, inside the frame, so nothing
   here can select it. The only lever is geometry: the frame is mounted ZA_FOOT
   taller than its host and the host clips the overflow. This HIDES rather than
   removes — a change to Zoho's internal layout re-exposes it, and from outside
   a cross-origin frame nothing can detect that. */
.viz-wrap.foot-clip .za-host{overflow:hidden}
/* A negative bottom margin, exactly as .uf-clip does at the top. It needs NO
   explicit height, so the toolbar's HEIGHT control and resizeFrame() keep
   working — pinning the host to a fixed height broke both. */
.viz-wrap.foot-clip .za-host iframe{margin-bottom:-34px}
.za-host{min-height:420px}
/* A live view waiting its turn. It has to stay IN the viewport and not
   visibility:hidden: the browser stops rendering a cross-origin frame it
   considers hidden or off screen, and a preload that never paints saves
   nothing. So it sits behind the app, fully transparent, at a typical content
   width so it lays out at about the size it will be shown at. */
.za-parking{position:fixed;inset-block-start:0;inset-inline-start:0;z-index:-1;
  width:min(1100px,100vw);opacity:0;pointer-events:none;overflow:hidden;
  max-height:100vh}
.za-box{width:100%}
.za-host iframe{display:block;width:100%;border:0}
.viz-loading{
  position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:10px;padding:24px;text-align:center;
  background:var(--surface);color:var(--ink-2);font-size:14px;
}
/* only an error covers the frame — while loading, Analytics' own loader
   inside it is the one the viewer sees */
.viz-wrap:not(.is-error) .viz-loading{display:none}
.viz-err{color:var(--red);font-weight:600;max-width:34em;line-height:1.5}
/* the late-ready notice sits above the frame instead of over it */
.viz-stalled{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:10px 14px;font-size:13px;line-height:1.45;color:#8a5300;
  background:color-mix(in srgb,var(--orange) 12%,transparent);
  border-bottom:1px solid color-mix(in srgb,var(--orange) 26%,transparent);
}
.viz-stalled .btn-inline{margin-top:0;padding:5px 11px;font-size:12.5px}
a.hdr-btn{text-decoration:none}
/* the embed itself — an iframe needs a real height, it will not grow to fit */
.embed-wrap{
  margin:12px 16px;border-radius:12px;overflow:hidden;background:var(--surface);
  border:1px solid var(--separator);box-shadow:0 1px 2px rgba(16,24,40,.05);
}
.embed-frame{
  display:block;width:100%;border:0;
  height:min(760px,calc(100vh - 260px));min-height:420px;
}

/* Ask Zia's modal.

   A centred dialog rather than a side panel, and that was decided by
   photographing both: a 420px dock either narrows the app or covers it, and
   against a real screen both lose the same two table columns. Centred, the app
   stays whole behind the scrim — and Zia gets the width the charts it answers
   with need. Measured: it reflows to one column at 420 and is comfortable well
   above 700, so 880 is the size, not a guess.

   It reuses .pg-head and .pg-x rather than restating them; only the geometry
   is its own. Narrow screens get a near-fullscreen sheet, because 880 centred
   on a phone is just a cramped page with margins.

   .zia-modal-open is on <body>, NOT .zia-open: that name belonged to the
   retired Ask Zia screen, and a <body> wearing it would have re-styled the
   dashboard's own chip strip underneath. */
.zia-scrim{position:fixed;inset:0;z-index:46;background:rgba(16,24,40,.38);
  animation:fade-in .3s ease both}
.zia-modal{position:fixed;z-index:47;inset:10px;background:var(--plane);
  border-radius:14px;display:flex;flex-direction:column;overflow:hidden;
  box-shadow:0 28px 80px rgba(16,24,40,.34);
  animation:zia-in .28s cubic-bezier(.32,.72,0,1) both}
@keyframes zia-in{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}
.zia-modal .pg-head{background:var(--chrome)}
.zia-modal .zia-open-slot{flex:none;display:flex;align-items:center;margin-right:2px}
.zia-body{flex:1;min-height:0;display:flex;flex-direction:column;
  background:var(--surface)}
iframe.zia-frame{flex:1;min-height:0;width:100%;border:0;display:block}
.zia-modal .dash-note{margin:16px}

/* ============================================================
   Embed playground — the option surface for the dashboard on screen.

   Two classes of option, and the difference between them is the point:
     HOT   applied to the live instance, nothing remounts — frame height goes
           through viz.resizeFrame(), a row filter through
           viz.applyUserFilter(), and the method buttons are direct calls.
     COLD  baked into the signed embed URL by the Catalyst function
           (?toolbar=0), so it cannot change without minting a new URL and
           building a new viz. Queued, counted, applied only on request.
   ============================================================ */
.pg-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 16px 0}
.pg-open{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border-radius:9px;
  background:var(--surface);border:1px solid var(--separator);font-size:13.5px;font-weight:600;
  box-shadow:0 1px 2px rgba(16,24,40,.05)}
.pg-open:hover{border-color:color-mix(in srgb,var(--tint) 45%,var(--separator))}
.pg-open svg{width:15px;height:15px;stroke:var(--tint);fill:none;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round}
.pg-open .n{min-width:18px;height:18px;padding:0 5px;border-radius:999px;
  background:var(--indigo);color:#fff;font-size:10.5px;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center}
.pg-tb{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.pg-inline{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;
  letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.pg-inline select{border:1px solid var(--separator);background:var(--surface);
  border-radius:8px;padding:5px 7px;font-size:12.5px;font-weight:500;
  letter-spacing:0;text-transform:none;color:var(--ink)}
.pg-inline select:disabled{opacity:.45}
.pg-reset{background:rgba(255,59,48,.1);color:#c8271c}
/* in the panel header it sits on the title's baseline, beside the close button */
.pg-reset.in-head{flex:none;margin-top:1px}
.pg-reset:hover{background:rgba(255,59,48,.18);color:#b3231a}
.pg-live{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);
  white-space:nowrap}
.pg-live::before{content:"";width:7px;height:7px;border-radius:50%;flex:none;
  background:var(--orange)}
.pg-live.ok::before{background:var(--green)}
.pg-m[disabled]{opacity:.4;cursor:default}
/* an action the mounted view cannot perform is removed from the bar, not
   greyed — explicit, so a later display rule on .pg-m cannot resurrect it */
.pg-m[hidden]{display:none}
.pg-method{font-size:12.5px;color:var(--muted)}
.pg-method b{color:var(--ink-2);font-weight:600}

.pg-scrim{position:fixed;inset:0;z-index:44;background:rgba(0,0,0,.2);
  animation:fade-in .3s ease both}
.pg{position:fixed;z-index:45;left:0;right:0;bottom:0;top:36%;background:var(--plane);
  border-radius:14px 14px 0 0;display:flex;flex-direction:column;
  box-shadow:0 -8px 34px rgba(0,0,0,.24);animation:pg-in .36s cubic-bezier(.32,.72,0,1) both}
@keyframes pg-in{from{transform:translateY(100%)}to{transform:translateY(0)}}
.pg-head{flex:none;display:flex;align-items:flex-start;gap:10px;padding:13px 16px 11px;
  border-bottom:1px solid var(--separator);background:rgba(249,249,251,.94)}
.pg-head h2{margin:0;font-size:16px;font-weight:700;letter-spacing:-.02em;flex:1;min-width:0}
.pg-head .sub{display:block;font-size:11.5px;font-weight:400;color:var(--muted);
  margin-top:2px;letter-spacing:0}
.pg-x{flex:none;width:28px;height:28px;border-radius:50%;background:rgba(60,60,67,.09);
  color:var(--muted);display:flex;align-items:center;justify-content:center}
.pg-x:hover{background:rgba(60,60,67,.17);color:var(--ink)}
.pg-x svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.6;
  stroke-linecap:round}
.pg-body{flex:1;min-height:0;overflow-y:auto;padding:0 16px 14px}

.pg-grp{border-bottom:1px solid var(--separator)}
/* the header row. The info icon is its own button BESIDE the fold toggle rather
   than inside it: nested buttons are invalid, and clicking for a note should
   not also fold the group away underneath it. */
.pg-gh{display:flex;align-items:center;gap:8px}
.pg-gh > [data-pg="group"]{display:flex;align-items:center;gap:9px;flex:1;min-width:0;
  padding:12px 0 10px;
  text-align:left;font-size:12px;font-weight:600;letter-spacing:.05em;
  text-transform:uppercase;color:var(--muted)}
.pg-gh > button .sp{flex:1}
/* the fold indicator. A 10px hairline in --muted read as decoration, so it
   wears a well and the body ink: with the notes gone the fold is the main thing
   a header still does, and it has to look like it does something. */
.pg-gh > button .chev{width:19px;height:19px;padding:4.5px;flex:none;
  border-radius:6px;background:rgba(118,118,128,.15);
  stroke:var(--ink-2);fill:none;
  stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s ease}
.pg-gh > [data-pg="group"]:hover .chev{background:rgba(118,118,128,.28)}
.pg-grp.open .pg-gh .chev{transform:rotate(90deg)}
.pg-i{flex:none;width:17px;height:17px;border-radius:50%;display:flex;
  align-items:center;justify-content:center;background:rgba(118,118,128,.16);
  color:var(--muted);font-size:11px;font-weight:700;line-height:1;cursor:help}
.pg-i:hover,.pg-i:focus{background:rgba(118,118,128,.3);color:var(--ink-2)}
/* position:fixed, not absolute: .pg-body scrolls, and a scroll container clips
   an absolutely positioned child on BOTH axes even when only overflow-y is set.
   pgPlaceTip() supplies the coordinates from the icon's rect. */
.pg-tip{position:fixed;z-index:60;width:min(300px,calc(100vw - 24px));
  padding:11px 13px;border-radius:10px;background:var(--surface);
  border:1px solid var(--separator);box-shadow:var(--shadow-lift);
  left:0;top:0;   /* a placeholder origin: pgPlaceTip() overwrites both, and
                     this keeps an unplaced tip on screen rather than at its
                     static position out past the panel's edge */
  opacity:0;visibility:hidden;transform:translateY(-4px);
  transition:opacity .14s ease,transform .14s ease,visibility .14s}
/* :focus rather than :focus-visible so a tap opens it too — a touch screen has
   no hover, and these notes are the only place this prose still lives.
   .pg-tip:hover keeps it up while you move the pointer onto a long note. */
.pg-i:hover + .pg-tip,.pg-i:focus + .pg-tip,.pg-tip:hover{
  opacity:1;visibility:visible;transform:none}
.pg-tip > :first-child{margin-top:0}
.pg-grp .in{display:none;padding-bottom:13px}
.pg-grp.open .in{display:block}
.pg-tag{font-size:9.5px;font-weight:700;letter-spacing:.05em;padding:2px 6px;
  border-radius:4px;text-transform:uppercase;flex:none}
.pg-tag.hot{background:color-mix(in srgb,var(--green) 17%,transparent);color:#146c35}
.pg-tag.cold{background:color-mix(in srgb,var(--blue) 15%,transparent);color:#0060cc}

.pg-f{display:flex;align-items:center;gap:12px;min-height:40px;font-size:14.5px}
.pg-f + .pg-f{border-top:1px solid var(--separator)}
.pg-f > label{flex:none;color:var(--ink-2)}
.pg-f .sp{flex:1}
.pg-f .k{display:block;font-family:var(--font-data);font-size:10.5px;color:var(--muted);
  margin-top:1px;letter-spacing:0}
.pg-num{font-variant-numeric:tabular-nums;font-size:13px;color:var(--muted);min-width:56px;
  text-align:right;flex:none}
.pg-f input[type=range]{flex:1;max-width:170px;accent-color:var(--tint);cursor:pointer}
.pg-f select{border:0;background:none;outline:none;font-size:15px;text-align:right;
  text-align-last:right;color:var(--tint);font-weight:500;cursor:pointer;max-width:52%}
.pg-sw{flex:none;width:44px;height:26px;border-radius:999px;background:rgba(120,120,128,.24);
  position:relative;transition:background .2s ease}
.pg-sw::after{content:"";position:absolute;top:2px;left:2px;width:22px;height:22px;
  border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);
  transition:transform .2s cubic-bezier(.2,.7,.3,1)}
.pg-sw[aria-checked="true"]{background:var(--green)}
.pg-sw[aria-checked="true"]::after{transform:translateX(18px)}
/* a queued switch holds its new position and says so — animating back would
   read as a click that failed */
.pg-sw.pending{background:rgba(0,122,255,.3);box-shadow:inset 0 0 0 1.5px var(--tint)}
.pg-hint{margin:10px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
.pg-hint b{color:var(--ink-2)}
.pg-acts{display:flex;flex-wrap:wrap;gap:6px}
.pg-m{padding:6px 11px;border-radius:8px;font-size:12.5px;font-weight:600;
  font-family:var(--font-data);background:rgba(118,118,128,.12);color:var(--ink-2)}
.pg-m:hover{background:rgba(0,122,255,.13);color:#0060cc}

/* the Source group — the fields that swap the credential the whole screen runs
   on. These are text inputs inside a panel rebuilt by innerHTML, which is why
   pgRepaint() puts the caret back. */
.pg-in{flex:1;min-width:0;border:1px solid var(--separator);background:var(--surface);
  border-radius:8px;padding:7px 9px;font-family:var(--font-data);font-size:12px;
  color:var(--ink);outline:none}
.pg-in:focus{border-color:var(--tint);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--tint) 14%,transparent)}
.pg-fv{display:block;padding:9px 0 0}
.pg-fv > label{display:block;font-size:11px;font-weight:600;letter-spacing:.05em;
  text-transform:uppercase;color:var(--muted);margin-bottom:5px}
.pg-fv .row{display:flex;align-items:center;gap:7px}
.pg-fv select{flex:1;min-width:0;border:1px solid var(--separator);background:var(--surface);
  border-radius:8px;padding:7px 9px;font-size:12.5px;font-weight:500;color:var(--ink);
  max-width:none;text-align:left;text-align-last:left}
.pg-go{flex:none;padding:7px 13px;border-radius:8px;font-size:12.5px;font-weight:600;
  background:var(--tint);color:#fff}
.pg-go:hover{filter:brightness(1.07)}
.pg-go.off{background:rgba(255,59,48,.12);color:#c8271c}
.pg-go[disabled]{opacity:.5;cursor:default}
.pg-tag.setup{background:color-mix(in srgb,var(--indigo) 15%,transparent);color:#4b3fbb}
.pg-warn{margin:9px 0 0;font-size:11.5px;line-height:1.5;color:#8a5200;
  background:color-mix(in srgb,var(--orange) 13%,transparent);
  border-radius:8px;padding:8px 10px}
.pg-warn b{color:#6d4100}
.pg-warn.err{color:#b3231a;background:rgba(255,59,48,.1)}
.pg-warn.err b{color:#8f1c15}

.pg-banner{flex:none;display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:11px 16px;background:color-mix(in srgb,var(--blue) 9%,var(--surface));
  border-top:1px solid color-mix(in srgb,var(--blue) 26%,transparent)}
.pg-banner .t{flex:1;min-width:140px;font-size:12.5px;line-height:1.45;color:var(--ink-2)}
.pg-banner .t b{color:var(--ink)}
.pg-banner .undo{font-size:12.5px;font-weight:600;color:var(--muted)}
.pg-banner .undo:hover{color:var(--ink)}

.pg-cons{flex:none;display:flex;flex-direction:column;height:36%;min-height:130px;
  border-top:1px solid var(--separator);background:var(--surface)}
.pg-tabs{flex:none;display:flex;gap:4px;padding:9px 16px 0}
.pg-tabs button{padding:4px 10px;border-radius:7px;font-size:12px;font-weight:600;
  color:var(--muted)}
.pg-tabs button[aria-selected="true"]{background:rgba(118,118,128,.14);color:var(--ink)}
.pg-tabs .sp{flex:1}
.pg-tabs .cp{color:var(--tint)}
/* The code area folds away, because on a phone it is most of the panel and the
   options are what you came for. It now also STARTS folded, which makes this
   button the only way back to the code — so it carries its own label instead of
   being a bare 11px chevron nobody finds. */
.pg-fold{flex:none;display:flex;align-items:center;gap:5px;height:26px;
  padding:0 8px 0 10px;border-radius:7px;font-size:12px;font-weight:600;
  color:var(--muted);background:rgba(118,118,128,.15)}
.pg-fold:hover{background:rgba(118,118,128,.26);color:var(--ink)}
.pg-fold svg{width:11px;height:11px;flex:none;stroke:currentColor;fill:none;stroke-width:2.8;
  stroke-linecap:round;stroke-linejoin:round;
  transform:rotate(90deg);transition:transform .2s ease}
.pg-cons.folded{height:auto;min-height:0}
/* folded is exactly when it matters, so there it wears the app's tint */
.pg-cons.folded .pg-fold{color:var(--tint);
  background:color-mix(in srgb,var(--tint) 14%,transparent)}
.pg-cons.folded .pg-fold:hover{background:color-mix(in srgb,var(--tint) 24%,transparent)}
.pg-cons.folded .pg-fold svg{transform:rotate(-90deg)}
.pg-cons.folded .pg-tabs{padding-bottom:9px}
.pg-pre{flex:1;min-height:0;overflow:auto;margin:8px 0 0;padding:0 16px 14px;
  font-family:var(--font-data);font-size:11px;line-height:1.75;white-space:pre;
  color:var(--ink-2)}
.pg-pre .cm{color:var(--muted)}
.pg-pre .st{color:#0060cc}
.pg-pre .add{background:color-mix(in srgb,var(--blue) 15%,transparent);border-radius:3px;
  padding:0 3px;margin:0 -3px}
.pg-ev{flex:1;min-height:0;overflow:auto;padding:7px 16px 14px;
  font-family:var(--font-data);font-size:11px}
.pg-ev .r{display:flex;gap:9px;padding:4px 0;border-bottom:1px solid var(--separator)}
.pg-ev .r:last-child{border-bottom:0}
.pg-ev .tm{color:var(--muted);flex:none}
.pg-ev .nm{font-weight:600;flex:none;min-width:118px}
.pg-ev .dt{min-width:0;overflow-wrap:anywhere}
.pg-ev .r.sync .nm{color:#146c35}
.pg-ev .r.err .nm{color:var(--red)}
.pg-ev .empty{color:var(--muted);padding:8px 0;line-height:1.5}

@media (min-width:900px){
  /* desktop: a working side panel, and the scrim stops dimming — watching the
     dashboard while the options change is the whole point */
  .pg-scrim{background:transparent;animation:none}
  .pg{left:auto;top:0;bottom:0;width:400px;border-radius:0;
    border-left:1px solid var(--separator);
    box-shadow:-14px 0 44px -18px rgba(16,24,40,.42);
    animation:pg-slide .3s cubic-bezier(.32,.72,0,1) both}
  @keyframes pg-slide{from{transform:translateX(100%)}to{transform:translateX(0)}}
  .pg-bar{margin:16px 28px 0}
  .pg-head{background:var(--chrome)}
  /* Opening the panel NARROWS the app rather than covering it. Watching the
     dashboard while the options change is the whole point of a side panel, and
     a 400px sheet laid over the report hides the thing it is driving.
     .za-host iframe is width:100%, so the report reflows on its own. */
  body.pg-docked .app{margin-right:400px}
  /* The app is NOT narrowed. That is the whole difference from the playground:
     nothing behind this is being driven by it, so there is nothing to keep
     visible, and a dimmed intact page reads better than a squeezed one. */
  /* Centred with inset:0 + margin:auto, NOT translate(-50%,-50%): the open
     animation animates `transform`, and an animation beats a normal
     declaration — with fill-mode `both` its last frame (scale(1)) sticks and
     wipes the translate, dropping the dialog through the bottom-right corner.
     This leaves transform free for the animation to own. */
  /* Close to the full page rather than a dialog on it: at 1240 Zia's own
     three-column Skills grid finally fits, which it does not at 880. The
     margin that is left is the point — enough to keep the app visible behind
     the scrim, so it still reads as something you opened over your work. */
  .zia-modal{inset:0;margin:auto;width:min(1240px,94vw);height:min(900px,90vh);
    border-radius:16px}
  /* and with the report visible beside the panel it has to stay clickable — a
     transparent full-bleed scrim would swallow every click on it, and closing
     is still the X, Escape, or the Embed playground button. */
  .pg-scrim{pointer-events:none}
}
@media (prefers-reduced-motion:reduce){.pg,.pg-scrim,.zia-modal,.zia-scrim{animation:none}
  .app{transition:none}}

/* ============================================================
   WIDE — the same six modules, desktop idiom
   ============================================================ */
@media (min-width:900px){
  .sidebar{display:flex}
  .tabbar{display:none}

  /* the iOS navigation bar gives way to a page header */
  .navbar{background:var(--chrome);backdrop-filter:none;-webkit-backdrop-filter:none;
    border-bottom:1px solid var(--separator)}
  .navbar-row{display:none}
  .navbar-large{max-height:none;opacity:1;transform:none;
    padding:22px 28px 16px;font-size:26px}
  .navbar.compact .navbar-large{opacity:1;transform:none;max-height:none;padding-bottom:16px}

  /* title, search and the primary action share one row */
  .page-head{display:flex;align-items:center;gap:16px;padding:20px 28px 16px;
    border-bottom:1px solid var(--separator);background:var(--chrome);flex:none}
  .page-head h1{margin:0;font-size:24px;font-weight:700;letter-spacing:-.025em;flex:none}
  .page-head .spacer{flex:1}
  .page-head .search-drawer{padding:0;flex:none}
  .page-head .search-field{width:260px}
  .btn-primary{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;
    border-radius:8px;background:var(--tint);color:#fff;font-size:14px;font-weight:600;
    box-shadow:0 1px 2px rgba(16,24,40,.12)}
  .btn-primary:hover{background:#0069db}
  .btn-primary svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2.4;
    stroke-linecap:round;stroke-linejoin:round}

  .scroll{padding:0}

  /* ---- tables ---- */
  .table{--cols:1fr;display:block;margin:20px 28px 32px;background:var(--surface);
    border:1px solid var(--separator);border-radius:12px;overflow:hidden;
    box-shadow:0 1px 2px rgba(16,24,40,.04)}
  .thead,.trow{display:grid;grid-template-columns:var(--cols);gap:16px;
    align-items:center;padding:0 18px;width:100%;text-align:left}
  .thead{height:38px;background:#f7f7fa;border-bottom:1px solid var(--separator);
    font-size:11.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;
    color:var(--muted)}
  .trow{min-height:52px;border-bottom:1px solid var(--separator);font-size:14.5px}
  .trow:last-child{border-bottom:0}
  .trow.tappable{cursor:pointer}
  .trow.tappable:hover{background:#f7f9fd}
  .trow.selected{background:rgba(0,122,255,.07)}
  .trow .name{font-weight:600;letter-spacing:-.01em}
  .trow .sub{color:var(--ink-2);opacity:.66}
  .ta-r{text-align:right;justify-self:end}
  .table .value{font-size:14.5px}
  .table .pill{justify-self:start}

  /* ---- leads list + detail panel ---- */
  .split{display:grid;grid-template-columns:minmax(0,1fr) 320px;align-items:start}
  .split-main{min-width:0}
  .panel{position:sticky;top:0;margin:20px 28px 32px 0;background:var(--surface);
    border:1px solid var(--separator);border-radius:12px;overflow:hidden;
    box-shadow:0 1px 2px rgba(16,24,40,.04)}
  .panel-head{display:flex;align-items:center;gap:10px;padding:14px 16px;
    border-bottom:1px solid var(--separator);background:#f7f7fa}
  .panel-head h2{margin:0;font-size:16px;font-weight:700;letter-spacing:-.02em;flex:1;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .rail-uf{flex:none;max-width:134px;font:inherit;font-size:12px;font-weight:600;
    color:var(--ink-2);background:var(--surface);border:1px solid var(--separator);
    border-radius:7px;padding:3px 6px}
  .panel-close{width:26px;height:26px;border-radius:50%;flex:none;color:var(--muted);
    display:flex;align-items:center;justify-content:center;background:rgba(60,60,67,.09)}
  .panel-close:hover{background:rgba(60,60,67,.16);color:var(--ink)}
  .panel-close svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.6;
    stroke-linecap:round}
  .panel .form{padding:0}
  .panel .section-header{padding:14px 16px 6px}
  .panel .form-section{border-radius:0;background:transparent}
  .panel .labeled{background:transparent}

  /* ---- activities keep their designed look, in a readable column ---- */
  .activity-list{max-width:820px;margin:0 auto;padding:20px 28px 32px}
  /* left-aligned rather than centred in an 820px column: it renders above the
     split, so centring floated it away from the list it filters. */
  .filter-bar{align-self:flex-start;width:auto;margin:0;padding:14px 28px 0;
    background:none;border:0;box-shadow:none;
    backdrop-filter:none;-webkit-backdrop-filter:none}
  .segmented{max-width:460px}
  .activity-card{background:var(--surface);border:1px solid var(--separator);
    backdrop-filter:none;-webkit-backdrop-filter:none;padding:13px 14px;
    box-shadow:0 1px 2px rgba(16,24,40,.04)}
  .activity-card:hover{border-color:#cfd4e2}
  /* Two lines, not three: the due text and the related record read as one
     sentence instead of stacking with an icon each. Desktop only — the phone
     card keeps the roomier form, where the vertical is not contested. */
  .activity-card{padding:11px 14px}
  .activity-main{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:0 7px}
  .activity-main .headline{flex:0 0 100%}
  .activity-card .due,
  .activity-card .rel-tag{display:inline;font-size:12.5px;opacity:.6}
  .activity-card .due svg,
  .activity-card .rel-tag svg{display:none}
  .activity-card .rel-tag::before{content:"\00b7\00a0"}
  .panel-sub{flex:none;font-size:12.5px;color:var(--muted);white-space:nowrap}
  .activities-bg{background:linear-gradient(135deg,rgba(88,86,214,.05) 0%,rgba(88,86,214,0) 42%)}
  .swipe-actions{display:none}
  /* invisible must also mean untappable — a touch device at this width would
     otherwise hit a button it never drew */
  .row-actions{display:flex;opacity:0;pointer-events:none;transition:opacity .14s ease}
  .activity-card:hover .row-actions,
  .row-actions:focus-within{opacity:1;pointer-events:auto}

  /* ---- sheets become centred dialogs ---- */
  .sheet{top:50%;left:50%;right:auto;bottom:auto;
    width:min(520px,calc(100% - 48px));transform:translate(-50%,-50%);
    border-radius:14px;max-height:80%;
    box-shadow:0 24px 70px rgba(0,0,0,.28);animation:dialog-in .22s cubic-bezier(.2,.9,.3,1.05) both}
  @keyframes dialog-in{
    from{opacity:0;transform:translate(-50%,-50%) scale(.94)}
    to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
  .sheet.closing{animation:dialog-out .18s ease both}
  @keyframes dialog-out{
    from{opacity:1;transform:translate(-50%,-50%) scale(1)}
    to{opacity:0;transform:translate(-50%,-50%) scale(.96)}}
  .sheet .navbar{background:var(--chrome)}
  .sheet .navbar-row{display:flex}
  .sheet .navbar-large{display:none}
  .sheet .navbar-inline{opacity:1}
  .sheet .form{padding:16px}

  /* pushed stacks never animate sideways on a desktop */
  .stack.pushing,.stack.popping{animation:none;box-shadow:none}
  .empty{padding:64px 32px}

  /* ---- KPI row, charts and board at desk width ---- */
  .stats{grid-template-columns:repeat(var(--cols-wide,4),minmax(0,1fr));
    margin:20px 28px 0;border-radius:12px;
    border:1px solid var(--separator);box-shadow:0 1px 2px rgba(16,24,40,.04)}
  .stat{padding:13px 16px 14px}
  .stat dd{font-size:22px}
  .stats + .split .table,.stats + .table,.stats + .board,
  .stats + .charts,.stats + .list{margin-top:16px;padding-top:0}
  .stats + .list{padding:14px 28px 28px}

  .charts{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;
    padding:18px 28px 24px;max-width:1180px}
  .card{border:1px solid var(--separator);padding:16px 18px 18px}
  .span-2{grid-column:1/-1}
  .embed-note{margin:0 28px 30px;max-width:1180px}

  .board{padding:18px 28px 32px}
  .col{flex:0 0 252px}
  /* 150 deals do not fit a column: each scrolls on its own, the board stays put */
  .kcards{max-block-size:calc(100vh - 330px);overflow-y:auto;padding-inline-end:2px}
  .table + .pager{margin-block-start:-20px;padding-inline:28px}

  /* ---- the detail side panel ---- */
  .split{grid-template-columns:minmax(0,1fr) 360px}
  /* the chart rail is wider than a record panel: 360px squeezes a chart's
     category labels, 440 does not */
  /* 584, not 440: at 440 the report's legend truncated to "Compl…". This is
     close to what a four-bar chart with a two-entry legend actually wants —
     wider would only inflate the bars. */
  .split.split-rail{grid-template-columns:minmax(0,1fr) 584px}
  .panel .hilite{border-bottom:1px solid var(--separator);padding:15px 16px}
  .panel .path-wrap{padding:13px 16px;background:transparent}
  .panel .path button{font-size:11.5px;padding:8px 6px 8px 15px}
  .panel .timeline{border-radius:0;box-shadow:none;background:transparent}
  .panel .tl{padding:11px 16px}
  .panel .list{padding:0}
  .panel .list-section{border-radius:0;box-shadow:none;background:transparent}
  .panel .row{background:transparent}
  .panel .stats{margin:14px 16px 4px;grid-template-columns:repeat(2,minmax(0,1fr));
    border:1px solid var(--separator)}
  .panel .stat{padding:10px 12px 11px}
  .panel .stat dd{font-size:16px}
  .panel .card{border:0;box-shadow:none;padding:4px 16px 14px;background:transparent}
  .panel .card h3{font-size:12.5px;font-weight:400;letter-spacing:.02em;
    text-transform:uppercase;color:var(--muted)}
  .panel .card-sub{display:none}

  /* a pushed record on desktop still needs a way back to the list */
  .page-head .back-btn{margin-left:-4px}
  .toast{bottom:24px}

  /* Deals carries a view switcher as well as search and a primary button, which
     is more than fits on one row at exactly 900px — let it wrap instead */
  .page-head{flex-wrap:wrap;row-gap:10px}
  .page-head .search-field{width:220px}
  .sidebar nav button > span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;
    text-overflow:ellipsis}
  /* With the record panel open the fixed columns no longer fit the remaining
     width, and the first column was collapsing until account names wrapped onto
     two lines. Scroll the table instead — one shared min-width on the header and
     every row, so the columns stay in step. */
  .table{overflow-x:auto}
  .thead,.trow{min-width:1000px}
  .thead > span,.trow > span{min-width:0}
  .trow .name{white-space:nowrap}
  .trow .sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* a dashboard takes the whole content area, so it gets the room to breathe */
  .dash-note{margin:20px 28px;max-width:820px}
  .embed-wrap{margin:18px 28px 12px}
  .embed-frame{height:calc(100vh - 240px);min-height:480px}
  .dash-note + .section-header{padding-left:28px}

  /* one chart in a 360px panel is one column, not half of two */
  .panel .charts{grid-template-columns:1fr;padding:0;gap:0}
}
/* ---- a report embedded in a module tab: three slots, one host ----
   .rslot-full  the Deals Chart mode, the whole content area
   .rslot-rail  a side panel, narrow and tall — Leads and Activities
   .uf-clip     hides Zoho's own filter row (see the note further down)
   Each overrides .viz-wrap/.za-host, whose 420px suits an opened dashboard. */
.viz-wrap.rslot{margin:12px 16px}
.viz-wrap.rslot-full, .rslot-full .za-host{min-height:440px}
.viz-wrap.rslot-rail, .rslot-rail .za-host{min-height:320px}
/* in the rail the panel already draws the frame */
.panel .viz-wrap.rslot{margin:0;border:0;border-radius:0;box-shadow:none}
.rslot-note{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 16px;
  padding:12px 14px;border-radius:10px;background:var(--surface);
  border:1px solid var(--separator);color:var(--ink-2);font-size:13.5px;line-height:1.45;
}
.rslot-note.err{color:var(--red);border-color:color-mix(in srgb,var(--red) 30%,transparent)}
.rslot-note .btn-inline{margin:0}
.panel .rslot-note{margin:12px}

/* Zoho renders its own `Status: / Type:` filter row at the top of the
   Activities view — about 62px. Clip it away: the app's filter bar is the
   control, and two filter UIs that can disagree are worse than one. The frame
   is mounted 62px taller (see rail() below) so the chart keeps its full height.

   Opt-in per slot, because only that one view draws the row: it appeared the
   first time a user filter was pushed through the JS API and has rendered on
   every embed since — including a virgin mount in a fresh profile with no
   filter call at all. Persistent per view, not per session. The Leads rail has
   never had a filter pushed at it and stays clean, so it does NOT get this. */
.viz-wrap.uf-clip .za-host{overflow:hidden}
.viz-wrap.uf-clip .za-host iframe{margin-top:-62px}
.viz-wrap.rslot-rail.uf-clip .za-host{height:var(--uf-h,340px)}

/* the Chart switch, in the page head or the phone filter bar */
.chip-btn{
  display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:8px;
  font-size:13px;font-weight:600;color:var(--ink-2);background:var(--fill);
  border:1px solid transparent;
}
.chip-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.chip-btn:hover{color:var(--ink)}
/* the same colour as the page's primary button, so "on" reads as the app's own
   selected state rather than a second accent */
.chip-btn.on{color:#fff;background:var(--tint);box-shadow:0 1px 2px rgba(16,24,40,.12)}
.chip-btn.on:hover{color:#fff;background:#0069db}
/* Beside the title, not in the action cluster. The page head is nearly white,
   so --fill alone leaves the off state looking like plain text: a hairline
   keeps it reading as a button without competing with the primary one. */
.filter-bar .chip-btn{flex:none}
.page-head .chip-btn{flex:none;margin-left:10px}
.page-head .chip-btn:not(.on){border-color:var(--separator);background:var(--surface)}
/* In the page head "on" is a STATE, not a second primary action. The solid tint
   put two filled blue buttons in one bar — this one and the page's own primary
   at the far end — and crowded the title it sits beside. This is the sidebar's
   selected-item treatment, which reads as on without shouting. */
.page-head .chip-btn.on,
.filter-bar .chip-btn.on{background:rgba(0,122,255,.12);color:var(--tint);
  border-color:transparent;box-shadow:none}
.page-head .chip-btn.on:hover,
.filter-bar .chip-btn.on:hover{background:rgba(0,122,255,.18);color:var(--tint)}
.page-head .chip-btn:not(.on):hover{background:var(--fill)}
/* The Deals report switcher. It was a <select> in the page head, and
   .page-head wraps — so it stacked ABOVE the List/Board/Chart segments: two
   rows of chrome, and the control nowhere near the chart it changed. As a strip
   it sits with the chart, shows all five options instead of hiding four, and
   can never wrap the head. It scrolls rather than wraps, so the row height is
   fixed no matter how long the report names get. */
.rtabs{display:flex;gap:8px;overflow-x:auto;padding:12px 16px 0;scrollbar-width:none}
.rtabs::-webkit-scrollbar{display:none}
.rtabs .chip-btn{flex:none;white-space:nowrap}
/* tabs scroll, the Insights button does not */
.rslot-tools{display:flex;align-items:flex-end;gap:8px;padding-right:16px}
.rslot-tools .rtabs{flex:1;min-width:0}
/* It sits OUTSIDE .rtabs, so it never picked up the tabs' border/surface and
   rendered as bare text beside them. It is an action rather than a sixth tab,
   but it still has to read as a control. :not(.on) so this cannot outrank
   .chip-btn.on, which it ties with on specificity. */
.za-insights{flex:none;white-space:nowrap}
.za-insights:not(.on){border-color:var(--separator);background:var(--surface)}
.za-insights:not(.on):hover{background:var(--fill);color:var(--ink)}
.za-insights[disabled]{opacity:.45;cursor:default}
/* :not(.on) so this cannot outrank .chip-btn.on, which it ties with on specificity */
.rtabs .chip-btn:not(.on){border-color:var(--separator);background:var(--surface)}
.rtabs .chip-btn:not(.on):hover{background:var(--fill)}

@media (min-width:900px){
  /* line the chart and its strip up with the stat tiles and tables, which sit
     at 28px on desktop — the slot was 12px narrower on each side */
  .viz-wrap.rslot{margin:16px 28px}
  .rtabs{padding:16px 28px 0}
  .rtabs + .viz-wrap.rslot{margin-top:10px}
}

/* ============================================================
   Sign in
   A gate, not a boundary. Nothing here is a new colour or a new
   scale: the sidebar's blue-to-indigo mark at 56px instead of 26,
   the .pg-in border and focus ring on the credential rows, the
   .btn-inline fill on the button. Phone folds the brand panel
   into a band the card overlaps; 900px unfolds it beside the form.
   ============================================================ */
.signed-out .sidebar,
.signed-out .tabbar{display:none}

.login{position:absolute;inset:0;display:flex;background:var(--plane)}
.login-brand{display:none}
.login-pane{flex:1;min-width:0;overflow:auto;-webkit-overflow-scrolling:touch}

.login-band{position:relative;height:240px;padding:calc(44px + env(safe-area-inset-top,0px)) 20px 0;overflow:hidden;color:#fff;
  background:linear-gradient(150deg,var(--blue),var(--indigo))}
.funnel{position:absolute;right:-34px;top:60px;width:210px;height:auto;opacity:.15}
.login-lock{position:relative;display:flex;align-items:center;gap:12px}
.login-mark{width:48px;height:48px;border-radius:13px;flex:none;display:flex;
  align-items:center;justify-content:center;background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.28)}
.login-mark svg{width:44px;height:44px;stroke:#fff;fill:none;stroke-width:2.2;
  stroke-linecap:round;stroke-linejoin:round}
.login-word{font-size:24px;font-weight:700;letter-spacing:-.02em}
.login-tag{position:relative;margin-top:14px;max-width:250px;font-size:15px;line-height:1.45;
  color:rgba(255,255,255,.78)}

.login-col{position:relative;margin-top:-44px;padding:0 16px 28px}
.login-card{padding:22px;border-radius:14px;background:var(--surface);
  box-shadow:0 2px 4px rgba(16,24,40,.06),0 22px 46px -14px rgba(16,24,40,.26)}
.login-h{font-size:22px;font-weight:700;letter-spacing:-.022em;line-height:28px}
.login-sub{margin-top:5px;font-size:13px;line-height:18px;color:var(--muted)}

.login-cap{margin-top:18px;text-align:center;font-size:12px;line-height:16px;color:var(--muted)}
.login-sso{margin-top:8px;display:flex;gap:10px}
.login-sso button{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;
  height:44px;border:1px solid var(--separator);border-radius:8px;background:var(--surface)}
.login-sso button:hover{background:var(--chrome)}
.login-sso svg{width:19px;height:19px;flex:none}
.login-sso .ssol{display:none}

.login-or{margin-top:16px;display:flex;align-items:center;gap:12px}
.login-or span{flex:1;height:1px;background:var(--separator)}
.login-or i{font-style:normal;font-size:12px;color:var(--muted)}

.login-f{margin-top:16px}
.login-f > label,.login-row > label{display:block;font-size:11px;font-weight:600;
  letter-spacing:.05em;text-transform:uppercase;color:var(--muted);line-height:16px}
.login-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.login-in{margin-top:6px;display:flex;align-items:center;gap:9px;height:44px;padding:0 12px;
  border:1px solid var(--separator);border-radius:8px;background:var(--surface)}
.login-in > svg{width:16px;height:16px;flex:none;stroke:var(--muted);fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.login-in input{flex:1;min-width:0;border:0;background:none;outline:none;font-size:16px;
  color:var(--ink)}
.login-in input::placeholder{color:var(--muted)}
.login-in:focus-within{border-color:var(--tint);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--tint) 14%,transparent)}
.login-in:focus-within > svg{stroke:var(--ink-2)}
.login-eye{flex:none;display:flex;padding:2px;border-radius:6px}
.login-eye svg{width:19px;height:19px;stroke:var(--muted);fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.login-eye:hover svg{stroke:var(--ink-2)}

.login-opts{margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.login-chk{display:flex;align-items:center;gap:9px;font-size:13.5px;color:var(--ink-2)}
.login-chk > i{width:16px;height:16px;border-radius:4px;flex:none;display:flex;
  align-items:center;justify-content:center;background:var(--surface);
  border:1.5px solid var(--hairline)}
.login-chk > i svg{width:11px;height:11px;stroke:#fff;fill:none;stroke-width:3;
  stroke-linecap:round;stroke-linejoin:round;opacity:0}
.login-chk.on > i{background:var(--tint);border-color:var(--tint)}
.login-chk.on > i svg{opacity:1}
.login-link{font-size:12.5px;font-weight:500;color:var(--tint)}
.login-link:hover{color:#0069db}
.lk-wide{display:none}

.login-go{margin-top:16px;display:flex;align-items:center;justify-content:center;width:100%;
  height:46px;border-radius:8px;background:var(--tint);color:#fff;font-size:16px;font-weight:600;
  box-shadow:0 1px 2px rgba(16,24,40,.12)}
.login-go:hover{background:#0069db}
.login-err{margin-top:14px;padding:9px 11px;border-radius:8px;font-size:12.5px;line-height:1.4;
  background:rgba(255,59,48,.10);color:#c8271c}
.login-hint{margin-top:14px;text-align:center;font-size:12px;line-height:16px;color:var(--muted)}
.login-new{margin-top:18px;padding-top:16px;border-top:1px solid var(--separator);
  text-align:center;font-size:13px;line-height:18px;color:var(--muted)}
.login-new button{font-weight:600;color:var(--tint)}
.login-new button:hover{color:#0069db}
.login-foot{margin-top:22px;padding-bottom:env(safe-area-inset-bottom);text-align:center;
  font-size:12px;color:var(--muted)}

/* the signed-in identity, above the collapse control */
.nav-user{display:flex;align-items:center;gap:9px;width:100%;padding:7px 9px;margin-bottom:8px;
  border-radius:8px;font-size:13.5px;color:var(--ink-2);text-align:left;position:relative}
.nav-user:hover{background:rgba(60,60,67,.07);color:var(--ink)}
.nav-user > i{width:24px;height:24px;border-radius:50%;flex:none;display:flex;
  align-items:center;justify-content:center;font-style:normal;font-size:10px;font-weight:700;
  color:#fff;background:linear-gradient(150deg,var(--blue),var(--indigo))}
.nav-user > span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-user svg{width:17px;height:17px;flex:none;stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round;opacity:.6}
.nav-user:hover svg{opacity:1}
.sidebar.collapsed .nav-user{justify-content:center;padding-left:0;padding-right:0}
.sidebar.collapsed .nav-user svg{display:none}

@media (min-width:900px){
  /* unfold: the band becomes the panel, the glyph row becomes labelled buttons */
  .login-band{display:none}
  .login-brand{position:relative;display:flex;flex-direction:column;width:584px;flex:none;
    padding:56px;color:#fff;overflow:hidden;
    background:linear-gradient(150deg,var(--blue),var(--indigo))}
  .login-brand .funnel{right:-40px;top:auto;bottom:92px;width:340px;opacity:.16}
  .login-brand .login-mark{width:56px;height:56px;border-radius:15px}
  .login-brand .login-mark svg{width:52px;height:52px}
  .login-brand .login-word{font-size:26px}
  .login-lede{position:relative;margin-top:88px;max-width:420px;font-size:34px;font-weight:700;
    letter-spacing:-.022em;line-height:1.2}
  .login-lede + p{position:relative;margin:14px 0 0;max-width:420px;font-size:15.5px;
    line-height:1.5;color:rgba(255,255,255,.74)}
  .login-feats{position:relative;margin-top:40px;display:flex;flex-direction:column;gap:16px}
  .login-feat{display:flex;align-items:center;gap:12px;font-size:14px;color:rgba(255,255,255,.88)}
  .login-feat svg{width:18px;height:18px;flex:none;stroke:#fff;fill:none;stroke-width:1.9;
    stroke-linecap:round;stroke-linejoin:round;opacity:.9}
  .login-sig{position:relative;margin-top:auto;font-size:12.5px;color:rgba(255,255,255,.6)}

  .login-pane{display:flex;align-items:center;justify-content:center;padding:32px}
  .login-col{width:420px;flex:none;margin-top:0;padding:0}
  .login-card{padding:36px;border-radius:12px}
  .login-h{font-size:24px;line-height:30px}
  .login-sub{margin-top:6px;font-size:14px;line-height:20px}
  .login-cap{display:none}
  .login-sso{margin-top:24px;flex-direction:column;gap:10px}
  /* flex:1 sizes along the main axis — once this stack is a column that is the
     height, so the buttons collapse to their content unless it is released */
  .login-sso button{flex:none;height:40px;gap:10px;padding:0 14px;font-size:13.5px;
    font-weight:600;color:var(--ink-2)}
  .login-sso svg{width:17px;height:17px}
  .login-sso .ssol{display:inline}
  .login-or{margin-top:18px}
  .login-f{margin-top:18px}
  .login-in{height:42px}
  .login-in input{font-size:15px}
  .login-opts{margin-top:12px}
  .login-go{margin-top:18px;height:44px;font-size:15px}
  .login-foot{display:none}
  /* forgot moves up beside the label, as the design has it */
  .lk-wide{display:inline}
  .lk-narrow{display:none}
}

/* ---- Analytics tab, desktop: a reports centre ----
   The dashboards in a panel on the left, the selected one on the right. The
   panel is sticky so it stays reachable down a tall dashboard. */
/* both panes run to the bottom of the screen: the split is at least as tall
   as the scroll area (whose height is definite — a flex:1 child of the
   absolutely placed .stack), and the grid stretches both columns */
.an-split{display:grid;grid-template-columns:240px minmax(0,1fr);gap:16px;
  padding:16px;align-items:stretch;min-block-size:100%;box-sizing:border-box}
.an-nav{display:flex;flex-direction:column;gap:2px;
  padding:10px;background:var(--surface);border:1px solid var(--separator);
  border-radius:var(--radius);box-shadow:var(--shadow)}
.an-label{padding:8px 10px 6px;font-size:11.5px;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;color:var(--muted)}
.an-item{display:flex;align-items:center;gap:10px;inline-size:100%;
  padding:9px 10px;border:0;border-radius:9px;background:none;
  font:inherit;font-size:14px;color:var(--ink-2);text-align:start;text-decoration:none;
  cursor:pointer}
.an-item svg{inline-size:18px;block-size:18px;flex:none;fill:none;stroke:var(--muted);
  stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.an-item span:first-of-type{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.an-item:hover{background:color-mix(in srgb,var(--blue) 7%,transparent);color:var(--ink)}
.an-item:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.an-item.on{background:color-mix(in srgb,var(--blue) 12%,transparent);color:var(--blue);
  font-weight:600}
.an-item.on svg{stroke:var(--blue)}
.an-item.is-off{opacity:.5;cursor:default}
.an-ext{color:var(--muted);font-size:13px}
.an-sep{block-size:1px;margin:8px 10px;background:var(--separator)}
.an-main{min-width:0;display:flex;flex-direction:column;background:var(--surface);
  border:1px solid var(--separator);border-radius:var(--radius);box-shadow:var(--shadow);
  overflow:hidden}
/* Fit window: the frame fills what is left of the pane. The SDK sizes its
   iframe with an inline pixel height, so this has to override it; the host is
   the positioning box, and Revenue Summary's frame stays ZA_FOOT taller so the
   attribution strip still falls outside the clip. */
.an-main .viz-wrap.fill{flex:1;display:flex;flex-direction:column}
.an-main .viz-wrap.fill .za-host{position:relative;flex:1;min-block-size:420px}
.an-main .viz-wrap.fill .za-host .za-box{position:absolute;inset:0}
.an-main .viz-wrap.fill .za-host iframe{position:absolute;inset-block-start:0;
  inset-inline-start:0;width:100% !important;height:100% !important;margin:0}
.an-main .viz-wrap.fill.foot-clip .za-host iframe{height:calc(100% + 34px) !important}
.an-head{display:flex;align-items:center;gap:12px;padding:14px 16px 6px}
.an-head h2{flex:1;margin:0;font-size:17px;font-weight:600;color:var(--ink)}
.an-main .viz-wrap{margin:0}
.sr-only{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;
  clip-path:inset(50%);white-space:nowrap}

/* Advanced Analytics: the workspace fills the right pane like a dashboard.
   .ws-clip crops Analytics' own top bar (ZDBHEADER: "Home" and the profile
   avatar, 63px) off the frame — review round 2 — by starting the frame that
   far above the box and making it that much taller, so nothing at the bottom
   is lost. Re-measure --ws-bar if Analytics changes its header height. */
.ws-clip{--ws-bar:63px;position:relative;display:flex;flex:1;min-block-size:420px;
  overflow:hidden;background:var(--surface)}
.ws-clip .za-workspace{position:absolute;inset-inline:0;inset-block-start:calc(-1 * var(--ws-bar));
  inline-size:100%;block-size:calc(100% + var(--ws-bar));border:0;background:var(--surface)}
.an-ext-link{align-self:center;margin-inline-start:4px}
/* covers the workspace's throwaway first load (see armWorkspace in app.js).
   The DealLens loader sits exactly where the workspace's own one appears, so
   the hand-over does not jump. That one is NOT centred: the white-label
   loading CSS puts its 80px mark at 35% + 55px across and 40% + 40.5px down
   the FRAME (measured at three frame sizes, 2026-10-27). The frame starts
   --ws-bar above this box, which turns the vertical into 40% + 3px here. */
.ws-cover{position:absolute;inset:0;z-index:1;background:var(--surface)}
.ws-cover .ws-mark{position:absolute;inline-size:80px;block-size:80px;
  left:calc(35% + 55px);top:calc(40% + 3px);background:center / contain no-repeat;
  /* brand/deallens-loader.gif (160px, drawn at 80 for retina) — the very file
     the white-label workspace loader shows, so it is referenced from Analytics'
     own file store rather than shipped: the Catalyst CLI (1.26.0) stalls on
     start-up whenever client/ holds those GIF bytes, as a file or as base64. */
  background-image:url("https://analytics.democrm.finepick.com/dmfiles?ZDBDMFILEID=4000052796001")}

/* ---------- Zia Agents ChatKit (the CRM agent) ----------
   The widget places itself with fixed offsets built for a desktop page: a 380px
   panel 30px from the edge, and a launcher 30px off the bottom. On a phone that
   cuts the panel off the left edge and puts the launcher on the Analytics tab,
   so below the desktop breakpoint both are lifted clear of the tab bar (55px
   plus the safe area) and the panel spans the screen. !important because the
   widget's own stylesheet loads after this one. */
@media (max-width:899px){
  agents-chatkit .agents-chat-launcher{
    inset-block-end:calc(67px + env(safe-area-inset-bottom)) !important;
    inset-inline-end:12px !important}
  agents-chatkit .agents-chat-bot{
    inset-inline:8px !important;inset-block-start:auto !important;
    inset-block-end:calc(121px + env(safe-area-inset-bottom)) !important;
    inline-size:auto !important;
    block-size:min(540px, calc(100dvh - 190px - env(safe-area-inset-bottom))) !important}
}
.signed-out agents-chatkit{display:none}
/* collapsed until asked for: hidden from first paint so the open panel never
   flashes before keepChatCollapsed() in app.js closes it */
agents-chatkit:not(.chat-touched) .agents-chat-bot{display:none !important}
