/* Patrick Lei's notes. The homepage's look (plei99.github.io, public/styles.css)
   carried over to long pages: a page from the PDF notes, in the theme and the
   text and math fonts the reader has chosen there or here.

   Colour comes only from the theme roles in themes.css:
     --paper  background            --ink   the chosen filter, focus
     --text   text and outlines     --link  words that can be followed
     --muted  dates, ledes, numbers --rule  hairlines
   Nothing in this file names a colour. */

/* ---- Fonts: the homepage's pairings (fonts.css comes from there) ---- */
/* Chinese: the homepage's faces, but its files hold only the characters on
   the homepage. Each face is followed by the notes' own subset of the same
   font (build/subset-cjk.py), which has every character on this site and is
   fetched only for those the homepage's lacks. */
@font-face {
  font-family: "Notes Source Han Serif SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/notes-source-han-serif-sc-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Notes Source Han Serif SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/notes-source-han-serif-sc-bold.woff2") format("woff2");
}

@font-face {
  font-family: "Notes Source Han Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/notes-source-han-sans-sc-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Notes Source Han Sans SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/notes-source-han-sans-sc-bold.woff2") format("woff2");
}

@font-face {
  font-family: "Notes Resource Han Rounded SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/notes-resource-han-rounded-sc-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Notes Resource Han Rounded SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/notes-resource-han-rounded-sc-bold.woff2") format("woff2");
}

@font-face {
  font-family: "Notes LXGW WenKai";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/notes-lxgw-wenkai-regular.woff2") format("woff2");
}

:root {
  --link-hover: color-mix(in srgb, var(--link) 65%, var(--text));
  /* Lato carries only Latin, so Chinese falls through to --cjk; Latin inside
     Chinese text stays in Lato, which is the intended pairing. */
  --cjk: "Source Han Sans SC", "Notes Source Han Sans SC";
  --latin: Lato;
  --latin-math: "Lete Sans Math";
  --face:
    var(--latin),
    var(--cjk),
    "Noto Sans CJK SC",
    "PingFang SC",
    system-ui,
    sans-serif;
  --mono: Iosevka, ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Asana Math has every symbol the notes use (⦇ ⦈ for Laurent series are
     missing from half the math fonts); it is fetched only when needed. */
  --math: var(--latin-math), var(--latin), "Asana Math", math, serif;

  --measure: 40rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

:root[data-cjk="serif"] {
  --cjk: "Source Han Serif SC", "Notes Source Han Serif SC";
}

:root[data-cjk="wenkai"] {
  --cjk: "LXGW WenKai", "Notes LXGW WenKai";
}

:root[data-cjk="rounded"] {
  --cjk: "Resource Han Rounded SC", "Notes Resource Han Rounded SC";
}

/* Serif pairs with serif until told otherwise, as on the homepage: a Chinese
   serif with no Latin choice brings Pagella and Asana Math, and a Latin serif
   with no Chinese choice brings LXGW WenKai. Explicit choices ("lato",
   "sans") are attributes too, so they win over these. client/theme.ts and
   client/fonts.ts mirror these lists. */
:root[data-cjk="serif"]:not([data-latin]),
:root[data-cjk="wenkai"]:not([data-latin]),
:root[data-latin="pagella"] {
  --latin: "TeX Gyre Pagella", "Palatino Linotype", Palatino, "Book Antiqua";
  --latin-math: "Asana Math";
}

:root[data-latin="pagella"]:not([data-cjk]),
:root[data-latin="garamond"]:not([data-cjk]) {
  --cjk: "LXGW WenKai", "Notes LXGW WenKai";
}

:root[data-latin="garamond"] {
  --latin: "EB Garamond", Garamond;
  --latin-math: "Garamond Math";
}

/* \mathsf, as in the PDFs: Optima where it is installed (every Mac and
   iPhone; it may not be served), else Epigrafica, an Optima-like face from
   TeX Live (GPL; build/epigrafica.py made the files). */
@font-face {
  font-family: Epigrafica;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/epigrafica-regular.woff2") format("woff2");
}

@font-face {
  font-family: Epigrafica;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/epigrafica-bold.woff2") format("woff2");
}

math .sf {
  font-family: Optima, Epigrafica, var(--math);
}

/* ---- Base ------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.125rem/1.6 var(--face);
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure,
fieldset {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 0.1em;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

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

/* Rules like `.entry { display: grid }` would otherwise outrank [hidden]. */
[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.4rem 0.8rem;
  background: var(--text);
  color: var(--paper);
  z-index: 10;
}

.skip-link:focus {
  top: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Page: masthead, main, colophon ---------------------------- */
.page {
  min-height: 100dvh;
  max-width: 72rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) 2rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1.5rem, 4vh, 3rem);
}

main {
  outline: none;
  min-width: 0;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.name {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.name a {
  color: inherit;
  text-decoration: none;
}

.controls {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.scheme,
.latin,
.cjk {
  position: relative;
  color: var(--muted);
  font-size: 1rem;
}

.scheme::after,
.latin::after,
.cjk::after {
  content: "▾";
  position: absolute;
  right: 0;
  top: 0;
  pointer-events: none;
}

.scheme select,
.latin select,
.cjk select {
  appearance: none;
  field-sizing: content;
  text-align-last: right;
  padding: 0 1.1rem 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.scheme:hover,
.latin:hover,
.cjk:hover {
  color: var(--text);
}

.scheme select option,
.latin select option,
.cjk select option {
  background: var(--paper);
  color: var(--text);
}

.langswitch {
  color: var(--muted);
  font-size: 1rem;
  text-decoration: none;
}

.langswitch:hover {
  color: var(--text);
  text-decoration: underline;
}

.controls > * + * {
  padding-left: 1rem;
  border-left: 1px solid var(--rule);
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--muted);
}

.colophon p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.4rem;
}

/* ---- Index ------------------------------------------------------ */
.index-head {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--text);
}

.index-head h1,
.note-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lede {
  margin-top: 0.6rem;
  max-width: 36rem;
  color: var(--muted);
}

/* The filters: a menu per facet, like the masthead's selects, and a search
   field, on one line above the list. */
.filters {
  margin-bottom: 2.25rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--rule);
  font-size: 1rem;
}

.facet {
  position: relative;
  min-width: 0;
}

.facet summary {
  display: flex;
  gap: 0.4em;
  max-width: 22rem;
  padding-right: 1.1rem;
  list-style: none;
  cursor: pointer;
  line-height: 1.9;
}

.facet summary::-webkit-details-marker {
  display: none;
}

.facet summary::after {
  content: "▾";
  position: absolute;
  right: 0;
  color: var(--muted);
}

.facet[open] summary::after {
  content: "▴";
}

.facet-label {
  color: var(--muted);
}

.facet-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.facet.is-active .facet-value {
  color: var(--text);
  font-weight: 700;
}

.menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: -0.75rem;
  z-index: 5;
  min-width: max(100%, 15rem);
  padding: 0.4rem 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: 0 0.5rem 1.5rem color-mix(in srgb, var(--text) 12%, transparent);
}

