/* ============================================================================
   ATLAS REDESIGN — Brokerage Pulse screen styles  (reference #17)
   Branch: atlas-redesign-2026-06-29 · tokens only (--r-*), both themes.
   Self-contained under .rd-pulse (shared .rd-card / .rd-eyebrow primitives are
   scoped to other screens, so they're redeclared here). ZERO raw hex.
   ========================================================================== */

.rd-pulse { max-width: var(--r-page-max); margin: 0 auto; }

/* shared primitives (scoped) --------------------------------------------------- */
.rd-pulse .rd-eyebrow {
  font-family: var(--r-font-mono); font-size: var(--r-fs-eyebrow);
  letter-spacing: .12em; text-transform: uppercase; color: var(--r-clay);
  margin: 0 0 5px;
}
.rd-pulse .rd-card {
  background: var(--r-surface); border: 1px solid var(--r-border);
  border-radius: 16px; box-shadow: var(--r-shadow-card);
}

/* ---- header ----------------------------------------------------------------- */
.rd-pulse__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.rd-pulse__h1 {
  margin: 0; font-family: var(--r-font-display); font-size: 30px; font-weight: 600;
  letter-spacing: -.015em; color: var(--r-ink); line-height: 1.05;
}
.rd-pulse__head-r { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.rd-pulse__chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: var(--r-radius-control); background: var(--r-surface);
  border: 1px solid var(--r-border); color: var(--r-body);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.rd-pulse__chip--synced { background: var(--r-mint-surface); color: var(--r-mint-ink); border-color: transparent; }
.rd-pulse__chip-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--r-good);
  box-shadow: 0 0 0 3px var(--r-mint-surface);
}

/* ---- top band: hero (wide) + workforce (rail) ------------------------------- */
.rd-pulse__top {
  display: grid; grid-template-columns: 1.72fr 1fr; gap: var(--r-gutter);
  align-items: stretch; margin-bottom: var(--r-gutter);
}

/* ---- HERO card -------------------------------------------------------------- */
.rd-pulse__hero { padding: 24px 26px 22px; display: flex; flex-direction: column; }
.rd-pulse__hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rd-pulse__hero-label {
  font-family: var(--r-font-display); font-size: 16px; font-weight: 600;
  letter-spacing: -.01em; color: var(--r-ink);
}
.rd-pulse__hero-value {
  font-family: var(--r-font-display); font-size: 62px; font-weight: 600;
  letter-spacing: -.03em; line-height: .98; color: var(--r-ink); margin-top: 6px;
}
.rd-pulse__hero-goal { font-size: 14px; color: var(--r-muted); margin-top: 8px; }

/* ---- cross-nav "foot link" — a card that aggregates a screen click-throughs
   to it (Annual GCI → Goals, Top performers → Team, Where deals come from →
   Marketing). Ghost text style so it never competes with the hero number. --- */
.rd-pulse__foot-link {
  appearance: none; background: transparent; border: none; padding: 0;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--r-clay);
  transition: gap var(--r-dur) var(--r-ease), color var(--r-dur) var(--r-ease);
}
.rd-pulse__foot-link i { font-size: 12px; transition: transform var(--r-dur) var(--r-ease); }
.rd-pulse__foot-link:hover { color: var(--r-primary); gap: 9px; }
.rd-pulse__foot-link:hover i { transform: translateX(2px); }
.rd-pulse__foot-link:focus-visible { outline: var(--r-focus); outline-offset: 2px; border-radius: 4px; }
.rd-pulse__foot-link--block {
  width: 100%; justify-content: center; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--r-hairline);
}

/* progress bar */
.rd-pulse__progress { margin-top: 18px; }
.rd-pulse__track {
  height: 9px; border-radius: 6px; background: var(--r-seg-track); overflow: hidden;
}
.rd-pulse__fill {
  height: 100%; border-radius: 6px; background: var(--r-primary-2);
  transition: width var(--r-dur) var(--r-ease);
}
.rd-pulse__progress--empty .rd-pulse__fill { background: var(--r-seg-track); }
.rd-pulse__progress-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; font-family: var(--r-font-mono); font-size: 12px; color: var(--r-muted);
  letter-spacing: .02em;
}
.rd-pulse__progress--empty .rd-pulse__progress-meta { justify-content: flex-start; color: var(--r-faint); }

