/* ScoutWire — signal-intelligence sales desk
   Brand: deep pine ground, blaze accent, field-sand ink.
   Accent variable names are kept from the original build so component CSS keeps
   working; the values are ScoutWire's. --indigo is the primary accent (blaze). */

@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #12201a;
  --bg-deep: #0c1712;
  --surface: #182a22;
  --surface-2: #1f332a;
  --surface-3: #274035;
  --line: #2e4c3e;
  --line-soft: #22392e;

  --ink: #f0ebe0;
  --ink-2: #b3c2b6;
  --ink-3: #7f9488;

  /* primary accent = blaze */
  --indigo: #ff4a1c;
  --indigo-soft: #ff6b42;
  --indigo-glow: rgba(255, 74, 28, 0.32);
  --orange: #ff4a1c;
  --orange-soft: #ff8a5c;
  --green: #4fae8a;
  --green-soft: #6fc4a2;

  /* charts: muted sage on pine, blaze reserved for emphasis */
  --chart-1: #6f9b83;
  --chart-2: #e0703f;
  --chart-3: #c9a24d;
  --chart-4: #5f92b0;

  --sl-managed: #5fbf9b;     /* Managed AI */
  --sl-transform: #e8c07a;   /* AI Transformation */
  --sl-engineering: #ff6b42; /* AI Engineering */

  --font: 'Figtree', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-drawer: -24px 0 80px rgba(6, 14, 10, 0.72);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { background: var(--bg); }

::selection { background: rgba(255, 74, 28, 0.35); }

button { font-family: inherit; cursor: pointer; }

/* ---------- shell ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  height: 64px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(18, 32, 26, 0.86);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 26px; display: block; }

.ws-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-2); font-weight: 500;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; white-space: nowrap;
}
.ws-chip .ws-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange-soft); flex: none; }
@media (max-width: 1080px) { .ws-chip { display: none; } }
.brand .app-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 1px;
}

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav button {
  background: none;
  border: none;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.nav button:hover { color: var(--ink); background: var(--surface); }
.nav button.active { color: var(--ink); background: var(--surface-2); }
.nav button .count {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--indigo-soft);
  margin-left: 6px;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.live-dot {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-3); font-weight: 500;
}
.live-dot i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(79, 174, 138, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 174, 138, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(79, 174, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 174, 138, 0); }
}

.rep-switch {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px 5px 6px;
}
.rep-switch select {
  background: none; border: none; color: var(--ink);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  outline: none; appearance: none; cursor: pointer;
  padding-right: 2px;
}
.rep-switch select option { background: var(--surface-2); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.02em;
  color: #fff; flex: none;
}

.main { max-width: 1440px; margin: 0 auto; padding: 26px 28px 80px; }

.view { display: none; animation: viewIn 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.view.active { display: block; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.view-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.view-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.view-head .sub { color: var(--ink-3); font-size: 14px; }
.view-head .spacer { flex: 1; }

/* ---------- stat tiles ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
}
.stat .label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.stat .value {
  font-size: 30px; font-weight: 800; letter-spacing: -0.03em;
  margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.stat .delta { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.stat .delta.up { color: var(--ink-2); }
.stat .spark { position: absolute; right: 12px; bottom: 10px; opacity: 0.9; }

/* ---------- panels & grid ---------- */

.dash-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.panel-head .hint { color: var(--ink-3); font-size: 12.5px; }
.panel-head .spacer { flex: 1; }

/* ---------- filter chips ---------- */

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px; font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on { background: var(--indigo); border-color: var(--indigo); color: #fff; }

.seg {
  display: inline-flex; gap: 2px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 9px; padding: 3px;
}
.seg button {
  background: none; border: none; color: var(--ink-2);
  font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 6px;
  transition: all 0.15s;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface-3); color: var(--ink); }

.search-box {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-family: inherit; font-size: 13px;
  padding: 6px 12px; width: 210px; outline: none; margin-left: 12px;
}
.search-box:focus { border-color: var(--indigo-soft); }
.search-box::placeholder { color: var(--ink-3); }

.chip-groups { display: flex; flex-flow: row wrap; align-items: center; gap: 9px 22px; }
.chip-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-3); margin-right: 4px; align-self: center;
}

/* search + filters stack: search on top, filter groups flow left-to-right below,
   filling the width. Mobile swaps the chips for dropdowns (see media). */
