/* User Provided Stylesheet */

/* GENERATED by scripts/build_css.py from theme/_shared.css, _rtl.css — do not edit. */


/* ThermoLab shared styles — included in BOTH language builds.
   Generated into content/<lang>/thermolab.css by scripts/build_css.py; do not edit
   the generated files. */

/* Math and code are always LTR, and bidi-isolated so surrounding text cannot reorder them.
   Harmless in the English build, essential in the Hebrew one. */
.katex {
  direction: ltr;
  unicode-bidi: isolate;
}

.katex-display {
  direction: ltr;
}

code,
kbd,
samp,
pre {
  direction: ltr;
  unicode-bidi: isolate;
}

/* The book theme puts a "Made with MyST" link in the sidebar footer whenever the
   `primary_sidebar_footer` template part is empty. The theme's only supported way to drop it
   is to supply replacement content for that part, which we have none for — and injected HTML
   does not survive hydration — so hide it. The header's copy of the same string is handled by
   the `logo_text` option in each myst.yml. */
.myst-made-with-myst {
  display: none;
}

/* Numbers-with-units that must never be reordered by the bidi algorithm */
.thermolab-qty {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Hebrew-only styles.

   These rules are UNCONDITIONAL (no [dir="rtl"] selector) on purpose: the mystmd theme is a
   hydrating React app that rebuilds the document and drops any `dir` attribute we inject, so
   direction must come from CSS the theme itself loads. CSS `direction` drives the Unicode
   bidi algorithm exactly as the `dir` attribute would. */

html,
body {
  direction: rtl;
}

main,
article,
nav,
aside {
  direction: rtl;
}

article,
main p,
main li,
main dd {
  text-align: right;
}

/* Code blocks stay left-aligned inside RTL prose */
pre,
pre * {
  text-align: left;
}

table {
  direction: rtl;
}

/* Never break inline math across lines. KaTeX offers a line break after every relation and
   binary operator (`=`, `>`, `-`), and in an RTL paragraph the two halves then land on
   separate lines in the wrong reading order — the right-hand side of an equation printed
   above its left-hand side. Only Hebrew needs this: in the LTR build a split formula still
   reads in order. The cost is that a very long inline formula overflows a narrow column
   instead of wrapping, which is why long relations still belong in display math. */
.katex {
  white-space: nowrap;
}
