/* Keep the standard navigation; only the PDF appears in the content area. */
.md-content__inner:has(.document-gallery) > h1 { display: none; }
.document-gallery { width: 70%; margin: 0 auto 1.5rem; }
.document-gallery--thesis { max-width: 602px; }
.document-gallery__pages {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  height: clamp(252px, 49dvh, 630px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #9298a480 transparent;
  scrollbar-gutter: stable;
  padding: 1.2rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .65rem;
  background: #eef0f3;
  box-shadow: inset 0 1px 4px #00000004;
  scroll-behavior: smooth;
}
[data-md-color-scheme="slate"] .document-gallery__pages {
  background: #181b23;
}
.document-gallery__pages:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 3px;
}
.document-gallery__pages::-webkit-scrollbar { width: 7px; }
.document-gallery__pages::-webkit-scrollbar-thumb {
  background: #9298a480;
  border-radius: 8px;
}
.document-gallery__pages::-webkit-scrollbar-track { background: transparent; }
.md-typeset .document-gallery__page {
  position: relative;
  display: block;
  width: 100%;
  flex: 0 0 auto;
  max-width: none;
  margin: 0;
}
.document-gallery__paper {
  position: relative;
  background: #fff;
  overflow: hidden;
}
.document-gallery--thesis .document-gallery__paper {
  box-shadow: 0 2px 18px #0000000c;
  border: 1px solid #0000000a;
}
.document-gallery__paper canvas { display: block; width: 100%; height: 100%; }
.document-gallery__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #737373;
  font-size: .7rem;
}
.document-gallery__status { color: var(--md-default-fg-color--light); font-size: .75rem; }
.document-gallery__text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: pre-wrap;
}
@media (max-width: 600px) {
  .document-gallery__pages { gap: .7rem; padding: .45rem; height: 45.5dvh; min-height: 224px; }
}

.document-gallery [hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .document-gallery__pages { scroll-behavior: auto; }
}
