/* ==========================================================================
   Journal: brand + iPhone pass. Loaded last (after crm.css).
   Rules of thumb used throughout: 44 pt minimum tap targets, 16 px fields (Safari zooms the page on anything smaller),
   safe-area insets for the notch / home indicator / landscape sides, 100dvh instead of 100vh, sheets that rise from the
   bottom edge, nothing hidden behind the keyboard. No inline styles anywhere (CSP).
   ========================================================================== */

/* ---- brand: official DealerStation SVG logos (brand/), boot splash, empty-state mark ---- */
body .boot{display:grid;place-items:center;align-content:center;gap:22px;background:var(--ds-surface);min-height:100dvh}
body .boot img{width:112px;height:auto}
body .boot-bar{width:96px;height:3px;border-radius:3px;background:var(--ds-surface-3);overflow:hidden}
body .boot-bar i{display:block;width:40%;height:100%;border-radius:3px;background:var(--ds-brand);animation:ds-boot 1.1s ease-in-out infinite}
@keyframes ds-boot{0%{transform:translateX(-100%)}100%{transform:translateX(260%)}}
body .empty:before{content:"";display:block;width:52px;height:22px;margin:0 auto 12px;background:url("brand/dealerstation-mark.svg") center/contain no-repeat;opacity:.3}
body .brand img{max-width:60vw}
body .login-card{padding:32px 28px}

/* ---- call history ("Called 2x, last 3d ago by Pat") ---- */
body .hist{font-size:12px;line-height:1.35;color:var(--ds-text-2);margin-top:2px;white-space:normal}
body .hist-chip{background:var(--ds-info-soft);color:var(--ds-info)}
body .head-hist{margin-top:6px;font-size:12.5px;color:var(--ds-text-2)}

/* ---- pull to refresh (js/mobile.js) ---- */
body #ptr{position:fixed;left:0;right:0;top:calc(52px + env(safe-area-inset-top));z-index:25;text-align:center;font-size:12px;font-weight:600;color:var(--ds-muted);opacity:0;pointer-events:none;transition:opacity .12s}
body #ptr.show{opacity:1}
body #ptr.ready{color:var(--ds-brand)}

