/* Hallmark · genre: modern-minimal · app-chrome revamp: COMMAND CONSOLE (HUD)
 * theme: Hemut (ink + gold) · display: Clash Display · data: JetBrains Mono
 * pre-emit critique: P5 H5 E4 S5 R4 V5
 * styles.css — Hemut Atlas (Map v4). Mission-control language: monospace data
 * readouts, corner-bracket framing, hairline tech grids, gold signal accent.
 * Brand spine in hemut-tokens.css; tokens only, no inline values.
 */

:root {
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ctl-h: 34px;
  --radius-control: 6px;
  --radius-card: 8px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;

  --elev-1: 0 1px 2px rgba(0,0,0,.45), 0 3px 12px rgba(0,0,0,.30);
  --elev-2: 0 14px 44px rgba(0,0,0,.58), 0 2px 10px rgba(0,0,0,.42);

  --surface-1:    #15151a;
  --surface-2:    #1b1b21;
  --surface-hover:#23232b;
  --line-soft:    #26262d;

  --gold-ink:     #1a1505;
  --danger:       #EF6F6C;   /* "could not contact" red */
  --danger-deep:  #b8453f;
  --danger-dim:   rgba(239,111,108,.12);
  --followup:     #5BB3F0;   /* "awaiting follow-up" blue */
  --followup-deep:#2E7BB8;
  --followup-dim: rgba(91,179,240,.12);
  --noint:        #9AA0AA;   /* "not interested" slate (declined / dead lead) */
  --noint-deep:   #5E636C;
  --noint-dim:    rgba(154,160,170,.12);
  --hud-tick:     #4a3f17;   /* dim gold for corner brackets / ticks */
  --hud-grid:     rgba(255,255,255,.022);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#map { position: absolute; inset: 0; z-index: var(--z-map); background: #e9e9ec; }

/* HUD readout label — uppercase mono micro-caption used across the console. */
.hud-lbl {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim);
}

/* Instant gold focus ring. */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* Corner-bracket framing — the HUD signature, on non-scrolling frames. */
.gate-card, .leaflet-popup-content-wrapper, #count { position: relative; }
.gate-card::before, .gate-card::after,
.leaflet-popup-content-wrapper::before, .leaflet-popup-content-wrapper::after,
#count::before, #count::after {
  content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none; z-index: 2;
  border: 0 solid var(--gold-deep);
}
.gate-card::before, .leaflet-popup-content-wrapper::before, #count::before {
  top: -1px; left: -1px; border-top-width: 1.5px; border-left-width: 1.5px;
}
.gate-card::after, .leaflet-popup-content-wrapper::after, #count::after {
  bottom: -1px; right: -1px; border-bottom-width: 1.5px; border-right-width: 1.5px;
}

/* ============================================================
   Leaflet chrome
   ============================================================ */
.leaflet-bar a, .leaflet-bar a:hover {
  background: var(--panel); color: var(--text); border-bottom-color: var(--line);
}
.leaflet-control-attribution {
  background: rgba(8,8,10,.66) !important; color: var(--text-dim) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--gold-deep) !important; }
.leaflet-left .leaflet-control-scale { margin: 0 0 14px 14px; }
.leaflet-control-scale-line {
  background: var(--panel); color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--radius-control);
  padding: 3px 11px; font-size: 11px; line-height: 1.5; white-space: nowrap;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  box-shadow: var(--elev-1); text-shadow: none;
}

/* ============================================================
   Command bar (top)
   ============================================================ */
#topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: var(--z-top);
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: transparent; pointer-events: none;
}
#topbar > * { pointer-events: auto; }

.brand {
  display: flex; align-items: center; gap: 11px;
  flex: none; width: auto; min-width: 272px; max-width: 360px;   /* ≥ panel width for an aligned column; grows just enough to keep the tagline on ONE line */
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-control); padding: 6px 14px; box-shadow: var(--elev-1);
}
.brandlogo { height: 22px; width: auto; display: block; flex: none; }
.brand .tag {
  font-family: var(--font-mono); color: var(--text-dim); font-size: 10px; line-height: 1.2;
  letter-spacing: .4px; text-transform: uppercase; white-space: nowrap;   /* never wrap to a 2nd/3rd row */
  padding-left: 12px; border-left: 1px solid var(--line);
  display: flex; align-items: center; gap: 7px; flex: none;
}
.brand .tag::before {
  content: ""; width: 6px; height: 6px; flex: none; background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
}
.brand .name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.brand .name .gold { color: var(--gold); }

#search {
  flex: 1 1 auto; min-width: 220px; height: var(--ctl-h);   /* grows to fill; pushes controls right */
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-control); padding: 0 14px; font-size: 13.5px; outline: none;
  transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
#search::placeholder { color: var(--text-dim); }
#search:hover { border-color: var(--line-soft); background: var(--surface-1); }
#search:focus-visible { border-color: var(--gold-deep); outline: none; }

#count {
  height: var(--ctl-h); display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-control); padding: 0 14px; box-shadow: var(--elev-1);
}
#count b {
  color: var(--gold); font-family: var(--font-mono); font-weight: 700; font-size: 14px;
  font-variant-numeric: tabular-nums; letter-spacing: .3px;
}

/* Top-bar call-log counter */
#callTally {
  height: var(--ctl-h); display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-control); padding: 0 13px; box-shadow: var(--elev-1);
}
#callTally .tally { display: inline-flex; align-items: center; gap: 6px; }
#callTally .tally b { font-family: var(--font-mono); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
#callTally .tally-c b { color: var(--gold); }
#callTally .tally-f b { color: var(--followup); }
#callTally .tally-n b { color: var(--danger); }
#callTally .tally-i b { color: var(--noint); }
#callTally .tally-div { width: 1px; height: 16px; background: var(--line); }

/* Command-bar buttons */
.topbtn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; height: var(--ctl-h);
  background: var(--panel); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: var(--radius-control); padding: 0 14px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase; white-space: nowrap; box-shadow: var(--elev-1);
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out),
              background var(--dur-1) var(--ease-out);
}
.topbtn:hover { border-color: var(--line-soft); color: var(--text); background: var(--surface-hover); }
.topbtn:active { transform: translateY(1px); }
#dirBtn[aria-pressed="true"], #dirAdvBtn.active {
  color: var(--gold); border-color: var(--gold-deep); background: var(--gold-dim);
}
#themeBtn[aria-pressed="true"] { color: var(--gold); border-color: var(--gold-deep); }
#themeBtn .themeIcon { font-size: 12px; line-height: 1; }

/* ============================================================
   Area readout pill (bottom-right)
   ============================================================ */
#areaPill {
  position: fixed; right: 56px; bottom: 24px; z-index: 400;
  display: inline-flex; align-items: center; gap: 7px; max-width: min(60vw, 320px);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .3px; color: var(--text-dim);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-control); padding: 6px 12px; box-shadow: var(--elev-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
#areaPill b { color: var(--text); font-weight: 600; }
#areaPill .areaPin { color: var(--gold); font-size: 9px; line-height: 1; }
#areaPill .areaSep { opacity: .5; margin: 0 1px; }
#areaPill .areaDim { opacity: .7; }
#areaPill[hidden] { display: none; }
@media (max-width: 640px) {
  #areaPill { right: 52px; bottom: 18px; font-size: 11px; padding: 6px 10px; max-width: 48vw; }
}

/* ============================================================
   Instrument panel (filters)
   ============================================================ */
#panel {
  position: absolute; top: 58px; left: var(--s-4); z-index: var(--z-panel);
  width: 272px; max-height: calc(100vh - 78px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--elev-2);
  padding: var(--s-4) var(--s-4) var(--s-5); font-size: 13px;
}
#panel::-webkit-scrollbar { width: 10px; }
#panel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 3px solid var(--panel); }

/* Section labels: mono cap + a hairline that runs to the edge (HUD console label). */
#panel h3 {
  display: flex; align-items: center; gap: 9px; margin: 0 0 var(--s-2);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--text-dim); white-space: nowrap;
}
#panel h3::before { content: "▚"; color: var(--gold); font-size: 9px; }
#panel h3::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
#panel h3:not(:first-child) { margin-top: var(--s-5); }

.row {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 6px 8px; border-radius: var(--radius-control); cursor: pointer; user-select: none;
  transition: background var(--dur-1) var(--ease-out);
}
.row:hover { background: var(--surface-2); }
.row input { accent-color: var(--gold); width: 14px; height: 14px; }
.row .dot { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.row .lbl { flex: 1; text-transform: capitalize; color: var(--text); }
.row .n { color: var(--text-dim); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11px; }

/* Sliders — value in mono brackets [ N ] */
.slider-wrap { padding: 8px 6px 2px; }
.slider-wrap label {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--text-dim);
}
.slider-wrap label.slider-gap { margin-top: 18px; }
.slider-wrap output {
  color: var(--gold); font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: 12px;
}
.slider-wrap output::before { content: "["; color: var(--hud-tick); margin-right: 3px; }
.slider-wrap output::after  { content: "]"; color: var(--hud-tick); margin-left: 3px; }
input[type=range] { width: 100%; height: 20px; accent-color: var(--gold); cursor: pointer; background: transparent; }

