/* Dagger reference hover/click cards
   Visual DNA: reuses .callout-box pattern (left border accent, soft shadow, white bg) */

.dagger-ref {
  display: inline;
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
  padding: 0 1px;
  border-bottom: 1px dotted currentColor;
  transition: color .15s, background .15s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.dagger-ref:hover,
.dagger-ref.is-active {
  color: var(--primary-dark, #1B5E3B);
  background: var(--primary-light);
  border-radius: 3px;
}

/* Card — callout DNA, scaled down */
.ref-card {
  position: fixed;
  z-index: 10000;
  width: 300px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  padding: 14px 16px 14px 16px;
  font-family: var(--font);
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease, border-left-width .12s ease, box-shadow .12s ease;
}
.ref-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ref-card.is-pinned {
  border-left-width: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.16), 0 0 0 1px rgba(45,139,85,0.15);
}

/* Close button */
.ref-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  border-radius: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color .15s, background .15s;
}
.ref-card__close:hover { color: var(--gray-700); background: var(--gray-100); }
.ref-card.is-pinned .ref-card__close { display: flex; }

/* Header row: ref pill + source + year */
.ref-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-right: 24px;
  flex-wrap: wrap;
}
.ref-card__num {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: .02em;
  line-height: 1.4;
}
.ref-card__src {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}
.ref-card__year {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

/* Claim body */
.ref-card__claim {
  color: var(--gray-700);
  margin: 0 0 10px 0;
  font-size: 14px;
  line-height: 1.5;
}

/* Footer (link or internal badge) */
.ref-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px dotted var(--primary);
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}
.ref-card__link:hover { color: var(--primary); border-bottom-color: currentColor; }
.ref-card__link .arrow { font-size: 11px; opacity: .7; }

.ref-card__internal {
  display: inline-block;
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  background: var(--gray-100);
  border-radius: 4px;
}