/* ---- all sizes ---- */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body button,body a,body select,body label,body summary,body [role=button]{touch-action:manipulation}
body button,body .nav,body .segment,body .fchip,body .tab{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body input,body textarea,body select{-webkit-appearance:none;appearance:none;border-radius:var(--ds-r)}
body main{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
/* the app shell is a fixed-height column on phones (styles.css), so the page area itself must be the scroller */
body .page{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain}
body dialog{overscroll-behavior:contain}
@keyframes ds-sheet{from{transform:translateY(24px);opacity:.4}to{transform:none;opacity:1}}

/* ---- phones ---- */
@media(max-width:760px){
  body input:not([type=checkbox]):not([type=radio]),body select,body textarea{font-size:16px!important;min-height:46px}
  body textarea{min-height:96px;line-height:1.4}
  body input[type=checkbox],body input[type=radio]{width:22px;height:22px;min-height:22px}
  body input[type=datetime-local],body input[type=date]{min-height:46px}
  body .check{min-height:44px;gap:12px;font-size:15px}
  body label{font-size:13.5px}

  body .primary,body .ghost,body .danger{min-height:46px;font-size:15px;padding:0 16px}
  body .sm,body .ghost.sm,body .primary.sm,body .danger.sm{min-height:44px;font-size:14.5px;padding:0 14px}
  body .iconbtn,body .icon{width:44px;height:44px;min-height:44px}
  body .fchip{min-height:44px;padding:0 14px;font-size:14px}
  body .segment{min-height:44px;font-size:14px}
  body .tab{min-height:44px;font-size:15px;padding:0 14px}
  body .linkbtn{min-height:44px;padding:0 8px}
  body .toggle button{min-height:44px;padding:0 16px;font-size:14px}
  body .call-btn,body .call-btn-ph{width:46px;height:46px}
  body .lead-row .pick{width:44px;height:44px}
  body .lead-row .pick input{width:24px;height:24px}
  body .q-actions .primary,body .q-actions .ghost{min-height:46px}
  body .q-actions select{min-height:46px}
  body .bc-foot select{min-height:44px;padding:0 8px}
  body .outcome{min-height:56px;font-size:15.5px}
  body .nav{min-height:50px;font-size:10.5px}
  body .mini-table .ghost.sm{min-height:44px}
  body .header-actions button{min-height:44px}
  body .avatar-btn{width:44px;height:44px}

  /* header and screen edges honour the notch, home indicator and landscape insets */
  body header{padding-top:env(safe-area-inset-top);height:calc(56px + env(safe-area-inset-top));flex-basis:calc(56px + env(safe-area-inset-top));padding-left:max(14px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  body .brand span{display:none}
  body main{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right));height:calc(100dvh - 56px - env(safe-area-inset-top));padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  body .nav-tabs{bottom:max(8px,env(safe-area-inset-bottom));height:60px}
  body.kbd .nav-tabs{display:none}
  body.kbd main{padding-bottom:24px}
  body .topline{align-items:center;gap:10px}
  body .topline h1{font-size:24px}
  body .top-actions .primary{min-height:44px;padding:0 16px}
  body .toast{bottom:calc(90px + env(safe-area-inset-bottom));font-size:14px;white-space:normal;text-align:center;padding:12px 16px}
  body .login-shell{padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));min-height:100dvh}
  body .login-card{padding:28px 22px;border-radius:20px}

  /* lists: bigger, calmer cards */
  body .lead-row{padding:14px;border-radius:16px}
  body .lead-row h3{font-size:16px}
  body .lead-row .muted{font-size:13px}
  body .qcard{padding:16px;border-radius:18px}
  body .q-title h3{font-size:16.5px}
  body .q-next{font-size:13.5px}
  body .metric{padding:12px 12px 11px}
  body .leads-bar{gap:8px}
  body .searchbox{min-height:46px}
  body .searchbox input[type=search]{min-height:44px!important}
  body .filter-panel{padding:14px;border-radius:16px}
  body .bulkbar{border-radius:16px;gap:10px}
  body .bulk-actions{margin-left:0;width:100%}
  body .bulk-actions select{min-height:44px;flex:1}
  body .board{scroll-snap-type:x mandatory;gap:10px;padding-bottom:14px}
  body .board-col{scroll-snap-align:start}

  /* dialogs become sheets rising from the bottom edge */
  body dialog.crm-dialog,body dialog#inviteDialog,body dialog#eventDialog{
    width:100%!important;max-width:100%!important;margin:auto 0 0 0!important;border-radius:22px 22px 0 0!important;
    max-height:calc(100dvh - env(safe-area-inset-top) - 10px)!important;animation:ds-sheet .24s cubic-bezier(.2,.8,.2,1)}
  body dialog#leadDialog{height:calc(100dvh - env(safe-area-inset-top) - 10px)}
  body .crm-form,body dialog form{padding:14px 16px 16px;max-height:inherit}
  body .crm-form .dialog-head,body dialog form .dialog-head{margin:-14px -16px 14px;padding:14px 8px 12px 16px;position:sticky;top:-14px;z-index:4}
  body .crm-form .dialog-actions,body dialog form .dialog-actions{margin:16px -16px -16px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));position:sticky;bottom:-16px;z-index:4;gap:10px}
  body .crm-form .dialog-actions .primary,body .crm-form .dialog-actions .ghost,body .crm-form .dialog-actions .danger{flex:1 1 auto}
  body .dialog-actions.flush{position:static;margin:12px 0;padding:0}
  body .action-bar{gap:8px}
  body .action-bar .primary,body .action-bar .ghost{min-height:44px;font-size:15px;flex:1 1 auto;justify-content:center}
  body .suggest{padding:12px 14px}
  body .outcome-grid{grid-template-columns:1fr 1fr}
  body .lead-form-grid,body .grid{grid-template-columns:1fr}
  body .grid>label.wide{grid-column:auto}
  body .step{padding:12px}
  body .merge-row .fchip{min-height:44px;font-size:13px}
  body .mt-row{padding:12px}
  body .facts{grid-template-columns:1fr;gap:2px 0}
  body .facts dd{margin-bottom:8px}
  body #outcomeDialog,body #modalDialog:not(.wide){width:100%!important}
}
@media(max-width:380px){
  body .outcome-grid{grid-template-columns:1fr}
  body .metric strong{font-size:22px}
  body .nav{font-size:9.5px}
}
/* landscape phones: compact tab bar */
@media(max-width:900px) and (orientation:landscape) and (max-height:480px){
  body .nav-tabs{height:48px}
  body .nav{min-height:40px;flex-direction:row;gap:6px}
  body main{padding-bottom:70px}
  body dialog#leadDialog{height:calc(100dvh - env(safe-area-inset-top))}
}
@media(prefers-reduced-motion:reduce){body dialog,body .boot-bar i{animation:none!important}}