.inbox-toolbar {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.inbox-toolbar .search-box { margin-left: 0; width: 100%; max-width: 340px; }
.filter-selects { display: none; } /* desktop uses chips; selects are the mobile control */

.rf-icon { display: inline-block; }
.spinning .rf-icon { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- news desk ---------- */

.ticker {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--bg-deep);
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  padding: 8px 0;
  position: relative;
}
.ticker-inner { display: inline-block; animation: tick 80s linear infinite; }
.ticker-inner span { padding-right: 48px; }
.ticker:hover .ticker-inner { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

.news-row {
  display: grid;
  grid-template-columns: 92px 74px 1fr 190px;
  gap: 14px;
  align-items: baseline;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.news-row:last-child { border-bottom: none; }
.news-row.linkable { cursor: pointer; transition: background 0.15s; }
.news-row.linkable:hover { background: var(--surface-2); }
.news-row.compact { grid-template-columns: 64px 1fr; padding: 11px 16px; }

.n-ts { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.n-cat {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em;
  color: var(--ink-3); white-space: nowrap;
}
.n-cat::before { content: '● '; font-size: 8px; vertical-align: 1px; }
.cat-funding::before { color: var(--indigo-soft); }
.cat-funds::before { color: var(--indigo-soft); }
.cat-ma::before { color: var(--orange-soft); }
.cat-product::before { color: var(--sl-managed); }
.cat-hiring::before { color: var(--orange-soft); }
.cat-case::before { color: var(--ink-3); }
.cat-deal::before { color: var(--green); }
.cat-regulatory::before { color: var(--orange-soft); }
.cat-market::before { color: var(--ink-3); }

.n-head { font-size: 14px; font-weight: 600; line-height: 1.4; }
.n-snip { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.55; }
.n-src { font-style: italic; }
.n-lead {
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.n-lead.dim { color: var(--ink-3); font-weight: 400; }

@media (max-width: 1080px) {
  .news-row { grid-template-columns: 74px 1fr; }
  .n-ts, .n-lead { display: none; }
}

/* ---------- signal feed rows ---------- */

.signal-row {
  display: grid;
  grid-template-columns: 44px 1.5fr 1fr minmax(150px, 165px) 118px auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.15s;
  cursor: pointer;
}
.signal-row:last-child { border-bottom: none; }
.signal-row:hover { background: var(--surface-2); }

.co-mark {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--ink-2);
  flex: none; letter-spacing: 0.01em;
  border: 1px solid var(--line);
}

.signal-co .co-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.signal-co .co-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }

.raise { font-variant-numeric: tabular-nums; }
.raise .amt { font-weight: 800; font-size: 15px; }
.raise .rnd { color: var(--ink-3); font-size: 12.5px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px;
  white-space: nowrap;
}
.badge.vert { background: var(--surface-3); color: var(--ink-2); }
.badge.sl-managed, .badge.sl-transform, .badge.sl-engineering {
  background: var(--surface-3); color: var(--ink-2);
}
.badge.sl-managed::before, .badge.sl-transform::before, .badge.sl-engineering::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; flex: none;
}
.badge.sl-managed::before { background: var(--sl-managed); }
.badge.sl-transform::before { background: var(--sl-transform); }
.badge.sl-engineering::before { background: var(--sl-engineering); }
.badge.new { background: none; border: 1px solid var(--line); color: var(--ink-2); }
.badge.inpipe {
  background: rgba(79, 174, 138, 0.10); color: var(--green-soft);
  border: 1px solid rgba(79, 174, 138, 0.28);
}
.sr-badges { overflow: hidden; }
.sr-badges .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

.fit { display: flex; align-items: center; gap: 8px; }
.fit .bar {
  width: 64px; height: 5px; border-radius: 3px;
  background: var(--surface-3); overflow: hidden; flex: none;
}
.fit .bar i { display: block; height: 100%; border-radius: 3px; background: var(--indigo-soft); }
.fit .num { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

.btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px; font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--ink-3); }
.btn.primary {
  background: var(--indigo); border-color: var(--indigo); color: #fff;
}
.btn.primary:hover { background: #4630ff; }
.btn.ghost { background: none; }
.btn.sm { font-size: 12px; padding: 5px 10px; }
.btn:disabled { opacity: 0.45; cursor: default; }

/* ---------- charts ---------- */

.chart-block { padding: 16px 18px; }
.chart-block h3 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
}
.chart-tip {
  position: fixed; z-index: 90; pointer-events: none;
  background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 7px 11px;
  font-size: 12.5px; box-shadow: 0 8px 26px rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.12s;
}
.chart-tip.show { opacity: 1; }
.chart-tip .t-label { color: var(--ink-3); font-size: 11px; }
.chart-tip .t-val { font-weight: 700; font-variant-numeric: tabular-nums; }

.hbar-row { display: grid; grid-template-columns: 92px 1fr 34px; gap: 10px; align-items: center; margin-bottom: 9px; }
.hbar-row .hb-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-row .hb-track { height: 14px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.hbar-row .hb-fill { display: block; height: 100%; border-radius: 4px; background: var(--chart-1); transition: width 0.6s cubic-bezier(0.16,1,0.3,1); }
.hbar-row .hb-val { font-family: var(--mono); font-size: 12px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- kanban ---------- */

.board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 12px;
  align-items: start;
}
/* reflow into fewer columns instead of scrolling sideways */
@media (max-width: 1200px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px)  { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px)  { .board { grid-template-columns: 1fr; } }
.col { min-width: 0; }
.col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 10px;
}
.col-head .dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.col-head h3 { font-size: 12.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-2); }
.col-head .n { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.col-body {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 120px;
  border-radius: var(--r-md);
  transition: background 0.15s;
  padding: 2px;
}
.col-body.drag-over { background: rgba(255, 74, 28, 0.07); outline: 1px dashed var(--indigo-soft); }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 13px 14px 12px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: 0 10px 30px rgba(6,14,10,0.5); }
.card.dragging { opacity: 0.55; transform: rotate(1.6deg); }
.card .c-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.card .c-name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.card .c-raise { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.card .c-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.card .c-foot { display: flex; align-items: center; margin-top: 10px; gap: 8px; }
.card .c-foot .due { font-size: 11.5px; color: var(--ink-3); }
.card .c-foot .due.hot { color: var(--orange-soft); font-weight: 600; }
.card .avatar { width: 22px; height: 22px; font-size: 9px; margin-left: auto; }

/* ---------- drawer ---------- */

.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 18, 13, 0.58);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.scrim.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: min(620px, 94vw);
  background: var(--bg-deep);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-drawer);
  transform: translateX(103%);
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }

