/* LinFIR documentation — styles. Same codes as demaudio.com (Inter, #b03737, dark header, pill
   buttons, red rule under the title), with a light and a dark reading theme.
   Theme: <html data-theme="light|dark"> when chosen in the menu, otherwise the system's. */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/Inter-Regular.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/Inter-Medium.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/Inter-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700 900; font-display: swap; src: url(fonts/Inter-Bold.woff2) format("woff2"); }

:root {
  --rouge: #b03737;
  --red-light: rgb(214, 47, 47);
  --red-dark: rgb(161, 25, 25);
  --red-grad: linear-gradient(0deg, var(--red-dark) 0%, var(--red-light) 100%);
  --bar: #0a0a0a;          /* header: dark in both themes, as on the site */
  --bar-line: #1f1f1f;
  --bar-text: #fff;
  --bar-muted: #a3a3a3;
  --header-h: 64px;
  --sidebar-w: 284px;
  --toc-w: 236px;
  --measure: 780px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Light theme */
  --bg: #ffffff;
  --bg-soft: #f6f5f4;
  --bg-hover: #efedeb;
  --text: #2b2b2b;
  --strong: #0d0d0d;
  --muted: #6b6b6b;
  --line: #e5e2df;
  --link: #b03737;         /* 6.1:1 on white */
  --link-hover: #8e1f1f;
  --accent-soft: rgba(176, 55, 55, .07);
  --accent-line: rgba(176, 55, 55, .35);
  --code-bg: #f3f1ef;
  --code-text: #3a1f1f;
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);
  color-scheme: light;
}

/* Dark theme: the site's colours. Links use a lighter red: #b03737 on #080808 is only 3.3:1.
   Screen only: printing always uses the light theme. */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080808; --bg-soft: #0f0f0f; --bg-hover: #1a1a1a;
    --text: #e4e4e4; --strong: #fff; --muted: #9a9a9a; --line: #262626;
    --link: #e06464; --link-hover: #fff;
    --accent-soft: rgba(176, 55, 55, .13); --accent-line: rgba(224, 100, 100, .45);
    --code-bg: #171717; --code-text: #f1d6d6;
    --shadow: 0 10px 30px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
@media screen { :root[data-theme="dark"] {
  --bg: #080808; --bg-soft: #0f0f0f; --bg-hover: #1a1a1a;
  --text: #e4e4e4; --strong: #fff; --muted: #9a9a9a; --line: #262626;
  --link: #e06464; --link-hover: #fff;
  --accent-soft: rgba(176, 55, 55, .13); --accent-line: rgba(224, 100, 100, .45);
  --code-bg: #171717; --code-text: #f1d6d6;
  --shadow: 0 10px 30px rgba(0, 0, 0, .6);
  color-scheme: dark;
} }

/* Screenshots exist in both themes: show the one matching the page (the light one on paper). */
@media screen { :root[data-theme="dark"] .only-light, :root[data-theme="light"] .only-dark { display: none; } }
@media screen and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-light { display: none; } }
@media screen and (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .only-dark { display: none; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.7 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
svg { width: 1em; height: 1em; flex: none; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--bar); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h); display: flex; align-items: center; gap: 14px;
  padding: 0 20px; background: var(--bar); color: var(--bar-text);
  border-bottom: 1px solid var(--bar-line);
}
/* The site's red glow, reduced to a hairline under the header */
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 47, 47, .75) 30%, rgba(214, 47, 47, .75) 70%, transparent);
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { display: block; width: 125px; height: auto; }
.brand-doc {
  flex: none; color: var(--bar-text); font-weight: 600; font-size: 15px; letter-spacing: .1px;
  padding-left: 14px; border-left: 1px solid #333; line-height: 26px;
}
.brand-doc span { color: var(--bar-muted); font-weight: 500; }
.brand-doc:hover { color: var(--bar-text); }
.brand-doc:hover span { color: var(--bar-text); }
.actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent;
  color: var(--bar-muted); cursor: pointer; transition: color .2s, background .2s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: #fff; background: #1c1c1c; }