/* ---- logo sizing on phones (baseline styles.css shrinks it) and number fields without the desktop spinner ---- */
@media(max-width:760px){
  body .login-card .login-logo{width:auto;max-width:82%;height:26px;margin:0 auto 22px}
  body .brand img{height:20px}
}
body input[type=number]{-moz-appearance:textfield;appearance:textfield}
body input[type=number]::-webkit-inner-spin-button,body input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* ---- last note quote on cards and rows ---- */
body .quote{font-style:italic;color:var(--ds-text-2)}
body .q-note{font-size:13px;line-height:1.4;color:var(--ds-text-2);font-style:italic;padding:0 2px;overflow-wrap:anywhere}

/* ---- Today cards must never be wider than the screen: grid items default to min-content width ---- */
body .queue,body .camp-list,body .insight-grid{grid-template-columns:minmax(0,1fr)}
@media(min-width:901px){body .queue{grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}body .camp-list{grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}body .insight-grid{grid-template-columns:repeat(auto-fit,minmax(340px,1fr))}}
body .qcard,body .camp-card,body .panel,body .q-top,body .q-title,body .q-who,body .q-next{min-width:0}
body .q-title h3,body .q-who,body .q-next,body .q-note{overflow-wrap:anywhere}
body .q-top{align-items:flex-start}
body .qcard{grid-template-columns:minmax(0,1fr)}
body .q-title .muted{white-space:normal;overflow-wrap:anywhere}
body .qcard .chips{flex-wrap:wrap;min-width:0}
body .qcard .chip{white-space:normal;max-width:100%;overflow-wrap:anywhere}

/* ---- brand icons (CSS masks, take the text colour; the old glyphs rendered as colourful emoji on iPhone) ---- */
:root{
  --ic-phone:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
  --ic-mail:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  --ic-text:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-9 8.4 8.6 8.6 0 0 1-3.7-.8L3 21l1.9-5.3a8.4 8.4 0 1 1 16.1-4.2z'/%3E%3C/svg%3E");
  --ic-meeting:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  --ic-note:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E");
  --ic-change:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5'/%3E%3C/svg%3E");
}
body .ic{display:inline-block;flex:0 0 auto;width:1.1em;height:1.1em;vertical-align:-.17em;margin-right:.35em;background:currentColor;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat}
body .ic-phone{--ic:var(--ic-phone)}body .ic-mail{--ic:var(--ic-mail)}body .ic-text{--ic:var(--ic-text)}body .ic-meeting{--ic:var(--ic-meeting)}body .ic-note{--ic:var(--ic-note)}body .ic-change{--ic:var(--ic-change)}
body .activity-icon .ic{margin:0;width:18px;height:18px}
body .call-btn{font-size:0}

/* ==========================================================================
   Phone compaction: the first lead must be visible without scrolling, even on an iPhone SE (375 x 667)
   ========================================================================== */