.drawer-head { padding: 22px 26px 0; }
.drawer-head .d-row { display: flex; align-items: flex-start; gap: 14px; }
.drawer-head .co-mark { width: 46px; height: 46px; font-size: 17px; border-radius: 12px; }
.drawer-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.drawer-head .d-sub { color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.drawer-head .d-site {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 7px;
  font-family: var(--mono); font-size: 12px; color: var(--indigo-soft);
  text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s;
}
.drawer-head .d-site:hover { border-bottom-color: var(--indigo-soft); }
.drawer-head .d-site .ext { font-size: 11px; opacity: .7; }
.card-site {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  text-decoration: none; border-bottom: 1px solid transparent;
}
.card-site:hover { color: var(--indigo-soft); border-bottom-color: var(--indigo-soft); }
.drawer-head .d-close {
  margin-left: auto; background: none; border: none; color: var(--ink-3);
  font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 8px;
}
.drawer-head .d-close:hover { color: var(--ink); background: var(--surface); }

.d-fund {
  display: flex; gap: 22px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 13px 16px;
  margin-top: 16px;
}
.d-fund .f { min-width: 90px; }
.d-fund .f b { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.d-fund .f span { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }

.d-stage-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.d-stage-row select {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 10px; outline: none;
}
.d-stage-row select option { background: var(--surface-2); }

.tabs { display: flex; gap: 2px; margin-top: 18px; border-bottom: 1px solid var(--line-soft); padding: 0 2px; }
.tabs button {
  background: none; border: none;
  color: var(--ink-3); font-size: 14px; font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.tabs button:hover { color: var(--ink-2); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--indigo-soft); }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px 26px 40px; }

.d-section { margin-bottom: 24px; }
.d-section > h3 {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px;
}

.research-summary {
  font-size: 14.5px; color: var(--ink-2); line-height: 1.65;
  border-left: 3px solid var(--indigo-soft);
  padding-left: 14px;
}

.pain {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 13px 15px;
  margin-bottom: 10px;
}
.pain .p-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.pain .p-head b { font-size: 14px; font-weight: 700; }
.pain p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

.hooks li {
  list-style: none; position: relative;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
  padding-left: 20px; margin-bottom: 7px;
}
.hooks li::before {
  content: ''; position: absolute; left: 2px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3);
}

.approach {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--indigo-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.65;
}
.approach b { color: var(--ink); }

.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score-cell { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 11px 13px; }
.score-cell .sc-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.score-cell .sc-top span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.score-cell .sc-top b { font-family: var(--mono); font-size: 12.5px; }
.score-cell .bar { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.score-cell .bar i { display: block; height: 100%; border-radius: 3px; background: var(--chart-1); }

/* contacts */
.contact {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 11px 14px; margin-bottom: 9px;
}
.contact .ct-info { min-width: 0; }
.contact .ct-info b { font-size: 14px; display: block; }
.contact .ct-info span { font-size: 12.5px; color: var(--ink-3); font-family: var(--mono); }
.contact .src { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }

/* email composer */
.composer {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
.composer .comp-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
  font-size: 13px; color: var(--ink-3);
}
.composer .comp-head b { color: var(--ink-2); font-weight: 600; }
.composer .subject {
  width: 100%; background: none; border: none; outline: none;
  color: var(--ink); font-family: inherit;
  font-size: 14.5px; font-weight: 700;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
}
.composer textarea {
  width: 100%; min-height: 240px; resize: vertical;
  background: none; border: none; outline: none;
  color: var(--ink-2); font-family: inherit;
  font-size: 13.8px; line-height: 1.65;
  padding: 13px 14px;
}
.composer .comp-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-top: 1px solid var(--line-soft);
}
.composer .comp-foot .note { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }

