/*
 * Computer Modern (CMU) typography for KaTeX math.
 * Replaces KaTeX's font stacks for the main text/math families with the
 * authentic Computer Modern Unicode fonts (cmr/cmbx/cmmi/cmbxti equivalents)
 * so math renders like standard LaTeX output. Specialty families
 * (blackboard, calligraphic, fraktur, sans, typewriter, stretchy delimiters
 * and large operators) keep KaTeX's own CM-derived fonts.
 */

@font-face {
  font-family: 'CMU Serif';
  src: url('/fonts/cmunrm.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CMU Serif';
  src: url('/fonts/cmunbx.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CMU Serif';
  src: url('/fonts/cmunti.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'CMU Serif';
  src: url('/fonts/cmunbi.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Base: upright text, numbers, operators, punctuation */
.katex {
  font-family: 'CMU Serif', 'KaTeX_Main', serif;
}

/* Italic math variables (cmmi) */
.katex .mathnormal,
.katex .mathit {
  font-family: 'CMU Serif', 'KaTeX_Math', serif;
  font-style: italic;
}

/* Bold upright (cmbx) and bold italic (cmbxti) */
.katex .mathbf,
.katex .boldsymbol {
  font-family: 'CMU Serif', 'KaTeX_Math', serif;
}

/* \mathrm / \text upright roman (cmr) */
.katex .mainrm,
.katex .textrm {
  font-family: 'CMU Serif', 'KaTeX_Main', serif;
}