/* ============================================================================
   ATLAS REDESIGN — Home screen styles
   Branch: atlas-redesign-2026-06-29

   Selectors prefixed .rd-home. Tokens ONLY (--r-*). Both themes
   (Calm [data-rtheme="almanac"] + Operator [data-rtheme="operator"]) work via
   the token layer — theme-specific tweaks are minimal and explicitly scoped.

   Composition mirrors the v1.6 mockup (_redesign_handoff_v1.6_2026-06-30):
     header → KPI strip → quick actions → upper band → main grid
     (LEFT: Morning Brief + Needs a decision · RIGHT: Pipeline stage bars +
     Hot leads + Team production) → trust footer.

   Layout target: 1920×1080, no OUTER scroll. The screen lays out as a vertical
   stack that fits the work surface; inner card bodies may scroll.
   ========================================================================== */

.rd-home {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 30px 16px;
  max-width: var(--r-page-max);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  color: var(--r-body);
  font-family: var(--r-font-body);
  font-size: var(--r-fs-body);
  min-height: 0;
}

/* shared eyebrow (mono uppercase) */
.rd-home .rd-eyebrow {
  margin: 0;
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--r-faint);
}

/* ── 1 · page header (greeting + actions) ────────────────────────────────── */
.rd-home__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.rd-home__head-left { display: flex; flex-direction: column; gap: 5px; }
.rd-home__eyebrow { color: var(--r-clay); }
.rd-home__clock { color: var(--r-faint); }
.rd-home__greet {
  margin: 0;
  font-family: var(--r-font-display);
  font-size: 34px; /* P3 2026-07-02: 30→34 — flagship greeting sits at the top of the V6 30-34 H1 band (ref match) */
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--r-ink);
}
.rd-home__head-acts { display: flex; gap: 8px; flex: none; }

/* ── 2 · KPI strip (4-up premium KpiCards — see components/kpi-card.css) ──── */
.rd-home__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
/* drill-down affordance (home.js wires data-kpi → the screen that owns the number) */
.rd-home__kpis .rd-kpic {
  cursor: pointer;
  transition: border-color var(--r-dur) var(--r-ease), box-shadow var(--r-dur) var(--r-ease), transform var(--r-dur) var(--r-ease);
}
.rd-home__kpis .rd-kpic:hover { border-color: var(--r-primary); box-shadow: var(--r-shadow-hover); transform: translateY(-2px); }
.rd-home__kpis .rd-kpic:focus-visible { outline: var(--r-focus); outline-offset: 2px; }
/* hierarchy: Gross commission is the day's single most important number — let it lead */
.rd-home__kpis .rd-kpic:first-child {
  border-color: var(--r-primary);
  background: linear-gradient(165deg, var(--r-mint-surface) 0%, var(--r-surface) 58%);
}
.rd-home__kpis .rd-kpic:first-child .rd-kpic__value { font-size: 33px; }

/* ── 3 · quick actions ───────────────────────────────────────────────────── */
.rd-home__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rd-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  font-family: var(--r-font-body);
  font-size: var(--r-fs-body);
  font-weight: 600;
  color: var(--r-body);
  background: var(--r-surface);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-control);
  cursor: pointer;
  transition: background var(--r-dur) var(--r-ease),
              border-color var(--r-dur) var(--r-ease),
              color var(--r-dur) var(--r-ease),
              transform var(--r-dur) var(--r-ease);
}
.rd-action__ico { display: inline-flex; color: var(--r-primary); }
.rd-action:hover {
  border-color: var(--r-primary);
  color: var(--r-ink);
  background: var(--r-mint-surface);
  transform: translateY(-1px);
}
.rd-action:active { transform: translateY(0); }
.rd-action:focus-visible { outline: var(--r-focus); outline-offset: 2px; }

