/* ============================================================================
   ATLAS REDESIGN — Recruiting Pipeline screen styles  ·  Phase 2
   Branch: atlas-redesign-2026-06-29

   Prefix: .rd-recruiting. Tokens only (--r-*) so Calm (almanac) + Operator
   themes both work automatically. No hardcoded hex. The GROWTH · RECRUITING
   slice is a 4-up KPI strip + a 4-stage candidate board (Prospects → Contacted
   → Interview → Offer). No recruiting fetcher exists yet, so every stage shows
   an honest dashed empty state + em-dash counts; candidate cards render only
   when a real feed exists. Theme-specific selectors are used only where a
   token can't express the tweak (rare).
   ========================================================================== */

.rd-recruiting {
  font-family: var(--r-font-body);
  color: var(--r-body);
  padding: var(--r-gutter);
  max-width: var(--r-page-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- page header --------------------------------------------------------- */
.rd-rec-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rd-rec-eyebrow {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--r-clay);
}
.rd-rec-h1 {
  font-family: var(--r-font-display);
  font-size: var(--r-fs-h1);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--r-ink);
  margin: 0;
}
.rd-rec-sub {
  margin: 4px 0 0;
  font-size: var(--r-fs-body);
  line-height: 1.5;
  color: var(--r-muted);
  max-width: 640px;
}

/* ---- KPI strip (4-up) ---------------------------------------------------- */
.rd-rec-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.rd-rec-kpi {
  background: var(--r-surface);
  border: 1px solid var(--r-hairline-2);
  border-radius: var(--r-radius-card);
  box-shadow: var(--r-shadow-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rd-rec-kpi-label {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--r-faint);
}
.rd-rec-kpi-value {
  font-family: var(--r-font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  color: var(--r-ink);
}
.rd-rec-kpi-note {
  font-size: var(--r-fs-meta);
  color: var(--r-faint);
}
/* tonal accents only ever applied when a real value exists (keeps em-dash neutral) */
.rd-rec-kpi[data-tone="warn"] .rd-rec-kpi-note { color: var(--r-amber); font-weight: 600; }
.rd-rec-kpi[data-tone="good"] .rd-rec-kpi-note { color: var(--r-good); font-weight: 600; }

/* ---- board panel --------------------------------------------------------- */
.rd-rec-board-side {
  background: var(--r-canvas-raised);
  border: 1px solid var(--r-border);
  border-radius: 16px;
  box-shadow: var(--r-shadow-card);
  padding: 18px 20px;
}
.rd-rec-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

/* ---- one stage column ---------------------------------------------------- */
.rd-rec-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.rd-rec-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}
.rd-rec-col-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--r-body);
}
.rd-rec-col-count {
  font-family: var(--r-font-mono);
  font-size: 12px;
  color: var(--r-faint);
}
.rd-rec-col-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  /* only this region scrolls when a real feed is long; outer frame never does */
  overflow: auto;
  max-height: calc(100vh - 360px);
}

/* ---- candidate card (real data only) ------------------------------------- */
.rd-rec-tile {
  background: var(--r-surface);
  border: 1px solid var(--r-hairline-2);
  border-radius: 11px;
  padding: 11px 12px;
  cursor: pointer;
  transition: transform var(--r-dur) var(--r-ease),
              box-shadow var(--r-dur) var(--r-ease),
              border-color var(--r-dur) var(--r-ease);
}
.rd-rec-tile:hover { transform: translateY(-2px); box-shadow: var(--r-shadow-hover); }
.rd-rec-tile:focus-visible { outline: var(--r-focus); outline-offset: 2px; }
.rd-rec-tile[data-flag="offer"] { border-color: color-mix(in srgb, var(--r-primary) 28%, var(--r-border)); }

.rd-rec-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.rd-rec-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--r-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rd-rec-star { font-size: 12px; color: var(--r-amber); flex: 0 0 auto; }
.rd-rec-sent {
  font-family: var(--r-font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  flex: 0 0 auto;
  background: var(--r-mint-surface);
  color: var(--r-mint-ink);
  border-radius: 5px;
  padding: 1px 5px;
}
.rd-rec-stats {
  font-size: 12px;
  color: var(--r-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rd-rec-source {
  font-size: 12px;
  color: var(--r-faint);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- per-stage empty state (honest, dashed) ------------------------------ */
.rd-rec-col-empty {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-meta);
  letter-spacing: .04em;
  color: var(--r-faint);
  text-align: center;
  padding: 16px 8px;
  border: 1px dashed var(--r-border);
  border-radius: var(--r-radius-control);
}

/* ---- pre-connect stage sell card (S1 sweep 2026-07-03) -------------------
   What fills this column, told forward — an icon chip + one feature line.
   Quieter than a real candidate card (surface = well, no shadow) so live data
   will always out-rank it visually. */
.rd-rec-stage-sell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--r-well);
  border: 1px solid var(--r-hairline-2);
  border-radius: 11px;
  padding: 14px 13px;
  min-height: 118px;
}
.rd-rec-stage-ic {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--r-surface);
  border: 1px solid var(--r-hairline-2);
  color: var(--r-clay);
  font-size: 15px;
}
.rd-rec-stage-copy {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--r-muted);
}

/* ---- board-level not-connected banner ------------------------------------ */
.rd-rec-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  background: var(--r-well);
  border: 1px dashed var(--r-border);
  border-radius: var(--r-radius-control);
  padding: 11px 14px;
  font-size: 12.5px;
  color: var(--r-muted);
}
.rd-rec-notice i { color: var(--r-faint); font-size: 15px; flex: 0 0 auto; }

/* ---- entrance motion (one-shot; off under reduced motion) ---------------- */
@keyframes rd-rec-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rd-rec-head, .rd-rec-kpis-slot, .rd-rec-board-slot {
  animation: rd-rec-rise .32s var(--r-ease) both;
}
.rd-rec-kpis-slot { animation-delay: .04s; }
.rd-rec-board-slot { animation-delay: .08s; }
.rd-rec-tile, .rd-rec-stage-sell {
  animation: rd-rec-rise .26s var(--r-ease) both;
}
.rd-rec-col:nth-child(2) .rd-rec-tile,
.rd-rec-col:nth-child(2) .rd-rec-stage-sell { animation-delay: .03s; }
.rd-rec-col:nth-child(3) .rd-rec-tile,
.rd-rec-col:nth-child(3) .rd-rec-stage-sell { animation-delay: .06s; }
.rd-rec-col:nth-child(4) .rd-rec-tile,
.rd-rec-col:nth-child(4) .rd-rec-stage-sell { animation-delay: .09s; }
@media (prefers-reduced-motion: reduce) {
  .rd-rec-head, .rd-rec-kpis-slot, .rd-rec-board-slot,
  .rd-rec-tile, .rd-rec-stage-sell { animation: none; }
  .rd-rec-tile:hover { transform: none; }
}
html[data-rmotion="reduced"] .rd-rec-head,
html[data-rmotion="reduced"] .rd-rec-kpis-slot,
html[data-rmotion="reduced"] .rd-rec-board-slot,
html[data-rmotion="reduced"] .rd-rec-tile,
html[data-rmotion="reduced"] .rd-rec-stage-sell { animation: none; }

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .rd-rec-board { grid-template-columns: 1fr; }
  .rd-rec-col-body { max-height: none; }
}
@media (max-width: 720px) {
  .rd-rec-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .rd-rec-board-side { padding: 16px 14px; }
  .rd-rec-stage-sell { min-height: 0; padding: 12px 11px; }
}
