/* Self-hosted Mermaid: keep the raw diagram source hidden until our JS renders
   it, so readers never see a flash of unrendered text. Once rendered, drop the
   code-block chrome and let the SVG breathe. */
pre.mermaid-src:not(.mermaid-rendered) {
  visibility: hidden;
}
pre.mermaid-src.mermaid-rendered {
  background: none;
  padding: 0;
  border: none;
}
pre.mermaid-src.mermaid-rendered svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
