/*
  How a rendered Markdown document looks: the preview on every Markdown tool
  page, and the <style> of every exported HTML file and printed PDF.

  Self-contained on purpose: it uses none of the site's classes or tokens, so
  an exported file looks the same as the preview. On the site it still has to
  set everything the reset (Tailwind preflight) takes away, like list bullets
  and heading sizes.

  Exports keep the base and the chosen theme. document.js drops the blocks
  marked theme:<name> for other themes and the block marked page (rules that
  only matter on the site); keep those markers when editing.

  Classes on the <article>:
    md-doc            every document
    md-theme-<name>   github (default), clean, academic or compact
    md-paper          always light, like paper (PDF previews)
    md-dark / md-auto dark colours always / when the reader's system is dark
*/

.md-doc {
  --md-fg: #1f2328;
  --md-muted: #59636e;
  --md-bg: #ffffff;
  --md-border: #d1d9e0;
  --md-subtle: #f6f8fa;
  --md-link: #0969da;
  --md-code-bg: rgba(129, 139, 152, 0.12);
  --md-mark: #fff8c5;
  --md-note: #0969da;
  --md-tip: #1a7f37;
  --md-important: #8250df;
  --md-warning: #9a6700;
  --md-caution: #d1242f;
  --md-hl-keyword: #cf222e;
  --md-hl-title: #8250df;
  --md-hl-string: #0a3069;
  --md-hl-number: #0550ae;
  --md-hl-comment: #6e7781;
  --md-hl-builtin: #953800;
  --md-hl-tag: #116329;
  --md-hl-add-bg: #dafbe1;
  --md-hl-add: #116329;
  --md-hl-del-bg: #ffebe9;
  --md-hl-del: #82071e;
  --md-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --md-heading-font: var(--md-font);
  --md-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --md-size: 16px;
  --md-leading: 1.6;
  --md-gap: 1em;

  color: var(--md-fg);
  background: var(--md-bg);
  font-family: var(--md-font);
  font-size: var(--md-size);
  line-height: var(--md-leading);
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-align: start;
  -webkit-text-size-adjust: 100%;
}

.md-doc > :first-child { margin-top: 0 !important; }
.md-doc > :last-child { margin-bottom: 0 !important; }

.md-doc p, .md-doc blockquote, .md-doc ul, .md-doc ol, .md-doc dl, .md-doc table, .md-doc pre, .md-doc details,
.md-doc .markdown-alert, .md-doc figure {
  margin: 0 0 var(--md-gap);
}

/* ---- Headings ---- */

.md-doc h1, .md-doc h2, .md-doc h3, .md-doc h4, .md-doc h5, .md-doc h6 {
  margin: 1.5em 0 0.75em;
  font-family: var(--md-heading-font);
  font-weight: 600;
  line-height: 1.25;
  color: var(--md-fg);
  letter-spacing: normal;
}
.md-doc h1 { font-size: 2em; }
.md-doc h2 { font-size: 1.5em; }
.md-doc h3 { font-size: 1.25em; }
.md-doc h4 { font-size: 1em; }
.md-doc h5 { font-size: 0.875em; }
.md-doc h6 { font-size: 0.85em; color: var(--md-muted); }
.md-doc h1 code, .md-doc h2 code, .md-doc h3 code { font-size: inherit; }

/* ---- Text ---- */

