/*
 * The diagrams of the documentation, drawn by `diagrams.mjs`: centered, at their own size,
 * shrunk to the column when wider, and scrolled sideways rather than shrunk below a readable
 * width (`diagrams.mjs` sets the `width` and the `min-width` of each from its own size).
 */
.md-typeset div.d2 {
  margin: 1.5em 0;
  overflow-x: auto;
  text-align: center;
}

.md-typeset div.d2 > svg {
  height: auto;
  max-width: 100%;
}

/*
 * The background of a diagram, and the masks under the labels of its connections, which D2
 * paints in the color `N7` of its theme: the background of the page instead, in either color
 * scheme.
 */
.md-typeset div.d2 svg .fill-N7 {
  fill: var(--md-default-bg-color);
}
