diff --git a/documentation/Pipfile b/documentation/Pipfile
index f415cbf3f..5fcd8b9c3 100644
--- a/documentation/Pipfile
+++ b/documentation/Pipfile
@@ -12,6 +12,7 @@ sphinx = "*"
 sphinx-rtd-theme = "*"
 pyyaml = "*"
 sphinx-copybutton = "*"
+sphinxcontrib-mermaid = "*"
 # SVG to PNG only supported since 2.0.0
 sphinxcontrib-svg2pdfconverter = ">=2.0.0"
 
diff --git a/documentation/conf.py b/documentation/conf.py
index 48d28a686..c1b418499 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -50,10 +50,16 @@ extensions = [
     'sphinx.ext.extlinks',
     'sphinx.ext.intersphinx',
     'sphinx_copybutton',
+    'sphinxcontrib.mermaid',
     'sphinxcontrib.rsvgconverter',
     'yocto-vars'
 ]
 
+# Let Mermaid diagrams keep their natural aspect ratio (based on each
+# diagram's own width/height) instead of being squeezed into the default
+# fixed 500px height, which visibly distorted/shrank taller flowcharts.
+mermaid_height = "auto"
+
 # current_version = "dev"
 # bitbake_version = "" # Leave empty for development branch
 # Obtain versions from poky.yaml instead
diff --git a/documentation/sphinx-static/theme_overrides.css b/documentation/sphinx-static/theme_overrides.css
index f9e067239..0b2be9e01 100644
--- a/documentation/sphinx-static/theme_overrides.css
+++ b/documentation/sphinx-static/theme_overrides.css
@@ -171,3 +171,20 @@ section#welcome-to-the-yocto-project-documentation p.caption {
     }
 
 }
+
+/*
+ * Mermaid diagrams are rendered inside a <pre class="mermaid"> element, so
+ * they otherwise inherit this theme's monospace "pre" font, and some of
+ * Mermaid's edge labels end up keeping their default 16px font size instead
+ * of the larger size configured in the diagrams themselves. Force a
+ * consistent, larger, non-monospace font so label text isn't clipped by a
+ * too-small measured bounding box.
+ */
+.mermaid,
+.mermaid .edgeLabel,
+.mermaid .edgeLabel p,
+.mermaid .nodeLabel,
+.mermaid .nodeLabel p {
+  font-family: Helvetica, Arial, sans-serif !important;
+  font-size: 20px !important;
+}
