/*! fxTeX - CSS for the MathML this converter produces.
 *  Every rule is scoped to .fxtex, the class the converter puts on each equation's own root
 *  element (<math>, an align/gather <div>, or the speech <span> that wraps them), so nothing
 *  here can reach markup fxTeX did not generate. The fxtex.min.js bundle injects this
 *  automatically; link this file directly for server-side rendering:
 *      <link id="fxtex-style" rel="stylesheet" href="fxtex.css">
 *  The source is app/fxtex/src/style.css, which carries the reasoning behind every rule; the
 *  compiled copies (app/fxtex/dist/fxtex.css, app/fxTeXPro/dist/fxtexpro.css and
 *  cpp/latex2mathml/fxtex.css, all identical) are written from it by tools/minify-css.mjs at
 *  build time - edit the source, never one of them.
 */
.fxtex mi,.fxtex mn{padding:4px 0 3px 0}
.fxtex mtr > mtd:first-child{padding-left:0;padding-right:0.5em}
.fxtex mtr > mtd:last-child{padding-right:0}
.fxtex .cc-underline{border-bottom:0.06em solid currentColor}
.fxtex .cc-overline{border-top:0.06em solid currentColor}
.fxtex .cc-fbox{border:0.06em solid currentColor;padding:0.15em}
.fxtex .cc-circled{border:0.06em solid currentColor;border-radius:50%;padding:0.1em 0.25em}
.fxtex .cc-cancel{background:linear-gradient(to top right,transparent calc(50% - 0.6px),currentColor calc(50% - 0.6px),currentColor calc(50% + 0.6px),transparent calc(50% + 0.6px))}
.fxtex .cc-bcancel{background:linear-gradient(to bottom right,transparent calc(50% - 0.6px),currentColor calc(50% - 0.6px),currentColor calc(50% + 0.6px),transparent calc(50% + 0.6px))}
.fxtex .cc-xcancel{background:linear-gradient(to top right,transparent calc(50% - 0.6px),currentColor calc(50% - 0.6px),currentColor calc(50% + 0.6px),transparent calc(50% + 0.6px)),linear-gradient(to bottom right,transparent calc(50% - 0.6px),currentColor calc(50% - 0.6px),currentColor calc(50% + 0.6px),transparent calc(50% + 0.6px))}
.fxtex.math-align{display:inline-grid;column-gap:0;row-gap:0.15em}
.fxtex .math-align-row{display:contents}
.fxtex .math-align-left{text-align:right}
.fxtex .math-align-right{text-align:left}
.fxtex .math-align-center{text-align:center}
.fxtex .math-align math{width:fit-content}
.fxtex .math-align-left math{margin-left:auto;margin-right:0}
.fxtex .math-align-right math{margin-left:0;margin-right:auto}
.fxtex .math-align-center math{margin-left:auto;margin-right:auto}
.fxtex.cc-math{display:inline-block}
.fxtex .cc-speech{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/*! fxTeXServer addition (not part of the upstream fxtex.css above - do not lose this block on
 *  re-sync). A page that only embeds this server's raw MathML output has no other math font in
 *  its own stylesheet to fall back on, unlike the browser fxtex.min.js bundle, which runs inside
 *  a page that presumably already has real math text nearby. Latin Modern Math is the font this
 *  project's own rendering pipeline (mathml2svg, svg2png) lays equations out in, so it is shipped
 *  here too for visual consistency between this server's <math> output and any future svg/png
 *  output from the same pipeline. Browsers with MathML Core support (Chrome, Safari, Firefox)
 *  use a font's OpenType MATH table for layout - fraction bars, radicals, stretchy delimiters -
 *  so naming a math font here, not just any serif, actually changes how equations are shaped.
 */
@font-face {
  font-family: "Latin Modern Math";
  src: url("fonts/LatinModernMath-Regular.woff2") format("woff2"),
       url("fonts/LatinModernMath-Regular.otf") format("opentype");
  font-display: swap;
}
.fxtex { font-family: "Latin Modern Math", "STIX Two Math", "Cambria Math", serif; }

/*! fxTeXServer addition (not part of the upstream fxtex.css above - do not lose this block on
 *  re-sync). \placeholder's slot: a box marking where a value is meant to be typed, either by an
 *  editor showing an empty position or by an author pointing at something the reader supplies.
 *  The same numbers are built into the SVG back end (mathml2svg/Layout.cpp), which lays equations
 *  out itself and so can never read this file - keep the two in step.
 */
.fxtex mspace.cc-input {
  display: inline-block;
  /* Border drawn inside the 0.6x0.8em, not added to it. Without this the CSS box comes out
     0.66x0.86em while the SVG back end draws exactly 0.6x0.8em, and the two forms disagree by
     the width of the border. */
  box-sizing: border-box;
  width: 0.6em;
  height: 0.8em;
  border: 1px dashed #9aa5b1;
  vertical-align: middle;
  background: #e2e8f0;
}
