/* Mermaid diagrams — sizing and background
   ─────────────────────────────────────────
   Make the SVG fill the content column and scale with it so no text is
   ever clipped by a fixed viewport width. */
.mermaid {
    background-color: #ffffff;
    width: 100%;
    overflow: visible;
}

.mermaid svg {
    background-color: #ffffff !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
}

/* Full-screen: keep white background when the browser backdrop is black */
:fullscreen .mermaid,
:fullscreen .mermaid svg,
:-webkit-full-screen .mermaid,
:-webkit-full-screen .mermaid svg,
:-moz-full-screen .mermaid,
:-moz-full-screen .mermaid svg {
    background-color: #ffffff !important;
}
