/* The web site of the manual set as its PDF: Latin Modern for the text and
   the code, at the size of a book, the text justified and hyphenated, the
   headings in the weight of LaTeX, and the colours of the PDF (black text,
   the primary 7030A0 for the links). */

@font-face { font-family: "Latin Modern Roman";
  src: url("fonts/lmroman10-regular.otf") format("opentype"); }
@font-face { font-family: "Latin Modern Roman"; font-weight: bold;
  src: url("fonts/lmroman10-bold.otf") format("opentype"); }
@font-face { font-family: "Latin Modern Roman"; font-style: italic;
  src: url("fonts/lmroman10-italic.otf") format("opentype"); }
@font-face { font-family: "Latin Modern Roman"; font-weight: bold;
  font-style: italic;
  src: url("fonts/lmroman10-bolditalic.otf") format("opentype"); }
@font-face { font-family: "Latin Modern Mono";
  src: url("fonts/lmmono10-regular.otf") format("opentype"); }
@font-face { font-family: "Latin Modern Mono"; font-style: italic;
  src: url("fonts/lmmono10-italic.otf") format("opentype"); }

/* also on the attributes of the palette, on which Material sets its own */
:root, [data-md-color-primary], [data-md-color-accent] {
  --md-text-font: "Latin Modern Roman";
  --md-code-font: "Latin Modern Mono";
  --md-typeset-a-color: #7030A0;
  --md-accent-fg-color: #7030A0;
}

.md-typeset {
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: justify;
  hyphens: auto;
}

.md-typeset h1, .md-typeset h2, .md-typeset h3 {
  color: inherit;
  font-weight: bold;
  letter-spacing: 0;
}
.md-typeset h1 { font-size: 1.7em; margin-bottom: 1em; }
.md-typeset h2 { font-size: 1.3em; }
.md-typeset h3 { font-size: 1.1em; }

.md-typeset code, .md-typeset pre {
  font-size: 0.95em;
  text-align: left;
}

/* the text column of a book, not of a dashboard */
.md-grid { max-width: 58rem; }

/* the tables and the pseudocode as in the PDF: plain, with thin rules */
.md-typeset table:not([class]) { font-size: 0.9em; box-shadow: none;
  border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.md-typeset table:not([class]) th { font-weight: bold;
  border-bottom: 0.5px solid currentColor; }

/* the code within the prose as \texttt in the PDF: no box around it, and
   breakable, so that a justified line does not stretch around it */
.md-typeset :not(pre) > code {
  background: none;
  padding: 0;
  box-shadow: none;
  word-break: break-word;
}

/* the displays as in the PDF: the mathematics at the size of the text, and
   the number of an equation after the formula, pushed to the right margin,
   instead of over it when the formula is as wide as the column; a formula
   wider than the column scrolls with its number */
.md-typeset .katex { font-size: 1.05em; }
.md-typeset .katex-display { overflow-x: auto; overflow-y: hidden; }
.md-typeset .katex-display > .katex > .katex-html {
  display: flex;
  align-items: baseline;
}
.md-typeset .katex-display > .katex > .katex-html > .base:first-child {
  margin-left: auto;
}
.md-typeset .katex-display > .katex > .katex-html > .tag {
  position: static;
  margin-left: auto;
  padding-left: 1.5em;
}
.md-typeset .katex-display > .katex > .katex-html:not(:has(> .tag))
  > .base:last-child { margin-right: auto; }
.md-typeset div.arithmatex { margin: 0.5em 0; }
.md-typeset .katex-display { margin: 0; padding: 0.2em 0; }