/* solid (primary-fill) variant — Brain dump + header "New deal" */
.rd-action--solid {
  background: var(--r-primary);
  border-color: var(--r-primary);
  color: var(--r-primary-ink);
}
.rd-action--solid .rd-action__ico { color: var(--r-primary-ink); }
.rd-action--solid:hover {
  background: var(--r-primary-2);
  border-color: var(--r-primary-2);
  color: var(--r-primary-ink);
}
/* ghost (header "View pipeline") — same as default ghost button */
.rd-action--ghost { font-weight: 600; }

/* ── shared card primitive (home-local) ──────────────────────────────────── */
.rd-home .rd-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--r-surface);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-card);
  box-shadow: var(--r-shadow-card);
  overflow: hidden;
}
.rd-home .rd-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px 11px;
}
.rd-home .rd-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--r-font-display);
  font-size: var(--r-fs-h2);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--r-ink);
}
.rd-home .rd-card__title > svg { color: var(--r-clay); flex: none; }
.rd-home .rd-card__meta {
  font-size: var(--r-fs-meta);
  color: var(--r-muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.rd-home .rd-card__meta--sync { display: inline-flex; align-items: center; gap: 5px; }
.rd-home .rd-card__meta--sync svg { opacity: .8; }
.rd-home .rd-card__body {
  padding: 4px 18px 14px;
  overflow-y: auto;
  min-height: 0;
}

/* count chip inside a card title / meta */
.rd-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--r-radius-pill);
  font-family: var(--r-font-mono);
  font-size: 12px;
  font-weight: 600;
  background: var(--r-mint-surface);
  color: var(--r-mint-ink);
  font-variant-numeric: tabular-nums;
}
.rd-count--clay { background: var(--r-chip-down-surface); color: var(--r-chip-down-ink); }

/* ── 4 · upper band (2 cols) ─────────────────────────────────────────────── */
.rd-home__band { display: grid; gap: var(--r-gutter); }
.rd-home__band--upper { grid-template-columns: 1fr 1fr; }
.rd-home__band--upper .rd-card__body { max-height: 232px; }
/* "Needs follow-up" card carries a clay hairline accent */
.rd-home__followup { border-color: var(--r-clay); }
html[data-rtheme="operator"] .rd-home__followup {
  border-color: var(--r-chip-down-surface);
}

/* ── 5 · main band (1.5fr / 1fr) ─────────────────────────────────────────── */
.rd-home__band--main { grid-template-columns: 1.5fr 1fr; align-items: start; }
.rd-home__mainL, .rd-home__mainR { display: flex; flex-direction: column; gap: var(--r-gutter); min-width: 0; }
.rd-home__mainR .rd-card__body { max-height: 178px; }
.rd-home__decide .rd-card__body { max-height: 232px; }

/* generic data rows */
.rd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--r-hairline);
}
.rd-card__body > .rd-row:first-child { border-top: 0; }

/* ── clickable-row craft (schedule · follow-up · hot leads · team) ──────────
   Every row that opens a real record (or navigates to the screen that owns
   it) gets a hand-crafted hover tint + focus ring. The bleed margin/padding
   trick matches the .rd-brief-action convention on the Briefs screen. */
.rd-home [data-fu-open],
.rd-home [data-hot-open],
.rd-home [data-team-open],
.rd-home [data-sched-open] {
  cursor: pointer;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: var(--r-radius-control);
  transition: background var(--r-dur) var(--r-ease);
}
.rd-home [data-fu-open]:hover,
.rd-home [data-hot-open]:hover,
.rd-home [data-team-open]:hover,
.rd-home [data-sched-open]:hover {
  background: var(--r-surface-2);
}
.rd-home [data-fu-open]:focus-visible,
.rd-home [data-hot-open]:focus-visible,
.rd-home [data-team-open]:focus-visible,
.rd-home [data-sched-open]:focus-visible {
  outline: var(--r-focus);
  outline-offset: -2px;
  background: var(--r-surface-2);
}