/* Filter / advanced toggle chips */
.minibtn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: var(--radius-control); padding: 6px 10px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .5px;
  text-transform: uppercase; cursor: pointer;
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out),
              background var(--dur-1) var(--ease-out);
}
.minibtn:hover { border-color: var(--line-soft); color: var(--text); background: var(--surface-hover); }
.minibtn:active { transform: translateY(1px); }
.minibtn.on, .minibtn[aria-pressed="true"] { background: var(--gold-dim); color: var(--gold); border-color: var(--gold-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

/* Panel advanced section — same controls as the directory bar, stacked for the
   narrow sidebar. Toggled open by the ⚙ Advanced filters button. */
.panel-advtoggle {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: var(--radius-control); padding: 8px 12px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.panel-advtoggle:hover { border-color: var(--line-soft); color: var(--text); background: var(--surface-hover); }
.panel-advtoggle:active { transform: translateY(1px); }
.panel-advtoggle.active { color: var(--gold); border-color: var(--gold); background: var(--gold-dim); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.panel-adv { display: flex; flex-direction: column; gap: 12px; padding: 12px 4px 2px; }
.panel-adv[hidden] { display: none; }
.panel-adv .adv-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.panel-adv .adv-lbl { flex-basis: 100%; }            /* label on its own line above the inputs */
.panel-adv .adv-num { width: 66px; }
.panel-adv .adv-text { width: 100%; }
.panel-adv .adv-toggles { gap: 6px; }
.panel-adv .adv-clear { margin-left: 0; align-self: flex-start; }

/* ============================================================
   Popups (data readout cards)
   ============================================================ */
.leaflet-popup-content-wrapper {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--elev-2);
}
.leaflet-popup-tip { background: var(--panel); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 13px 15px; font-size: 13px; line-height: 1.5; }
.pop-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; font-weight: 700; color: var(--gold-ink);
  padding: 3px 8px; border-radius: 3px;
}
/* FMCSA authority badges (Carrier / Broker / Private fleet) — hybrids show two.
   Colors mirror the map coding: carrier blue, broker magenta. Shown in popup, directory, drawer. */
.auth-badges, .cd-authbadges { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.cd-authbadges { margin: 7px 0 2px; }
.auth-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 9px; letter-spacing: .8px;
  text-transform: uppercase; font-weight: 700; padding: 2.5px 7px; border-radius: 3px;
  border: 1px solid transparent; white-space: nowrap; line-height: 1.3;
}
.auth-carrier { background: rgba(79,163,255,.16); color: #4FA3FF; border-color: rgba(79,163,255,.40); }
.auth-broker  { background: rgba(232,121,249,.16); color: #E879F9; border-color: rgba(232,121,249,.40); }
.auth-forhire { background: rgba(45,212,191,.14); color: #2DD4BF; border-color: rgba(45,212,191,.34); }
.auth-private { background: rgba(138,138,147,.16); color: #b6b6c0; border-color: rgba(138,138,147,.38); }
/* Compact variant in the dense directory sub-row */
.dir-sub .auth-badge { font-size: 8.5px; padding: 1.5px 5px; letter-spacing: .5px; }
.pop-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 9px 0 3px; letter-spacing: .1px; }
.pop-meta { color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; letter-spacing: .2px; margin: 3px 0; }
.pop-meta a { color: var(--gold); text-decoration: none; }
.pop-meta a:hover { text-decoration: underline; text-underline-offset: 2px; }
.pop-fleet { color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.pop-desc { margin-top: 7px; color: var(--text); font-size: 12px; font-family: var(--font-body); }
.pop-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.pop-tag {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .3px; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; padding: 2px 7px;
}
.pop-foot { margin-top: 9px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .2px; color: var(--text-dim); border-top: 1px solid var(--line-soft); padding-top: 6px; }
/* "Called" toggle on the popup card */
.pop-called {
  display: flex; align-items: center; gap: 9px; margin: 10px 0 2px; cursor: pointer; user-select: none;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 8px 11px;
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.pop-called:hover { border-color: var(--line-soft); color: var(--text); }
.pop-called input { accent-color: var(--gold); width: 15px; height: 15px; flex: none; cursor: pointer; }
.pop-called.on { color: var(--gold); border-color: var(--gold-deep); background: var(--gold-dim); }
.pop-status { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 2px; }
.pop-status .pop-called { margin: 0; }
.pop-followup {
  display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 8px 11px;
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.pop-followup:hover { border-color: var(--followup-deep); color: var(--followup); }
.pop-followup input { accent-color: var(--followup); width: 15px; height: 15px; flex: none; cursor: pointer; }
.pop-followup.on { color: var(--followup); border-color: var(--followup-deep); background: var(--followup-dim); }
.pop-nocontact {
  display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 8px 11px;
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.pop-nocontact:hover { border-color: var(--danger-deep); color: var(--danger); }
.pop-nocontact input { accent-color: var(--danger); width: 15px; height: 15px; flex: none; cursor: pointer; }
.pop-nocontact.on { color: var(--danger); border-color: var(--danger-deep); background: var(--danger-dim); }
.pop-notinterested {
  display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 8px 11px;
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.pop-notinterested:hover { border-color: var(--noint-deep); color: var(--noint); }
.pop-notinterested input { accent-color: var(--noint); width: 15px; height: 15px; flex: none; cursor: pointer; }
.pop-notinterested.on { color: var(--noint); border-color: var(--noint-deep); background: var(--noint-dim); }
.pop-anniv {
  margin: 7px 0 3px; font-size: 12px; color: var(--gold);
  background: var(--gold-dim); border: 1px solid var(--gold-deep);
  border-radius: var(--radius-control); padding: 6px 9px; line-height: 1.35;
}
.pop-anniv.ms { font-weight: 700; }
.pop-anniv-basis { display: block; color: var(--text-dim); font-family: var(--font-mono); font-size: 9.5px; font-weight: 400; margin-top: 2px; }
.pop-photo { display: block; margin: 8px 0 6px; border-radius: var(--radius-control); overflow: hidden; border: 1px solid var(--line); text-decoration: none; }
.pop-photo img { display: block; width: 100%; height: 130px; object-fit: cover; background: var(--surface-2); }
.pop-photo.loading, .pop-photo.noimg { display: grid; place-items: center; min-height: 60px; background: var(--surface-2); }
.pop-photo.noimg img { display: none; }
.pop-photo-cap { display: block; padding: 4px 8px; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-dim); }
.pop-links { display: flex; gap: 8px; margin: 8px 0 4px; }
.pop-links a {
  flex: 1; text-align: center; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--gold); text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 6px 8px;
}
.pop-links a:hover { border-color: var(--gold-deep); }

.conf { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .4px; white-space: nowrap; }
.conf-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.conf--high { color: #5BBF8A; } .conf--high .conf-dot { background: #5BBF8A; }
.conf--med  { color: var(--gold-deep); } .conf--med  .conf-dot { background: var(--gold-deep); }
.conf--low  { color: #9A9AA2; } .conf--low  .conf-dot { background: transparent; border: 1.5px solid #9A9AA2; }

/* Cluster bubbles (Supercluster) + pins */
/* Canvas marker layer — clusters + carrier/place markers are drawn here (one
   <canvas>), replacing the DOM divIcons. pointer-events:none so map drag/click
   pass through to Leaflet (we hit-test on the map's click). */
.hemut-canvas { pointer-events: none; }
.sc-cluster-wrap { background: none; border: none; }
.sc-cluster {
  display: grid; place-items: center; border-radius: 50%;
  background: var(--gold); color: var(--gold-ink); border: 1.5px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.4), 0 0 0 6px rgba(201,154,7,.18);
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  font-variant-numeric: tabular-nums; cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out);
}
.sc-cluster:hover { transform: scale(1.08); }
.place-pin, .hq-pin, .carrier-pin { background: none; border: none; }
.pin-badge {
  display: grid; place-items: center; width: 26px; height: 26px;
  line-height: 0;
  /* no white circle underlay — just the colored glyph; soft shadow keeps it legible on light map */
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.55));
}
/* carrier pins scale with fleet — the badge fills its (fleet-sized) divIcon box */
.carrier-badge { width: 100%; height: 100%; }
.hq-badge {
  display: grid; place-items: center; width: 42px; height: 42px;
  background: var(--ink); border: 2.5px solid #fff; border-radius: 50%;
  box-shadow: 0 2px 9px rgba(0,0,0,.45); line-height: 0;
}
.hq-badge img { width: 24px; height: 24px; object-fit: contain; display: block; }
.lg-badge { display: inline-grid; place-items: center; width: 22px; height: 22px; line-height: 0; flex: none; }

.leaflet-bar.hq-recenter a {
  display: grid; place-items: center; width: 30px; height: 30px;   /* match the zoom +/- buttons */
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.leaflet-bar.hq-recenter a:hover { background: var(--surface-hover); }
.leaflet-bar.hq-recenter img { width: 20px; height: 20px; object-fit: contain; }

/* ============================================================
   Data console (directory)
   ============================================================ */
#directory {
  position: absolute; inset: 0; z-index: 800; padding-top: 58px;
  background: var(--ink); display: none; flex-direction: column;
  background-image:
    repeating-linear-gradient(0deg,  var(--hud-grid) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--hud-grid) 0 1px, transparent 1px 40px);
}
#directory.open { display: flex; }

.dir-head {
  display: flex; align-items: center; gap: 6px var(--s-4); flex-wrap: wrap;
  padding: 6px var(--s-5); border-bottom: 1px solid var(--line); background: var(--panel);
}
/* helper subtext eats a whole row — hide it so the list starts higher (maximize list space) */
.dir-titlesub { display: none; }
.dir-modes {
  display: inline-flex; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-control); padding: 3px; gap: 2px;
}
.dir-mode {
  border: none; background: transparent; color: var(--text-dim); cursor: pointer;
  border-radius: 4px; padding: 6px 13px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  white-space: nowrap; transition: color var(--dur-1) var(--ease-out);
}
.dir-mode:hover { color: var(--text); }
.dir-mode.on { background: var(--gold); color: var(--gold-ink); }

.dir-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.dir-title b { color: var(--gold); font-family: var(--font-mono); font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.dir-titlesub { font-family: var(--font-mono); font-weight: 400; font-size: 10.5px; letter-spacing: .3px; color: var(--text-dim); flex-basis: 100%; }
.dir-sortwrap { margin-left: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--text-dim); display: inline-flex; align-items: center; gap: 8px; }
.dir-sortwrap select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-control); padding: 7px 9px; font-family: var(--font-body); font-size: 13px; cursor: pointer; text-transform: none; letter-spacing: 0;
}
.dir-sortwrap select:hover { border-color: var(--line-soft); }

/* Advanced button lights up when advanced filters are active (a clear "in use" indicator). */
#dirAdvBtn.active { color: var(--gold); border-color: var(--gold); background: var(--gold-dim); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.dir-adv {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px var(--s-5);
  padding: 10px var(--s-5); border-bottom: 1px solid var(--line); background: var(--surface-1);
}
.dir-adv[hidden] { display: none; }
.adv-grp { display: inline-flex; align-items: center; gap: 8px; }
.adv-lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.adv-num, .adv-text {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-control); padding: 7px 9px; font-family: var(--font-mono); font-size: 12.5px;
  transition: border-color var(--dur-1) var(--ease-out);
}
.adv-num { width: 60px; text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.adv-num::-webkit-outer-spin-button, .adv-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.adv-text { width: 188px; }
.adv-num:hover, .adv-text:hover { border-color: var(--line-soft); }
.adv-num:focus-visible, .adv-text:focus-visible { border-color: var(--gold-deep); outline: none; }
.adv-dash { color: var(--hud-tick); }
.adv-toggles { flex-wrap: wrap; gap: 7px; }
.adv-clear {
  margin-left: auto; background: transparent; border: 1px solid var(--line);
  color: var(--text-dim); border-radius: var(--radius-control); padding: 7px 14px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.adv-clear:hover { color: var(--text); border-color: var(--line-soft); }
.adv-close {
  background: var(--gold-dim); border: 1px solid var(--gold-deep); color: var(--gold);
  border-radius: var(--radius-control); padding: 7px 14px; font-weight: 600;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.adv-close:hover { background: var(--gold); color: var(--gold-ink); }
.panel-adv .adv-close { align-self: flex-start; }

.dir-tablewrap { flex: 1; overflow: auto; }
.dir-tablewrap::-webkit-scrollbar { width: 12px; height: 12px; }
.dir-tablewrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 3px solid var(--ink); }
.dir-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dir-table thead th {
  position: sticky; top: 0; z-index: 1; text-align: left;
  background: var(--surface-2); color: var(--text-dim);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
  padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.dir-table td { padding: 8px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.dir-table tbody tr { transition: background var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out); }
.dir-table tbody tr:hover { background: var(--surface-1); box-shadow: inset 2px 0 0 var(--gold); }
.dir-table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dir-table a { color: var(--gold); text-decoration: none; }
.dir-table a:hover { text-decoration: underline; text-underline-offset: 2px; }
.dir-table .muted { color: var(--text-dim); }

.dir-name { min-width: 240px; }
.dir-namecell { display: flex; align-items: center; gap: 11px; }
.dir-chip { width: 9px; height: 9px; border-radius: 2px; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.dir-nmwrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dir-nm { font-weight: 600; color: var(--text); letter-spacing: .1px; }
.dir-sub { display: flex; align-items: center; gap: 8px; }
.dir-type { font-family: var(--font-mono); font-size: 10px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim); }
.dir-ann {
  font-family: var(--font-mono); font-size: 10px; color: var(--gold); background: var(--gold-dim);
  border: 1px solid var(--gold-deep); border-radius: 3px; padding: 1px 7px;
}
.dir-ann.ms { font-weight: 700; }
.dir-off {
  font-family: var(--font-mono); font-size: 9.5px; color: var(--text-dim); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 7px;
}
.dir-table tr.row-off .dir-nm { color: var(--text-dim); }
/* Call-log checkboxes (gold = called, red = could not contact) + marked rows */
.dir-checks { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.dir-call, .dir-nc, .dir-fu, .dir-ni { width: 15px; height: 15px; flex: none; cursor: pointer; margin: 0; }
.dir-fu { accent-color: var(--followup); }
.dir-ni { accent-color: var(--noint); }
.dir-call { accent-color: var(--gold); }
.dir-nc { accent-color: var(--danger); }
.dir-table tr.called { background: rgba(252,210,59,.05); }
.dir-table tr.called .dir-nm { color: var(--text-dim); }
.dir-table tr.called .dir-nm::after { content: " ✓"; color: var(--gold); font-weight: 700; }
.dir-table tr.nocontact { background: var(--danger-dim); }
.dir-table tr.nocontact .dir-nm { color: var(--text-dim); }
.dir-table tr.nocontact .dir-nm::after { content: " ✕"; color: var(--danger); font-weight: 700; }
.dir-table tr.followup { background: var(--followup-dim); }
.dir-table tr.followup .dir-nm::after { content: " ⟳"; color: var(--followup); font-weight: 700; }
.dir-table tr.notinterested { background: var(--noint-dim); }
.dir-table tr.notinterested .dir-nm { color: var(--text-dim); }
.dir-table tr.notinterested .dir-nm::after { content: " ∅"; color: var(--noint); font-weight: 700; }

.dir-reg { white-space: nowrap; color: var(--text); font-family: var(--font-mono); }
.dir-regyr { color: var(--text-dim); font-size: 11px; margin-left: 4px; }

.dir-contact { min-width: 210px; }
.dir-contact .dir-line { display: block; line-height: 1.55; font-family: var(--font-mono); font-size: 12px; }
.dir-contact .dir-line:first-child { white-space: nowrap; }
.dir-contact .dir-line.dim { font-size: 11.5px; color: var(--text-dim); }
.dir-contact .dir-line.dim a { color: var(--gold-deep); }

.dir-mapbtn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-control); padding: 6px 12px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .4px; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.dir-mapbtn:hover { border-color: var(--gold-deep); color: var(--gold); background: var(--gold-dim); }
.dir-mapbtn:active { transform: translateY(1px); }
.dir-mapbtn.offmap { color: var(--text-dim); border-style: dashed; }
.dir-mapbtn.offmap:hover { color: var(--text); border-color: var(--line-soft); background: var(--surface-2); }

.dir-empty { text-align: center; padding: 64px 24px !important; }
.dir-empty-title { font-family: var(--font-mono); font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--text); }
.dir-empty-sub { color: var(--text-dim); font-size: 13px; margin: 8px auto 16px; max-width: 46ch; line-height: 1.55; }

/* ============================================================
   Secure terminal (password gate)
   ============================================================ */
#gate {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 24px;
  background:
    repeating-linear-gradient(0deg,  transparent 0 39px, var(--line-soft) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--line-soft) 39px 40px),
    repeating-linear-gradient(0deg,  rgba(0,0,0,.18) 0 2px, transparent 2px 4px),
    radial-gradient(120% 90% at 50% 36%, var(--surface-1) 0%, var(--ink) 72%);
  background-blend-mode: soft-light, soft-light, overlay, normal;
}
.gate-card {
  width: min(390px, 92vw); display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 13px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--elev-2); padding: 36px 32px 30px;
}
.gate-logo { height: 28px; width: auto; }
.gate-kicker {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold);
}
.gate-card h1 { margin: 2px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 23px; letter-spacing: .2px; color: var(--text); }
.gate-card p { margin: 0 0 4px; color: var(--text-dim); font-size: 13px; line-height: 1.55; max-width: 30ch; }
.gate-field { position: relative; width: 100%; }
.gate-card input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-control); padding: 12px 64px 12px 15px;
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 1px; outline: none;
  transition: border-color var(--dur-1) var(--ease-out);
}
.gate-card input::placeholder { color: var(--text-dim); letter-spacing: .5px; }
.gate-card input:hover { border-color: var(--line-soft); }
.gate-card input:focus-visible { border-color: var(--gold-deep); outline: none; }
.gate-reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer; color: var(--text-dim);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase;
  padding: 7px 10px; border-radius: var(--radius-control); transition: color var(--dur-1) var(--ease-out);
}
.gate-reveal:hover { color: var(--gold); }
.gate-card > button {
  width: 100%; cursor: pointer; border: none; border-radius: var(--radius-control);
  background: var(--gold); color: var(--gold-ink);
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 12px 17px;
  transition: background var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.gate-card > button:hover { background: var(--gold-deep); }
.gate-card > button:active { transform: translateY(1px); }
.gate-card > button:disabled { opacity: .6; cursor: default; transform: none; }
.gate-err { font-family: var(--font-mono); color: #EF6F6C; font-size: 11px; letter-spacing: .4px; }
.gate-err[hidden] { display: none; }

/* ============================================================
   Toast
   ============================================================ */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  z-index: 1200; max-width: 460px; pointer-events: none;
  background: var(--panel); color: var(--text); border: 1px solid var(--gold-deep);
  border-radius: var(--radius-card); box-shadow: var(--elev-2);
  padding: 13px 17px; font-size: 13px; line-height: 1.45;
  opacity: 0; transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) { * { transition-duration: 1ms !important; } }

/* Laptop widths: drop the long brand tagline and let the brand shrink to the logo
   so the command bar (Directory + Tools ▾ + region + count) stays on one row. */
@media (max-width: 1500px) {
  .brand { width: auto; min-width: 0; }   /* tagline hidden below 1500 → let the brand shrink to the logo */
  .brand .tag { display: none; }
}
@media (max-width: 1180px) {
  #search { min-width: 150px; }
  .topbtn { padding: 0 11px; }
  .region-chip .rc-caret { display: none; }
}

@media (max-width: 640px) {
  #panel { width: calc(100vw - 32px); max-height: 40vh; }
  #search { max-width: none; }
  .brand .tag { display: none; }
}

/* ============================================================
   Directory toolbar (CSV / share link / log backup-restore) — added 2026-06-24
   ============================================================ */
.dir-tools { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dir-tools .topbtn { padding: 7px 11px; }

/* Per-entity note button on directory rows (lives in .dir-checks) */
.dir-note {
  width: 18px; height: 18px; flex: none; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: 4px;
  color: var(--text-dim); font-size: 11px; line-height: 1;
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.dir-note:hover { color: var(--text); border-color: var(--line); }
.dir-note.has { color: var(--gold); }

/* Note block on the popup card */
.pop-note { margin: 8px 0 2px; display: flex; flex-direction: column; gap: 6px; }
.pop-note-txt {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 2px solid var(--gold-deep);
  border-radius: var(--radius-control); padding: 7px 9px; font-size: 12px; line-height: 1.45;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.pop-note-btn {
  align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-dim); border-radius: var(--radius-control); padding: 5px 10px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .3px; cursor: pointer;
}
.pop-note-btn:hover { border-color: var(--gold-deep); color: var(--gold); background: var(--gold-dim); }

/* Shared note editor modal */
#noteModal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
#noteModal[hidden] { display: none; }
.note-backdrop { position: absolute; inset: 0; background: rgba(6,6,8,.62); backdrop-filter: blur(2px); }
.note-card {
  position: relative; width: min(440px, calc(100vw - 32px));
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3);
}
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-head b { font-family: var(--font-display); font-size: 15px; color: var(--text); font-weight: 700; }
.note-x {
  background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px;
  width: 26px; height: 26px; border-radius: 4px;
}
.note-x:hover { color: var(--text); background: var(--surface-hover); }
#noteText {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 96px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--text); font-family: var(--font-body); font-size: 13.5px; line-height: 1.5; padding: 10px 12px;
}
#noteText:focus-visible { border-color: var(--gold-deep); outline: none; }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.note-hint { font-family: var(--font-mono); font-size: 10px; letter-spacing: .3px; color: var(--text-dim); }
.note-btns { display: inline-flex; gap: 8px; margin-left: auto; }
.note-save, .note-cancel {
  border-radius: var(--radius-control); padding: 8px 16px; cursor: pointer; font-size: 13px;
  font-family: var(--font-body); border: 1px solid var(--line);
}
.note-save { background: var(--gold); color: var(--gold-ink); border-color: var(--gold-deep); font-weight: 600; }
.note-save:hover { background: var(--gold-deep); }
.note-cancel { background: var(--surface-2); color: var(--text-dim); }
.note-cancel:hover { color: var(--text); border-color: var(--line-soft); }

/* ============================================================
   Targets — named saved filter segments + call progress (added 2026-06-24)
   ============================================================ */
#targetsModal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
#targetsModal[hidden] { display: none; }
.tgt-card {
  position: relative; width: min(540px, calc(100vw - 32px)); max-height: 82vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3);
}
.tgt-save { display: flex; gap: 8px; }
.tgt-save input {
  flex: 1; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--text); padding: 9px 11px; font-family: var(--font-body); font-size: 13px;
}
.tgt-save input:focus-visible { border-color: var(--gold-deep); outline: none; }
.tgt-save .note-save { white-space: nowrap; }
.tgt-hint { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: .3px; line-height: 1.5; }
.tgt-list { display: flex; flex-direction: column; gap: 8px; }
.tgt-empty { color: var(--text-dim); font-size: 13px; padding: 18px 4px; text-align: center; line-height: 1.5; }
.tgt-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 10px 12px;
}
.tgt-rmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tgt-name {
  align-self: flex-start; background: none; border: none; padding: 0; cursor: pointer; text-align: left;
  color: var(--gold); font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.tgt-name:hover { text-decoration: underline; }
.tgt-bar { height: 6px; border-radius: 999px; background: var(--surface-hover); overflow: hidden; display: flex; }
.tgt-seg { height: 100%; }
.tgt-seg.called { background: var(--gold); }
.tgt-seg.followup { background: var(--followup); }
.tgt-seg.nc { background: var(--danger); }
.tgt-seg.ni { background: var(--noint); }
.tgt-stat { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.tgt-stat b { color: var(--text); }
.tgt-actions { display: flex; gap: 6px; flex: none; }
.tgt-mini {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: var(--radius-control); padding: 6px 9px; font-family: var(--font-mono); font-size: 10px; cursor: pointer;
}
.tgt-mini:hover { border-color: var(--gold-deep); color: var(--gold); }
.tgt-mini.del:hover { border-color: var(--danger-deep); color: var(--danger); }

/* ============================================================
   Company detail drawer — the "account record" (added 2026-06-24)
   ============================================================ */
#companyDrawer { position: fixed; inset: 0; z-index: 2100; }
#companyDrawer[hidden] { display: none; }
.cd-backdrop { position: absolute; inset: 0; background: rgba(6,6,8,.5); }
.cd-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 100vw);
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: -8px 0 30px rgba(0,0,0,.45);
  overflow-y: auto; animation: cdIn var(--dur-2, 200ms) var(--ease-out);
}
@keyframes cdIn { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cd-panel { animation: none; } }
.cd-inner { padding: var(--s-4) var(--s-5) var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); }
.cd-head { display: flex; align-items: center; justify-content: space-between; }
.cd-badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--gold-ink);
}
.cd-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.15; color: var(--text); margin: 0; overflow-wrap: anywhere; }
.cd-sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: .2px; }
.cd-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-control); overflow: hidden; margin-top: 4px; }
.cd-fact { background: var(--surface-1); padding: 8px 11px; display: flex; flex-direction: column; gap: 2px; }
.cd-flabel { font-family: var(--font-mono); font-size: 9px; letter-spacing: .6px; text-transform: uppercase; color: var(--text-dim); }
.cd-fval { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.cd-h3 {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 2px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text);
}
.cd-h3::before { content: "▚"; color: var(--gold); font-size: 8px; }
.cd-count { color: var(--gold); font-family: var(--font-mono); }
.cd-enrich {
  margin-left: auto; background: var(--gold-dim); border: 1px solid var(--gold-deep); color: var(--gold);
  border-radius: var(--radius-control); padding: 5px 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .3px; cursor: pointer; text-transform: none;
}
.cd-enrich:hover { background: var(--gold); color: var(--gold-ink); }
.cd-contact { display: flex; flex-direction: column; gap: 5px; }
.cd-line { font-size: 13px; color: var(--text); }
.cd-line a { color: var(--gold); text-decoration: none; }
.cd-line a:hover { text-decoration: underline; }
.cd-dim { color: var(--text-dim); font-size: 12px; }
.cd-people { display: flex; flex-direction: column; gap: 7px; }
.cd-person {
  display: flex; align-items: flex-start; gap: 8px; background: var(--surface-1);
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 9px 11px;
}
.cd-pmain { flex: 1; min-width: 0; }
.cd-pmain b { font-size: 13.5px; color: var(--text); }
.cd-prole { font-family: var(--font-mono); font-size: 10px; color: var(--gold); letter-spacing: .3px; }
.cd-pcontact { margin-top: 3px; font-size: 12px; color: var(--text-dim); overflow-wrap: anywhere; }
.cd-pcontact a { color: var(--gold-deep); text-decoration: none; }
.cd-pcontact a:hover { text-decoration: underline; }
.cd-pdel { flex: none; background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 12px; padding: 2px 4px; border-radius: 4px; }
.cd-pdel:hover { color: var(--danger); background: var(--danger-dim); }
.cd-addform { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.cd-in { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--text); padding: 8px 10px; font-family: var(--font-body); font-size: 13px; }
.cd-in:focus-visible { border-color: var(--gold-deep); outline: none; }
.cd-addbtn { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-control); padding: 8px 14px; font-size: 13px; cursor: pointer; }
.cd-addbtn:hover { border-color: var(--gold-deep); color: var(--gold); background: var(--gold-dim); }
.cd-foot { margin-top: 8px; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-dim); border-top: 1px solid var(--line-soft); padding-top: 7px; }
/* "Open company →" on the map popup + clickable directory name */
.pop-company { display: block; width: 100%; margin-top: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-control); padding: 7px 10px; font-size: 12px; cursor: pointer; }
.pop-company:hover { border-color: var(--gold-deep); color: var(--gold); background: var(--gold-dim); }
.dir-nm[data-company] { cursor: pointer; }
.dir-nm[data-company]:hover { color: var(--gold); text-decoration: underline; }