.icon-btn svg { width: 20px; height: 20px; }
.nav-btn, .search-btn { display: none; }
/* Outline pill, as the site's buttons */
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 8px;
  border: 1px solid #fff; border-radius: 30px; padding: 7px 16px;
  font: 500 14px/1 Inter, sans-serif; color: #fff; background: transparent; cursor: pointer;
  transition: all .3s ease; white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; }
.pill:hover { background: #fff; color: var(--rouge); }

/* Theme menu */
.theme { position: relative; }
.ti { display: none; }
:root[data-theme-choice="auto"] .ti-auto, :root[data-theme-choice="light"] .ti-light, :root[data-theme-choice="dark"] .ti-dark { display: inline-flex; }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 120;
  list-style: none; margin: 0; padding: 6px; min-width: 160px;
  background: #141414; border: 1px solid #2a2a2a; border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.theme-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: #ddd; cursor: pointer; font-size: 14px;
}
.theme-menu button:hover { background: #222; color: #fff; }
.theme-menu button span { flex: 1; text-align: left; }
.theme-menu button svg { width: 16px; height: 16px; }
.theme-menu button svg:last-child { visibility: hidden; color: #e06464; }
.theme-menu button[aria-checked="true"] svg:last-child { visibility: visible; }

/* Search */
.search { position: relative; flex: 0 1 380px; margin-left: 18px; }
.search input {
  width: 100%; height: 38px; padding: 0 36px 0 38px;
  border: 1px solid #2c2c2c; border-radius: 30px; background: #151515; color: #fff;
  font: 400 14px/1 Inter, sans-serif; outline: none; transition: border-color .2s, background .2s;
}
.search input::placeholder { color: #8a8a8a; }
.search input:focus { border-color: var(--rouge); background: #101010; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #8a8a8a; display: flex; pointer-events: none; }
.search-icon svg { width: 16px; height: 16px; }
.search-key {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font: 500 11px/1 var(--mono); color: #8a8a8a; border: 1px solid #3a3a3a; border-radius: 4px; padding: 3px 6px;
}
.search input:focus ~ .search-key, .search input:not(:placeholder-shown) ~ .search-key { display: none; }
.search-results {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 120;
  width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 640px); overflow-y: auto;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px;
}
.search-results p { margin: 0; padding: 14px; color: var(--muted); font-size: 14px; }
.search-results ul { list-style: none; margin: 0; padding: 0; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--accent-soft); color: var(--text); }
.sr-title { display: block; font-weight: 600; color: var(--strong); font-size: 14.5px; line-height: 1.4; }
.sr-page { display: block; font-size: 12px; color: var(--muted); letter-spacing: .2px; margin-bottom: 2px; }
.sr-text { display: block; font-size: 13.5px; line-height: 1.5; color: var(--muted); margin-top: 2px; }
.search-results mark { background: rgba(214, 47, 47, .18); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ---------- Layout ---------- */
.layout {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  min-height: calc(100vh - var(--header-h));
}
.sidebar {
  position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto;
  padding: 26px 14px 48px 20px; background: var(--bg-soft); border-right: 1px solid var(--line);
  overscroll-behavior: contain;
}
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 7px; font-size: 14.5px; line-height: 1.4; color: var(--text);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-hover); color: var(--strong); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--link); font-weight: 600; box-shadow: inset 3px 0 0 var(--rouge); }
.nav-part {
  margin: 22px 0 6px; padding: 0 12px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.nav-part a { padding: 0; font-size: inherit; color: inherit; display: inline; background: none; box-shadow: none; }
.nav-part a:hover { background: none; color: var(--link); }
.nav-part a[aria-current="page"] { color: var(--link); background: none; box-shadow: none; }
.nav .lock { margin-left: auto; display: inline-flex; color: var(--muted); }
.nav .lock svg { width: 13px; height: 13px; }

.main { min-width: 0; width: 100%; max-width: calc(var(--measure) + 96px); margin: 0 auto; padding: 36px 48px 40px; }

/* Breadcrumb: plain text above the title, it scrolls with the page */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--link); }

