/* Keep raster images responsive. */
.rst-content img {
    max-width: 100%;
    height: auto;
}

/* Wider content area so large diagrams have room to breathe. */
.wy-nav-content {
    max-width: 1200px;
}

/* ------------------------------------------------------------------ */
/* Mermaid diagrams: render full size, scrollable, and zoomable.       */
/* ------------------------------------------------------------------ */

/* The scroll container around each diagram. */
.rst-content div.mermaid,
.rst-content .mermaid {
    overflow: auto;                 /* horizontal + vertical scroll if large */
    max-height: 85vh;               /* tall diagrams scroll instead of overflowing */
    margin: 1.5em 0;
    padding: 12px;
    border: 1px solid #e1e4e5;
    border-radius: 6px;
    background: #fff;
    text-align: center;
    resize: vertical;               /* user can drag the box taller */
}

/* Let the SVG keep its intrinsic (full) size instead of being squeezed. */
.rst-content div.mermaid svg,
.rst-content .mermaid svg {
    max-width: none !important;
    height: auto;
}

/* Caption styling for the figure label under each diagram. */
.rst-content div.mermaid + .caption,
.rst-content .mermaid-caption,
figcaption {
    font-style: italic;
    color: #555;
    text-align: center;
    margin-top: 0.3em;
}

/* Status / classification badges used in the docs. */
.green  { color: #178f47; font-weight: bold; }
.yellow { color: #b8860b; font-weight: bold; }
.red    { color: #c0392b; font-weight: bold; }
