.md-typeset__table {
  display: block;
  width: 100%;
}

.md-typeset table:not([class]) {
  display: table;
  width: 100%;
}

/* ---- Home hero ---- */
.hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.hero__text {
  flex: 1 1 52%;
}

.hero__image {
  flex: 1 1 48%;
  text-align: center;
}

.hero__image img {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

@media (max-width: 60em) {
  .hero {
    flex-direction: column-reverse;
  }
}

/* header logo is black on transparent; invert it on the dark scheme */
[data-md-color-scheme="slate"] .md-header__button.md-logo img {
  filter: invert(1);
}

/* keep manual figures and screenshots from filling the whole column */
.md-typeset figure img,
.md-typeset p > img {
  max-width: min(100%, 380px);
  height: auto !important;
}

/* centered figures with smaller captions */
.md-typeset figure {
  margin: 1.2em auto;
  text-align: center;
}

.md-typeset figure img {
  display: block;
  margin: 0 auto;
}

.md-typeset figcaption {
  max-width: none;
  margin-top: 0.5em;
  font-size: 0.7rem;
  text-align: center;
}

.md-typeset figcaption p {
  margin: 0;
}

/* click-to-enlarge figures */
.md-typeset figure img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.8);
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}

/* table captions match figure captions */
.md-typeset p.caption,
.md-typeset table caption {
  margin: 1.2em 0 0.4em;
  font-size: 0.7rem;
  font-style: italic;
  text-align: left;
  caption-side: top;
}

.md-typeset table caption p {
  margin: 0;
}