/* ============================================================
   Region switcher + 3 counters · loading spinner (added 2026-06-24)
   ============================================================ */
/* Compact active-region chip (replaced the Fresno/Rockford/Total bar). Click → home map. */
.region-chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: pointer;
  height: var(--ctl-h); box-sizing: border-box; box-shadow: var(--elev-1);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-control);
  padding: 0 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .4px; color: var(--text);
  transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.region-chip:hover { border-color: var(--gold-deep); }
.region-chip .rc-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 3px rgba(252,210,59,.18); flex: none;
}
.region-chip .rc-name { text-transform: uppercase; }
.region-chip .rc-count { color: var(--gold); font-variant-numeric: tabular-nums; }
.region-chip .rc-caret { color: var(--text-dim); font-size: 9px; }
.region-spinner { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center; background: rgba(6,6,8,.5); }
.rs-card {
  background: var(--panel); border: 1px solid var(--gold-deep); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: 16px 22px; font-family: var(--font-mono); font-size: 13px; color: var(--text); letter-spacing: .3px;
}

/* ============================================================
   HOME / landing page — dark US map + gold region coverage rings
   ============================================================ */
#home { position: fixed; inset: 0; z-index: 1500; background: #0b0d10; }
#homeMap { position: absolute; inset: 0; background: #0b0d10; }
body.home-open #topbar, body.home-open #panel, body.home-open #areaPill, body.home-open #metricsRail { visibility: hidden; }
.home-top {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%); z-index: 1510;
  text-align: center; pointer-events: none; max-width: 92vw;
}
.home-top .home-logo { height: 34px; opacity: .96; filter: drop-shadow(0 2px 10px rgba(0,0,0,.6)); }
.home-kicker {
  margin-top: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold);
}
.home-hint {
  margin-top: 6px; font-family: var(--font-body); font-size: 14px; color: #cfd2d8;
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
}
.home-foot {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1510;
  font-family: var(--font-mono); font-size: 12px; color: #aeb2bb; pointer-events: none;
  background: rgba(11,13,16,.66); border: 1px solid rgba(252,210,59,.22); border-radius: 999px;
  padding: 7px 16px; letter-spacing: .3px;
}
.home-foot b { color: var(--gold); }
/* region marker: a glowing gold dot + a label card, clickable */
.home-region-pin { background: none; border: none; }
.home-region-pin .hrp-dot {
  position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 5px rgba(252,210,59,.18), 0 0 16px 3px rgba(252,210,59,.55);
  animation: hrpPulse 2.4s ease-in-out infinite;
}
@keyframes hrpPulse {
  0%,100% { box-shadow: 0 0 0 5px rgba(252,210,59,.16), 0 0 14px 2px rgba(252,210,59,.45); }
  50%     { box-shadow: 0 0 0 8px rgba(252,210,59,.10), 0 0 22px 5px rgba(252,210,59,.62); }
}
/* respect reduced-motion: keep the static glow, drop the looping pulse (the global rule only
   neutralizes transitions, not keyframe animations) */
