a.citation-ref {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

a.citation-ref:hover {
  color: var(--links);
}

.citation-popup {
  position: fixed;
  z-index: 10000;
  max-width: min(32rem, calc(100vw - 1rem));
  padding: 0.6rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.45;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--sidebar-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.citation-popup strong {
  font-weight: 600;
}

.citation-popup em {
  font-style: italic;
}

.citation-popup a {
  color: var(--links);
  word-break: break-word;
}
