/* ═══════════════════════════════════════════════════════════════════
   LEGACY ROOM™ — Research Board UI  (Phase A: Read-Only)
   legacy-room-research-boards-ui.css
   Load AFTER legacy-room-styles.css and legacy-room-tree-patch.css
   All new classes use snap-research-* or rb-* prefixes — no collisions.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Snapshot panel: compact research row ─────────────────────────*/
.snap-research-row {
  margin: 10px 0 6px;
  padding: 10px 12px;
  background: var(--gold-tint, #fdf8ee);
  border: 1px solid rgba(201,162,74,.28);
  border-radius: 10px;
}
.snap-research-row.snap-research-empty {
  background: transparent;
  border-color: rgba(201,162,74,.16);
}
.snap-research-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.snap-research-head svg {
  color: var(--gold, #c9a535);
  flex-shrink: 0;
}
.snap-research-label {
  font-family: var(--serif, Georgia, serif);
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink, #2c1a0e);
}
.snap-research-count {
  font-size: .72rem;
  color: #9a7a2e;
  margin-left: auto;
}
.snap-research-wall {
  font-size: .72rem;
  color: #8b4a1a;
  margin: 0 0 6px;
  line-height: 1.4;
}
.snap-research-open {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 4px;
  font-size: .78rem;
}

/* ── Full profile: research pillar section ────────────────────────*/
.person-research-board {
  /* inherits pillar-section spacing from engine */
}

/* Primary research question */
.rb-primary-q {
  font-family: var(--serif, Georgia, serif);
  font-size: .95rem;
  font-style: italic;
  color: var(--ink, #2c1a0e);
  margin: 0 0 14px;
  padding: 10px 14px;
  background: var(--gold-tint, #fdf8ee);
  border-left: 3px solid var(--gold, #c9a535);
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}
.rb-primary-q svg {
  color: var(--gold, #c9a535);
}

/* Research walls */
.rb-walls {
  margin-bottom: 18px;
}
.rb-walls-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8b4a1a;
  margin-bottom: 8px;
}
.rb-wall {
  padding: 10px 14px;
  background: rgba(139,74,26,.05);
  border: 1px solid rgba(139,74,26,.18);
  border-radius: 8px;
  margin-bottom: 8px;
}
.rb-wall-type {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  color: #8b4a1a;
  margin-bottom: 4px;
}
.rb-wall-desc {
  font-size: .8rem;
  color: #5c3d2e;
  line-height: 1.5;
  margin: 0 0 6px;
}
.rb-wall-path {
  margin: 6px 0 0;
  padding-left: 18px;
  list-style-type: decimal;
}
.rb-wall-path li {
  font-size: .76rem;
  color: #6b4423;
  line-height: 1.5;
  margin-bottom: 3px;
}

/* Question groups */
.rb-questions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rb-group {
  /* one thematic cluster of questions */
}
.rb-group-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9a7a2e;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(201,162,74,.2);
}
.rb-q-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rb-q-item {
  padding: 9px 12px;
  background: #fff;
  border: 1px solid rgba(201,162,74,.2);
  border-radius: 8px;
  border-left-width: 3px;
}
/* Priority border colors */
.rb-q-high   { border-left-color: #c9a535; }
.rb-q-medium { border-left-color: rgba(201,162,74,.4); }
.rb-q-low    { border-left-color: rgba(201,162,74,.15); }

.rb-q-text {
  display: block;
  font-size: .82rem;
  color: var(--ink, #2c1a0e);
  line-height: 1.5;
  margin-bottom: 4px;
}
.rb-q-type,
.rb-q-loc,
.rb-q-urgent {
  display: inline-block;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 6px;
  margin-right: 4px;
}
.rb-q-type    { background: rgba(201,162,74,.12); color: #9a7a2e; }
.rb-q-loc     { background: rgba(60,100,40,.08);  color: #3c6428; }
.rb-q-urgent  { background: rgba(201,162,74,.22); color: #7a5a1a; }
.rb-q-more {
  font-size: .74rem;
  color: #9a7a2e;
  padding: 6px 12px;
  font-style: italic;
}

/* Pre-1870 ancestor note */
.rb-enslaved-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(92,61,46,.06);
  border: 1px solid rgba(92,61,46,.18);
  border-radius: 8px;
}
.rb-enslaved-tag {
  display: inline-block;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5c3d2e;
  background: rgba(92,61,46,.1);
  border-radius: 4px;
  padding: 2px 7px;
  margin-bottom: 6px;
}
.rb-enslaved-note p {
  font-size: .8rem;
  color: #5c3d2e;
  line-height: 1.55;
  margin: 0;
}

/* ── Responsive ───────────────────────────────────────────────────*/
@media (max-width: 640px) {
  .rb-q-item { padding: 8px 10px; }
  .rb-wall   { padding: 9px 11px; }
  .rb-primary-q { padding: 9px 12px; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESEARCH HUB — top-level research workspace
   #screen-research-hub
   ═══════════════════════════════════════════════════════════════════ */

#screen-research-hub {
  padding: 28px 22px 110px; /* bottom padding clears the nav */
  max-width: 920px;
  margin: 0 auto;
}

.rh-head {
  margin-bottom: 22px;
}

.rh-h1 {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--ink-walnut, #2c1a0e);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.rh-sub {
  font-size: .98rem;
  line-height: 1.55;
  color: var(--aged-brass, #9a7a2e);
  max-width: 640px;
  margin: 0;
}

/* ── Filter pills ──────────────────────────────────────────────── */
.rh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(201, 162, 74, 0.18);
}

.rh-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(201, 162, 74, 0.35);
  background: transparent;
  color: var(--ink-walnut, #2c1a0e);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.rh-filter:hover {
  background: var(--gold-tint, #fdf8ee);
  border-color: rgba(201, 162, 74, 0.55);
}

.rh-filter-active {
  background: var(--ink-walnut, #2c1a0e);
  color: var(--parchment, #f1e6cc);
  border-color: var(--ink-walnut, #2c1a0e);
}

.rh-filter-active:hover {
  background: var(--ink-walnut, #2c1a0e);
}

.rh-filter-count {
  font-size: .72rem;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* ── List ──────────────────────────────────────────────────────── */
.rh-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rh-row {
  background: var(--parchment, #f1e6cc);
  border: 1px solid rgba(201, 162, 74, 0.28);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .15s, transform .12s, box-shadow .15s;
}

.rh-row:hover {
  border-color: rgba(201, 162, 74, 0.55);
  box-shadow: 0 2px 12px rgba(107, 68, 35, 0.08);
}

.rh-row:active {
  transform: translateY(1px);
}

.rh-row-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.rh-row-name {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-walnut, #2c1a0e);
  letter-spacing: -0.005em;
}

.rh-yrs {
  font-size: .82rem;
  color: var(--aged-brass, #9a7a2e);
  font-variant-numeric: tabular-nums;
}

.rh-era,
.rh-prio {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.rh-era-enslaved {
  background: rgba(168, 90, 50, 0.14);
  color: var(--terracotta, #a85a32);
}

.rh-prio-high {
  background: rgba(168, 90, 50, 0.16);
  color: var(--terracotta, #a85a32);
}

.rh-prio-medium {
  background: rgba(201, 162, 74, 0.18);
  color: #8b6a14;
}

.rh-prio-low {
  background: rgba(107, 68, 35, 0.10);
  color: var(--baobab-brown, #6b4423);
}

.rh-row-q {
  font-size: .94rem;
  line-height: 1.5;
  color: var(--ink-walnut, #2c1a0e);
  margin: 0 0 10px;
}

.rh-row-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .8rem;
}

.rh-gap {
  color: var(--baobab-brown, #6b4423);
  font-weight: 500;
}

.rh-counts {
  color: var(--aged-brass, #9a7a2e);
}

.rh-counts-new {
  font-style: italic;
}

.rh-row-cta {
  margin-left: auto;
  color: var(--terracotta, #a85a32);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Empty / loading states ────────────────────────────────────── */
.rh-empty,
.rh-loading {
  color: var(--aged-brass, #9a7a2e);
  font-style: italic;
  text-align: center;
  padding: 40px 20px;
  font-size: .95rem;
  line-height: 1.55;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #screen-research-hub {
    padding: 22px 16px 110px;
  }
  .rh-h1 { font-size: 1.7rem; }
  .rh-row { padding: 14px 14px; }
  .rh-row-name { font-size: 1.05rem; }
  .rh-row-cta { width: 100%; margin-left: 0; margin-top: 4px; }
}
