/* Math formula rendering styles — Caly-Quiz IRVE LMS
 * Renders LaTeX-like notation into styled HTML (fractions, sub/superscripts, Greek)
 * v1.0 — 2026-03-28
 */

/* ── Fraction layout ────────────────────────────────── */
.math-frac {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: middle;
    margin: 0 0.15em;
    font-size: 0.85em;
}
.math-frac .math-num {
    border-bottom: 1px solid currentColor;
    padding: 0 0.2em 0.1em;
    line-height: 1.2;
}
.math-frac .math-den {
    padding: 0.1em 0.2em 0;
    line-height: 1.2;
}

/* ── Typography for formula containers ──────────────── */
.formula,
.formula-chip,
[data-math] {
    font-family: 'Cambria Math', 'Latin Modern Math', 'STIX Two Math', Georgia, serif;
}
.formula sup,
.formula-chip sup,
[data-math] sup {
    font-size: 0.7em;
    vertical-align: super;
}
.formula sub,
.formula-chip sub,
[data-math] sub {
    font-size: 0.7em;
    vertical-align: sub;
}