/* ── schedule rows (mono time + title/sub) ───────────────────────────────── */
.rd-sched-row__time {
  flex: 0 0 58px;
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-meta);
  font-weight: 600;
  color: var(--r-primary);
  font-variant-numeric: tabular-nums;
}
.rd-sched-row__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rd-sched-row__title { color: var(--r-ink); font-weight: 600; font-size: var(--r-fs-body); }
.rd-sched-row__sub { font-size: var(--r-fs-meta); color: var(--r-muted); }

/* ── follow-up rows (avatar + reason + phone/chat icon buttons) ──────────── */
.rd-avatar {
  flex: 0 0 30px;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--r-well);
  color: var(--r-muted);
  font-family: var(--r-font-body);
  font-size: 10px;
  font-weight: 600;
}
.rd-avatar--sm { flex-basis: 30px; }
.rd-fu-row__body { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.rd-fu-row__name { color: var(--r-ink); font-weight: 600; font-size: var(--r-fs-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-fu-row__reason { font-size: var(--r-fs-meta); color: var(--r-clay); }
.rd-fu-row__acts { display: inline-flex; gap: 6px; flex: none; }

.rd-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--r-radius-badge);
  border: 1px solid var(--r-border);
  background: var(--r-surface);
  color: var(--r-primary);
  cursor: pointer;
  transition: all var(--r-dur) var(--r-ease);
}
.rd-iconbtn:hover { border-color: var(--r-primary); background: var(--r-mint-surface); }
.rd-iconbtn:focus-visible { outline: var(--r-focus); outline-offset: 1px; }

/* ── Morning Brief card ──────────────────────────────────────────────────── */
.rd-brief__head { align-items: center; gap: 9px; }
.rd-brief__badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .12em;
  color: var(--r-primary);
  background: var(--r-mint-surface);
  padding: 4px 9px;
  border-radius: 7px;
}
.rd-brief__badge svg { flex: none; }
.rd-brief__by { font-size: var(--r-fs-meta); color: var(--r-faint); }
.rd-brief__time {
  margin-left: auto;
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-meta);
  color: var(--r-faint);
}
.rd-brief__body { padding-top: 6px; }
.rd-brief__summary {
  font-family: var(--r-font-display);
  font-size: 21px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--r-ink);
  margin: 8px 0 18px;
}
.rd-brief__insights { display: flex; flex-direction: column; gap: 14px; }
.rd-brief__insight { display: flex; gap: 13px; }
.rd-brief__num {
  flex: none;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--r-mint-surface);
  color: var(--r-mint-ink);
  font-family: var(--r-font-mono);
  font-size: 12px;
  font-weight: 600;
  margin-top: 1px;
}
.rd-brief__text {
  font-size: var(--r-fs-body);
  line-height: 1.55;
  color: var(--r-body);
}
.rd-brief__act {
  color: var(--r-primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.rd-brief__act:hover { text-decoration: underline; }
.rd-brief__buttons {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--r-hairline);
}

/* ── Needs a decision rows (icon tile + eyebrow + title/sub + action btn) ─── */
.rd-decide-row {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 14px;
  border: 1px solid var(--r-hairline);
  border-radius: var(--r-radius-control);
  background: var(--r-surface-2);
  cursor: pointer;
  transition: border-color var(--r-dur) var(--r-ease), box-shadow var(--r-dur) var(--r-ease), transform var(--r-dur) var(--r-ease);
}
.rd-decide-row + .rd-decide-row { margin-top: 10px; }
.rd-decide-row:hover { border-color: var(--r-primary); box-shadow: var(--r-shadow-card); transform: translateY(-1px); }
.rd-decide-row:focus-visible { outline: var(--r-focus); outline-offset: 2px; }
.rd-decide-row__ico {
  flex: none;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
}
.rd-decide-row__ico--good    { background: var(--r-mint-surface);      color: var(--r-mint-ink); }
.rd-decide-row__ico--clay    { background: var(--r-chip-down-surface); color: var(--r-clay-2); }
.rd-decide-row__ico--neutral { background: var(--r-well);             color: var(--r-muted); }
.rd-decide-row__body { flex: 1 1 auto; min-width: 0; }
.rd-decide-row__eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--r-font-mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: var(--r-faint);
}
.rd-decide-row__ai {
  font-family: var(--r-font-mono);
  font-size: 9px;
  color: var(--r-primary);
  background: var(--r-mint-surface);
  border-radius: 6px;
  padding: 1px 6px;
}
.rd-decide-row__title {
  font-size: var(--r-fs-body);
  font-weight: 600;
  color: var(--r-ink);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rd-decide-row__sub { font-size: var(--r-fs-meta); color: var(--r-muted); margin-top: 1px; }

/* ── pipeline stage bars (label·count + volume + progress bar) ───────────── */
.rd-home__pipe .rd-card__body { display: flex; flex-direction: column; gap: 13px; }
.rd-stage { display: flex; flex-direction: column; gap: 6px; }
/* hand-crafted hover/focus (bleed trick — no net height change: neg. margin cancels padding) */
.rd-stage[data-action] {
  margin: -4px -8px;
  padding: 4px 8px;
  border-radius: var(--r-radius-control);
  transition: background var(--r-dur) var(--r-ease);
}
.rd-stage[data-action]:hover { background: var(--r-surface-2); }
.rd-stage[data-action]:focus-visible { outline: var(--r-focus); outline-offset: -2px; background: var(--r-surface-2); }
.rd-stage__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rd-stage__name { font-size: var(--r-fs-body); color: var(--r-body); }
.rd-stage__vol {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-meta);
  color: var(--r-muted);
  font-variant-numeric: tabular-nums;
}
.rd-stage__vol--clay { color: var(--r-clay-2); font-weight: 600; }
.rd-stage__track {
  height: 8px;
  border-radius: 6px;
  background: var(--r-seg-track);
  overflow: hidden;
}
.rd-stage__fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--r-primary-2), var(--r-primary));
}
.rd-stage__fill--clay { background: linear-gradient(90deg, var(--r-clay), var(--r-clay-2)); }

