/* The site is RTL (Hebrew); code is always LTR. */

.md-typeset pre,
.md-typeset code,
.md-typeset kbd,
.md-typeset .highlight,
.md-typeset .highlighttable,
.md-typeset p.code {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

/* Code copy button sits on the right of an LTR block */
.md-typeset .md-clipboard {
  right: .5em;
  left: auto;
}

/* Line numbers column stays on the left of the code */
.md-typeset .highlighttable {
  direction: ltr;
}

/* Tables converted from the Word document */
.md-typeset table.book-table {
  display: table;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: .75rem;
}

.md-typeset table.book-table td,
.md-typeset table.book-table th {
  border: 1px solid var(--md-default-fg-color--lightest);
  padding: .4em .8em;
  vertical-align: top;
  text-align: right;
}

.md-typeset table.book-table th {
  background: var(--md-default-fg-color--lightest);
}

.md-typeset table.book-table p {
  margin: 0;
}

/* "Code in table" cells from Word: monospace, LTR */
.md-typeset table.book-table p.code {
  font-family: var(--md-code-font-family);
  white-space: pre;
}

.md-typeset table.book-table td:has(> p.code) {
  text-align: left;
}

/* Wide tables scroll instead of breaking the layout on phones */
.md-typeset .book-table-wrap {
  overflow-x: auto;
}

.md-typeset img {
  max-width: 100%;
  height: auto;
}

/* Math formulas are LTR */
.md-typeset .arithmatex {
  direction: ltr;
  unicode-bidi: isolate;
}

.md-typeset div.arithmatex {
  text-align: center;
  overflow-x: auto;
}