@media (prefers-reduced-motion: reduce) { .home-region-pin .hrp-dot { animation: none; } }
.home-region-pin .hrp-card {
  position: absolute; left: 14px; top: -16px; white-space: nowrap; cursor: pointer;
  background: rgba(14,16,20,.92); border: 1px solid var(--gold-deep); border-radius: 8px;
  padding: 7px 12px; box-shadow: 0 6px 22px rgba(0,0,0,.5); transition: border-color .12s, transform .12s;
}
.home-region-pin .hrp-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.home-region-pin .hrp-name {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: #fff; letter-spacing: .2px;
}
.home-region-pin .hrp-count {
  display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--gold); margin-top: 1px; letter-spacing: .3px;
}
.home-ring { cursor: pointer; transition: fill-opacity .15s; }
@media (max-width: 760px) {
  .home-top .home-logo { height: 28px; }
  .home-region-pin .hrp-card { padding: 5px 9px; }
}

/* ============================================================
   Call-script library (added 2026-06-24)
   ============================================================ */
#scriptsModal { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center; }
#scriptsModal[hidden] { display: none; }
.sc-card {
  position: relative; width: min(720px, calc(100vw - 32px)); max-height: 84vh; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3);
}
.sc-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-cat {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: 999px; padding: 5px 12px; font-family: var(--font-mono); font-size: 11px; cursor: pointer; letter-spacing: .3px;
}
.sc-cat:hover { color: var(--text); border-color: var(--line-soft); }
.sc-cat.on { background: var(--gold-dim); color: var(--gold); border-color: var(--gold-deep); }
.sc-addcat { border-style: dashed; }
.sc-body { display: grid; grid-template-columns: 200px 1fr; gap: var(--s-3); min-height: 0; flex: 1; }
.sc-list { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; border-right: 1px solid var(--line); padding-right: var(--s-3); }
.sc-item {
  text-align: left; background: var(--surface-1); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-control); padding: 8px 10px; font-size: 12.5px; cursor: pointer;
}
.sc-item:hover { border-color: var(--line-soft); }
.sc-item.on { border-color: var(--gold-deep); color: var(--gold); background: var(--gold-dim); }
.sc-new { border-style: dashed; color: var(--text-dim); }
.sc-editor { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-width: 0; }
.sc-empty { color: var(--text-dim); font-size: 13px; padding: 18px 4px; line-height: 1.6; }
.sc-title { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--text); padding: 8px 11px; font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.sc-title:focus-visible, .sc-text:focus-visible { border-color: var(--gold-deep); outline: none; }
.sc-text { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--text); padding: 10px 12px; font-family: var(--font-body); font-size: 13px; line-height: 1.55; resize: vertical; }
.sc-preview { background: var(--surface-2); border: 1px solid var(--line); border-left: 2px solid var(--gold-deep); border-radius: var(--radius-control); padding: 9px 11px; font-size: 12.5px; line-height: 1.55; color: var(--text); }
.sc-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 640px) { .sc-body { grid-template-columns: 1fr; } .sc-list { border-right: none; border-bottom: 1px solid var(--line); padding-right: 0; padding-bottom: var(--s-3); max-height: 120px; } }

/* ============================================================
   Anniversary calendar view (mode="cal") — added 2026-06-24
   ============================================================ */
.dir-cal {
  flex: 1; overflow: auto; padding: var(--s-4) var(--s-5);
  display: grid; gap: var(--s-3); align-content: start; grid-auto-rows: min-content;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.dir-cal[hidden] { display: none; }   /* class display:grid would otherwise beat the [hidden] UA rule */
.cal-month {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-card);
  display: flex; flex-direction: column; min-height: 64px; align-self: start; overflow: hidden;
}
.cal-month.empty { opacity: .5; }
.cal-mhead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gold);
}
.cal-mcount { color: var(--text-dim); font-weight: 600; }
.cal-items { display: flex; flex-direction: column; padding: 5px; gap: 3px; }
.cal-none { color: var(--text-dim); font-size: 12px; padding: 4px 7px; }
.cal-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-control);
  padding: 6px 8px; color: var(--text); font-family: var(--font-body); font-size: 12.5px;
  transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.cal-item:hover { background: var(--surface-hover); border-color: var(--line); }
.cal-item.ms { box-shadow: inset 2px 0 0 var(--gold); }
.cal-item.offmap { opacity: .62; }
.cal-day {
  flex: none; width: 22px; text-align: center; font-family: var(--font-mono);
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px; color: var(--gold);
}
.cal-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-yrs { flex: none; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.cal-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.cal-dot.called { background: var(--gold); }
.cal-dot.followup { background: var(--followup); }
.cal-dot.nocontact { background: var(--danger); }
.cal-dot.notinterested { background: var(--noint); }
.cal-note { flex: none; color: var(--gold); font-size: 11px; }

/* ============================================================
   Call list (★ starred leads) + Activity log (dated outcomes)  (added 2026-06-26)
   ============================================================ */
.topbtn-badge { font-family: var(--font-mono); font-weight: 700; color: var(--gold); }

/* ★ star toggle — shared across rows, popups, drawer, call list */
.star-btn {
  background: transparent; border: none; cursor: pointer; color: var(--text-dim);
  padding: 0; line-height: 1; font-size: 15px; width: 22px; height: 22px;
  display: inline-grid; place-items: center; border-radius: 4px;
}
.star-btn:hover { color: var(--gold); }
.star-btn.on { color: var(--gold); }
.star-ico { pointer-events: none; }
.dir-star { font-size: 14px; width: 18px; height: 18px; }
.pop-star, .cd-star { font-size: 18px; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--radius-control); }