/* 3-up vitals */
.rd-pulse__vitals {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px;
}
.rd-pulse__vital {
  border: 1px solid var(--r-hairline); border-radius: 13px; background: var(--r-surface-2);
  padding: 15px 16px;
}
.rd-pulse__vital-v {
  font-family: var(--r-font-display); font-size: 27px; font-weight: 600;
  letter-spacing: -.02em; color: var(--r-ink); line-height: 1;
}
.rd-pulse__vital-l {
  font-family: var(--r-font-mono); font-size: 9.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--r-faint); margin-top: 9px;
}

/* trailing-12mo sparkline */
.rd-pulse__spark-wrap { margin-top: auto; padding-top: 22px; }
.rd-pulse__spark-cap {
  font-family: var(--r-font-mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--r-faint); margin-bottom: 10px;
}
.rd-pulse__spark { display: block; width: 100%; height: 74px; }
.rd-pulse__spark-line {
  fill: none; stroke: var(--r-primary-2); stroke-width: 2;
  vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round;
}
.rd-pulse__spark-area { fill: var(--r-primary-2); opacity: var(--r-spark-fill); }
.rd-pulse__spark-empty {
  height: 74px; display: flex; align-items: flex-end;
}
.rd-pulse__baseline {
  display: block; width: 100%; height: 2px; border-radius: 2px;
  background: var(--r-seg-track);
}

/* ---- WORKFORCE rail card (dark-mint surface) -------------------------------- */
.rd-pulse__wf {
  background: var(--r-mint-surface); border: 1px solid transparent;
  border-radius: 16px; box-shadow: var(--r-shadow-card);
  padding: 22px 22px 20px; display: flex; flex-direction: column;
}
.rd-pulse__wf-head { display: flex; align-items: flex-start; gap: 12px; }
.rd-pulse__wf-ic {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  background: var(--r-primary); color: var(--r-primary-ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 21px;
}
.rd-pulse__wf-eyebrow {
  font-family: var(--r-font-mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--r-mint-ink); opacity: .8;
}
.rd-pulse__wf-title {
  font-family: var(--r-font-display); font-size: 16px; font-weight: 600;
  letter-spacing: -.01em; color: var(--r-mint-ink); margin-top: 3px; line-height: 1.2;
}
.rd-pulse__wf-value {
  font-family: var(--r-font-display); font-size: 42px; font-weight: 600;
  letter-spacing: -.025em; color: var(--r-mint-ink); margin-top: 18px; line-height: 1;
}
/* No live ROI feed → the value is always the honest em-dash. Shown at a
   smaller, softer weight so it never competes with the Annual GCI hero — the
   ONE number that should dominate this screen. */
.rd-pulse__wf-value--empty { font-size: 26px; opacity: .55; }
.rd-pulse__wf-value-sub {
  font-family: var(--r-font-body); font-size: 13px; font-weight: 500;
  letter-spacing: 0; color: var(--r-mint-ink); opacity: .72;
}
.rd-pulse__wf-rows { margin-top: 18px; }
.rd-pulse__wf-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-top: 1px solid var(--r-hairline-2);
}
.rd-pulse__wf-row:first-child { border-top: none; }
.rd-pulse__wf-l { font-size: 13.5px; color: var(--r-mint-ink); opacity: .86; }
.rd-pulse__wf-v {
  font-family: var(--r-font-mono); font-size: 13.5px; font-weight: 600; color: var(--r-mint-ink);
}
.rd-pulse__wf-btn {
  margin-top: auto; margin-top: 18px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; height: 46px; border: none; border-radius: var(--r-radius-control);
  background: var(--r-primary); color: var(--r-primary-ink); cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600;
  transition: box-shadow var(--r-dur), transform var(--r-dur), filter var(--r-dur);
}
.rd-pulse__wf-btn:hover { box-shadow: var(--r-shadow-hover); transform: translateY(-1px); }
.rd-pulse__wf-btn:focus-visible { outline: var(--r-focus); outline-offset: 2px; }
.rd-pulse__wf-btn i { font-size: 15px; }

