/* figure caption anchors + Fig. N references */

/* in-text figure reference */
a.fig-ref {
  text-decoration: none;
  color: #4183c4;
  white-space: nowrap;
}

a.fig-ref:hover {
  text-decoration: underline;
}

/* figure caption anchor: offset scroll so the caption is not hidden under
   a sticky header, and highlight briefly after the jump */
span.fig-caption-anchor {
  scroll-margin-top: 48px;
}

span.fig-caption-anchor:target {
  display: inline-block;
  width: 0;
}

blockquote:has(span.fig-caption-anchor:target) {
  animation: fig-flash 1.6s ease-out;
}

@keyframes fig-flash {
  0% {
    background-color: #fff3b0;
  }
  100% {
    background-color: transparent;
  }
}