.typing-caret::after {
  content: '▍'; color: var(--indigo-soft);
  animation: blink 0.85s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.draft-empty {
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  padding: 26px 20px;
  text-align: center;
}
.draft-empty p { color: var(--ink-3); font-size: 13.5px; margin-bottom: 14px; }

/* timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line-soft); border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: ''; position: absolute; left: -20px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface-3); border: 2px solid var(--ink-3);
}
.tl-item.hot::before { border-color: var(--green-soft); background: rgba(16,185,129,0.25); }
.tl-item .tl-text { font-size: 13.5px; color: var(--ink-2); }
.tl-item .tl-text b { color: var(--ink); }
.tl-item .tl-ts { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); margin-top: 2px; }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px);
  background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 18px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 14px 40px rgba(0,0,0,0.55);
  opacity: 0; pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  z-index: 100;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .tick { color: var(--green-soft); font-size: 15px; }

/* team view */
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

.rep-line {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
}
.rep-line:last-child { border-bottom: none; }
.rep-line .r-name { font-weight: 700; font-size: 14px; }
.rep-line .r-sub { font-size: 12px; color: var(--ink-3); }
.rep-line .r-stat { margin-left: auto; text-align: right; }
.rep-line .r-stat b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rep-line .r-stat span { display: block; font-size: 11px; color: var(--ink-3); }

/* empty states */
.empty { padding: 34px 20px; text-align: center; color: var(--ink-3); font-size: 13.5px; }

/* today-view row variants (classes, not inline grids — so media queries can win) */
.tr-follow { grid-template-columns: 44px 1.4fr 1fr auto auto; }
.tr-reply  { grid-template-columns: 44px 1.4fr 2fr auto; }
.tr-fresh  { grid-template-columns: 34px 1fr auto; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .team-grid { grid-template-columns: 1fr; }
  .signal-row:not(.today-row) { grid-template-columns: 44px 1.5fr 1fr auto; }
  .signal-row:not(.today-row) .sr-fit,
  .signal-row:not(.today-row) .sr-badges { display: none; }
}

@media (max-width: 820px) {
  .main { padding: 20px 16px 64px; }
}

@media (max-width: 720px) {
  /* topbar → compact brand + rep on row 1, scrollable nav strip on row 2 */
  .topbar {
    flex-wrap: wrap; height: auto; min-height: 54px;
    padding: 8px 14px; gap: 8px 12px;
  }
  .brand img { height: 24px; }
  .brand .app-tag, .live-dot { display: none; }
  .nav {
    order: 4; width: 100%; margin: 0 -14px; padding: 2px 14px 4px;
    overflow-x: auto; flex-wrap: nowrap; gap: 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { flex: none; white-space: nowrap; padding: 7px 12px; }
  .topbar-right { gap: 8px; }
  .rep-switch { padding: 4px 10px 4px 5px; }
  .rep-switch select { font-size: 12.5px; max-width: 116px; }

  /* mobile-first inbox: title, then full-width search, then scrollable filters */
  .panel-head { flex-wrap: wrap; row-gap: 8px; }
  .inbox-toolbar { flex-direction: column; gap: 10px; padding: 12px 14px; }
  .inbox-toolbar .search-box { width: 100%; }
  /* 16px on editable fields stops iOS zooming (and getting stuck) on focus */
  .search-box, .composer .subject, .composer textarea { font-size: 16px; padding: 10px 12px; }
  /* filters become compact dropdowns on mobile (chips are desktop-only) */
  .chip-groups { display: none; }
  .filter-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .filter-selects label {
    display: flex; flex-direction: column; gap: 3px;
    font-size: 9.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3);
  }
  .filter-selects select {
    width: 100%; font-family: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
    padding: 9px 30px 9px 11px; outline: none; -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%237f9488' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right 11px center;
  }
  .filter-selects select:focus { border-color: var(--indigo-soft); }

  /* keep the header short so the list is visible without scrolling */
  .view-head .sub { display: none; }

  /* signals-first: list above the summary tiles on a phone */
  #view-signals.active { display: flex; flex-direction: column; }
  #view-signals .view-head { order: 1; }
  #view-signals .panel { order: 2; }
  #view-signals .stats { order: 3; margin: 8px 0 0; }

  .view-head { gap: 10px 14px; margin-bottom: 16px; }
  .view-head h1 { font-size: 21px; }
  .stat .spark { display: none; }
  .stat .value { font-size: 26px; }
}

@media (max-width: 560px) {
  /* signal rows → two-line cards (scoped away from today rows) */
  .signal-row:not(.today-row) {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-areas: "mark name act" "mark raise act";
    column-gap: 11px; row-gap: 2px; padding: 13px 15px; align-items: center;
  }
  .signal-row:not(.today-row) > .co-mark { grid-area: mark; width: 38px; height: 38px; }
  .signal-row:not(.today-row) > .signal-co { grid-area: name; min-width: 0; }
  .signal-row:not(.today-row) > .raise { grid-area: raise; }
  .signal-row:not(.today-row) > .btn,
  .signal-row:not(.today-row) > .badge.inpipe { grid-area: act; justify-self: end; }
  .signal-co .co-name { font-size: 14px; }
  .signal-co .co-sub, .raise .rnd {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  }

  /* today rows → 3-col, trimming the least-critical cells */
  .tr-follow, .tr-reply { grid-template-columns: 38px minmax(0, 1fr) auto; column-gap: 10px; }
  .tr-follow .due, .tr-follow .avatar, .tr-reply .tr-quote { display: none; }
  .tr-fresh { grid-template-columns: 34px minmax(0, 1fr); }

  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* drawer full-bleed */
  .drawer { width: 100vw; }
  .drawer-head { padding: 18px 16px 0; }
  .drawer-head h2 { font-size: 19px; }
  .drawer-body { padding: 16px 16px 32px; }
  .d-fund { gap: 14px 20px; }
  .score-grid { grid-template-columns: 1fr; }
  .composer textarea { min-height: 200px; }
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .demo-bar { padding: 8px 14px; gap: 8px 10px; font-size: 12.5px; }
  .demo-bar .db-switch {
    margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px;
    scrollbar-width: none;
  }
  .demo-bar .db-switch::-webkit-scrollbar { display: none; }
  .demo-bar .db-switch a { flex: none; }
  .demo-bar .db-cta { margin-left: auto; }
}

/* ---------- demo-mode banner (app.html?demo=<key>) ---------- */
.demo-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 9px 22px;
  font-size: 13px;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(255, 74, 28, 0.16), rgba(255, 74, 28, 0.05));
  border-bottom: 1px solid rgba(255, 74, 28, 0.35);
}
.demo-bar .db-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--indigo); flex: none;
  box-shadow: 0 0 0 0 var(--indigo-glow);
  animation: dbpulse 2.4s infinite;
}
@keyframes dbpulse {
  0% { box-shadow: 0 0 0 0 var(--indigo-glow); }
  70% { box-shadow: 0 0 0 8px rgba(255, 74, 28, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 74, 28, 0); }
}
.demo-bar .db-msg { color: var(--ink-2); }
.demo-bar .db-msg b { color: var(--ink); font-weight: 700; }
.demo-bar .db-switch {
  margin-left: auto;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.demo-bar .db-switch a {
  color: var(--ink-2); text-decoration: none;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
}
.demo-bar .db-switch a:hover { border-color: var(--indigo); color: var(--ink); }
.demo-bar .db-switch a.on {
  background: rgba(255, 74, 28, 0.16); border-color: rgba(255, 74, 28, 0.5); color: var(--ink);
}
.demo-bar .db-cta {
  font-weight: 700; font-size: 12.5px; color: #fff; text-decoration: none;
  background: var(--indigo); border-radius: 8px; padding: 7px 14px; white-space: nowrap;
}
.demo-bar .db-cta:hover { background: var(--indigo-soft); }
@media (prefers-reduced-motion: reduce) { .demo-bar .db-dot { animation: none; } }

/* ---------- mobile safety: never let a flex row with a nowrap child overflow ---------- */
@media (max-width: 560px) {
  .pain .p-head { flex-wrap: wrap; row-gap: 6px; }
  .composer .comp-head { flex-wrap: wrap; row-gap: 4px; }
  .contact { flex-wrap: wrap; row-gap: 6px; }
  .d-stage-row { row-gap: 8px; }
  .drawer-body { overflow-x: hidden; }
  .view-head .sub { width: 100%; }
}

/* ---------- iOS auto-zoom guard ----------
   Safari zooms (and can get stuck off 1:1) whenever a focused field is < 16px.
   Force every editable control to 16px at ALL widths, high enough in the cascade
   (end of file) to beat the component rules above. */
.search-box,
.rep-switch select,
.d-stage-row select,
.composer .subject,
.composer textarea,
.filter-selects select,
input, select, textarea { font-size: 16px; }

/* ---------- contact channels (drawer › Outreach) ---------- */
.ic-s { width: 14px; height: 14px; flex: none; }
.reach { display: flex; flex-wrap: wrap; gap: 8px; }
.reach-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; background: var(--surface);
}
.reach-item svg { color: var(--indigo-soft); }
.reach-item:hover { border-color: var(--indigo-soft); color: var(--ink); }
.reach-item.muted { color: var(--ink-3); cursor: default; }
.reach-item.muted svg { color: var(--ink-3); }
.contact .ct-info { display: flex; flex-direction: column; gap: 3px; }
.contact .ct-info b { display: inline-flex; align-items: center; font-size: 14px; }
.ct-li { display: inline-flex; align-items: center; color: var(--indigo-soft); margin-left: 7px; }
.ct-li:hover { color: var(--indigo); }
.ct-li .ic-s { width: 13px; height: 13px; }
.contact .ct-ch { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.contact .ct-ch svg { color: var(--ink-3); }

/* ---------- auth gate (Phase 3b) — hidden unless Clerk is configured ---------- */
#authGate { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: none; overflow: auto; }
#authGate.show { display: flex; align-items: center; justify-content: center; padding: 24px; }
body.gated { overflow: hidden; }
.ag-card { max-width: 400px; width: 100%; text-align: center; }
.ag-mark { display: flex; justify-content: center; margin-bottom: 18px; }
.ag-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.ag-card p { color: var(--ink-2); font-size: 15px; margin-bottom: 20px; line-height: 1.55; }
.ag-link { display: inline-block; margin-top: 16px; color: var(--indigo-soft); font-size: 13px; text-decoration: none; }
.ag-link:hover { text-decoration: underline; }
.ag-btn { background: var(--indigo); color: #fff; border: none; border-radius: 10px; padding: 11px 22px; font-weight: 700; font-size: 15px; cursor: pointer; }
.ag-btn:hover { background: var(--indigo-soft); }
#clerkMount { display: flex; justify-content: center; }

/* Clerk account button slot (mounted by auth.js when signed in) */
.user-btn { display: flex; align-items: center; }
.user-btn:empty { display: none; }

/* settings gear in the topbar (shown for real workspaces) */
.settings-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; color: var(--ink-3); border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.settings-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.settings-btn.hidden { display: none; }

/* ---------- Ask Beacon chat dock ---------- */
#chatDock { position: fixed; right: 20px; bottom: 20px; z-index: 60; }
.chat-fab {
  background: #ff4a1c; color: #fff; border: none; border-radius: 22px;
  font-weight: 700; font-size: 14px; padding: 12px 20px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 0 1px rgba(255,74,28,.4);
  font-family: inherit; transition: transform .12s, background .15s;
}
.chat-fab:hover { background: #ff6b42; transform: translateY(-1px); }
.chat-panel {
  width: 380px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.chat-head { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); }
.chat-title { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.chat-ctx { font-family: var(--mono); font-size: 11px; color: #ff8a63; background: rgba(255,74,28,.12); padding: 2px 8px; border-radius: 20px; }
.chat-head .spacer { flex: 1; }
.chat-x { background: none; border: none; color: var(--ink-3); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 6px; border-radius: 6px; }
.chat-x:hover { color: var(--ink); background: var(--surface-3); }
.chat-body { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 11px; }
.chat-empty { color: var(--ink-3); font-size: 13.5px; line-height: 1.6; }
.chat-sugg { display: flex; flex-direction: column; gap: 7px; margin-top: 13px; }
.chat-s { text-align: left; background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--ink-2); border-radius: 9px; padding: 9px 12px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.chat-s:hover { border-color: #ff4a1c; color: var(--ink); }
.chat-bubble { max-width: 84%; padding: 10px 13px; border-radius: 13px; font-size: 13.5px; line-height: 1.55; word-wrap: break-word; }
.chat-bubble.me { align-self: flex-end; background: #ff4a1c; color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble.bot { align-self: flex-start; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; }
.chat-src { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 7px; }
.chat-src a { font-family: var(--mono); font-size: 10.5px; color: #ff8a63; text-decoration: none; background: rgba(255,74,28,.1); padding: 2px 7px; border-radius: 6px; }
.chat-src a:hover { text-decoration: underline; }
.chat-typing::after { content: '…'; animation: chatdots 1.2s steps(4,end) infinite; }
@keyframes chatdots { 0%{opacity:.3} 50%{opacity:1} 100%{opacity:.3} }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-soft); background: var(--surface); }
.chat-input input { flex: 1; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 10px 12px; font-size: 16px; outline: none; font-family: inherit; }
.chat-input input:focus { border-color: #ff4a1c; }
.chat-input button { background: #ff4a1c; color: #fff; border: none; border-radius: 10px; padding: 0 16px; font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit; }
.chat-input button:disabled { opacity: .5; cursor: default; }
@media (max-width: 460px) { .chat-panel { height: calc(100vh - 90px); } #chatDock { right: 14px; bottom: 14px; } }

/* ---------- report set: drawer button + export tray ---------- */
.rep-add { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 12px; padding: 5px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.rep-add:hover { border-color: var(--indigo); color: var(--ink); }
.rep-add.on { background: rgba(255,74,28,.14); border-color: var(--indigo); color: var(--ink); }
#reportTray { position: fixed; left: 20px; bottom: 20px; z-index: 55; }
.rt-pill { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.4); overflow: hidden; }
.rt-open { background: none; border: none; color: var(--ink); font-weight: 700; font-size: 13.5px; padding: 11px 16px; cursor: pointer; font-family: inherit; }
.rt-open:hover { background: var(--surface-2); }
.rt-clear { background: none; border: none; border-left: 1px solid var(--line-soft); color: var(--ink-3); font-size: 17px; line-height: 1; padding: 0 13px; cursor: pointer; }
.rt-clear:hover { color: var(--indigo-soft); }
@media (max-width: 460px) { #reportTray { left: 14px; bottom: 14px; } }

/* workspace logo in topbar chip */
.ws-logo { height: 18px; max-width: 90px; object-fit: contain; border-radius: 3px; display: block; }
.comp-logo { height: 16px; max-width: 70px; object-fit: contain; margin-right: 9px; vertical-align: middle; border-radius: 2px; }

/* prominent report export button in topbar */
.report-btn { display:flex; align-items:stretch; background:var(--indigo); border-radius:999px; overflow:hidden; box-shadow:0 0 0 1px rgba(255,74,28,.4), 0 4px 14px rgba(255,74,28,.28); }
.report-btn.hidden { display:none; }
.rb-open { background:none; border:none; color:#fff; font-weight:700; font-size:13px; padding:7px 14px; cursor:pointer; font-family:inherit; display:flex; align-items:center; gap:7px; }
.rb-open:hover { background:rgba(255,255,255,.14); }
.rb-count { background:rgba(255,255,255,.28); color:#fff; font-size:11px; font-weight:800; min-width:18px; height:18px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; padding:0 5px; font-variant-numeric:tabular-nums; }
.rb-clear { background:rgba(0,0,0,.14); border:none; color:#fff; font-size:15px; line-height:1; padding:0 11px; cursor:pointer; }
.rb-clear:hover { background:rgba(0,0,0,.28); }
@media (max-width:720px) { .rb-open .lbl { display:none; } .rb-open { padding:7px 11px; } }

/* ---------- Today: coverage analytics ---------- */
.an-wrap { padding: 18px; }
.an-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 640px) { .an-metrics { grid-template-columns: repeat(2, 1fr); } }
.an-m { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 11px; padding: 13px 15px; }
.an-m b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.an-m span { font-size: 11px; font-family: var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.an-charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .an-charts { grid-template-columns: 1fr; gap: 18px; } }
.an-chart h4 { font-size: 11px; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 11px; font-weight: 600; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr 26px; gap: 9px; align-items: center; }
.bar-label { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 9px; background: var(--bg-deep); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; min-width: 3px; transition: width 0.5s cubic-bezier(0.16,1,0.3,1); }
.bar-val { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }

/* ---------- CRM: deal chip + status in drawer header ---------- */
.deal-chip { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink); background: var(--surface-3); border-radius: 6px; padding: 3px 9px; }
.deal-status { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-radius: 6px; padding: 3px 9px; }
.deal-status.won { color: #06170f; background: var(--green); }
.deal-status.lost { color: var(--ink-2); border: 1px solid var(--line); }

/* ---------- CRM: deal tab ---------- */
.deal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 16px; }
@media (max-width: 560px) { .deal-grid { grid-template-columns: 1fr; } }
.dl-field { display: flex; flex-direction: column; gap: 7px; }
.dl-field > span { font-size: 11.5px; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.dl-field > span b { color: var(--indigo-soft); font-weight: 700; }
.dl-money { display: flex; align-items: center; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.dl-money .dl-pre { padding: 0 4px 0 12px; color: var(--ink-3); }
.dl-money input { flex: 1; background: none; border: none; color: var(--ink); padding: 10px 4px; font-size: 16px; outline: none; font-family: inherit; }
.dl-money .dl-unit { padding: 0 12px 0 4px; color: var(--ink-3); font-family: var(--mono); font-size: 13px; }
.dl-field input[type=date] { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); padding: 9px 12px; font-size: 15px; outline: none; font-family: inherit; }
.dl-field input[type=date]:focus, .dl-money:focus-within { border-color: var(--indigo); }
.dl-field input[type=range] { accent-color: var(--indigo); width: 100%; }
.dl-weighted { font-size: 20px; font-weight: 800; letter-spacing: -.02em; padding: 6px 0; font-variant-numeric: tabular-nums; }
.deal-actions { display: flex; gap: 10px; }
.btn.won { background: var(--green); color: #06170f; border: none; font-weight: 700; border-radius: 9px; padding: 10px 18px; }
.btn.won:hover { background: var(--green-soft); }
.btn.dl-lost { color: var(--ink-2); }
.btn.dl-lost:hover { border-color: var(--orange); color: var(--orange); }
.deal-closed { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14px; border-radius: 10px; padding: 12px 15px; }
.deal-closed .btn.sm { margin-left: auto; }
.deal-closed.won { background: rgba(79,174,138,.14); color: var(--green-soft); border: 1px solid rgba(79,174,138,.4); }
.deal-closed.lost { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-soft); }

/* contacts */
.contact-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 9px; }
.cr-fields { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.cr-fields input, .cr-fields select { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 8px 10px; font-size: 14px; outline: none; font-family: inherit; min-width: 0; }
.cr-fields input:focus, .cr-fields select:focus { border-color: var(--indigo); }
.cr-rm { background: none; border: 1px solid var(--line); color: var(--ink-3); border-radius: 8px; width: 32px; flex: none; cursor: pointer; font-size: 16px; }
.cr-rm:hover { border-color: var(--orange); color: var(--orange); }
.add-row { background: none; border: 1px dashed var(--line); color: var(--ink-2); border-radius: 9px; padding: 9px; width: 100%; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.add-row:hover { border-color: var(--indigo); color: var(--ink); }

/* ---------- CRM: activity composer + tasks ---------- */
.log-composer { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 13px; display: flex; flex-direction: column; gap: 9px; }
.log-types { display: flex; gap: 6px; flex-wrap: wrap; }
.log-type { background: var(--bg-deep); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 8px; cursor: pointer; }
.log-type.on { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.log-subject, .log-body, .log-outcome { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); padding: 10px 12px; font-size: 15px; outline: none; font-family: inherit; width: 100%; }
.log-subject:focus, .log-body:focus, .log-outcome:focus, .log-due:focus { border-color: var(--indigo); }
.log-body { min-height: 66px; resize: vertical; line-height: 1.5; }
.log-foot { display: flex; gap: 8px; align-items: center; }
.log-outcome { flex: 1; }
.log-due { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); padding: 9px 10px; font-size: 14px; font-family: inherit; outline: none; }
.log-due.hidden { display: none; }
.tasks { display: flex; flex-direction: column; gap: 7px; }
.task-row { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 9px; padding: 10px 13px; cursor: pointer; }
.task-row input { accent-color: var(--indigo); width: 16px; height: 16px; flex: none; }
.task-t { flex: 1; font-size: 13.5px; }
.task-due { font-family: var(--mono); font-size: 11.5px; color: var(--orange-soft); white-space: nowrap; }
.tl-body { color: var(--ink-2); font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
.tl-outcome { font-style: italic; color: var(--ink-3); }
.tl-due { font-family: var(--mono); font-size: 11px; color: var(--orange-soft); }

/* ---------- CRM: pipeline values ---------- */
.col-val { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 0 2px 8px; }
.col-val.dim { color: var(--ink-3); font-weight: 400; }
.badge.deal { background: var(--surface-3); color: var(--ink); font-family: var(--mono); font-weight: 700; }
.lost-strip { margin-top: 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; font-size: 12.5px; color: var(--ink-3); }
.lost-strip b { color: var(--ink-2); }

/* report-select checkbox on signal rows (scoped via .has-check so Today rows are untouched) */
.signal-row.has-check { grid-template-columns: 26px 44px 1.5fr 1fr minmax(150px, 165px) 118px auto; }
.sr-check { display: flex; align-items: center; justify-content: center; }
.sr-check input { accent-color: var(--indigo); width: 16px; height: 16px; cursor: pointer; }
@media (max-width: 1080px) {
  .signal-row.has-check:not(.today-row) { grid-template-columns: 26px 44px 1.5fr 1fr auto; }
}
@media (max-width: 560px) {
  .signal-row.has-check:not(.today-row) {
    grid-template-columns: 22px 38px minmax(0, 1fr) auto;
    grid-template-areas: "chk mark name act" "chk mark raise act";
  }
  .signal-row.has-check:not(.today-row) > .sr-check { grid-area: chk; }
}

/* ---------- Beacon usage meter (traffic light) ---------- */
.usage-light { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.usage-light:hover { border-color: var(--ink-3); }
.usage-light .ul-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.usage-light.light-green .ul-dot { background: var(--green); }
.usage-light.light-yellow .ul-dot { background: #e8c07a; }
.usage-light.light-red .ul-dot { background: var(--orange); box-shadow: 0 0 0 3px rgba(255,74,28,.18); }
.usage-light.light-yellow { color: #e8c07a; border-color: rgba(232,192,122,.5); }
.usage-light.light-red { color: var(--orange-soft); border-color: rgba(255,74,28,.5); }
.usage-light.hidden { display: none; }
@media (max-width: 1080px) { .usage-light .ul-txt { display: none; } .usage-light { padding: 6px 9px; } }

/* ---------- decision-makers (shared contact cache) ---------- */
.contacts-found { display: flex; flex-direction: column; gap: 8px; }
.cf-row { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 13px; }
.cf-i { flex: 1; min-width: 0; }
.cf-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cf-conf { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.cf-conf.hi { color: var(--green-soft); border-color: rgba(79,174,138,.4); }
.cf-title { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.cf-email { font-family: var(--mono); font-size: 12px; color: var(--indigo-soft); text-decoration: none; display: inline-block; margin-top: 4px; }
.cf-email:hover { text-decoration: underline; }
.cf-li { flex: none; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-3); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; text-decoration: none; font-style: italic; }
.cf-li:hover { border-color: var(--indigo); color: var(--ink); }
/* dashed = a LinkedIn search fallback (no verified profile URL from the source) */
.cf-li.search { border-style: dashed; opacity: 0.85; }
.cf-enr { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--green); border: 1px solid var(--green); border-radius: 5px; padding: 1px 5px; margin-left: 7px; vertical-align: middle; opacity: 0.9; }
.cr-li { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-3); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; text-decoration: none; font-style: italic; }
.cr-li:hover { border-color: var(--indigo); color: var(--ink); }
.cr-li-in { grid-column: 1 / -1; }
.cf-add { flex: none; background: none; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 12px; border-radius: 8px; padding: 6px 11px; cursor: pointer; white-space: nowrap; }
.cf-add:hover { border-color: var(--indigo); color: var(--ink); }
/* ---------- prospects (Form 5500 employer universe) ---------- */
.pf { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.pf-row { display: flex; align-items: flex-start; gap: 14px; }
.pf-row > label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); min-width: 66px; flex: none; padding-top: 8px; }
.pf .chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.pf .chip.sm { padding: 4px 8px; font-size: 11px; font-family: var(--mono); }
.pf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-left: 80px; }
@media (max-width: 820px) { .pf-grid { grid-template-columns: repeat(2, 1fr); padding-left: 0; } .pf-row { flex-direction: column; gap: 7px; } }
.pf-f { display: flex; flex-direction: column; gap: 6px; }
.pf-f > span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.pf-f select, .pf-f input { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 8px 10px; font-size: 13.5px; font-family: inherit; outline: none; width: 100%; }
.pf-f select:focus, .pf-f input:focus { border-color: var(--indigo); }
.pf-range { display: flex; align-items: center; gap: 7px; }
.pf-range em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.prospect-row { grid-template-columns: 34px 1fr 240px 92px auto; }
@media (max-width: 980px) { .prospect-row { grid-template-columns: 34px 1fr auto; } .pr-plan, .pr-renew { display: none; } }
.pr-plan { min-width: 0; }
.pr-carrier { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the broker's annual take is the punchline — never let it get truncated away */
.pr-broker { display: flex; align-items: baseline; gap: 7px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.pr-broker .pb-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-broker b { flex: none; color: var(--orange-soft); font-weight: 700; }
.pr-renew { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pr-date { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.rn-pill { font-family: var(--mono); font-size: 11px; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--ink-2); }
.rn-pill.warm { color: var(--orange-soft); border-color: rgba(255, 138, 92, 0.4); }
.rn-pill.hot { color: #fff; background: var(--orange); border-color: var(--orange); }
.rn-pill.dim { color: var(--ink-3); }

/* contacts: make the cost of a lookup visible, and never guess a website */
.cf-src { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: none; color: var(--green); border: 1px solid var(--green); border-radius: 5px; padding: 2px 7px; margin-left: 8px; opacity: 0.85; }
.cf-src.fresh { color: var(--orange-soft); border-color: var(--orange-soft); }
.cf-cost { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; line-height: 1.45; }
.dm-warn { background: rgba(255, 74, 28, 0.06); border: 1px solid rgba(255, 74, 28, 0.35); border-radius: 11px; padding: 14px 16px; }
.dm-warn b { font-size: 13.5px; color: var(--ink); }
.dm-warn p { font-size: 12.5px; color: var(--ink-2); margin: 6px 0 0; line-height: 1.5; }
.dm-warn em { color: var(--orange-soft); font-style: normal; font-weight: 600; }
.dm-cands { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dm-cand { font-family: var(--mono); font-size: 11px; background: none; border: 1px dashed var(--line); color: var(--ink-2); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.dm-cand:hover { border-color: var(--indigo); color: var(--ink); border-style: solid; }
.dm-none { font-style: italic; opacity: 0.7; }
.dm-set { display: flex; gap: 7px; margin-top: 11px; }
.dm-set input { flex: 1; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 8px 11px; font-size: 13.5px; font-family: var(--mono); outline: none; }
.dm-set input:focus { border-color: var(--indigo); }
.pr-unver { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 5px; padding: 2px 6px; margin-left: 7px; }

.cf-optout { flex: none; background: none; border: 1px solid var(--line); color: var(--ink-3); font-size: 13px; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; line-height: 1; }
.cf-optout:hover { border-color: var(--orange); color: var(--orange); }
.cf-optout:disabled { opacity: 0.5; cursor: default; }
