body {
    font-family: "IBM Plex Sans";
}

/* Style for rubric headings (Methods, Attributes sections) */
.rubric {
    font-size: 1.1em !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #ddd !important;
    padding-bottom: 0.2em !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.8em !important;
}

/* Make method signature more compact */
.sig {
    font-size: 0.9em !important;
    line-height: 1.3 !important;
}

/* Reduce spacing in method documentation */
.py.method > dt {
    margin-bottom: 0.5em !important;
}

.py.method > dd {
    margin-bottom: 1em !important;
}

/* Mermaid diagrams — constrain the rendered <svg> to its container so the
 * diagram doesn't overflow and collide with the next heading. Without
 * this, sphinxcontrib-mermaid can paint at its intrinsic content size if
 * the layout pass hasn't settled when mermaid first runs (race against
 * font loading). The race fires intermittently — sometimes the diagram is
 * fine, sometimes it spills across the page. Constraining to container
 * width makes the output deterministic. */
.mermaid {
    display: block;
    margin: 1.5em 0;
    text-align: center;
    overflow: visible;
}
.mermaid svg {
    max-width: 100%;
    height: auto;
}
