/* In-page figure viewer for the Holon-S1 technical report. */
figure.report-figure > a[href] { cursor: zoom-in; }

html.figure-lightbox-open { overflow: hidden; }

.figure-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #f8f8fc;
  color: #3a4468;
  cursor: zoom-out;
}

.figure-lightbox::backdrop { background: transparent; }

.figure-lightbox[open] { animation: figure-lightbox-fade .22s ease-out; }
.figure-lightbox[open] img { animation: figure-lightbox-grow .32s cubic-bezier(.16, 1, .3, 1); }

.figure-lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 14px;
  box-sizing: border-box;
  height: 100%;
  margin: 0;
  padding: 64px clamp(12px, 4vw, 56px) clamp(16px, 3vh, 28px);
  text-align: center;
}

.figure-lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 1680px;
  object-fit: contain;
}

.figure-lightbox figcaption {
  max-width: 880px;
  max-height: 26vh;
  margin: 0;
  overflow-y: auto;
  color: #3a4468;
  font-size: 15px;
  font-style: italic;
  line-height: 1.55;
  text-align: center;
  cursor: auto;
}

.figure-lightbox figcaption[hidden] { display: none; }

.figure-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(8, 8, 42, .14);
  border-radius: 50%;
  background: #fff;
  color: #08082a;
  box-shadow: 0 8px 24px -16px rgba(8, 8, 42, .5);
  cursor: pointer;
}

.figure-lightbox-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.figure-lightbox-close:hover { border-color: #2233bb; color: #2233bb; }
.figure-lightbox-close:focus-visible { outline: 2px solid #2233bb; outline-offset: 3px; }

@keyframes figure-lightbox-fade { from { opacity: 0; } }
@keyframes figure-lightbox-grow { from { opacity: .6; transform: scale(.96); } }

@media (max-width: 600px) {
  .figure-lightbox figure { padding-top: 68px; }
  .figure-lightbox figcaption { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .figure-lightbox[open],
  .figure-lightbox[open] img { animation: none; }
}
