/* Re:Genesis Korea — 모바일 우선 + 5탭 + 차트 */

/* 2026-05-25 KST 폰트 조화 (웹리서치+codex 삼중검증): 본문은 Pretendard(가독성), 제목/라벨만 S-CoreDream(display) */
.rg-section {
  padding: 4rem 1.25rem;
  background: linear-gradient(180deg, #F0F8F4 0%, #FFFFFF 100%);
  font-family: var(--font-sans);
}
.rg-section input,
.rg-section button,
.rg-section select,
.rg-section textarea {
  font-family: var(--font-sans);
}
/* 제목군만 디스플레이체 유지 (제목용 S-CoreDream의 설계 의도). 태그라인·설명문은 본문(Pretendard) */
.rg-section .section-title,
.rg-section .rg-grp-title,
.rg-section h2, .rg-section h3, .rg-section h4 {
  font-family: var(--font-display);
}
/* 제목 위계·행간 (삼중검증 권장값) */
.rg-section .section-title { font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.rg-section .rg-grp-title  { font-weight: 600; line-height: 1.35; }
.rg-section .rg-tagline    { font-family: var(--font-sans); line-height: 1.55; }

.rg-header { text-align: center; margin-bottom: 2rem; }
.rg-tagline { color: var(--ink-soft); margin-top: 0.5rem; font-size: 0.95rem; }

.rg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 auto 1.5rem;
  max-width: min(1400px, calc(100vw - 2rem));
  padding: 0 0.5rem;
}
.rg-tab {
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}
.rg-tab:hover { border-color: #2E7D32; }
.rg-tab-active {
  background: #2E7D32;
  color: #fff;
  border-color: #2E7D32;
}
/* ── Hero 솔루션 근거 — 탭 헤더 + 배너 ── */
.rg-evidence-header {
  max-width: min(1100px, calc(100vw - 2rem));
  margin: 0 auto 18px;
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, #f0f9f4 0%, #fff8f5 100%);
  border: 1px solid #d1f0dc;
  border-left: 4px solid #2E7D32;
  border-radius: 14px;
  text-align: center;
}
.rg-evidence-title {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1f2937;
  letter-spacing: -0.01em;
}
.rg-evidence-sub {
  margin: 0;
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.6;
}
.rg-tab-meta {
  display: inline-block;
  background: rgba(46,125,50,0.12);
  color: #2E7D32;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-right: 6px;
  vertical-align: 2px;
}
.rg-tab-active .rg-tab-meta {
  background: rgba(255,255,255,0.22);
  color: #fff;
}
/* 2026-05-14 11:32 banner 절제 (밴드 형 도배 → 1줄 inline 인용) */
.rg-evidence-banner {
  margin: 0 0 12px 0;
  padding: 0;
  background: transparent;
  border: none;
  border-left: 3px solid #FCD34D;
  padding-left: 10px;
  font-size: 0.82rem;
  color: #6B7280;
  line-height: 1.5;
}
.rg-evidence-banner strong { color: #1F2937; font-weight: 600; }

.rg-pane {
  display: none;
  max-width: min(1400px, calc(100vw - 2rem));
  margin: 0 auto;
}
.rg-pane-active { display: block; }

/* ── Input row ── */
.rg-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
/* 2026-05-14 12:50 KST AI slop 정정 — 보라 그라데이션 → 본 작 노란 brand 통일 (챗규 차용 흔적 제거) */
.rg-input {
  flex: 1 1 18rem;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  background: #FFF;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rg-input:focus {
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}
/* 2026-05-28 hero 디자인 통일 — 진회색 각진 → hero 핑크레드 알약형 버튼 (검색탭과 같은 사이트 느낌) */
.rg-btn {
  min-height: 48px;
  padding: 0 1.6rem;
  border-radius: 999px;
  border: 1px solid #D03A5A;
  background: #D03A5A;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 12px -2px rgba(208,58,90,0.3);
  touch-action: manipulation;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.rg-btn:hover { background: #B91C48; transform: translateY(-1px); box-shadow: 0 6px 16px -2px rgba(208,58,90,0.4); }
.rg-btn:disabled { background: #9CA3AF; border-color: #9CA3AF; cursor: not-allowed; box-shadow: none; }
.rg-btn-sm { min-height: 36px; padding: 0 1rem; font-size: 0.85rem; box-shadow: 0 2px 6px -1px rgba(208,58,90,0.25); }

.rg-hint { color: var(--ink-muted); font-size: 0.85rem; margin: 0.5rem 0 1rem; }

/* ── Personas grid ── */
.rg-personas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 1100px) {
  .rg-personas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .rg-personas-grid { grid-template-columns: 1fr; }
}
.rg-persona-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 1.25rem;
  /* 챗규 절제된 2겹 shadow */
  box-shadow: 0 4px 8px -2px rgba(31,38,46,0.10), 0 2px 4px -2px rgba(31,38,46,0.06);
  transition: box-shadow 0.18s, transform 0.18s;
}
.rg-persona-card:hover {
  box-shadow: 0 8px 16px -4px rgba(31,38,46,0.12), 0 4px 8px -4px rgba(31,38,46,0.08);
}
.rg-persona-grounded {
  border-color: #3b82f6 !important;
  background: linear-gradient(135deg, #fff 0%, #eff6ff 100%) !important;
}
.rg-grounding {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #93c5fd;
  font-size: 0.78rem;
}
.rg-grounding-badge {
  display: inline-block;
  background: #1e40af;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.rg-grounding-queries {
  color: #1e3a8a;
  margin: 4px 0;
}
.rg-grounding-queries code {
  background: #dbeafe;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.7rem;
}
.rg-grounding-cites {
  margin-top: 4px;
}
.rg-grounding-cites summary {
  cursor: pointer;
  color: #1e40af;
  font-weight: 500;
}
.rg-grounding-cites ul {
  margin: 4px 0 0 0;
  padding-left: 18px;
  list-style: '→ ';
}
.rg-grounding-cites a {
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.78rem;
}
.rg-grounding-cites a:hover { text-decoration: underline; }
.rg-grounding-empty {
  color: #92400e;
  font-size: 0.72rem;
  margin-top: 4px;
}
.rg-persona-card .policy {
  margin-top: 0.5rem;
  padding: 6px 10px;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #78350f;
}

.rg-persona-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.rg-persona-card .stance {
  color: var(--ink-muted);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}
.rg-persona-card .view {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.rg-persona-card .evidence {
  background: #F0F8F4;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.rg-persona-card .evidence ul { margin: 0; padding-left: 1.25rem; }

/* ── GA controls ── */
/* LLM 토글 */
.rg-llm-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #F8F7FF;
  border: 1px solid #E0E7FF;
  border-radius: 10px;
}
.rg-llm-toggle-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4338CA;
  white-space: nowrap;
  flex-shrink: 0;
}
.rg-llm-toggle-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rg-llm-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid #C7D2FE;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6366F1;
  transition: all 0.18s;
  white-space: nowrap;
}
.rg-llm-chip:hover { background: #EEF2FF; border-color: #818CF8; }
.rg-llm-chip-active {
  background: #6366F1;
  color: #fff;
  border-color: #6366F1;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.rg-llm-chip[data-llm="anthropic"].rg-llm-chip-active { background: #D97706; border-color: #D97706; }
.rg-llm-chip[data-llm="gemini"].rg-llm-chip-active { background: #0EA5E9; border-color: #0EA5E9; }
.rg-llm-chip[data-llm="none"].rg-llm-chip-active { background: #6B7280; border-color: #6B7280; }
.rg-llm-chip-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}
.rg-llm-chip-sub {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.8;
}
.rg-llm-badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 12px;
  background: #6366F1;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s;
}
@media (max-width: 600px) {
  .rg-llm-toggle-row { gap: 6px; padding: 6px 8px; }
  .rg-llm-chip { padding: 4px 9px; font-size: 0.75rem; }
  .rg-llm-badge { display: none; }
}

/* ── 데이터 소스 토글 ── */
.rg-ds-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #F0FDF4;
  border: 1.5px solid #BBF7D0;
  border-radius: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.rg-ds-toggle-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #065F46;
  white-space: nowrap;
}
.rg-ds-toggle-group {
  display: flex;
  gap: 6px;
}
.rg-ds-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid #6EE7B7;
  border-radius: 20px;
  background: #fff;
  color: #065F46;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.rg-ds-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6EE7B7;
  display: inline-block;
  margin-right: 4px;
  transition: background 0.15s;
}
.rg-ds-chip-active {
  background: #059669;
  color: #fff;
  border-color: #059669;
}
.rg-ds-chip-active .rg-ds-chip-dot {
  background: #fff;
}
.rg-ds-chip > span:first-child {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}
.rg-ds-chip-sub {
  font-size: 0.65rem;
  opacity: 0.8;
  font-weight: 400;
  display: block;
  margin-left: 11px;
}
.rg-crime-select {
  padding: 4px 8px;
  border: 1.5px solid #6EE7B7;
  border-radius: 8px;
  font-size: 0.78rem;
  color: #065F46;
  background: #fff;
  cursor: pointer;
  transition: opacity 0.15s;
}
.rg-crime-select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.rg-ds-badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 12px;
  background: #059669;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s;
}
@media (max-width: 600px) {
  .rg-ds-toggle-row { gap: 6px; padding: 6px 8px; }
  .rg-ds-chip { padding: 4px 9px; font-size: 0.75rem; }
  .rg-ds-badge { display: none; }
}

.rg-ga-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.rg-ga-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.rg-ga-controls input {
  min-height: 48px;
  width: 6rem;
  padding: 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.rg-ga-result {
  background: linear-gradient(90deg, #E8F5E9 0%, #C8E6C9 100%);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.rg-ga-result .delta { color: #2E7D32; font-size: 1.5rem; }

/* ============================================================
   📊 통계 탭 출품 차별 KPI 4 카드 (pillars)
   ============================================================ */
.rg-stats-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 14px 0 18px;
}
.rg-pillar {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF8 100%);
  border-radius: 16px;
  padding: 18px 14px 14px;
  text-align: center;
  border: 1px solid rgba(208, 58, 90, 0.10);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 8px 22px rgba(208, 58, 90, 0.08),
    0 2px 6px rgba(31, 41, 55, 0.05);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease;
}
.rg-pillar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #D03A5A, #F59E0B, #10B981, #6366F1);
}
.rg-pillar:nth-child(1)::before { background: #D03A5A; }
.rg-pillar:nth-child(2)::before { background: #F59E0B; }
.rg-pillar:nth-child(3)::before { background: #10B981; }
.rg-pillar:nth-child(4)::before { background: #6366F1; }
.rg-pillar:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 16px 32px rgba(208, 58, 90, 0.14),
    0 4px 10px rgba(31, 41, 55, 0.06);
}
.rg-pillar-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(31, 41, 55, 0.12));
}
.rg-pillar-num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.rg-pillar:nth-child(1) .rg-pillar-num { color: #D03A5A; }
.rg-pillar:nth-child(2) .rg-pillar-num { color: #F59E0B; }
.rg-pillar:nth-child(3) .rg-pillar-num { color: #10B981; }
.rg-pillar:nth-child(4) .rg-pillar-num { color: #6366F1; }
.rg-pillar-label {
  font-size: 13px;
  font-weight: 600;
  color: #1F2937;
  margin-top: 4px;
  line-height: 1.45;
}
.rg-pillar-label span {
  font-weight: 400;
  font-size: 11px;
  color: #6B7280;
  display: inline-block;
  margin-top: 2px;
}
@media (max-width: 720px) {
  .rg-stats-pillars { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rg-pillar { padding: 14px 10px 12px; border-radius: 12px; }
  .rg-pillar-num { font-size: 22px; }
  .rg-pillar-label { font-size: 12px; }
  .rg-pillar-label span { font-size: 10px; }
}

/* ============================================================
   🚀 SOTA 통합 시뮬 버튼 + 결과 박스
   ============================================================ */
.rg-btn-sota {
  background: linear-gradient(135deg, #6366F1 0%, #A78BFA 100%) !important;
  color: #FFFFFF !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  border: none !important;
  position: relative;
  overflow: hidden;
}
.rg-btn-sota:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #8B5CF6 100%) !important;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}
.rg-btn-sota::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: rg-shine 3s infinite;
}
@keyframes rg-shine {
  0% { left: -100%; }
  60%, 100% { left: 100%; }
}

#rg-ga-sota-result {
  margin-top: 14px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #EEF2FF 0%, #E0E7FF 100%);
  border-radius: 14px;
  border: 2px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.12);
}
#rg-ga-sota-result h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #1E3A8A;
}
.rg-sota-personas {
  margin-top: 12px;
  padding: 12px 14px;
  background: #FFFFFF;
  border-radius: 10px;
  border-left: 3px solid #6366F1;
}
.rg-sota-personas-item {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #374151;
  margin: 4px 0;
}
.rg-sota-personas-item strong { color: #4F46E5; }
.rg-sota-cost-summary {
  margin-top: 10px;
  padding: 10px 14px;
  background: #FEF3C7;
  border-radius: 8px;
  border-left: 3px solid #D97706;
  font-size: 0.84rem;
  color: #78350F;
}
.rg-sota-cost-summary strong { color: #92400E; }

/* ============================================================
   💰 시뮬 호출당 비용 칩 — 사용자 투명성 (KRX cost SOP)
   ============================================================ */
.rg-cost-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: linear-gradient(180deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #065F46;
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap;
}
.rg-cost-chip.rg-cost-paid {
  background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%);
  border-color: rgba(245, 158, 11, 0.3);
  color: #92400E;
}
.rg-cost-chip.rg-cost-zero {
  background: linear-gradient(180deg, #ECFDF5 0%, #D1FAE5 100%);
  border-color: rgba(16, 185, 129, 0.25);
  color: #065F46;
}
.rg-cost-chip-icon { font-size: 0.86rem; line-height: 1; }
.rg-cost-detail {
  display: none;  /* 2026-05-14 11:32 본문 도배 제거 — chip 클릭 시 토글로 노출 (cost-chip aria-expanded 토글) */
  font-size: 0.78rem;
  color: #6B7280;
  margin-top: 6px;
  padding: 8px 12px;
  background: #F9FAFB;
  border-radius: 8px;
  border-left: 3px solid #6B7280;
  line-height: 1.55;
}
.rg-cost-detail.rg-cost-open { display: block; }
.rg-cost-detail strong { color: #1F2937; }
.rg-cost-detail .rg-cost-num {
  display: inline-block;
  padding: 1px 8px;
  background: #FEF3C7;
  color: #92400E;
  font-weight: 700;
  border-radius: 4px;
  margin: 0 2px;
}

/* ============================================================
   🚀 시뮬 단계 progress (4 stage)
   ============================================================ */
.rg-sim-stages {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF8 100%);
  border-radius: 14px;
  border: 1px solid rgba(208, 58, 90, 0.10);
  box-shadow: 0 4px 14px rgba(208, 58, 90, 0.06);
  flex-wrap: wrap;
}
.rg-sim-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  flex: 1 1 0;
  min-width: 160px;
  transition: all 0.4s ease;
  background: rgba(255,255,255,0.6);
}
.rg-sim-stage.active {
  background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
  transform: translateY(-2px);
}
.rg-sim-stage.done {
  background: linear-gradient(180deg, #D1FAE5 0%, #A7F3D0 100%);
}
.rg-sim-stage-num {
  font-size: 16px;
  font-weight: 800;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #D03A5A;
  color: #FFF;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 2px 6px rgba(208, 58, 90, 0.35);
}
.rg-sim-stage.active .rg-sim-stage-num {
  background: #F59E0B;
  animation: rg-pulse 1.2s ease-in-out infinite;
}
.rg-sim-stage.done .rg-sim-stage-num {
  background: #10B981;
}
@keyframes rg-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35); }
  50% { transform: scale(1.08); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55); }
}
.rg-sim-stage-title {
  font-size: 13px;
  font-weight: 700;
  color: #1F2937;
  white-space: nowrap;
}
.rg-sim-stage-desc {
  font-size: 11px;
  color: #6B7280;
  margin-top: 2px;
}
.rg-sim-arrow {
  font-size: 18px;
  color: #D03A5A;
  font-weight: 700;
  flex: 0 0 auto;
}
@media (max-width: 880px) {
  .rg-sim-stages { flex-direction: column; align-items: stretch; }
  .rg-sim-arrow { display: none; }
  .rg-sim-stage { flex: 1; min-width: 0; }
}

/* ============================================================
   🏆 시뮬 결과 KPI 4 카드
   ============================================================ */
.rg-sim-result-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.rg-sim-kpi {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF8 100%);
  border-radius: 16px;
  padding: 18px 16px 14px;
  border: 1px solid rgba(208, 58, 90, 0.10);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 8px 22px rgba(208, 58, 90, 0.08),
    0 2px 6px rgba(31, 41, 55, 0.05);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease;
}
.rg-sim-kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent, #D03A5A);
}
.rg-sim-kpi:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 16px 32px rgba(208, 58, 90, 0.16),
    0 4px 10px rgba(31, 41, 55, 0.06);
}
.rg-sim-kpi-icon { font-size: 22px; line-height: 1; margin-bottom: 6px; filter: drop-shadow(0 2px 4px rgba(31,41,55,0.12)); }
.rg-sim-kpi-label { font-size: 12px; color: #6B7280; font-weight: 600; }
.rg-sim-kpi-val {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--accent, #1F2937);
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.rg-sim-kpi-sub { font-size: 11px; color: #6B7280; }
@media (max-width: 720px) {
  .rg-sim-result-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rg-sim-kpi { padding: 14px 12px; border-radius: 12px; }
  .rg-sim-kpi-val { font-size: 18px; }
}

/* 차별 차트 헤더 */
.rg-stats-h3 {
  margin: 28px 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1F2937;
  border-left: 4px solid #D03A5A;
  padding-left: 12px;
}
.rg-stats-h3-sub {
  font-size: 0.88rem;
  color: #6B7280;
  margin: 0 0 14px;
  padding-left: 16px;
}

/* explain 강조 (차별 핵심 차트 캡션) */
.rg-chart-explain.rg-explain-highlight {
  background: linear-gradient(180deg, #FEF3C7 0%, #FEF9E7 100%);
  border-left: 4px solid #D97706;
}
.rg-chart-explain.rg-explain-highlight .rg-explain-q {
  color: #B45309;
}

/* ============================================================
   💡 전공어 풀이 박스 — NER, FAISS, OCR 등 처음 등장 시
   ============================================================ */
.rg-jargon-box {
  background: linear-gradient(180deg, #EFF6FF 0%, #DBEAFE 100%);
  border-left: 3px solid #2563EB;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 10px 0 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #1E3A8A;
}
.rg-jargon-box strong {
  color: #1E3A8A;
  font-weight: 700;
}
@media (max-width: 768px) {
  .rg-jargon-box { font-size: 0.82rem; padding: 10px 13px; }
}

/* abbr (전공어 hover 풀이) — 점선 밑줄 + 커서 */
abbr[title] {
  text-decoration: underline dotted #6B7280;
  text-underline-offset: 2px;
  cursor: help;
  text-decoration-thickness: 1px;
}

/* ============================================================
   📖 차트 친절 설명 박스 — 비전문가도 30초 안에 읽기
   ============================================================ */
.rg-chart-explain {
  background: linear-gradient(180deg, #FFFBF5 0%, #FFF5EE 100%);
  border-left: 3px solid #D03A5A;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 10px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #4B5563;
}
.rg-chart-explain strong {
  color: #1F2937;
  display: inline-block;
  margin-right: 4px;
}
.rg-chart-explain .rg-explain-q {
  color: #D03A5A;
  font-weight: 700;
  margin-right: 6px;
  font-size: 0.92em;
}
.rg-chart-explain ul {
  margin: 4px 0 0;
  padding-left: 22px;
}
.rg-chart-explain li {
  margin: 2px 0;
}
.rg-chart-explain .rg-explain-color {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
  .rg-chart-explain {
    font-size: 0.8rem;
    padding: 9px 11px;
  }
}

/* ============================================================
   Clay 디자인 시스템 — 차트 wrapper (neumorphism + soft shadow)
   ============================================================ */
.rg-chart-wrap {
  position: relative;
  background:
    linear-gradient(180deg, #FFFFFF 0%, #FFFBF8 100%);
  border: 1px solid rgba(208, 58, 90, 0.10);
  border-radius: 18px;
  padding: 18px 18px 14px;
  margin-bottom: 1.2rem;
  /* 클레이 양각 음영 — 위쪽 highlight + 아래 soft shadow */
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 0 rgba(208, 58, 90, 0.05) inset,
    0 6px 18px rgba(208, 58, 90, 0.08),
    0 2px 6px rgba(31, 41, 55, 0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  min-height: 320px;
}
.rg-chart-wrap:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 0 rgba(208, 58, 90, 0.05) inset,
    0 14px 28px rgba(208, 58, 90, 0.14),
    0 4px 10px rgba(31, 41, 55, 0.06);
  transform: translateY(-2px);
}
.rg-chart-wrap canvas {
  /* canvas는 wrapper 폭에 맞춰 — Chart.js responsive와 협조 */
  max-width: 100%;
  height: auto !important;
}
/* 작은 차트 (지역/연령/죄종) — height 안정화 */
#rg-region-chart,
#rg-age-chart,
#rg-crime-chart,
#rg-ga-genome-chart {
  min-height: 280px;
  max-height: 360px;
}
#rg-ga-chart,
#rg-society-chart,
#rg-recid-matrix-chart,
#rg-ministry-chart,
#rg-sim2real-chart,
#rg-factors-chart,
#rg-decay-chart,
#rg-pareto-chart {
  min-height: 320px;
  max-height: 420px;
}
@media (max-width: 768px) {
  .rg-chart-wrap {
    padding: 14px 12px 10px;
    border-radius: 14px;
    min-height: 260px;
  }
  #rg-region-chart,
  #rg-age-chart,
  #rg-crime-chart,
  #rg-ga-genome-chart {
    min-height: 240px;
    max-height: 300px;
  }
  #rg-ga-chart,
  #rg-society-chart {
    min-height: 280px;
    max-height: 340px;
  }
}

.rg-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

/* 🚫 금지선 패널 — 결정론 시뮬 비판 사전 무력화 + EU AI Act 회피 명시 */
.rg-redline {
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  border: 2px solid #fca5a5;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1rem auto 1.5rem;
  max-width: min(1400px, calc(100vw - 2rem));
}
.rg-redline-title {
  font-size: 1rem;
  color: #b91c1c;
  margin: 0 0 0.5rem 0;
}
.rg-redline-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.88rem;
  color: #7f1d1d;
}
.rg-redline-list li {
  padding-left: 4px;
  word-break: keep-all;
}
.rg-redline-list strong {
  color: #b91c1c;
}
.rg-redline-yes {
  background: #ecfdf5;
  border-left: 3px solid #16a34a;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.88rem;
  color: #14532d;
  margin: 0;
}
.rg-redline-yes strong { color: #15803d; }
@media (max-width: 768px) {
  .rg-redline-list { grid-template-columns: 1fr; }
}

/* GA 메타분석 출처 details */
.rg-cite {
  margin-top: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
}
.rg-cite summary {
  cursor: pointer;
  font-weight: 600;
  color: #475569;
}
.rg-cite ul {
  margin: 8px 0 6px 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.6;
}
.rg-cite li { margin-bottom: 3px; }
.rg-cite em { color: #1e40af; font-style: italic; }
.rg-cite-note {
  margin: 6px 0 0 0;
  font-size: 0.75rem;
  color: #92400e;
  background: #fffbeb;
  padding: 4px 8px;
  border-radius: 4px;
}

/* sim2real 다중 정합성 검증 (n=4) */
.rg-sub-h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.4rem 0;
  color: #1f2937;
}
.rg-sim2real-sub {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 0.75rem 0;
}
.rg-sim2real-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.rg-sim2real-tbl th {
  background: #f0f9ff;
  color: #0c4a6e;
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #0369a1;
  white-space: nowrap;
}
.rg-sim2real-tbl td {
  padding: 8px 10px;
  border-bottom: 1px solid #e0f2fe;
  vertical-align: top;
}
.rg-sim2real-tbl .rg-num {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  text-align: right;
}
.rg-cite-link {
  display: inline-block;
  font-size: 0.72rem;
  color: #0369a1;
  text-decoration: none;
  background: #f0f9ff;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid #bae6fd;
  margin-top: 2px;
}
.rg-cite-basis {
  font-size: 0.7rem;
  color: #6b7280;
  display: block;
  margin-top: 2px;
  word-break: keep-all;
}
.rg-sim2real-sum {
  font-size: 0.85rem;
  color: #1f2937;
  background: #f0fdf4;
  border-left: 3px solid #16a34a;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 12px 0;
}
.rg-sim2real-warn {
  font-size: 0.78rem;
  color: #92400e;
  background: #fffbeb;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 8px 0 0 0;
}

/* AI 시뮬레이터 사회 sub-tab */
.rg-society-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #fafafa;
  border-radius: 12px;
}
.rg-society-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #4b5563;
  font-weight: 500;
}
.rg-society-controls select[multiple] {
  min-width: 220px;
  padding: 4px;
}
.rg-ga-cost {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0.5rem 0 1rem;
  padding: 6px 12px;
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
  border-radius: 4px;
}
.rg-ga-cost span {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  color: var(--clay-coral, #D03A5A);
  font-weight: 600;
}

.rg-society-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0;
  background: white;
}
.rg-society-checks legend {
  padding: 0 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
}
.rg-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
}
.rg-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--clay-coral, #D03A5A);
}
.rg-society-summary {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfccb 100%);
  border-left: 4px solid #16a34a;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0.75rem 0;
  font-size: 0.95rem;
  color: #14532d;
}
.rg-society-summary strong { color: #15803d; }
.rg-society-meta {
  margin-top: 0.75rem;
}
.rg-society-meta code {
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #6b7280;
}
@media (max-width: 768px) {
  .rg-society-controls { flex-direction: column; }
  .rg-society-controls select[multiple] { min-width: 100%; }
}

/* 챗규 톤 placeholder (krxdata.co.kr/chat 패턴) */
.rg-placeholder {
  background: #FAFAFA;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
  box-shadow: 0 4px 8px -2px rgba(31,38,46,0.06), 0 2px 4px -2px rgba(31,38,46,0.04);
}
.rg-placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: #FFF5E1;
  border-radius: 14px;
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
}
.rg-placeholder-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 0.75rem;
}
.rg-placeholder p {
  color: #166534;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0.4rem auto;
  max-width: 36rem;
}
.rg-placeholder-cta {
  margin-top: 1rem !important;
  font-weight: 500;
}
.rg-placeholder-cta strong {
  color: #15803d;
  background: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #86efac;
}

