/* The complete caption remains below the figure in the reading page.
   On phones GLightbox otherwise overlays long captions across the SVG. */
.glightbox-mobile .gslide-description {
  display: none !important;
}

/* v04: vector figures share a readable caption and fit the reading column. */
main.content .quarto-figure:has(.fpm-v04-figure) {
  margin: 1.65rem auto;
  max-width: 100%;
}
main.content .quarto-figure:has(.fpm-v04-figure) figure {
  width: 100%;
  margin: 0;
}
main.content img.fpm-v04-figure {
  display: inline-block;
  max-width: 100%;
  height: auto;
  background: #fff;
}
main.content .quarto-figure:has(.fpm-v04-figure) figcaption {
  max-width: 46rem;
  margin: .7rem auto 0;
  text-align: left;
  font-size: .92em;
  line-height: 1.5;
}
main.content figure.fpm-v04-panel {
  margin: 1.65rem auto;
  max-width: 100%;
  text-align: center;
}
main.content figure.fpm-v04-panel figcaption {
  max-width: 46rem;
  margin: .7rem auto 0;
  text-align: left;
  font-size: .92em;
  line-height: 1.5;
}
main.content figure.fpm-v04-panel figcaption p {
  margin: 0;
}
.fpm-figure-dialog {
  width: min(95vw, 72rem);
  max-width: 95vw;
  max-height: 92dvh;
  padding: 1rem;
  border: 1px solid #aab2bc;
  border-radius: .45rem;
  background: #fff;
  color: #17212c;
}
.fpm-figure-dialog::backdrop { background: rgb(0 0 0 / 75%); }
.fpm-figure-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .7rem;
}
.fpm-figure-controls strong { margin-right: auto; }
.fpm-figure-controls a { color: #1259a1; }
.fpm-figure-controls button {
  border: 1px solid #73808e;
  border-radius: .25rem;
  padding: .3rem .65rem;
  background: #f4f6f8;
  color: #17212c;
}
.fpm-figure-dialog > img {
  display: block;
  width: 100%;
  height: 72dvh;
  object-fit: contain;
  background: #fff;
}
@media (max-width: 575px) {
  .fpm-figure-dialog { padding: .65rem; }
  .fpm-figure-controls { gap: .55rem; font-size: .85em; }
  .fpm-figure-dialog > img { height: 70dvh; }
}