/* Log-call affordances on the popup + drawer */
.pop-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cd-callrow { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; }
.pop-log, .cd-logbtn {
  flex: 1; border: 1px solid var(--gold-deep); background: var(--gold); color: var(--gold-ink);
  font-weight: 600; border-radius: var(--radius-control); padding: 7px 12px; font-size: 12.5px;
  cursor: pointer; font-family: var(--font-body);
}
.pop-log:hover, .cd-logbtn:hover { background: var(--gold-deep); }

/* shared centered-modal shells (mirror #targetsModal) */
#logModal, #callListModal, #activityModal, #routeModal, #meetingsModal, #schedModal, #helpModal, #splitModal {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
}
#logModal[hidden], #callListModal[hidden], #activityModal[hidden], #routeModal[hidden],
#meetingsModal[hidden], #schedModal[hidden], #helpModal[hidden], #splitModal[hidden] { display: none; }
#schedModal { z-index: 2010; }   /* scheduler stacks above the meetings panel */

/* Log-call modal */
.log-card {
  position: relative; width: min(460px, calc(100vw - 32px)); max-height: 86vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3);
}
.log-sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: .3px; }
.log-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.log-out {
  text-align: left; padding: 10px 12px; border-radius: var(--radius-control); border: 1px solid var(--line);
  border-left-width: 3px; background: var(--surface-1); color: var(--text);
  font-family: var(--font-body); font-size: 12.5px; cursor: pointer;
}
.log-out:hover { background: var(--surface-2); border-color: var(--line-soft); }
.log-out.sel { background: var(--surface-2); box-shadow: inset 0 0 0 1px currentColor; font-weight: 600; }
.log-due { display: flex; align-items: center; gap: 10px; }
.log-due[hidden] { display: none; }   /* the [hidden] attr must win over display:flex */
.log-due label { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
#logDue {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--text); padding: 7px 10px; font-family: var(--font-body); font-size: 13px;
}
#logNote {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 44px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--text); font-family: var(--font-body); font-size: 13px; line-height: 1.5; padding: 9px 11px;
}
#logNote:focus-visible, #logDue:focus-visible { border-color: var(--gold-deep); outline: none; }
.note-save:disabled { opacity: .45; cursor: not-allowed; }

/* Call list panel */
.cl-card .note-head b, .ac-card .note-head b { font-family: var(--font-display); }
.cl-count { color: var(--text-dim); font-weight: 400; }
.cl-tools { display: flex; gap: 8px; }
.cl-list { display: flex; flex-direction: column; gap: 7px; }
.cl-empty { color: var(--text-dim); font-size: 13px; padding: 24px 6px; text-align: center; line-height: 1.6; }
.cl-row {
  display: flex; align-items: center; gap: 10px; background: var(--surface-1);
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 9px 11px;
}
.cl-main { flex: 1; min-width: 0; }
.cl-name { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text); flex-wrap: wrap; }
.cl-name .dir-nm { cursor: pointer; }
.cl-name .dir-nm:hover { color: var(--gold); }
.cl-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); margin-top: 2px; }
.cl-sub a { color: var(--text-dim); }
.cl-actions { display: inline-flex; gap: 5px; flex: none; }
.cl-mini {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: 5px; padding: 5px 8px; font-size: 11px; cursor: pointer; font-family: var(--font-body);
}
.cl-mini:hover { color: var(--text); border-color: var(--line-soft); }
.cl-mini.log { background: var(--gold); color: var(--gold-ink); border-color: var(--gold-deep); font-weight: 600; }
.cl-mini.log:hover { background: var(--gold-deep); }
.cl-mini.rm { color: var(--gold); }
.cl-mini.rm:hover { color: var(--danger); border-color: var(--danger-deep); }

/* current-status badge + due chip */
.st-badge {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line); color: var(--text-dim);
}
.st-badge.called { color: var(--gold); border-color: var(--gold-deep); }
.st-badge.fu { color: var(--followup); border-color: var(--followup-deep); }
.st-badge.nc { color: var(--danger); border-color: var(--danger-deep); }
.st-badge.ni { color: var(--noint); border-color: var(--noint-deep); }
.due-chip {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .3px; padding: 2px 6px;
  border-radius: 4px; background: var(--followup-dim); color: var(--followup);
}
.due-chip.over { background: var(--danger-dim); color: var(--danger); }
.due-chip.today { background: rgba(252,210,59,.14); color: var(--gold); }

