/* ══════════════════════════════════════════════════════════════════
   Citation drawer — shared across Insights, News and Bulletin posts

   Any element marked with the class `.vg-cite` (or the legacy-
   compatible `.ins-cite` / `.bi-cite`) that wraps a link to
   /evidence/<id>/ becomes a drawer trigger. The drawer slides in
   from the right and pulls record details from /api/evidence
   without leaving the article page.
   ══════════════════════════════════════════════════════════════════ */

.vg-cite-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,26,19,0.45);
  z-index: 9800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.vg-cite-overlay.show { opacity: 1; pointer-events: auto; }

.vg-cite-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 92vw);
  background: var(--cream-paper, #faf7f2);
  box-shadow: -8px 0 36px rgba(0,0,0,0.22);
  z-index: 9801;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  font-family: 'Source Sans 3', 'Lato', system-ui, -apple-system, sans-serif;
}
.vg-cite-drawer.show { transform: translateX(0); }

.vg-cite-drawer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--forest-ink, #1F3A2B);
  color: var(--cream-paper, #faf7f2);
}
.vg-cite-drawer__head strong {
  font-family: var(--font-sans, 'Source Sans 3', sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex: 1;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
}
.vg-cite-drawer__close {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--cream-paper, #faf7f2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vg-cite-drawer__close:hover { background: rgba(255,255,255,0.25); }

.vg-cite-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 20px 28px;
  color: var(--charcoal, #2a3a32);
}

.vg-cite-drawer__tier {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  font-weight: 700;
  margin-bottom: 10px;
}
.vg-cite-drawer__tier--T1 { background: rgba(42,157,143,0.15); color: var(--forest-ink, #1F3A2B); }
.vg-cite-drawer__tier--T2 { background: rgba(184,118,42,0.15); color: var(--ochre, #b8762a); }
.vg-cite-drawer__tier--T3 { background: rgba(230,164,76,0.15); color: #9a6820; }
.vg-cite-drawer__tier--T4 { background: rgba(120,120,120,0.15); color: #555; }

.vg-cite-drawer__title {
  font-family: 'Playfair Display', 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--forest-ink, #1F3A2B);
  margin: 0 0 10px;
}
.vg-cite-drawer__authors {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9rem;
  color: var(--muted-ink, #5a6761);
  margin: 0 0 14px;
}
.vg-cite-drawer__facts {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--charcoal, #2a3a32);
  padding: 10px 14px;
  background: rgba(31,58,43,0.04);
  border-left: 3px solid var(--teal, #2a9d8f);
  border-radius: 2px;
  margin: 0 0 16px;
}
.vg-cite-drawer__facts strong { color: var(--forest-ink, #1F3A2B); font-weight: 700; }
.vg-cite-drawer__summary {
  font-family: 'Playfair Display', 'Fraunces', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--charcoal, #2a3a32);
  margin: 0 0 18px;
}
.vg-cite-drawer__apa {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--muted-ink, #5a6761);
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(31,58,43,0.1);
  border-radius: 2px;
  margin: 0 0 16px;
  word-break: break-word;
}
.vg-cite-drawer__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vg-cite-drawer__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 40px;
}
.vg-cite-drawer__btn--primary {
  background: var(--forest-ink, #1F3A2B);
  color: var(--cream-paper, #faf7f2);
}
.vg-cite-drawer__btn--primary:hover { background: var(--teal, #2a9d8f); }
.vg-cite-drawer__btn--secondary {
  background: transparent;
  color: var(--forest-ink, #1F3A2B);
  border-color: rgba(31,58,43,0.25);
}
.vg-cite-drawer__btn--secondary:hover { background: rgba(31,58,43,0.05); }
.vg-cite-drawer__state {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9rem;
  color: var(--muted-ink, #5a6761);
  padding: 20px 0;
  text-align: center;
}

@media (max-width: 560px) {
  .vg-cite-drawer { width: 100vw; }
  .vg-cite-drawer__body { padding: 18px 16px 24px; }
}
