*{box-sizing:border-box}html,body{margin:0;padding:0;min-height:100%;font-family:Inter,Arial,sans-serif;color:var(--rd-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overscroll-behavior-x:none;overscroll-behavior-y:auto}
/* html = the SHELL color so any gap revealed behind the fixed shell during a page
   bounce shows the brand chrome (not white/paper). body = the paper content ground. */
html{background:var(--brand-surface,#0e0f10)}
body{background:var(--rd-paper,#F5F3EE);min-height:100dvh}
button,input,select{font:inherit}
/* Overscroll bounce split by platform:
   · MOBILE/touch (default above): native vertical bounce stays — the TOP is
     intercepted by pull-refresh.js (pull-to-refresh, touchmove passive:false so the
     pull is clean/no gap) and the BOTTOM keeps its small native soft bounce.
   · DESKTOP (mouse): kill the native bounce entirely (no bottom bounce), and
     desktop-bounce.js adds a SMALL top-only elastic. */
@media (hover:hover) and (pointer:fine){html,body{overscroll-behavior-y:none}}
/* Brand-tint native form controls (checkboxes, radios, range, progress) so they
   follow the tenant brand instead of the browser-default blue. */
input,select,textarea,progress{accent-color:var(--brand-primary)}
.topbar,.mobile-topbar{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;background:var(--brand-surface);color:#fff;position:fixed;top:0;left:0;right:0;z-index:30}
/* Pull-to-refresh strip (pull-refresh.js) — sits below the fixed topbar in the
   shell color; revealed as the content is pulled down. */
#eb-ptr{position:fixed;left:0;right:0;top:0;height:0;overflow:hidden;display:flex;align-items:flex-end;justify-content:center;padding-bottom:12px;background:var(--brand-surface,#0c0a06);z-index:15;opacity:0;pointer-events:none}
#eb-ptr .eb-ptr-spin{width:22px;height:22px;border-radius:50%;border:2.5px solid rgba(230,199,102,.28);border-top-color:var(--rd-accent-hi,#E6C766);transition:transform .12s ease}
#eb-ptr.ready .eb-ptr-spin{transform:rotate(180deg)}
#eb-ptr.spin .eb-ptr-spin{animation:eb-ptr-rot .7s linear infinite}
@keyframes eb-ptr-rot{to{transform:rotate(360deg)}}
h1{margin:0;font-size:1.4rem}.sub{margin:.2rem 0 0;color:var(--rd-on-chrome-muted)}.ghost{background:#fff;color:var(--brand-primary-dark);border:1px solid var(--eb-stone)}
.tabs{display:flex;gap:8px;padding:12px 16px;background:#fff;border-bottom:1px solid var(--eb-stone);position:sticky;top:72px;z-index:10}
.tab,.mobile-tab{padding:10px 14px;border-radius:999px;border:1px solid var(--eb-stone);background:#fff;cursor:pointer}
.tab.active,.mobile-tab.active{background:var(--brand-primary);color:#fff;border-color:var(--brand-primary)}
main{padding:16px}.panel{display:none}.panel.active{display:block}.panel-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.panel-header h2{margin:0;color:var(--eb-ink)}.team-map-root{overflow:visible;padding-bottom:24px;min-width:0}
.team-node-wrap{display:flex;flex-direction:column;align-items:center;min-width:180px}
.team-node{width:180px;min-height:88px;border:1px solid var(--eb-stone);border-radius:18px;background:#fff;padding:12px;box-shadow:0 8px 24px rgba(21,61,101,.08);cursor:pointer;display:flex;flex-direction:column;gap:4px}
.team-node.collapsed{opacity:.9}
.team-node strong{font-size:.95rem}.team-node span{color:var(--rd-muted)}.team-node small{color:var(--rd-muted)}
.team-child-row{display:flex;gap:18px;align-items:flex-start;justify-content:center;margin-top:26px;position:relative}
.team-child-row:before{content:"";position:absolute;top:-14px;left:10%;right:10%;height:2px;background:var(--eb-stone)}
.pipeline-board{display:flex;flex-wrap:nowrap;gap:14px;overflow-x:auto;overflow-y:hidden;padding:0 0 16px;align-items:stretch;scrollbar-gutter:stable}.pipeline-column{flex:0 0 224px;width:224px;max-width:224px;background:var(--rd-card-3);border:1px solid var(--eb-stone);border-radius:20px;padding:12px;min-height:500px;display:flex;flex-direction:column}.pipeline-column.is-stage{background:var(--rd-primary-soft);border-color:var(--rd-primary-soft-line)}.pipeline-column.is-field{background:var(--rd-card-2)}.pipeline-column-head{display:flex;flex-direction:column;gap:6px;margin:0 0 10px}.pipeline-column h3{margin:0;font-size:1rem;line-height:1.25}.pipeline-column-meta{font-size:.78rem;color:var(--rd-muted);text-transform:uppercase;letter-spacing:.04em}.pipeline-dropzone,.pipeline-field-list{display:flex;flex-direction:column;gap:10px;min-height:360px;max-height:60vh;overflow-y:auto;padding-right:4px}.pipeline-card{background:#fff;border:1px solid var(--eb-stone);border-radius:14px;padding:10px 12px;cursor:pointer;box-shadow:0 4px 14px rgba(21,61,101,.06);text-align:left;white-space:normal;word-break:break-word;line-height:1.3}.pipeline-stage-card{cursor:grab}.pipeline-field-card{display:flex;flex-direction:column;gap:6px}.pipeline-card-value{font-size:.88rem;color:var(--rd-muted)}.pipeline-inline-link{font-size:.84rem;color:var(--brand-primary-dark);text-decoration:none}.pipeline-inline-link:hover{text-decoration:underline}.pipeline-empty{border:1px dashed var(--eb-stone);border-radius:14px;padding:12px;color:var(--rd-muted);background:rgba(255,255,255,.7)}
.table-wrap{overflow:auto;background:#fff;border:1px solid var(--eb-stone);border-radius:18px}
table{width:100%;border-collapse:collapse}th,td{padding:12px 10px;border-bottom:1px solid var(--rd-card-3);text-align:left;vertical-align:top}th{background:var(--brand-primary);color:var(--brand-on-primary);position:sticky;top:0}
.state-input{width:110px;padding:7px 9px;border:1px solid var(--eb-stone);border-radius:10px}
.import-toolbar{display:flex;gap:12px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.console{background:var(--rd-ink);color:var(--rd-on-chrome);padding:14px;border-radius:16px;min-height:260px;white-space:pre-wrap;overflow:auto}
dialog{border:none;border-radius:18px;padding:0;max-width:860px;width:min(90vw,860px)}.dialog-card{padding:18px}.dialog-head,.dialog-actions{display:flex;justify-content:space-between;align-items:center}
/* Base form modals (log picker, activity logger/detail, bulk message, pipeline
   editor) on the black&gold lens: a warm off-white surface that matches the app
   (not clinical pure white), and a refined rounded Close/ghost button instead of
   the sharp heavy-bordered default. Specialised dialogs (calendar, student card,
   settings) use their own classes and are unaffected. */
.dialog-card{background:var(--rd-card-2,#FBFAF7);border-radius:18px;color:var(--rd-ink)}
.dialog-card .ghost{border-radius:9px;border:1px solid var(--rd-line);background:#fff;color:var(--rd-ink);padding:8px 14px;min-height:36px}
.dialog-card .ghost:hover{background:var(--rd-accent-soft);border-color:var(--rd-accent-line)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0 18px}.field{display:flex;flex-direction:column;gap:6px}.field input,.field select{padding:10px;border:1px solid var(--eb-stone);border-radius:12px;background:#fff}
.mobile-main,.mobile-team-map,.mobile-pipeline-list,.mobile-contacts-list{display:flex;flex-direction:column;gap:12px}
.mobile-panel{display:none;padding:12px}.mobile-panel.active{display:block}
.mobile-node{background:#fff;border:1px solid var(--eb-stone);border-radius:16px;padding:8px 12px}.mobile-node summary{display:flex;justify-content:space-between;cursor:pointer;list-style:none}
.mobile-node-children{padding-left:10px;margin-top:10px;display:flex;flex-direction:column;gap:10px}.mobile-leaf{display:flex;justify-content:space-between;gap:8px}
.mobile-stage-section,.mobile-contact-card{background:#fff;border:1px solid var(--eb-stone);border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:6px}
.mobile-person{background:var(--rd-card-2);border:1px solid var(--eb-stone);border-radius:14px;padding:10px;text-align:left}
@media (max-width:900px){.form-grid{grid-template-columns:1fr}.tabs{top:64px}}

/* Team map - strict no-overlap subtree layout */
.org-chart-shell{display:flex;flex-direction:column;gap:18px}
.org-map-controls{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;background:#fff;border:1px solid var(--eb-stone);border-radius:22px;padding:14px 18px;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.org-map-summary,.org-map-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.org-stat-pill{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;background:var(--rd-primary-soft);border:1px solid var(--eb-stone);color:var(--rd-muted);font-size:.92rem}
.org-action-btn{padding:9px 14px;border-radius:999px;cursor:pointer}
.org-chart-canvas{background:linear-gradient(180deg,#fff 0%,var(--rd-card-2) 100%);border:1px solid var(--eb-stone);border-radius:32px;padding:20px 12px 24px;box-shadow:0 18px 40px rgba(21,61,101,.08);overflow:hidden}
.org-chart-viewport{position:relative;width:100%;overflow:hidden}
.org-stage-scale-wrap{position:relative;will-change:transform}
.org-stage{position:relative}
.org-connector-layer{position:absolute;inset:0;overflow:visible;pointer-events:none}
.org-connector-path{fill:none;stroke:var(--eb-stone);stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round}
.org-node-card{position:absolute;min-height:102px;border-radius:24px;border:1px solid var(--eb-stone);padding:16px 14px 12px;background:#fff;box-shadow:0 12px 28px rgba(21,61,101,.08);cursor:pointer;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.org-node-card:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(21,61,101,.12)}
.org-node-card:focus-visible{outline:3px solid rgba(22,58,99,.18);outline-offset:3px}
.org-node-card.depth-0{background:linear-gradient(180deg,var(--brand-surface) 0%,var(--brand-primary) 100%);border-color:var(--brand-surface);color:#fff}
.org-node-card.depth-1{background:linear-gradient(180deg,var(--rd-primary-soft) 0%,color-mix(in srgb, var(--brand-primary), #fff 84%) 100%);border-color:var(--rd-primary-soft-line);color:var(--brand-primary-dark)}
.org-node-card.depth-2{background:linear-gradient(180deg,#fff7e8 0%,#ffecc6 100%);border-color:#f0d9a6;color:#6c4c00}
.org-node-card.depth-3{background:linear-gradient(180deg,#eef9f2 0%,#d8efe1 100%);border-color:#c3e4cf;color:#1f5b3b}
.org-node-card.depth-4{background:linear-gradient(180deg,#f9eef9 0%,#ecd9ec 100%);border-color:#dec7de;color:#6b3f69}
.org-node-card.is-expanded{border-color:var(--brand-primary);box-shadow:0 20px 44px rgba(21,61,101,.14)}
.org-node-badge{position:absolute;top:-10px;left:50%;transform:translateX(-50%);min-width:30px;height:30px;padding:0 8px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid var(--eb-stone);box-shadow:0 6px 16px rgba(15,23,42,.08);font-size:1rem;line-height:1}
.org-node-card.depth-0 .org-node-badge{color:var(--brand-primary-dark)}
.org-node-name{font-weight:800;font-size:.98rem;line-height:1.22;max-width:100%;overflow-wrap:anywhere}
.org-node-code{font-size:.84rem;opacity:.88;overflow-wrap:anywhere}
.org-node-meta{font-size:.8rem;opacity:.92}
.org-node-visible{font-size:.75rem;opacity:.84}
.org-inline-more{margin-top:4px;border:1px solid var(--eb-stone);background:#fff;color:var(--brand-primary-dark);border-radius:999px;padding:5px 10px;font-size:.77rem;cursor:pointer}
.org-empty-state{background:#fff;border:1px solid var(--rd-line);border-radius:16px;padding:28px;text-align:center;color:var(--rd-muted)}
.mobile-node{background:#fff;border:1px solid var(--rd-line);border-radius:12px;padding:10px 12px;box-shadow:0 1px 2px rgba(18,18,18,.04)}
.mobile-node summary{display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer;list-style:none}
.mobile-node-head,.mobile-leaf-head{display:flex;flex-direction:column;gap:2px;min-width:0}
.mobile-node-head strong,.mobile-leaf-head strong{overflow-wrap:anywhere}
.mobile-node-count{min-width:32px;height:32px;border-radius:999px;background:var(--rd-accent-soft);border:1px solid var(--rd-accent-line);display:flex;align-items:center;justify-content:center;color:var(--rd-accent-deep);font-weight:800}
.mobile-node-meta{margin-top:8px;color:var(--rd-muted);font-size:.83rem}
.mobile-node-children{padding-left:12px;margin-top:10px;display:flex;flex-direction:column;gap:10px;border-left:2px solid var(--rd-accent-line)}
@media (max-width:1200px){.org-map-controls{padding:12px 14px}}
@media (max-width:900px){.form-grid{grid-template-columns:1fr}.tabs{top:64px}.org-chart-canvas{padding:18px 10px 22px}}

/* Team Map - focus mode with Levi sidebar and selected subtree view */
.team-map-root{min-width:0;padding-bottom:8px}
.team-focus-layout{display:flex;gap:18px;align-items:stretch;min-height:calc(100vh - 250px);height:calc(100vh - 250px);overflow:hidden}
.team-map-sidebar{position:relative;flex:0 0 290px;max-width:290px;min-width:290px;background:#fff;border:1px solid var(--eb-stone);border-radius:28px;box-shadow:0 16px 40px rgba(21,61,101,.08);transition:flex-basis .2s ease,max-width .2s ease,min-width .2s ease,transform .2s ease;overflow:visible}
.team-map-sidebar.is-closed{flex-basis:26px;max-width:26px;min-width:26px;border-color:transparent;background:transparent;box-shadow:none}
.team-map-sidebar-tab{position:absolute;top:22px;right:-16px;width:34px;height:110px;border-radius:18px;background:var(--brand-primary);color:#fff;border:none;box-shadow:0 10px 24px rgba(21,61,101,.18);cursor:pointer;writing-mode:vertical-rl;text-orientation:mixed;letter-spacing:.04em;font-weight:700;z-index:3}
.team-map-sidebar.is-open .team-map-sidebar-tab{right:-18px}
.team-map-sidebar-inner{height:100%;display:flex;flex-direction:column;overflow:hidden}
.team-map-sidebar.is-closed .team-map-sidebar-inner{opacity:0;pointer-events:none}
.team-map-search-wrap{position:sticky;top:0;z-index:2;background:#fff;padding:18px 18px 14px;border-bottom:1px solid var(--eb-stone)}
.team-map-search-label{display:block;font-size:.78rem;font-weight:700;color:var(--brand-primary-dark);text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}
.team-map-search{width:100%;padding:12px 14px;border:1px solid var(--eb-stone);border-radius:14px;background:var(--rd-card-2)}
.team-map-search-hint{margin-top:8px;font-size:.82rem;color:var(--rd-muted);line-height:1.35}
.team-map-sidebar-list{overflow:auto;padding:12px 10px 14px;display:flex;flex-direction:column;gap:8px}
.team-map-sidebar-heading{padding:4px 8px 8px;font-size:.85rem;font-weight:700;color:var(--rd-muted)}
.team-map-sidebar-empty{padding:14px 12px;color:var(--rd-muted);font-size:.92rem}
.team-map-sidebar-item{width:100%;text-align:left;display:flex;align-items:center;min-height:44px;padding:10px 14px 11px;border-radius:14px;box-sizing:border-box;border:1px solid transparent;background:#fff;color:var(--rd-ink);cursor:pointer;font-size:16px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-map-sidebar-item:hover{background:var(--rd-primary-soft);border-color:var(--eb-stone)}
.team-map-sidebar-item.is-selected{background:var(--brand-primary);color:#fff;border-color:var(--brand-primary)}
.team-focus-main{flex:1;min-width:0;overflow:auto;display:flex;flex-direction:column;gap:18px;padding-right:2px}
.team-map-default-view,.team-map-selected-view{display:flex;flex-direction:column;gap:18px}
.team-map-default-hero,.team-map-selected-header{background:linear-gradient(135deg,#ffffff 0%,var(--rd-card-2) 100%);border:1px solid var(--eb-stone);border-radius:28px;padding:22px 24px;box-shadow:0 14px 34px rgba(21,61,101,.06)}
.team-map-kicker{font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--rd-muted);margin-bottom:8px}
.team-map-default-hero h3,.team-map-selected-header h3{margin:0 0 8px;font-size:1.4rem;color:var(--brand-primary-dark)}
.team-map-default-hero p,.team-map-selected-header p{margin:0;color:var(--rd-muted);line-height:1.45;max-width:72ch}
.team-map-top-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.team-map-top-card{border:1px solid var(--eb-stone);border-radius:24px;background:linear-gradient(180deg,#fff 0%,var(--rd-card-2) 100%);padding:18px;text-align:left;cursor:pointer;box-shadow:0 12px 28px rgba(21,61,101,.06);display:flex;flex-direction:column;gap:10px;min-height:210px}
.team-map-top-card:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(21,61,101,.1)}
.team-map-rank{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:999px;background:var(--brand-primary);color:#fff;font-weight:800}
.team-map-top-name{font-size:1.05rem;font-weight:800;color:var(--brand-primary-dark);line-height:1.25}
.team-map-top-code{font-size:.9rem;color:var(--rd-muted)}
.team-map-top-stats{display:flex;flex-direction:column;gap:6px;color:var(--rd-muted);font-size:.92rem}
.team-map-top-cta{margin-top:auto;display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:999px;background:var(--rd-primary-soft);color:var(--brand-primary-dark);font-weight:700;width:max-content}
.team-map-selected-stats{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.org-chart-canvas{min-width:0}
.org-chart-viewport{width:100%}
.org-stage-scale-wrap{max-width:100%}
.org-node-card.is-focus-root{box-shadow:0 22px 46px rgba(15,75,138,.18)}
.mobile-team-search-wrap{margin-bottom:10px}
.mobile-team-search-results{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
@media (max-width:1200px){.team-focus-layout{height:calc(100vh - 240px);min-height:calc(100vh - 240px)}.team-map-sidebar{flex-basis:270px;max-width:270px;min-width:270px}}
@media (max-width:900px){.team-focus-layout{display:block;height:auto;min-height:0}.team-map-sidebar,.team-map-sidebar.is-closed{display:block;flex:none;width:100%;max-width:none;min-width:0;height:auto;margin-bottom:14px;overflow:visible}.team-map-sidebar.is-closed .team-map-sidebar-inner{opacity:1;pointer-events:auto}.team-map-sidebar-inner{height:auto;overflow:visible}.team-map-sidebar-tab{display:none}.team-map-search-wrap{position:static}.team-map-sidebar-list{max-height:60vh}.team-focus-main{overflow:visible;padding-right:0}.team-map-top-grid{grid-template-columns:1fr}.team-map-default-hero,.team-map-selected-header{padding:18px}}
.team-map-sidebar-tab.is-disabled{background:var(--rd-faint);cursor:default;box-shadow:0 8px 20px rgba(21,61,101,.08)}

/* Team map selected-view refinement + horizontal explorer */
.team-map-selected-header--combined{display:flex;flex-direction:column;gap:14px}
.team-map-selected-headline h3{margin:0 0 8px;font-size:1.45rem;color:var(--brand-primary-dark)}
.team-map-selected-headline p{margin:0;color:var(--rd-muted);line-height:1.45}
.team-map-selected-meta-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.team-map-selected-map-section{background:#fff;border:1px solid var(--rd-line);border-radius:16px;padding:18px 18px 20px;box-shadow:0 1px 2px rgba(18,18,18,.04)}
.team-map-selected-map-content{display:flex;gap:18px;align-items:stretch;overflow-x:auto;overflow-y:hidden;padding-bottom:6px}
.team-map-mini-columns{display:flex;gap:14px;align-items:stretch;flex:0 0 auto}
.team-map-mini-col{width:220px;min-width:220px;background:#fff;border:1px solid var(--rd-line);border-radius:14px;box-shadow:0 1px 2px rgba(18,18,18,.04);display:flex;flex-direction:column;overflow:hidden;max-height:72vh}
.team-map-mini-col-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 14px 12px;border-bottom:1px solid var(--rd-line);background:var(--rd-card-2)}
.team-map-mini-col-title{font-weight:800;font-size:.92rem;color:var(--rd-ink);line-height:1.25}
.team-map-mini-col-count{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 10px;border-radius:999px;background:var(--rd-accent-soft);border:1px solid var(--rd-accent-line);color:var(--rd-accent-deep);font-weight:800}
.team-map-mini-col-body{display:flex;flex-direction:column;gap:8px;padding:12px;overflow:auto}
.team-map-mini-entry{width:100%;text-align:left;display:flex;align-items:center;min-height:44px;padding:10px 14px 11px;border-radius:10px;box-sizing:border-box;border:1px solid var(--rd-line);background:#fff;color:var(--rd-ink);cursor:pointer;font-size:15px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-map-mini-entry:hover{background:var(--rd-card-2);border-color:var(--rd-accent-line)}
.team-map-mini-entry.is-selected{background:var(--rd-chrome);color:var(--rd-accent-hi);border-color:var(--rd-chrome)}
.team-map-selected-chart-shell{flex:1 0 760px;min-width:760px;display:flex;flex-direction:column;gap:12px}
.team-map-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.team-map-section-title{font-size:.82rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--rd-faint)}
.team-map-section-subtitle{margin-top:4px;font-size:.92rem;color:var(--rd-muted)}
.org-chart-canvas--scroll{padding:16px 14px 18px}
.org-chart-viewport{position:relative;width:100%;overflow-x:auto;overflow-y:hidden;padding-bottom:8px}
.org-stage{position:relative;min-width:max-content}
.org-chart-canvas--scroll .org-chart-viewport::-webkit-scrollbar,.team-map-mini-col-body::-webkit-scrollbar,.team-map-selected-map-content::-webkit-scrollbar{height:10px;width:10px}
.org-chart-canvas--scroll .org-chart-viewport::-webkit-scrollbar-thumb,.team-map-mini-col-body::-webkit-scrollbar-thumb,.team-map-selected-map-content::-webkit-scrollbar-thumb{background:var(--rd-accent-line);border-radius:999px}
@media (max-width:1200px){.team-map-selected-chart-shell{min-width:680px;flex-basis:680px}}

.contact-header{align-items:center;flex-wrap:wrap}
.contact-header-left{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap}
/* .contact-sort-group / .contact-sort-label / .contact-sort-pill are styled in
   the black&gold Directory block below (search-first command directory). */
@media (max-width:900px){.team-map-selected-meta-row{align-items:flex-start}.team-map-selected-map-content{display:block;overflow:visible}.team-map-mini-columns{display:grid;grid-template-columns:1fr;gap:12px}.team-map-mini-col{width:auto;min-width:0;max-height:none}.team-map-selected-chart-shell{min-width:0;flex-basis:auto}.org-chart-viewport{overflow:auto}}

.contact-link{color:var(--brand-primary-dark);text-decoration:none;font-weight:600}
.contact-link:hover{text-decoration:underline}

/* ── Contact directory (People · Directory lens) — black&gold redesign ─────
   Migrated from the green --eb-* palette to the --rd-* system + restructured to
   match the approved People-tab mock: search with a gold-focus ring, dark-chrome
   Organize/Show toggles + filter chips, avatar rows with a right-aligned stage
   pill in its own fixed column, and icon action buttons. Behavior is unchanged. */
/* Header + Organize/Show toggles (rendered in index.html's .contact-header) */
#panel-contacts .contact-header{gap:12px 14px;align-items:center}
.contact-sort-group{display:inline-flex;align-items:center;gap:2px;background:#fff;border:1px solid var(--rd-line);border-radius:9px;padding:3px}
.contact-sort-label{font-size:.66rem;color:var(--rd-faint);font-weight:700;text-transform:uppercase;letter-spacing:.05em;padding:6px 4px 6px 8px;align-self:center}
.contact-sort-pill{font:inherit;font-size:.82rem;font-weight:600;cursor:pointer;border:0;background:none;color:var(--rd-muted);border-radius:7px;padding:6px 11px}
.contact-sort-pill:hover{color:var(--rd-ink)}
.contact-sort-pill.is-active{background:var(--rd-chrome);color:var(--rd-accent-hi)}
/* Search field — gold magnifier inline, gold focus ring */
#contactSearch{flex:1 1 320px;min-width:180px;font:inherit;font-size:.9rem;height:40px;padding:0 14px 0 36px;border:1px solid var(--rd-line);border-radius:10px;background:#fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E5B54' stroke-width='1.8'><circle cx='11' cy='11' r='7'/><path d='m20 20-3-3'/></svg>") no-repeat 12px center;background-size:15px;color:var(--rd-ink)}
#contactSearch::placeholder{color:var(--rd-muted)}
#contactSearch:focus{outline:none;border-color:var(--rd-accent);box-shadow:0 0 0 3px var(--rd-accent-soft)}
/* Filter chips */
.cd-chips{display:flex;flex-wrap:wrap;gap:7px;padding:14px 14px 12px}
.cd-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--rd-line);background:#fff;color:var(--rd-ink);border-radius:999px;padding:6px 12px;cursor:pointer;font:inherit;font-size:.77rem;font-weight:600;transition:background .12s,border-color .12s,color .12s}
.cd-chip:hover{border-color:var(--rd-accent-line)}
.cd-chip.is-active{background:var(--rd-chrome);border-color:var(--rd-chrome);color:var(--rd-accent-hi)}
.cd-chip-count{font-size:.68rem;font-weight:700;color:var(--rd-muted)}
.cd-chip.is-active .cd-chip-count{color:var(--rd-on-chrome-muted)}
.cd-chip-attn{color:var(--rd-red);border-color:color-mix(in srgb,var(--rd-red),transparent 75%)}
.cd-chip-attn .cd-chip-count{color:var(--rd-red)}
.cd-chip-attn:hover{border-color:var(--rd-red)}
.cd-chip-attn.is-active{background:var(--rd-red);border-color:var(--rd-red);color:#fff}
.cd-chip-attn.is-active .cd-chip-count{color:#fff}
.cd-attn{color:var(--rd-red);display:inline-flex}
.cd-attn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2}
/* List + rows */
.cd-list{background:#fff;border:1px solid var(--rd-line);border-radius:14px;overflow:hidden}
.cd-row{display:flex;align-items:center;gap:13px;padding:12px 15px;border-bottom:1px solid var(--rd-line)}
.cd-row:last-child{border-bottom:none}
.cd-row:hover{background:var(--rd-card-2)}
.cd-avatar{flex:none;width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:.9rem;color:#fff;background:linear-gradient(145deg,var(--rd-accent),var(--rd-accent-deep));border:1.5px solid var(--rd-accent-hi);box-shadow:0 1px 4px rgba(0,0,0,.15)}
.cd-main{flex:1 1 auto;min-width:0}
.cd-line1{display:flex;align-items:center;gap:9px}
.cd-name{font-size:.9rem;font-weight:700;color:var(--rd-ink);text-decoration:none;cursor:pointer;background:none;border:0;font:inherit;font-weight:700;padding:0;text-align:left}
.cd-name:hover{color:var(--rd-accent-deep);text-decoration:underline}
.cd-sub{color:var(--rd-muted);font-size:.76rem;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cd-stagecol{flex:0 0 130px;display:flex;justify-content:flex-end}
.cd-stage-pill{font-size:.68rem;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--rd-accent-soft);color:var(--rd-accent-deep);border:1px solid var(--rd-accent-line);white-space:nowrap}
.cd-stage-contracted-in-home-state{background:color-mix(in srgb,var(--rd-green),transparent 88%);color:var(--rd-green);border-color:color-mix(in srgb,var(--rd-green),transparent 74%)}
.cd-actions{flex:none;display:flex;gap:6px}
.cd-act{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid var(--rd-line);background:#fff;color:var(--rd-accent-deep);border-radius:8px;width:32px;height:32px;padding:0;cursor:pointer;font:inherit;font-size:.86rem;font-weight:600;line-height:1;transition:background .15s,border-color .15s}
.cd-act svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8}
.cd-act-lbl{display:none}
.cd-act:hover{border-color:var(--rd-accent-line);background:var(--rd-accent-soft)}
.cd-act:active{transform:translateY(1px)}
.cd-empty{padding:28px 16px;text-align:center;color:var(--rd-faint);font-style:italic;font-weight:600}
.cd-year-band{padding:12px 15px;background:var(--rd-card-3);border-top:1px solid var(--rd-line);border-bottom:1px solid var(--rd-line);text-align:center}
.cd-year-band .contact-year{font-size:1.3rem;font-weight:700;color:var(--rd-faint);letter-spacing:.02em}
/* Mobile ≤760px: pill drops to its own line so long names never clip; icon actions */
@media (max-width:760px){
  .cd-chips{padding:10px 10px;flex-wrap:nowrap;overflow-x:auto}
  .cd-row{flex-wrap:wrap;align-items:flex-start;gap:10px;padding:11px 13px}
  .cd-avatar{width:30px;height:30px;font-size:.76rem}
  .cd-main{flex:1 1 60%}
  .cd-stagecol{flex:0 0 auto;order:3;justify-content:flex-start}
  .cd-actions{flex:1 1 100%;order:4;gap:6px}
  .cd-act{flex:1 1 auto;width:auto;padding:8px 6px}
}
.mobile-team-search-wrap{position:sticky;top:0;z-index:5;background:var(--rd-paper);padding-bottom:8px}
.mobile-team-tree-wrap{display:flex;flex-direction:column;gap:12px}
/* Board markers (Brief 01): left-edge cadence bar + state-icon cluster + stage medians.
   Only new/red/amber paint a colored 4px left bar; neutral keeps the default border. */
.pipeline-stage-card.cad-new{border-left:4px solid var(--rd-blue)}
.pipeline-stage-card.cad-red{border-left:4px solid var(--rd-red)}
.pipeline-stage-card.cad-amber{border-left:4px solid var(--rd-amber)}
.pipeline-card-markers{display:inline-flex;gap:3px;margin-left:6px;font-size:.8rem;vertical-align:middle}
.pipeline-card-markers .pcm{cursor:default}
/* Key-student star toggle (Brief 01 #3): fixed top-right corner control on each
   stage card. Hollow when unflagged, gold when flagged. */
.pipeline-stage-card{position:relative;padding-right:30px}
.pipeline-card-star{position:absolute;top:6px;right:6px;border:0;background:transparent;cursor:pointer;font-size:1rem;line-height:1;padding:2px;color:var(--rd-faint)}
.pipeline-card-star.is-key{color:var(--rd-accent)}
.pipeline-card-star:hover{color:var(--rd-accent)}
.pipeline-bulk-message{background:var(--brand-primary);color:#fff;border:0;border-radius:8px;padding:6px 12px;cursor:pointer}
.pipeline-bulk-message:hover{background:var(--brand-primary-dark)}
.pipeline-bulk-msg-count{font-size:.85rem;color:var(--rd-muted);margin:4px 0 10px}
.pipeline-stage-median{font-size:.72rem;color:var(--rd-muted);font-weight:600}
/* Responsive stage-tabs (Brief 01/08): hidden on desktop; under 760px the board
   stacks and shows ONE stage column full-width, switched by the tab bar. */
.pipeline-stage-tabs{display:none}
@media (max-width:760px){
  .pipeline-stage-tabs{display:flex;gap:6px;overflow-x:auto;padding:0 0 10px;-webkit-overflow-scrolling:touch}
  .pipeline-stage-tabs::-webkit-scrollbar{display:none}
  .pipeline-stage-tab{flex:0 0 auto;border:1px solid var(--rd-primary-soft-line);background:var(--rd-primary-soft);border-radius:999px;padding:8px 14px;font-size:.85rem;font-weight:600;color:var(--brand-primary-dark);white-space:nowrap;cursor:pointer}
  .pipeline-stage-tab.is-active{background:var(--brand-primary);color:#fff;border-color:var(--brand-primary)}
  .pst-count{display:inline-block;margin-left:6px;font-size:.72rem;opacity:.8}
  .pipeline-board{flex-direction:column;flex-wrap:nowrap;overflow-x:visible}
  .pipeline-column{flex:1 1 auto;width:auto;max-width:none;min-height:0}
  .pipeline-column.is-field{display:none}
  .pipeline-column.is-stage{display:none}
  .pipeline-column.is-stage.is-active-stage{display:flex}
  .pipeline-dropzone{max-height:none}
}
/* Student card (Brief 03): progressive-disclosure sheet; full-screen on mobile. */
.student-card-dialog{border:none;border-radius:16px;padding:0;max-width:560px;width:92vw;box-shadow:0 20px 60px rgba(21,61,101,.25)}
.student-card-dialog::backdrop{background:rgba(21,40,66,.45)}
.sc-card{padding:18px 20px;display:flex;flex-direction:column;gap:12px}
.sc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.sc-head h2{margin:0;font-size:1.3rem;line-height:1.2}
.sc-stage{margin-top:2px;font-size:.85rem;font-weight:600;color:var(--brand-primary-dark);background:var(--rd-primary-soft);display:inline-block;padding:2px 10px;border-radius:999px}
.sc-decision{background:var(--rd-card-2);border:1px solid var(--eb-stone);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px}
.sc-recent,.sc-next{font-size:.9rem;line-height:1.35}
.sc-tag{font-size:.78rem;font-weight:600;color:var(--rd-muted);background:var(--rd-card-3);border-radius:999px;padding:2px 10px}
.sc-tag-red{color:#fff;background:var(--rd-red)}
.sc-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.sc-btn{display:inline-block;border:1px solid var(--rd-primary-soft-line);background:#fff;color:var(--brand-primary-dark);border-radius:10px;padding:9px 14px;font-size:.9rem;font-weight:600;text-decoration:none;cursor:pointer}
.sc-btn-primary{background:var(--brand-primary);color:#fff;border-color:var(--brand-primary)}
.sc-section{border:1px solid var(--eb-stone);border-radius:12px;padding:8px 12px}
.sc-section>summary{cursor:pointer;font-weight:600;color:var(--brand-primary-dark);font-size:.92rem}
.sc-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;margin-top:8px}
.sc-grid>div{font-size:.9rem}
.sc-grid span{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--rd-faint)}
.sc-trouble{margin-top:8px;font-size:.9rem;color:color-mix(in srgb, var(--rd-amber), #000 35%);background:var(--rd-amber-soft);border-radius:8px;padding:8px}
.sc-list{margin:8px 0 0;padding-left:18px;display:flex;flex-direction:column;gap:5px;font-size:.88rem}
.sc-empty{font-size:.88rem;color:var(--rd-faint);padding:6px 0}
/* (c) One-tap link to the filtered Activity view (replaces inline history). */
.sc-activity-link{margin-top:2px}
.sc-link{background:none;border:none;color:var(--rd-blue);font-size:.9rem;font-weight:600;cursor:pointer;padding:6px 0;text-align:left}
.sc-link:hover{text-decoration:underline}
/* D4 desktop: card opens as a non-modal SIDE PANEL, keeping board context.
   No backdrop dimming the board; docked to the right, full-height, scrollable. */
/* Start the side panel BELOW the sticky header+tabs so they don't cover the
   card's name/stage/Close. --app-chrome is the measured header+tabs height (set
   by student-card.js on load/resize); the 144px fallback covers desktop before
   JS runs. 100dvh (not 100vh) so mobile browser chrome doesn't clip the bottom. */
.student-card-dialog.sc-side-panel{position:fixed;inset:var(--app-chrome,144px) 0 0 auto;margin:0;height:calc(100dvh - var(--app-chrome,144px));max-height:calc(100dvh - var(--app-chrome,144px));width:420px;max-width:92vw;border-radius:16px 0 0 16px;box-shadow:-12px 0 40px rgba(21,61,101,.18);overflow:auto}
.student-card-dialog.sc-side-panel .sc-card{min-height:100%}
@media (max-width:760px){
  .student-card-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
  /* Full-screen sheet covers the topbar (top layer): pad past the notch so Close
     is never under the status bar. */
  .student-card-dialog .sc-card{padding-top:calc(18px + env(safe-area-inset-top))}
  .sc-grid{grid-template-columns:1fr}
}
/* Settings surface (Brief 04): automation toggles + kill-switch; mobile-usable. */
.settings-dialog{border:none;border-radius:16px;padding:0;max-width:820px;width:94vw;box-shadow:0 20px 60px rgba(21,61,101,.25)}
.settings-dialog::backdrop{background:rgba(21,40,66,.45)}
.set-card{padding:18px 20px;display:flex;flex-direction:column;gap:14px}
.set-head{display:flex;justify-content:space-between;align-items:center}
.set-head h2{margin:0;font-size:1.25rem}

/* Category layout (approved redesign): a side rail (desktop) + one category
   panel at a time. On mobile the rail becomes a horizontally-scrollable chip row. */
.set-layout{display:grid;grid-template-columns:214px minmax(0,1fr);gap:16px;align-items:start}
.set-cat-nav{display:flex;flex-direction:column;gap:4px;position:sticky;top:0}
.set-cat-btn{display:flex;align-items:center;gap:10px;text-align:left;width:100%;border:1px solid var(--eb-stone,#dedfd8);background:#fff;color:var(--eb-ink,#16211b);border-radius:12px;padding:10px 12px;cursor:pointer;font:inherit;transition:background .12s,border-color .12s,color .12s}
.set-cat-btn:hover{border-color:var(--eb-green,#1e6b4a);background:var(--rd-green-soft)}
.set-cat-btn.is-active{background:var(--eb-green,#1e6b4a);border-color:var(--eb-green,#1e6b4a);color:#fff;border-bottom:2px solid var(--eb-gold,#d4a62a)}
.set-cat-ico{font-size:1.15rem;line-height:1;flex:none}
.set-cat-txt{display:flex;flex-direction:column;gap:1px;min-width:0}
.set-cat-txt strong{font-size:.92rem;font-weight:700}
.set-cat-txt small{font-size:.72rem;color:var(--eb-slate,#6e7268)}
.set-cat-btn.is-active .set-cat-txt small{color:rgba(255,255,255,.82)}
.set-cat-panel{display:flex;flex-direction:column;gap:12px;min-width:0}
.set-cat-heading{display:flex;align-items:center;gap:8px;padding-bottom:2px;border-bottom:1px solid var(--rd-card-3)}
.set-cat-heading h3{margin:0;font-size:1.05rem;color:var(--eb-deep,#0f3327)}
@media (max-width:760px){
  .set-layout{grid-template-columns:1fr;gap:12px}
  .set-cat-nav{flex-direction:row;overflow-x:auto;-webkit-overflow-scrolling:touch;position:static;padding-bottom:4px;gap:8px;scrollbar-width:none}
  .set-cat-nav::-webkit-scrollbar{display:none}
  .set-cat-btn{flex:0 0 auto;width:auto;white-space:nowrap}
  .set-cat-btn .set-cat-txt small{display:none}
}
.set-master{border:1px solid var(--rd-primary-soft-line);background:var(--rd-primary-soft);border-radius:12px;padding:4px 12px}
.set-master-off{border-color:var(--rd-red);background:var(--rd-red-soft)}
.set-list{display:flex;flex-direction:column;gap:2px}
.set-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 4px;border-bottom:1px solid var(--rd-card-3)}
.set-row-text{display:flex;flex-direction:column;gap:2px}
.set-row-text small{color:var(--rd-faint);font-size:.78rem}
.set-row input[type=checkbox]{width:22px;height:22px;flex:0 0 auto}
.set-row-dim{opacity:.45}
.set-review{margin-top:4px}
.set-review-note{font-size:.78rem;color:var(--rd-faint);margin-top:4px}
/* Progressive-disclosure sections + template bindings (Brief 04 consolidation) */
.set-section{border:1px solid var(--eb-stone);border-radius:12px;padding:6px 12px}
.set-section>summary{cursor:pointer;font-weight:600;color:var(--brand-primary-dark);padding:6px 0;list-style:none}
.set-section>summary::-webkit-details-marker{display:none}
.set-section>summary::before{content:"▸ ";color:var(--rd-faint)}
.set-section[open]>summary::before{content:"▾ "}
.set-bind-list{display:flex;flex-direction:column;gap:8px;padding:6px 0}
.set-bind-row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.set-bind-row select,.set-bind-row input{flex:0 1 280px;max-width:60%;padding:8px;border:1px solid var(--eb-stone);border-radius:10px;background:#fff}
.set-bind-sub{font-size:.8rem;color:var(--rd-muted);margin-top:8px;font-weight:600}
/* Appointment types (company-configurable calendar TYPES) — a compact editable row */
.set-routing-list{display:flex;flex-direction:column;padding:6px 0}
.set-routing-row{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--rd-card-3)}
.set-routing-row .set-row-text{flex:1 1 auto}
.set-routing-from,.set-routing-tocell{flex:0 0 200px}
.set-routing-head{font-weight:600;color:var(--rd-faint);font-size:.82rem;border-bottom:1px solid var(--eb-stone)}
.set-routing-from select{padding:7px;border:1px solid var(--eb-stone);border-radius:8px;background:#fff;width:100%}
.set-routing-to{display:inline-flex;align-items:center;gap:4px;margin-right:8px;font-size:.85rem}
.set-routing-to small{color:var(--rd-faint)}
.set-routing-fixed{color:var(--rd-faint);font-size:.85rem}
.set-appt-type-row,.set-appt-type-add{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 0;border-bottom:1px solid var(--rd-card-3)}
.set-appt-type-add{border-bottom:none;border-top:1px solid var(--eb-stone);margin-top:6px;padding-top:10px}
.set-appt-label{flex:1 1 160px;min-width:120px;padding:7px;border:1px solid var(--eb-stone);border-radius:8px;background:#fff}
.set-appt-newkey{flex:0 1 140px;padding:7px;border:1px solid var(--eb-stone);border-radius:8px;background:#fff;font-family:monospace}
.set-appt-color{width:38px;height:34px;padding:0;border:1px solid var(--eb-stone);border-radius:8px;background:#fff}
.set-appt-dur{width:64px;padding:7px;border:1px solid var(--eb-stone);border-radius:8px;background:#fff}
.set-appt-shared{font-size:.85rem;color:var(--rd-muted);display:flex;align-items:center;gap:4px;white-space:nowrap}
.set-bind-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
/* Activation-state pills (Brief 04 c): show whether each automation is
   configured, not just ON/OFF. */
.set-row-auto{align-items:flex-start}
.set-switch{flex:0 0 auto}
.set-switch input[type=checkbox]{width:22px;height:22px}
.set-pill{display:inline-block;margin-top:4px;font-size:.72rem;font-weight:600;padding:2px 8px;border-radius:999px;line-height:1.5}
.set-pill-ok{background:var(--rd-green-soft);color:color-mix(in srgb, var(--rd-green), #000 25%)}
.set-pill-warn{background:var(--rd-amber-soft);color:color-mix(in srgb, var(--rd-amber), #000 30%)}
.set-pill-off{background:var(--rd-card-3);color:var(--rd-muted)}
.set-pill-paused{background:var(--rd-red-soft);color:var(--rd-red)}

/* Stage → Purpose → Template manager (Brief 04 a / Brief 05). Searchable,
   sectioned — built to stay readable at 30-40+ templates. */
.set-mgr{display:flex;flex-direction:column;gap:8px;padding:4px 0}
.set-mgr-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.set-mgr-search{flex:1 1 200px;min-width:140px;padding:8px;border:1px solid var(--eb-stone);border-radius:10px;background:#fff}
.set-mgr-total{font-size:.78rem;color:var(--rd-faint)}
.set-mgr-body{display:flex;flex-direction:column;gap:8px;max-height:46vh;overflow:auto}
.set-mgr-empty{font-size:.85rem;color:var(--rd-muted);padding:8px 2px}
.set-mgr-stage{border:1px solid var(--eb-stone);border-radius:10px;padding:4px 10px;background:var(--rd-card-2)}
.set-mgr-stage>summary{cursor:pointer;font-weight:700;color:var(--brand-primary-dark);padding:6px 0;list-style:none}
.set-mgr-stage>summary::-webkit-details-marker{display:none}
.set-mgr-stage>summary::before{content:"▸ ";color:var(--rd-faint)}
.set-mgr-stage[open]>summary::before{content:"▾ "}
.set-mgr-purpose{font-size:.78rem;font-weight:600;color:var(--rd-muted);margin:6px 0 2px;text-transform:uppercase;letter-spacing:.02em}
.set-mgr-count{display:inline-block;font-size:.72rem;color:var(--rd-muted);background:var(--rd-card-3);border-radius:999px;padding:0 7px;font-weight:600}
.set-mgr-item{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 4px;border-bottom:1px solid var(--rd-card-3)}
.set-mgr-item-title{font-weight:600;color:var(--rd-ink)}
.set-mgr-item-sub{font-size:.78rem;color:var(--rd-faint);flex:1 1 100%}
.set-mgr-actions{margin-left:auto;display:flex;gap:6px}
.set-mgr-del{color:var(--rd-red)}

/* Automation activity view (Brief 05 B2). */
.set-act{display:flex;flex-direction:column;gap:8px;padding:4px 0}
.set-act-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.set-act-chips{display:flex;gap:6px;flex-wrap:wrap}
.set-act-chip{font-size:.74rem;padding:3px 9px;border-radius:999px;background:var(--rd-card-3);color:var(--rd-muted)}
.set-act-chip strong{font-size:.85rem}
.set-act-chip.set-act-sent{background:var(--rd-blue-soft);color:var(--rd-blue)}
.set-act-chip.set-act-adv{background:var(--rd-green-soft);color:color-mix(in srgb, var(--rd-green), #000 25%)}
.set-act-chip.set-act-field{background:var(--rd-amber-soft);color:color-mix(in srgb, var(--rd-amber), #000 30%)}
.set-act-chip.set-act-fail{background:var(--rd-red-soft);color:var(--rd-red)}
.set-act-note{font-size:.78rem;color:var(--rd-faint)}
.set-act-empty{font-size:.85rem;color:var(--rd-muted);padding:6px 2px}
.set-act-list{display:flex;flex-direction:column;gap:2px;max-height:40vh;overflow:auto}
.set-act-row{display:flex;align-items:flex-start;gap:8px;padding:7px 4px;border-bottom:1px solid var(--rd-card-3)}
.set-act-dot{flex:0 0 auto;width:9px;height:9px;border-radius:50%;margin-top:5px;background:var(--rd-faint)}
.set-act-dot.set-act-sent{background:var(--rd-blue)}
.set-act-dot.set-act-adv{background:var(--rd-green)}
.set-act-dot.set-act-field{background:var(--rd-amber)}
.set-act-dot.set-act-fail{background:var(--rd-red)}
.set-act-main{display:flex;flex-direction:column;gap:1px;flex:1 1 auto;min-width:0}
.set-act-who{color:var(--rd-muted);font-weight:500}
.set-act-subj{color:var(--rd-faint);font-size:.76rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.set-act-when{font-size:.72rem;color:var(--rd-faint);flex:0 0 auto;white-space:nowrap}

.settings-dialog{max-width:640px}
@media (max-width:760px){ .settings-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0} .set-bind-row{flex-direction:column;align-items:stretch} .set-bind-row select,.set-bind-row input{flex:1 1 auto;max-width:none} .set-mgr-body,.set-act-list{max-height:none} }
.import-contracted-opt{display:block;margin:8px 0;font-size:.88rem;color:var(--rd-muted)}
.contact-name-btn{background:none;border:none;padding:0;color:var(--brand-primary-dark);font:inherit;font-weight:600;text-align:left;cursor:pointer;text-decoration:underline}
.contact-name-btn:hover{color:var(--rd-ink)}
/* Convergence (Brief 08): ONE responsive app. mobile.html now redirects to
   index.html; these make the desktop surfaces usable on phones. */
@media (max-width:760px){
  .topbar{flex-wrap:wrap;gap:8px}
  .tabs{overflow-x:auto;flex-wrap:nowrap;gap:6px;-webkit-overflow-scrolling:touch}
  .tab{flex:0 0 auto;white-space:nowrap}
  .contact-header{flex-direction:column;align-items:stretch;gap:8px}
  .table-wrap{overflow:visible}
  #contactsTable thead{display:none}
  #contactsTable,#contactsTable tbody,#contactsTable tr,#contactsTable td{display:block;width:auto}
  #contactsTable tr{border:1px solid var(--eb-stone);border-radius:12px;margin:0 0 10px;padding:8px;background:#fff}
  #contactsTable td{border:none;padding:4px 6px}
}
.sc-upload{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;align-items:center;border:1px dashed transparent;border-radius:10px;padding:6px;transition:background .12s,border-color .12s}
.sc-upload select,.sc-upload input[type=file]{font-size:.85rem}
.sc-fields{display:flex;flex-direction:column;gap:6px;margin:6px 0}
.sc-field-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:.85rem}
.sc-field-row span{color:var(--rd-faint);flex:0 0 45%}
.sc-field-row input{flex:1 1 auto;min-width:0;border:1px solid var(--eb-stone);border-radius:8px;padding:5px 8px;font:inherit;font-size:.85rem}
.sc-field-row input.sc-saved{border-color:var(--rd-green);background:var(--rd-green-soft)}
.sc-drop-hint{flex:1 1 100%;font-size:.78rem;color:var(--rd-faint)}
.sc-upload.sc-drop-active{border-color:var(--brand-primary);background:var(--rd-primary-soft)}

/* A name that opens the universal student card (Brief 03 A2) — used in the
   activity feed and quiz tracker so any name surface reaches the card. */
.lm-cardname{cursor:pointer;text-decoration:underline dotted;text-underline-offset:2px}
.lm-cardname:hover{text-decoration:underline}
@media (max-width:760px){ .settings-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0} }

/* Team Map (Brief 08): post-convergence the org chart is served to phones too.
   It lays out at a min width wider than a phone; on small screens let the canvas
   pan horizontally and the viewport overflow so nodes are reachable, not clipped.
   Placed at EOF so it wins source-order over the base org-chart rules. */
@media (max-width:760px){.org-chart-canvas{overflow-x:auto;-webkit-overflow-scrolling:touch}.org-chart-viewport{overflow:visible}}

/* Contacts "By Recruit Date" view: group recruits by year with a clean break.
   The year heading is centered, large, bold and grey so it reads as a divider,
   visually distinct from the row text. A-Z view renders no bands. Placed at EOF
   so the mobile overrides win source-order over the base #contactsTable tr card
   rule (which would otherwise box the band/spacer rows). */
.contact-year-band td{background:var(--rd-card-3);border-top:1px solid var(--eb-stone);border-bottom:1px solid var(--eb-stone);padding:14px 12px;text-align:center}
.contact-year-band .contact-year{font-size:1.5rem;font-weight:700;color:var(--rd-muted);letter-spacing:.02em}
.contact-year-spacer td{padding:0;height:20px;border:none;background:transparent}
@media (max-width:760px){
  #contactsTable tr.contact-year-band,#contactsTable tr.contact-year-spacer{border:none;background:transparent;margin:0;padding:0;border-radius:0}
  #contactsTable tr.contact-year-band td{display:block;background:var(--rd-card-3);border-top:1px solid var(--eb-stone);border-bottom:1px solid var(--eb-stone);text-align:center;padding:12px}
  #contactsTable tr.contact-year-spacer td{height:12px;padding:0}
}

/* ── Brand theming ─────────────────────────────────────────────────────────
   Platform default = Everborn (green + gold). brand-boot.js overrides these
   per tenant from /api/brand, so the page chrome matches the tenant's brand. */
:root{
  /* Tenant-overridable chrome (brand-boot.js sets these from /api/brand).
     These come FIRST so the derived brand tokens below can color-mix off them. */
  --brand-primary:#1E6B4A;   /* header / chrome / active — Everborn green */
  --brand-accent:#D4A62A;    /* gold accents — Radiant gold */
  --brand-on-primary:#ffffff;
  /* Derived brand shades used across the interior so every brand-accent element
     follows the tenant brand. On the Everborn default (brand-primary = green)
     these reproduce the historical evergreen look. */
  --brand-primary-dark:color-mix(in srgb, var(--brand-primary), #000 22%); /* text-on-white */
  --brand-surface:color-mix(in srgb, var(--brand-primary), #000 55%);      /* dark rail top */
  --brand-surface-2:color-mix(in srgb, var(--brand-primary), #000 68%);    /* dark rail bottom */

  /* Everborn design tokens (locked 2026-07-04) — see docs/EVERBORN_BRAND.md.
     The interior BRAND-ACCENT family (--eb-green / --eb-deep / --eb-deep-2 / --eb-gold)
     now derives from the tenant brand so the whole app follows it. On the Everborn
     default these resolve back to the exact locked greens + gold. */
  --eb-deep:var(--brand-surface); --eb-deep-2:var(--brand-surface-2); --eb-green:var(--brand-primary);
  --eb-gold:var(--brand-accent); --eb-gold-hi:#EBB93B; --eb-champagne:#E9D18C;
  --eb-violet:#8E6FC6; --eb-sage:#8FA79A;
  --eb-off:#F5F5F0; --eb-snow:#FCFCF9; --eb-stone:#DEDFD8; --eb-slate:#6E7268; --eb-ink:#16211B;
  --eb-success:#2F8558; --eb-warning:#C98A2E; --eb-error:#B23A2B; --eb-info:#3C6E79;
  --eb-r-md:12px; --eb-r-lg:16px; --eb-focus:0 0 0 3px rgba(30,107,74,.18);

  /* ── Redesign token system (Today black&gold, 2026-07-05) ──────────────────
     A tenant supplies only --brand-primary (their DARK chrome color) + --brand-accent
     (their BRIGHT highlight); everything below derives. Content stays neutral
     paper+ink for readability, so the result is premium for ANY palette. The muddy
     header was a contract violation (primary set to a mid mustard) — primary must be
     the dark chrome color. e.g. a black/gold tenant; the Everborn default = green/gold; etc. */
  --rd-chrome:var(--brand-primary);
  --rd-accent:var(--brand-accent);
  --rd-accent-hi:color-mix(in srgb, var(--brand-accent), #fff 26%);
  --rd-accent-deep:color-mix(in srgb, var(--brand-accent), #000 36%);
  --rd-accent-soft:color-mix(in srgb, var(--brand-accent), transparent 87%);
  --rd-on-accent:color-mix(in srgb, var(--brand-accent), #000 82%);
  --rd-paper:#F5F3EE; --rd-card:#FFFFFF; --rd-card-2:#FBFAF7; --rd-card-3:#F3F1EB;
  --rd-ink:#151515; --rd-muted:#5E5B54; --rd-faint:#6B675E;
  --rd-on-chrome:#F4F1EA; --rd-on-chrome-muted:#B7B2A6;
  --rd-line:rgba(18,18,18,.09); --rd-line-2:rgba(18,18,18,.06); --rd-line-d:rgba(255,255,255,.09);
  --rd-red:#C0392B; --rd-blue:#3C6E79; --rd-green:#2F8558; --rd-amber:#B7791F; --rd-grey:#9A968C;
  /* Gold-line = a faint accent hairline used on chips/cards/connectors. */
  --rd-accent-line:color-mix(in srgb, var(--brand-accent), transparent 74%);
  /* ── Role tokens (G-049 tokenization) — named by ROLE, not hue. The -soft
     family are pale chip/callout tints; -ink-2 is the raised dark surface at
     the top of dark gradients. Brand-derived tints follow the tenant kit. */
  --rd-ink-2:#26272A;
  --rd-primary-soft:color-mix(in srgb, var(--brand-primary), #fff 90%);
  --rd-primary-soft-line:color-mix(in srgb, var(--brand-primary), #fff 76%);
  --rd-red-soft:color-mix(in srgb, var(--rd-red), #fff 90%);
  --rd-green-soft:color-mix(in srgb, var(--rd-green), #fff 90%);
  --rd-amber-soft:color-mix(in srgb, var(--rd-amber), #fff 88%);
  --rd-blue-soft:color-mix(in srgb, var(--rd-blue), #fff 88%);
}
/* Content well is the neutral paper (was cold #f5f7fb / warm off-white). */
body{background:var(--rd-paper)}
.topbar,.mobile-topbar{background:var(--brand-surface)}
.tab.active,.mobile-tab.active{background:var(--brand-primary);border-color:var(--brand-primary)}
.tabs .tab.active{color:var(--brand-on-primary)}
th{background:var(--brand-primary);color:var(--brand-on-primary)}
.ghost{color:var(--brand-primary);border-color:var(--brand-primary)}

/* ── Everborn shell: brand mark + mobile bottom nav ─────────────────────── */
.topbar > div:first-child{display:flex;align-items:center}
/* Brand mark — un-ringed, gold-glow (redesign). */
.eb-mark{width:auto;height:36px;flex:none;border:0;border-radius:0;display:inline-flex;align-items:center;justify-content:center;margin-right:11px}
.eb-mark img,.eb-mark svg{height:32px;width:auto;filter:drop-shadow(0 0 10px color-mix(in srgb, var(--rd-accent), transparent 55%))}
/* Header wordmark: gold Cinzel, letterspaced (matches the login + mock). */
.topbar h1,.topbar h1[data-brand-name]{font-size:0.82rem;font-weight:600;letter-spacing:2px;font-family:'Cinzel',Georgia,'Times New Roman',serif;color:var(--rd-accent-hi);text-transform:uppercase}
@media (max-width:760px){.topbar h1,.topbar h1[data-brand-name]{font-size:0.74rem;letter-spacing:2px}}
.topbar{padding:13px 22px}
/* Header utility controls: dark chips with a gold hairline; Refresh is the one gold fill. */
.topbar-actions{display:flex;align-items:center;gap:8px}
.topbar-actions button,.topbar-actions a.ghost,.topbar-actions a{
  background:rgba(255,255,255,.05);color:var(--rd-on-chrome);border:1px solid var(--rd-line-d);
  border-radius:9px;min-height:38px;padding:0 13px;font-size:14px;font-weight:500;
  display:inline-flex;align-items:center;gap:6px;text-decoration:none;cursor:pointer;
  transition:background .16s,border-color .16s}
.topbar-actions button:hover,.topbar-actions a:hover{background:rgba(255,255,255,.09);border-color:var(--rd-accent-soft)}
.topbar-actions #refreshBtn{background:linear-gradient(180deg,var(--rd-accent-hi),var(--rd-accent));color:var(--rd-on-accent);border:0;font-weight:600}
.topbar-actions #refreshBtn:hover{filter:brightness(1.05)}
/* Header action buttons: text on desktop, compact icon-squares on mobile (mock's
   minimal header — one refresh square). */
.topbar-actions .ti-ic{display:none;align-items:center}
.topbar-actions .ti-ic svg{width:17px;height:17px;stroke:currentColor;fill:none}
@media (max-width:760px){
  .topbar-actions .ti-tx{display:none}
  /* Mock's mobile header has ONE square = Refresh only. Hide Install here. */
  .topbar-actions #installBtn{display:none !important}
  .topbar-actions #refreshBtn .ti-ic{display:inline-flex}
  .topbar-actions #refreshBtn{width:34px;height:34px;min-width:34px;min-height:34px;padding:0;justify-content:center;border-radius:9px;background:rgba(255,255,255,.06);color:var(--rd-on-dark,#F4F1EA);border:1px solid var(--rd-line-d,rgba(255,255,255,.09));font-weight:500}
}
/* Student card — Everborn brand pass (primary action + cadence). */
.sc-btn-primary{background:var(--brand-primary) !important;color:#fff !important;border:0 !important;border-bottom:2px solid var(--eb-gold) !important}
.sc-tag-red{color:var(--eb-error) !important}
.sc-btn{border-radius:10px}
.eb-bottomnav,.eb-bn-more-sheet,.eb-more-backdrop{display:none}
/* Desktop: the top tab row becomes a left nav rail (deep evergreen). */
@media (min-width:761px){
  nav.tabs{position:fixed;top:var(--eb-topbar-h,60px);left:0;bottom:0;width:186px;z-index:18;flex-direction:column;align-items:stretch;gap:2px;background:linear-gradient(180deg,var(--eb-deep-2),var(--eb-deep));border-bottom:0;border-right:1px solid rgba(0,0,0,.12);padding:14px 10px;overflow-y:auto}
  nav.tabs .tab{text-align:left;border:0;border-radius:9px;background:transparent;color:#C7D6CC;padding:9px 11px;font-size:13.5px;font-weight:500;flex:none}
  nav.tabs .tab:hover{background:rgba(233,209,140,.10);color:#F4EAD2}
  nav.tabs .tab.active{background:rgba(212,166,42,.16);color:#F4EAD2;font-weight:600;border-color:transparent;border-left:2px solid var(--eb-gold)}
  main{margin-left:186px}
}
@media (max-width:760px){
  nav.tabs{display:none}
  main{padding-bottom:calc(74px + env(safe-area-inset-bottom))}
  .eb-bottomnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;background:#fff;border-top:1px solid var(--eb-stone);justify-content:space-around;align-items:stretch;padding:6px 4px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -2px 12px rgba(16,33,27,.06)}
  .eb-bn-item{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;font-weight:500;color:var(--eb-slate);cursor:pointer;background:none;border:0;padding:3px 0;font-family:inherit}
  .eb-bn-item .ic{font-size:16px;line-height:1}
  .eb-bn-item.on{color:var(--eb-green);font-weight:600}
  .eb-more-backdrop.on{display:block;position:fixed;inset:0;z-index:41;background:rgba(16,33,27,.25)}
  .eb-bn-more-sheet.on{display:block;position:fixed;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom));z-index:42;background:#fff;border-radius:16px 16px 0 0;box-shadow:0 -8px 30px rgba(16,33,27,.16);padding:8px 10px calc(10px + env(safe-area-inset-bottom));max-height:60vh;overflow-y:auto}
  .eb-more-item{display:block;width:100%;text-align:left;font-size:14px;padding:12px 10px;border:0;border-bottom:1px solid var(--eb-off);background:none;color:var(--eb-ink);font-family:inherit;cursor:pointer}
  .eb-more-item:last-child{border-bottom:0}
  .eb-more-sep{height:1px;background:var(--eb-stone);margin:6px 0}
  .eb-more-util{color:var(--eb-slate);font-weight:500}

  /* Slim the topbar on mobile: the bottom nav is the primary nav now, so the
     header keeps only brand + Refresh (was wrapping to 3 fat rows and colliding
     with overlays). The rest live in the More sheet. */
  .topbar{flex-wrap:nowrap;padding:10px 14px;gap:8px}
  .topbar h1[data-brand-name]{font-size:1.12rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
  .topbar-actions #openTrainingPlatform,
  .topbar-actions [data-open-templates],
  .topbar-actions #logoutBtn{display:none}

  /* Float the "Need help?" bubble (and its panel) above the fixed bottom nav so
     they never sit on top of it. Overrides the inline bottom:16px via !important. */
  #eb-help-fab{bottom:calc(82px + env(safe-area-inset-bottom)) !important;right:12px !important}
  #eb-help-panel{bottom:calc(140px + env(safe-area-inset-bottom)) !important}
}

/* ── Shared refresh spinner ────────────────────────────────────────────────
   Every Refresh button (header + per-page) gets a consistent in-flight state
   via window.withRefreshSpinner (app.js): the button is disabled and a small
   circular spinner is shown next to its label until the refresh resolves. */
.is-refreshing{position:relative;pointer-events:none;opacity:.7}
.eb-refresh-spinner{display:inline-block;width:13px;height:13px;margin-left:6px;
  vertical-align:-2px;border:2px solid currentColor;border-top-color:transparent;
  border-radius:50%;animation:ebRefreshSpin .7s linear infinite}
@keyframes ebRefreshSpin{to{transform:rotate(360deg)}}
.brand-logo{height:26px;vertical-align:middle;margin-right:8px}

/* Connect-your-account buttons (Contact List "Connect email" + Activity Logs
   "Connect calendar"). These trigger an OAuth connect flow, so they must read
   as a "connect your Google/Microsoft account" action — visually distinct from
   ordinary ghost/pill buttons. White card with a provider glyph + colored
   accent border so it stands apart in a toolbar of plain buttons. */
.connect-btn{
  display:inline-flex;align-items:center;gap:8px;
  background:#fff;color:#3c4043;
  border:1px solid var(--brand-primary);border-radius:8px;
  padding:7px 14px;font:inherit;font-weight:600;line-height:1;
  cursor:pointer;text-decoration:none;white-space:nowrap;
  box-shadow:0 1px 2px rgba(60,64,67,.15);
}
.connect-btn:hover{background:var(--rd-primary-soft);border-color:var(--brand-primary-dark)}
/* Disconnect variant of the same pill — muted/danger tone so it reads as "revoke"
   rather than "connect". Keeps the layout identical so the toggle swaps in place. */
.connect-btn-disconnect{color:var(--eb-error);border-color:color-mix(in srgb, var(--eb-error), #fff 60%)}
.connect-btn-disconnect:hover{background:var(--rd-red-soft);border-color:var(--eb-error)}
.connect-btn-disconnect .connect-glyph{
  background:var(--eb-error);
  -webkit-mask:radial-gradient(circle 6px at 50% 50%,transparent 5px,#000 6px);
  mask:radial-gradient(circle 6px at 50% 50%,transparent 5px,#000 6px);
}
.connect-btn-disconnect[disabled]{opacity:.6;cursor:default}
/* Provider glyph — multi-color Google "G" rendered with conic gradients so it
   reads as the real provider cue without bundling an image asset. */
.connect-btn .connect-glyph{
  display:inline-block;width:18px;height:18px;flex:0 0 18px;border-radius:50%;
  background:
    conic-gradient(from -45deg,
      #ea4335 0deg 90deg,
      #fbbc05 90deg 180deg,
      #34a853 180deg 270deg,
      #4285f4 270deg 360deg);
  -webkit-mask:radial-gradient(circle 6px at 50% 50%,transparent 5px,#000 6px);
  mask:radial-gradient(circle 6px at 50% 50%,transparent 5px,#000 6px);
}

/* ════════════════════════════════════════════════════════════════════════════
   SIZING / SCALE PASS (2026-07-04) — "readable at a glance, no dead space".
   Size, spacing and layout ONLY — no color/token or wording changes. Appended
   last so these rules win source-order over the older, smaller defaults.

   Type scale (desktop):
     tiny UPPERCASE labels   11–12px → 13px
     secondary / meta        11–12px → 13px
     body / row text         13–14px → 15px
     row titles (names)      → 16px / 600
     sub-headings            → 18px
     panel + module headings → 25px
   Controls: pills/buttons 14–15px @ 38–40px tall; inputs 44px @ 15px; icon
   actions ~34–36px hit area. Content is capped at 1120px and centered so the
   right half stops being empty; stretched rows keep their content together.
   ════════════════════════════════════════════════════════════════════════════ */

/* — Content width containment: cap + center each panel so panels stop stretching
   to 1500px+ and the whitespace becomes a deliberate margin, not a lopsided gap.
   Full-bleed surfaces that own their own scroll (team map focus layout, the
   horizontal pipeline board) opt out below. */
.panel{max-width:1120px;margin-left:auto;margin-right:auto}
#panel-map,#panel-pipeline{max-width:none}

/* — Panel + module headings: the biggest at-a-glance anchor. */
.panel-header h2,
.quiz-tracker-head h2,
.stage3-welcome-head h2{font-size:25px;line-height:1.25;letter-spacing:-.01em}
.panel-header p,
.quiz-tracker-head p{font-size:15px;line-height:1.5}

/* — Left nav rail (desktop): taller, more legible rows. */
@media (min-width:761px){
  nav.tabs{width:200px;padding:16px 12px}
  nav.tabs .tab{font-size:15.5px;padding:11px 13px}
  body.eb-surfaces main,
  main{margin-left:200px}
  body.eb-surfaces .eb-rail{width:200px}
  body.eb-surfaces .eb-rail-item{font-size:15.5px;padding:12px 13px}
  body.eb-surfaces .eb-rail-item .ic{font-size:16px}
}

/* — Sub-switcher (surface segmented control): bigger, taller segments. */
.eb-seg-item{font-size:15px;padding:9px 18px}
.eb-subbtn{font-size:15px;padding:9px 17px}

/* — Top flat tab pills (when the rail isn't active): readable + tappable. */
.tab,.mobile-tab{font-size:14.5px;padding:11px 16px}
.ghost{min-height:38px}

/* — Form controls: inputs read at 15px and are a comfortable 44px tall. */
.field input,.field select,
.state-input,
.set-bind-row select,.set-bind-row input,
.set-mgr-search,
.set-appt-label,.set-appt-newkey,.set-appt-dur,
.set-routing-from select{font-size:15px;min-height:44px}
.state-input{width:120px}

/* — Contact directory: bigger type + de-gapped row. The old flex row flung the
   name to the far left and the actions to the far right with ~500px of dead
   space between. A grid keeps them together: avatar · name/sub grow, then a
   fixed state field and the action cluster sit at a comfortable reading gap. */
#contactSearch{font-size:16px;padding:14px 16px}
.cd-chip{font-size:14px;padding:9px 15px}
.cd-chip-count{font-size:12.5px}
.cd-row{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center;gap:18px;padding:14px 16px;
}
.cd-avatar{width:44px;height:44px;font-size:1.15rem}
.cd-name{font-size:16px;font-weight:600}
.cd-sub{font-size:13px;margin-top:3px}
.cd-stage-pill{font-size:12.5px;padding:4px 11px}
.cd-act{font-size:14px;padding:8px 12px;min-height:36px}
.cd-empty{font-size:15px;padding:32px 16px}

/* — Student card sheet: names, decision text and detail all a notch larger. */
.sc-head h2{font-size:22px}
.sc-stage{font-size:13px}
.sc-recent,.sc-next{font-size:15px}
.sc-btn{font-size:14px;padding:10px 15px;min-height:38px}
.sc-section>summary{font-size:15px}
.sc-grid>div{font-size:15px}
.sc-grid span{font-size:12px}
.sc-trouble,.sc-list,.sc-empty{font-size:14px}

/* — Settings: category labels, rows and helper text sized up. */
.set-head h2{font-size:22px}
.set-cat-heading h3{font-size:18px}
.set-cat-txt strong{font-size:15px}
.set-cat-txt small{font-size:13px}
.set-row-text small,.set-review-note,.set-bind-sub,
.set-mgr-item-sub,.set-mgr-purpose,.set-act-note{font-size:13px}
.set-mgr-stage>summary,.set-section>summary{font-size:15px}
.set-mgr-item-title,.set-mgr-stage>summary{font-size:15px}
.set-act-who{font-size:14px}
.set-act-subj,.set-act-when{font-size:13px}
.set-pill,.set-act-chip{font-size:13px}

/* — Team map: hero + card text sized up for legibility. */
.team-map-default-hero h3,.team-map-selected-header h3,
.team-map-selected-headline h3{font-size:22px}
.team-map-default-hero p,.team-map-selected-header p,
.team-map-selected-headline p{font-size:15px}
.team-map-top-name{font-size:17px}
.team-map-top-stats{font-size:14px}
.team-map-search{font-size:15px;min-height:44px}
.org-stat-pill{font-size:14px}

/* — Empty / loading states read clearly (calm, not shouty). */
.cd-empty,.set-mgr-empty,.set-act-empty{line-height:1.5}

/* ── MOBILE (≤760px): keep it COMPACT. Rows stay tight and single-purpose, but
   text is never below 13px and tap targets stay ≥44px. The desktop scale-ups
   that would bloat mobile cards are pulled back here. ─────────────────────── */
@media (max-width:760px){
  .panel{max-width:none}
  .panel-header h2,.quiz-tracker-head h2,.stage3-welcome-head h2{font-size:21px}
  main{margin-left:0}
  body.eb-surfaces main{margin-left:0}
  /* ── Mobile Directory: a purpose-built COMPACT row, not the desktop grid
     reflowed. (1) Search never stretches — the flex:1 1 320px basis becomes a
     320px-TALL box once the header goes column, so pin it to auto height.
     (2) Stage chips scroll horizontally instead of wrapping into a tall block.
     (3) One tight line: avatar · name+sub (grows) · four ICON-only actions
     (labels hidden so they fit). State edit moves to the student card. ── */
  #contactSearch{flex:0 0 auto;width:100%;height:auto;min-height:46px;font-size:16px;padding:12px 14px;border-radius:12px}
  .contact-header-left{width:100%}
  .cd-chips{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding:10px 10px 6px;gap:7px}
  .cd-chips::-webkit-scrollbar{display:none}
  .cd-chip{flex:0 0 auto}
  .cd-row{display:flex;flex-wrap:nowrap;align-items:center;gap:11px;padding:9px 12px}
  .cd-avatar{width:40px;height:40px;font-size:1rem;flex:none}
  .cd-main{flex:1;min-width:0}
  .cd-name{font-size:15px}
  .cd-sub{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .cd-edit{display:none}
  .cd-actions{flex:none;display:flex;gap:5px}
  .cd-act{min-height:42px;min-width:42px;padding:0;font-size:17px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px}
  .cd-act .cd-act-lbl{display:none}
  .team-map-top-name{font-size:16px}
}


/* ==========================================================================
   PEOPLE TAB — 5 lenses rebuilt to match the approved mock (.mockwork/_OLD_people_*).
   Mock design classes ported verbatim, color tokens mapped to the --rd-* system,
   every selector scoped under .people-lens (each lens root carries that class).
   Mock section identity colors + stage-mix colors are preserved as-is.
   ========================================================================== */
.people-lens{color:var(--rd-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
/* The People directory header (eyebrow/h1/controls/chips) must sit on the page
   background with only the .list as a card — matching the mock. So the contacts
   wrapper drops the .table-wrap card styling that was clipping the eyebrow. */
.contact-directory-wrap{background:transparent;border:0;border-radius:0;overflow:visible;}
.people-lens svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.7;flex:none;}
.people-lens .h1{font-size:1.26rem;font-weight:800;color:var(--rd-ink);letter-spacing:-.02em;margin:8px 0 2px;}
.people-lens .eyebrow{font-size:0.68rem;letter-spacing:.14em;text-transform:uppercase;color:var(--rd-muted);font-weight:700;}
.people-lens .avatar{width:38px;height:38px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;font-size:0.9rem;background:linear-gradient(145deg,var(--rd-accent),var(--rd-accent-deep));border:1.5px solid var(--rd-accent-hi);box-shadow:0 1px 4px rgba(0,0,0,.15);}
.people-lens .avatar.sm{width:30px;height:30px;font-size:0.76rem;}
.people-lens .pill{font-size:0.68rem;font-weight:700;padding:3px 9px;border-radius:999px;white-space:nowrap;}
.people-lens .pill.stage{background:var(--rd-accent-soft);color:var(--rd-accent-deep);border:1px solid var(--rd-accent-line);}
.people-lens .namebtn{font-weight:700;color:var(--rd-ink);cursor:pointer;background:none;border:0;font:inherit;font-size:.9rem;padding:0;text-align:left;text-decoration:none;}
.people-lens .namebtn:hover{color:var(--rd-accent-deep);text-decoration:underline;}
.people-lens .iconbtn{background:#fff;border:1px solid var(--rd-line);border-radius:8px;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--rd-accent-deep);transition:.15s;}
.people-lens .iconbtn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;}
.people-lens .iconbtn:hover{background:var(--rd-accent-soft);border-color:var(--rd-accent-line);}
.people-lens .warn{color:var(--rd-red);display:inline-flex;}
.people-lens .warn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;}
.people-lens .ctrls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px;}
.people-lens .search{flex:1;min-width:180px;display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--rd-line);border-radius:10px;padding:0 12px;height:40px;}
.people-lens .search svg{width:15px;height:15px;stroke:var(--rd-muted);fill:none;stroke-width:1.8;flex:none;}
.people-lens .search input{flex:1;min-width:0;border:0;outline:0;background:none;font:inherit;font-size:0.88rem;color:var(--rd-ink);}
.people-lens .search:focus-within{border-color:var(--rd-accent);box-shadow:0 0 0 3px var(--rd-accent-soft);}
.people-lens .segmini{display:inline-flex;background:#fff;border:1px solid var(--rd-line);border-radius:9px;padding:3px;}
.people-lens .segmini span.l{font-size:0.66rem;color:var(--rd-faint);font-weight:700;text-transform:uppercase;letter-spacing:.05em;padding:6px 4px 6px 8px;align-self:center;}
.people-lens .segmini button{font:inherit;font-size:0.76rem;font-weight:600;cursor:pointer;border:0;background:none;color:var(--rd-muted);border-radius:7px;padding:6px 11px;}
.people-lens .segmini button.on{background:var(--rd-chrome);color:var(--rd-accent-hi);}
.people-lens .chips{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px;}
body[data-view="mobile"] .people-lens .chips,body[data-view="mobile"] .people-lens .chips{flex-wrap:nowrap;overflow-x:auto;}
.people-lens .chip{font:inherit;font-size:0.77rem;font-weight:600;cursor:pointer;background:#fff;border:1px solid var(--rd-line);border-radius:999px;padding:6px 12px;color:var(--rd-ink);white-space:nowrap;display:inline-flex;align-items:center;gap:6px;}
.people-lens .chip .n{font-size:0.68rem;color:var(--rd-muted);font-weight:700;}
.people-lens .chip.on{background:var(--rd-chrome);color:var(--rd-accent-hi);border-color:var(--rd-chrome);}
.people-lens .chip.on .n{color:var(--rd-on-chrome-muted);}
.people-lens .chip.attn{color:var(--rd-red);border-color:rgba(192,57,43,.25);}
.people-lens .chip.attn .n{color:var(--rd-red);}
.people-lens .list{background:#fff;border:1px solid var(--rd-line);border-radius:14px;overflow:hidden;}
.people-lens .row{display:flex;align-items:center;gap:13px;padding:12px 15px;border-bottom:1px solid var(--rd-line);}
.people-lens .row:last-child{border-bottom:0;}
.people-lens .row:hover{background:var(--rd-card-2);}
.people-lens .row .who{flex:1;min-width:0;}
.people-lens .row .who .top{display:flex;align-items:center;gap:9px;}
.people-lens .row .who .sub{font-size:0.76rem;color:var(--rd-muted);margin-top:2px;}
.people-lens .row .stagecol{flex:0 0 130px;display:flex;justify-content:center;}
.people-lens .row .acts{display:flex;gap:6px;flex:none;}
.people-lens .mcard{background:#fff;border:1px solid var(--rd-line);border-radius:12px;padding:11px 13px;margin-bottom:9px;}
.people-lens .mcard .top{display:flex;align-items:flex-start;gap:10px;}
.people-lens .mcard .info{flex:1;min-width:0;}
.people-lens .mcard .nmline{display:flex;align-items:center;gap:7px;}
.people-lens .mcard .namebtn{font-size:.92rem;}
.people-lens .mcard .meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:6px;}
.people-lens .mcard .meta .m{font-size:0.75rem;color:var(--rd-muted);}
.people-lens .mcard .macts{display:flex;gap:6px;margin-top:10px;margin-left:40px;}
.people-lens .ocwrap{overflow-x:auto;background:#fff;border:1px solid var(--rd-line);border-radius:16px;padding:22px 12px;margin-top:14px;box-shadow:0 1px 2px rgba(18,18,18,.04);}
.people-lens .tree{display:inline-block;min-width:100%;}
.people-lens .tree ul{display:flex;justify-content:center;padding-top:22px;position:relative;margin:0;list-style:none;padding-left:0;}
.people-lens .tree>ul{padding-top:0;}
.people-lens .tree li{list-style:none;position:relative;padding:22px 9px 0;text-align:center;}
.people-lens .tree li::before,.people-lens .tree li::after{content:'';position:absolute;top:0;right:50%;border-top:2px solid var(--rd-accent-line);width:50%;height:22px;}
.people-lens .tree li::after{right:auto;left:50%;border-left:2px solid var(--rd-accent-line);}
.people-lens .tree li:only-child::after,.people-lens .tree li:only-child::before{display:none;}
.people-lens .tree li:only-child{padding-top:0;}
.people-lens .tree li:first-child::before,.people-lens .tree li:last-child::after{border:0 none;}
.people-lens .tree li:last-child::before{border-right:2px solid var(--rd-accent-line);border-radius:0 7px 0 0;}
.people-lens .tree li:first-child::after{border-radius:7px 0 0 0;}
.people-lens .tree ul ul::before{content:'';position:absolute;top:0;left:50%;border-left:2px solid var(--rd-accent-line);width:0;height:22px;}
.people-lens .ocnode{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:132px;max-width:172px;padding:10px 12px;border-radius:12px;border:1px solid var(--rd-line);background:#fff;position:relative;box-shadow:0 3px 10px rgba(14,15,16,.08);text-align:left;transition:transform .12s,box-shadow .12s;cursor:pointer;}
.people-lens .ocnode:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(14,15,16,.14);}
.people-lens .ocnode.root{background:linear-gradient(160deg,var(--rd-ink-2),var(--rd-chrome));border-color:var(--rd-chrome);box-shadow:0 9px 24px rgba(14,15,16,.3);}
.people-lens .ocnode.root .ocname{color:#fff;}
.people-lens .ocnode.root .ocsub{color:var(--rd-on-chrome-muted);}
.people-lens .ocnode.t1{background:var(--rd-accent-soft);border-color:var(--rd-accent-line);}
.people-lens .ocnode.t2{background:var(--rd-card-2);}
.people-lens .ocname{font-size:0.84rem;font-weight:700;color:var(--rd-ink);line-height:1.2;}
.people-lens .ocsub{font-size:0.68rem;color:var(--rd-muted);}
.people-lens .ocroll{display:flex;height:5px;width:100%;border-radius:3px;overflow:hidden;margin-top:6px;background:var(--rd-card-3);}
.people-lens .ocroll i{height:100%;}
.people-lens .ocnode.root .ocroll{background:rgba(255,255,255,.14);}
.people-lens .ocb{position:absolute;top:-9px;right:-9px;font-size:0.65rem;font-weight:800;color:var(--rd-on-accent);background:linear-gradient(180deg,var(--rd-accent-hi),var(--rd-accent));border-radius:999px;padding:2px 8px;box-shadow:0 2px 7px color-mix(in srgb, var(--rd-accent), transparent 60%);border:1.5px solid #fff;}
.people-lens .ocmore{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:96px;min-height:66px;padding:10px 14px;border-radius:12px;border:1.5px dashed var(--rd-accent-line);background:var(--rd-accent-soft);color:var(--rd-accent-deep);font:inherit;font-weight:700;font-size:1rem;cursor:pointer;}
.people-lens .ocmore b{font-size:1.15rem;}
.people-lens .ocmore span{font-size:.58rem;font-weight:700;color:var(--rd-muted);text-transform:uppercase;letter-spacing:.04em;margin-top:2px;}
.people-lens .ocmore:hover{border-color:var(--rd-accent);background:color-mix(in srgb,var(--rd-accent),transparent 82%);}
.people-lens .occtl{display:flex;align-items:center;gap:10px;margin:14px 0 8px;flex-wrap:wrap;}
.people-lens .ocbtn{font:inherit;font-size:.78rem;font-weight:700;cursor:pointer;color:var(--rd-accent-deep);background:#fff;border:1px solid var(--rd-accent-line);border-radius:8px;padding:7px 11px;display:inline-flex;align-items:center;gap:5px;}
.people-lens .ocbtn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;}
.people-lens .ocbtn:hover{background:var(--rd-accent-soft);}
.people-lens .occ-hint{font-size:.72rem;color:var(--rd-faint);}
.people-lens .ocz{font:inherit;font-size:.85rem;font-weight:700;cursor:pointer;color:var(--rd-ink);background:#fff;border:1px solid var(--rd-line);border-radius:8px;padding:6px 12px;min-width:36px;}
.people-lens .ocz:hover{border-color:var(--rd-accent);}
.people-lens .ocbread{display:flex;align-items:center;gap:5px;font-size:.78rem;margin-bottom:10px;flex-wrap:wrap;}
.people-lens .ocbread button{font:inherit;font-size:.78rem;font-weight:600;color:var(--rd-accent-deep);background:none;border:0;cursor:pointer;padding:0;}
.people-lens .ocbread button.cur{color:var(--rd-ink);cursor:default;}
.people-lens .ocbread .sep{color:var(--rd-faint);}
.people-lens .ocviewport{overflow:auto;cursor:grab;background:#fff;border:1px solid var(--rd-line);border-radius:16px;padding:22px 12px;box-shadow:0 1px 2px rgba(18,18,18,.04);max-height:530px;}
.people-lens .ocviewport:active{cursor:grabbing;}
.people-lens .troll{display:flex;height:6px;width:120px;border-radius:3px;overflow:hidden;flex:none;background:var(--rd-card-3);}
.people-lens .troll i{height:100%;}
.people-lens .tlegend{display:flex;gap:14px;flex-wrap:wrap;margin:12px 2px 0;font-size:0.72rem;color:var(--rd-muted);align-items:center;}
.people-lens .tlegend span{display:inline-flex;align-items:center;gap:6px;}
.people-lens .tlegend i{width:9px;height:9px;border-radius:2px;}
.people-lens .tback{font:inherit;font-size:0.8rem;font-weight:700;cursor:pointer;color:var(--rd-accent-deep);background:#fff;border:1px solid var(--rd-accent-line);border-radius:9px;padding:8px 12px;display:inline-flex;align-items:center;gap:6px;margin-bottom:11px;}
.people-lens .tback svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;}
.people-lens .tback:hover{background:var(--rd-accent-soft);}
.people-lens .uplinechip{display:flex;align-items:center;gap:10px;width:100%;text-align:left;font:inherit;background:var(--rd-chrome);color:var(--rd-on-chrome);border:0;border-radius:10px;padding:10px 13px;margin-bottom:11px;cursor:pointer;}
.people-lens .uplinechip:hover{filter:brightness(1.15);}
.people-lens .uplinechip>svg{width:16px;height:16px;stroke:var(--rd-accent-hi);fill:none;stroke-width:2;flex:none;}
.people-lens .uptop{display:flex;align-items:center;gap:8px;font-size:0.76rem;color:var(--rd-faint);font-weight:600;margin-bottom:11px;padding:2px 2px;}
.people-lens .uptop svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;opacity:.6;}
.people-lens .uplinechip .ul-t{flex:1;font-size:0.82rem;font-weight:600;color:var(--rd-on-chrome);}
.people-lens .uplinechip .ul-l{display:block;font-size:0.58rem;letter-spacing:.08em;text-transform:uppercase;color:var(--rd-accent-hi);font-weight:800;}
.people-lens .uplinechip .ul-go{color:var(--rd-on-chrome-muted);display:flex;}
.people-lens .uplinechip .ul-go svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;}
.people-lens .crumb{display:flex;align-items:center;gap:5px;font-size:0.76rem;color:var(--rd-muted);margin-bottom:11px;flex-wrap:wrap;}
.people-lens .crumb button{font:inherit;font-size:0.76rem;font-weight:600;color:var(--rd-accent-deep);background:none;border:0;cursor:pointer;padding:0;}
.people-lens .crumb button.cur{color:var(--rd-ink);font-weight:700;cursor:default;}
.people-lens .crumb .sep{color:var(--rd-faint);}
.people-lens .drillhead{background:#fff;border:1px solid var(--rd-accent-line);border-radius:12px;padding:12px 13px;display:flex;align-items:center;gap:11px;margin-bottom:6px;}
.people-lens .drillhead .info{flex:1;}
.people-lens .drillhead .nm{font-size:0.98rem;font-weight:800;color:var(--rd-ink);}
.people-lens .drillhead .mt{font-size:0.74rem;color:var(--rd-muted);margin-top:2px;}
.people-lens .drow{background:#fff;border:1px solid var(--rd-line);border-radius:11px;padding:11px 13px;margin-bottom:8px;display:flex;align-items:center;gap:11px;cursor:pointer;}
.people-lens .drow:hover{border-color:var(--rd-accent-line);background:var(--rd-card-2);}
.people-lens .drow .info{flex:1;min-width:0;}
.people-lens .drow .nm{font-size:0.87rem;font-weight:600;color:var(--rd-ink);}
.people-lens .drow .mt{font-size:0.73rem;color:var(--rd-muted);margin-top:1px;}
.people-lens .drow .go{color:var(--rd-faint);flex:none;}
.people-lens .drow .go svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;}
.people-lens .drow.leaf{cursor:default;background:var(--rd-card-2);}
.people-lens .drow.leaf:hover{border-color:var(--rd-line);}
.people-lens .dlabel{font-size:.62rem;letter-spacing:.1em;text-transform:uppercase;color:var(--rd-faint);font-weight:800;margin:14px 2px 7px;}
.people-lens .drow .info{align-self:center;}
.people-lens .actbar{display:flex;flex-direction:column;gap:10px;margin-bottom:13px;}
/* Activity toolbar. Desktop: the top row holds only the log pencil, pushed to
   the right (where the time pill sat); the time pill lives in the filters row.
   Mobile: the time pill moves up to the top row with the pencil immediately to
   its left. The pill is rendered in both slots; CSS shows the right one. */
.people-lens .act-toprow{display:flex;align-items:center;gap:8px;}
.people-lens .tf-slot-mobile{display:none;}
.people-lens .tf-slot-desktop{display:inline-flex;}
body[data-view="mobile"] .people-lens .tf-slot-mobile{display:inline-flex;}
body[data-view="mobile"] .people-lens .tf-slot-desktop{display:none;}
.people-lens .actfilters{display:flex;gap:8px;align-items:center;}
/* Only the type chips scroll horizontally; the Time filter + Automated stay
   locked beside the search (override #5). The last chip (Note) is revealed by
   scrolling the chip region, not hidden behind the Automated button. */
.people-lens .actchips{display:flex;gap:8px;align-items:center;flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-bottom:1px;}
.people-lens .actchips::-webkit-scrollbar{display:none;}
.people-lens .actlock{display:flex;gap:8px;align-items:center;flex:0 0 auto;}
.people-lens .dropdown{font:inherit;font-size:0.77rem;font-weight:600;color:var(--rd-ink);background:#fff;border:1px solid var(--rd-line);border-radius:999px;padding:6px 11px;cursor:pointer;}
.people-lens .checkline{display:inline-flex;align-items:center;gap:8px;font-size:0.8rem;color:var(--rd-ink);font-weight:600;cursor:pointer;white-space:nowrap;}
.people-lens .checkline input{width:16px;height:16px;accent-color:var(--rd-accent-deep);}
.people-lens .chip svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;flex:none;}
.people-lens .dropdown:hover{border-color:var(--rd-accent);}
body[data-view="mobile"] .people-lens .actsp,body[data-view="mobile"] .people-lens .actsp{display:none;}
.people-lens .actbar{gap:0!important;}
.people-lens .tf{position:relative;display:inline-block;}
.people-lens .tf-btn{font:inherit;font-size:0.77rem;font-weight:700;color:var(--rd-ink);background:#fff;border:1px solid var(--rd-line);border-radius:999px;padding:7px 13px;cursor:pointer;white-space:nowrap;}
.people-lens .tf-btn:hover{border-color:var(--rd-accent);}
.people-lens .tf-pop{position:absolute;right:0;top:calc(100% + 6px);z-index:90;background:#fff;border:1px solid var(--rd-line);border-radius:12px;box-shadow:0 16px 40px rgba(14,15,16,.24);padding:7px;width:186px;animation:pop .13s ease-out;}
@keyframes pop{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
.people-lens .tf-opt{display:block;width:100%;text-align:left;font:inherit;font-size:0.82rem;font-weight:600;color:var(--rd-ink);background:none;border:0;border-radius:7px;padding:8px 10px;cursor:pointer;}
.people-lens .tf-opt:hover{background:var(--rd-accent-soft);color:var(--rd-accent-deep);}
.people-lens .tf-opt.on{background:var(--rd-chrome);color:var(--rd-accent-hi);}
.people-lens .tf-lbl{font-size:0.58rem;letter-spacing:.09em;text-transform:uppercase;color:var(--rd-faint);font-weight:800;padding:9px 8px 4px;}
.people-lens .tf-qrow{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;padding:0 4px;}
.people-lens .tf-q{font:inherit;font-size:0.76rem;font-weight:700;color:var(--rd-ink);background:var(--rd-card-3);border:1px solid var(--rd-line);border-radius:7px;padding:6px 0;cursor:pointer;}
.people-lens .tf-q:hover{border-color:var(--rd-accent);}
.people-lens .tf-q.on{background:var(--rd-chrome);color:var(--rd-accent-hi);border-color:var(--rd-chrome);}
.people-lens .acard{background:#fff;border:1px solid var(--rd-line);border-radius:12px;padding:12px 14px;margin-bottom:9px;border-left:3px solid var(--rd-grey);}
.people-lens .acard.call{border-left-color:var(--rd-green);}
.people-lens .acard.text{border-left-color:var(--rd-blue);}
.people-lens .acard.email{border-left-color:var(--rd-amber);}
.people-lens .acard.appt{border-left-color:var(--rd-accent);}
.people-lens .acard .ah{display:flex;align-items:center;gap:9px;}
.people-lens .acard .aty{font-size:0.66rem;letter-spacing:.06em;text-transform:uppercase;font-weight:800;}
.people-lens .acard .at{font-size:0.72rem;color:var(--rd-faint);margin-left:auto;flex:none;}
.people-lens .acard .autotag{font-size:0.58rem;letter-spacing:.06em;text-transform:uppercase;font-weight:800;color:var(--rd-muted);background:var(--rd-card-3);border:1px solid var(--rd-line);border-radius:5px;padding:1px 6px;}
.people-lens .acard .as{font-size:0.84rem;color:var(--rd-ink);margin-top:7px;line-height:1.5;}
.people-lens .emptyact{text-align:center;color:var(--rd-faint);font-style:italic;font-size:0.85rem;padding:26px;}
.people-lens .reroot{background:#fff;border:1px dashed var(--rd-accent-line);border-radius:14px;padding:26px 24px;text-align:center;color:var(--rd-muted);font-size:0.9rem;line-height:1.6;}
.people-lens .reroot b{color:var(--rd-ink);}
.people-lens .reroot .ic{font-size:1.4rem;margin-bottom:8px;}
.people-lens .ftool{display:flex;align-items:center;gap:12px;margin:14px 0 14px;flex-wrap:wrap;}
.people-lens .fvel{font-size:.75rem;color:var(--rd-green);font-weight:700;display:inline-flex;align-items:center;gap:6px;}
.people-lens .fvel svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;}
.people-lens .bulkbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;background:var(--rd-chrome);border-radius:12px;padding:9px 12px;margin-bottom:12px;color:var(--rd-on-chrome);font-size:.82rem;}
.people-lens .bulkbar .bb-count{font-weight:800;white-space:nowrap;}
.people-lens .bulkbar .bb-sp{flex:1;min-width:8px;}
.people-lens .bulkbar .bb-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.people-lens .bulkbar .btn2{font:inherit;font-size:.77rem;font-weight:700;cursor:pointer;background:rgba(255,255,255,.08);border:1px solid var(--rd-line-d);color:var(--rd-on-chrome);border-radius:8px;padding:7px 11px;white-space:nowrap;}
.people-lens .bulkbar .btn2.gold{background:linear-gradient(180deg,var(--rd-accent-hi),var(--rd-accent));color:var(--rd-on-accent);border:0;}
/* Bug 1 — narrow phones: the controls WRAP inside the black bar instead of
   spilling past its rounded edge. The spacer collapses to a line break, the
   label sits on its own line, and the action buttons share a full-width row at
   a >=44px tap size. Desktop (>620px) is unchanged. */
@media (max-width:620px){
  .people-lens .bulkbar{gap:8px;padding:10px 12px;}
  .people-lens .bulkbar .bb-sp{flex-basis:100%;min-width:0;height:0;}
  .people-lens .bulkbar .bb-actions{width:100%;}
  .people-lens .bulkbar .bb-actions .btn2{flex:1 1 auto;min-height:44px;padding:11px 12px;font-size:.8rem;}
}
/* ── Bulk-action modals (Bug 2 Move · Bug 3 Message) — one premium surface ──
   The pipeline funnel's own injectPipelineFunnelStyles() is disabled, so these
   live here in the always-loaded sheet. Dialogs mount on <body>, so selectors
   are unscoped (not under .people-lens). */
.eb-bulk-dialog{border:0;padding:0;background:transparent;max-width:min(680px,94vw);width:min(680px,94vw);color:var(--rd-ink);}
/* The [hidden] attribute must beat the flex/grid display rules below (author
   display wins over the UA [hidden] rule otherwise), so mode toggles work. */
.eb-bulk-dialog [hidden]{display:none !important;}
.eb-bulk-dialog::backdrop{background:rgba(14,15,16,.52);backdrop-filter:blur(2px);}
.ebm-card{background:var(--rd-paper,#fff);border:1px solid var(--rd-line);border-radius:18px;box-shadow:0 24px 64px rgba(14,15,16,.34);overflow:hidden;font-family:inherit;}
.ebm-head{display:flex;align-items:flex-start;gap:14px;padding:20px 22px 14px;}
.ebm-title{margin:0;font-size:1.12rem;font-weight:800;letter-spacing:-.01em;color:var(--rd-ink);}
.ebm-sub{margin:4px 0 0;font-size:.8rem;line-height:1.45;color:var(--rd-muted);max-width:44ch;}
.ebm-x{margin-left:auto;flex:none;width:32px;height:32px;border-radius:9px;border:1px solid var(--rd-line);background:var(--rd-card-2,#f6f5f2);color:var(--rd-muted);font-size:20px;line-height:1;cursor:pointer;}
.ebm-x:hover{color:var(--rd-ink);border-color:var(--rd-accent);}
.ebm-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px;border-top:1px solid var(--rd-line-2,#eee);background:var(--rd-card-3,#faf9f7);}
.ebm-btn{font:inherit;font-size:.85rem;font-weight:700;cursor:pointer;border-radius:10px;padding:11px 18px;min-height:44px;border:1px solid var(--rd-line-d,#d8d4cc);background:#fff;color:var(--rd-ink);}
.ebm-btn.ghost:hover{border-color:var(--rd-accent);}
.ebm-btn.primary{color:var(--rd-on-accent);background:linear-gradient(180deg,var(--rd-accent-hi),var(--rd-accent));border:0;}
.ebm-btn.primary:hover{filter:brightness(1.05);}
.ebm-btn.primary:disabled{opacity:.5;cursor:default;filter:none;}
/* Move modal — stage radio list. */
.ebm-stagelist{max-height:min(52vh,420px);overflow-y:auto;padding:4px 14px 8px;display:flex;flex-direction:column;gap:4px;}
.ebm-stage-opt{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--rd-line-2,#eee);border-radius:11px;cursor:pointer;background:#fff;transition:border-color .12s,background .12s;}
.ebm-stage-opt:hover{border-color:var(--rd-accent-line,#e5d9b8);background:var(--rd-accent-soft);}
.ebm-stage-opt input{accent-color:var(--rd-accent-deep);width:18px;height:18px;margin:0;cursor:pointer;}
.ebm-stage-opt:has(input:checked){border-color:var(--rd-accent);background:var(--rd-accent-soft);box-shadow:inset 0 0 0 1px var(--rd-accent);}
.ebm-stage-name{font-size:.9rem;font-weight:600;color:var(--rd-ink);}
.ebm-stage-dot{margin-left:auto;}
/* Message modal — split compose | preview. */
.ebm-seg{display:inline-flex;margin:0 22px 4px;padding:4px;gap:4px;background:var(--rd-card-3,#f1efea);border-radius:11px;}
.ebm-seg-btn{font:inherit;font-size:.82rem;font-weight:700;cursor:pointer;border:0;background:none;color:var(--rd-muted);border-radius:8px;padding:8px 18px;min-height:38px;}
.ebm-seg-btn.is-on{background:#fff;color:var(--rd-ink);box-shadow:0 1px 3px rgba(14,15,16,.14);}
.ebm-seg-btn:disabled{opacity:.5;cursor:not-allowed;}
.ebm-lock{font-size:.58rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;background:var(--rd-line-2,#e8e6e0);color:var(--rd-faint);border-radius:5px;padding:1px 5px;margin-left:5px;}
.ebm-gatehint{margin:0 22px 6px;font-size:.74rem;color:var(--rd-faint);}
.ebm-body{display:grid;grid-template-columns:1fr 1fr;gap:0;border-top:1px solid var(--rd-line-2,#eee);}
.ebm-compose{padding:16px 20px;display:flex;flex-direction:column;gap:13px;min-width:0;}
.ebm-field{display:flex;flex-direction:column;gap:5px;min-width:0;}
.ebm-lbl{font-size:.62rem;letter-spacing:.07em;text-transform:uppercase;color:var(--rd-faint);font-weight:800;}
.ebm-select,.ebm-input,.ebm-textarea{font:inherit;font-size:.86rem;color:var(--rd-ink);background:#fff;border:1px solid var(--rd-line-d,#d8d4cc);border-radius:9px;padding:10px 11px;width:100%;box-sizing:border-box;}
.ebm-textarea{resize:vertical;line-height:1.5;min-height:120px;}
.ebm-select:focus,.ebm-input:focus,.ebm-textarea:focus{outline:0;border-color:var(--rd-accent);box-shadow:0 0 0 3px var(--rd-accent-soft);}
.ebm-note{margin:0;font-size:.76rem;line-height:1.45;color:var(--rd-muted);background:var(--rd-accent-soft);border:1px solid var(--rd-accent-line,#e5d9b8);border-radius:9px;padding:9px 11px;}
.ebm-preview-wrap{padding:16px 20px;background:var(--rd-card-3,#f6f5f2);border-left:1px solid var(--rd-line-2,#eee);display:flex;flex-direction:column;gap:9px;min-width:0;}
.ebm-preview-label{font-size:.62rem;letter-spacing:.07em;text-transform:uppercase;color:var(--rd-faint);font-weight:800;}
.ebm-preview{flex:1;overflow-y:auto;max-height:min(50vh,380px);}
.ebm-empty{color:var(--rd-faint);font-size:.82rem;font-style:italic;padding:18px 4px;text-align:center;}
/* SMS bubble preview. */
.ebm-sms{display:flex;flex-direction:column;align-items:flex-end;gap:5px;padding:8px 2px;}
.ebm-bubble{max-width:80%;background:linear-gradient(180deg,#34c759,#28a745);color:#fff;font-size:.9rem;line-height:1.42;padding:10px 14px;border-radius:19px 19px 5px 19px;box-shadow:0 2px 8px rgba(40,167,69,.32);word-break:break-word;}
.ebm-sms-meta{font-size:.62rem;color:var(--rd-faint);font-weight:700;}
/* Rendered email preview (mobile-width card). */
.ebm-mail{background:#fff;border:1px solid var(--rd-line-2,#eee);border-radius:12px;overflow:hidden;max-width:360px;margin:0 auto;box-shadow:0 3px 12px rgba(14,15,16,.1);}
.ebm-mail-subj{font-weight:800;font-size:.88rem;color:var(--rd-ink);padding:12px 14px;border-bottom:1px solid var(--rd-line-2,#eee);background:var(--rd-card-2,#faf9f7);}
.ebm-mail-body{padding:14px;font-size:.86rem;line-height:1.55;color:var(--rd-ink);word-break:break-word;}
.ebm-mail-body img{max-width:100%;height:auto;}
@media (max-width:620px){
  .ebm-body{grid-template-columns:1fr;}
  .ebm-preview-wrap{border-left:0;border-top:1px solid var(--rd-line-2,#eee);}
  .ebm-preview{max-height:230px;}
  .ebm-seg{display:flex;}
  .ebm-seg-btn{flex:1;}
}
/* The #pipelineBoard element still carries the retired kanban's `.pipeline-board`
   class (display:flex;flex-wrap:nowrap;overflow-x:auto), which laid the funnel's
   header / tool row / bulk bar / stack out as a squished horizontal row and let
   the dark bars stretch into a tall black box on expand. The By-stage funnel is a
   normal vertical document, so cancel that layout when it hosts the funnel. */
.pipeline-board.people-lens{display:block;flex-wrap:initial;overflow:visible;align-items:initial;padding:0 0 16px;}
.people-lens .funnel{display:flex;flex-direction:column;gap:3px;}
.people-lens .fstage{border-radius:10px;overflow:hidden;}
.people-lens .fstage-h{display:flex;align-items:center;gap:12px;padding:5px 4px;cursor:pointer;border-radius:9px;}
.people-lens .fstage-h:hover{background:var(--rd-card-2);}
.people-lens .fs-chev{flex:none;color:var(--rd-faint);width:14px;display:flex;}
.people-lens .fs-chev svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;transition:transform .16s;}
.people-lens .fstage.open .fs-chev svg{transform:rotate(90deg);}
.people-lens .fs-name{flex:0 0 150px;text-align:right;font-weight:700;font-size:.83rem;color:var(--rd-ink);line-height:1.2;}
body[data-view="mobile"] .people-lens .fs-name,body[data-view="mobile"] .people-lens .fs-name{flex-basis:88px;font-size:.72rem;}
.people-lens .fs-track{flex:1;display:flex;justify-content:center;min-width:60px;}
.people-lens .fs-bar{height:38px;border-radius:9px;background:linear-gradient(180deg,var(--rd-ink-2),var(--rd-chrome));display:flex;align-items:center;justify-content:flex-end;padding:0 14px;min-width:56px;box-shadow:0 2px 7px rgba(14,15,16,.16);transition:filter .15s;}
.people-lens .fstage-h:hover .fs-bar{filter:brightness(1.14);}
.people-lens .fs-bar .cnt{font-size:1.08rem;font-weight:800;color:var(--rd-accent-hi);font-variant-numeric:tabular-nums;letter-spacing:-.01em;}
.people-lens .fs-bar.jam{background:linear-gradient(180deg,var(--rd-accent-hi),var(--rd-accent));box-shadow:0 3px 14px color-mix(in srgb, var(--rd-accent), transparent 60%);}
.people-lens .fs-bar.jam .cnt{color:var(--rd-on-accent);}
.people-lens .fs-bar.terminal{background:#fff;border:1.5px solid var(--rd-accent);box-shadow:none;justify-content:center;}
.people-lens .fs-bar.terminal .cnt{color:var(--rd-accent-deep);}
.people-lens .fs-meta{flex:0 0 138px;font-size:.71rem;color:var(--rd-muted);display:flex;align-items:center;gap:7px;}
.people-lens .fs-meta b{color:var(--rd-ink);font-weight:700;}
body[data-view="mobile"] .people-lens .fs-meta,body[data-view="mobile"] .people-lens .fs-meta{display:none;}
.people-lens .fs-jam{font-size:.54rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--rd-amber);background:rgba(183,121,31,.14);border:1px solid rgba(183,121,31,.34);border-radius:5px;padding:2px 6px;}
.people-lens .fbody{padding:6px 8px 12px;}
.people-lens .fstage:not(.open) .fbody{display:none;}
.people-lens .fbody-h{font-size:.63rem;letter-spacing:.08em;text-transform:uppercase;color:var(--rd-faint);font-weight:800;padding:5px 4px 8px;}
.people-lens .frow{display:grid;grid-template-columns:18px 20px 60px minmax(0,1fr) auto auto;align-items:center;gap:11px;padding:9px 11px;background:var(--rd-card-2);border:1px solid var(--rd-line-2);border-radius:9px;margin-bottom:5px;}
.people-lens .frow.sel{border-color:var(--rd-accent);background:var(--rd-accent-soft);}
.people-lens .fchk{width:16px;height:16px;accent-color:var(--rd-accent-deep);margin:0;}
.people-lens .fstar{background:none;border:0;cursor:pointer;color:#cfc8b6;display:flex;padding:0;justify-self:center;}
.people-lens .fstar svg{width:15px;height:15px;stroke:currentColor;fill:var(--rd-accent);fill-opacity:0;stroke-width:1.7;}
.people-lens .fstar.on svg{fill-opacity:1;color:var(--rd-accent);}
.people-lens .cadge{font-size:.55rem;font-weight:800;text-transform:uppercase;letter-spacing:.03em;border-radius:5px;padding:3px 0;text-align:center;}
.people-lens .cadge.breach{color:var(--rd-red);background:rgba(192,57,43,.1);}
.people-lens .cadge.danger{color:var(--rd-amber);background:rgba(183,121,31,.12);}
.people-lens .cadge.new{color:var(--rd-blue);background:rgba(60,110,121,.12);}
.people-lens .cadge.ok{color:var(--rd-green);background:rgba(47,133,88,.12);}
.people-lens .fname{display:flex;align-items:center;gap:7px;min-width:0;}
.people-lens .fname .namebtn{font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.people-lens .fmk{font-size:.82rem;flex:none;letter-spacing:2px;}
.people-lens .ffield{font-size:.74rem;color:var(--rd-muted);white-space:nowrap;text-align:right;}
.people-lens .fadv{font:inherit;font-size:.72rem;font-weight:700;cursor:pointer;color:var(--rd-on-accent);background:linear-gradient(180deg,var(--rd-accent-hi),var(--rd-accent));border:0;border-radius:7px;padding:6px 11px;display:inline-flex;align-items:center;gap:4px;white-space:nowrap;}
.people-lens .fadv svg{width:12px;height:12px;stroke:var(--rd-on-accent);fill:none;stroke-width:2.4;}
.people-lens .fmore{width:100%;text-align:center;font:inherit;font-size:.78rem;font-weight:700;color:var(--rd-accent-deep);background:#fff;border:1px dashed var(--rd-accent-line);border-radius:9px;padding:10px;cursor:pointer;margin-top:2px;}
.people-lens .fmore:hover{background:var(--rd-accent-soft);}
.people-lens .tflabel{font-size:.66rem;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-faint);font-weight:800;align-self:center;}
body[data-view="mobile"] .people-lens .fs-name,body[data-view="mobile"] .people-lens .fs-name{flex:0 0 86px;text-align:left;font-size:.78rem;line-height:1.15;}
body[data-view="mobile"] .people-lens .fs-meta,body[data-view="mobile"] .people-lens .fs-meta{display:none;}
body[data-view="mobile"] .people-lens .frow,body[data-view="mobile"] .people-lens .frow{grid-template-columns:18px 20px minmax(0,1fr) auto;grid-template-areas:"chk star name adv" "cad cad field field";row-gap:8px;column-gap:9px;}
body[data-view="mobile"] .people-lens .fchk,body[data-view="mobile"] .people-lens .fchk{grid-area:chk;}
body[data-view="mobile"] .people-lens .fstar,body[data-view="mobile"] .people-lens .fstar{grid-area:star;justify-self:start;}
body[data-view="mobile"] .people-lens .fname,body[data-view="mobile"] .people-lens .fname{grid-area:name;}
body[data-view="mobile"] .people-lens .fadv,body[data-view="mobile"] .people-lens .fadv{grid-area:adv;}
body[data-view="mobile"] .people-lens .cadge,body[data-view="mobile"] .people-lens .cadge{grid-area:cad;justify-self:start;padding:3px 9px;}
body[data-view="mobile"] .people-lens .ffield,body[data-view="mobile"] .people-lens .ffield{grid-area:field;text-align:right;}
.people-lens .qkpi{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:14px 0;}
body[data-view="mobile"] .people-lens .qkpi,body[data-view="mobile"] .people-lens .qkpi{grid-template-columns:1fr 1fr;}
.people-lens .kpi{background:#fff;border:1px solid var(--rd-line);border-radius:12px;padding:12px 13px;cursor:pointer;transition:.15s;}
.people-lens .kpi:hover{border-color:var(--rd-accent-line);}
.people-lens .kpi.on{border-color:var(--rd-accent);box-shadow:0 0 0 3px var(--rd-accent-soft);}
.people-lens .kpi .k{font-size:.63rem;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-muted);font-weight:700;}
.people-lens .kpi .v{font-size:1.5rem;font-weight:800;color:var(--rd-ink);font-variant-numeric:tabular-nums;margin-top:5px;}
body[data-view="mobile"] .people-lens .kpi .v,body[data-view="mobile"] .people-lens .kpi .v{font-size:1.3rem;}
.people-lens .kpi.danger{background:linear-gradient(180deg,rgba(192,57,43,.07),rgba(192,57,43,.02));border-color:rgba(192,57,43,.24);}
.people-lens .kpi.danger .k{color:var(--rd-red);}
.people-lens .kpi.danger .v{color:var(--rd-red);}
.people-lens .kpi.success{background:linear-gradient(180deg,rgba(47,133,88,.08),rgba(47,133,88,.02));border-color:rgba(47,133,88,.26);}
.people-lens .kpi.success .k{color:var(--rd-green);}
.people-lens .kpi.success .v{color:var(--rd-green);}
.people-lens .kpi.static{cursor:default;background:var(--rd-card-2);}
.people-lens .kpi.span2{grid-column:1/-1;}
.people-lens .qfilters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px;}
body[data-view="mobile"] .people-lens .qfilters,body[data-view="mobile"] .people-lens .qfilters{flex-wrap:nowrap;overflow-x:auto;}
.people-lens .qkey{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:center;background:var(--rd-card-2);border:1px solid var(--rd-line);border-radius:10px;padding:9px 13px;margin-bottom:13px;font-size:.73rem;color:var(--rd-muted);}
.people-lens .qkey-l{font-size:.6rem;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:var(--rd-faint);}
.people-lens .qk{display:inline-flex;align-items:center;gap:6px;}
.people-lens .qk i{width:11px;height:11px;border-radius:3px;flex:none;}
.people-lens .qcard{background:#fff;border:1px solid var(--rd-line);border-radius:13px;padding:14px 15px;margin-bottom:10px;border-left:3px solid var(--rd-grey);}
.people-lens .qcard{border-left-color:var(--rd-line);}
.people-lens .qcard.stalled{border-left-color:var(--rd-red);}
.people-lens .qcard.ready{border-left-color:var(--rd-green);}
.people-lens .qhead{display:flex;align-items:center;gap:10px;}
.people-lens .qhead .stagepill{margin-left:auto;font-size:.64rem;font-weight:700;background:var(--rd-chrome);color:var(--rd-accent-hi);border-radius:999px;padding:3px 10px;white-space:nowrap;}
.people-lens .qmeta{font-size:.74rem;color:var(--rd-muted);margin:8px 0 9px;}
.people-lens .qtags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px;}
.people-lens .qtag{font-size:.67rem;font-weight:700;border-radius:999px;padding:3px 9px;}
.people-lens .qtag.stalled{color:var(--rd-red);background:rgba(192,57,43,.1);}
.people-lens .qtag.ready{color:var(--rd-green);background:rgba(47,133,88,.12);}
.people-lens .qtag.inprogress{color:var(--rd-amber);background:rgba(183,121,31,.12);}
.people-lens .qtag.notstarted{color:var(--rd-muted);background:var(--rd-card-3);}
.people-lens .qtag.idle{color:var(--rd-muted);background:var(--rd-card-3);}
.people-lens .qtag.score{color:var(--rd-accent-deep);background:var(--rd-accent-soft);}
.people-lens .qbw{margin-bottom:10px;}
.people-lens .qbl{display:flex;justify-content:space-between;font-size:.72rem;color:var(--rd-muted);margin-bottom:4px;}
.people-lens .qbl b{color:var(--rd-ink);}
.people-lens .qbar{height:7px;border-radius:4px;background:var(--rd-card-3);overflow:hidden;display:flex;}
.people-lens .qbar i{height:100%;}
.people-lens .qfoot{display:flex;align-items:center;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid var(--rd-line);flex-wrap:wrap;}
.people-lens .qbtn{font:inherit;font-size:.8rem;font-weight:700;cursor:pointer;border-radius:9px;padding:9px 14px;border:0;color:var(--rd-on-accent);background:linear-gradient(180deg,var(--rd-accent-hi),var(--rd-accent));box-shadow:0 3px 10px color-mix(in srgb, var(--rd-accent), transparent 78%);display:inline-flex;align-items:center;gap:6px;}
.people-lens .qbtn svg{width:14px;height:14px;stroke:var(--rd-on-accent);fill:none;stroke-width:2;}
.people-lens .qbtn.ghost2{background:#fff;border:1.5px solid var(--rd-accent);color:var(--rd-accent-deep);box-shadow:none;}
.people-lens .qbtn.ghost2 svg{stroke:var(--rd-accent-deep);}
.people-lens .qdet{margin-left:auto;}
.people-lens .qdet summary{list-style:none;cursor:pointer;font-size:.76rem;font-weight:700;color:var(--rd-accent-deep);display:inline-flex;align-items:center;gap:5px;}
.people-lens .qdet summary::-webkit-details-marker{display:none;}
.people-lens .qdet summary svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;transition:transform .16s;}
.people-lens .qdet[open] summary svg{transform:rotate(90deg);}
.people-lens .qdet .body{margin-top:11px;padding-top:11px;border-top:1px solid var(--rd-line-2);}
.people-lens .qweak{display:flex;gap:6px;flex-wrap:wrap;margin-top:5px;}
.people-lens .qweak .w{font-size:.7rem;font-weight:600;color:var(--rd-red);background:rgba(192,57,43,.08);border:1px solid rgba(192,57,43,.2);border-radius:6px;padding:3px 8px;}
.people-lens .qdl{font-size:.66rem;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-faint);font-weight:800;margin:11px 0 4px;}
.people-lens .qsrow{display:flex;align-items:center;gap:8px;font-size:.78rem;color:var(--rd-ink);padding:3px 0;}
.people-lens .qsrow .sc{margin-left:auto;color:var(--rd-muted);font-size:.72rem;}

/* ── Operator overrides (win over the mock) ── */
/* #3 Directory: name truncates, stage pill never collides. */
.people-lens .row .who .top{min-width:0;}
.people-lens .row .who .top .namebtn{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;}
.people-lens .mcard .nmline{min-width:0;}
.people-lens .mcard .nmline .namebtn{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* #1 Directory actions = 3 buttons only (Call/Text/Email) — enforced in markup. */
/* #5 Activity: the Note filter chip is styled like the others (already covered by .chip). */
.people-lens .acard.note{border-left-color:var(--rd-grey);}
.people-lens .acard.text{border-left-color:var(--rd-blue);}

/* The rebuilt People lenses render their own mock header (eyebrow + h1) and
   controls INSIDE their content area, so the old panel-header chrome for those
   panels is redundant — hide it. (Directory's search/sort/segment + connect now
   live in the rendered .ctrls; the pipeline segment toggle stays available via
   Settings / the rendered funnel controls.) */
#panel-contacts > .panel-header,
#panel-pipeline > .panel-header,
#panel-map > .panel-header { display:none; }
