/* ─────────────────────────────────────────────────────────────────────────
 * Fiber Lead-Gen — dashboard styles
 * ─────────────────────────────────────────────────────────────────────────*/

:root {
  /* ── NEON FIBER brand palette (2026-05-31) ── */
  --neon-cyan:   #22D3EE;   /* primary */
  --neon-blue:   #3B82F6;   /* secondary */
  --neon-violet: #A78BFA;   /* accent */
  --neon-cyan-glow:   rgba(34, 211, 238, 0.45);
  --neon-violet-glow: rgba(167, 139, 250, 0.40);

  --bg:          #07090F;   /* near-black */
  --bg-2:        #0b1020;
  --panel:       rgba(16, 23, 42, 0.66);
  --panel-solid: #0e1526;
  --panel-2:     rgba(26, 35, 60, 0.85);
  --border:      rgba(34, 211, 238, 0.16);
  --border-bright: rgba(34, 211, 238, 0.42);
  --text:        #E5E7EB;
  --text-muted:  #94A3B8;
  --text-dim:    #5b6b8c;

  /* Interactive accent — neon cyan in chrome (var name kept for cascade) */
  --accent-blue: #22D3EE;
  /* Signal-type palette — used ONLY inside signal rows + timeline */
  --sig-press:  #38bdf8;
  --sig-job:    #fbbf24;
  --sig-bead:   #c084fc;
  --sig-permit: #f472b6;
  --sig-social: #f97316;
  --sig-map:    #22c55e;
  /* Band colors */
  --high:       #22c55e;
  --high-glow:  rgba(34, 197, 94, 0.40);
  --med:        #f59e0b;
  --low:        #6b7280;
  --cold:       #3b82f6;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow-1:  0 1px 2px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.35);
  --shadow-2:  0 4px 24px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04) inset;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background:
    radial-gradient(1100px 700px at 82% -12%, rgba(34,211,238,0.10), transparent 60%),
    radial-gradient(900px 600px at 8% 8%, rgba(167,139,250,0.07), transparent 55%),
    linear-gradient(180deg, #07090F 0%, #0a0e1a 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ───── Layout ─────────────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 64px 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
  height: 100vh;
}

/* ───── Topbar ─────────────────────────────────────────────────────────── */
header.topbar {
  grid-area: header;
  background: linear-gradient(90deg, rgba(30,58,138,0.85) 0%, rgba(11,20,55,0.85) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 12px;
  position: relative;
}
header.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  opacity: 0.4;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fbbf24 0%, #ef4444 100%);
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow:
    0 0 24px rgba(249, 115, 22, 0.55),
    0 0 8px rgba(239, 68, 68, 0.45),
    0 4px 12px rgba(0,0,0,0.5);
}
.brand .name {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 19px;
  background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 45%, #f97316 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(249, 115, 22, 0.25);
}
.brand .tag { color: var(--text-muted); font-size: 12px; margin-top: 1px; }
header .spacer { flex: 1; }
header #searchbox {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  width: 260px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
header #searchbox::placeholder { color: var(--text-dim); }
header #searchbox:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}

/* Filters drawer toggle — hidden by default, shown <1280px */
.filter-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.25);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-toggle:hover { border-color: var(--accent-blue); color: var(--text); }
.filter-toggle svg { width: 14px; height: 14px; }
.filter-toggle-count {
  background: var(--accent-blue);
  color: #032138;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
  display: none;
}
.filter-toggle-count.has-filters { display: inline-block; }