/* ── hot leads (score badge + name + meta + signal + next-action link) ───── */
.rd-hot-row { gap: 12px; }
.rd-hot-row__score {
  flex: 0 0 38px;
  width: 38px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-radius-badge);
  background: var(--r-mint-surface);
  color: var(--r-mint-ink);
  font-family: var(--r-font-mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rd-hot-row__score--na { background: var(--r-well); color: var(--r-faint); }
.rd-hot-row__body { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.rd-hot-row__name { color: var(--r-ink); font-weight: 600; font-size: var(--r-fs-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-hot-row__meta { font-size: var(--r-fs-meta); color: var(--r-faint); }
.rd-hot-row__signal { font-size: var(--r-fs-meta); color: var(--r-muted); }
.rd-hot-row__link {
  flex: 0 0 auto;
  font-size: var(--r-fs-meta);
  font-weight: 600;
  color: var(--r-primary);
  text-decoration: none;
  white-space: nowrap;
}
.rd-hot-row__link:hover { text-decoration: underline; }
.rd-hot-row__link:focus-visible { outline: var(--r-focus); outline-offset: 2px; border-radius: 3px; }

/* ── team production (avatar + name + production bar + volume + deals) ────── */
.rd-team-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 0;
  border-top: 1px solid var(--r-hairline);
}
.rd-card__body > .rd-team-row:first-child { border-top: 0; }
.rd-team-row__body { flex: 1 1 auto; min-width: 0; }
.rd-team-row__name { font-size: var(--r-fs-meta); font-weight: 600; color: var(--r-ink); }
.rd-team-row__track {
  height: 5px;
  border-radius: 4px;
  background: var(--r-seg-track);
  margin-top: 5px;
  overflow: hidden;
}
.rd-team-row__fill { height: 100%; border-radius: 4px; background: var(--r-primary); }
.rd-team-row__num { flex: none; text-align: right; }
.rd-team-row__vol { font-family: var(--r-font-mono); font-size: 13px; font-weight: 600; color: var(--r-ink); }
.rd-team-row__deals { font-size: 12px; color: var(--r-faint); }

/* ── shared action buttons (brief row + decision rows) ───────────────────── */
.rd-btn {
  display: inline-flex; align-items: center; gap: 6px;
  flex: none;
  padding: 8px 13px;
  font-family: var(--r-font-body);
  font-size: var(--r-fs-meta);
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid var(--r-border);
  background: var(--r-surface);
  color: var(--r-body);
  transition: all var(--r-dur) var(--r-ease);
}
.rd-btn svg { flex: none; }
.rd-btn--approve {
  background: var(--r-primary);
  border-color: var(--r-primary);
  color: var(--r-primary-ink);
}
.rd-btn--approve:hover { background: var(--r-primary-2); border-color: var(--r-primary-2); }
.rd-btn--soft { background: var(--r-canvas-raised); color: var(--r-body); font-weight: 500; }
.rd-btn--soft:hover { border-color: var(--r-primary); color: var(--r-ink); }
.rd-btn:hover { border-color: var(--r-primary); }
.rd-btn:focus-visible { outline: var(--r-focus); outline-offset: 2px; }

/* ── 6 · trust footer ────────────────────────────────────────────────────── */
.rd-home__trust {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  margin-top: 2px;
  background: var(--r-well);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-control);
  font-size: var(--r-fs-meta);
  color: var(--r-muted);
}
.rd-home__trust-ico { display: inline-flex; color: var(--r-primary); flex: none; }
.rd-home__trust-text { flex: 1 1 auto; }
.rd-home__trust-text strong { color: var(--r-body); font-weight: 600; }
.rd-home__trust-link {
  margin-left: auto;
  flex: none;
  font-weight: 600;
  color: var(--r-primary);
  text-decoration: none;
}
.rd-home__trust-link:hover { text-decoration: underline; }
.rd-home__trust-link:focus-visible { outline: var(--r-focus); outline-offset: 2px; border-radius: 3px; }

/* ── skeleton + empty states ─────────────────────────────────────────────── */
.rd-skel { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.rd-skel__row {
  height: 14px;
  border-radius: var(--r-radius-chip);
  background: linear-gradient(90deg, var(--r-well), var(--r-canvas-raised), var(--r-well));
  background-size: 200% 100%;
  animation: rd-shimmer 1.4s var(--r-ease) infinite;
}
.rd-skel__row:nth-child(2) { width: 86%; }
.rd-skel__row:nth-child(3) { width: 72%; }
.rd-skel__row:nth-child(4) { width: 64%; }
@keyframes rd-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.rd-empty {
  margin: 2px -18px 0;
  padding: 13px 18px;
  font-size: var(--r-fs-meta);
  font-weight: 500;
  color: var(--r-faint);
  background: var(--r-well);
}
/* ── entrance stagger (screen reveal) — direct children of .rd-home in DOM
   order: header → kpis → actions → workforce → upper band → main band →
   trust footer. Subtle, one-time; respects prefers-reduced-motion below. */
@keyframes rd-home-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rd-home > * { animation: rd-home-rise .36s var(--r-ease) both; }
.rd-home > *:nth-child(1) { animation-delay: 0ms; }
.rd-home > *:nth-child(2) { animation-delay: 40ms; }
.rd-home > *:nth-child(3) { animation-delay: 80ms; }
.rd-home > *:nth-child(4) { animation-delay: 120ms; }
.rd-home > *:nth-child(5) { animation-delay: 160ms; }
.rd-home > *:nth-child(6) { animation-delay: 200ms; }
.rd-home > *:nth-child(7) { animation-delay: 240ms; }

/* ── row entrance — clarifies that a panel's skeleton just became real data
   (schedule/follow-up/hot/team/decision rows + pipeline stage bars). One-time,
   short, staggered by row position; respects prefers-reduced-motion below. */
@keyframes rd-home-row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rd-sched-row, .rd-fu-row, .rd-hot-row, .rd-team-row, .rd-decide-row, .rd-stage {
  animation: rd-home-row-in .28s var(--r-ease) both;
}
.rd-sched-row:nth-child(2), .rd-fu-row:nth-child(2), .rd-hot-row:nth-child(2),
.rd-team-row:nth-child(2), .rd-decide-row:nth-child(2), .rd-stage:nth-child(2) { animation-delay: 35ms; }
.rd-sched-row:nth-child(3), .rd-fu-row:nth-child(3), .rd-hot-row:nth-child(3),
.rd-team-row:nth-child(3), .rd-decide-row:nth-child(3), .rd-stage:nth-child(3) { animation-delay: 70ms; }
.rd-sched-row:nth-child(4), .rd-fu-row:nth-child(4), .rd-hot-row:nth-child(4),
.rd-team-row:nth-child(4), .rd-decide-row:nth-child(4), .rd-stage:nth-child(4) { animation-delay: 105ms; }

@media (prefers-reduced-motion: reduce) {
  .rd-skel__row { animation: none; }
  .rd-action:hover { transform: none; }
  .rd-home > * { animation: none; }
  .rd-sched-row, .rd-fu-row, .rd-hot-row, .rd-team-row, .rd-decide-row, .rd-stage { animation: none; }
}
html[data-rmotion="reduced"] .rd-sched-row,
html[data-rmotion="reduced"] .rd-fu-row,
html[data-rmotion="reduced"] .rd-hot-row,
html[data-rmotion="reduced"] .rd-team-row,
html[data-rmotion="reduced"] .rd-decide-row,
html[data-rmotion="reduced"] .rd-stage { animation: none !important; }

/* ── mobile (390px reference) ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .rd-home__kpis { grid-template-columns: repeat(2, 1fr); }
  .rd-home__band--upper,
  .rd-home__band--main { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .rd-home { padding: 16px 16px 14px; gap: 14px; }
  .rd-home__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .rd-home__head-acts { width: 100%; }
  .rd-home__head-acts .rd-action { flex: 1 1 auto; justify-content: center; }
  .rd-home__greet { font-size: 25px; }
  .rd-home__kpis { grid-template-columns: 1fr; }
  .rd-home__trust { flex-wrap: wrap; }
  .rd-home__trust-link { margin-left: 0; }
}

/* ── Operator-theme tweak: score badge + team bar read on dark canvas ─────── */
html[data-rtheme="operator"] .rd-home .rd-hot-row__score { color: var(--r-mint-ink); }
html[data-rtheme="operator"] .rd-home .rd-btn--approve { color: var(--r-primary-ink); }
html[data-rtheme="operator"] .rd-home .rd-action--solid { color: var(--r-primary-ink); }

/* ══════════════════════════════════════════════════════════════════════════
   3.5 · YOUR AI WORKFORCE (v3.0) — sits between quick actions and the bands.
   Reuses the .rd-card primitive; tokens-only, themed by --r-*.
   ══════════════════════════════════════════════════════════════════════════ */
.rd-home__workforce { margin: 2px 0; flex: 0 0 auto; }/* direct flex-child of .rd-home (column); .rd-card's min-height:0 would let flexbox crush it to ~24px — pin height to content */
.rd-wf__head { padding-bottom: 12px; }
.rd-wf__title { gap: 9px; }
.rd-wf__title-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: none;
  border-radius: 9px;
  background: var(--r-primary);
  color: var(--r-primary-ink);
}
.rd-wf__title-ic svg { width: 15px; height: 15px; }
.rd-wf__live {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--r-font-body);
  font-size: var(--r-fs-meta);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--r-good);
}
.rd-wf__live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--r-good);
  box-shadow: 0 0 0 3px var(--r-mint-surface);
}
.rd-wf__manage {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: auto; flex: none;
  font-family: var(--r-font-body);
  font-size: var(--r-fs-meta);
  font-weight: 600;
  color: var(--r-primary);
  text-decoration: none;
}
.rd-wf__manage svg { transition: transform var(--r-dur) var(--r-ease); }
.rd-wf__manage:hover { text-decoration: underline; }
.rd-wf__manage:hover svg { transform: translateX(2px); }
.rd-wf__manage:focus-visible { outline: var(--r-focus); outline-offset: 2px; border-radius: 3px; }