/* Activity panel */
.ac-card { width: min(620px, calc(100vw - 32px)); max-height: 84vh; overflow: auto; }
.ac-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ac-today { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.ac-today b { color: var(--gold); font-size: 13px; }
.ac-body { display: flex; flex-direction: column; gap: 14px; }
.ac-sec {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 7px;
}
.ac-h4 { margin: 0; font-size: 12px; font-family: var(--font-display); color: var(--text); display: flex; align-items: center; gap: 8px; }
.ac-n { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); font-weight: 400; }
.ac-due-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); }
.ac-due-row .dir-nm { cursor: pointer; }
.ac-due-row .dir-nm:hover { color: var(--gold); }
.ac-due-actions { margin-left: auto; display: inline-flex; gap: 5px; }
.ac-day { display: flex; flex-direction: column; gap: 7px; }
.ac-day-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line-soft); padding-bottom: 5px; }
.ac-day-head b { font-family: var(--font-display); font-size: 13px; color: var(--text); }
.ac-day-n { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.ac-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ac-chip {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .3px; padding: 2px 7px;
  border-radius: 999px; background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--line);
}
.ac-events { display: flex; flex-direction: column; gap: 4px; }
.ac-ev { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); padding: 3px 0; flex-wrap: wrap; }
.ac-time { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); width: 56px; flex: none; }
.ac-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-dim); }
.ac-co { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-co .dir-nm { cursor: pointer; }
.ac-co .dir-nm:hover { color: var(--gold); }
.ac-oc { font-family: var(--font-mono); font-size: 10px; flex: none; }
.ac-note { flex-basis: 100%; font-size: 11px; color: var(--text-dim); padding-left: 64px; font-style: italic; }

/* outcome accent colors (shared by log buttons, chips, dots, labels) */
.ac-chip.fu, .ac-oc.fu { color: #34D399; }   .ac-dot.fu { background: #34D399; }   .log-out.fu { border-left-color: #34D399; }   .log-out.fu.sel { color: #34D399; }
.ac-chip.cb, .ac-oc.cb { color: #2DD4BF; }   .ac-dot.cb { background: #2DD4BF; }   .log-out.cb { border-left-color: #2DD4BF; }   .log-out.cb.sel { color: #2DD4BF; }
.ac-chip.vm, .ac-oc.vm { color: var(--followup); } .ac-dot.vm { background: var(--followup); } .log-out.vm { border-left-color: var(--followup); } .log-out.vm.sel { color: var(--followup); }
.ac-chip.na, .ac-oc.na { color: var(--noint); }    .ac-dot.na { background: var(--noint); }    .log-out.na { border-left-color: var(--noint); }    .log-out.na.sel { color: var(--noint); }
.ac-chip.ni, .ac-oc.ni { color: #E0A23B; }   .ac-dot.ni { background: #E0A23B; }   .log-out.ni { border-left-color: #E0A23B; }   .log-out.ni.sel { color: #E0A23B; }
.ac-chip.dnc, .ac-oc.dnc { color: var(--danger); } .ac-dot.dnc { background: var(--danger); } .log-out.dnc { border-left-color: var(--danger); } .log-out.dnc.sel { color: var(--danger); }

/* single status pill + dropdown (directory rows — replaces the 4 inline checkboxes) */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 9px; cursor: pointer; font-family: var(--font-body); font-size: 11px;
  color: var(--text-dim); white-space: nowrap; line-height: 1.45;
  transition: border-color .12s, color .12s, background .12s;
}
.status-pill:hover { border-color: var(--line-soft); color: var(--text); }
.status-pill.new { border-style: dashed; }
.status-pill.new:hover { color: var(--gold); border-color: var(--gold-deep); }
.status-pill.called { color: var(--gold); border-color: var(--gold-deep); background: rgba(252,210,59,.08); }
.status-pill.fu { color: var(--followup); border-color: var(--followup-deep); background: var(--followup-dim); }
.status-pill.nc { color: var(--danger); border-color: var(--danger-deep); background: var(--danger-dim); }
.status-pill.ni { color: var(--noint); border-color: var(--noint-deep); background: var(--noint-dim); }
.sp-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.sp-dot.called { background: var(--gold); }
.sp-dot.fu { background: var(--followup); }
.sp-dot.nc { background: var(--danger); }
.sp-dot.ni { background: var(--noint); }
.sp-caret { font-size: 8px; opacity: .55; }

.status-menu {
  position: fixed; z-index: 3000; min-width: 184px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: 5px; display: flex; flex-direction: column; gap: 1px;
}
.status-menu[hidden] { display: none; }
.sm-item {
  display: flex; align-items: center; gap: 9px; text-align: left; width: 100%;
  background: transparent; border: none; color: var(--text); cursor: pointer;
  font-family: var(--font-body); font-size: 12.5px; padding: 7px 9px; border-radius: 5px;
}
.sm-item:hover { background: var(--surface-2); }
.sm-item.on { background: var(--surface-2); }
.sm-item.on::after { content: "✓"; margin-left: auto; color: var(--gold); font-size: 11px; }
.sm-item.clear { color: var(--text-dim); }
.sm-item.log { color: var(--gold); font-weight: 600; }
.sm-div { height: 1px; background: var(--line-soft); margin: 4px 4px; }

/* ============================================================
   Session tools: clickable tally filters, reset, timezone, bulk  (added 2026-06-26)
   ============================================================ */
/* Task 1 — tally items are now filter buttons */
#callTally .tally {
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  cursor: pointer; font: inherit; padding: 3px 8px; transition: background .12s, border-color .12s;
}
#callTally .tally:hover { background: var(--surface-2); border-color: var(--line); }
/* Active status filter — clearly lights up in its own color so it's obvious what you're filtering by. */
#callTally .tally.active { background: var(--surface-2); border-color: var(--line-soft); box-shadow: inset 0 0 0 1px var(--line-soft); }
#callTally .tally.tally-c.active { border-color: var(--gold);     background: color-mix(in srgb, var(--gold) 15%, transparent);     box-shadow: inset 0 0 0 1px var(--gold-deep); }
#callTally .tally.tally-f.active { border-color: var(--followup); background: color-mix(in srgb, var(--followup) 17%, transparent); box-shadow: inset 0 0 0 1px var(--followup-deep); }
#callTally .tally.tally-n.active { border-color: var(--danger);   background: color-mix(in srgb, var(--danger) 17%, transparent);   box-shadow: inset 0 0 0 1px var(--danger-deep); }
#callTally .tally.tally-i.active { border-color: var(--noint);    background: color-mix(in srgb, var(--noint) 17%, transparent);    box-shadow: inset 0 0 0 1px var(--noint-deep); }

/* Task 2 — Reset button: subtle until filters are active, then gold */
#dirResetBtn:disabled { opacity: .4; cursor: default; }
#dirResetBtn.on { color: var(--gold); border-color: var(--gold-deep); }

/* Timezone "good time to call" chips */
.tz-chip {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .2px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line);
}
.tz-chip.good { color: #34D399; border-color: #2f6f57; background: rgba(52,211,153,.08); }
.tz-chip.ok   { color: #E0A23B; border-color: #7a5e26; background: rgba(224,162,59,.08); }
.tz-chip.bad  { color: var(--text-dim); }
.pop-tz { margin: 5px 0; }
.tz-mini { font-family: var(--font-mono); font-size: 9.5px; display: inline-flex; align-items: center; gap: 3px; color: var(--text-dim); }
.tz-mini.good { color: #34D399; }
.tz-mini.ok   { color: #E0A23B; }
.tz-mini.bad  { color: var(--noint); }

/* Bulk actions */
.dir-select { width: 15px; height: 15px; flex: none; cursor: pointer; accent-color: var(--gold); margin: 0; }
.dir-table tr.selected { background: rgba(252,210,59,.10) !important; }
.dir-table tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.bulk-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 16px; background: var(--surface-1); border-bottom: 1px solid var(--line);
}
.bulk-bar[hidden] { display: none; }
.bulk-count { font-size: 12.5px; color: var(--text-dim); }
.bulk-count b { color: var(--gold); font-size: 13px; }
.bulk-lbl { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); }
.bulk-sep { width: 1px; height: 18px; background: var(--line); }
.bulk-btn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: 6px; padding: 5px 10px; font-size: 11.5px; cursor: pointer; font-family: var(--font-body);
}
.bulk-btn:hover { color: var(--text); border-color: var(--line-soft); }
.bulk-btn.star { color: var(--gold); }
.bulk-btn.ghost { color: var(--text-dim); margin-left: auto; }
.bulk-btn.st.called:hover { color: var(--gold); border-color: var(--gold-deep); }
.bulk-btn.st.fu:hover { color: var(--followup); border-color: var(--followup-deep); }
.bulk-btn.st.nc:hover { color: var(--danger); border-color: var(--danger-deep); }
.bulk-btn.st.ni:hover { color: var(--noint); border-color: var(--noint-deep); }

/* Region-level "good time to call" indicator in the directory header */
.dir-tz {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .2px;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim);
}
.dir-tz[hidden] { display: none; }
.dir-tz b { font-weight: 700; }
.dir-tz.good { color: #34D399; border-color: #2f6f57; background: rgba(52,211,153,.08); }
.dir-tz.ok   { color: #E0A23B; border-color: #7a5e26; background: rgba(224,162,59,.08); }
.dir-tz.bad  { color: var(--text-dim); }

/* ============================================================
   Poster run — route planner panel + on-map route  (added 2026-06-26)
   ============================================================ */
.rt-card { width: min(520px, calc(100vw - 32px)); max-height: 84vh; overflow: auto; }
.rt-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rt-nlabel { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
#routeN { width: 54px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--text); padding: 6px 8px; font-family: var(--font-body); font-size: 13px; }
.rt-counts { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-left: auto; }
.rt-counts b { color: var(--gold); }
.rt-body { display: flex; flex-direction: column; gap: 6px; }
.rt-summary { font-size: 12.5px; color: var(--text-dim); padding: 4px 2px 2px; }
.rt-summary b { color: var(--text); }
.rt-row { display: flex; align-items: center; gap: 10px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 8px 11px; }
.rt-row.done { opacity: .55; }
.rt-row.done .dir-nm { text-decoration: line-through; }
.rt-num { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-family: var(--font-mono); font-weight: 700; font-size: 11px; }
.rt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rt-main .dir-nm { cursor: pointer; font-size: 13px; }
.rt-main .dir-nm:hover { color: var(--gold); }
.rt-leg { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.rt-up { flex: none; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); border-radius: 5px; padding: 4px 9px; font-size: 11px; cursor: pointer; font-family: var(--font-body); }
.rt-up:hover { color: var(--text); border-color: var(--line-soft); }
.rt-up.on { color: var(--gold); border-color: var(--gold-deep); background: rgba(252,210,59,.08); }
.rt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rt-btn { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); border-radius: var(--radius-control); padding: 7px 12px; font-size: 12px; cursor: pointer; font-family: var(--font-body); text-decoration: none; }
.rt-btn:hover { color: var(--text); border-color: var(--line-soft); }
.rt-btn.primary { background: var(--gold); color: var(--gold-ink); border-color: var(--gold-deep); font-weight: 600; }
.rt-btn.primary:hover { background: var(--gold-deep); }
.rt-btn.ghost { margin-left: auto; color: var(--text-dim); }

/* ============================================================================
   MEETINGS — scheduler modal + day-grouped panel + map pins (P1)
   teal accent (#2DD4BF) = a held/confirmed in-person meeting; mirrors the popup badge.
   ========================================================================== */
:root { --mtg: #2DD4BF; --mtg-deep: #18897c; --mtg-dim: rgba(45,212,191,.12); }

/* Book-meeting button in the company drawer call-row */
.cd-bookbtn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-control); padding: 8px 12px; font-size: 12.5px; cursor: pointer; font-family: var(--font-body);
}
.cd-bookbtn:hover { border-color: var(--mtg-deep); color: var(--text); }
.cd-bookbtn.has { color: var(--mtg); border-color: var(--mtg-deep); background: var(--mtg-dim); font-weight: 600; }
.cd-mtg {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text); background: var(--mtg-dim);
  border: 1px solid var(--mtg-deep); border-radius: var(--radius-control); padding: 8px 11px;
}
.cd-mtg b { color: var(--mtg); }

/* secondary action in the log-call modal (Log & book meeting) */
.note-save.alt { background: var(--mtg); color: #06302b; border-color: var(--mtg-deep); }
.note-save.alt:hover { background: var(--mtg-deep); color: #fff; }

/* Tools-menu badge turns teal once meetings exist */
#mtgCount.nonzero { color: var(--mtg); }

/* ---- Scheduler card ---- */
.sched-card {
  position: relative; width: min(480px, calc(100vw - 32px)); max-height: 88vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3);
}
.sched-sub { font-size: 14px; color: var(--text); }
.sched-sub b { font-family: var(--font-display); }
.sched-durrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sched-durrow label { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
.sched-durrow select, .sched-custom input {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--text); padding: 6px 9px; font-family: var(--font-body); font-size: 13px;
}
.sched-durrow select:focus-visible, .sched-custom input:focus-visible { border-color: var(--mtg-deep); outline: none; }
.sched-tz { font-family: var(--font-mono); font-size: 10.5px; color: var(--mtg); }
.sched-sech { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim); margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.sched-sech::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.sched-dim { text-transform: none; letter-spacing: .2px; font-weight: 400; color: var(--text-dim); font-size: 9.5px; }
.sched-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sched-slot {
  text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 9px 11px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--text); cursor: pointer; font-family: var(--font-body);
}
.sched-slot:hover { background: var(--surface-2); border-color: var(--line-soft); }
.sched-slot.primary { border-color: var(--mtg-deep); background: var(--mtg-dim); }
.sched-slot.sel { box-shadow: inset 0 0 0 1px var(--mtg); border-color: var(--mtg); }
.sched-slot .ss-day { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); letter-spacing: .3px; }
.sched-slot .ss-time { font-size: 14px; font-weight: 700; color: var(--text); }
.sched-slot.primary .ss-time { color: var(--mtg); }
.sched-slot .ss-reason { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-dim); }
.sched-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sched-empty { grid-column: 1 / -1; color: var(--text-dim); font-size: 12px; line-height: 1.6; padding: 12px 4px; }

/* ---- Meetings panel ---- */
.mtg-card {
  position: relative; width: min(560px, calc(100vw - 32px)); max-height: 86vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3);
}
.mtg-toolbar { display: flex; align-items: center; gap: 10px; }
.mtg-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 11px 13px; }
.mtg-settings label { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
.mtg-settings input { width: 76px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; color: var(--text); padding: 5px 8px; font-family: var(--font-body); font-size: 12.5px; }
.mtg-settings input[type=time] { width: 110px; }
.mtg-settings input:focus-visible { border-color: var(--mtg-deep); outline: none; }
.mtg-picker { display: flex; flex-direction: column; gap: 7px; }
.mtg-pickin { width: 100%; box-sizing: border-box; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--text); padding: 8px 11px; font-family: var(--font-body); font-size: 13px; }
.mtg-pickin:focus-visible { border-color: var(--mtg-deep); outline: none; }
.mtg-pickres { display: flex; flex-direction: column; gap: 5px; }
.mtg-pickitem { display: flex; flex-direction: column; gap: 1px; text-align: left; background: var(--surface-1); border: 1px solid var(--line); border-radius: 5px; padding: 7px 11px; cursor: pointer; font-family: var(--font-body); }
.mtg-pickitem:hover { border-color: var(--mtg-deep); background: var(--surface-2); }
.mtg-pickitem .dir-nm { font-size: 13px; font-weight: 600; color: var(--text); }
.mtg-pickmeta { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.mtg-body { display: flex; flex-direction: column; gap: 12px; }
.mtg-day { display: flex; flex-direction: column; gap: 6px; }
.mtg-dhead { display: flex; align-items: baseline; gap: 9px; padding: 2px 2px 4px; border-bottom: 1px solid var(--line-soft); }
.mtg-dhead b { font-family: var(--font-display); font-size: 13.5px; color: var(--text); }
.mtg-dsum { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.mtg-route { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--mtg); text-decoration: none; }
.mtg-route:hover { text-decoration: underline; }
.mtg-row { display: flex; align-items: center; gap: 10px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 8px 11px; }
.mtg-time { flex: none; width: 64px; font-family: var(--font-mono); font-weight: 700; font-size: 11.5px; color: var(--mtg); font-variant-numeric: tabular-nums; }
.mtg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mtg-main .dir-nm { cursor: pointer; font-size: 13px; }
.mtg-main .dir-nm:hover { color: var(--mtg); }
.mtg-leg { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.mtg-stat { flex: none; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim); }
.mtg-stat.held { color: var(--followup); border-color: var(--followup-deep); background: var(--followup-dim); }
.mtg-stat.confirmed { color: var(--mtg); border-color: var(--mtg-deep); background: var(--mtg-dim); }
.mtg-stat.done { color: var(--text-dim); }
.mtg-stat.ni { color: var(--noint); border-color: var(--noint-deep); background: var(--noint-dim); }
.mtg-acts { flex: none; display: inline-flex; gap: 5px; }
.mtg-mini { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); border-radius: 5px; width: 26px; height: 26px; display: grid; place-items: center; font-size: 12px; cursor: pointer; }
.mtg-mini:hover { color: var(--text); border-color: var(--line-soft); }
.mtg-mini.ok:hover { color: var(--mtg); border-color: var(--mtg-deep); }
.mtg-mini.x:hover { color: var(--danger); border-color: var(--danger-deep); }

/* meeting pins on the map */
.mtg-pin-wrap { background: none; border: none; }
.mtg-pin { display: inline-flex; align-items: center; gap: 4px; transform: translate(-50%, -100%); white-space: nowrap;
  background: var(--mtg); color: #06302b; border: 2px solid #fff; border-radius: 999px; padding: 2px 8px 2px 6px;
  box-shadow: 0 2px 7px rgba(0,0,0,.5); font-family: var(--font-mono); font-weight: 700; font-size: 10px; }