/* ───── Unified pill component ─────────────────────────────────────────── */
/* Used in topbar (info pills), sidebar (toggle pills), and chip combobox */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border: 1px solid transparent;
  cursor: default;
  white-space: nowrap;
}
.pill--info {
  background: rgba(56,189,248,0.10);
  border-color: rgba(56,189,248,0.28);
  color: #bae6fd;
}
/* Toggle pills (carrier + band) */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.pill-group .pill {
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 5px 12px;
  font-size: 11px;
  /* inactive = outlined */
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-bright);
}
.pill-group .pill:hover { color: var(--text); border-color: rgba(91,124,217,0.6); }
/* Active state is set per-modifier below */
.pill-group .pill.active { color: #fff; }

/* Carrier toggle pills */
.pill--carrier-att         { border-color: rgba(0,162,224,0.5); }
.pill--carrier-att.active  { background: rgba(0,162,224,0.22); border-color: rgba(0,162,224,0.7); color: #67e8f9; }
.pill--carrier-optimum        { border-color: rgba(244,114,182,0.5); }
.pill--carrier-optimum.active { background: rgba(244,114,182,0.18); border-color: rgba(244,114,182,0.7); color: #fbcfe8; }
.pill--carrier-lumos        { border-color: rgba(168,85,247,0.5); }
.pill--carrier-lumos.active { background: rgba(168,85,247,0.18); border-color: rgba(168,85,247,0.7); color: #e9d5ff; }

/* Band toggle pills */
.pill--band-HIGH         { border-color: rgba(34,197,94,0.5); }
.pill--band-HIGH.active  { background: rgba(34,197,94,0.20); border-color: rgba(34,197,94,0.7); color: #86efac; }
.pill--band-MEDIUM         { border-color: rgba(245,158,11,0.5); }
.pill--band-MEDIUM.active  { background: rgba(245,158,11,0.18); border-color: rgba(245,158,11,0.7); color: #fcd34d; }
.pill--band-LOW         { border-color: rgba(107,114,128,0.5); }
.pill--band-LOW.active  { background: rgba(107,114,128,0.20); border-color: rgba(107,114,128,0.7); color: #d1d5db; }
.pill--band-COLD         { border-color: rgba(59,130,246,0.5); }
.pill--band-COLD.active  { background: rgba(59,130,246,0.18); border-color: rgba(59,130,246,0.7); color: #93c5fd; }

/* Carrier chips (table + drilldown sub-header) */
.carrier-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.carrier-chip.att     { background: rgba(0,162,224,0.18);   color: #67e8f9; border: 1px solid rgba(0,162,224,0.35); }
.carrier-chip.optimum { background: rgba(244,114,182,0.18); color: #fbcfe8; border: 1px solid rgba(244,114,182,0.35); }
.carrier-chip.lumos   { background: rgba(168,85,247,0.18);  color: #e9d5ff; border: 1px solid rgba(168,85,247,0.35); }

/* ───── Sidebar ────────────────────────────────────────────────────────── */
aside.sidebar {
  grid-area: sidebar;
  background: rgba(11,20,55,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  padding: 14px 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
aside.sidebar h3 {
  margin: 18px 0 8px 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
aside.sidebar h3:first-child { margin-top: 0; }

/* Filter status row */
.filter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
  font-size: 11px;
  gap: 8px;
}
.filter-match {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.filter-active { color: var(--text-muted); margin-left: 4px; }
.clear-all {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 10px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.clear-all:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* Preset chips */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 2px;
}
.preset-chip {
  background: rgba(56,189,248,0.07);
  border: 1px solid rgba(56,189,248,0.22);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 600;
}
.preset-chip:hover { background: rgba(56,189,248,0.14); border-color: var(--accent-blue); color: var(--text); }
.preset-chip.active { background: rgba(56,189,248,0.18); border-color: var(--accent-blue); color: var(--accent-blue); }

/* State chip combobox */
.chip-combo {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.2);
  padding: 5px 8px;
  min-height: 34px;
}
.chip-combo .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 2px;
}
.chip-combo .chips:empty { margin: 0; }
.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56,189,248,0.15);
  border: 1px solid rgba(56,189,248,0.40);
  color: #bae6fd;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
}
.state-chip button {
  background: none; border: none;
  color: var(--text-dim); cursor: pointer;
  padding: 0; font-size: 12px; line-height: 1;
  transition: color 0.12s;
}
.state-chip button:hover { color: var(--text); }
.chip-combo input {
  background: none;
  border: none;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  width: 100%;
  padding: 0;
  outline: none;
}
.chip-combo input::placeholder { color: var(--text-dim); }
.chip-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #0d1535;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  z-index: 200;
  max-height: 160px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.chip-dropdown-item {
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.12s ease;
}
.chip-dropdown-item:hover,
.chip-dropdown-item.focused { background: rgba(56,189,248,0.10); color: var(--text); }

/* Sliders */
aside.sidebar input[type=range] {
  width: 100%;
  accent-color: var(--accent-blue);
  margin: 4px 0 0;
  cursor: pointer;
}
.slider-wrap { position: relative; }
.slider-head-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
}
.slider-reset {
  background: none; border: none;
  color: var(--text-dim);
  font-size: 10px; font-family: inherit;
  cursor: pointer; padding: 0;
  transition: color 0.12s;
}
.slider-reset:hover { color: var(--accent-blue); }
.filter-value { color: var(--accent-blue); font-size: 12px; font-weight: 700; }
.slider-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  background: #0d1535;
  border: 1px solid var(--border-bright);
  color: var(--accent-blue);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
}

/* Check-row label (Geography) */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  border-radius: 6px;
  transition: background 0.15s ease;
}
.check-row:hover { background: rgba(56,189,248,0.06); }
.check-row input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px;
  border: 1.5px solid var(--border-bright);
  border-radius: 4px; cursor: pointer;
  background: rgba(0,0,0,0.2);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.check-row input[type=checkbox]:checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.18);
}
.check-row input[type=checkbox]:checked::after {
  content: "✓";
  color: #032138; font-weight: 900; font-size: 10px; line-height: 1;
}

/* ───── Main ───────────────────────────────────────────────────────────── */
main.main {
  grid-area: main;
  overflow-y: auto;
  padding: 20px 24px;
}

/* ───── KPI strip — 4 tiles, solid numbers ─────────────────────────────── */
.kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi-sub {
  font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.06em; margin-top: 4px;
  text-transform: uppercase;
}
.kpi--hot       .value { color: var(--high); text-shadow: 0 0 14px var(--high-glow); }
.kpi--hot::before       { background: linear-gradient(90deg, transparent, var(--high), transparent); opacity: 0.6; }
.kpi--warm      .value { color: var(--med); }
.kpi--warm::before      { background: linear-gradient(90deg, transparent, var(--med), transparent); opacity: 0.5; }
.kpi--confirmed .value { color: #4ade80; }
.kpi--confirmed::before { background: linear-gradient(90deg, transparent, #4ade80, transparent); opacity: 0.55; }
.kpi {
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  opacity: 0.35;
}
.kpi:hover { transform: translateY(-2px); border-color: var(--border-bright); }
.kpi .label {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex; align-items: center; gap: 5px;
}
.kpi .label svg { width: 13px; height: 13px; opacity: 0.7; flex-shrink: 0; }
.kpi .value {
  font-size: 34px;
  font-weight: 800;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.5px;
}
/* HIGH kpi gets a green tint */
#kpi-high { color: var(--high); }

/* ───── Map ────────────────────────────────────────────────────────────── */
.map-wrap {
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-1);
}
.map-wrap h2 {
  margin: 0 0 10px 4px;
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px;
  display: flex; align-items: center; gap: 8px;
}
.map-wrap h2 .dot,
.section-heading .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
  flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
#map {
  height: 400px;
  border-radius: var(--radius-sm);
  background: #061027;
}

/* ───── Table ──────────────────────────────────────────────────────────── */
section.table-wrap {
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
}
.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
section.table-wrap h2 {
  margin: 0;
  font-size: 15px; font-weight: 700; letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 10px;
}
section.table-wrap h2 .count {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.20);
  padding: 2px 10px; border-radius: 999px;
}
.table-controls { display: flex; align-items: center; gap: 8px; }
.ghost-btn {
  background: rgba(56,189,248,0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.ghost-btn:hover, .ghost-btn[aria-pressed="true"] {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(56,189,248,0.10);
}
/* Mobile sort-by hidden at desktop */
.sort-by-mobile { display: none; }

/* Hide demo columns by default; revealed by toggle */
.demo-col { display: none; }
.show-demo .demo-col { display: table-cell; }

table.areas { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.areas th {
  text-align: left;
  background: rgba(11,20,55,0.6);
  color: var(--text-muted); font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap; cursor: pointer; user-select: none;
  text-transform: uppercase; letter-spacing: 0.8px; font-size: 10px;
  position: sticky; top: 0;
}
table.areas th:hover { color: var(--text); }
table.areas th .arrow { color: var(--accent-blue); margin-left: 4px; font-size: 9px; }
table.areas td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(91,124,217,0.07);
  line-height: 1.45;
}
/* Alternating row tint */
table.areas tbody tr:nth-child(even) td { background: rgba(255,255,255,0.014); }
table.areas tbody tr { cursor: pointer; transition: background 0.12s ease; }
table.areas tbody tr:hover td { background: rgba(56,189,248,0.07); }
/* HIGH rows: 3px solid left + soft tint */
table.areas tbody tr.high-row td { background: rgba(34,197,94,0.04); }
table.areas tbody tr.high-row td:first-child { border-left: 3px solid var(--high); }
table.areas tbody tr.high-row:hover td { background: rgba(34,197,94,0.08); }

/* Place column — wider + bolder */
th.col-place, td.col-place { font-weight: 600; }

.band {
  display: inline-block;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid transparent;
}
.band.HIGH   { background: rgba(34,197,94,0.20);  color: #86efac; border-color: rgba(34,197,94,0.5);   box-shadow: 0 0 8px rgba(34,197,94,0.15); }
.band.MEDIUM { background: rgba(245,158,11,0.18);  color: #fcd34d; border-color: rgba(245,158,11,0.45); }
.band.LOW    { background: rgba(107,114,128,0.18); color: #d1d5db; border-color: rgba(107,114,128,0.4); }
.band.COLD   { background: rgba(59,130,246,0.18);  color: #93c5fd; border-color: rgba(59,130,246,0.4);  }

.muted { color: var(--text-muted); }
.dim   { color: var(--text-dim); }

.score-cell {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.score-cell .bar { width: 34px; height: 5px; background: rgba(91,124,217,0.15); border-radius: 999px; overflow: hidden; }
.score-cell .bar > i { display: block; height: 100%; background: var(--accent-blue); border-radius: 999px; }

.empty { color: var(--text-muted); padding: 28px; text-align: center; font-size: 13px; font-style: italic; }

/* Mobile card list (shown <1024px) */
.areas-cards { display: none; }
.area-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(11,20,55,0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.area-card.high-card { border-left: 3px solid var(--high); background: rgba(34,197,94,0.04); }
.area-card:hover { background: rgba(56,189,248,0.07); }
.area-card-left { flex: 1; overflow: hidden; }
.area-card-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.area-card-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.area-card-score { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; flex-shrink: 0; color: var(--text); }

/* ───── Evidence tier ──────────────────────────────────────────────────── */
.evidence-tier {
  display: inline-block; padding: 2px 7px;
  border-radius: 4px; font-size: 10px; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase; border: 1px solid;
}
.evidence-tier.STRONG   { background: rgba(34,197,94,0.15);  color: #86efac; border-color: rgba(34,197,94,0.5);   }
.evidence-tier.MODERATE { background: rgba(56,189,248,0.12); color: #7dd3fc; border-color: rgba(56,189,248,0.4);  }
.evidence-tier.WEAK     { background: rgba(245,158,11,0.15); color: #fcd34d; border-color: rgba(245,158,11,0.45); }
.evidence-tier.THIN     { background: rgba(239,68,68,0.15);  color: #fca5a5; border-color: rgba(239,68,68,0.5);   }

/* Smaller variant for table rows */
.evidence-tier.tier-sm  { padding: 1px 5px; font-size: 9px; letter-spacing: 1px; display: block; margin-top: 3px; width: fit-content; }

/* Band+evidence stacked cell */
.col-band-evidence { vertical-align: middle; }

/* Signal type dots in table */
.sig-cell { white-space: nowrap; }
.sig-dots { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; vertical-align: middle; }
.sig-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.sig-dot.press_release { background: var(--sig-press); }
.sig-dot.job_posting   { background: var(--sig-job); }
.sig-dot.bead_award    { background: var(--sig-bead); }
.sig-dot.permit        { background: var(--sig-permit); }
.sig-dot.social_post   { background: var(--sig-social); }
.sig-dot.broadband_map { background: var(--sig-map); }
.sig-dot.form_477      { background: #a78bfa; }
.sig-dot.address_check { background: #34d399; }
.sig-dot.pole_attachment { background: #fb923c; }

/* ───── Intel section (competition + demographics 2-col) ───────────────── */
.dd-intel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px 0;
}
.intel-col {
  background: rgba(11,20,55,0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}
.intel-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-dim); font-weight: 700; margin-bottom: 6px;
}
.intel-row {
  font-size: 11px; color: var(--text-muted); padding: 2px 0;
  border-bottom: 1px solid rgba(91,124,217,0.05);
  line-height: 1.4;
}
.intel-row:last-child { border-bottom: none; }
.intel-row.intel-good { color: #86efac; }
.intel-row.intel-bad  { color: #fca5a5; }
.intel-row.intel-dim  { color: var(--text-dim); font-style: italic; }

/* ───── Concerns section ────────────────────────────────────────────────── */
.concerns {
  margin: 0 0 14px 0;
  background: rgba(30, 16, 6, 0.50);
  border: 1px solid rgba(245,158,11,0.25);
  border-left: 3px solid rgba(245,158,11,0.7);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.concerns-title {
  font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(245,158,11,0.8); font-weight: 700; margin-bottom: 7px;
  display: flex; align-items: center; gap: 5px;
}
.concerns-title::before {
  content: "⚠";
  font-size: 11px;
}
.concerns ul { margin: 0; padding: 0; list-style: none; }
.concerns li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 5px 0; font-size: 12px; line-height: 1.45;
  border-bottom: 1px solid rgba(245,158,11,0.07);
}
.concerns li:last-child { border-bottom: none; }
.concerns .icon { flex-shrink: 0; width: 18px; font-size: 13px; }
.concerns .c-body { display: flex; flex-direction: column; gap: 1px; }
.concerns .c-text { color: #fde68a; }
.concerns li.concern-warn .c-text { color: #fca5a5; }
.concerns li.concern-info .c-text { color: #fde68a; }
.concerns .c-source { color: var(--text-dim); font-size: 10px; font-style: italic; }
.no-concerns {
  font-size: 11px; color: #86efac; font-style: italic;
  padding: 2px 0;
}

/* ───── Drilldown ──────────────────────────────────────────────────────── */
.drilldown-overlay {
  position: fixed; inset: 0;
  background: rgba(3,8,30,0.6);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: none; z-index: 9000;
  animation: fadeIn 0.18s ease-out;
}
.drilldown-overlay.open { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.drilldown {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 600px; max-width: 95vw;
  background: linear-gradient(180deg, #0d1535 0%, #060a1f 100%);
  border-left: 1px solid var(--border-bright);
  z-index: 9001;
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
}
.drilldown.open { transform: translateX(0); }

/* Sticky header */
.drilldown-header {
  position: relative;
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(13,21,53,0.97), rgba(13,21,53,0.8));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
  z-index: 2;
}
.drilldown .close-x {
  position: absolute; top: 14px; right: 18px;
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 17px;
  cursor: pointer; display: grid; place-items: center;
  transition: all 0.15s ease;
}
.drilldown .close-x:hover { background: rgba(255,255,255,0.10); color: var(--text); }
.drilldown h2 { margin: 0 48px 4px 0; font-size: 19px; font-weight: 700; letter-spacing: 0.2px; }
.dd-summary { color: var(--text-muted); font-size: 12px; line-height: 1.5; }

/* Scrollable body */
.dd-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 8px;
  /* Leave room for action bar */
  padding-bottom: 12px;
}

/* 4-stat row (replaces old stat-grid) */
.dd-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.dd-stat {
  background: rgba(11,20,55,0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.dd-stat-l {
  font-size: 9px; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-dim); font-weight: 700;
}
.dd-stat-v {
  font-size: 22px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2; margin-top: 3px;
  color: var(--text);
}
.dd-stat-meta {
  margin-top: 4px;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 10px; color: var(--text-dim); line-height: 1.3;
}

/* Rationale (promoted above map) */
.rationale {
  margin: 0 0 16px 0;
  background: rgba(11,20,55,0.45);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.rationale .why-title {
  font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-dim); font-weight: 700; margin-bottom: 7px;
}
.rationale ul { margin: 0; padding: 0; list-style: none; }
.rationale li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 5px 0;
  font-size: 12px; line-height: 1.45;
  border-bottom: 1px solid rgba(91,124,217,0.06);
}
.rationale li:last-child { border-bottom: none; }
.rationale .r-body { display: flex; flex-direction: column; gap: 1px; }
.rationale .r-source { color: var(--text-dim); font-size: 10px; font-style: italic; }
.rationale li .icon { flex-shrink: 0; width: 18px; font-size: 13px; }
.rationale li.cat-momentum   { color: #fcd34d; }
.rationale li.cat-signal     { color: #bae6fd; }
.rationale li.cat-proof      { color: #c4b5fd; }
.rationale li.cat-demographic { color: #86efac; }
.rationale li.cat-caveat     { color: var(--text-dim); font-style: italic; font-size: 11px; }

/* Section heading */
.section-heading {
  margin: 14px 0 8px 0; font-size: 10px; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700;
  display: flex; align-items: center; gap: 7px;
}

/* Per-area mini-map */
.area-map-wrap { margin-bottom: 12px; }
#dd-map { height: 200px; border-radius: var(--radius-sm); background: #061027; border: 1px solid var(--border); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 12px 0 0 0; }
.tabs button {
  background: none; border: none; color: var(--text-muted);
  padding: 9px 14px; cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  font-family: inherit;
  transition: all 0.15s ease;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent-blue); }
.tabs button .badge {
  display: inline-block; min-width: 16px; padding: 0 5px;
  height: 16px; line-height: 16px; text-align: center;
  border-radius: 999px;
  background: rgba(56,189,248,0.12); color: var(--accent-blue);
  font-size: 10px; font-weight: 700; margin-left: 5px;
  vertical-align: middle;
}
/* Tab body scrolls independently */
.dd-tabbody { max-height: 280px; overflow-y: auto; padding-top: 10px; }

/* ───── Sticky action bar ──────────────────────────────────────────────── */
.dd-action-bar {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(9,14,42,0.95);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 3;
}
.dd-status-select {
  flex: 1;
  background: rgba(0,0,0,0.3); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 7px 10px; font-size: 12px; font-family: inherit;
  transition: border-color 0.15s;
}
.dd-status-select:focus { outline: none; border-color: var(--accent-blue); }
.notes-toggle {
  position: relative;
  background: rgba(56,189,248,0.08);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.notes-toggle svg { width: 16px; height: 16px; }
.notes-toggle:hover { border-color: var(--accent-blue); color: var(--text); }
.notes-toggle.has-notes { border-color: rgba(56,189,248,0.5); color: var(--accent-blue); }
.notes-dot {
  position: absolute; top: 5px; right: 5px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 5px var(--accent-blue);
}
.dossier-btn {
  display: flex; align-items: center; gap: 7px;
  background: transparent;
  border: 1px solid rgba(99,102,241,0.5); border-radius: 7px;
  padding: 8px 14px;
  color: #a5b4fc; font-weight: 700; font-size: 12px;
  cursor: pointer; font-family: inherit; text-decoration: none;
  letter-spacing: 0.4px; text-transform: uppercase;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s;
  flex-shrink: 0;
}
.dossier-btn:hover { border-color: #818cf8; color: #e0e7ff; background: rgba(99,102,241,0.12); }
.dossier-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.investigate-btn {
  display: flex; align-items: center; gap: 7px;
  background: var(--accent-blue);
  border: none; border-radius: 7px;
  padding: 8px 14px;
  color: #032138; font-weight: 800; font-size: 12px;
  cursor: pointer; font-family: inherit;
  letter-spacing: 0.4px; text-transform: uppercase;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(56,189,248,0.30);
}
.investigate-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(56,189,248,0.45); }
.investigate-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.investigate-btn.scanning {
  background: linear-gradient(90deg, var(--accent-blue), #c084fc, var(--accent-blue));
  background-size: 200% 100%;
  animation: scan-stripes 1.4s linear infinite;
}
@keyframes scan-stripes { from { background-position: 0% 0; } to { background-position: 200% 0; } }
.investigate-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Notes popover */
.notes-popover {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 14px;
  width: 280px;
  background: #0d1535;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  z-index: 10;
}
.notes-popover textarea {
  width: 100%; background: rgba(0,0,0,0.3); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px; font-size: 12px; font-family: inherit;
  resize: vertical; min-height: 80px;
}
.notes-popover textarea:focus { outline: 1px solid var(--accent-blue); }
.notes-popover-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.workflow-saved {
  font-size: 10px; color: var(--high); opacity: 0;
  transition: opacity 0.18s;
}
.workflow-saved.show { opacity: 1; }

/* Scan results */
.scan-results {
  background: rgba(11,20,55,0.5);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin-top: 12px; font-size: 12px;
  animation: fadeIn 0.3s ease-out;
}
.scan-results h4 {
  margin: 0 0 8px 0; font-size: 10px; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-muted); font-weight: 700;
}
.scan-results .finding {
  padding: 4px 0; border-bottom: 1px solid rgba(91,124,217,0.08); line-height: 1.5;
}
.scan-results .finding:last-child { border-bottom: none; }
.scan-results .none { color: var(--text-muted); font-style: italic; }

/* ───── Signal rows ─────────────────────────────────────────────────────── */
.signal-row {
  position: relative; padding: 9px 12px 9px 26px; margin-bottom: 5px;
  background: rgba(11,20,55,0.4); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 12px;
  transition: border-color 0.15s ease;
}
.signal-row:hover { border-color: var(--border-bright); }
.signal-row::before {
  content: ""; position: absolute; left: 10px; top: 13px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-blue);
}
.signal-row.press_release::before { background: var(--sig-press); }
.signal-row.job_posting::before   { background: var(--sig-job); }
.signal-row.bead_award::before    { background: var(--sig-bead); }
.signal-row.permit::before        { background: var(--sig-permit); }
.signal-row.social_post::before   { background: var(--sig-social); }
.signal-row .top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.signal-row .date { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; }
.signal-row .type-pill {
  background: rgba(56,189,248,0.10); color: var(--accent-blue);
  border: 1px solid rgba(56,189,248,0.25);
  padding: 1px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.5px;
}
.signal-row .src { color: var(--text-dim); font-size: 10px; }
.signal-row .src-link {
  color: var(--accent-blue); font-size: 10px;
  text-decoration: none; border-bottom: 1px solid rgba(56,189,248,0.3);
}
.signal-row .src-link:hover { border-bottom-color: var(--accent-blue); }
.signal-row .title { color: var(--text); font-size: 12px; line-height: 1.45; }
.signal-row .sig-body {
  color: var(--text-muted); font-size: 11px; line-height: 1.45;
  margin-top: 4px; font-style: italic;
}
.signal-row .employer { color: var(--text-muted); font-size: 11px; margin-top: 3px; }

/* ───── Signal groups (type-grouped view) ──────────────────────────────── */
.sig-group { margin-bottom: 14px; }
.sig-group-head {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 0 4px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.sig-group-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.sig-group-dot.press_release { background: var(--sig-press); }
.sig-group-dot.job_posting   { background: var(--sig-job); }
.sig-group-dot.bead_award    { background: var(--sig-bead); }
.sig-group-dot.permit        { background: var(--sig-permit); }
.sig-group-dot.social_post   { background: var(--sig-social); }
.sig-group-dot.broadband_map { background: var(--sig-map); }
.sig-group-dot.address_check { background: #34d399; }
.sig-group-dot.form_477      { background: #a78bfa; }
.sig-group-dot.pole_attachment { background: #fb923c; }
.sig-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text);
}
.sig-group-count {
  margin-left: auto;
  background: rgba(91,124,217,0.15); color: var(--text-muted);
  border-radius: 999px; font-size: 10px; font-weight: 700;
  padding: 1px 7px;
}
.sig-group-explain {
  font-size: 11px; color: var(--text-dim); font-style: italic;
  line-height: 1.5; margin-bottom: 7px;
  padding: 5px 8px;
  background: rgba(91,124,217,0.06);
  border-radius: 5px;
  border-left: 2px solid rgba(91,124,217,0.25);
}

/* ───── Address-check summary widget ───────────────────────────────────── */
/* ───── AT&T Address Verification Widget ───────────────────────────────── */
.addr-check-summary {
  margin-bottom: 16px;
  background: rgba(11,20,55,0.6);
  border: 1px solid rgba(52,211,153,0.25);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.addr-check-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px 8px;
  border-bottom: 1px solid rgba(52,211,153,0.12);
  background: rgba(52,211,153,0.06);
}
.addr-check-title {
  font-size: 9px; text-transform: uppercase; letter-spacing: 1.4px;
  color: #34d399; font-weight: 700;
}
.addr-check-sampled {
  font-size: 10px; color: var(--text-dim); font-variant-numeric: tabular-nums;
}
.addr-status-rows { padding: 6px 0; }
.addr-status-row {
  padding: 6px 14px;
  border-left: 3px solid transparent;
  transition: background 0.1s;
}
.addr-status-row.fiber_coming { border-left-color: #f59e0b; }
.addr-status-row.fiber_live   { border-left-color: #22c55e; }
.addr-status-row.no_fiber     { border-left-color: rgba(107,114,128,0.4); }
.addr-status-row--empty       { opacity: 0.45; }
.addr-status-head {
  display: flex; align-items: baseline; gap: 7px;
}
.addr-status-count {
  font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; min-width: 28px;
}
.fiber_coming .addr-status-count { color: #fcd34d; }
.fiber_live   .addr-status-count { color: #86efac; }
.no_fiber     .addr-status-count { color: #6b7280; }
.addr-status-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px;
}
.fiber_coming .addr-status-label { color: #fbbf24; }
.fiber_live   .addr-status-label { color: #4ade80; }
.no_fiber     .addr-status-label { color: #6b7280; }
.addr-status-pct {
  font-size: 10px; font-weight: 700; margin-left: auto;
  opacity: 0.6;
}
.fiber_coming .addr-status-pct { color: #fbbf24; }
.fiber_live   .addr-status-pct { color: #4ade80; }

/* Address chips */
.addr-chip-list {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; margin-bottom: 2px;
}
.addr-chip {
  display: inline-flex; align-items: center;
  font-size: 10px; font-family: var(--font-mono, monospace);
  padding: 3px 8px; border-radius: 4px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.addr-chip.fiber_coming {
  background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d;
}
.addr-chip.fiber_live {
  background: rgba(34,197,94,0.10); border: 1px solid rgba(34,197,94,0.3); color: #86efac;
}
.addr-more-btn {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 4px;
  background: rgba(91,124,217,0.1); border: 1px solid rgba(91,124,217,0.25);
  color: var(--accent-blue); cursor: pointer;
  transition: background 0.15s;
}
.addr-more-btn:hover { background: rgba(91,124,217,0.2); }
.addr-no-addr-note {
  font-size: 9px; color: var(--text-dim); font-style: italic;
  padding: 4px 14px 8px; letter-spacing: 0.3px;
}

/* ───── Score context text ─────────────────────────────────────────────── */
.dd-stat-context {
  font-size: 10px; color: var(--text-dim); margin-top: 4px;
  font-style: italic; letter-spacing: 0.3px;
}

/* ───── Lead rows ───────────────────────────────────────────────────────── */
.lead-row {
  padding: 7px 12px; margin-bottom: 4px;
  background: rgba(11,20,55,0.3); border: 1px solid var(--border);
  border-radius: 6px; display: flex; align-items: center;
  gap: 10px; font-size: 12px; transition: background 0.12s ease;
}
.lead-row:hover { background: rgba(56,189,248,0.06); }
.lead-row.new_construction {
  background: linear-gradient(90deg, rgba(251,191,36,0.08), rgba(11,20,55,0.30));
  border-color: rgba(251,191,36,0.35);
}
.lead-type-pill {
  flex-shrink: 0; font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
.lead-type-pill.new_construction    { background: #fbbf24; color: #1a1a1a; }
.lead-type-pill.residential         { background: rgba(34,197,94,0.18);  color: #86efac; border: 1px solid rgba(34,197,94,0.35); }
.lead-type-pill.residential_mdu     { background: rgba(56,189,248,0.18); color: #7dd3fc; border: 1px solid rgba(56,189,248,0.35); }
.lead-type-pill.commercial          { background: rgba(244,114,182,0.18);color: #fbcfe8; border: 1px solid rgba(244,114,182,0.35); }
.lead-type-pill.institutional       { background: rgba(148,163,184,0.18);color: #cbd5e1; border: 1px solid rgba(148,163,184,0.35); }
.lead-type-pill.other               { background: rgba(148,163,184,0.18);color: #94a3b8; }
.lead-row .addr { flex: 1; font-weight: 500; }
.lead-row .zip  { color: var(--text-dim); font-size: 11px; }

/* ───── Timeline histogram ─────────────────────────────────────────────── */
.timeline { font-size: 11px; }
.timeline-chart { background: rgba(11,20,55,0.4); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.timeline-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.timeline-row .label { width: 80px; color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; }
.timeline-row .bars { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.timeline-row .bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 1px; transition: opacity 0.15s; }
.timeline-row .bar.empty { background: rgba(91,124,217,0.08); }
.timeline-row .bar:hover { opacity: 0.6; }
.timeline-row.press_release .bar:not(.empty)     { background: var(--sig-press); }
.timeline-row.job_posting .bar:not(.empty)        { background: var(--sig-job); }
.timeline-row.bead_award .bar:not(.empty)         { background: var(--sig-bead); }
.timeline-row.permit .bar:not(.empty)             { background: var(--sig-permit); }
.timeline-row.social_post .bar:not(.empty)        { background: var(--sig-social); }
.timeline-row.broadband_map .bar:not(.empty)      { background: var(--sig-map); }
.timeline-row.address_check .bar:not(.empty)      { background: #34d399; }
.timeline-row.bgp_prefix .bar:not(.empty)         { background: #60a5fa; }
.timeline-row.copper_retirement .bar:not(.empty)  { background: #f87171; }
.timeline-row.pole_attachment .bar:not(.empty)    { background: #fb923c; }
.timeline-row.fcc_ecfs .bar:not(.empty)           { background: #a78bfa; }
.timeline-row.form_477 .bar:not(.empty)           { background: #a78bfa; }
.timeline-axis { display: flex; margin-left: 88px; font-size: 9px; color: var(--text-dim); justify-content: space-between; margin-top: 4px; letter-spacing: 0.4px; }

/* ───── Scrollbar polish ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(91,124,217,0.20); border-radius: 999px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(91,124,217,0.38); background-clip: padding-box; border: 2px solid transparent; }

/* ───── Leaflet overrides ───────────────────────────────────────────────── */
.leaflet-container { background: #061027; }
.leaflet-control-zoom a { background: rgba(20,32,74,0.9) !important; color: var(--text) !important; border-color: var(--border) !important; }
.leaflet-control-attribution { background: rgba(11,20,55,0.7) !important; color: var(--text-dim) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--text-muted) !important; }
.leaflet-tooltip {
  background: rgba(11,20,55,0.95) !important; border: 1px solid var(--border-bright) !important;
  color: var(--text) !important; font-family: inherit; font-size: 12px !important;
  padding: 7px 10px !important; border-radius: 8px !important; box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}
.leaflet-tooltip::before { border-top-color: var(--border-bright) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1024–1279px: sidebar becomes a slide-in drawer ──────────────────────── */
@media (max-width: 1279px) {
  .filter-toggle { display: flex; }

  .app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }

  aside.sidebar {
    position: fixed;
    left: 0; top: 64px; bottom: 0;
    width: 280px;
    z-index: 500;
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
    box-shadow: 8px 0 32px rgba(0,0,0,0.4);
    border-right: 1px solid var(--border-bright);
  }
  aside.sidebar.open { transform: translateX(0); }

  /* Backdrop when sidebar drawer is open */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: rgba(3,8,30,0.5);
    z-index: 499;
    backdrop-filter: blur(2px);
  }
  .sidebar-overlay.open { display: block; }

  main.main { padding: 16px 18px; }
  header #searchbox { width: 200px; }
}

/* ── <1024px: table → card list, drilldown → full-screen modal ───────────── */
@media (max-width: 1023px) {
  /* KPI: 2×2 grid */
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi .value { font-size: 28px; }

  /* Main map shorter */
  #map { height: 280px; }

  /* Table hidden, cards shown */
  table.areas { display: none; }
  .areas-cards { display: block; }

  /* Show demographics toggle not needed on mobile */
  .table-controls .ghost-btn { display: none; }
  .sort-by-mobile { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
  .sort-by-mobile select {
    background: rgba(0,0,0,0.3); color: var(--text);
    border: 1px solid var(--border); border-radius: 6px;
    padding: 5px 8px; font-size: 12px; font-family: inherit;
  }

  /* Drilldown → full-screen modal */
  .drilldown {
    width: 100%; max-width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-bright);
  }

  /* Action bar: investigage only (no notes popover or status in line — popover still accessible) */
  .dd-stat-row { grid-template-columns: repeat(2, 1fr); }

  header .pill--info { display: none; }
  header #searchbox { width: 150px; }
}

/* ───── Sources topbar button ──────────────────────────────────────────────── */
.sources-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.3);
  color: #a5b4fc;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sources-btn:hover { border-color: #818cf8; color: #c7d2fe; background: rgba(99,102,241,0.16); }

/* ───── Modal base (reusable) ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 9000;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 9001; width: min(820px, 96vw); max-height: 82vh;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.modal-meta { font-size: 12px; color: var(--text-dim); margin-left: 4px; }
.modal-close {
  margin-left: auto; background: none; border: none; color: var(--text-dim);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: var(--text); background: var(--border); }
.modal-body { flex: 1; overflow-y: auto; padding: 18px; }
.modal[hidden], .modal-overlay[hidden] { display: none !important; }

/* ───── Legend modal content ────────────────────────────────────────────────── */
.legend-modal { width: min(860px, 96vw); max-height: 88vh; }
.legend-body  { padding: 0; }

.legend-callout {
  margin: 18px 18px 0;
  padding: 14px 16px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}
.legend-callout strong { color: var(--text); }
.legend-callout em     { color: #c7d2fe; font-style: normal; }

.legend-section {
  padding: 20px 18px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.legend-section:last-child { border-bottom: none; }

.legend-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); margin-bottom: 12px;
}
.legend-section-icon { font-size: 14px; }

.legend-text {
  font-size: 13px; line-height: 1.6; color: var(--text-dim); margin-bottom: 12px;
}

/* Band / tier table rows */
.legend-band-table { display: flex; flex-direction: column; gap: 8px; }
.lbt-row {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--band-color, rgba(255,255,255,0.03));
  border: 1px solid var(--band-border, var(--border));
  border-radius: 8px; padding: 12px 14px;
}
.lbt-row.HIGH   { --band-color:rgba(34,197,94,0.08);  --band-border:rgba(34,197,94,0.25); }
.lbt-row.MEDIUM { --band-color:rgba(245,158,11,0.08); --band-border:rgba(245,158,11,0.25); }
.lbt-row.LOW    { --band-color:rgba(107,114,128,0.08);--band-border:rgba(107,114,128,0.2); }
.lbt-row.COLD   { --band-color:rgba(59,130,246,0.07); --band-border:rgba(59,130,246,0.2); }
.lbt-badge { min-width: 90px; padding-top: 2px; }
.lbt-body  { flex: 1; min-width: 0; }
.lbt-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.lbt-desc  { font-size: 12px; line-height: 1.6; color: var(--text-dim); }
.lbt-desc strong { color: var(--text); }
.lbt-addr  { padding: 3px 10px !important; font-size: 11px; }

/* Score bars */
.legend-score-bars { display: flex; flex-direction: column; gap: 6px; }
.legend-score-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 6px;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.legend-score-range {
  font-size: 12px; font-weight: 700; color: var(--c); min-width: 44px; font-variant-numeric: tabular-nums;
}
.legend-score-label { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* Signal type table */
.legend-sig-table { display: flex; flex-direction: column; gap: 2px; }
.lst-group-head {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); padding: 12px 0 6px;
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.lst-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 9px 10px; border-radius: 6px;
}
.lst-row:hover { background: rgba(255,255,255,0.03); }
.lst-meta {
  display: flex; align-items: center; gap: 8px;
  min-width: 160px; flex-shrink: 0; padding-top: 1px;
}
.lst-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.lst-dot.permit          { background: #22c55e; }
.lst-dot.address_check   { background: #f59e0b; }
.lst-dot.bgp_prefix      { background: #8b5cf6; }
.lst-dot.copper_retirement{ background: #ef4444; }
.lst-dot.pole_attachment { background: #06b6d4; }
.lst-dot.job_posting     { background: #3b82f6; }
.lst-dot.broadband_map   { background: #6366f1; }
.lst-dot.press_release   { background: #64748b; }
.lst-dot.social_post     { background: #ec4899; }
.lst-dot.bead_award      { background: #84cc16; }
.lst-dot.sec_filing      { background: #94a3b8; }
.lst-dot.form_477        { background: #475569; }
.lst-type { font-size: 12px; font-weight: 600; color: var(--text); }
.lst-lead {
  font-size: 10px; font-weight: 600; color: #fcd34d;
  background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3);
  border-radius: 4px; padding: 1px 5px; margin-left: auto; white-space: nowrap;
}
.lst-desc { font-size: 12px; line-height: 1.6; color: var(--text-dim); flex: 1; }
.lst-desc strong { color: var(--text); }

/* Lead-time reference table */
.legend-lead-table { display: flex; flex-direction: column; gap: 0; }
.llt-row, .llt-type-row {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
}
.llt-row:last-child, .llt-type-row:last-child { border-bottom: none; }
.llt-type  { color: var(--text); font-weight: 500; min-width: 170px; }
.llt-lead  { font-weight: 700; color: #fcd34d; min-width: 70px; }
.llt-note  { color: var(--text-dim); font-style: italic; }

/* ───── Sources modal content ───────────────────────────────────────────────── */
.sources-loading { color: var(--text-dim); font-size: 13px; text-align: center; padding: 32px; }
.sources-category { margin-bottom: 24px; }
.sources-category-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.sources-category-head .cat-icon { font-size: 14px; }
.sources-category-head .cat-count {
  margin-left: auto; font-size: 10px; color: var(--text-dim); font-weight: 400; letter-spacing: 0;
}
.sources-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px;
}
.source-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color 0.15s;
}
.source-card:hover { border-color: rgba(99,102,241,0.4); }
.source-card-top { display: flex; align-items: flex-start; gap: 6px; }
.source-card-label {
  font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.3; flex: 1;
}
.source-card-link {
  flex-shrink: 0; color: var(--text-dim); text-decoration: none; font-size: 10px;
  padding: 2px 4px; border-radius: 3px; border: 1px solid var(--border);
  transition: color 0.12s, border-color 0.12s;
}
.source-card-link:hover { color: #a5b4fc; border-color: rgba(99,102,241,0.4); }
.source-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.source-carrier-chips { display: flex; gap: 3px; }
.source-sig-count {
  font-size: 10px; color: var(--text-dim); margin-left: auto;
}
.source-sig-count.has-sigs { color: var(--high); font-weight: 600; }
.source-note { font-size: 10px; color: var(--text-dim); font-style: italic; }

/* ───── Full-refresh topbar button ─────────────────────────────────────────── */
.full-refresh-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.full-refresh-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.full-refresh-btn:hover { border-color: var(--high); color: #86efac; background: rgba(34,197,94,0.14); }
.full-refresh-btn.running {
  border-color: var(--high);
  color: var(--high);
  background: rgba(34,197,94,0.12);
}
.full-refresh-btn.running svg { animation: spin 1.2s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ───── Pipeline split button + dropdown ──────────────────────────────────── */
.pipeline-split {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  position: relative;
}
/* Main action button — inherits .full-refresh-btn, just remove its right radius */
.pipeline-split .full-refresh-btn {
  border-radius: 8px 0 0 8px;
  border-right: none;
  padding-right: 10px;
}
.pipeline-split .full-refresh-btn:hover,
.pipeline-split .full-refresh-btn.running {
  border-right: none;
}

/* Chevron toggle button */
.pipeline-menu-btn {
  display: flex; align-items: center; justify-content: center;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  border-left: 1px solid rgba(34,197,94,0.12);
  color: var(--text-muted);
  border-radius: 0 8px 8px 0;
  padding: 0 9px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.pipeline-menu-btn:hover {
  background: rgba(34,197,94,0.14);
  border-color: var(--high);
  border-left-color: rgba(34,197,94,0.2);
  color: #86efac;
}

/* Dropdown card */
.pipeline-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: linear-gradient(180deg, #0e1638 0%, #080d27 100%);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.04) inset;
  z-index: 9000;
  padding: 6px 0;
  animation: menuDrop 0.14s cubic-bezier(0.22,0.61,0.36,1);
}
.pipeline-menu[hidden] { display: none !important; }
@keyframes menuDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Section label */
.pm-section {
  display: block;
  font-size: 9px; font-weight: 700; letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 14px 3px;
}

/* Each job button inside the menu */
.pipeline-menu button[data-job] {
  display: block; width: 100%;
  background: none; border: none;
  text-align: left;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.12s;
  color: var(--text);
  font-size: 13px; font-family: inherit;
  line-height: 1.3;
}
.pipeline-menu button[data-job]:hover {
  background: rgba(56,189,248,0.08);
}
.pipeline-menu button[data-job] .pm-desc {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
  font-weight: 400;
}

/* Divider between individual steps and full pipeline */
.pm-divider {
  height: 1px;
  background: var(--border);
  margin: 5px 10px;
}

/* Last-synced timestamp */
.last-synced {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
  padding-left: 2px;
  letter-spacing: 0.02em;
}

/* ───── Full-refresh log panel ──────────────────────────────────────────────── */
.refresh-panel {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 420px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(180deg, #0d1535 0%, #060a1f 100%);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  z-index: 8000;
  display: flex; flex-direction: column;
  max-height: 360px;
  animation: slideUp 0.22s cubic-bezier(0.22,0.61,0.36,1);
}
.refresh-panel[hidden] { display: none !important; }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.refresh-panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rp-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--text);
  flex: 1;
}
.rp-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; letter-spacing: 0.5px;
  background: rgba(56,189,248,0.12); color: var(--accent-blue);
  border: 1px solid rgba(56,189,248,0.25);
}
.rp-badge.running { background: rgba(34,197,94,0.12); color: var(--high); border-color: rgba(34,197,94,0.3); }
.rp-badge.complete { background: rgba(34,197,94,0.20); color: #86efac; border-color: rgba(34,197,94,0.5); }
.rp-badge.failed { background: rgba(239,68,68,0.15); color: #fca5a5; border-color: rgba(239,68,68,0.4); }
.rp-elapsed { font-size: 10px; color: var(--text-dim); white-space: nowrap; }
.rp-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 16px; cursor: pointer; padding: 0;
  line-height: 1; transition: color 0.12s;
}
.rp-close:hover { color: var(--text); }

.refresh-log {
  flex: 1; overflow-y: auto;
  padding: 10px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px; line-height: 1.55;
  color: var(--text-muted);
  background: rgba(0,0,0,0.25);
}
.refresh-log .log-step { color: #7dd3fc; font-weight: 700; }
.refresh-log .log-ok   { color: #86efac; }
.refresh-log .log-err  { color: #fca5a5; }
.refresh-log .log-done { color: #86efac; font-weight: 700; }

.refresh-panel-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .refresh-panel { bottom: 0; right: 0; left: 0; width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
}

/* ─── Feature additions: credibility / lead evidence ────────────────────── */

/* Address-check badge in main table signal cell */
.addr-badge {
  display: inline-flex; align-items: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  padding: 1px 6px; border-radius: 999px;
  margin-left: 4px; white-space: nowrap;
}
.addr-badge.coming {
  background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.4);
  color: #fbbf24;
}
.addr-badge.live {
  background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4);
  color: #86efac;
}

/* Competitive chip in band/evidence cell */
.comp-chip {
  display: inline-flex; align-items: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.4px;
  padding: 1px 6px; border-radius: 999px;
  margin-left: 4px; white-space: nowrap;
}
.comp-chip.greenfield {
  background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3);
  color: #86efac;
}
.comp-chip.one {
  background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3);
  color: #fbbf24;
}
.comp-chip.many {
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}

/* Drilldown stat row: 6-cell grid */
.dd-stat-row {
  grid-template-columns: repeat(3, 1fr) !important;
}
.dd-stat-v--sm {
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 4px;
}

/* AT&T check stat text in drilldown */
.addr-confirm-coming { color: #fbbf24; font-weight: 700; }
.addr-confirm-live   { color: #86efac; font-weight: 700; }
.addr-confirm-none   { color: var(--text-dim); }

/* Hot zips line */
.dd-hot-zips {
  font-size: 11px; color: var(--text-muted);
  margin: -8px 0 12px 0;
  padding: 6px 12px;
  background: rgba(11,20,55,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.zip-label {
  color: var(--text-dim); text-transform: uppercase;
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
  margin-right: 4px;
}

/* Track record line in drilldown */
.dd-track-record {
  font-size: 11px; color: var(--text-muted);
  margin: -4px 0 14px 0;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.tr-flagged {
  color: var(--text-muted);
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 999px; padding: 2px 8px;
  font-size: 10px; font-weight: 700;
}
.tr-confirmed {
  color: #86efac;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 999px; padding: 2px 8px;
  font-size: 10px; font-weight: 700;
}
.tr-pending {
  color: var(--text-dim); font-size: 10px;
}

/* Track record pill in topbar */
.pill--track-record {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  color: #86efac;
  font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
  padding: 3px 10px; border-radius: 999px;
  white-space: nowrap;
}

/* Signal card meta row (permit #, contractor, ASN, etc.) */
.signal-meta {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  font-size: 10px; color: var(--text-dim);
  margin-top: 3px; margin-bottom: 2px;
  font-family: 'Courier New', Courier, monospace;
}
.meta-key { color: var(--text-dim); font-family: inherit; }
.meta-val { color: var(--text-muted); font-family: inherit; }
.meta-val.mono { font-family: 'Courier New', Courier, monospace; color: #7dd3fc; }
.meta-val.dim  { color: var(--text-dim); }
.meta-sep { color: rgba(91,124,217,0.35); }
.meta-permit-link {
  color: #7dd3fc; font-family: 'Courier New', Courier, monospace; font-size: 10px;
  text-decoration: none; border-bottom: 1px solid rgba(125,211,252,0.3);
}
.meta-permit-link:hover { border-bottom-color: #7dd3fc; }

/* Provider chips in competition section */
.prov-chips {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 5px;
}
.prov-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(20,32,74,0.6);
}
.prov-chip .prov-cat {
  font-size: 9px; font-weight: 400;
  color: var(--text-dim); text-transform: lowercase;
}
.prov-chip.prov-fiber {
  border-color: rgba(245,158,11,0.35);
  background: rgba(245,158,11,0.08);
  color: #fbbf24;
}
.prov-chip.prov-cable {
  border-color: rgba(148,163,184,0.3);
  background: rgba(148,163,184,0.06);
  color: var(--text-muted);
}
.prov-chip.prov-5g {
  border-color: rgba(56,189,248,0.25);
  background: rgba(56,189,248,0.06);
  color: #7dd3fc;
}
.prov-chip.prov-other {
  border-color: var(--border);
  color: var(--text-dim);
}

/* ── User chip in header ────────────────────────────────────────────────── */
.user-chip {
  display: flex; align-items: center; gap: 0.5rem;
  margin-left: auto;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}
.user-chip-name {
  font-size: 0.78rem; font-weight: 600; color: #cbd5e1;
  padding-right: 0.35rem;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.user-chip-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.55rem; border-radius: 5px;
  color: rgba(148,163,184,0.75); font-size: 0.78rem; font-weight: 600;
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
.user-chip-btn:hover {
  background: rgba(96,165,250,0.1); color: #93c5fd;
}
.user-chip-btn--admin {
  color: #93c5fd; background: rgba(59,130,246,0.08);
}
.user-chip-btn--admin:hover {
  background: rgba(59,130,246,0.18); color: #bfdbfe;
}

/* ── Canvassing CSV download pill ───────────────────────────────────────── */
.pill--download {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: 6px;
  color: #4ade80; font-size: 0.78rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.pill--download:hover {
  background: rgba(34,197,94,0.22);
  border-color: rgba(34,197,94,0.6);
  color: #86efac;
}
.pill--download:active { transform: translateY(1px); }

.pill--download-label {
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.pill--download-count {
  display: inline-block;
  background: rgba(34,197,94,0.25);
  border: 1px solid rgba(34,197,94,0.45);
  color: #86efac;
  font-size: 0.68rem; font-weight: 700;
  padding: 0.05rem 0.42rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.pill--download-when {
  font-size: 0.7rem; font-weight: 500;
  color: rgba(134, 239, 172, 0.65);
  letter-spacing: 0.02em;
  padding-left: 0.45rem; margin-left: 0.1rem;
  border-left: 1px solid rgba(34,197,94,0.25);
}

/* ── Dossier links — in-table icon + drilldown header pill ───────────── */
.dossier-link {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.32rem;
  border-radius: 4px;
  font-size: 0.78rem;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.15s, background 0.15s;
}
.dossier-link:hover {
  opacity: 1;
  background: rgba(56,189,248,0.15);
}

.dd-dossier-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 0.65rem;
  padding: 0.42rem 0.9rem;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  background: rgba(56,189,248,0.08);
  color: var(--accent-blue);
  font-size: 0.82rem; font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
  align-self: flex-start;
}
.dd-dossier-link:hover {
  background: rgba(56,189,248,0.2);
  border-color: var(--accent-blue);
  color: #7dd3fc;
}
.dd-dossier-link:active { transform: translateY(1px); }

/* AZ-only canvassing pill — same shape, AZ flag accent */
.pill--download-az {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.40);
  color: #fbbf24;
}
.pill--download-az:hover {
  background: rgba(245,158,11,0.22);
  border-color: rgba(245,158,11,0.65);
  color: #fcd34d;
}

/* ── Mission Control bar (under header) — KPIs + action buttons ────────── */
.mission-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: stretch;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20,32,74,0.3), rgba(11,20,55,0.2));
}
.mc-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.mc-kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  box-shadow: var(--shadow-1);
  transition: border-color 0.15s, transform 0.05s;
}
.mc-kpi:hover { border-color: var(--border-bright); transform: translateY(-1px); }
.mc-kpi-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.65rem; font-weight: 700; line-height: 1;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.mc-kpi-lbl {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.mc-kpi-sub {
  font-size: 0.68rem; color: var(--text-dim);
  letter-spacing: 0.02em;
}
.mc-kpi--hot       .mc-kpi-num { color: var(--high); text-shadow: 0 0 12px var(--high-glow); }
.mc-kpi--warm      .mc-kpi-num { color: var(--med); }
.mc-kpi--confirmed .mc-kpi-num { color: #4ade80; }
.mc-kpi--total     .mc-kpi-num { color: var(--accent-blue); }

.mc-actions {
  display: flex; flex-direction: column; gap: 0.5rem;
  align-self: stretch;
  justify-content: center;
}
.mc-btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  border: 1px solid; transition: background 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap; min-width: 220px;
  cursor: pointer;
}
.mc-btn:active { transform: translateY(1px); }
.mc-btn--primary {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.45);
  color: #4ade80;
}
.mc-btn--primary:hover {
  background: rgba(34,197,94,0.22);
  border-color: rgba(34,197,94,0.7);
  color: #86efac;
}
.mc-btn--az {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.45);
  color: #fbbf24;
}
.mc-btn--az:hover {
  background: rgba(245,158,11,0.20);
  border-color: rgba(245,158,11,0.7);
  color: #fcd34d;
}
.mc-btn-count {
  display: inline-block;
  background: rgba(34,197,94,0.25);
  border: 1px solid rgba(34,197,94,0.4);
  border-radius: 4px;
  padding: 0.06rem 0.5rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
}
.mc-btn-when {
  font-size: 0.7rem; font-weight: 500;
  color: rgba(134, 239, 172, 0.7);
  padding-left: 0.5rem;
  margin-left: 0.15rem;
  border-left: 1px solid rgba(34,197,94,0.25);
}

/* Admin button needs to POP for admin users */
.user-chip-btn--admin {
  background: rgba(56,189,248,0.15) !important;
  border: 1px solid rgba(56,189,248,0.45) !important;
  color: #7dd3fc !important;
  padding: 0.4rem 0.85rem !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  border-radius: 6px !important;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.user-chip-btn--admin:hover {
  background: rgba(56,189,248,0.28) !important;
  border-color: var(--accent-blue) !important;
  color: #bae6fd !important;
}

/* Responsive: stack on smaller screens */
@media (max-width: 1100px) {
  .mission-control { grid-template-columns: 1fr; }
  .mc-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .mc-kpis { grid-template-columns: 1fr 1fr; }
  .mc-actions .mc-btn { min-width: 0; flex: 1; }
}

/* ── Topbar action buttons (Doors to Knock, AZ Report) ─────────────────── */
.hot-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.85rem; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600; text-decoration: none;
  border: 1px solid; transition: background 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.hot-btn:active { transform: translateY(1px); }
.hot-btn--primary {
  background: rgba(34,197,94,0.13);
  border-color: rgba(34,197,94,0.45);
  color: #4ade80;
}
.hot-btn--primary:hover {
  background: rgba(34,197,94,0.25);
  border-color: rgba(34,197,94,0.75);
  color: #86efac;
}
.hot-btn--az {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.45);
  color: #fbbf24;
}
.hot-btn--az:hover {
  background: rgba(245,158,11,0.22);
  border-color: rgba(245,158,11,0.7);
  color: #fcd34d;
}
.hot-btn-count {
  display: inline-block;
  background: rgba(34,197,94,0.3);
  border: 1px solid rgba(34,197,94,0.5);
  border-radius: 4px;
  padding: 0.04rem 0.42rem;
  font-size: 0.7rem; font-weight: 700;
  margin-left: 0.15rem;
}

/* ── Mobile / tablet layout fixes for the rebranded topbar ──────────────── */
@media (max-width: 900px) {
  header.topbar {
    flex-wrap: wrap;
    padding: 0.6rem 0.8rem;
    gap: 0.5rem;
    min-height: auto;
  }
  /* Hide tagline below brand name to save space */
  .brand .tag { display: none; }
  .brand .name { font-size: 16px; letter-spacing: 2px; }
  .brand .mark { width: 32px; height: 32px; font-size: 18px; }

  /* Search box: full width on second line */
  header #searchbox { width: 100%; order: 99; }

  /* Action buttons: tighter padding */
  .hot-btn { padding: 0.4rem 0.65rem; font-size: 0.75rem; }
  .hot-btn-count { font-size: 0.65rem; padding: 0.04rem 0.36rem; }

  /* Pipeline split: smaller */
  .pipeline-split .full-refresh-btn .fr-label,
  .pipeline-split .full-refresh-btn { font-size: 12px; padding: 0.4rem 0.7rem; }

  /* Legend + Sources buttons: hide on mobile, accessible from menu */
  #legend-btn span, #sources-btn span { display: none; }
  #legend-btn, #sources-btn { padding: 0.4rem; }

  /* User chip: just admin + signout icon */
  .user-chip-name { display: none; }
  .user-chip { margin-left: 0; }

  /* last-synced label hidden on phones */
  .last-synced { display: none; }
}

@media (max-width: 600px) {
  /* Even tighter on phones */
  .brand .mark { width: 28px; height: 28px; font-size: 16px; }
  .brand .name { font-size: 14px; }
  .hot-btn { font-size: 0.7rem; padding: 0.35rem 0.55rem; }
  .hot-btn svg { width: 11px; height: 11px; }
  .pipeline-split { display: none; }   /* refresh button hidden — admin can refresh from cron/log */
  .filter-toggle { padding: 0.4rem 0.55rem; }

  /* KPI compact: smaller numbers */
  .kpis { gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi .value { font-size: 22px; }
  .kpi .label { font-size: 9px; letter-spacing: 1px; }
  .kpi-sub { font-size: 9px; }

  /* Sidebar drawer narrower */
  aside.sidebar { width: 260px; }
}