.rd-wf__body { display: flex; flex-direction: column; gap: 12px; overflow: visible; }

/* 3-stat row */
.rd-wf__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.rd-wf__stat {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px;
  background: var(--r-surface-2);
  border: 1px solid var(--r-hairline);
  border-radius: var(--r-radius-control);
}
.rd-wf__stat-n {
  font-family: var(--r-font-display);
  font-size: 34px; /* W3 2026-07-02 (Bryan): ref-style hero numerals — the 3 stats ARE the widget now */
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--r-ink);
  font-variant-numeric: tabular-nums;
}
/* middle stat (awaiting you) reads in clay to draw the eye to pending work */
.rd-wf__stat:nth-child(2) .rd-wf__stat-n { color: var(--r-clay); }
.rd-wf__stat-l {
  font-family: var(--r-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--r-muted);
}

/* approvals CTA strip (hidden when N = 0/unknown) */
.rd-wf__approvals {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: var(--r-chip-risk-surface);
  border: 1px solid var(--r-amber);
  border-radius: var(--r-radius-control);
}
.rd-wf__approvals[hidden] { display: none; }
.rd-wf__ap-txt {
  flex: 1 1 auto;
  font-size: var(--r-fs-body);
  font-weight: 500;
  color: var(--r-body);
}
.rd-wf__ap-n {
  font-family: var(--r-font-mono);
  font-weight: 700;
  color: var(--r-chip-risk-ink);
}
.rd-wf__ap-btn { margin-left: auto; }

