/* Widen the layout. The theme hard-codes max-width: 88rem on .bd-page-width; the window width is used up to this cap. */
.bd-page-width {
  max-width: 100rem;
}

/* The theme sizes the primary sidebar at 25% of the page; keep it between 15rem and 20rem so the article gets the rest. */
.bd-sidebar-primary {
  flex: 0 0 auto;
  width: clamp(15rem, 16%, 20rem);
}

/* Pages without a Section Navigation keep the sidebar's space (content stays centred) but hide it. */
@media (min-width: 960px) {
  .bd-sidebar-primary.hide-on-wide {
    display: flex;
    visibility: hidden;
  }
}

.bd-main .bd-content .bd-article-container {
  max-width: none;
}

/* Click-to-zoom images. */
.bd-article img.zagalaspec-zoomable {
  cursor: zoom-in;
}

.zagalaspec-zoom {
  align-items: center;
  background: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 2000;
}

.bd-article .mermaid svg {
  cursor: zoom-in;
}

.zagalaspec-zoom .zagalaspec-zoom-diagram {
  background: #fff;
  height: 95vh;
  padding: 1rem;
  width: 95vw;
}

.zagalaspec-zoom img {
  background: #fff;
  max-height: 95vh;
  max-width: 95vw;
  object-fit: contain;
}