/* "On this page" */
.toc {
  position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto;
  padding: 40px 20px 40px 8px; font-size: 13.5px; line-height: 1.45; overscroll-behavior: contain;
}
.toc-title { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc ul ul { margin: 2px 0 4px; }
.toc a { display: block; padding: 4px 0 4px 12px; color: var(--muted); border-left: 2px solid var(--line); }
.toc ul ul a { padding-left: 24px; font-size: 13px; }
.toc a:hover { color: var(--strong); }
.toc a.is-current { color: var(--link); border-left-color: var(--rouge); font-weight: 500; }
.toc-inline { display: none; }

/* ---------- Content ---------- */
h1, h2, h3, h4, h5, h6 { color: var(--strong); }
.main > h1, .print-page > h1 { font-size: 42px; font-weight: 700; line-height: 1.15; letter-spacing: -1.2px; margin: 0; }
.rule { width: 96px; border: 0; border-top: 2px solid var(--rouge); margin: 18px 0 30px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; position: relative; top: -4px;
  font: 600 12px/1 Inter, sans-serif; letter-spacing: .3px; color: var(--link);
  border: 1px solid var(--accent-line); border-radius: 30px; padding: 5px 10px;
}
.badge svg { width: 12px; height: 12px; }

.doc-body { font-size: 16px; line-height: 1.75; overflow-wrap: break-word; }
.doc-body > :first-child { margin-top: 0; }
.doc-body h2 { font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -.5px; margin: 2.2em 0 .6em; }
.doc-body hr + h2 { margin-top: 0; }
.doc-body h3 { font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -.25px; margin: 1.9em 0 .5em; }
.doc-body h4 { font-size: 17px; font-weight: 600; margin: 1.6em 0 .4em; }
.doc-body h5, .doc-body h6 { font-size: 15px; font-weight: 600; margin: 1.4em 0 .3em; }
/* Headings are links to themselves (insert_anchor_links = "heading") */
.doc-body :is(h2, h3, h4, h5, h6) > a { color: inherit; text-decoration: none; }
.doc-body :is(h2, h3, h4, h5, h6) > a:hover::after { content: "#"; margin-left: .35em; color: var(--link); font-weight: 500; }
.doc-body p, .doc-body ul, .doc-body ol, .doc-body table, .doc-body blockquote, .doc-body pre, .doc-body details { margin: 0 0 1.15em; }
.doc-body ul, .doc-body ol { padding-left: 1.5em; }
.doc-body li { margin-bottom: .35em; }
.doc-body li > ul, .doc-body li > ol { margin: .35em 0 .2em; }
.doc-body li::marker { color: var(--muted); }
.doc-body strong { font-weight: 600; color: var(--strong); }
.doc-body a { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc-body a:hover { text-decoration-color: currentColor; }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.6em 0 2.2em; }
.doc-body blockquote {
  margin-left: 0; padding: 14px 20px; border-left: 3px solid var(--rouge);
  background: var(--accent-soft); border-radius: 0 10px 10px 0;
}
.doc-body blockquote > :last-child { margin-bottom: 0; }
.doc-body code { font: .86em/1.5 var(--mono); background: var(--code-bg); color: var(--code-text); padding: .15em .4em; border-radius: 5px; }
.doc-body pre {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; overflow-x: auto; line-height: 1.55;
}
.doc-body pre code { background: none; padding: 0; color: var(--text); font-size: 13.5px; }
.doc-body table { border-collapse: collapse; font-size: 14.5px; line-height: 1.55; display: block; max-width: 100%; overflow-x: auto; }
.doc-body th, .doc-body td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc-body th { color: var(--strong); font-weight: 600; border-bottom: 2px solid var(--rouge); white-space: nowrap; }
.doc-body tbody tr:hover { background: var(--bg-soft); }
.doc-body details { border: 1px solid var(--line); border-radius: 10px; padding: 0 18px; transition: border-color .3s; }
.doc-body details[open] { border-color: var(--accent-line); padding-bottom: 4px; }
.doc-body summary { cursor: pointer; padding: 12px 0; font-weight: 500; }
.doc-body .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.doc-body .katex { font-size: 1.06em; }

/* Screenshots */
.shot { display: block; margin: 1.6em 0; }
.doc-body > p:first-child > .shot:first-child { margin-top: 0; }
.shot img { display: block; margin: 0 auto; border-radius: 6px; cursor: zoom-in; }
li .shot { margin: .8em 0; }
.toolbar-image-zoom {
  position: relative; overflow: hidden; margin: .6em 0 1.4em; border-radius: 6px;
  border: 1px solid var(--line); cursor: zoom-in;
}
.toolbar-image-zoom .shot { margin: 0; }
.toolbar-image-zoom p { margin: 0; }
.toolbar-image-zoom img { width: 100%; border-radius: 0; cursor: zoom-in; transition: transform .15s ease; }

/* Image viewer */
.viewer {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(0, 0, 0, .88); cursor: zoom-out;
}
.viewer img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }

