/* Simple Wysiwyg Math — front end. Formulas are native MathML; no JavaScript. */

/* Fira Math (SIL OFL) — sans-serif, has the OpenType MATH table browsers need
   for fractions and roots. Downloaded only on pages that contain a formula. */
@font-face {
	font-family: "Simple Wysiwyg Math";
	src: url("../vendor/fira-math/FiraMath-Regular.woff2") format("woff2");
	font-display: swap;
}

math {
	font-family: "Simple Wysiwyg Math", math;
	/* Full-size fractions in running text too (the browser default shrinks them). */
	math-style: normal;
}

/* Nested ("multi-level") fractions keep full size; exponents and root indices
   stay small as usual. */
math mfrac > * {
	math-style: normal;
}

math[display="block"] {
	display: block math;
	margin: 1em 0;
	/* A long formula scrolls sideways on narrow screens instead of breaking the layout. */
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
}