.mtg-pin.held { background: var(--followup); color: #04243d; }
.mtg-pin-ico { font-size: 10px; }
.mtg-pin-day { letter-spacing: .2px; }

/* ============================================================================
   HELP — the "? Help" topbar button + the full feature-guide modal
   ========================================================================== */
.help-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; font-weight: 700; }
.help-btn .help-lbl { font-weight: 600; }
.help-btn:hover { color: var(--gold); border-color: var(--gold-deep); }

.help-card {
  position: relative; width: min(680px, calc(100vw - 32px)); max-height: 88vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--s-4) var(--s-4) var(--s-3); display: flex; flex-direction: column; gap: var(--s-3);
}
.help-card .note-head b { font-family: var(--font-display); font-size: 16px; }
.help-intro { font-size: 13px; line-height: 1.6; color: var(--text-dim); margin: -2px 0 2px; }
.help-intro b { color: var(--text); }
/* quick-jump chips */
.help-jump { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.help-chip { font-family: var(--font-mono); font-size: 10px; letter-spacing: .3px; text-transform: uppercase;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.help-chip:hover { color: var(--gold); border-color: var(--gold-deep); }
/* one feature section */
.help-sec { scroll-margin-top: 8px; padding: 12px 13px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); }
.help-sec h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 13.5px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.help-sec h4 .help-ico { font-size: 14px; }
.help-lead { margin: 0 0 8px; font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }
.help-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.help-steps li { font-size: 12.5px; line-height: 1.5; color: var(--text); }
.help-steps li b { color: var(--gold); font-weight: 600; }
.help-steps li .kbd { font-family: var(--font-mono); font-size: 10.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--text-dim); }
.help-foot { font-size: 11.5px; color: var(--text-dim); line-height: 1.6; padding-top: 2px; }

/* ============================================================================
   SPLIT LIST — divide the current list across reps + export CSV
   ========================================================================== */
