/* ==========================================================
   Resume Metrics Hub — family tree
   Copied from resume-guides-hub.css (family tree only),
   renamed rgh- -> rmh-. Loaded only by /resume-metrics.
   ========================================================== */

/* ---------- Family tree (.rmh-fams) ---------- */

.rmh-fams {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
  margin-top: 16px;
}

.rmh-fam {
  display: flex;
  flex-direction: column;
  border: 0;
  background: transparent;
  padding: 0;
}

.rmh-fam[data-color="blue"]    { --rf: #2563EB; --rf-card: rgba(37,99,235,0.05);  --rf-link: rgba(37,99,235,0.10);  --rf-link-hover: rgba(37,99,235,0.18); }
.rmh-fam[data-color="green"]   { --rf: #16A34A; --rf-card: rgba(22,163,74,0.05);  --rf-link: rgba(22,163,74,0.10);  --rf-link-hover: rgba(22,163,74,0.18); }
.rmh-fam[data-color="yellow"]  { --rf: #CA8A04; --rf-card: rgba(202,138,4,0.05);  --rf-link: rgba(202,138,4,0.10);  --rf-link-hover: rgba(202,138,4,0.18); }
.rmh-fam[data-color="purple"]  { --rf: #8B5CF6; --rf-card: rgba(139,92,246,0.05); --rf-link: rgba(139,92,246,0.10); --rf-link-hover: rgba(139,92,246,0.18); }
.rmh-fam[data-color="orange"]  { --rf: #EA580C; --rf-card: rgba(234,88,12,0.05);  --rf-link: rgba(234,88,12,0.10);  --rf-link-hover: rgba(234,88,12,0.18); }
.rmh-fam[data-color="red"]     { --rf: #DC2626; --rf-card: rgba(220,38,38,0.05);  --rf-link: rgba(220,38,38,0.10);  --rf-link-hover: rgba(220,38,38,0.18); }
.rmh-fam[data-color="teal"]    { --rf: #0D9488; --rf-card: rgba(13,148,136,0.05); --rf-link: rgba(13,148,136,0.10); --rf-link-hover: rgba(13,148,136,0.18); }
.rmh-fam[data-color="slate"]   { --rf: #475569; --rf-card: rgba(71,85,105,0.05);  --rf-link: rgba(71,85,105,0.10);  --rf-link-hover: rgba(71,85,105,0.18); }
.rmh-fam[data-color="stone"]   { --rf: #78716C; --rf-card: rgba(120,113,108,0.05);--rf-link: rgba(120,113,108,0.10);--rf-link-hover: rgba(120,113,108,0.18); }
.rmh-fam[data-color="emerald"] { --rf: #059669; --rf-card: rgba(5,150,105,0.05);  --rf-link: rgba(5,150,105,0.10);  --rf-link-hover: rgba(5,150,105,0.18); }
.rmh-fam[data-color="indigo"]  { --rf: #4F46E5; --rf-card: rgba(79,70,229,0.05);  --rf-link: rgba(79,70,229,0.10);  --rf-link-hover: rgba(79,70,229,0.18); }
.rmh-fam[data-color="amber"]   { --rf: #D97706; --rf-card: rgba(217,119,6,0.05);  --rf-link: rgba(217,119,6,0.10);  --rf-link-hover: rgba(217,119,6,0.18); }
.rmh-fam[data-color="rose"]    { --rf: #E11D48; --rf-card: rgba(225,29,72,0.05);  --rf-link: rgba(225,29,72,0.10);  --rf-link-hover: rgba(225,29,72,0.18); }
.rmh-fam[data-color="pink"]    { --rf: #DB2777; --rf-card: rgba(219,39,119,0.05); --rf-link: rgba(219,39,119,0.10); --rf-link-hover: rgba(219,39,119,0.18); }

.rmh-fam__head {
  list-style: none;
  cursor: default;
  padding: 0;
  display: block;
  user-select: none;
}
.rmh-fam__head::-webkit-details-marker { display: none; }

.rmh-fam__name {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--rf, #1a73e8);
}

.rmh-fam__name::after {
  content: '';
  display: block;
  width: 28px;
  height: 2.5px;
  background: var(--rf, #1a73e8);
  border-radius: 2px;
  margin-top: 6px;
}

.rmh-fam__count {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.01em;
}

.rmh-fam__chev {
  width: 12px;
  height: 12px;
  color: var(--rf, #6b7280);
  display: none;
  transition: transform 0.18s ease;
}

.rmh-fam[open] .rmh-fam__chev { transform: rotate(180deg); }

.rmh-fam__body {
  padding: 0;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rmh-fam-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: var(--rf-link, rgba(37,99,235,0.10));
  color: #1c2330;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}

.rmh-fam-card:hover {
  background: var(--rf-link-hover, rgba(37,99,235,0.18));
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.rmh-fam-card__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--rf, #1a73e8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rmh-fam-card__icon svg { width: 15px; height: 15px; }

.rmh-fam-card__title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Coming-soon: lighter tint, muted text, italic "Soon" badge on the right */
.rmh-fam-card.is-soon {
  background: var(--rf-card, rgba(37,99,235,0.05));
  color: #6b7280;
  pointer-events: none;
}

.rmh-fam-card.is-soon .rmh-fam-card__icon {
  color: var(--rf, #9ca3af);
  opacity: 0.55;
}

.rmh-fam-card.is-soon::after {
  content: 'Soon';
  font-size: 10px;
  font-weight: 500;
  font-style: italic;
  color: #9ca3af;
  margin-left: auto;
  padding-left: 6px;
  letter-spacing: 0.02em;
}

/* Current-page (full-tone, used on individual guide pages, not this hub) */
.rmh-fam-card.is-current {
  background: var(--rf, #1a73e8);
  color: #fff;
  cursor: default;
  pointer-events: none;
}

.rmh-fam-card.is-current .rmh-fam-card__icon { color: #fff; }

.rmh-fam-card.is-current::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  margin-left: auto;
  flex-shrink: 0;
}

/* Tablet: 3 columns */
@media (max-width: 1023px) {
  .rmh-fams { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

/* Mobile: 1 column, summary becomes clickable */
@media (max-width: 720px) {
  .rmh-fams { grid-template-columns: 1fr; gap: 18px; }
  .rmh-fam__head {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .rmh-fam__name { flex: 1; }
  .rmh-fam__name::after { display: none; }
  .rmh-fam__count { margin-top: 0; }
  .rmh-fam__chev { display: inline-block; flex-shrink: 0; }
  .rmh-fam__body { margin-top: 10px; }
}

/* Desktop force-open: <details> body always shown regardless of state */
@media (min-width: 721px) {
  .rmh-fam .rmh-fam__body { display: flex !important; }
}
