/* Math generator: problems in a row or stacked in columns, Western or Arabic-Indic numerals. */
.mx .ws-q{display:inline-flex;gap:.32em}
.mx.mx-dense{row-gap:4mm}
.mx .ws-a.ws-on{white-space:nowrap}

/* Arabic-Indic numerals read from the right: the problem, its number and its answer all flip. */
.mx-ar li,.mx-ar .ws-q{direction:rtl}
.mx-ar li::before{content:counter(q,arabic-indic) ")"}

/* Stacked problem: digits line up on the right, the sign sits on the left, the answer goes under the line. */
.mx-c{align-items:flex-start}
.mx-stack{display:inline-grid;direction:ltr;min-width:2.6em;font-variant-numeric:tabular-nums;letter-spacing:.08em}
.mx-n{display:flex;justify-content:flex-end;gap:.7em;line-height:1.3}
.mx-s{margin-inline-end:auto;letter-spacing:0}
.mx-r{display:block;min-height:1.75em;margin-top:.8mm;padding-top:.6mm;border-top:.4mm solid #000;text-align:right;font-weight:700}

/* Options that do not apply to the chosen operation are hidden. The generator ignores them either way. */
.gen[data-generator=math] .gen-form:has(#g-op option:is([value=add],[value=sub]):checked) .gen-f:has(#g-table,#g-order,#g-remainder),
.gen[data-generator=math] .gen-form:has(#g-op option:is([value=mul],[value=div]):checked) .gen-f:has(#g-regroup),
.gen[data-generator=math] .gen-form:has(#g-op option[value=mul]:checked) .gen-f:has(#g-remainder){display:none}

/* Missing number box, timed-drill line, large print. */
.mx-box{display:inline-block;min-width:2.2em;min-height:1.4em;border:.35mm solid #000;border-radius:1mm;text-align:center;font-weight:700}
.mx-timer{display:flex;gap:12mm;justify-content:flex-end;margin:0 0 5mm;font-weight:700;font-size:12.5pt}
.mx-blank{display:inline-block;width:22mm;border-bottom:.35mm solid #000}
.mx.mx-big{font-size:27pt;row-gap:6mm}
.gen[data-generator=math] .gen-form:has(#g-op option:not([value=mul]):checked) .gen-f:has(#g-factor2){display:none}
