/* Diagrams come in as ![](file.svg){.diagram}. Quarto renders this as
   <img class="diagram">; some renders end up post-processed into inline
   <svg class="diagram">. Style both so the result is consistent either way:
   block-level, centered with breathing room. For <img>, dark mode uses a
   filter invert (the SVG's color can't escape the <img> boundary). For
   inline <svg>, currentColor on the SVG root handles dark mode naturally. */
img.diagram,
svg.diagram {
  display: block;
  margin: 1.25rem auto;
  max-width: 100%;
  height: auto;
}

svg.diagram { color: inherit; }

body.quarto-dark img.diagram { filter: invert(1) hue-rotate(180deg); }
