/* Break label-dense diagrams out of the prose column while keeping their
   center aligned with the article text—not with the left edge of the page. */
.readable-figure {
  width: min(1180px, calc(100vw - 2rem));
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-block: 2rem 2.4rem;
}

.readable-figure figure,
.readable-figure p {
  width: 100%;
  margin-inline: auto;
}

.readable-figure img {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}

.readable-figure figcaption {
  max-width: 88ch;
  margin: 0.7rem auto 0;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 767px) {
  .readable-figure {
    width: calc(100vw - 1rem);
    margin-block: 1.4rem 1.8rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  /* Preserve readable labels and the left-to-right architecture instead of
     shrinking label-dense figures to illegibility. */
  .architecture-figure img {
    width: 1000px;
    max-width: none;
  }

  .cycle-figure img {
    width: 900px;
    max-width: none;
  }

  .gate-figure img {
    width: 760px;
    max-width: none;
  }
}