/* An option is a row: checkmark, name, count. The input itself is hidden; the
   checkmark shows its state. */
.option {
  display: grid;
  grid-template-columns: 1.4rem 1fr auto;
  align-items: baseline;
  gap: 0 0.5rem;
  padding: 0.15rem 0.9rem 0.15rem 0.75rem;
  line-height: 1.6;
  white-space: nowrap;
  cursor: pointer;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  color: var(--ink);
  font-weight: 700;
}

.option:has(input:checked)::before {
  content: "✓";
}

.option:hover,
.option:has(input:focus-visible) {
  background: color-mix(in srgb, var(--text) 7%, var(--paper));
}

.option:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.option-name {
  grid-column: 2;
  grid-row: 1;
}

.option:has(input:checked) .option-name {
  font-weight: 700;
}

.option.is-empty {
  color: var(--muted);
  opacity: 0.55;
}

/* All, only or none of a value filed under this one, set in from it. */
.suboptions .option {
  padding-left: 2.65rem;
  font-size: 0.92em;
}

.count {
  grid-column: 3;
  grid-row: 1;
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 400;
  font-variant-numeric: oldstyle-nums;
}

.filter-bar input[type="search"] {
  flex: 1 1 14rem;
  max-width: 22rem;
  margin-left: auto;
  padding: 0.15rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: none;
  color: var(--text);
  font: inherit;
}

.filter-bar input[type="search"]::placeholder {
  color: var(--muted);
}

.filter-bar input[type="search"]:focus-visible {
  outline: none;
  border-bottom-color: var(--ink);
}

.filter-status {
  display: flex;
  gap: 1rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 1rem;
}