.md-doc a { color: var(--md-link); text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: 0.2em; }
.md-doc a:hover { text-decoration-thickness: 2px; }
.md-doc strong, .md-doc b { font-weight: 600; }
.md-doc em, .md-doc i { font-style: italic; }
.md-doc s, .md-doc del { text-decoration: line-through; }
.md-doc mark { background: var(--md-mark); color: inherit; padding: 0 0.15em; border-radius: 2px; }
.md-doc sup, .md-doc sub { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
.md-doc sup { top: -0.5em; }
.md-doc sub { bottom: -0.25em; }
.md-doc small { font-size: 85%; }
.md-doc abbr[title] { text-decoration: underline dotted; cursor: help; }
.md-doc kbd {
  display: inline-block;
  padding: 0.1em 0.4em;
  font: 0.8em/1.3 var(--md-mono);
  color: var(--md-fg);
  background: var(--md-subtle);
  border: 1px solid var(--md-border);
  border-bottom-width: 2px;
  border-radius: 6px;
  vertical-align: middle;
}

.md-doc hr {
  height: 0.25em;
  margin: 1.5em 0;
  padding: 0;
  border: 0;
  background: var(--md-border);
  color: inherit;
  overflow: hidden;
}

/* ---- Lists ---- */

.md-doc ul, .md-doc ol { padding-left: 2em; }
.md-doc ul { list-style: disc; }
.md-doc ol { list-style: decimal; }
.md-doc ul ul { list-style: circle; }
.md-doc ul ul ul { list-style: square; }
.md-doc ol ol { list-style: lower-roman; }
.md-doc ol ol ol { list-style: lower-alpha; }
.md-doc ol[type="a"] { list-style: lower-alpha; }
.md-doc ol[type="A"] { list-style: upper-alpha; }
.md-doc ol[type="i"] { list-style: lower-roman; }
.md-doc ol[type="I"] { list-style: upper-roman; }
.md-doc li { display: list-item; }
.md-doc li + li { margin-top: 0.25em; }
.md-doc li > p { margin-top: var(--md-gap); margin-bottom: 0; }
.md-doc li > p:first-child { margin-top: 0; }
.md-doc li > ul, .md-doc li > ol { margin: 0.25em 0 0; }
.md-doc .contains-task-list { padding-left: 2em; }
.md-doc .task-list-item { list-style: none; }
.md-doc .task-list-item-checkbox {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 1em;
  height: 1em;
  margin: 0 0.4em 0.2em -1.6em;
  vertical-align: middle;
  accent-color: var(--md-link);
}
.md-doc dl { padding: 0; }
.md-doc dt { margin-top: 1em; font-weight: 600; }
.md-doc dd { margin: 0 0 0.5em; padding: 0 1em; }

/* ---- Quotes and alerts ---- */

.md-doc blockquote {
  padding: 0 1em;
  color: var(--md-muted);
  border-left: 0.25em solid var(--md-border);
}
.md-doc .markdown-alert { padding: 0.5em 1em; color: inherit; border-left: 0.25em solid var(--md-alert, var(--md-note)); }
.md-doc .markdown-alert > :last-child { margin-bottom: 0; }
.md-doc .markdown-alert-title { display: flex; align-items: center; gap: 0.4em; margin-bottom: 0.25em !important; font-weight: 600; line-height: 1; color: var(--md-alert, var(--md-note)); }
.md-doc .markdown-alert-title::before {
  content: "";
  width: 1em;
  height: 1em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--md-alert-icon) center / contain no-repeat;
  mask: var(--md-alert-icon) center / contain no-repeat;
}
.md-doc .markdown-alert-note { --md-alert: var(--md-note); --md-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/%3E%3C/svg%3E"); }
.md-doc .markdown-alert-tip { --md-alert: var(--md-tip); --md-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z'/%3E%3C/svg%3E"); }
.md-doc .markdown-alert-important { --md-alert: var(--md-important); --md-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z'/%3E%3C/svg%3E"); }
.md-doc .markdown-alert-warning { --md-alert: var(--md-warning); --md-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z'/%3E%3C/svg%3E"); }
.md-doc .markdown-alert-caution { --md-alert: var(--md-caution); --md-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/%3E%3C/svg%3E"); }

/* ---- Code ---- */

.md-doc code, .md-doc tt, .md-doc samp {
  padding: 0.2em 0.4em;
  font-family: var(--md-mono);
  font-size: 85%;
  white-space: break-spaces;
  background: var(--md-code-bg);
  border-radius: 6px;
}
.md-doc pre {
  padding: 1em;
  overflow: auto;
  font-family: var(--md-mono);
  font-size: 85%;
  line-height: 1.45;
  color: var(--md-fg);
  background: var(--md-subtle);
  border-radius: 6px;
  tab-size: 4;
}
.md-doc pre code {
  display: block;
  padding: 0;
  margin: 0;
  font-size: 100%;
  white-space: pre;
  word-break: normal;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.md-doc .hljs-keyword, .md-doc .hljs-doctag, .md-doc .hljs-template-tag, .md-doc .hljs-template-variable,
.md-doc .hljs-type, .md-doc .hljs-variable.language_ { color: var(--md-hl-keyword); }
.md-doc .hljs-title, .md-doc .hljs-title.class_, .md-doc .hljs-title.function_ { color: var(--md-hl-title); }
.md-doc .hljs-attr, .md-doc .hljs-attribute, .md-doc .hljs-literal, .md-doc .hljs-meta, .md-doc .hljs-number,
.md-doc .hljs-operator, .md-doc .hljs-selector-attr, .md-doc .hljs-selector-class, .md-doc .hljs-selector-id,
.md-doc .hljs-variable { color: var(--md-hl-number); }
.md-doc .hljs-meta .hljs-string, .md-doc .hljs-regexp, .md-doc .hljs-string { color: var(--md-hl-string); }
.md-doc .hljs-built_in, .md-doc .hljs-symbol, .md-doc .hljs-params { color: var(--md-hl-builtin); }
.md-doc .hljs-code, .md-doc .hljs-comment, .md-doc .hljs-formula { color: var(--md-hl-comment); font-style: italic; }
.md-doc .hljs-name, .md-doc .hljs-quote, .md-doc .hljs-selector-pseudo, .md-doc .hljs-selector-tag { color: var(--md-hl-tag); }
.md-doc .hljs-subst { color: var(--md-fg); }
.md-doc .hljs-section { color: var(--md-hl-number); font-weight: 600; }
.md-doc .hljs-bullet { color: var(--md-hl-builtin); }
.md-doc .hljs-emphasis { font-style: italic; }
.md-doc .hljs-strong { font-weight: 600; }
.md-doc .hljs-addition { color: var(--md-hl-add); background: var(--md-hl-add-bg); }
.md-doc .hljs-deletion { color: var(--md-hl-del); background: var(--md-hl-del-bg); }

/* ---- Tables, images, details ---- */

.md-doc table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.md-doc th, .md-doc td { padding: 6px 13px; border: 1px solid var(--md-border); text-align: start; vertical-align: top; }
.md-doc th { font-weight: 600; }
.md-doc tr { background: var(--md-bg); border-top: 1px solid var(--md-border); }
.md-doc tbody tr:nth-child(2n) { background: var(--md-subtle); }
.md-doc td > :last-child, .md-doc th > :last-child { margin-bottom: 0; }

.md-doc img, .md-doc video { display: inline-block; max-width: 100%; height: auto; box-sizing: content-box; background: transparent; }
.md-doc img[align="right"] { float: right; margin-left: 1em; }
.md-doc img[align="left"] { float: left; margin-right: 1em; }
.md-doc [align="center"] { text-align: center; }
.md-doc [align="right"] { text-align: right; }
.md-doc figure { margin-inline: 0; }
.md-doc figcaption { font-size: 0.875em; color: var(--md-muted); }

.md-doc details > summary { cursor: pointer; display: list-item; }
.md-doc details[open] > summary { margin-bottom: 0.5em; }

/* ---- Footnotes ---- */

.md-doc .footnote-ref a { text-decoration: none; }
.md-doc .footnotes-sep { height: 1px; margin-top: 2.5em; }
.md-doc .footnotes { font-size: 0.875em; color: var(--md-muted); }
.md-doc .footnotes ol { padding-left: 1.5em; }
.md-doc .footnote-backref { text-decoration: none; font-family: var(--md-font); }

/* ---- Page extras: cover, contents, page breaks (PDF and HTML exports) ---- */

.md-doc .md-cover { display: flex; flex-direction: column; justify-content: center; min-height: 60vh; text-align: center; }
.md-doc .md-cover h1 { margin: 0; font-size: 2.4em; border: 0; }
.md-doc .md-cover .md-cover-subtitle { margin-top: 0.75em; font-size: 1.25em; color: var(--md-muted); }
.md-doc .md-cover .md-cover-meta { margin-top: 2.5em; color: var(--md-muted); }
.md-doc .md-toc { margin-bottom: 2em; }
.md-doc .md-toc-title { margin-top: 0; }
.md-doc .md-toc ol { list-style: none; padding-left: 0; }
.md-doc .md-toc ol ol { padding-left: 1.25em; }
.md-doc .md-toc li + li, .md-doc .md-toc ol ol { margin-top: 0.3em; }
.md-doc .md-toc a { color: inherit; text-decoration: none; }
.md-doc .md-toc a:hover { text-decoration: underline; }
.md-doc .md-page-break { height: 0; margin: 2em 0; border-top: 1px dashed var(--md-border); }

/* ---- Dark colours ---- */
/* page */
[data-theme="dark"] .md-doc:not(.md-paper),
/* /page */
.md-doc.md-dark {
  --md-fg: #e6edf3;
  --md-muted: #9198a1;
  --md-bg: #0d1117;
  --md-border: #3d444d;
  --md-subtle: #151b23;
  --md-link: #4493f8;
  --md-code-bg: rgba(101, 108, 118, 0.2);
  --md-mark: rgba(187, 128, 9, 0.4);
  --md-note: #4493f8;
  --md-tip: #3fb950;
  --md-important: #ab7df8;
  --md-warning: #d29922;
  --md-caution: #f85149;
  --md-hl-keyword: #ff7b72;
  --md-hl-title: #d2a8ff;
  --md-hl-string: #a5d6ff;
  --md-hl-number: #79c0ff;
  --md-hl-comment: #8b949e;
  --md-hl-builtin: #ffa657;
  --md-hl-tag: #7ee787;
  --md-hl-add-bg: #033a16;
  --md-hl-add: #aff5b4;
  --md-hl-del-bg: #67060c;
  --md-hl-del: #ffdcd7;
}
@media (prefers-color-scheme: dark) {
  .md-doc.md-auto {
    --md-fg: #e6edf3;
    --md-muted: #9198a1;
    --md-bg: #0d1117;
    --md-border: #3d444d;
    --md-subtle: #151b23;
    --md-link: #4493f8;
    --md-code-bg: rgba(101, 108, 118, 0.2);
    --md-mark: rgba(187, 128, 9, 0.4);
    --md-note: #4493f8;
    --md-tip: #3fb950;
    --md-important: #ab7df8;
    --md-warning: #d29922;
    --md-caution: #f85149;
    --md-hl-keyword: #ff7b72;
    --md-hl-title: #d2a8ff;
    --md-hl-string: #a5d6ff;
    --md-hl-number: #79c0ff;
    --md-hl-comment: #8b949e;
    --md-hl-builtin: #ffa657;
    --md-hl-tag: #7ee787;
    --md-hl-add-bg: #033a16;
    --md-hl-add: #aff5b4;
    --md-hl-del-bg: #67060c;
    --md-hl-del: #ffdcd7;
  }
  body.md-page.md-auto { background: #0d1117; }
}

/* ---- Themes ---- */

/* theme:github */
.md-theme-github h1, .md-theme-github h2 { padding-bottom: 0.3em; border-bottom: 1px solid var(--md-border); }
.md-theme-github .md-cover h1 { border: 0; }
/* /theme */

/* theme:clean */
.md-theme-clean {
  --md-font: "Inter", "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --md-leading: 1.75;
  --md-gap: 1.15em;
}
.md-theme-clean h1, .md-theme-clean h2, .md-theme-clean h3 { font-weight: 700; letter-spacing: -0.015em; }
.md-theme-clean h1 { font-size: 2.25em; margin-top: 1.2em; }
.md-theme-clean h2 { margin-top: 2em; }
.md-theme-clean blockquote { border-left-color: var(--md-link); font-style: italic; }
.md-theme-clean pre { border: 1px solid var(--md-border); border-radius: 10px; }
.md-theme-clean code { border-radius: 4px; }
.md-theme-clean table { border-collapse: separate; border: 1px solid var(--md-border); border-radius: 10px; }
.md-theme-clean th, .md-theme-clean td { border: 0; border-bottom: 1px solid var(--md-border); }
.md-theme-clean tr:last-child > td { border-bottom: 0; }
.md-theme-clean thead th { background: var(--md-subtle); }
.md-theme-clean tbody tr:nth-child(2n) { background: transparent; }
.md-theme-clean hr { height: 1px; margin: 2.5em 0; }
/* /theme */

/* theme:academic */
.md-theme-academic {
  --md-font: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, "Noto Serif", serif, "Apple Color Emoji", "Segoe UI Emoji";
  --md-size: 17px;
  --md-leading: 1.65;
  --md-gap: 0.9em;
}
.md-theme-academic p, .md-theme-academic li { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.md-theme-academic h1, .md-theme-academic h2, .md-theme-academic h3, .md-theme-academic h4 { font-weight: 700; }
.md-theme-academic h1 { text-align: center; font-size: 1.85em; margin-bottom: 1em; }
.md-theme-academic h2 { font-size: 1.35em; }
.md-theme-academic h3 { font-size: 1.15em; font-style: italic; font-weight: 600; }
.md-theme-academic blockquote { padding: 0 2em; border: 0; font-size: 0.95em; color: var(--md-fg); }
.md-theme-academic table { border-collapse: collapse; }
.md-theme-academic th, .md-theme-academic td { border: 0; padding: 0.35em 0.9em; }
.md-theme-academic table { border-top: 2px solid var(--md-fg); border-bottom: 2px solid var(--md-fg); }
.md-theme-academic thead th { border-bottom: 1px solid var(--md-fg); }
.md-theme-academic tbody tr:nth-child(2n) { background: transparent; }
.md-theme-academic hr { height: 1px; width: 30%; margin: 2em auto; background: var(--md-fg); }
.md-theme-academic .footnotes-sep { width: 30%; margin-left: 0; }
.md-theme-academic a { color: inherit; text-decoration-color: var(--md-link); }
/* /theme */

/* theme:compact */
.md-theme-compact {
  --md-size: 14px;
  --md-leading: 1.45;
  --md-gap: 0.6em;
}
.md-theme-compact h1, .md-theme-compact h2, .md-theme-compact h3, .md-theme-compact h4 { margin: 1.1em 0 0.4em; }
.md-theme-compact h1 { font-size: 1.6em; }
.md-theme-compact h2 { font-size: 1.3em; padding-bottom: 0.15em; border-bottom: 1px solid var(--md-border); }
.md-theme-compact h3 { font-size: 1.1em; }
.md-theme-compact th, .md-theme-compact td { padding: 3px 8px; }
.md-theme-compact pre { padding: 0.6em 0.8em; }
.md-theme-compact li + li { margin-top: 0.1em; }
.md-theme-compact hr { height: 1px; margin: 1em 0; }
/* /theme */

/* ---- A whole exported page ---- */

body.md-page { margin: 0; background: #ffffff; }
.md-page .md-doc { box-sizing: border-box; max-width: 980px; margin: 0 auto; padding: 45px; }
@media (max-width: 767px) { .md-page .md-doc { padding: 16px; } }

/* ---- Print ---- */

@media print {
  body.md-page, .md-page .md-doc { background: #ffffff; }
  .md-page .md-doc { max-width: none; padding: 0; }
  .md-doc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .md-doc h1, .md-doc h2, .md-doc h3, .md-doc h4, .md-doc h5, .md-doc h6 { break-after: avoid; page-break-after: avoid; }
  .md-doc pre, .md-doc blockquote, .md-doc .markdown-alert, .md-doc tr, .md-doc img, .md-doc figure { break-inside: avoid; page-break-inside: avoid; }
  .md-doc table { display: table; width: auto; overflow: visible; }
  .md-doc pre { overflow: visible; }
  .md-doc.md-wrap-code pre code { white-space: pre-wrap; word-break: break-word; }
  .md-doc .md-cover { min-height: 0; height: 85vh; break-after: page; page-break-after: always; }
  .md-doc .md-toc { break-after: page; page-break-after: always; }
  .md-doc .md-page-break { height: 0; margin: 0; border: 0; break-after: page; page-break-after: always; }
  .md-doc.md-break-h1 h1:not(:first-child) { break-before: page; page-break-before: always; }
  .md-doc a { text-decoration: none; }
  .md-doc .task-list-item-checkbox { -webkit-print-color-adjust: exact; }
}

/* ---- Maths and diagrams (after the themes, so they win) ---- */

.md-doc .math-display { display: block; margin: 0 0 var(--md-gap); overflow-x: auto; overflow-y: hidden; text-align: center; }
.md-doc .math math { font-size: 1.1em; }
.md-doc .math-display math { display: block math; }
.md-doc pre.md-diagram { padding: 0.5em 0; background: none; text-align: center; white-space: normal; overflow-x: auto; }
.md-doc pre.md-diagram svg { max-width: 100%; height: auto; }
.md-doc .md-diagram-message { display: block; margin-top: 0.75em; font-family: var(--md-font); font-size: 0.875em; white-space: normal; color: var(--md-caution); }
