/**
 * Philosopher’s Hub — Growth & engagement page components.
 * Styles for Research Rankings, Research Alerts and Communities.
 * Layout containers (rc-workspace-page, rc-requests-grid, rc-side-card, …)
 * are reused from the existing theme; this file only adds the components
 * unique to these three pages. All rules are scoped under .rc-site to match
 * the rest of the theme.
 */

/* ── Research Rankings ─────────────────────────────────────────────────── */
.rc-site .rc-rank-toggle { display: flex; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.rc-site .rc-rank-toggle button {
  height: 34px; padding: 0 16px; border-radius: 20px; border: 1px solid #e0e0e0;
  background: #fff; font: inherit; font-size: 13px; color: #444; cursor: pointer;
}
.rc-site .rc-rank-toggle button.is-active { background: #111; color: #fff; border-color: #111; }

.rc-site .rc-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.rc-site .rc-podium .rc-podium-card {
  background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 16px; text-align: center;
}
.rc-site .rc-podium .rc-podium-card.is-first { border-color: #111; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.rc-site .rc-podium .rc-podium-medal { font-size: 22px; }
.rc-site .rc-podium .rc-podium-card b { display: block; margin-top: 6px; font-size: 14px; color: #111; }
.rc-site .rc-podium .rc-podium-card small { color: #888; font-size: 12px; }

.rc-site .rc-rank-row {
  display: flex; align-items: center; gap: 14px; background: #fff;
  border: 1px solid #e0e0e0; border-radius: 12px; padding: 13px 16px; margin-bottom: 10px;
}
.rc-site .rc-rank-no { width: 28px; text-align: center; font-size: 16px; font-weight: 700; color: #111; }
.rc-site .rc-rank-name { flex: 1; min-width: 0; }
.rc-site .rc-rank-name b { font-size: 14px; color: #111; }
.rc-site .rc-rank-name small { display: block; color: #888; font-size: 12px; }
.rc-site .rc-rank-metrics { display: flex; gap: 16px; font-size: 12px; color: #667; }
.rc-site .rc-rank-metrics b { color: #111; }
.rc-site .rc-rank-score { font-size: 16px; font-weight: 700; color: #111; width: 52px; text-align: right; }
.rc-site .rc-rank-trend { width: 24px; text-align: center; }
.rc-site .rc-rank-trend.up { color: #1f8a4c; }
.rc-site .rc-rank-trend.down { color: #c0392b; }
@media (max-width: 760px) { .rc-site .rc-rank-metrics { display: none; } }

/* ── Research Alerts ──────────────────────────────────────────────────── */
.rc-site .rc-alert-row {
  display: flex; align-items: center; gap: 14px; background: #fff;
  border: 1px solid #e0e0e0; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
}
.rc-site .rc-alert-body { flex: 1; min-width: 0; }
.rc-site .rc-alert-body b { font-size: 14px; color: #111; }
.rc-site .rc-alert-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.rc-site .rc-alert-chips span {
  font-size: 11px; padding: 3px 9px; border: 1px solid #e0e0e0; border-radius: 20px;
  color: #555; background: #fafafa;
}
.rc-site .rc-alert-body small { color: #888; font-size: 12px; }

.rc-site .rc-switch { position: relative; width: 40px; height: 22px; border-radius: 20px; background: #111; flex: none; cursor: pointer; }
.rc-site .rc-switch.is-off { background: #cfcfcf; }
.rc-site .rc-switch::after {
  content: ''; position: absolute; top: 2px; left: 20px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: left .2s ease;
}
.rc-site .rc-switch.is-off::after { left: 2px; }

/* ── Communities ──────────────────────────────────────────────────────── */
.rc-site .rc-comm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 760px) { .rc-site .rc-comm-grid { grid-template-columns: 1fr; } }
.rc-site .rc-comm-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 16px; }
.rc-site .rc-comm-head { display: flex; align-items: center; gap: 12px; }
.rc-site .rc-comm-emblem {
  width: 44px; height: 44px; border-radius: 11px; background: #f4f4f4;
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: #111; flex: none;
}
.rc-site .rc-comm-card h2 { margin: 0; font-size: 15px; color: #111; }
.rc-site .rc-comm-head small { color: #888; font-size: 12px; }
.rc-site .rc-comm-card p { font-size: 13px; color: #667; margin: 10px 0 12px; line-height: 1.45; }
.rc-site .rc-comm-foot { display: flex; justify-content: space-between; align-items: center; }
.rc-site .rc-comm-avatars span {
  display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: #ddd;
  border: 2px solid #fff; margin-left: -6px; font-size: 9px; align-items: center;
  justify-content: center; color: #555; vertical-align: middle;
}
.rc-site .rc-join-btn {
  height: 30px; padding: 0 14px; border-radius: 7px; background: #111; color: #fff;
  font-size: 12px; font-weight: 600; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}
.rc-site .rc-join-btn.is-joined { background: #fff; color: #111; border: 1px solid #e0e0e0; }

/* Methodology / helper text inside side cards */
.rc-site .rc-side-note { font-size: 12.5px; color: #667; line-height: 1.5; margin: 0; }
.rc-site .rc-side-note a { color: #2563c0; }
