/* Mermaid colours from the site's light and dark tokens. Quarto derives them from the
   Bootstrap theme, which leaves edges and sequence text unreadable on the dark background. */
body.quarto-light {
  --mermaid-bg-color: #fcfcf9;
  --mermaid-fg-color: #23302f;
  --mermaid-fg-color--lighter: #9aa8a1;
  --mermaid-fg-color--lightest: #f4f7f3;
  --mermaid-node-bg-color: #e8f1ec;
  --mermaid-node-fg-color: #167263;
  --mermaid-label-bg-color: #fcfcf9;
  --mermaid-label-fg-color: #23302f;
  --mermaid-edge-color: #62706b;
}
body.quarto-dark {
  --mermaid-bg-color: #14181b;
  --mermaid-fg-color: #d9dfda;
  --mermaid-fg-color--lighter: #4a5650;
  --mermaid-fg-color--lightest: #1b2124;
  --mermaid-node-bg-color: #1d2a28;
  --mermaid-node-fg-color: #5fc3ad;
  --mermaid-label-bg-color: #14181b;
  --mermaid-label-fg-color: #d9dfda;
  --mermaid-edge-color: #98a39c;
}
/* Edge labels and sequence notes carry Mermaid's own light fills; follow the page instead. */
.cell-output-display svg .edgeLabel,
.cell-output-display svg .edgeLabel p,
.cell-output-display svg .labelBkg { background-color: var(--mermaid-label-bg-color) !important; color: var(--mermaid-edge-color) !important; }
.cell-output-display svg .edgeLabel rect { fill: var(--mermaid-label-bg-color) !important; }
.cell-output-display svg rect.note { fill: var(--mermaid-fg-color--lightest) !important; stroke: var(--mermaid-fg-color--lighter) !important; }
.cell-output-display svg .noteText,
.cell-output-display svg .noteText > tspan { fill: var(--mermaid-fg-color) !important; }
.cell-output-display svg .messageText { fill: var(--mermaid-fg-color) !important; }
.cell-output-display svg line.actor-line { stroke: var(--mermaid-fg-color--lighter) !important; }