.split-card {
  position: relative; width: min(540px, calc(100vw - 32px)); max-height: 88vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3);
}
.split-sub { margin: -2px 0 2px; font-size: 12.5px; color: var(--text-dim); }
.split-sub b { color: var(--text); }
.split-controls { display: flex; flex-direction: column; gap: 9px; }
.split-replbl { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
#splitReps { flex: 1; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--text); padding: 7px 11px; font-family: var(--font-body); font-size: 13px; }
#splitReps:focus-visible { border-color: var(--gold-deep); outline: none; }
.split-modes { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.split-opt { font-size: 12px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.split-opt input { accent-color: var(--gold); }
.split-preview { display: flex; flex-direction: column; gap: 6px; }
.split-grp { display: flex; align-items: baseline; gap: 10px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 9px 12px; }
.split-gname { font-family: var(--font-display); font-size: 13px; color: var(--gold); min-width: 80px; }
.split-gcount { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }
.split-gcount b { color: var(--text); }
.split-gareas { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Lead Lists modal (builder + saved lists + per-rep progress) ---- */
.ll-card {
  position: relative; width: min(600px, calc(100vw - 32px)); max-height: 88vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-4);
}
.ll-sech { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.ll-sech::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.ll-dim { text-transform: none; letter-spacing: .2px; font-weight: 400; color: var(--text-dim); font-size: 9.5px; }
.ll-build { display: flex; flex-direction: column; gap: 9px; }
.ll-flbl { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 7px; }
.ll-namerow { display: flex; }
.ll-namerow input { flex: 1; }
.ll-trimrow { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
#listName, #splitReps, #listLimit, #listRank {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--text); padding: 7px 10px; font-family: var(--font-body); font-size: 13px;
}
#listLimit { width: 92px; }
#listName:focus-visible, #splitReps:focus-visible, #listLimit:focus-visible, #listRank:focus-visible { border-color: var(--gold-deep); outline: none; }
.ll-buildacts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ll-exp { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.ll-link { background: none; border: none; color: var(--gold); cursor: pointer; font-family: var(--font-mono); font-size: 10.5px; padding: 0; text-decoration: underline; }
.ll-link:hover { color: var(--gold-deep); }
.ll-saved { display: flex; flex-direction: column; gap: 8px; }
#savedLists { display: flex; flex-direction: column; gap: 8px; }
.ll-saveditem { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 10px 12px; display: flex; flex-direction: column; gap: 9px; }
.ll-saveditem.active { border-color: var(--gold-deep); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.ll-shead { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.ll-sname { font-family: var(--font-display); font-size: 14px; color: var(--text); }
.ll-smeta { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.ll-sacts { margin-left: auto; display: inline-flex; gap: 5px; }
.ll-sacts .mtg-mini { width: auto; padding: 0 8px; height: 24px; font-size: 11px; }
.ll-bars { display: flex; flex-direction: column; gap: 5px; }
.ll-rep { display: flex; align-items: center; gap: 9px; }
.ll-rname { min-width: 84px; font-size: 12.5px; color: var(--gold); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-rname:hover { text-decoration: underline; }
.ll-bar { flex: 1; height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.ll-fill { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width var(--dur-2) var(--ease-out); }
.ll-pct { min-width: 92px; text-align: right; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
#listsCount.nonzero { color: var(--gold); }

/* "working a list" banner pinned in the directory */
.list-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; padding: 8px 13px; background: var(--gold-dim); border: 1px solid var(--gold-deep); border-radius: var(--radius-control); }
.list-banner[hidden] { display: none; }
.list-banner-txt { font-size: 12.5px; color: var(--text); }
.list-banner-txt b { color: var(--gold); }
.list-banner-x { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); border-radius: 5px; padding: 4px 10px; font-size: 11px; cursor: pointer; font-family: var(--font-body); }
.list-banner-x:hover { color: var(--text); border-color: var(--line-soft); }
.list-banner-acts { margin-left: auto; display: inline-flex; gap: 6px; flex: none; }
.list-banner-btn { background: var(--gold); color: var(--gold-ink); border: 1px solid var(--gold-deep); border-radius: 5px; padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: var(--font-body); }
.list-banner-btn:hover { background: var(--gold-deep); }

/* top-bar Call List button (accented — it's the home base now) */
.topbtn.callbtn { color: var(--gold); border-color: var(--gold-deep); }
.topbtn.callbtn:hover { background: var(--gold-dim); color: var(--gold); }

/* directory header: Select all + Select-N-to-build-a-call-list */
.dir-seltools { display: inline-flex; align-items: center; gap: 8px; }
.dir-seltools .topbtn { padding: 7px 11px; }
.dsel-box { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); white-space: nowrap; }
#dirSelectN { width: 64px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-control); padding: 6px 8px; font-family: var(--font-body); font-size: 13px; }
#dirSelectN:focus-visible { border-color: var(--gold-deep); outline: none; }
.dsel-of { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.bulk-btn.primary { background: var(--gold); color: var(--gold-ink); border-color: var(--gold-deep); font-weight: 600; }
.bulk-btn.primary:hover { background: var(--gold-deep); }

/* list cards in the home view (recursive / nested) */
.ll-listcard { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.ll-listcard.active .ll-lc-head { border-color: var(--gold-deep); }
.ll-lc-head { display: flex; align-items: baseline; gap: 10px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 9px 12px; cursor: pointer; }
.ll-lc-head:hover { border-color: var(--line-soft); background: var(--surface-2); }
.ll-lc-name { font-family: var(--font-display); font-size: 13.5px; color: var(--text); }
.ll-lc-meta { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.ll-lc-pct { margin-left: auto; font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.ll-lc-pct.behind { color: var(--danger); }
.ll-lc-bar { height: 6px; }

/* dashboard (drill-in) */
.ll-back { align-self: flex-start; background: none; border: none; color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; cursor: pointer; padding: 0 0 2px; }
.ll-back:hover { color: var(--gold); }
.ll-dh { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ll-dtitle { margin: 0; font-family: var(--font-display); font-size: 18px; color: var(--text); }
.ll-dactions { margin-left: auto; display: inline-flex; gap: 6px; }
.ll-dactions .rt-btn { margin-left: 0; }
.ll-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ll-metric { display: flex; flex-direction: column; gap: 2px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 9px 10px; }
.ll-metric.big { background: var(--gold-dim); border-color: var(--gold-deep); }
.ll-metric.ok { border-color: var(--mtg-deep); }
.ll-metric.behind { border-color: var(--danger-deep); }
.ll-mval { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.ll-metric.big .ll-mval { color: var(--gold); font-size: 20px; }
.ll-metric.ok .ll-mval { color: var(--mtg); }
.ll-metric.behind .ll-mval { color: var(--danger); }
.ll-mlbl { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--text-dim); }
.ll-dbar { height: 10px; }
.ll-dates { display: flex; gap: 16px; flex-wrap: wrap; }
.ll-dates input[type=date] { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--text); padding: 5px 9px; font-family: var(--font-body); font-size: 12.5px; }
.ll-dates input[type=date]:focus-visible { border-color: var(--gold-deep); outline: none; }
.ll-refine { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ll-kids { display: flex; flex-direction: column; gap: 6px; }

/* "Mark poster put up" button on poster-spot popups */
.pop-postered { width: 100%; box-sizing: border-box; margin-top: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-control); padding: 8px 12px; font-size: 12.5px; cursor: pointer; font-family: var(--font-body); }
.pop-postered:hover { border-color: var(--gold-deep); }
.pop-postered.on { color: var(--gold); border-color: var(--gold-deep); background: rgba(252,210,59,.08); }

/* numbered route stop markers + the loop line */
.route-num-wrap { background: none; border: none; }
.route-num { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--gold-ink); border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.5); font-family: var(--font-mono); font-weight: 700; font-size: 12px; }

/* Tools ▾ dropdown — groups the panel tools so the top bar stays one row */
.tools-wrap { position: relative; flex: none; }
.tools-caret { font-size: 9px; opacity: .65; }
.tools-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 2500; min-width: 188px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: 5px; display: flex; flex-direction: column; gap: 1px;
}
.tools-menu[hidden] { display: none; }
.tm-item {
  display: flex; align-items: center; gap: 8px; width: 100%; height: auto; text-align: left;
  background: transparent; border: none; color: var(--text); cursor: pointer;
  font-family: var(--font-body); font-size: 13px; padding: 8px 10px; border-radius: 5px;
}
.tm-item:hover { background: var(--surface-2); color: var(--text); }
.tm-item .topbtn-badge { margin-left: auto; }

/* Map-theme sun/moon toggle — bottom-right control stack (with zoom + HQ) */
.theme-toggle {
  display: flex; flex-direction: column; overflow: hidden; margin-bottom: 8px;
  background: var(--panel); border: 1px solid rgba(0,0,0,.2);
  border-radius: 8px; box-shadow: 0 1px 5px rgba(0,0,0,.4);
}
.theme-toggle .tt-opt {
  width: 30px; height: 28px; display: grid; place-items: center; padding: 0;
  background: var(--panel); border: none; cursor: pointer; color: var(--text-dim);
  transition: background .12s, color .12s;
}
.theme-toggle .tt-opt + .tt-opt { border-top: 1px solid var(--line); }
.theme-toggle .tt-opt svg { width: 15px; height: 15px; display: block; }
.theme-toggle .tt-opt:hover { color: var(--text); }
.theme-toggle .tt-opt.on { background: var(--gold); color: var(--gold-ink); }

/* Collapsible filter panel — slim icon+count rail */
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.panel-head-lbl { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-dim); }
.panel-collapse {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center; padding: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text-dim); cursor: pointer; font-size: 16px; line-height: 1;
  transition: transform .18s var(--ease-out), color .12s, border-color .12s;
}
.panel-collapse:hover { color: var(--text); border-color: var(--line-soft); }

#panel.collapsed { width: 54px; padding: var(--s-3) 7px var(--s-4); }
#panel.collapsed h3,
#panel.collapsed .slider-wrap,
#panel.collapsed .chips,
#panel.collapsed .panel-advtoggle,
#panel.collapsed #panelAdv,
#panel.collapsed .row .lbl,
#panel.collapsed .row input,
#panel.collapsed .panel-head-lbl { display: none; }
#panel.collapsed .panel-head { justify-content: center; margin-bottom: var(--s-2); }
#panel.collapsed .panel-collapse { transform: rotate(180deg); }
#panel.collapsed .row { flex-direction: column; gap: 3px; padding: 7px 0; justify-content: center; }
#panel.collapsed .row .n { font-size: 9.5px; }
#panel.collapsed .row:has(input:not(:checked)) { opacity: .3; }

/* ============================================================
   TASK-4 — Call List full PAGE · right metrics rail · rep chips
   ============================================================ */

/* --- Call List promoted from a centered modal to a full-screen page (like #directory) --- */
#splitModal { align-items: stretch; justify-content: stretch; padding: 0; }
.ll-card {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  border-radius: 0; border: none; padding: 0; gap: 0;
}
.ll-card > .note-head {
  padding: 14px 24px; border-bottom: 1px solid var(--line); flex: none;
}
.ll-card > .note-head #splitTitle { font-family: var(--font-display); font-size: 18px; }
#llHome {
  flex: 1; min-height: 0; overflow: auto; padding: 22px 26px;
  display: grid; grid-template-columns: minmax(360px, 440px) 1fr; gap: 30px; align-items: start;
}
#llHome .ll-build, #llHome .ll-saved { gap: 12px; }
#llDash { flex: 1; min-height: 0; overflow: auto; padding: 22px 26px; max-width: 980px; margin: 0 auto; width: 100%; box-sizing: border-box; }
@media (max-width: 920px) { #llHome { grid-template-columns: 1fr; gap: 22px; } }

/* --- assigned-rep chip (directory rows + rail) --- */
.rep-chip {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .4px; font-weight: 600;
  color: var(--rep, var(--gold)); padding: 1.5px 6px; border-radius: 3px; line-height: 1.3;
  background: color-mix(in srgb, var(--rep, #FCD23B) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--rep, #FCD23B) 42%, transparent);
}
.rep-chip .rep-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rep, var(--gold)); flex: none; }
.dir-rep { text-transform: none; }

/* --- right metrics rail (collapsible, fixed) --- */
/* Floating card (matches the left filter panel) — inset from the edges + rounded, so there's
   no hard bar edge framing the map into a "grey strip" at the top. Fixed overlay → still does
   zero work on map move. */
#metricsRail { position: fixed; z-index: 1100; box-sizing: border-box; }
/* Matches the left filter panel's styling (top, edge inset, width, radius, shadow) but stays
   sized to its content — no tall empty space below the call-week card. */
#metricsRail.open {
  top: 58px; right: var(--s-4); bottom: auto; max-height: calc(100vh - 78px); width: 272px;
  display: flex; flex-direction: column; gap: 11px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--elev-2); padding: var(--s-4) var(--s-4) var(--s-5);
}
#metricsRail.open::-webkit-scrollbar { width: 10px; }
#metricsRail.open::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 3px solid var(--panel); }
/* when expanded over the DIRECTORY, inset the directory's CONTENT (not the element) so the rail
   never hides columns. padding-right (not right:) keeps the directory's dark background covering
   the full width — so the map never peeks through behind the rail. Reflows only on rail toggle. */
body.rail-expanded #directory { padding-right: 300px; }
#metricsRail:not(.open) {
  top: 50%; right: 0; transform: translateY(-50%); width: 36px;
  background: transparent; box-shadow: none; padding: 0;
}
#metricsRail[hidden] { display: none; }
.rail-tab {
  width: 36px; padding: 16px 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: var(--panel); border: 1px solid var(--line); border-right: none; border-radius: 10px 0 0 10px;
  box-shadow: -6px 0 18px rgba(0,0,0,.2);
}
.rail-tab .rail-tab-chev { color: var(--text-dim); font-size: 13px; }
.rail-tab .rail-tab-pct { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--gold); font-variant-numeric: tabular-nums; }
.rail-tab .rail-tab-lbl { writing-mode: vertical-rl; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 2px; color: var(--text-dim); }
.rail-head { display: flex; align-items: center; gap: 9px; }
.rail-collapse { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 16px; padding: 0 2px; line-height: 1; }
.rail-collapse:hover { color: var(--text); }
.rail-kicker { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 2px; color: var(--gold); }
.rail-listname {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--text); cursor: pointer; text-align: left; padding: 8px 11px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.rail-listname:hover { border-color: var(--gold-deep); }
.rail-listname .rail-open-i { color: var(--gold); font-weight: 400; }
.rail-due { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); margin-top: -3px; }
.rail-big { display: flex; align-items: baseline; gap: 7px; }
.rail-bigpct { font-family: var(--font-display); font-weight: 700; font-size: 34px; color: var(--gold); font-variant-numeric: tabular-nums; }
.rail-bigpct.behind { color: #fbbf24; }
.rail-biglbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.rail-bar { height: 7px; flex: none; }
#metricsRail .ll-bar { flex: none; }
.rail-rep .ll-bar { height: 6px; }
.rail-stats { display: flex; gap: 10px; }
.rail-stats > span { flex: 1; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); line-height: 1.35; }
.rail-stats b { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.rail-stats .ok b { color: #34d399; } .rail-stats .behind b { color: #fbbf24; }
.rail-stats .ok, .rail-stats .behind { color: var(--text-dim); }
.rail-empty { font-family: var(--font-body); font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }
/* "THIS VIEW" snapshot — live authority + fleet breakdown of the current directory list */
.rail-sep { height: 1px; background: var(--line-soft); margin: 6px 0 2px; }
.rv-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.rv-count b { color: var(--text); }
.rv-grp-h { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-top: 9px; margin-bottom: 1px; }
.rv-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.rv-lbl { width: 54px; flex: none; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.rv-track { flex: 1; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.rv-fill { display: block; height: 100%; background: var(--text-dim); border-radius: 999px; }
.rv-fill.rv-forhire { background: #2DD4BF; }
.rv-fill.rv-broker { background: #E879F9; }
.rv-fill.rv-private { background: #8A8A93; }
.rv-n { width: 46px; flex: none; text-align: right; font-family: var(--font-mono); font-size: 10px; color: var(--text); font-variant-numeric: tabular-nums; }
.rail-reps-h { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-top: 2px; }
.rail-dim { text-transform: none; letter-spacing: .2px; font-weight: 400; color: var(--text-dim); font-size: 9px; }
.rail-reps { display: flex; flex-direction: column; gap: 7px; }
.rail-rep {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  padding: 7px 9px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; text-align: left;
}
.rail-rep:hover { border-color: var(--gold-deep); }
.rail-rep.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.rail-rep-top { display: flex; align-items: center; gap: 6px; }
.rail-rep-n { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.rail-you { font-family: var(--font-mono); font-size: 8px; color: var(--gold-ink); background: var(--gold); padding: 0 4px; border-radius: 2px; letter-spacing: .5px; }
.rail-workall, .rail-clearfilter {
  margin-top: 4px; background: var(--gold); color: var(--gold-ink); border: none; border-radius: var(--radius-control);
  padding: 8px; cursor: pointer; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .4px;
}
.rail-clearfilter { background: var(--surface-2); color: var(--text-dim); }
.rail-clearfilter:hover { color: var(--text); }
/* keep the rail out of the way on narrow screens (overlay still reachable via the tab) */
@media (max-width: 760px) { #metricsRail.open { width: 240px; } }

/* ============================================================
   TASK-5 — username modal · rep picker · guided walkthrough
   ============================================================ */

/* --- first-login "pick your name" modal --- */
#ugate { position: fixed; inset: 0; z-index: 2600; display: grid; place-items: center; background: rgba(6,7,9,.72); backdrop-filter: blur(3px); }
#ugate[hidden] { display: none; }   /* same id-specificity guard as #tour */
.ug-card {
  width: min(420px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--gold-deep);
  border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 26px 26px 22px;
  display: flex; flex-direction: column; gap: 11px;
}
.ug-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2.5px; color: var(--gold); }
.ug-card h2 { font-family: var(--font-display); font-size: 22px; margin: 0; }
.ug-card p { color: var(--text-dim); font-size: 13px; line-height: 1.5; margin: 0; }
#ugName {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--text); padding: 10px 12px; font-family: var(--font-body); font-size: 15px; margin-top: 4px;
}
#ugName:focus-visible { border-color: var(--gold-deep); outline: none; }
.ug-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.ug-color { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2px solid transparent; cursor: pointer; }
.ug-color.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }
.ug-acts { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
#ugSave { background: var(--gold); color: var(--gold-ink); border: none; border-radius: var(--radius-control); padding: 9px 20px; font-family: var(--font-mono); font-weight: 700; font-size: 13px; cursor: pointer; }
.ug-skip { background: none; border: none; color: var(--text-dim); cursor: pointer; font-family: var(--font-mono); font-size: 12px; }
.ug-skip:hover { color: var(--text); }

/* --- rep picker chips in the Call List builder --- */
.ll-reps-block { display: flex; flex-direction: column; gap: 7px; }
#splitReps { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--text); padding: 7px 10px; font-family: var(--font-body); font-size: 13px; }
#splitReps:focus-visible { border-color: var(--gold-deep); outline: none; }
.rep-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chip {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px 4px 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
}
.rp-chip .rep-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rep, var(--gold)); }
.rp-chip:hover { color: var(--text); border-color: var(--gold-deep); }
.rp-chip.on { color: var(--text); border-color: var(--rep, var(--gold)); background: color-mix(in srgb, var(--rep, #FCD23B) 14%, transparent); }

/* --- guided walkthrough --- */
#tour { position: fixed; inset: 0; z-index: 2700; display: grid; place-items: center; background: rgba(5,6,8,.66); backdrop-filter: blur(2px); }
#tour[hidden] { display: none; }   /* the id+display rule outranks UA [hidden]; this makes endTour() actually hide it */
.tour-card {
  width: min(460px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--gold-deep);
  border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 28px 28px 22px; text-align: center;
}
.tour-ico { font-size: 38px; line-height: 1; }
.tour-title { font-family: var(--font-display); font-size: 22px; margin: 12px 0 8px; }
.tour-body { color: var(--text); font-size: 14px; line-height: 1.6; margin: 0 0 18px; }
.tour-body b { color: var(--gold); font-weight: 700; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.tour-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tour-dot.on { background: var(--gold); }
.tour-acts { display: flex; align-items: center; justify-content: space-between; }
.tour-nav { display: inline-flex; gap: 8px; }
.tour-skip { background: none; border: none; color: var(--text-dim); cursor: pointer; font-family: var(--font-mono); font-size: 12px; min-width: 40px; text-align: left; }
.tour-skip:hover { color: var(--text); }
.tour-prev { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-control); padding: 8px 16px; cursor: pointer; font-family: var(--font-mono); font-size: 12px; }
.tour-next { background: var(--gold); color: var(--gold-ink); border: none; border-radius: var(--radius-control); padding: 8px 18px; cursor: pointer; font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.help-head-acts { display: inline-flex; align-items: center; gap: 10px; }
