/* HACK(benchristel): these CSS rules are needed to get \text{} to render
 * nicely on Safari. See this issue:
 * https://github.com/mathjax/MathJax/issues/2866
 * A known issue with this workaround: accents rendered by the textmacros
 * package display too high up. However, I have not found any published content
 * that uses accent macros. Our international content uses accented unicode
 * characters (as it should; the TeX accents are intended for math, not text,
 * and often have a different appearance from the accents used in European
 * languages).
 */
:where(mjx-mn, mjx-mtext, mjx-mi:not(.mjx-i), mjx-utext) > mjx-c::before {
    padding-top: 0.8em !important;
}
/* MathJax inserts extra space under the bar of square roots. This is a visual
 * difference from KaTeX, and looks bad when combined with the padding hack
 * above. So we remove the extra space. The ::before pseudo-element with
 * min-height ensures that the square root is always at least tall enough to
 * accommodate one line of text.
 */
mjx-sqrt > mjx-box {
    padding-top: 0 !important;
}
mjx-sqrt > mjx-box > :first-child::before {
    min-height: 0.8em;
    width: 0;
    display: inline-block;
    content: '';
}
/* The fix for square roots results in another problem: if the square root
 * contains a display-style fraction with only a variable in the numerator, not
 * enough space is left between the square root bar and the numerator. To fix
 * this, we make sure that fraction numerators are always at least the height
 * of a full line of text.
 */
mjx-frac[type=d] > mjx-num::before {
    min-height: 0.8em;
    width: 0;
    display: inline-block;
    content: '';
}
