/* Preserve Herozh's selectable font families. These local aliases are fallbacks.
 * Use the supplied non-FaNum variants so numbers in equations stay mathematical.
 * Original font licences still apply; these assets came from the supplied theme. */
@font-face {
  font-family: "Mecademy Persian";
  src: url("../../fonts/woff/IRANSansWeb.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Mecademy Persian";
  src: url("../../fonts/woff/IRANSansWeb_Light.woff") format("woff");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Mecademy Persian";
  src: url("../../fonts/woff/IRANSansWeb_Medium.woff") format("woff");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Mecademy Persian";
  src: url("../../fonts/woff/IRANSansWeb_Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Mecademy Persian";
  src: url("../../fonts/woff/IRANSansWeb_Black.woff") format("woff");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Mecademy Yekan";
  src: url("../../fonts/yekan/woff/IRANYekanWebRegular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Mecademy Yekan";
  src: url("../../fonts/yekan/woff/IRANYekanWebBold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  --mecademy-fa-font: "Mecademy Persian", Tahoma, Arial, sans-serif;
  --mecademy-en-font: Arial, "Helvetica Neue", system-ui, sans-serif;
}
/* Low specificity lets saved Herozh and Elementor typography retain priority. */
:where([lang|="fa"]) { font-family: var(--mecademy-fa-font); }
:where([lang|="en"]) { font-family: var(--mecademy-en-font); }
body.mecademy-hello-font-fallback:lang(fa) { font-family: var(--mecademy-fa-font); }
body.mecademy-hello-font-fallback:lang(en) { font-family: var(--mecademy-en-font); }
/* Language islands and bidi isolation retain punctuation order in mixed text. */
:where([lang|="en"][dir="ltr"], [lang|="fa"][dir="rtl"]) { unicode-bidi: isolate; }
.mecademy-math,
.katex,
.katex-display,
.katex-error {
  direction: ltr;
  unicode-bidi: isolate;
  text-indent: 0;
}
.mecademy-math { display: inline-block; max-width: 100%; }
.mecademy-math--block { display: block; margin-block: 1em; }
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: 0.25em;
  max-width: 100%;
}
.mecademy-math:not([data-mecademy-math-rendered]),
.katex-error {
  font-family: ui-monospace, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Keep Latin code and editable formula source legible in RTL documents. */
:where(pre, code, kbd, samp) {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: ui-monospace, Consolas, "Liberation Mono", monospace;
}
:where(input[type="email"], input[type="url"], input[type="tel"]) {
  direction: ltr;
  text-align: start;
}