/* ---- bottom band: leaderboard + lead source --------------------------------- */
.rd-pulse__bottom {
  display: grid; grid-template-columns: 1.72fr 1fr; gap: var(--r-gutter);
  align-items: start;
}
.rd-pulse__lb, .rd-pulse__ls { padding: 20px 22px; }
.rd-pulse__card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px;
}
.rd-pulse__card-title {
  margin: 0; font-family: var(--r-font-display); font-size: 18px; font-weight: 600;
  letter-spacing: -.01em; color: var(--r-ink);
}
.rd-pulse__card-meta {
  font-family: var(--r-font-mono); font-size: 10.5px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--r-faint);
}
.rd-pulse__empty { font-size: 13px; color: var(--r-muted); padding: 6px 0; margin: 0; }

/* leaderboard rows */
.rd-pulse__lb-rows { display: flex; flex-direction: column; }
.rd-pulse__lb-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  font: inherit; cursor: pointer; background: transparent; border: none;
  color: var(--r-body); padding: 11px 4px; border-top: 1px solid var(--r-hairline);
  border-radius: 8px; transition: background var(--r-dur);
}
.rd-pulse__lb-row:first-child { border-top: none; }
.rd-pulse__lb-row:hover { background: var(--r-surface-2); }
.rd-pulse__lb-row:focus-visible { outline: var(--r-focus); outline-offset: -2px; }
.rd-pulse__lb-rank {
  flex: none; width: 20px; font-family: var(--r-font-mono); font-size: 12px;
  font-weight: 700; color: var(--r-faint); text-align: center;
}
.rd-pulse__lb-av {
  flex: none; width: 32px; height: 32px; border-radius: 9px;
  background: var(--r-mint-surface); color: var(--r-mint-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--r-font-mono); font-size: 11px; font-weight: 600;
}
.rd-pulse__lb-name { flex: none; width: 148px; font-size: 13.5px; font-weight: 600; color: var(--r-ink); }
.rd-pulse__lb-bar {
  flex: 1; min-width: 0; height: 7px; border-radius: 5px; background: var(--r-seg-track); overflow: hidden;
}
.rd-pulse__lb-bar-fill { display: block; height: 100%; border-radius: 5px; background: var(--r-primary-2); }
.rd-pulse__lb-val {
  flex: none; width: 56px; text-align: right; font-family: var(--r-font-mono);
  font-size: 12.5px; font-weight: 600; color: var(--r-muted);
}

/* lead-source rows (structure visible but em-dash / zero-fill = honest empty) */
.rd-pulse__ls-rows { margin-top: 12px; opacity: .75; }
.rd-pulse__ls-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-top: 1px solid var(--r-hairline);
}
.rd-pulse__ls-row:first-child { border-top: none; }
.rd-pulse__ls-l { flex: none; width: 128px; font-size: 13px; color: var(--r-body); }
.rd-pulse__ls-bar {
  flex: 1; min-width: 0; height: 7px; border-radius: 5px; background: var(--r-seg-track); overflow: hidden;
}
.rd-pulse__ls-bar-fill { display: block; height: 100%; border-radius: 5px; background: var(--r-primary-2); }
.rd-pulse__ls-val {
  flex: none; width: 48px; text-align: right; font-family: var(--r-font-mono);
  font-size: 12px; font-weight: 600; color: var(--r-faint);
}

/* ---- entrance motion (respects reduced-motion) ------------------------------ */
.rd-pulse__hero, .rd-pulse__wf, .rd-pulse__lb, .rd-pulse__ls { animation: rdPulseIn .28s var(--r-ease); }
@keyframes rdPulseIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rd-pulse__hero, .rd-pulse__wf, .rd-pulse__lb, .rd-pulse__ls { animation: none; }
  .rd-pulse__wf-btn:hover, .rd-pulse__foot-link:hover i { transform: none; }
}

/* ---- responsive ------------------------------------------------------------- */
@media (max-width: 1080px) {
  .rd-pulse__top, .rd-pulse__bottom { grid-template-columns: 1fr; }
  .rd-pulse__hero-value { font-size: 52px; }
}
@media (max-width: 560px) {
  .rd-pulse__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .rd-pulse__vitals { grid-template-columns: 1fr; }
  .rd-pulse__lb-name { width: auto; flex: 1; }
}
@media (max-width: 480px) {
  .rd-pulse__hero { padding: 20px 18px 18px; }
  .rd-pulse__hero-value { font-size: 40px; }
  .rd-pulse__wf-value { font-size: 32px; }
  .rd-pulse__wf-value--empty { font-size: 22px; }
  .rd-pulse__lb-av { display: none; }
}