@media(max-width:760px){
  body .topline{margin-top:2px}
  body .topline .eyebrow{display:none}
  body .topline h1{font-size:26px;margin:0}
  body .top-actions .primary{padding:0 14px}
  body .nav-tabs{margin:0}
  body .section-head p{display:none}
  body .section-head{margin:6px 0 8px}
  body .section-head h2{font-size:17px}

  /* Today: banner + goal on one compact band, KPI tiles scroll sideways instead of stacking */
  body .today-top{grid-template-columns:1fr;gap:8px;margin:4px 0 2px}
  body .callwin.big{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;padding:10px 14px;border-radius:14px}
  body .callwin.big b{font-size:14px}
  body .callwin.big span{font-size:12.5px}
  body .goalbox{padding:10px 14px;gap:6px;border-radius:14px}
  body .goal-head input{min-height:36px!important;height:36px;width:64px}
  body .kpis{display:flex;overflow-x:auto;gap:8px;margin:10px -14px 8px;padding:0 14px 4px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  body .kpis::-webkit-scrollbar{display:none}
  body .kpis .metric{flex:0 0 128px;scroll-snap-align:start;min-height:0}
  body .kpis .metric strong{font-size:22px}

  /* Leads: one search row, one sort/filter row, presets, then a single meta row */
  body .leads-bar{margin-bottom:6px}
  body .leads-meta{margin:8px 0 8px;gap:8px;flex-wrap:nowrap}
  body .leads-meta #leadCount{font-size:12.5px;white-space:nowrap;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
  body .leads-meta [data-act=export]{display:none}
  body .segmented{margin:6px 0}
  body .metrics{margin:10px 0 8px}
}
@media(max-width:760px){
  body #todayPage .section-head{display:none}
  body #todayPage .segmented{margin-top:2px}
  body .leads-meta #leadCount{flex:1 1 auto;overflow:visible;text-overflow:clip}
  body .kpis{margin-bottom:6px}
}

/* ---- audit follow-ups (WebKit, iPhone SE 1st gen 320 px up to Pro Max 430 px) ---- */
@media(max-width:760px){
  body .goal-head input{min-height:44px!important;height:44px;width:68px}
  body .chip.link{min-height:44px;padding:0 14px;font-size:14px}
  body .chip.link .ic{margin-right:.4em}
  body .qcard{overflow:hidden}
}
@media(max-width:400px){
  body .leads-meta{flex-wrap:wrap}
  body .toggle button{padding:0 12px}
  body .q-top{gap:8px}
  body .q-actions{gap:6px}
}

/* ==========================================================================
   Clean pass (v2): Calls screen, tab bar, sheets. One consistent set of sizes: 12 / 16 / 22 px radii, 8 px gaps,
   46 px controls, 54 px call buttons.
   ========================================================================== */
:root{--ic-more:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E")}
body .calls-head{position:sticky;top:0;z-index:6;background:var(--ds-bg);padding-bottom:6px}
body .calls-bar{display:flex;gap:10px;align-items:center;padding:2px 0 8px}
body .calls-bar .searchbox{flex:1 1 auto;min-width:0}
body .calls-new{flex:0 0 46px;width:46px;height:46px;border-radius:50%;border:0;background:var(--ds-brand);color:#fff;font-size:28px;line-height:1;padding:0 0 3px;box-shadow:0 4px 14px #006bff40;cursor:pointer}
body .calls-chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:0 14px 8px;margin:0 -14px}
body .calls-chips::-webkit-scrollbar{display:none}
body .cchip{flex:0 0 auto;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--ds-border-strong);background:var(--ds-surface);color:var(--ds-text-2);font-size:14.5px;font-weight:600;cursor:pointer;white-space:nowrap}
body .cchip.on{background:var(--ds-text);border-color:var(--ds-text);color:#fff}
body .calls-count{font-size:12.5px;color:var(--ds-muted);padding:0 2px;min-height:18px}
body .calls-list{display:grid;gap:8px;padding:6px 0 28px}
body .crow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;min-height:78px;padding:12px 12px 12px 14px;background:var(--ds-surface);border:1px solid var(--ds-border);border-radius:16px;box-shadow:var(--ds-sh-xs);cursor:pointer}
body .crow:active{background:var(--ds-surface-2)}
body .crow.is-hot{border-left:4px solid #d97706}
body .cr-main{min-width:0;display:grid;gap:2px}
body .cr-name{display:flex;align-items:center;gap:8px;min-width:0}
body .cr-name h3{margin:0;font-size:16px;line-height:1.25;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body .cr-score{flex:0 0 auto;font-size:11.5px;font-weight:700;padding:1px 7px;border-radius:999px;background:var(--ds-success-soft);color:var(--ds-success)}
body .cr-who{font-size:14px;color:var(--ds-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .cr-who b{font-weight:600}
body .cr-phone{color:var(--ds-text-2);font-variant-numeric:tabular-nums}
body .cr-meta,body .cr-note{font-size:12.5px;color:var(--ds-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .cr-note{font-style:italic;color:var(--ds-text-2)}
body .cr-stage{font-weight:650;color:var(--ds-info)}
body .cr-stage.interested,body .cr-stage.hot_lead,body .cr-stage.demo_booked,body .cr-stage.callback{color:#b45309}
body .cr-stage.not_interested,body .cr-stage.has_system,body .cr-stage.lost{color:var(--ds-danger)}
body .cr-call{position:relative;width:54px;height:54px;border-radius:50%;border:0;background:var(--ds-success);color:#fff;cursor:pointer;box-shadow:0 4px 12px #12805c40;padding:0}
body .cr-call:before{content:"";position:absolute;inset:0;margin:auto;width:24px;height:24px;background:currentColor;-webkit-mask:var(--ic-phone) center/contain no-repeat;mask:var(--ic-phone) center/contain no-repeat}
body .cr-call:active{transform:scale(.93)}
body .cr-call.off{display:none}
body .calls-more{display:grid;justify-items:center;padding:4px 0 24px}
body .calls-more .sentinel{height:1px;width:1px}
@media(min-width:761px){body .calls-new{display:none}body #callsPage .calls-list,body #callsPage .calls-head{max-width:920px}body .calls-chips{margin:0;padding-left:0;padding-right:0}}

/* sheets: group titles + uniform outcome buttons */
body .outcome-title{margin:16px 0 8px;font-size:11.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--ds-muted)}
body .outcome-title:first-of-type{margin-top:4px}
body .outcome-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:4px}
body .outcome{display:grid;place-items:center;text-align:center;min-height:52px;padding:8px 10px;line-height:1.2;font-size:14.5px}
body .oc-extra{margin:12px 0 4px}

/* the "More" tab and its menu (phones only) */
body .nav-more{display:none}
body .more-menu{position:fixed;z-index:30;right:max(12px,env(safe-area-inset-right));bottom:calc(84px + env(safe-area-inset-bottom));min-width:210px;background:var(--ds-surface);border:1px solid var(--ds-border);border-radius:16px;box-shadow:0 14px 40px #14203333;padding:6px;display:none}
body .more-menu button{min-height:48px;border:0;background:none;text-align:left;padding:0 14px;font-size:16px;border-radius:10px;color:var(--ds-text);cursor:pointer}
body .more-menu button:active{background:var(--ds-surface-2)}

@media(max-width:760px){
  /* shell: slim header, no big page title on the call screen, five tabs + More */
  body main{padding-top:10px}
  body[data-page=calls] .topline{display:none}
  body .topline{margin:0 0 8px}
  body .topline h1{font-size:22px}
  body .top-actions .ghost{display:none}
  body .top-actions .primary{min-height:44px;padding:0 14px;font-size:14.5px}
  body .nav[data-page=campaigns],body .nav[data-page=activity],body .nav[data-page=insights]{display:none}
  body .nav-more{display:flex}
  body .nav[data-page=calls]:before{-webkit-mask-image:var(--ic-phone);mask-image:var(--ic-phone)}
  body .nav-more:before{content:"";flex:0 0 auto;width:20px;height:20px;background:currentColor;-webkit-mask:var(--ic-more) center/contain no-repeat;mask:var(--ic-more) center/contain no-repeat}
  body .more-menu:not(.hidden){display:grid}

  /* lead sheet: one full-width Call button, then equal secondary buttons; footer on a single row */
  body .action-bar{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
  body .action-bar>*{flex:1 1 calc(33% - 8px);min-height:46px;display:inline-flex;align-items:center;justify-content:center;font-size:15px;white-space:nowrap}
  body .action-bar #actCall{flex:1 1 100%;min-height:52px;font-size:17px;font-weight:650}
  body .crm-form .dialog-actions{flex-wrap:nowrap;gap:8px}
  body .crm-form .dialog-actions>span{display:none}
  body .crm-form .dialog-actions .primary{flex:2 1 0;order:0}
  body .crm-form .dialog-actions .ghost,body .crm-form .dialog-actions .danger{flex:1 1 0;padding:0 8px;min-width:0}
  body .suggest{margin-bottom:12px}
  body .lead-dialog .tabs-inline{margin-bottom:12px}
}
@media(min-width:761px){body .more-menu,body .nav-more{display:none!important}}

/* ---- deeper insights ---- */
body .deep-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:26px 0 10px}
body .deep-head h2{margin:0;font-size:20px}
body .deep-seg{margin:0;padding:0}
body .panel.wide{grid-column:1/-1}
body .funnel{display:grid;gap:10px}
body .fbar{height:10px;border-radius:6px;background:var(--ds-surface-3);overflow:hidden}
body .fbar i{display:block;height:100%;border-radius:6px;background:var(--ds-brand)}
body .fl{font-size:13.5px;margin-top:4px}
body .heatmap{display:grid;gap:6px;max-width:520px}
body .hm-row{display:grid;grid-template-columns:44px repeat(5,minmax(0,1fr));gap:6px;align-items:center}
body .hm-head{font-size:12px;font-weight:600;color:var(--ds-muted);text-align:center}
body .hm-l{font-size:12px;color:var(--ds-muted)}
body .hm-c{display:grid;place-items:center;height:40px;border-radius:10px;font-size:12.5px;font-weight:650;background:var(--ds-surface-2);color:var(--ds-text-2)}
body .hm-c[data-heat="0"]{background:#eef1f6}
body .hm-c[data-heat="1"]{background:#d9e8ff;color:#1e4fa8}
body .hm-c[data-heat="2"]{background:#a9ccff;color:#123d85}
body .hm-c[data-heat="3"]{background:#5b9bff;color:#fff}
body .hm-c[data-heat="4"]{background:#006bff;color:#fff}
body .tip{margin:12px 0 0;font-size:14px;color:var(--ds-text)}
body .insight-grid .panel{min-width:0}

/* ---- motion: calm loading and screen changes ---- */
@keyframes ds-skel{0%{background-position:200% 0}100%{background-position:-200% 0}}
@keyframes ds-fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
body .skel{height:78px;border-radius:16px;background:linear-gradient(90deg,#eceff5 25%,#f6f8fb 50%,#eceff5 75%);background-size:200% 100%;animation:ds-skel 1.3s linear infinite}
body .page:not(.hidden){animation:ds-fade .2s ease-out}
body .crow,body .cr-call,body .cchip,body .nav,body .calls-new{transition:background-color .12s,transform .1s,border-color .12s}
@media(prefers-reduced-motion:reduce){body .page:not(.hidden),body .skel{animation:none}}
@media(max-width:760px){
  body #outcomeDialog .dialog-copy{display:none}
  body #outcomeDialog .dialog-head p.muted{margin:2px 0 0}
  body .suggest .callwin{font-size:12px}
}

/* ---- province / state quick filter on Calls ---- */
body .calls-sub{display:flex;align-items:center;gap:12px;padding:0 0 4px}
body .calls-sub select{flex:1 1 auto;min-width:0;max-width:340px;min-height:44px;padding:0 36px 0 14px;border:1px solid var(--ds-border-strong);border-radius:12px;background:var(--ds-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23697386' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center/16px no-repeat;color:var(--ds-text);font-size:15px;font-weight:600;text-overflow:ellipsis}
body .calls-sub .calls-count{flex:0 0 auto;white-space:nowrap}

/* ---- Settings > Team ---- */
body .invite-form{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.3fr) auto;gap:10px;align-items:end;margin:6px 0 4px}
body .invite-form label{margin:0}
body .team-list{margin-top:14px}
body .team-row select{min-height:44px;min-width:110px}
@media(max-width:760px){body .invite-form{grid-template-columns:1fr}body .invite-form .primary{width:100%}body .team-row{grid-template-columns:1fr auto;grid-template-areas:"who who" "role act";gap:8px}body .team-row>div:nth-child(1){grid-area:who}body .team-row>div:nth-child(2){grid-area:role}body .team-row>div:nth-child(3){grid-area:act;justify-self:end}}
