/* Keep MathLab's surrounding typography, colors and layout. KaTeX owns math metrics. */
.ml-katex-source{color:inherit;max-width:100%;line-height:1.55}
.ml-katex-source .katex{font-size:1em;color:inherit;text-indent:0;text-transform:none}
.ml-katex-source .katex-display{margin:.45em 0;overflow-x:auto;overflow-y:visible;padding:.3em .12em .35em}
.ml-katex-source .katex-display>.katex{white-space:nowrap}
.ml-katex-source .katex .text{font-family:"STIX Two Text",Cambria,Georgia,serif;font-style:normal}
@media print{.ml-katex-source{color:#111}.ml-katex-source .katex-display{overflow:visible;break-inside:avoid}}

.ml-katex-source .katex .ml-upright-pi{font-family:"STIX Two Text",Cambria,Georgia,serif;font-style:normal}

/* A single inline flow retains spaces in mixed math/prose, including flex buttons. */
.ml-math-content{display:inline;max-width:100%;white-space:normal;overflow-wrap:inherit}

/* Shared axis arrowheads and asymptotes, including print. */
.fig-arrow{fill:none;stroke:#9fb3cf;stroke-width:1.3}
.fig-asym{fill:none;stroke:#9fb3cf;stroke-width:1.3;stroke-dasharray:7 4}
@media print{.fig-arrow,.fig-asym{stroke:#000!important}}

/* Chapter 1 source formulas stay intact; prose and individual solution steps wrap normally. */
.ml-ch1-equation{display:inline-block;max-width:100%;overflow-x:auto;overflow-y:auto;white-space:nowrap;vertical-align:middle;padding:.2em .05em}
.ml-ch1-equation .katex,.ml-ch1-equation .katex-html{white-space:nowrap}
@media print{.ml-ch1-equation{max-width:none;overflow:visible;break-inside:avoid}}