.clear {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.empty {
  color: var(--muted);
}

/* ---- The list of notes (the homepage's entries) ----------------- */
.entries {
  list-style: none;
  padding: 0;
}

.entry {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}

.entry:first-child {
  border-top: 0;
  padding-top: 0;
}

.entry[hidden] + .entry,
.entry:first-child[hidden] + .entry {
  border-top-color: var(--rule);
}

.entry-when {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.entry-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

.entry-title a {
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

.entry-title a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

.entry-where {
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
}

.entry-body {
  margin-top: 0.3rem;
  max-width: 36rem;
  font-size: 1.04rem;
  line-height: 1.55;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin-top: 0.3rem;
  font-size: 1rem;
}

/* ---- A note: header, contents, text ----------------------------- */
.note-head {
  margin-bottom: 2.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--text);
}

.crumbs {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.crumbs span {
  margin-inline: 0.3rem;
}

.note-meta {
  margin-top: 0.6rem;
  max-width: 40rem;
  color: var(--muted);
}

.note-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.4rem;
  margin-top: 0.4rem;
  font-size: 1rem;
}

.note-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 64rem) {
  .note-grid {
    grid-template-columns: 15rem minmax(0, var(--measure));
    gap: 3.5rem;
  }
  .toc details {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100dvh - 3rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.toc {
  font-size: 0.95rem;
  line-height: 1.4;
}

.toc summary {
  margin-bottom: 0.5rem;
  color: var(--muted);
  cursor: pointer;
}

.toc ol {
  list-style: none;
  padding: 0;
}

.toc ol ol {
  margin: 0.2rem 0 0.4rem;
  padding-left: 0.9rem;
}

.toc li {
  margin-top: 0.3rem;
}

/* The `li` that holds the first entries when they are deeper than the rest
   (unnumbered sections before the first chapter) adds no space of its own. */
.toc li:has(> ol:only-child) {
  margin-top: 0;
}

.toc li:has(> ol:only-child) > ol {
  margin-top: 0;
}

.toc a {
  color: var(--text);
  text-decoration: none;
}

.toc a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.toc .secnum {
  color: var(--muted);
}

/* Titles keep the source's font changes; in the contents they all read alike. */
.toc .b {
  font-weight: inherit;
}

/* The text. Paragraphs, theorems and displays are tex4ht's; the classes on
   spans (b, i, sc, tt) are its font changes made semantic by build.py. */
.note-body {
  max-width: var(--measure);
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}

.note-body p {
  margin: 0 0 0.85em;
}

.note-body p:empty {
  display: none;
}

.note-body h2,
.note-body h3,
.note-body h4,
.note-body h5 {
  margin: 2.2em 0 0.7em;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.note-body h2 {
  font-size: 1.55rem;
  padding-top: 0.6em;
  border-top: 1px solid var(--rule);
}

.note-body h3 {
  font-size: 1.25rem;
}

.note-body h4,
.note-body h5 {
  font-size: 1.08rem;
}

.note-body > h2:first-child,
.abstract + h2 {
  margin-top: 0;
}

.secnum {
  color: var(--muted);
  font-weight: 400;
}

.runin-head {
  font-weight: 700;
  margin-right: 0.4em;
}

.abstract {
  margin-bottom: 2rem;
  font-size: 1.04rem;
}

.abstract .title {
  font-variant: small-caps;
  margin-right: 0.3em;
}

/* Chinese has no small capitals; its abstracts open with a bold 摘要. */
:lang(zh) .abstract .title {
  font-weight: 700;
  margin-right: 0.6em;
}

.b,
strong {
  font-weight: 700;
}

.i {
  font-style: italic;
}

.sc {
  font-variant: small-caps;
}

.tt,
code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.center {
  text-align: center;
}

/* Theorems, definitions, remarks: the head carries them, as in the PDF. */
.newtheorem,
.proof {
  margin: 1.2em 0;
}

.newtheorem > p:last-child,
.proof > p:last-child {
  margin-bottom: 0;
}

.newtheorem .head .b,
.newtheorem .head {
  font-weight: 700;
}

.proof .head {
  font-style: italic;
}

.qed {
  float: right;
  margin-left: 1em;
}

/* Lists: enumitem's labels sit in their own column. */
.note-body dl.enumerate-enumitem,
.note-body dl.enumerate,
.note-body dl.description,
.note-body dl.thebibliography {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.3em 0.7em;
  margin: 0.6em 0 1em;
}

.note-body dl.description {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.note-body dt {
  text-align: right;
}

.note-body dl.description dt {
  text-align: left;
  font-weight: 700;
}

.note-body dd {
  margin: 0;
}

.note-body dd > p:last-child,
.note-body li > p:last-child {
  margin-bottom: 0;
}

.note-body ul,
.note-body ol {
  margin: 0.6em 0 1em;
  padding-left: 1.4em;
}

.note-body li + li {
  margin-top: 0.3em;
}

/* Mathematics is MathML, set by the browser in the chosen math font. */
math {
  font-family: var(--math);
  font-size: 1em;
  font-variant-numeric: lining-nums;
}

/* A matrix says its own column spacing (oxide: columnspacing="5pt"); Chromium
   adds 0.4em either side of every cell and half an ex above and below, which
   made a matrix wider and taller than LaTeX's and MathJax's (the three
   psmallmatrix of lie-algebras Lecture 10 overran the column). */
mtable[columnspacing] > mtr > mtd {
  padding: 0.25ex 0.14em;
}

/* An inline formula and the punctuation touching it, which no line splits. */
.nobr {
  white-space: nowrap;
}

/* \text is in the text font, as in TeX, not the math font (Garamond Math, say). */
math mtext {
  font-family: var(--face);
}

.eq {
  display: flex;
  align-items: center;
  gap: 1em;
  margin: 0.9em 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: 0.15em;
}

.eq math {
  flex: 1;
  margin-inline: auto;
}

.eqno {
  flex: none;
  color: var(--muted);
}

/* MathML Core has no tables of labelled rows or enclosures; build.py turns
   them into these. */
mtd.eqno {
  padding-left: 2em !important;
  text-align: right !important;
  color: var(--muted);
}

.enclose-box,
.enclose-roundedbox,
.enclose-circle {
  border: 1px solid currentColor;
  padding: 0.15em 0.25em;
}

.enclose-roundedbox {
  border-radius: 0.3em;
}

.enclose-circle {
  border-radius: 50%;
}

.enclose-top {
  border-top: 1px solid currentColor;
}

.enclose-bottom {
  border-bottom: 1px solid currentColor;
}

.enclose-left {
  border-left: 1px solid currentColor;
}

.enclose-right {
  border-right: 1px solid currentColor;
}

/* \overline and \underline, as TeX sets them: a rule a little clear of the
   base's ink, which is the box MathML gives it. */
math .overline {
  border-top: max(1px, 0.05em) solid currentColor;
  padding-top: 0.12em;
}

math .underline {
  border-bottom: max(1px, 0.05em) solid currentColor;
  padding-bottom: 0.12em;
}

.enclose-updiagonalstrike {
  background: linear-gradient(
    to top right,
    transparent calc(50% - 0.6px),
    currentColor calc(50% - 0.6px),
    currentColor calc(50% + 0.6px),
    transparent calc(50% + 0.6px)
  );
}

.enclose-downdiagonalstrike {
  background: linear-gradient(
    to bottom right,
    transparent calc(50% - 0.6px),
    currentColor calc(50% - 0.6px),
    currentColor calc(50% + 0.6px),
    transparent calc(50% + 0.6px)
  );
}

.enclose-horizontalstrike {
  background: linear-gradient(
    transparent calc(50% - 0.6px),
    currentColor calc(50% - 0.6px),
    currentColor calc(50% + 0.6px),
    transparent calc(50% + 0.6px)
  );
}

/* A formula MathJax could not read: its TeX, quietly. */
.tex-error {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--muted);
  white-space: pre-wrap;
}

pre.tex-error {
  margin: 0.9em 0;
  padding-left: 0.8em;
  border-left: 2px solid var(--rule);
}

/* Diagrams are LaTeX's own drawings, in the text colour. Their sizes are in
   em, so lettering in a diagram matches the text around it. */
.diagram {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
}

.diagram--display {
  display: block;
  margin: 1em 0;
  overflow-x: auto;
  overflow-y: hidden;
  text-align: center;
}

.diagram svg {
  display: inline-block;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.diagram--display svg {
  max-width: none;
}

.diagram-missing {
  color: var(--muted);
  font-style: italic;
}

figure,
.float {
  margin: 1.4em 0;
  text-align: center;
}

figcaption,
.caption {
  margin-top: 0.5em;
  font-size: 0.95rem;
  line-height: 1.45;
}

.caption .id {
  font-weight: 700;
}

.note-body table {
  margin: 1em auto;
  border-collapse: collapse;
  font-variant-numeric: lining-nums tabular-nums;
}

.note-body td,
.note-body th {
  padding: 0.25em 0.6em;
}

.note-body hr {
  border: 0;
  border-top: 1px solid var(--rule);
}

/* Footnotes and the bibliography: smaller, after a hairline. */
.footnote-mark,
sup {
  font-size: 0.7em;
  line-height: 0;
  vertical-align: super;
}

/* span.footnote-mark > a > sup is already one superscript: the sup inside takes
   the mark's size and position instead of shrinking and raising a second time,
   and carries the link's underline itself, at its own baseline under the digit
   (the link's would sit at the baseline of the text line). */
.footnote-mark > a {
  text-decoration: none;
}

.footnote-mark > a > sup {
  font-size: inherit;
  vertical-align: baseline;
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.18em;
}

.footnote-mark > a:hover > sup {
  text-decoration-thickness: 0.1em;
}

.footnotes,
.thebibliography {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* The entry a citation leads to. */
dt.thebibliography:target,
dt.thebibliography:target + dd {
  background: color-mix(in srgb, var(--ink) 14%, var(--paper));
}

.footnotes {
  margin-top: 2.5em;
  padding-top: 0.8em;
  border-top: 1px solid var(--rule);
}

aside.footnotetext {
  margin: 0.5em 0;
  font-size: 0.95rem;
  color: var(--muted);
}

aside.footnotetext p {
  margin: 0;
}

/* Chinese has no italics, and sets tighter at display sizes. */
:lang(zh) .note-head h1 {
  letter-spacing: 0;
}

:lang(zh) .i {
  font-style: normal;
}

/* ---- Narrow screens -------------------------------------------- */
@media (max-width: 36rem) {
  body {
    font-size: 1.06rem;
  }
  .entry {
    grid-template-columns: 1fr;
  }
  .filter-bar input[type="search"] {
    margin-left: 0;
    max-width: none;
  }
  /* Menus span the bar, so the last one cannot run off the screen. */
  .filter-bar {
    position: relative;
  }
  .facet {
    position: static;
  }
  .facet summary {
    position: relative;
  }
  .menu {
    left: 0;
    right: 0;
    top: auto;
    margin-top: 0.35rem;
  }
  .entry-when {
    line-height: 1.4;
  }
}

/* ---- How the notes were made: the colophon's dialog ------------- */
.judging-open {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  text-align: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.judging-open:hover {
  color: var(--link-hover);
  text-decoration-thickness: 0.1em;
}

.how {
  width: min(52rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 1.5rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 1rem 3rem var(--shadow);
}

.how::backdrop {
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  backdrop-filter: blur(2px);
}

.how-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--text);
}

.how-head h2 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  line-height: 1.2;
}

.how-close {
  padding: 0 0.2rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.how-close:hover {
  color: var(--text);
}

.how-failed {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- How a machine translation was made: its page's dialog ------ */
/* The dialog's frame is .how's; components/Judging.tsx and client/judging.ts. */
.judging {
  width: min(64rem, calc(100vw - 2rem));
  font-size: 1rem;
  line-height: 1.5;
}

.judging-body {
  display: grid;
  gap: 1.5rem;
  font-variant-numeric: lining-nums;
}

.judging-intro {
  display: grid;
  gap: 0.75rem;
  max-width: 44rem;
}

.judging-criteria {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 1rem;
}

.judging-criteria dt {
  font-weight: 600;
}

.judging-criteria dd {
  margin: 0;
  color: var(--muted);
}

.judging h3 {
  font-size: 1.15rem;
  line-height: 1.3;
}

.judging h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.judging-note {
  max-width: 44rem;
  margin: 0.25rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.judging-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}

.judging-kpi {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule);
}

.judging-kpi .k,
.judging-kpi .s {
  color: var(--muted);
  font-size: 0.85rem;
}

.judging-kpi .v {
  font-size: 1.4rem;
  font-weight: 600;
}

.judging-card {
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.judging-toggle {
  display: inline-flex;
  margin-bottom: 0.5rem;
  border: 1px solid var(--rule);
}

.judging-toggle button {
  padding: 0.25rem 0.75rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.judging-toggle button[aria-pressed="true"] {
  background: var(--stage);
  color: var(--text);
}

.judging-bars {
  display: block;
  width: 100%;
}

.judging-bars text {
  fill: var(--muted);
  font-size: 0.8rem;
}

.judging-bars .ink {
  fill: var(--text);
}

.judging-bars .value {
  font-weight: 600;
}

.judging-bars .tick {
  stroke: var(--rule);
}

.judging-bars .bar {
  fill: var(--link);
  opacity: 0.8;
}

.judging-bars .dot {
  fill: var(--text);
  stroke: var(--paper);
  stroke-width: 1.5;
}

.judging-bars .dot.self {
  fill: var(--paper);
  stroke: var(--text);
  stroke-width: 2;
}

.judging-bars .hit {
  fill: transparent;
}

.judging-scroll {
  overflow-x: auto;
}

.judging-grid {
  width: 100%;
  min-width: 36rem;
  border-collapse: separate;
  border-spacing: 2px;
  table-layout: fixed;
  font-size: 0.85rem;
  font-variant-numeric: lining-nums tabular-nums;
}

.judging-grid thead th.row {
  width: 22%;
}

.judging-grid th {
  padding: 0.2rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.judging-grid th.row {
  max-width: 16rem;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.judging-grid td {
  padding: 0.35rem 0.2rem;
  text-align: center;
}

.judging-grid td.plain {
  color: var(--text);
}

.judging-grid td.strong {
  font-weight: 600;
}

.judging-grid td.chosen,
.judging-grid td.self {
  box-shadow: inset 0 0 0 2px var(--text);
  font-weight: 700;
}

.judging-sections td {
  cursor: pointer;
}

.judging-grid td:hover,
.judging-grid td.selected {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.judging-detail {
  margin-top: 1rem;
}

.judging-comment {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.2rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}

.judging-comment .j {
  font-weight: 600;
}

.judging-comment .s {
  color: var(--muted);
  font-size: 0.85rem;
}

.judging-summaries {
  margin-top: 0.75rem;
}

.judging-summaries summary {
  color: var(--link);
  cursor: pointer;
}

.judging-terms {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.judging-terms th,
.judging-terms td {
  padding: 0.3rem 0.6rem 0.3rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.judging-terms th {
  color: var(--muted);
  font-weight: 500;
}

.judging-tip {
  position: fixed;
  z-index: 1;
  max-width: 18rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: 0 0.25rem 1rem var(--shadow);
  font-size: 0.85rem;
  pointer-events: none;
}

.judging-tip div {
  color: var(--muted);
}

@media (max-width: 40rem) {
  .judging-comment {
    grid-template-columns: 1fr;
  }
}

@media print {
  .masthead,
  .colophon,
  .toc,
  .filters {
    display: none;
  }
}

/* ======================================================================
   Notes converted by latexml_oxide (build/oxide.py)

   oxide keeps its semantic `ltx_*` classes on everything but headings
   (levelled h2-h6 with `span.secnum`), footnotes and pictures, which
   oxide.py rewrites into the site's own markup (styled above). What follows
   gives those classes the look of the tex4ht notes above: LaTeXML.css
   (latexml_post/resources/CSS) is the reference for what each class means,
   restyled in the theme roles. Colour comes only from the roles and from
   `currentColor`; nothing here names black or white.
   ====================================================================== */

/* ---- Blocks, alignment ----------------------------------------------- */
.note-body .ltx_para,
.note-body .ltx_block,
.note-body .ltx_logical-block,
.note-body .ltx_p {
  display: block;
  white-space: normal;
}

.note-body .ltx_align_left {
  text-align: left;
}

.note-body .ltx_align_right {
  text-align: right;
}

.note-body .ltx_align_center,
.note-body .ltx_centering {
  text-align: center;
}

.note-body .ltx_align_justify,
.note-body .ltx_align_justified {
  text-align: justify;
}

.note-body .ltx_centering {
  display: block;
  margin-inline: auto;
}

.note-body .ltx_align_top {
  vertical-align: top;
}

.note-body .ltx_align_middle {
  vertical-align: middle;
}

.note-body .ltx_align_bottom {
  vertical-align: bottom;
}

.note-body .ltx_align_baseline {
  vertical-align: baseline;
}

.note-body .ltx_align_floatleft {
  float: left;
  margin-right: 1em;
}

.note-body .ltx_align_floatright {
  float: right;
  margin-left: 1em;
}

.note-body .ltx_inline-block,
.note-body .ltx_inline-logical-block,
.note-body .ltx_parbox,
.note-body .ltx_minipage {
  display: inline-block;
  text-indent: 0;
}

.note-body .ltx_minipage {
  vertical-align: top;
}

/* A figure's picture is an inline-block around a block that scrolls. */
.note-body .ltx_inline-block {
  max-width: 100%;
}

/* A centred stack in a formula (stackengine's \Centerstack) comes in its own
   line, `span.ltx_mtext_line`, so that it can be centred on the axis; it is as
   wide as its content, so what follows it in the formula is set after it, as
   LaTeXML.css has it. */
.note-body .ltx_mtext_line > .ltx_inline-block:not([style*="width"]) {
  width: max-content;
}

/* ...but one that holds only a display diagram is a block, or the inline-block
   shrinks to the picture and sits at the left (algebra-2 Theorem 48 proof). */
.note-body .ltx_inline-block:has(> .diagram--display:only-child) {
  display: block;
}

.note-body .ltx_pagination,
.note-body .ltx_rdf,
.note-body .ltx_nodisplay,
.note-body .ltx_listing_data {
  display: none;
}

.note-body .ltx_break {
  clear: none;
}

.note-body .ltx_ERROR,
.note-body .ltx_missing,
.note-body .ltx_nounicode {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--muted);
}

.note-body .ltx_rule {
  display: inline-block;
  vertical-align: bottom;
  background-color: currentColor;
}

/* In math, oxide draws over- and underlines itself (a border on the mrow beside a zero-size bar). */
.note-body span.ltx_underline {
  text-decoration: underline;
}

.note-body span.ltx_overline {
  text-decoration: overline;
}

.note-body .ltx_hflipped {
  display: inline-block;
  transform: scaleX(-1);
}

.note-body .ltx_vflipped {
  display: inline-block;
  transform: scaleY(-1);
}

/* \rotatebox and \scalebox: the outer box has the size, the inner is moved. */
.note-body .ltx_transformed_outer {
  position: relative;
  overflow: visible;
}

.note-body .ltx_transformed_inner {
  position: absolute;
  bottom: 0;
  left: 0;
  display: block;
}

.note-body .ltx_overlay {
  position: relative;
}

.note-body .ltx_overlay > span:nth-child(2) {
  position: absolute;
  left: 0;
}

/* ---- Fonts: oxide writes the source's font changes as classes ---------- */
.note-body .ltx_font_bold {
  font-weight: 700;
}

.note-body .ltx_font_medium {
  font-weight: 400;
}

.note-body .ltx_font_italic {
  font-style: italic;
  font-variant-caps: normal;
}

.note-body .ltx_font_slanted {
  font-style: oblique;
  font-variant-caps: normal;
}

.note-body .ltx_font_upright {
  font-style: normal;
  font-variant-caps: normal;
}

.note-body .ltx_font_smallcaps {
  font-variant-caps: small-caps;
  font-style: normal;
}

.note-body .ltx_font_oldstyle {
  font-variant-numeric: oldstyle-nums;
}

.note-body .ltx_font_typewriter {
  font-family: var(--mono);
  font-size: 0.9em;
}

.note-body .ltx_font_typewriter .ltx_font_typewriter {
  font-size: 1em;
}

/* \textsf: Optima where it is installed, else Epigrafica (as math .sf). */
.note-body .ltx_font_sansserif {
  font-family: Optima, Epigrafica, var(--cjk), sans-serif;
}

.note-body .ltx_font_serif {
  font-family: var(--face);
}

/* \emph in an upright context is italic; in italic text, upright (oxide says
   which on the element). */
.note-body em.ltx_emph {
  font-style: italic;
}

.note-body cite {
  font-style: normal;
}

/* The fonts of a token that MathML cannot say in Unicode; the family is the
   math font's. */
.note-body math .ltx_mathvariant_italic {
  font-style: italic;
}

.note-body math .ltx_mathvariant_bold {
  font-weight: 700;
}

.note-body math .ltx_mathvariant_bold-italic {
  font-style: italic;
  font-weight: 700;
}

/* Chinese has no italics; a Latin word in a Chinese note is set upright, as
   the .i above does. */
:lang(zh) .note-body .ltx_font_italic,
:lang(zh) .note-body .ltx_font_slanted,
:lang(zh) .note-body em.ltx_emph,
:lang(zh) .note-body .ltx_theorem,
:lang(zh) .note-body .ltx_proof {
  font-style: normal;
}

/* Colours: \textcolor and \colorbox come as variables in the style attribute
   (LaTeXML.css reads them the same way). The colours the reader's theme made
   (currentColor, var(--paper), blends of the two, in oxide.py) are used as
   they are; a colour named in the source is a light-theme colour, which a
   dark theme turns about the middle of the lightness scale so it keeps
   contrast with the paper. */
.note-body [style*="--ltx-fg-color:"] {
  color: var(--ltx-fg-color);
}

.note-body [style*="--ltx-bg-color:"] {
  background-color: var(--ltx-bg-color);
}

.note-body [style*="--ltx-border-color:"] {
  border-color: var(--ltx-border-color);
}

.note-body [style*="--ltx-fill-color:"] {
  fill: var(--ltx-fill-color);
}

.note-body [style*="--ltx-stroke-color:"] {
  stroke: var(--ltx-stroke-color);
}

.note-body [style*="--ltx-fg-color:#"] {
  color: light-dark(
    var(--ltx-fg-color),
    hsl(from var(--ltx-fg-color) h s max(l, 100 - l, 62))
  );
}

.note-body [style*="--ltx-bg-color:#"] {
  background-color: light-dark(
    var(--ltx-bg-color),
    hsl(from var(--ltx-bg-color) h s calc(100 - l))
  );
}

.note-body [style*="--ltx-border-color:#"] {
  border-color: light-dark(
    var(--ltx-border-color),
    hsl(from var(--ltx-border-color) h s max(l, 100 - l, 62))
  );
}

.note-body [style*="--ltx-fill-color:#"] {
  fill: light-dark(
    var(--ltx-fill-color),
    hsl(from var(--ltx-fill-color) h s max(l, 100 - l, 62))
  );
}

.note-body [style*="--ltx-stroke-color:#"] {
  stroke: light-dark(
    var(--ltx-stroke-color),
    hsl(from var(--ltx-stroke-color) h s max(l, 100 - l, 62))
  );
}

/* Black and white are the text and the paper. */
.note-body [style*="--ltx-fg-color:black"],
.note-body [style*="--ltx-border-color:black"] {
  color: currentColor;
  border-color: currentColor;
}

.note-body [style*="--ltx-bg-color:black"] {
  background-color: currentColor;
}

.note-body [style*="--ltx-bg-color:white"] {
  background-color: var(--paper);
}

.note-body [style*="--ltx-fg-color:white"] {
  color: var(--paper);
}

/* ---- Headings --------------------------------------------------------- */
/* Titles of theorems, proofs and the abstract are h6; every title keeps its
   own sizes (the source's font-size in a style attribute set the level's
   size on top of the site's). */
.note-body .ltx_title {
  font-weight: 700;
}

.note-body h6.ltx_title {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
}

.note-body h2.ltx_title[style*="font-size"] {
  font-size: 1.55rem !important;
}

.note-body h3.ltx_title[style*="font-size"] {
  font-size: 1.25rem !important;
}

.note-body :is(h4, h5).ltx_title[style*="font-size"] {
  font-size: 1.08rem !important;
}

/* Division titles are the site's (left, bold, the numbers muted) whatever the
   source's class made of them (centred, small capitals); a run-in head keeps
   the source's fonts, below. */
.note-body :is(h2, h3, h4, h5).ltx_title:not(.ltx_runin) {
  text-align: left;
  font-variant-caps: normal;
}

/* The first heading of the note has nothing above it to be clear of. */
.note-body > section:first-child > :is(h2, h3):first-child,
.note-body > .ltx_abstract + section > :is(h2, h3):first-child {
  margin-top: 0;
}

/* Run-in headings (\paragraph, theorem heads, a proof's "Proof."): the head
   is inline and the first paragraph of what follows flows on after it. */
.note-body .ltx_title.ltx_runin {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-wrap: wrap;
}

.note-body .ltx_title.ltx_runin::after {
  content: " ";
}

.note-body .ltx_title.ltx_runin.ltx_font_bold {
  font-weight: 700;
}

.note-body .ltx_title.ltx_runin.ltx_font_italic {
  font-style: italic;
}

.note-body .ltx_title.ltx_runin.ltx_font_smallcaps {
  font-variant: small-caps;
}

.note-body .ltx_runin + .ltx_para,
.note-body .ltx_runin + .ltx_para > p:first-child,
.note-body .ltx_runin + p:first-child {
  display: inline;
}

/* The paragraph a run-in head is set into is inline, so its bottom margin is
   gone; the paragraph after it keeps the usual separation. */
.note-body .ltx_runin + .ltx_para + :is(.ltx_para, p) {
  margin-top: 0.85em;
}

/* A theorem's number and its name are part of the head, which is bold in the
   source (oxide marks it); the number is not the muted section number. */
.note-body .ltx_tag_theorem,
.note-body .ltx_tag_proof {
  color: inherit;
}

.note-body h6.ltx_title_abstract {
  display: inline;
  margin: 0 0.3em 0 0;
  font-size: inherit;
  font-weight: 400;
  font-variant: small-caps;
}

/* "Abstract." runs into the first sentence, as in the PDF and the live page. */
.note-body h6.ltx_title_abstract + p,
.note-body h6.ltx_title_abstract + .ltx_para {
  display: inline;
}

/* A Chinese abstract opens with a bold 摘要 on its first line. */
:lang(zh) .note-body h6.ltx_title_abstract {
  margin-right: 0.6em;
  font-weight: 700;
  font-variant-caps: normal;
}

.note-body .ltx_abstract {
  margin-bottom: 2rem;
  font-size: 1.04rem;
}

.note-body .ltx_abstract > p:last-child {
  margin-bottom: 0;
}

/* ---- Theorems and proofs ---------------------------------------------- */
.note-body .ltx_theorem,
.note-body .ltx_proof {
  margin: 1.2em 0;
}

.note-body .ltx_theorem > .ltx_para:last-child > p:last-child,
.note-body .ltx_proof > .ltx_para:last-child > p:last-child,
.note-body .ltx_theorem > .ltx_para:last-child > :is(ul, ol, dl):last-child,
.note-body .ltx_theorem > :last-child {
  margin-bottom: 0;
}

/* The proof-end mark is floated to the right margin of the proof's last line
   (`span.qed`, from oxide.py's mark_qed). When that line holds nothing else,
   as after a closing display, the proof contains the float, so the mark stays
   at the end of its own proof rather than on the next block's first line. */
.note-body .ltx_proof {
  display: flow-root;
}

/* ---- Lists ------------------------------------------------------------ */
/* oxide writes the label of an item as a text tag, with list-style-type: none
   on the item. The tag hangs left of the text in a zero-width column, right
   aligned, so labels of any width keep the text where it is. */
.note-body :is(ul, ol).ltx_itemize,
.note-body :is(ul, ol).ltx_enumerate {
  list-style: none;
  margin: 0.6em 0 1em;
  padding-left: 2em;
}

.note-body li.ltx_item {
  display: grid;
  grid-template-columns: 0 minmax(0, 1fr);
  list-style: none;
}

.note-body li.ltx_item > .ltx_tag {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  padding-right: 0.5em;
  white-space: nowrap;
}

.note-body li.ltx_item > :not(.ltx_tag) {
  grid-column: 2;
}

.note-body li.ltx_item > .ltx_para:last-child > p:last-child,
.note-body li.ltx_item > .ltx_para:last-child > :is(ul, ol, dl):last-child {
  margin-bottom: 0;
}

.note-body li.ltx_item :is(ul, ol).ltx_itemize,
.note-body li.ltx_item :is(ul, ol).ltx_enumerate {
  margin-block: 0.3em 0.4em;
}

.note-body dl.ltx_description {
  display: block;
  margin: 0.6em 0 1em;
}

.note-body dl.ltx_description > dt {
  text-align: left;
  margin-top: 0.3em;
}

.note-body dl.ltx_description > dd {
  margin: 0 0 0.3em;
}

.note-body dl.ltx_description > dd > .ltx_para:last-child > p:last-child {
  margin-bottom: 0;
}

/* ---- Displayed equations ---------------------------------------------- */
/* A display wider than the column scrolls; a soft edge shows on each side that
   has more. The edges follow the display's own scroll timeline, so a display
   that fits (no timeline) draws none; where scroll timelines are missing there
   are no edges either. */
@property --eqn-edge-l {
  syntax: "<color>";
  inherits: false;
  initial-value: transparent;
}

@property --eqn-edge-r {
  syntax: "<color>";
  inherits: false;
  initial-value: transparent;
}

@keyframes eqn-edges {
  0% {
    --eqn-edge-l: transparent;
    --eqn-edge-r: var(--edge);
  }

  8% {
    --eqn-edge-l: var(--edge);
  }

  92% {
    --eqn-edge-r: var(--edge);
  }

  100% {
    --eqn-edge-l: var(--edge);
    --eqn-edge-r: transparent;
  }
}

.note-body .ltx_eqn_scroll,
.note-body table.ltx_equation {
  --edge: color-mix(in srgb, var(--ink) 22%, transparent);
  background:
    radial-gradient(farthest-side at 0 50%, var(--eqn-edge-l), transparent) left
    center / 0.5em 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--eqn-edge-r), transparent)
    right center / 0.5em 100% no-repeat scroll;
  animation: eqn-edges linear both;
  animation-timeline: scroll(self inline);
}

/* A displayed formula is a table of three cells: padding, formula, padding,
   and a fourth with the number at the right. As the site's .eq: a flex line,
   the formula centred, the number at the right edge (and kept in view when
   the formula is wider than the column, which then scrolls). */
.note-body table.ltx_eqn_table {
  width: 100%;
  margin: 0.9em 0;
  border-collapse: collapse;
}

.note-body table.ltx_equation {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: 0.15em;
}

.note-body table.ltx_equation > tbody {
  display: block;
}

.note-body table.ltx_equation > tbody > tr {
  display: flex;
  align-items: center;
}

.note-body table.ltx_equation .ltx_eqn_cell {
  padding: 0;
}

.note-body table.ltx_equation .ltx_eqn_center_padleft,
.note-body table.ltx_equation .ltx_eqn_center_padright {
  flex: 1 1 0;
  min-width: 0;
}

.note-body
  table.ltx_equation
  .ltx_eqn_cell:not(.ltx_eqn_center_padleft, .ltx_eqn_center_padright, .ltx_eqn_eqno) {
  flex: none;
}

.note-body table.ltx_equation .ltx_eqn_eqno {
  flex: none;
  position: sticky;
  right: 0;
  padding-left: 1.5em;
  background: var(--paper);
}

/* ...and a number at the left stays at the left edge of a wide formula. */
.note-body table.ltx_equation .ltx_eqn_eqno.ltx_align_left {
  right: auto;
  left: 0;
  padding-right: 1.5em;
  padding-left: 0;
}

.note-body .ltx_eqn_eqno {
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

/* Equations that line up (align, gather, multline, eqnarray): a table, whose
   rows share their columns. The number hangs out of the last cell, as
   LaTeXML.css has it. */
/* oxide.py puts each group in div.ltx_eqn_scroll: wider than the column, the
   table keeps the width its rows need and the div scrolls. */
.note-body .ltx_eqn_scroll {
  margin: 0.9em 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.note-body table.ltx_equationgroup {
  display: table;
  margin: 0;
}

.note-body table.ltx_equationgroup .ltx_eqn_cell {
  padding: 0.12em 0;
  vertical-align: middle;
}

.note-body table.ltx_equationgroup .ltx_align_baseline {
  vertical-align: baseline;
}

.note-body table.ltx_equationgroup .ltx_eqn_cell.ltx_align_left,
.note-body table.ltx_equationgroup .ltx_eqn_cell.ltx_align_right,
.note-body table.ltx_equationgroup .ltx_eqn_cell.ltx_align_center {
  white-space: nowrap;
}

.note-body table.ltx_equationgroup .ltx_eqn_center_padleft,
.note-body table.ltx_equationgroup .ltx_eqn_center_padright {
  width: 50%;
  min-width: 1em;
}

.note-body table.ltx_equationgroup .ltx_eqn_left_padleft,
.note-body table.ltx_equationgroup .ltx_eqn_right_padright {
  min-width: 1em;
}

.note-body table.ltx_equationgroup .ltx_eqn_left_padright,
.note-body table.ltx_equationgroup .ltx_eqn_right_padleft {
  width: 100%;
}

.note-body
  table.ltx_eqn_align
  tr.ltx_equation
  td.ltx_align_left
  + td.ltx_align_right,
.note-body
  table.ltx_eqn_align
  tr.ltx_equation
  td.ltx_align_left
  + td.ltx_align_center,
.note-body
  table.ltx_eqn_align
  tr.ltx_equation
  td.ltx_align_center
  + td.ltx_align_right,
.note-body
  table.ltx_eqn_align
  tr.ltx_equation
  td.ltx_align_center
  + td.ltx_align_center {
  padding-left: 2.5em;
}

.note-body table.ltx_equationgroup .ltx_eqn_eqno {
  width: 0;
  max-width: 0;
  padding: 0;
  overflow: visible;
}

.note-body table.ltx_equationgroup .ltx_eqn_eqno .ltx_tag {
  float: right;
}

/* A number at the left (leqno) hangs the other way: floated right it would
   leave the table and be cut off by div.ltx_eqn_scroll. */
.note-body table.ltx_equationgroup .ltx_eqn_eqno.ltx_align_left .ltx_tag {
  float: left;
}

/* A table of equations inside a narrow box (a cell, a minipage) scrolls in it. */
.note-body .ltx_inline-block table.ltx_eqn_table,
.note-body .ltx_td table.ltx_eqn_table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.note-body math.ltx_Math {
  font-size: 1em;
}

/* ---- Bibliography and citations ---------------------------------------- */
.note-body section.ltx_bibliography {
  font-size: 0.95rem;
  line-height: 1.5;
}

.note-body ul.ltx_biblist {
  list-style: none;
  margin: 0.6em 0 1em;
  padding: 0;
}

/* The labels share a column as wide as the longest label, then the entry, as
   the live page has it (dl.thebibliography is a grid of max-content and 1fr). */
.note-body ul.ltx_biblist:has(> li.ltx_bibitem > .ltx_bibbody) {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 0.7em;
}

.note-body li.ltx_bibitem {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  padding: 0.15em 0;
  margin-top: 0.35em;
  list-style: none;
}

/* The label sits right-aligned in its column; the blocks of the reference run
   on after each other, as the entry is set in the PDF. */
.note-body li.ltx_bibitem > .ltx_tag {
  text-align: right;
  white-space: nowrap;
}

.note-body li.ltx_bibitem > .ltx_bibbody {
  min-width: 0;
}

.note-body .ltx_bibblock {
  display: inline;
}

/* Where the Cited-by links and External Links of a reference go: a line of
   their own, quiet. */
.note-body .ltx_bibblock.ltx_bib_cited,
.note-body .ltx_bibblock:has(> .ltx_bib_links) {
  display: block;
  color: var(--muted);
  font-size: 0.9em;
}

.note-body .ltx_bib_title,
.note-body .ltx_bib_journal {
  font-style: italic;
}

.note-body .ltx_bib_article .ltx_bib_title {
  font-style: normal;
}

.note-body .ltx_bib_volume {
  font-weight: 700;
}

/* A biblatex bibliography is laid out as standard.bbx prints it: quoted or
   plain titles, emphasised ones in <em>, the volume and the label regular. */
.note-body .ltx_bib_standard .ltx_bib_title,
.note-body .ltx_bib_standard .ltx_bib_journal {
  font-style: normal;
}

.note-body .ltx_bib_standard .ltx_bib_volume,
.note-body .ltx_bib_standard li.ltx_bibitem > .ltx_tag {
  font-weight: inherit;
}

/* Emphasis inside an emphasised title turns upright, as \emph does. */
.note-body .ltx_bib_standard em em {
  font-style: normal;
}

.note-body li.ltx_bibitem:target {
  background: color-mix(in srgb, var(--ink) 14%, var(--paper));
}

.note-body a.ltx_url,
.note-body a.ltx_href {
  overflow-wrap: anywhere;
}

/* ---- Figures, tables, pictures ----------------------------------------- */
.note-body figure.ltx_figure,
.note-body figure.ltx_table,
.note-body figure.ltx_float {
  margin: 1.4em 0;
  text-align: center;
}

.note-body .ltx_caption {
  margin-top: 0.5em;
  font-size: 0.95rem;
  line-height: 1.45;
}

.note-body .ltx_tag_figure,
.note-body .ltx_tag_table,
.note-body .ltx_tag_float {
  font-weight: 700;
}

/* Subfigures: a row of cells that share the width, then the common caption. */
.note-body .ltx_flex_figure {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.note-body .ltx_flex_cell {
  flex: 1 1 0;
  min-width: 0;
}

.note-body .ltx_flex_cell.ltx_flex_size_1 {
  flex-basis: 100%;
}

.note-body .ltx_flex_break {
  flex-basis: 100%;
  height: 0;
}

.note-body .ltx_flex_cell figure.ltx_figure {
  margin: 0;
}

.note-body img.ltx_graphics {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* A tabular inside a formula (a Young tableau in text) is written in spans;
   they get the table layout the elements would have, as LaTeXML.css gives them. */
.note-body span.ltx_tabular {
  display: inline-table;
  border-collapse: collapse;
  text-indent: 0;
}

.note-body span.ltx_tabular > :is(.ltx_thead, .ltx_tbody, .ltx_tfoot) {
  display: table-row-group;
}

.note-body span.ltx_tabular .ltx_tr {
  display: table-row;
}

.note-body span.ltx_tabular .ltx_tr > :is(.ltx_td, .ltx_th) {
  display: table-cell;
}

/* Between the column pairs of an align, amsmath leaves space; the empty cell
   after a pair's right column carries it. */
.note-body
  table.ltx_eqn_align
  td.ltx_td.ltx_eqn_cell
  + td.ltx_td.ltx_eqn_cell:empty {
  padding-left: 1.5em;
}

/* A box or a diagram inside a formula is as wide as its content: a percentage
   would be of the formula's shrink-to-fit width and squeeze the drawing. */
.note-body mtext .ltx_inline-block,
.note-body mtext .diagram,
.note-body mtext .diagram svg {
  max-width: none;
}

/* Tabulars: rules are the text's colour, a double rule is a double line. */
.note-body table.ltx_tabular {
  display: inline-table;
  margin: 0;
  text-indent: 0;
}

/* A centred table is a block that is as wide as its rows (anonymous table
   inside), so it can scroll in the column when they are wider. */
.note-body table.ltx_tabular.ltx_centering {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 1em auto;
  overflow-x: auto;
}

.note-body table.ltx_tabular .ltx_td,
.note-body table.ltx_tabular .ltx_th {
  padding: 0.12em 0.55em;
}

.note-body table.ltx_tabular .ltx_th {
  font-weight: inherit;
}

.note-body table.ltx_tabular .ltx_td.ltx_align_left,
.note-body table.ltx_tabular .ltx_th.ltx_align_left,
.note-body table.ltx_tabular .ltx_td.ltx_align_right,
.note-body table.ltx_tabular .ltx_th.ltx_align_right,
.note-body table.ltx_tabular .ltx_td.ltx_align_center,
.note-body table.ltx_tabular .ltx_th.ltx_align_center {
  white-space: nowrap;
}

.note-body table.ltx_tabular .ltx_wrap,
.note-body table.ltx_tabular .ltx_align_justify {
  white-space: normal;
}

.note-body table.ltx_tabular .ltx_nopad_l {
  padding-left: 0;
}

.note-body table.ltx_tabular .ltx_nopad_r {
  padding-right: 0;
}

.note-body .ltx_border_t {
  border-top: 1px solid currentColor;
}

.note-body .ltx_border_r {
  border-right: 1px solid currentColor;
}

.note-body .ltx_border_b {
  border-bottom: 1px solid currentColor;
}

.note-body .ltx_border_l {
  border-left: 1px solid currentColor;
}

.note-body .ltx_border_tt {
  border-top: 3px double currentColor;
}

.note-body .ltx_border_rr {
  border-right: 3px double currentColor;
}

.note-body .ltx_border_bb {
  border-bottom: 3px double currentColor;
}

.note-body .ltx_border_ll {
  border-left: 3px double currentColor;
}

.note-body .ltx_border_T {
  border-top: 1px solid var(--rule);
}

.note-body .ltx_border_R {
  border-right: 1px solid var(--rule);
}

.note-body .ltx_border_B {
  border-bottom: 1px solid var(--rule);
}

.note-body .ltx_border_L {
  border-left: 1px solid var(--rule);
}

/* \fbox, mdframed, framed: a box of the text's colour. */
.note-body span.ltx_framed {
  display: inline-block;
  text-indent: 0;
}

.note-body .ltx_framed_rectangle {
  border: 1px solid currentColor;
}

.note-body .ltx_framed_top {
  border-top: 1px solid currentColor;
}

.note-body .ltx_framed_left {
  border-left: 1px solid currentColor;
}

.note-body .ltx_framed_right {
  border-right: 1px solid currentColor;
}

.note-body .ltx_framed_bottom,
.note-body .ltx_framed_underline {
  border-bottom: 1px solid currentColor;
}

.note-body .ltx_framed_topbottom {
  border-block: 1px solid currentColor;
}

.note-body .ltx_framed_leftright {
  border-inline: 1px solid currentColor;
}

.note-body div.ltx_framed,
.note-body figure.ltx_framed {
  margin: 1.2em 0;
  padding: 0.5em 1em;
}

.note-body div.ltx_framed > :first-child,
.note-body div.ltx_framed > .ltx_theorem:first-child {
  margin-top: 0;
}

.note-body div.ltx_framed > :last-child,
.note-body div.ltx_framed .ltx_para:last-child > p:last-child {
  margin-bottom: 0;
}

/* ---- Quotes, code ------------------------------------------------------- */
.note-body blockquote.ltx_quote {
  margin: 1em 0 1em 2em;
  padding: 0;
}

.note-body .ltx_verbatim {
  font-family: var(--mono);
  font-size: 0.9em;
  white-space: pre;
}

.note-body .ltx_listing {
  display: block;
  margin: 1em 0;
  padding: 0.5em 0.8em;
  overflow-x: auto;
  overflow-y: hidden;
  text-align: left;
  font-family: var(--mono);
  background: color-mix(in srgb, var(--text) 5%, var(--paper));
  border-left: 2px solid var(--rule);
  /* The lines are spans of the listing's own size (a style attribute sets
     their size); the line box need only hold them. */
  line-height: 0.9;
}

.note-body figure.ltx_float.ltx_lstlisting {
  text-align: left;
}

.note-body .ltx_listingline {
  white-space: pre;
  min-height: 1em;
}

.note-body .ltx_lst_space {
  white-space: pre;
}

.note-body .ltx_listing .ltx_tag {
  color: var(--muted);
  margin-right: 1em;
}

/* Notes in the margin and others the page cannot put in a margin: inline. */
.note-body .ltx_note {
  display: inline;
}

.note-body .ltx_note_content {
  display: inline;
  color: var(--muted);
  font-size: 0.9em;
}

.note-body .ltx_note_content::before {
  content: "[";
}

.note-body .ltx_note_content::after {
  content: "]";
}

.note-body .ltx_note_mark,
.note-body .ltx_note_type {
  color: inherit;
  font-weight: 400;
}

/* ---- Pictures (tikz, tikz-cd, xy) ---------------------------------------- */
/* A picture is an svg whose labels are HTML and MathML in foreignObjects, in
   the page's fonts. oxide.py sizes the svg in em and each label in the pixels
   TeX measured it in, so a label's box holds it and it is centred in it.
   Nothing a label sets may be clipped, and the page's hyphenation, line height
   and indent are not a picture's. A tikz-cd in a formula is not wrapped in
   span.diagram, so the label rules are on the svg. */
.note-body .diagram {
  vertical-align: baseline;
  hyphens: manual;
  overflow-wrap: normal;
  text-indent: 0;
}

/* The display diagram scrolls sideways when it is wider than the column, which
   clips what a label sets beyond the svg's box above and below; the padding
   leaves room for it. */
.note-body .diagram--display {
  margin-block: 0;
  padding-block: 0.6em;
  text-align: center;
}

.note-body svg.ltx_picture {
  overflow: visible;
}

/* A display picture wider than the column is scaled down to it (the labels
   are in the svg's user space and scale with it) instead of scrolling. */
.note-body .diagram--display svg {
  max-width: 100%;
  height: auto;
}

.note-body svg.ltx_picture foreignobject {
  overflow: visible;
  line-height: 1.1;
  text-align: left;
  text-indent: 0;
  overflow-wrap: normal;
  hyphens: none;
  color: inherit;
}

.note-body svg.ltx_picture foreignobject > .ltx_foreignobject_container {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.note-body svg.ltx_picture foreignobject .ltx_foreignobject_content {
  display: block;
  white-space: nowrap;
  overflow: visible;
}

/* A label that is a text-width box (a minipage, a paragraph) wraps. */
.note-body
  svg.ltx_picture
  foreignobject .ltx_foreignobject_content:has(.ltx_minipage, .ltx_parbox, .ltx_p) {
  white-space: normal;
}

.note-body
  svg.ltx_picture
  foreignobject .ltx_foreignobject_container:has(.ltx_minipage) {
  align-items: start;
}

.note-body svg.ltx_picture foreignobject p,
.note-body svg.ltx_picture foreignobject .ltx_p {
  margin: 0;
  padding: 0;
  display: block;
}

.note-body svg.ltx_picture math {
  font-size: 1em;
}