/* "working now" live-agent list */
.rd-wf__working { display: flex; flex-direction: column; gap: 6px; }
.rd-wf__agent {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 9px 12px;
  text-align: left;
  background: transparent;
  border: 1px solid var(--r-hairline);
  border-radius: var(--r-radius-control);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--r-dur) var(--r-ease),
              border-color var(--r-dur) var(--r-ease);
}
.rd-wf__agent:hover { background: var(--r-mint-surface); border-color: var(--r-primary); }
.rd-wf__agent:focus-visible { outline: var(--r-focus); outline-offset: 2px; }
.rd-wf__agent-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: none;
  border-radius: 8px;
  background: var(--r-mint-surface);
  color: var(--r-mint-ink);
}
.rd-wf__agent-ic i { font-size: 16px; }
.rd-wf__agent-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.rd-wf__agent-name {
  font-size: var(--r-fs-body);
  font-weight: 600;
  color: var(--r-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rd-wf__agent-dept {
  font-size: var(--r-fs-meta);
  color: var(--r-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rd-wf__agent-state {
  display: inline-flex; align-items: center; gap: 5px;
  flex: none;
  font-family: var(--r-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--r-good);
}
.rd-wf__agent-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--r-good);
}

/* NOTE: the show/hide gate (html[data-w-workforce="off"]) lives in
   customize-workspace.css beside the other v1.8 home-widget gates. */

/* single-column stat stack on narrow viewports */
@media (max-width: 720px) {
  .rd-wf__stats { grid-template-columns: 1fr; }
}
