/* Mermaid diagrams: force SVG to fill container width */
pre.mermaid,
div.mermaid {
    display: block;
    width: 100%;
    margin: 2em 0;
    padding: 0;
    background: transparent;
    border: none;
    text-align: center;
    white-space: normal;
    overflow-x: auto;
}

pre.mermaid svg,
div.mermaid svg {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* Bigger text inside Mermaid diagrams */
pre.mermaid .nodeLabel,
pre.mermaid .edgeLabel,
div.mermaid .nodeLabel,
div.mermaid .edgeLabel {
    font-size: 1em !important;
}

/* Subgraph (cluster) titles */
pre.mermaid .cluster-label,
pre.mermaid .cluster text,
div.mermaid .cluster-label,
div.mermaid .cluster text {
    font-size: 1.1em !important;
    font-weight: 600 !important;
}

/* Center matplotlib outputs from code cells */
.cell_output img,
div.output_png img,
div.output_subarea img,
div.cell_output {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
