/* =====================================================================
   Design system (2026-10-15) — the approved Agent Tracker visual system.
   Presentation only: tokens, cards, buttons, pills, progress bars, tables,
   sidebar, agent header, tabs, dropdown, responsive layouts. Loads last.
   Navy and gold stay the agency's own (Settings → Brand & agency).
   ===================================================================== */

/* ---------- tokens ---------- */
:root{
  --paper:#F8FAFC;--card:#FFFFFF;--line:#E2E8F0;--line2:#CBD5E1;--edge:#E2E8F0;--hair:#EEF2F7;--soft:#F1F5F9;--soft2:#F1F5F9;
  --ink:#0F172A;--body:#334155;--muted:#64748B;--faint:#94A3B8;
  --success:#10B981;--info:#3B82F6;--launch:#8B5CF6;--warn:#F59E0B;--err:#EF4444;
  --green:#059669;--green-soft:#ECFDF5;--red:#DC2626;--red-soft:#FEF2F2;--blue:#2563EB;--blue-soft:#EFF6FF;
  --mono:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;   /* one typeface throughout */
  --r:14px;--r-sm:10px;--r-lg:16px;
  --shadow-1:0 1px 2px rgba(15,23,42,.04),0 1px 3px rgba(15,23,42,.05);
  --shadow-2:0 12px 32px -16px rgba(15,23,42,.28);
}
body{background:var(--paper);color:var(--ink);font-family:var(--sans)}
.num,td.num,.mono,.v,.ov-stat b,.kpi .v{font-variant-numeric:tabular-nums}

/* micro labels: Inter, uppercase, moderate letter-spacing */
.k,.hero .k,.hero2 .k,.tbl th,.sb-sec .k,.panel-t .k,.onb-first>.k,.onb-card .k,.sys-t .k,.as-num,.rm-c,.ov-story span,.ah .k,.kicker,.stat .k{letter-spacing:.08em!important}

/* ---------- typography ---------- */
.hero2 h2,.hero h2{font-size:34px;line-height:1.12;font-weight:800;letter-spacing:-.01em}
.onb-h h3{font-size:22px;line-height:1.25;font-weight:800}
.ov-ph h4,.panel-t .k.title{font-size:17px}
.section-h h3{font-size:18px}

/* ---------- layout spacing (8px system) ---------- */
.stack{gap:16px}
.content{padding:24px 24px 64px}
.ov-grid2,.onb-tools,.onb-road,.onb-ea,.as-grid{gap:16px}
.ov-stats,.phase-cards2,.onb-first-g{gap:12px}

