@WhiteNoise leaving aside the Mermaid upstream issues with styling nodes, it seems like it would be helpful for everyone if Obsidian shipped with this css by default and didn’t require adding custom css:
.mermaid svg {
max-width: 100%;
height: auto;
}
Before (large mermaid diagram gets cropped):
After (mermaid diagram scaled to fit doc width):