/* Previous / next, as the site's post cards */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 20px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--text); transition: border-color .2s, background .2s;
}
.pager a:hover { border-color: var(--rouge); background: var(--accent-soft); color: var(--text); }
.pager-next { grid-column: 2; text-align: right; align-items: flex-end; }
.pager-dir { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.pager-dir svg { width: 14px; height: 14px; }
.pager-title { font-weight: 600; color: var(--strong); }
.doc-footer { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; }
.doc-footer a { color: var(--muted); }
.doc-footer a:hover { color: var(--link); }
.not-found { padding-top: 80px; }

.scrim { position: fixed; inset: var(--header-h) 0 0; z-index: 80; background: rgba(0, 0, 0, .45); }

/* ---------- Responsive ---------- */
@media (max-width: 1239px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc { display: none; }
  .toc-inline {
    display: block; margin: -8px 0 32px; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px;
  }
  .toc-inline summary { cursor: pointer; padding: 10px 16px; font-weight: 600; color: var(--strong); }
  .toc-inline ul { list-style: none; margin: 0; padding: 0 16px 12px; }
  .toc-inline li { padding: 3px 0; }
  .toc-inline a { color: var(--text); }
  .toc-inline a:hover, .toc-inline a.is-current { color: var(--link); }
}
@media (max-width: 959px) {
  :root { --header-h: 58px; }
  .topbar { padding: 0 10px 0 6px; gap: 8px; }
  .nav-btn { display: inline-flex; }
  .layout { display: block; }
  .sidebar {
    position: fixed; top: var(--header-h); left: 0; bottom: 0; z-index: 90; height: auto;
    width: min(86vw, 320px); transform: translateX(-102%); transition: transform .25s ease;
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open { overflow: hidden; }
  .main { padding: 26px 22px 32px; }
  .main > h1, .print-page > h1 { font-size: 34px; letter-spacing: -.8px; }
  .search { margin-left: 8px; }
  .pill { display: none; }
}
@media (max-width: 699px) {
  .brand-doc span { display: none; }
  .brand img { width: 108px; }
  .search { display: none; }
  .search-btn { display: inline-flex; }
  body.search-open .search {
    display: block; position: fixed; left: 0; right: 0; top: var(--header-h); margin: 0;
    padding: 10px 12px; background: var(--bar); border-bottom: 1px solid var(--bar-line);
  }
  body.search-open .search-icon { left: 25px; }
  body.search-open .search input { font-size: 16px; } /* iOS zooms into smaller inputs */
  .search-key { display: none; }
  .search-results { left: 8px; right: 8px; width: auto; top: calc(100% + 6px); max-height: calc(100vh - 140px); }
  .doc-body h2 { font-size: 24px; }
  .doc-body h3 { font-size: 19px; }
  .doc-body th, .doc-body td { padding: 8px 8px; }
  .doc-body table { font-size: 13.5px; }
  .main { padding: 22px 16px 28px; }
  .main > h1 { font-size: 30px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
}
@media (max-width: 380px) {
  .brand-doc { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .toolbar-image-zoom img { transition: none; }
}

/* ---------- Whole documentation (print page, also shown on screen) ---------- */
.print-bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 20px; background: var(--bar); font-size: 14px;
}
.print-bar a { display: inline-flex; align-items: center; gap: 6px; color: #ddd; }
.print-bar a:hover { color: #fff; }
.print-bar .pill { margin: 0; display: inline-flex; }
.print-doc { max-width: var(--measure); margin: 0 auto; padding: 40px 24px 80px; }
.print-cover { margin-bottom: 40px; }
.print-cover img { display: none; }
.print-cover h1 { font-size: 46px; letter-spacing: -1.4px; line-height: 1.1; margin: 0; }
.print-contents { columns: 2; column-gap: 32px; list-style: none; padding: 0; font-size: 14px; color: var(--muted); }
.print-contents li { break-inside: avoid; }
.print-contents-part { margin: 12px 0 2px; font-weight: 700; color: var(--strong); font-size: 12px; letter-spacing: .8px; text-transform: uppercase; break-after: avoid; }
.print-page { margin-top: 72px; padding-top: 32px; border-top: 2px solid var(--rouge); }
.print-page > h1 { margin-bottom: 26px; }

/* ---------- Print ---------- */
@media print {
  :root, :root[data-theme] {
    --bg: #fff; --bg-soft: #fff; --text: #111; --strong: #000; --muted: #555; --line: #ccc;
    --link: #8e1f1f; --accent-soft: #f7eeee; --accent-line: #d9b3b3; --code-bg: #f2f2f2; --code-text: #222;
    color-scheme: light;
  }
  @page { margin: 16mm 15mm; }
  body { font-size: 10.5pt; background: #fff; }
  .only-dark { display: none !important; }
  .print-dark .only-dark { display: block !important; }
  .print-dark .only-light { display: none !important; }
  .topbar, .sidebar, .toc, .toc-inline, .pager, .doc-footer, .skip, .scrim, .print-bar, .viewer, .crumbs { display: none !important; }
  .layout { display: block; }
  .main, .print-doc { max-width: none; padding: 0; margin: 0; }
  .doc-body { font-size: 10.5pt; line-height: 1.55; }
  .doc-body a { text-decoration: none; }
  .doc-body :is(h2, h3, h4) > a:hover::after { content: none; }
  .doc-body h2 { font-size: 17pt; margin-top: 1.6em; }
  .doc-body hr { margin: 1.4em 0; }
  .doc-body h3 { font-size: 13pt; }
  .main > h1, .print-page > h1 { font-size: 24pt; letter-spacing: -.5px; }
  h1, h2, h3, h4, h5, h6 { break-after: avoid; break-inside: avoid; }
  pre, blockquote, table, .shot, details, .katex-display { break-inside: avoid; }
  pre, .doc-body pre code { white-space: pre-wrap; }
  .doc-body table { display: table; }
  .doc-body tbody tr:hover { background: none; }
  .shot img { max-height: 190mm; width: auto; cursor: auto; }
  .toolbar-image-zoom { border: 0; }
  .toolbar-image-zoom img { transform: none !important; }
  .print-cover { min-height: 60vh; padding-top: 25vh; }
  .print-cover img { display: block; margin-bottom: 30px; }
  .print-page { break-before: page; margin-top: 0; padding-top: 0; border-top: 0; }
}
