figure.mermaid {
  margin: 1.5em 0;
  text-align: center;
}

figure.mermaid img {
  max-width: 100%;
  height: auto;
}

/* The website gets each diagram in both palettes; the night reader theme shows the dark one. */
.mermaid-themed .mermaid-dark,
.book.color-theme-2 .mermaid-themed .mermaid-light {
  display: none;
}

.book.color-theme-2 .mermaid-themed .mermaid-dark {
  display: block;
}