/* 4단계 양형 토론 카드 */
.rg-bench-card {
  background: #fff;
  border-left: 4px solid #2E7D32;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.rg-bench-card h4 { margin: 0 0 8px 0; font-size: 1rem; color: #1f2937; }
.rg-bench-card .bench-content { font-size: 0.9rem; line-height: 1.7; color: #374151; }
.rg-bench-final {
  margin-top: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #78350f;
}

/* 반사실 시뮬 카드 */
.rg-cf-orig {
  background: #f3f4f6;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: #4b5563;
}
.rg-cf-card {
  background: linear-gradient(135deg, #faf5ff, #fff);
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.rg-cf-card h4 { margin: 0 0 8px 0; font-size: 0.95rem; color: #6b21a8; }
.rg-cf-card .cf-content { font-size: 0.88rem; line-height: 1.7; color: #374151; }
.rg-cf-card .cf-delta {
  margin-top: 8px;
  padding: 6px 10px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #78350f;
}

.rg-map-modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0.5rem 0;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.rg-map-modes-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-right: 4px;
}
.rg-map-mode {
  padding: 6px 14px;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.rg-map-mode:hover {
  border-color: var(--clay-coral, #D03A5A);
  color: var(--clay-coral, #D03A5A);
}
.rg-map-mode-active {
  background: var(--clay-coral, #D03A5A);
  color: white;
  border-color: var(--clay-coral-hover, #B82846);
}

.rg-stats-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 0.5rem 0 1rem;
  align-items: stretch;
}

.rg-chart-wide {
  width: 100%;
}

.rg-chart-wide canvas {
  width: 100% !important;
  max-height: 560px;
}

/* 지도 옆 통계 요약 카드 */
.rg-map-summary {
  background: linear-gradient(180deg, #fff5f7 0%, #fef2f4 100%);
  border: 1px solid var(--clay-soft-pink, #fcc8d2);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.rg-map-summary h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  color: var(--clay-coral, #D03A5A);
}
.rg-map-summary ol {
  margin: 0;
  padding-left: 1.5rem;
  font-size: 0.88rem;
  color: #1f2937;
  line-height: 1.7;
  flex: 1;
}
.rg-map-summary ol li {
  margin-bottom: 0.3rem;
}
.rg-map-summary .num {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  color: var(--clay-coral, #D03A5A);
  font-weight: 600;
}
.rg-map-summary .meta {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #fed7d7;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .rg-stats-map-row {
    grid-template-columns: 1fr;
  }
}

/* ── Compare table ── */
.rg-table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
  margin-top: 1rem;
}
.rg-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.rg-table-wrap th, .rg-table-wrap td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.rg-table-wrap th { background: #F5F7FA; font-weight: 600; }
.rg-table-wrap tr:hover { background: #F9FAFB; }
.rg-table-wrap tr:last-child td { background: #FFF8E1; font-weight: 600; }

.rg-watermark {
  margin-top: 2rem;
  padding: 1rem;
  background: #FFF3E0;
  border-left: 4px solid #F57C00;
  border-radius: 8px;
  font-size: 0.92rem;
  color: #5D4037;
}

/* ── Hamburger menu (모바일) ── */
.nav-hamburger {
  display: none;
  background: transparent;
  border: none;
  width: 48px;
  height: 48px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  touch-action: manipulation;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s;
}

/* ── 모바일 반응형 ── */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    right: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    min-width: 12rem;
  }
  .nav-menu.open { display: flex; }
  .nav-menu .nav-link {
    min-height: 48px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
  }

  .rg-personas-grid,
  .rg-stats-grid { grid-template-columns: 1fr; }
  .rg-chart-wide canvas { max-height: 360px; }
  #rg-pane-stats { max-width: 100%; }

  .rg-tabs { flex-direction: column; align-items: stretch; padding: 0; }
  .rg-tab { width: 100%; }

  .rg-input-row { flex-direction: column; }
  .rg-input, .rg-btn { width: 100%; }
}

/* ── Tap target 강제 ── */
button, a, input[type="text"], input[type="number"] {
  touch-action: manipulation;
}

/* ── 로딩 spinner ── */
.rg-loading {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2.5px solid var(--border);
  border-top-color: #2E7D32;
  border-radius: 50%;
  animation: rg-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}
@keyframes rg-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════
   DEBATE ARENA — 2D 법정 + 말풍선 + 폴링 UI
   ═══════════════════════════════════════════════ */

/* 제어 바 */
.arena-layout { display: flex; flex-direction: column; gap: 1rem; }
.arena-control-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.arena-input { flex: 1; min-width: 220px; }
.arena-start-btn { white-space: nowrap; }

/* 라운드 진행 바 */
.arena-round-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.75rem; padding: 0.75rem 1rem;
  background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px;
}
.arena-round-steps { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.arena-round-step {
  display: flex; flex-direction: column; align-items: center;
  min-width: 72px; padding: 6px 10px;
  border-radius: 10px; font-size: 0.78rem; font-weight: 600;
  transition: all 0.3s;
}
.arena-round-step-pending { background: #F1F5F9; color: #94A3B8; }
.arena-round-step-active  { background: #EFF6FF; color: #2563EB; border: 2px solid #2563EB; }
.arena-round-step-done    { background: #ECFDF5; color: #10B981; }
.step-num { font-size: 1.1rem; font-weight: 700; }
.step-label { font-size: 0.72rem; }
.step-arrow { color: #94A3B8; font-size: 1rem; }
.arena-status-text { font-size: 0.88rem; color: #6B7280; font-weight: 500; }

/* 법정 맵 */
.arena-courtroom {
  position: relative;
  width: 100%; height: 440px;
  background: linear-gradient(160deg, #F8F9FA 0%, #E8F4FD 40%, #F0FFF4 100%);
  border: 1.5px solid #E2E8F0; border-radius: 16px;
  overflow: hidden;
}
.arena-bg { position: absolute; inset: 0; pointer-events: none; }
.arena-judge-bench {
  position: absolute; top: 6%; left: 50%; transform: translateX(-50%);
  background: #1F2937; color: #fff;
  padding: 6px 24px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 700; white-space: nowrap;
}
.arena-center-podium {
  position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%);
  background: #fff; border: 2px dashed #D1D5DB;
  padding: 8px 18px; border-radius: 50px;
  font-size: 0.78rem; color: #6B7280; white-space: nowrap;
}
.arena-gallery {
  position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; color: #CBD5E1;
}

/* 아바타 */
.arena-avatars { position: absolute; inset: 0; }
.arena-avatar {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: default; transition: transform 0.4s ease;
  z-index: 10;
}
.arena-avatar-emoji {
  width: 48px; height: 48px;
  border-radius: 50%; border: 2.5px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  transition: box-shadow 0.3s, transform 0.3s;
}
.arena-avatar-speaking .arena-avatar-emoji {
  box-shadow: 0 0 0 4px currentColor, 0 4px 16px rgba(0,0,0,0.15);
  transform: scale(1.08);
}
.arena-avatar-speaking {
  z-index: 20;
}
.arena-avatar-name {
  font-size: 0.7rem; font-weight: 700;
  background: rgba(255,255,255,0.9);
  padding: 2px 6px; border-radius: 99px;
  max-width: 80px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.arena-avatar-role {
  font-size: 0.62rem; color: #94A3B8;
  background: rgba(255,255,255,0.8);
  padding: 1px 5px; border-radius: 99px;
  max-width: 80px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.arena-avatar-pulse {
  position: absolute; top: -4px; left: -4px; right: -4px; bottom: -4px;
  border-radius: 50%; border: 2px solid transparent;
  pointer-events: none;
}
@keyframes arenaPulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  50%  { transform: scale(1.3); opacity: 0.3; }
  100% { transform: scale(1.6); opacity: 0; }
}
.arena-pulse-active {
  animation: arenaPulse 0.9s ease-out;
}

/* 말풍선 */
.arena-bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.arena-bubble {
  position: absolute; transform: translate(10%, -110%);
  background: rgba(255,255,255,0.96); border: 2px solid;
  border-radius: 12px; padding: 8px 10px;
  max-width: 180px; min-width: 120px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: opacity 0.4s, transform 0.4s;
  font-size: 0.78rem; line-height: 1.4;
  z-index: 30;
  /* 화살표 */
}
.arena-bubble::after {
  content: ''; position: absolute; bottom: -8px; left: 16px;
  width: 0; height: 0;
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-top: 8px solid currentColor;
}
.arena-bubble-new {
  opacity: 0; transform: translate(10%, -120%) scale(0.9);
}
.bubble-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px; gap: 4px;
}
.bubble-round-tag {
  font-size: 0.65rem; background: #F1F5F9; color: #64748B;
  padding: 1px 5px; border-radius: 6px; white-space: nowrap;
}
.bubble-text { color: #374151; }
.bubble-challenge { margin-top: 4px; color: #6366F1; font-style: italic; font-size: 0.72rem; }

/* 플레이스홀더 */
.arena-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem; text-align: center;
  background: rgba(248,250,252,0.7);
  z-index: 5;
}
.arena-ph-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.arena-ph-title { font-size: 1.15rem; font-weight: 700; color: #1F2937; margin-bottom: 0.5rem; }
.arena-ph-desc { font-size: 0.88rem; color: #6B7280; max-width: 360px; line-height: 1.5; }
.arena-ph-list {
  text-align: left; margin-top: 0.75rem; list-style: none; padding: 0;
  font-size: 0.82rem; color: #374151; display: flex; flex-direction: column; gap: 4px;
}

/* 발언 로그 */
.arena-log {
  max-height: 380px; overflow-y: auto;
  border: 1px solid #E2E8F0; border-radius: 12px;
  background: #FAFAFA;
}
.arena-log-header {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 10px 14px;
  background: #fff; border-bottom: 1px solid #E2E8F0;
  font-size: 0.85rem; font-weight: 600; color: #374151; z-index: 2;
}
.arena-contradiction-badge {
  font-size: 0.72rem; background: #FEF2F2; color: #DC2626;
  border: 1px solid #FCA5A5; padding: 2px 8px; border-radius: 99px;
}
.arena-log-list { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.arena-log-entry {
  border-left: 4px solid; border-radius: 0 10px 10px 0;
  padding: 8px 12px; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: opacity 0.4s, transform 0.4s;
}
.arena-log-new {
  opacity: 0; transform: translateX(-8px);
}
.log-header {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px;
}
.log-name { font-weight: 700; font-size: 0.85rem; }
.log-round-tag {
  font-size: 0.7rem; background: #F1F5F9; color: #64748B;
  padding: 1px 6px; border-radius: 6px;
}
.log-contra-flag {
  font-size: 0.7rem; background: #FEF2F2; color: #DC2626;
  padding: 1px 6px; border-radius: 6px;
}
.log-text { font-size: 0.83rem; color: #374151; margin: 2px 0; line-height: 1.5; }
.log-evidence {
  margin: 4px 0 2px 12px; padding: 0;
  list-style: disc; font-size: 0.77rem; color: #6B7280;
}
.log-challenge { font-size: 0.78rem; color: #6366F1; margin-top: 3px; }
.log-policy { font-size: 0.78rem; color: #059669; margin-top: 3px; }
.log-consensus { color: #2563EB; font-weight: 600; }
.log-vote { font-size: 0.77rem; color: #6B7280; margin-top: 3px; }

/* 투표 결과 */
.arena-vote-result {
  border: 1.5px solid #E0E7FF; border-radius: 14px;
  padding: 1.25rem; background: linear-gradient(135deg, #EFF6FF 0%, #FAF5FF 100%);
}
.arena-vote-title { font-size: 1rem; font-weight: 700; color: #1F2937; margin: 0 0 1rem; }
.arena-vote-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1rem; }
.vote-bar-row {
  display: flex; align-items: center; gap: 8px;
}
.vote-bar-name {
  min-width: 110px; font-size: 0.83rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vote-bar-track {
  flex: 1; height: 12px; background: #E2E8F0; border-radius: 99px; overflow: hidden;
}
.vote-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.8s ease;
}
.vote-bar-pct { font-size: 0.78rem; color: #6B7280; white-space: nowrap; }
.vote-bar-winner .vote-bar-name { font-weight: 800; }
.vote-crown { font-size: 1rem; }
.consensus-title { font-size: 0.9rem; font-weight: 700; color: #1D4ED8; margin: 0 0 0.5rem; }
.consensus-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; background: rgba(255,255,255,0.7); border-radius: 8px;
  margin-bottom: 6px; font-size: 0.83rem; color: #374151;
}
.consensus-num {
  min-width: 20px; height: 20px;
  background: #2563EB; color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; flex-shrink: 0;
}

/* 모바일 */
@media (max-width: 720px) {
  .arena-courtroom { height: 340px; }
  .arena-avatar-emoji { width: 38px; height: 38px; font-size: 1.1rem; }
  .arena-bubble { max-width: 130px; font-size: 0.72rem; }
  .arena-round-steps { gap: 0.25rem; }
  .arena-round-step { min-width: 56px; padding: 4px 6px; }
  .vote-bar-name { min-width: 80px; }
}

/* ============================================================
   🕸️ SOTA ABM 네트워크 (peer effect + small-world)
   ============================================================ */
.rg-abmnet-controls {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 12px; background: #FAF5FF; border: 1px solid #E9D5FF;
  border-radius: 8px; margin: 12px 0;
}
.rg-abmnet-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin: 14px 0;
}
@media (max-width: 768px) {
  .rg-abmnet-kpis { grid-template-columns: repeat(2, 1fr); }
}
.rg-abmnet-viz-wrap {
  padding: 12px; background: #ffffff; border: 1px solid #E5E7EB;
  border-radius: 10px; margin-top: 14px;
}
.rg-abmnet-legend {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px;
  font-size: 0.82rem;
}
.rg-abmnet-leg { display: flex; align-items: center; gap: 5px; }
.rg-abmnet-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
}
.rg-abmnet-events-table {
  width: 100%; border-collapse: collapse; font-size: 0.83rem;
}
.rg-abmnet-events-table th {
  background: #F3E8FF; color: #6B21A8; padding: 6px 8px;
  border-bottom: 2px solid #C4B5FD; text-align: left;
}
.rg-abmnet-events-table td {
  padding: 5px 8px; border-bottom: 1px solid #F3F4F6;
}
.rg-abmnet-events-table tr:hover td { background: #FAF5FF; }
.rg-abmnet-events-wrap {
  max-height: 360px; overflow-y: auto;
  border: 1px solid #E5E7EB; border-radius: 8px; padding: 10px;
}
.rg-abmnet-citations ul li { margin-bottom: 3px; }

/* ============================================================
   🕸️ ABM Fancy 시각화 (3-up dashboard + 3D + ripple)
   ============================================================ */
.rg-abmnet-dash {
  display: grid; grid-template-columns: 700px 1fr;
  gap: 14px; margin-top: 10px; align-items: start;
}
@media (max-width: 1100px) {
  .rg-abmnet-dash { grid-template-columns: 1fr; }
}
.rg-abmnet-main {
  position: relative; width: 700px; height: 500px;
  border: 1px solid #E5E7EB; border-radius: 10px;
  background: linear-gradient(135deg, #FAFAFA 0%, #F3F4F6 100%);
  overflow: hidden;
}
.rg-abmnet-main canvas { display: block; width: 700px; height: 500px; }
.rg-abmnet-side {
  display: flex; flex-direction: column; gap: 10px;
}
.rg-abmnet-panel {
  background: #ffffff; border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 10px 12px;
}
.rg-abmnet-panel-title {
  font-size: 0.82rem; font-weight: 700; color: #475569;
  margin-bottom: 6px;
}
.rg-abmnet-panel canvas { display: block; width: 100%; max-width: 380px; }
.rg-abmnet-heat-legend {
  display: flex; gap: 4px; font-size: 0.7rem; color: #374151;
  margin-top: 4px; flex-wrap: wrap;
}
.rg-abmnet-heat-legend span {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  color: #fff; font-weight: 600;
}
.rg-abmnet-heat-legend span:first-child { color: #374151; }

.rg-abmnet-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 8px; font-size: 0.78rem; cursor: pointer;
  padding: 2px 8px; background: #F3F4F6; border-radius: 14px;
  border: 1px solid #D1D5DB;
}
.rg-abmnet-toggle input { margin: 0; }

.rg-abmnet-playctrl {
  display: flex; gap: 8px; align-items: center;
  margin-top: 12px; padding: 10px;
  background: linear-gradient(90deg, #F9FAFB 0%, #FFFFFF 100%);
  border: 1px solid #E5E7EB; border-radius: 8px;
}
.rg-abmnet-playctrl select { padding: 3px 8px; }

.rg-abmnet-community-panel {
  margin-top: 14px; padding: 12px;
  background: #FEFCE8; border: 1px solid #FEF3C7; border-radius: 10px;
}
.rg-abmnet-comm-title {
  font-size: 0.95rem; color: #92400E; margin-bottom: 10px;
}
.rg-abmnet-comm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.rg-abmnet-comm-card {
  background: #fff; border-left: 4px solid #ccc;
  padding: 8px 10px; border-radius: 6px; font-size: 0.82rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.rg-abmnet-comm-head { font-weight: 700; margin-bottom: 3px; color: #374151; }
.rg-abmnet-comm-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  vertical-align: middle; margin-right: 4px;
}
.rg-abmnet-comm-stat { color: #DC2626; font-size: 0.95rem; }
.rg-abmnet-comm-risk { font-size: 0.75rem; color: #6B7280; margin-top: 3px; }

/* Small multiples + Hover popup */
.rg-abmnet-multiples {
  margin-top: 14px; padding: 12px;
  background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px;
}
.rg-abmnet-mult-title {
  font-size: 0.88rem; font-weight: 700; color: #1E293B;
  margin-bottom: 10px;
}
.rg-abmnet-mult-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.rg-abmnet-mult-card {
  background: #fff; border-radius: 8px; padding: 8px;
  border-top: 3px solid var(--c, #94A3B8);
  transition: transform 0.15s;
}
.rg-abmnet-mult-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.08); }
.rg-abmnet-mult-card.risk-high { background: #FEF2F2; }
.rg-abmnet-mult-card.risk-med { background: #FFFBEB; }
.rg-abmnet-mult-card.risk-low { background: #F0FDF4; }
.rg-abmnet-mult-head {
  font-size: 0.78rem; font-weight: 600; color: #374151;
  margin-bottom: 4px;
}

.rg-abmnet-hover-popup {
  position: fixed; z-index: 9999;
  background: rgba(17, 24, 39, 0.95); color: #F9FAFB;
  padding: 10px 12px; border-radius: 8px;
  font-size: 0.82rem; max-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: none;
}
.rg-abmnet-hover-head {
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 4px; margin-bottom: 4px;
  font-size: 0.9rem;
}
.rg-abmnet-hover-body div { margin-top: 2px; }

/* 학술 한계 + 로드맵 (정직 섹션) */
.rg-academic-honesty {
  margin-top: 18px; padding: 16px;
  background: linear-gradient(135deg, #F0F9FF 0%, #ECFDF5 100%);
  border: 2px solid #BAE6FD; border-radius: 12px;
}
.rg-academic-honesty summary {
  cursor: pointer; font-size: 1rem; font-weight: 700; color: #0C4A6E;
  padding: 4px 0;
}
.rg-academic-honesty summary:hover { color: #075985; }
.rg-honest-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px; margin-top: 12px;
}
.rg-honest-card {
  background: #fff; padding: 12px 14px; border-radius: 10px;
  border-top: 4px solid;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.rg-honest-card h4 { margin: 0 0 8px; font-size: 0.95rem; }
.rg-honest-card ul { margin: 0; padding-left: 18px; font-size: 0.85rem; line-height: 1.6; }
.rg-honest-card ul li { margin-bottom: 4px; }
.rg-honest-limit { border-top-color: #DC2626; }
.rg-honest-limit h4 { color: #DC2626; }
.rg-honest-strength { border-top-color: #059669; }
.rg-honest-strength h4 { color: #059669; }
.rg-honest-roadmap { border-top-color: #7C3AED; }
.rg-honest-roadmap h4 { color: #7C3AED; }
.rg-honest-note {
  font-size: 0.78rem; color: #475569; margin: 8px 0 0;
  padding: 6px 8px; background: #FEF2F2; border-radius: 6px;
}
.rg-roadmap-table { width: 100%; font-size: 0.78rem; }
.rg-roadmap-table td { padding: 4px 6px; border-bottom: 1px solid #F3F4F6; }
.rg-roadmap-table td:first-child { font-weight: 600; }
.rg-here { background: #10B981; color: #fff; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.rg-honest-footer {
  margin: 12px 0 0; padding: 8px 12px;
  background: #FEF3C7; border-left: 3px solid #D97706;
  border-radius: 6px; font-size: 0.85rem; color: #78350F;
}

/* 📜 대법원 양형기준 SSOT 탭 */
.rg-scourt-controls {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 10px 0; padding: 10px;
  background: #F0F9FF; border-radius: 8px;
}
.rg-scourt-controls select { padding: 5px 8px; min-width: 250px; }
.rg-scourt-source-link a {
  color: #1D4ED8; text-decoration: none; font-size: 0.9rem;
  display: inline-block; padding: 6px 4px; min-height: 24px;
}
.rg-scourt-source-link a:hover { text-decoration: underline; }
.rg-scourt-title { color: #1E3A8A; margin: 16px 0 8px; }
.rg-scourt-section { margin: 16px 0; }
.rg-scourt-section h4 { color: #1E3A8A; margin: 0 0 8px; font-size: 1rem; }
.rg-scourt-table {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
  background: #fff; border-radius: 8px; overflow: hidden;
}
.rg-scourt-table th {
  background: #DBEAFE; color: #1E40AF; padding: 8px;
  border-bottom: 2px solid #93C5FD;
}
.rg-scourt-table td { padding: 6px 8px; border-bottom: 1px solid #F3F4F6; }
.rg-scourt-table td.lighter { background: #ECFDF5; color: #047857; font-weight: 600; }
.rg-scourt-table td.heavier { background: #FEF2F2; color: #B91C1C; font-weight: 600; }

.rg-scourt-factor-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.rg-scourt-factor-group {
  background: #fff; padding: 10px; border-radius: 8px;
  border-top: 4px solid var(--c, #6B7280);
}
.rg-scourt-group-head {
  font-weight: 700; color: #1F2937; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.rg-scourt-count {
  background: var(--c, #6B7280); color: #fff;
  padding: 2px 8px; border-radius: 10px;
  font-size: 0.78rem;
}
.rg-scourt-factor-group ul { list-style: none; padding: 0; margin: 0; }
.rg-scourt-factor-item {
  padding: 6px 0; border-bottom: 1px solid #F3F4F6;
  font-size: 0.85rem; display: flex; flex-direction: column; gap: 4px;
}
.rg-scourt-factor-text { color: #374151; line-height: 1.5; }
.rg-scourt-aps {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  background: #DCFCE7; color: #14532D; font-size: 0.72rem; font-weight: 600;
  margin-left: 4px;
}
.rg-scourt-aps.zero { background: #F3F4F6; color: #6B7280; }
.rg-scourt-samples {
  margin-top: 4px; font-size: 0.78rem; color: #6B7280;
}
.rg-scourt-samples summary { cursor: pointer; color: #2563EB; }
.rg-scourt-samples ul { padding-left: 16px; margin: 4px 0; }
.rg-scourt-samples li { padding: 2px 0; }

.rg-scourt-gap {
  background: #FEFCE8; border-left: 4px solid #D97706;
  padding: 12px; border-radius: 8px;
}
.rg-scourt-gap-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; margin: 10px 0;
}
.rg-scourt-gap-card {
  background: #fff; padding: 10px; border-radius: 6px; text-align: center;
}
.rg-scourt-gap-card .big {
  font-size: 1.8rem; font-weight: 800; color: #7C3AED;
}
.rg-scourt-gap-card div:last-child { font-size: 0.78rem; color: #6B7280; }
.rg-scourt-interp {
  font-size: 0.85rem; color: #78350F; margin: 8px 0 0;
}
.rg-scourt-top {
  padding-left: 24px; font-size: 0.88rem;
}
.rg-scourt-top li { margin: 4px 0; }
.rg-scourt-source-note {
  margin-top: 16px; padding: 6px 10px; background: #F3F4F6;
  border-radius: 6px; font-size: 0.78rem; color: #6B7280;
}

/* F: SOTA timeline + 적합도 KPI 발표 슬라이드 */
.rg-sota-slide {
  margin: 18px 0; padding: 20px;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 2px solid #FBBF24; border-radius: 14px;
  box-shadow: 0 4px 12px rgba(251,191,36,0.15);
}
.rg-sota-slide-head h3 { margin: 0 0 4px; color: #78350F; }
.rg-sota-slide-sub { font-size: 0.8rem; color: #92400E; margin: 0 0 16px; }
.rg-sota-timeline {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  justify-content: center; padding: 10px 0;
}
.rg-sota-stage {
  background: #fff; border: 2px solid #D1D5DB; border-radius: 10px;
  padding: 8px 10px; min-width: 100px; text-align: center;
  transition: all 0.2s;
}
.rg-sota-stage.done {
  background: #ECFDF5; border-color: #10B981;
}
.rg-sota-stage.done .rg-sota-stage-num { color: #047857; }
.rg-sota-stage.current {
  background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
  border-color: #7C3AED; transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(124,58,237,0.25);
}
.rg-sota-stage.current .rg-sota-stage-num { color: #6D28D9; font-size: 1.3rem; }
.rg-sota-stage.pending {
  background: #F9FAFB; border-style: dashed; opacity: 0.65;
}
.rg-sota-stage-num { font-size: 1.1rem; font-weight: 800; }
.rg-sota-stage-label { font-size: 0.82rem; font-weight: 700; color: #1F2937; }
.rg-sota-stage-desc { font-size: 0.7rem; color: #6B7280; margin-top: 2px; }
.rg-sota-arrow { color: #10B981; font-size: 1.2rem; font-weight: 700; }
.rg-sota-arrow-pending { color: #D1D5DB; }

.rg-sota-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin: 14px 0 8px;
}
@media (max-width: 768px) { .rg-sota-metrics { grid-template-columns: repeat(2, 1fr); } }
.rg-sota-metric {
  background: #fff; padding: 10px; border-radius: 8px; text-align: center;
  border-top: 3px solid #7C3AED;
}
.rg-sota-metric .big {
  font-size: 1.2rem; font-weight: 800; color: #7C3AED;
}
.rg-sota-metric .lbl { font-size: 0.72rem; color: #6B7280; margin-top: 2px; }
.rg-sota-slide-footer {
  margin: 12px 0 0; padding: 10px 14px;
  background: #D1FAE5; color: #065F46;
  border-radius: 8px; font-size: 0.88rem;
}

/* B: Posterior viz */
.rg-posterior-viz {
  margin: 18px 0; padding: 16px;
  background: #F5F3FF; border: 1px solid #DDD6FE; border-radius: 12px;
}
.rg-posterior-viz h4 { margin: 0 0 4px; color: #6D28D9; }
.rg-posterior-sub { font-size: 0.78rem; color: #6B7280; margin: 0 0 12px; }
.rg-posterior-bar-row {
  display: grid; grid-template-columns: 80px 1fr 110px;
  gap: 10px; align-items: center; padding: 8px 0;
  border-bottom: 1px solid #EDE9FE;
}
.rg-posterior-bar-row:last-child { border-bottom: none; }
.rg-posterior-name {
  font-weight: 700; font-size: 0.85rem; color: #1F2937;
}
.rg-posterior-svg-wrap {
  position: relative; height: 32px;
  background: linear-gradient(90deg, #FAFAFA 0%, #fff 100%);
  border-radius: 4px;
}
.rg-posterior-stat {
  font-size: 0.78rem; color: #4B5563; font-family: 'JetBrains Mono', monospace;
}