/* ---------- cards ---------- */
.panel,.ov-panel{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-1);padding:20px}
.stat{border:1px solid var(--line);border-radius:var(--r);background:#fff;box-shadow:var(--shadow-1);padding:16px}
.ov-stat,.pc2,.onb-step,.onb-tool:not(.kit .onb-tool),.rm-col,.dg-r,.as-card{border-color:var(--line);border-radius:var(--r)}
.ov-stat,.rm-col,.as-card,.onb-step{box-shadow:var(--shadow-1)}
.hero2,.hero:not(.hero2){border-radius:var(--r-lg)}
/* dark feature cards: deep navy surface */
.hero2,.hero:not(.hero2),.onb-tools.kit .onb-tool{background:linear-gradient(135deg,var(--navy) 0%,var(--navy2) 100%)}

/* ---------- buttons ---------- */
.btn{height:36px;padding:0 14px;border-radius:var(--r-sm);font-size:13.5px;font-weight:700;gap:8px;border:1px solid var(--line);background:#fff;color:var(--ink)}
.btn:hover{border-color:var(--line2);background:#fff}
.btn.sm{height:32px;padding:0 12px;font-size:12.5px;border-radius:9px}
.btn.gold{background:var(--gold);border-color:var(--gold);color:var(--on-gold,var(--navy))}
.btn.gold:hover{filter:brightness(.97);border-color:var(--gold)}
.btn.navy{background:var(--navy);border-color:var(--navy);color:#fff}
.btn.ghost{background:transparent;border-color:transparent}
.btn.ghost:hover{background:var(--soft)}
.btn svg{width:16px;height:16px}
.btn.sm svg{width:14px;height:14px}
.ib{width:36px;height:36px;border-radius:var(--r-sm)}

/* ---------- status pills (one component) ---------- */
.stage-pill{height:24px;padding:0 10px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.05em;gap:6px;border:1px solid transparent}
.stage-pill svg{width:12px;height:12px}
.stage-pill .sp-dot{width:7px;height:7px}
.stage-pill.tone-blue{background:#EFF6FF;color:#2563EB;border-color:#DBEAFE}
.stage-pill.tone-indigo{background:#EEF2FF;color:#4F46E5;border-color:#E0E7FF}
.stage-pill.tone-purple{background:#F5F3FF;color:#7C3AED;border-color:#EDE9FE}
.stage-pill.tone-orange{background:#FFF7ED;color:#C2410C;border-color:#FFEDD5}
.stage-pill.tone-teal{background:#F0FDFA;color:#0F766E;border-color:#CCFBF1}
.stage-pill.tone-pink{background:#FDF2F8;color:#BE185D;border-color:#FCE7F3}
.stage-pill.tone-green{background:#ECFDF5;color:#059669;border-color:#D1FAE5}

/* ---------- progress bars ---------- */
.bar{height:8px;border-radius:999px;background:#EEF2F7;overflow:hidden}
.bar i{display:block;height:100%;border-radius:999px;background:var(--navy)}
.bar.green i,.prog .bar.green i{background:var(--success)}
.prog{display:flex;align-items:center;gap:12px}
.prog .bar{flex:1;min-width:80px}
.prog b{font-size:13px;font-weight:700;min-width:38px;text-align:right;font-variant-numeric:tabular-nums}

/* ---------- tables ---------- */
.tbl-wrap{background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-1);overflow:auto}
.tbl th{background:#F8FAFC;font-size:11px;font-weight:700;color:var(--muted);padding:12px 16px;border-bottom:1px solid var(--line)}
.tbl td{padding:10px 16px;border-bottom:1px solid var(--hair);font-size:13.5px}
.tbl tr:last-child td{border-bottom:0}
.tbl tr.click:hover td{background:#F8FAFC}
.tbl th.num,.tbl td.num{text-align:right}
.tbl .c-go{display:none}
.av.av-brand{background:var(--navy);color:var(--gold);font-weight:800;border:0}
#teamTbl .c-agent b{font-size:14px}
#teamTbl .c-prog{min-width:200px}

/* All agents KPI cards (StatCard) */
.stats.kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.stat.kpi{display:flex;align-items:center;gap:12px}
.kpi-ic{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;flex:none}
.kpi-ic svg{width:22px;height:22px}
.kpi-ic.blue{background:#EFF6FF;color:#2563EB}.kpi-ic.sky{background:#F0F9FF;color:#0284C7}.kpi-ic.violet{background:#F5F3FF;color:#7C3AED}
.kpi-ic.green{background:#ECFDF5;color:#059669}.kpi-ic.indigo{background:#EEF2FF;color:#4F46E5}.kpi-ic.gold{background:#FEF3C7;color:#D97706}
.kpi-t{min-width:0}
.kpi .k{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase}
.kpi .v{font-size:24px;font-weight:800;color:var(--ink);line-height:1.15}
.kpi .s{font-size:12px;color:var(--muted)}
.stat.kpi.hi{background:#FFFBEB;border-color:#FDE68A}

/* ---------- sidebar ---------- */
.sidebar{background:var(--navy)}
.sb-sec .k{font-size:11px;font-weight:700;color:rgba(255,255,255,.55)}
.sb-nav a,.sb-settings{height:40px;border-radius:var(--r-sm);font-size:14px;font-weight:600;padding:0 12px;gap:12px}
.sb-nav a svg,.sb-settings svg,.sb-tools a svg{width:18px;height:18px}
.sb-search input{height:40px;border-radius:var(--r-sm);background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);color:#fff;font-size:13.5px;padding:0 12px 0 36px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:12px center;background-size:16px}
.sb-search input::placeholder{color:rgba(255,255,255,.5)}
.roster a{border-radius:var(--r-sm);padding:8px 12px;margin:0 8px}
.roster a.on{background:color-mix(in srgb,var(--gold) 14%,transparent);box-shadow:inset 3px 0 0 var(--gold-on-dark,var(--gold))}

/* ---------- agent header + tabs ---------- */
.ah{padding-top:20px;gap:16px}
.ah .av{box-shadow:0 0 0 3px var(--gold)}
.ah h1{font-size:24px;font-weight:800;letter-spacing:-.01em;text-transform:none}
.ah .sub{font-size:13px;color:var(--muted);gap:4px 12px}
.tabs{gap:4px;padding-top:8px}
.tab{height:44px;padding:0 14px;font-size:14px;font-weight:600;color:var(--muted)}
.tab.on{color:var(--ink);font-weight:700;border-bottom-color:var(--gold)}
.tab .n{height:20px;min-width:22px;padding:0 7px;border-radius:999px;background:#EEF2F7;color:var(--body);font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}

/* ---------- dropdown ---------- */
.dd{position:relative;display:inline-flex;min-width:0}
.dd .dd-native{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;overflow:hidden}
.dd-btn{display:inline-flex;align-items:center;gap:10px;height:36px;padding:0 12px 0 14px;border:1px solid var(--line);border-radius:var(--r-sm);background:#fff;font:inherit;font-size:14px;font-weight:700;color:var(--ink);cursor:pointer;min-width:0;max-width:100%}
.dd-btn:hover{border-color:var(--line2)}
.dd-btn:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.dd-v{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dd-c{width:16px;height:16px;color:var(--muted);flex:none;transition:transform .15s}
.dd.open .dd-c{transform:rotate(180deg)}
.dd-list{position:absolute;top:calc(100% + 6px);left:0;z-index:60;min-width:max(100%,220px);max-height:340px;overflow:auto;margin:0;padding:6px;list-style:none;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-2)}
.dd-o{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border-radius:8px;font-size:14px;font-weight:500;color:var(--body);cursor:pointer;white-space:nowrap}
.dd-o.act{background:var(--soft)}
.dd-o.on{font-weight:700;color:var(--ink)}
.dd-o svg{width:16px;height:16px;color:var(--gold-ink,#B45309)}
/* the pipeline picker: just the dropdown, no label inside the bubble */
.pipe-bar.crm .pipe-pick2{padding:0;border:0;background:transparent;height:auto}
.pipe-bar.crm .pipe-pick2 .k{display:none}
.pipe-bar.crm .pipe-pick2 .dd-btn{height:36px;min-width:200px}

/* ---------- Overview ---------- */
.fu-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px 24px}
.fu-cols .fu-g{min-width:0}
.ov-kv{padding:8px 0}

/* ---------- Onboarding ---------- */
.rm-go{display:none}

/* ---------- phone top bar ---------- */
.mbrand{display:none}

/* ---------- responsive: tablet ---------- */
@media (max-width:1279px){
  .stats.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
/* ---------- responsive: phone (below 768) ---------- */
@media (max-width:767px){
  .content{padding:16px 12px 88px}
  .panel,.ov-panel{padding:16px}
  .hero2 h2,.hero h2{font-size:26px}
  .onb-h h3{font-size:20px}
  .stats.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .stat.kpi{padding:12px;gap:10px}
  .kpi-ic{width:36px;height:36px}
  .kpi .v{font-size:20px}
  /* phone top bar: the agency mark */
  .mbrand{display:inline-flex;align-items:center;gap:8px;min-width:0}
  .mbrand img{height:26px;max-width:160px;object-fit:contain}
  .mbrand i{width:28px;height:28px;border-radius:8px;background:var(--gold);color:var(--on-gold,var(--navy));display:grid;place-items:center;font-style:normal;font-weight:800;font-size:12px}
  .mbrand b{color:#fff;font-size:15px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mtop #mtopTitle{display:none}
  /* agent header: compact and stacked, actions on the right */
  #agentWrap:not([data-tab="pipeline"]) .ah{display:grid;grid-template-columns:56px minmax(0,1fr);gap:4px 12px;align-items:start;padding-top:16px}
  #agentWrap:not([data-tab="pipeline"]) .ah .av{width:56px;height:56px;font-size:18px;grid-row:span 2}
  #agentWrap:not([data-tab="pipeline"]) .ah h1{font-size:19px}
  #agentWrap:not([data-tab="pipeline"]) .ah .acts{grid-column:1 / -1;width:auto;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
  #agentWrap:not([data-tab="pipeline"]) .ah .acts .btn{flex:none;width:100%}
  /* All agents: compact rows instead of the wide table */
  #teamTbl thead{display:none}
  #teamTbl,#teamTbl tbody{display:block}
  #teamTbl tr{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) auto 16px;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--hair)}
  #teamTbl tr:last-child{border-bottom:0}
  #teamTbl td{display:block;padding:0;border:0;min-width:0}
  #teamTbl td.num{display:none}
  #teamTbl .c-prog{min-width:0}
  #teamTbl .c-prog .prog{gap:6px}
  #teamTbl .c-prog .bar{min-width:0}
  #teamTbl .c-prog b{min-width:30px;font-size:12px}
  #teamTbl .c-stage .stage-pill{font-size:9.5px;padding:0 7px;height:22px}
  #teamTbl .c-go{display:block;color:var(--faint)}
  #teamTbl .c-go svg{width:16px;height:16px;display:block}
  #teamTbl .c-agent .av{width:34px;height:34px;font-size:12px}
  #teamTbl .c-agent b{font-size:13.5px;display:block;white-space:normal;line-height:1.25}
  #teamTbl .c-agent .row{gap:10px;align-items:center}
  /* Onboarding roadmap: compact rows with a chevron to that phase */
  .onb-road{grid-template-columns:minmax(0,1fr);gap:8px}
  .rm-col{position:relative;padding:12px 40px 12px 12px}
  .rm-col .rm-list{display:none}
  .rm-col>p{margin:2px 0 0 72px;font-size:12.5px}
  .rm-col .rm-h{gap:12px}
  .rm-go{display:grid;place-items:center end;position:absolute;inset:0;padding-right:12px;color:var(--faint);border-radius:inherit}
  .rm-go svg{width:18px;height:18px}
  .fu-cols{grid-template-columns:minmax(0,1fr)}
}

/* KPI: the number first, a quiet label under it (as designed) */
.kpi .v{white-space:nowrap;font-size:24px}
.kpi .kl{font-size:13px;font-weight:600;color:var(--body);line-height:1.3}
.kpi .s{font-size:11.5px;color:var(--muted);line-height:1.3}
.stat.kpi{padding:16px;min-height:84px}
/* the agents table: one line per agent, every column fits */
#teamTbl .c-agent{white-space:nowrap;min-width:210px}
#teamTbl .c-agent .c-name b{white-space:nowrap}
#teamTbl th,#teamTbl td{padding-left:12px;padding-right:12px}
#teamTbl th:first-child,#teamTbl td:first-child{padding-left:16px}
#teamTbl .c-prog{min-width:180px;width:22%}
#teamTbl td.num,#teamTbl th.num{white-space:nowrap}
#teamTbl td{padding-top:9px;padding-bottom:9px}
@media (max-width:767px){#teamTbl .c-agent{white-space:normal;min-width:0}#teamTbl .c-agent .c-name b{white-space:normal}.kpi .v{font-size:20px}}
/* KPIs: six in a row on wide screens, three per row below that so numbers never spill */
@media (max-width:1499px) and (min-width:768px){.stats.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.stat.kpi{min-height:76px}}
#teamTbl .c-prog{min-width:150px;width:18%}
#teamTbl .c-agent{min-width:190px}
#teamTbl th.num,#teamTbl td.num{padding-left:10px;padding-right:10px}
#teamTbl th{font-size:10.5px;letter-spacing:.06em!important}
#teamTbl th.num,#teamTbl td.num{padding-left:8px;padding-right:8px}
#teamTbl td:last-child,#teamTbl th:last-child{padding-right:16px}
@media (min-width:768px){#teamTbl .c-go{display:none}}
/* narrower desktops: the table scrolls inside its card, the agent column stays pinned */
@media (min-width:768px){
  #teamTbl .c-agent,#teamTbl thead th:first-child{position:sticky;left:0;z-index:1;background:#fff}
  #teamTbl thead th:first-child{background:#F8FAFC;z-index:2}
  #teamTbl tr.click:hover .c-agent{background:#F8FAFC}
}
@media (max-width:1365px) and (min-width:768px){#teamTbl .c-prog{min-width:130px}}
@media (max-width:767px){
  /* compact agent rows: name | progress + % | stage | chevron — nothing overlaps */
  #teamTbl tr{grid-template-columns:minmax(0,1fr) 88px auto 14px;gap:10px}
  #teamTbl .c-agent .c-name{min-width:0}
  #teamTbl .c-agent .c-name b{overflow-wrap:anywhere}
  #teamTbl .c-agent .c-name .soft{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #teamTbl .c-prog .prog{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}
  /* the phone's own pipeline picker keeps a proper bubble */
  .pipe-bar.crm .pipe-pick2 select{height:40px;border:1px solid var(--line);border-radius:var(--r-sm);background-color:#fff;padding:0 36px 0 12px;font-size:15px;font-weight:700;color:var(--ink);width:100%}
}
@media (max-width:767px){
  /* (after the desktop sizing above) phone rows size from the grid, not from desktop minimums */
  #teamTbl .c-agent,#teamTbl .c-prog{min-width:0;width:auto;position:static}
}
@media (max-width:767px){
  /* two lines per agent: name + stage on top, progress underneath — every piece readable */
  #teamTbl tr{grid-template-columns:minmax(0,1fr) auto 14px;grid-template-areas:"a s g" "p p g";row-gap:8px;column-gap:10px;padding:12px}
  #teamTbl .c-agent{grid-area:a}
  #teamTbl .c-stage{grid-area:s}
  #teamTbl .c-go{grid-area:g;align-self:center}
  #teamTbl .c-prog{grid-area:p;padding-left:44px}
  #teamTbl .c-prog .bar{min-width:0}
  #teamTbl .c-prog b{min-width:34px}
}
@media (max-width:767px){
  #teamTbl tr{row-gap:6px;padding:10px 12px}
  #teamTbl tr.click:hover td,#teamTbl tr.click:hover .c-agent{background:transparent}
  #teamTbl tr.click:active{background:#F8FAFC}
}
/* the page padding respects the centred column on wide monitors (agent-ui.css sets --page-pad from 1700px) */
.content{padding-left:var(--page-pad,24px);padding-right:var(--page-pad,24px)}
@media (max-width:767px){.content{padding-left:12px;padding-right:12px}}

/* ---------- sidebar & phone menu (10/15 pm) ---------- */
/* desktop: no Tools links in the sidebar (the tabs already do this); the phone menu keeps them */
@media (min-width:901px){.sb-tools-h,.sb-tools{display:none!important}}
/* phone menu owns scrolling while open: the page is pinned, the menu never hands scrolling to it */
body.drawer-lock{position:fixed;left:0;right:0;width:100%;overflow:hidden}
.sidebar,.sb-scroll{overscroll-behavior:contain}
body.drawer .scrim{touch-action:none}
@media (max-width:900px){body.drawer .sidebar{overflow-y:auto;-webkit-overflow-scrolling:touch}}
/* ---------- pipeline toolbar: two rows on phones ---------- */
.pipe-more{display:none}
.more-menu{position:absolute;right:0;top:44px;z-index:60;min-width:220px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-2);padding:6px}
.more-menu button{display:flex;align-items:center;gap:10px;width:100%;border:0;background:transparent;padding:11px 12px;border-radius:8px;font:inherit;font-size:14.5px;font-weight:600;color:var(--ink);text-align:left}
.more-menu button:active,.more-menu button:hover{background:var(--soft)}
.more-menu svg{width:17px;height:17px;color:var(--muted)}
@media (max-width:900px){
  .pipe-bar.crm{position:relative;display:flex;flex-wrap:wrap;gap:8px;row-gap:8px}
  /* row 1: pipeline · Add · ⋯ */
  .pipe-bar.crm .pipe-pick2{order:1;flex:1 1 0;min-width:0}
  .pipe-bar.crm #pipeAdd{order:2;flex:0 0 auto;height:40px;min-height:40px;padding:0 14px}
  .pipe-bar.crm .pipe-more{order:3;display:inline-flex;width:40px;height:40px;min-height:40px;padding:0;justify-content:center;flex:0 0 40px}
  .pipe-bar.crm .pipe-more svg{width:18px;height:18px}
  /* row 2: search · follow-up chips */
  .pipe-bar.crm .pipe-search{order:4;flex:1 1 140px;max-width:none;height:40px}
  .pipe-bar.crm #fuStrip{order:5;width:auto;flex:0 1 auto;display:flex;align-items:center}
  .pipe-bar.crm #fuStrip .fu-strip{flex-wrap:nowrap;gap:6px}
  .pipe-bar.crm #fuStrip .fu-chip{height:40px;padding:0 10px;font-size:12.5px}
  .pipe-bar.crm .pipe-sum{order:6;flex-basis:100%}
  .pipe-bar.crm .pipe-sum[hidden]{display:none}
  /* tucked into ⋯ — except an active Select or Archive, which stays in sight so it is easy to turn off */
  .pipe-bar.crm #pipeImport,.pipe-bar.crm #pipeStages,.pipe-bar.crm #pipeSelect:not(.navy),.pipe-bar.crm #pipeArch:not(.navy){display:none!important}
  .pipe-bar.crm #pipeSelect.navy,.pipe-bar.crm #pipeArch.navy{order:3;height:40px;min-height:40px;width:auto;flex:0 0 auto;padding:0 12px}
  .pipe-bar.crm #pipeSelect.navy .lbl,.pipe-bar.crm #pipeArch.navy .lbl{display:inline}
  .pipe-bar.crm .sp{display:none}
}

/* ---------- the agency logo fills its space (10/15 pm) ---------- */
/* desktop sidebar: the logo spans the menu's width; the tile hugs it; the name it already shows is not repeated */
.sb-brand.has-logo{padding:16px 12px 12px;row-gap:8px}
.sb-brand.has-logo .bm-tile{width:100%;height:auto;min-height:0;padding:8px 10px;border-radius:12px;display:flex;justify-content:center}
.sb-brand.has-logo .bm-tile img{width:100%;height:auto;max-height:72px;max-width:100%;object-fit:contain}
.sb-brand.has-logo .bm-img{width:100%;height:auto;max-height:72px;object-fit:contain;object-position:left center}
.sb-brand.has-logo .t b{display:none}
.sb-brand.has-logo .t span{margin-top:0}
.sb-brand.has-logo .sb-fold{bottom:8px}
/* phone top bar: the real logo, as large as the bar allows */
@media (max-width:767px){
  .mtop{min-height:60px}
  .mbrand.img img{height:38px;max-width:230px;object-fit:contain}
  .mbrand.tile .mb-tile{display:inline-flex;align-items:center;background:#fff;border-radius:9px;padding:4px 10px;height:42px}
  .mbrand.tile .mb-tile img{height:34px;max-width:220px;width:auto;object-fit:contain}
}
@media (max-width:900px){
  /* row 1 is the pipeline picker + Add + ⋯ (the picker takes the rest of the row); search wraps to row 2 with the chips */
  .pipe-bar.crm .pipe-pick2{flex:1 1 calc(100% - 190px);min-width:120px}
  .pipe-bar.crm .pipe-pick2 select{width:100%}
  .pipe-bar.crm .pipe-search{flex:1 1 120px;min-width:110px}
}
/* the collapse button sits on the "Agent Tracker" line, clear of the logo tile */
.sb-brand.has-logo{padding-bottom:12px}
.sb-brand.has-logo .t{min-height:30px;display:flex;align-items:center;padding-right:44px}
.sb-brand.has-logo .sb-fold{bottom:12px;top:auto}

/* ---------- welcome message (10/15) ---------- */
.wel-lead{margin:0 0 16px;font-size:15px;line-height:1.6;color:var(--body);text-wrap:pretty}
.wel-points{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.wel-points>div{border:1px solid var(--line);border-radius:12px;padding:16px;background:#fff}
.wel-points .ic{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;background:color-mix(in srgb,var(--gold) 18%,#fff);color:var(--navy);margin-bottom:10px}
.wel-points .ic svg{width:20px;height:20px}
.wel-points b{display:block;font-size:15px;color:var(--ink)}
.wel-points p{margin:4px 0 0;font-size:13.5px;line-height:1.5;color:var(--muted);text-wrap:pretty}
.wel-start{margin-top:16px;padding:16px;border-radius:12px;background:#F8FAFC;border:1px solid var(--line)}
.wel-start b{font-size:14px;color:var(--ink)}
.wel-start ol{margin:8px 0 0;padding-left:20px;font-size:14px;line-height:1.7;color:var(--body)}
.wel-start a{font-weight:700;color:var(--ink);text-decoration:underline}
.wel-ck{font-size:13.5px;font-weight:600;color:var(--body)}
/* welcome video (2026-10-20): small beside the intro, bigger on request */
.mbox.wel-m{width:900px}
.wel-top{display:grid;grid-template-columns:minmax(0,360px) minmax(0,1fr);gap:18px;align-items:start;margin-bottom:14px}
.wel-side .wel-lead{margin:0 0 12px;font-size:14.5px;line-height:1.55}
.wel-side .wel-start{margin-top:0;padding:12px 16px}
.wel-side .wel-start ol{font-size:13.5px;line-height:1.65;margin-top:4px}
.wel-vid{position:relative;aspect-ratio:16/9;border-radius:12px;background:var(--navy)}
.wel-vid-in{position:absolute;inset:0;border-radius:12px;overflow:hidden;background:var(--navy);box-shadow:0 12px 28px -16px rgba(10,16,30,.55);z-index:1}
.wel-vid-in iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.wel-snd{position:absolute;left:10px;top:10px;z-index:2;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px 0 10px;border:0;border-radius:999px;background:rgba(10,16,30,.78);color:#fff;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;backdrop-filter:blur(4px);box-shadow:0 4px 14px -6px rgba(0,0,0,.6)}
.wel-snd:hover{background:rgba(10,16,30,.92)}
.wel-snd svg{width:15px;height:15px}
.wel-snd[hidden]{display:none}
.wel-big{position:absolute;right:10px;top:10px;z-index:2;width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:8px;background:rgba(10,16,30,.6);color:#fff;cursor:pointer;opacity:.85}
.wel-big:hover,.wel-big:focus-visible{opacity:1;background:rgba(10,16,30,.85)}
.wel-big svg{width:15px;height:15px}
.wel-vid-bd{display:none}
.mbox.wel-m .wel-points>div{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;align-items:center;padding:14px}
.mbox.wel-m .wel-points .ic{width:34px;height:34px;margin:0;border-radius:9px}
.mbox.wel-m .wel-points .ic svg{width:18px;height:18px}
.mbox.wel-m .wel-points b{font-size:14.5px;line-height:1.25;text-wrap:balance}
.mbox.wel-m .wel-points p{grid-column:1/-1;margin-top:8px;font-size:13px}
.wel-vid.is-big .wel-vid-bd{display:block;position:fixed;inset:0;z-index:400;background:rgba(10,16,30,.72);cursor:zoom-out}
.wel-vid.is-big .wel-vid-in{position:fixed;z-index:401;inset:0;margin:auto;width:min(1120px,calc(var(--vw,100vw) - 48px),calc((var(--vh,100dvh) - 80px) * 16 / 9));height:auto;aspect-ratio:16/9;border-radius:14px;box-shadow:0 40px 90px -30px rgba(0,0,0,.7)}
.wel-vid.is-big .wel-big{right:12px;top:12px;width:34px;height:34px}
@media (max-width:960px){.wel-top{grid-template-columns:minmax(0,300px) minmax(0,1fr)}}
@media (max-width:767px){.wel-top{grid-template-columns:minmax(0,1fr)}.wel-big{display:none}}
@media (max-width:767px){.wel-points{grid-template-columns:minmax(0,1fr)}}

/* ---------- Start here ---------- */
.start-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.start-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.start-step{display:flex;align-items:flex-start;gap:12px;padding:16px;border:1px solid var(--line);border-radius:12px;background:#fff;color:inherit;transition:border-color .15s}
.start-step:hover{border-color:var(--line2)}
.start-step .n{width:30px;height:30px;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;font-weight:800;font-size:13px;flex:none}
.start-step.done .n{background:var(--success)}
.start-step .n svg{width:16px;height:16px}
.start-step>div{flex:1;min-width:0}
.start-step b{display:block;font-size:15px;color:var(--ink)}
.start-step p{margin:4px 0 0;font-size:13px;line-height:1.5;color:var(--muted);text-wrap:pretty}
.start-step .go,.start-card .go{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:700;color:var(--ink);white-space:nowrap;align-self:center}
.start-step .go svg,.start-card .go svg{width:14px;height:14px}
.start-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.start-card{display:flex;flex-direction:column;gap:6px;color:inherit}
.start-card .ic{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;background:#EEF2F7;color:var(--navy)}
.start-card .ic svg{width:20px;height:20px}
.start-card b{font-size:16px;color:var(--ink)}
.start-card p{margin:0;font-size:13.5px;line-height:1.5;color:var(--muted);flex:1;text-wrap:pretty}
.start-wel{display:flex;align-items:center;justify-content:space-between;gap:16px}
.start-wel b{font-size:15px;color:var(--ink)}
.start-wel p{margin:4px 0 0;font-size:13.5px;color:var(--muted)}
@media (max-width:900px){.start-steps,.start-grid{grid-template-columns:minmax(0,1fr)}.start-wel{flex-direction:column;align-items:flex-start}}

/* ---------- Help & FAQ ---------- */
.help-toc{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.help-toc a{display:inline-flex;align-items:center;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--line);font-size:13px;font-weight:600;color:var(--ink);background:#fff}
.help-toc a:hover{border-color:var(--line2)}
.help-g h3{margin:0 0 8px;font-size:18px;font-weight:800;color:var(--ink)}
.help-g ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px}
.help-g li{font-size:14px;line-height:1.6;color:var(--body);text-wrap:pretty}
.help-g li b{color:var(--ink)}
.section-h .sub a{font-weight:700;color:var(--ink);text-decoration:underline}
.faq{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.faq-q{border:1px solid var(--line);border-radius:12px;background:#fff}
.faq-q summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;font-size:15px;font-weight:700;color:var(--ink);cursor:pointer}
.faq-q summary::-webkit-details-marker{display:none}
.faq-q summary .chev{width:18px;height:18px;color:var(--muted);transition:transform .15s;flex:none}
.faq-q summary .chev svg{width:18px;height:18px}
.faq-q[open] summary .chev{transform:rotate(180deg)}
.faq-q p{margin:0;padding:0 16px 14px;font-size:14px;line-height:1.6;color:var(--body);text-wrap:pretty}

/* ---------- System checklist editor: readable notes + agent preview ---------- */
#clTree .in.note{height:34px;font-size:13px;font-style:italic;color:var(--body);padding:0 12px;line-height:34px}
#clTree .in.note::placeholder{color:var(--faint);font-style:italic}
.cl-wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,380px);gap:16px;align-items:start}
.cl-pv{position:sticky;top:16px;max-height:calc(var(--vh,100vh) - 32px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-1)}
.cl-pv-h{position:sticky;top:0;z-index:1;background:var(--navy);color:#fff;padding:12px 16px;border-radius:var(--r) var(--r) 0 0}
.cl-pv-h b{display:block;font-size:14px;font-weight:800;color:#fff}
.cl-pv-h span{font-size:12px;font-weight:600;color:#fff;opacity:.85}
#clPv{padding:12px;display:flex;flex-direction:column;gap:10px}
.pv-phase{border:1px solid var(--line);border-radius:12px;overflow:hidden}
.pv-ph-h{display:flex;gap:10px;align-items:flex-start;padding:12px;background:#F8FAFC;border-bottom:1px solid var(--hair)}
.pv-num{width:26px;height:26px;border-radius:8px;background:var(--navy);color:#fff;display:grid;place-items:center;font-weight:800;font-size:12px;flex:none}
.pv-t b{display:block;font-size:14px;color:var(--ink)}
.pv-t span{display:block;font-size:12px;color:var(--muted);margin-top:2px;line-height:1.4}
.pv-gate{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:#EFF6FF;color:#2563EB;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;vertical-align:middle}
.pv-group{padding:8px 12px}
.pv-g-h{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:4px 0 6px}
.pv-item{display:flex;gap:9px;align-items:flex-start;padding:6px 0;border-top:1px solid var(--hair)}
.pv-item:first-of-type{border-top:0}
.pv-item>i{width:16px;height:16px;border:1.5px solid var(--line2);border-radius:4px;flex:none;margin-top:1px}
.pv-item span{display:block;font-size:13px;font-weight:600;color:var(--ink)}
.pv-item em{display:block;font-size:12px;color:var(--muted);margin-top:2px;line-height:1.45}
.pv-item a{font-size:12px;font-weight:700;color:var(--ink);text-decoration:underline}
.pv-none,.cl-pv-empty{font-size:12.5px;color:var(--faint);padding:6px 0}
@media (max-width:1100px){.cl-wrap{grid-template-columns:minmax(0,1fr)}.cl-pv{position:static;max-height:none}}
/* checklist editor: the step text gets the room; the help link stays compact */
#clTree [data-k="help_url"]{width:200px;flex:0 0 200px;min-width:0}
#clTree .tn-h .f{min-width:220px}
@media (max-width:1599px){.cl-wrap{grid-template-columns:minmax(0,1fr)}.cl-pv{position:static;max-height:none}}
@media (max-width:767px){#clTree [data-k="help_url"]{width:100%;flex:1 1 100%}#clTree .tn-h{flex-wrap:wrap}#clTree .tn-h .f{min-width:0;flex:1 1 100%}}
@media (max-width:767px){
  /* checklist editor on a phone: every text box gets its own full-width line; less indent */
  #clTree .tn-h{flex-wrap:wrap;gap:6px 8px}
  #clTree .tn-h>.in,#clTree .tn-h>.f{flex:1 1 100%!important;min-width:0!important;width:100%!important;max-width:none!important}
  #clTree .tn-h>.k{width:auto!important}
  #clTree .tn-b{padding-left:4px!important;margin-left:0!important}
  #clTree .tnode{padding:8px!important}
}

/* ---------- the lead window: fits the screen, resizable (10/15 pm) ---------- */
.mbox.rec2{width:min(980px,calc(var(--vw,100vw) - 32px));height:min(720px,calc(var(--vh,100dvh) - 32px));max-height:calc(var(--vh,100dvh) - 16px);max-width:calc(var(--vw,100vw) - 16px);position:relative}
.win-rs{position:absolute;z-index:5}
.win-rs.e{top:24px;right:0;bottom:24px;width:8px;cursor:ew-resize}
.win-rs.s{left:24px;right:24px;bottom:0;height:8px;cursor:ns-resize}
.win-rs.se{right:0;bottom:0;width:22px;height:22px;cursor:nwse-resize;
  background:linear-gradient(135deg,transparent 0 55%,#b8c2d3 55% 60%,transparent 60% 70%,#b8c2d3 70% 75%,transparent 75%) no-repeat;border-bottom-right-radius:18px}
.win-rs.se:hover{background:linear-gradient(135deg,transparent 0 55%,var(--navy) 55% 60%,transparent 60% 70%,var(--navy) 70% 75%,transparent 75%) no-repeat}
.mbox.resizing-win,.mbox.resizing-win *{user-select:none}
.mbox.resizing-win{transition:none}
@media (max-width:900px){.win-rs{display:none}.mbox.rec2{width:var(--vw,100vw);height:var(--vh,100dvh);max-height:var(--vh,100dvh);max-width:var(--vw,100vw)}}
/* Settings → Sidebar links: built-in links, read-only */
.lk-locked-list{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.lk-locked{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#F8FAFC}
.lk-ic{width:32px;height:32px;border-radius:9px;background:#EEF2F7;color:var(--muted);display:grid;place-items:center;flex:none}
.lk-ic svg{width:16px;height:16px}
.lk-t{flex:1;min-width:0}
.lk-t b{display:block;font-size:14px;color:var(--ink)}
.lk-t span{display:block;font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lk-badge{flex:none;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);background:#fff;border:1px solid var(--line);border-radius:999px;padding:4px 10px}
@media (max-width:640px){.lk-locked{flex-wrap:wrap}.lk-badge{margin-left:44px}}
/* Settings on a phone: nothing may push the page wider than the screen */
@media (max-width:767px){
  .settings,.settings>*,.set-main,.set-main .panel,.set-main .tnode{min-width:0;max-width:100%}
  .set-main .grid3,.set-main .grid2{grid-template-columns:minmax(0,1fr)!important}
  .set-main .tnode .in,.set-main .tnode select{width:100%;min-width:0}
}

/* ---------- card color: swatches in the lead window, a clear stripe on the board (10/15) ---------- */
.csw-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;min-height:40px}
.csw{width:32px;height:32px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px var(--line2);cursor:pointer;position:relative;padding:0;transition:transform .12s,box-shadow .12s}
.csw:hover{transform:scale(1.08)}
.csw.on{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--navy)}
.csw.on::after{content:"";position:absolute;inset:0;margin:auto;width:9px;height:14px;border:solid #fff;border-width:0 3px 3px 0;transform:translate(0,-2px) rotate(45deg)}
.csw-none{background:#fff;overflow:hidden}
.csw-none::before{content:"";position:absolute;left:50%;top:3px;bottom:3px;width:2px;margin-left:-1px;background:#E11D48;transform:rotate(45deg);border-radius:2px}
.csw-none.on::after{border-color:var(--navy)}
.csw-yellow{background:#F5B800}.csw-green{background:#10B981}.csw-blue{background:#3B82F6}.csw-pink{background:#EC4899}.csw-purple{background:#8B5CF6}
.pcard.crm.c-yellow{box-shadow:inset 4px 0 0 #F5B800,var(--shadow-1)}
.pcard.crm.c-green{box-shadow:inset 4px 0 0 #10B981,var(--shadow-1)}
.pcard.crm.c-blue{box-shadow:inset 4px 0 0 #3B82F6,var(--shadow-1)}
.pcard.crm.c-pink{box-shadow:inset 4px 0 0 #EC4899,var(--shadow-1)}
.pcard.crm.c-purple{box-shadow:inset 4px 0 0 #8B5CF6,var(--shadow-1)}

/* ---------- welcome banner photo (10/15) ---------- */
/* the photo fills the right of the banner and fades into the deep blue of its own sky on the left */
.hero2.has-photo{background:linear-gradient(90deg,#0a1630 0%,#0d1d45 45%,#13265a 100%)}
.hero2 .hero-photo{background-position:center 38%}
/* Start here: laid out like the approved graphic */
.start-hero{min-height:340px;padding:40px 44px}
.start-hero .hero-photo{width:min(62%,760px)}
.start-hero .k{display:flex;align-items:center;gap:16px;font-size:14px;letter-spacing:.06em!important}
.start-hero .k::after{content:"";width:120px;height:2px;border-radius:2px;background:linear-gradient(90deg,var(--gold),transparent)}
.start-hero h2{font-size:44px;line-height:1.08;letter-spacing:-.015em;margin-top:14px}
.start-hero h2 em{font-style:normal;color:var(--gold-on-dark,var(--gold))}
.start-hero p{font-size:16.5px;max-width:600px;margin-top:16px}
.start-hero .start-acts{gap:12px;margin-top:24px}
.start-hero .start-acts .btn{height:48px;padding:0 20px;font-size:15px;border-radius:12px;gap:10px}
.start-hero .start-acts .btn svg{width:18px;height:18px}
.start-hero .start-acts .btn.on-dark{background:rgba(5,12,30,.55);border-color:rgba(255,255,255,.55)}
@media (max-width:900px){
  .start-hero{padding:24px 20px;min-height:0}
  .start-hero h2{font-size:30px}
  .start-hero p{font-size:15px}
  .start-hero .start-acts .btn{height:44px;flex:1 1 auto;justify-content:center}
}
.start-hero .hero2-l{max-width:68%}
.start-hero h2{font-size:40px;text-wrap:balance}
@media (max-width:900px){.start-hero .hero2-l{max-width:none}}
