/* Variables */
:root {
  --main-width: 52rem;
  --main-width-margin: 54rem;
  /* fonts */
  --headings-font-family: "Noto Sans", "Noto Sans Fallback", sans-serif;
  --text-font-family: "Noto Serif", "Noto Serif Fallback", serif;
  --math-font-family: "latin modern math", "Cambria Math", math;
  /* Should we do anything special for caligraphic?
     e.g. "Lucida Calligraphy","Zapf Chancery","URW Chancery L", TeX Gyre Termes...*/
  --math-caligraphic-font-family: "latin modern math", "Cambria Math", math;
  --code-font-family: "Noto Sans Mono", "Noto Sans Mono Fallback", monospace;
  --svg-text-size: 0.82em;
  /* default color theme is light */
  --background-color: white;
  --text-color: #292929;
  --border-color: #292929;
  --border-light-color: grey;
  --image-color: black;
  --image-background-color: white;
  --link-text-color: #212121;
  --email-link-color: #026ecb;
  --note-mark-color: #026ecb;
  --note-highlight-color: #ffffd4;
  --info-text-color: #01719d;
  --warning-text-color: #d09e05;
  --error-text-color: #d8000c;
  --fatal-text-color: var(--error-text-color);
  --index-ref-color: var(--email-link-color); 
}
img {
  filter: none;
  background-color: var(--image-background-color);
  color: var(--image-color);
}
/* Custom author-specified colors from the LaTeX source: */
[style*="--ltx-fg-color:"] {
  --text-color: var(--ltx-fg-color);
  color: var(--text-color);
}
/* The :root rule does not appear to propagate color: into SVG foreignObject */
.ltx_foreignobject_content {
  color: var(--text-color);
}
[style*="--ltx-bg-color:"] {
  --background-color: var(--ltx-bg-color);
  background-color: var(--background-color);
}
[style*="--ltx-border-color:"] {
  --border-color: var(--ltx-border-color);
  border-color: var(--border-color);
}
[style*="--ltx-fill-color:"] {
  fill: var(--ltx-fill-color);
}
[style*="--ltx-stroke-color:"] {
  stroke: var(--ltx-stroke-color);
}

/* Dark theme */
/* Help from design-minded enthusiasts is most welcome! */
[data-theme="dark"] {
  --background-color: #0d1117;
  --text-color: #c9d1d9;
  --border-color: #c9d1d9;
  --border-light-color: #d4d4d4;
  --link-text-color: #c9d1d9;
  --email-link-color: darkcyan;
  --note-mark-color: #daa002;
  --note-highlight-color: #231d02;
  /* TODO: consider dedicated info, warning and fatal colors*/
  --error-text-color: #d52f36;
  /* keep <img> images in "light theme", as transparent PNGs
    get generated by latexml with a light theme expectation. */
  --image-color: #292929;
  --image-background-color: white;
}
[data-theme="dark"] img {
  filter: brightness(0.8) contrast(1.2);
  background-color: var(--image-background-color);
  color: var(--image-color);
}
/* add a bit of padding due to keeping the original background color,
   otherwise we get a sharp transition at the SVG edges in dark mode. */
[data-theme="dark"] svg.ltx_picture {
  padding: 0.33rem;
}

/* We define a color-map set of functions for author-specified custom colors.
  Anchored at the 5 CSS custom properties introduced with LaTeXML v0.9.0

  Tactic: generally a single uniform adjustment over 25,000 distinct colors can always succeed.
  We have to decide between pragmatic trade-offs; In this case we choose to preserve hue and chroma
  and adjust lightness to ensure sufficient contrast against a dark background.
  
  We use HSL as the fallback option that is Baseline "Widely available" in 2025.
  When okchl() is available - newer - we use it instead, as it is more perceptually uniform. */

@supports (color: oklch( calc(1 - 0.5) 0.1 250)) {
  [data-theme="dark"] [style*="--ltx-fg-color:"] {
    --text-color:  oklch(from var(--ltx-fg-color) calc(1 - 0.7 * l) c h);
    color: var(--text-color);
  }
  [data-theme="dark"] [style*="--ltx-bg-color:"] {
    --background-color: oklch(from var(--ltx-bg-color) calc(1 - 0.8237 * l) c h);
    background-color: var(--background-color);
  }
  [data-theme="dark"] [style*="--ltx-border-color:"] {
    --border-color: oklch(from var(--ltx-border-color) calc(1 - 0.7 * l) c h);
    border-color: var(--border-color);
  }
  [data-theme="dark"] [style*="--ltx-fill-color:"] {
    --fill-color: hsl(from var(--ltx-fill-color) h s calc(107 - l));
    fill: var(--fill-color)
  }
  [data-theme="dark"] [style*="--ltx-stroke-color:"] {
    --stroke-color: hsl(from var(--ltx-stroke-color) h s calc(100 - l));
    stroke: var(--stroke-color);
  }
}
@supports not (color: oklch(calc(1 - 0.5) 0.1 250)) {
  [data-theme="dark"] [style*="--ltx-fg-color:"] {
    --text-color: hsl(from var(--ltx-fg-color) h s calc(100 - l));
    color: var(--text-color);
  }
  [data-theme="dark"] [style*="--ltx-bg-color:"] {
    --background-color: hsl(from var(--ltx-bg-color) h s calc(107 - l));
    background-color: var(--background-color);
  }
  [data-theme="dark"] [style*="--ltx-border-color:"] {
    --border-color: hsl(from var(--ltx-border-color) h s calc(100 - l));
    border-color: var(--border-color);
  }
  [data-theme="dark"] [style*="--ltx-fill-color:"] {
    --fill-color: hsl(from var(--ltx-fill-color) h s calc(107 - l));
    fill: var(--fill-color)
  }
  [data-theme="dark"] [style*="--ltx-stroke-color:"] {
    --stroke-color: hsl(from var(--ltx-stroke-color) h s calc(100 - l));
    stroke: var(--stroke-color);
  }
}
/* The :root rule does not appear to propagate color: into SVG foreignObject */
[data-theme="dark"] .ltx_foreignobject_content {
  color: var(--text-color);
}
/* Special hand-crafted case: \color{black} is the most common use, so hand-curate to match
   the main foreground color in dark mode.
   TODO: This color should be a design token name eventually */
[data-theme="dark"] [style*="--ltx-fg-color:#000000;"] {
  --text-color: #c9d1d9;
  color: var(--text-color);
}

/* Main content */
body {
  margin: 0;
  height: 100%;
  width: 100%;
  color: var(--text-color);
  background-color: var(--background-color);
}

.ltx_page_main {
  width: 100%;
}
.ltx_page_content {
  margin: 4rem 1rem;
  font-size: 1rem;
  font-weight: 300;
  clear: both;
}
.ltx_page_header {
  border-bottom: 0.1em solid;
  margin-bottom: 0.5em;
}
.ltx_page_footer {
  clear: both;
  text-align: right;
  width: auto;
  margin: auto;
  border-top: 0.1em solid;
  max-width: var(--main-width);
}
.ltx_page_logo {
  font-family: var(--text-font-family);
  font-size: 1rem;
  text-align: right;
  padding: 0.5rem;
}
.ltx_page_logo > a {
  /* eLife-like links */
  border-bottom: 0.063rem dotted var(--link-text-color);
  color: var(--link-text-color);
  text-decoration: none;
  overflow-wrap: break-word;
}

.ltx_page_header:after,
.ltx_page_footer:after,
.ltx_page_content:after {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}
.ltx_page_footer:before {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

.ltx_document {
  margin: auto;
  max-width: var(--main-width);
  margin-top: 2rem;
  text-rendering: optimizeLegibility;
}

.ltx_para,
.ltx_abstract .ltx_p,
.ltx_acknowledgements {
  font-family: var(--text-font-family);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  line-height: 1.5rem;
  margin-bottom: 1.5rem;
}
/* If a flex figure comes before the para, avoid collisions.
   (note: avoid doing clear:both; for all paragraphs, or it creates needless
    vertical whitespace in cases where we have footnotes) */
.ltx_figure + .ltx_para,
.ltx_flex_figure + .ltx_para {
  clear: both;
}

.ltx_p {
  line-height: 1.5rem;
  /* by default, p doesn't indent */
  text-indent: 0rem;
  white-space: normal;
  /* no top margin, stay snug with titles */
  margin-top: 0rem;
}
.ltx_text {
  font-family: var(--text-font-family);
  word-wrap: break-word;
}
.ltx_tag .ltx_text {
  font-family: inherit;
}
/* explicit control of indentation (on ltx_para) */
.ltx_indent > .ltx_p:first-child,
section.ltx_pruned_first > .ltx_title + .ltx_para > .ltx_p,
section.ltx_indent_first > .ltx_title + .ltx_para > .ltx_p {
  text-indent: 2em !important;
}
.ltx_noindent > .ltx_p:first-child {
  text-indent: 0rem !important;
}

.ltx_pagination.ltx_role_newpage {
  /* use margins to ensure newpage breaks, to avoid stacking heights in cases where it is used after logical blocks */
  margin-top: 2rem;
  display: block;
}

math,
mjx-container {
  font-family: var(--math-font-family);
  word-wrap: break-word;
  white-space: nowrap;
}
/* add some padding to math table cells, e.g. space out cells with fractions */
mtd {
  padding: 0.1rem;
}
/* Sometimes .ltx_markedasmath may contain an actual math element
   with a textual trailing dot, say in a <td> (1910.08129)
   avoid breaks in those cases */
.ltx_markedasmath {
  white-space: nowrap;
}

/* eLife-like links */
.ltx_ref {
  border-bottom: 0.063rem dotted var(--link-text-color);
  color: var(--link-text-color);
  text-decoration: none;
  overflow-wrap: break-word;
}
/* can contain images, see orcid icons at arxiv:1707.04393 */
.ltx_ref > .ltx_graphics {
  border-bottom: none;
  display: inline;
}

.ltx_cite {
  font-style: normal;
}
.ltx_cite + .ltx_cite {
  padding-left: 0.2rem;
}
.ltx_td .ltx_cite {
  white-space: pre-wrap;
}
/* paper over: disable italic that slipped into inline cites */
.ltx_cite .ltx_font_italic {
  font-style: normal;
}
.ltx_cite > .ltx_ref {
  white-space: nowrap;
  /* why inline-block with a custom line height?
    cites separated with text nodes holding semicolons
    get spaced out too far with the "justified" text alignment.
    example: see the three cites at the beginning of 2006.09882's Introduction

    These are also interpreted slightly differently on different browsers...
    Maybe a better approach exists? */
  display: inline-block;
  line-height: 1.4rem;
  /* see the introduction at 1810.10704 for why text-indent needs to be 0 */
  text-indent: 0;
}

/* title page image */
article > div:not(.ltx_minipage) > img:first-of-type {
  max-width: 30rem;
  width: auto;
  height: auto;
}

.ltx_title.ltx_title_document {
  font-weight: normal;
  /* !important is needed since arXiv customizations on title size are not */
  /* completely accurate in latexml yet, so we keep a predictably nice-looking size for now. */
  font-size: 1.7rem !important;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.ltx_subtitle {
  font-family: var(--headings-font-family);
  font-style: italic;
  font-size: 1.3rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.ltx_subtitle .ltx_text {
  font-family: inherit;
}
.ltx_authors {
  display: flex;
  flex-flow: row wrap;
  width: auto;
  justify-content: center;
  align-items: center;
  object-fit: contain;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  text-align: center;
}
span.ltx_personname {
  font-family: var(--text-font-family);
  font-size: 1rem;
  display: inline-block;
  overflow-wrap: break-word;
  min-width: calc(0.27 * var(--main-width));
  max-width: calc(0.65 * var(--main-width));
}
span.ltx_personname span:first {
  font-size: 1.5rem;
}
span.ltx_personname br.ltx_break {
  margin-top: 0.25rem;
}
span.ltx_personname > br.ltx_break + span {
  display: inline-block;
  padding-top: 0.75em;
}
/* Try to limit the spacing via consequtive breaks in personname.
  It doesn't usually translate to good HTML rendering (0709.4011). */

span.ltx_personname > .ltx_break + .ltx_break {
  display: none;
}
/* The person name metadata is not the best place to do math-based scripted "dagger" marks.
   The precise sizing tricks for PDF don't really work well in HTML. Ignore them.
   see arXiv:2006.13760 */
.ltx_personname math mtext[mathsize] {
  font-size: inherit !important;
}

/* also avoid paragraphs that just contain a break, our CSS margins can be trusted. */
.ltx_para > .ltx_break:first-child:last-child {
  display: none;
}

.ltx_creator {
  flex: 1 1 0px;
  max-width: 100%;
  padding: 0.5rem;
  overflow-wrap: break-word;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto;
  align-items: center;
  object-fit: contain;
}
.ltx_creator br.ltx_break {
  flex-basis: 100%;
  height: 0;
}
/* do we want to display commas? */
.ltx_author_before,
.ltx_author_after {
  display: none;
}
.ltx_dates {
  margin-top: 0rem;
  margin-bottom: 1rem;
  text-align: center;
  font-family: var(--text-font-family);
}
.ltx_role_author + .ltx_role_author {
  margin-left: 2rem;
}
/* space out affiliation sub-entries */
.ltx_affiliation_institution,
.ltx_affiliation_department,
.ltx_affiliation_country {
  margin-left: 0.25rem;
  margin-right: 0.25rem;
  white-space: nowrap;
}

/* Sometimes current latexml will deposit a single address that applies to all author names
   as a child inside the last author's .ltx_creator element.
   We detect this case and break out the address to full width, makign it more suggestive that
   it applies to all of the authors. Ideally latexml's schema should evolve to handle this
   via differently organized markup. 

   Tested with 2201.00244, 1109.5581
*/
.ltx_authors:not(:has(> *:not(:last-child) .ltx_role_address)) :last-child.ltx_role_address,
.ltx_authors:not(:has(> *:not(:last-child) .ltx_role_affiliation)) :last-child.ltx_role_affiliation {
    position: absolute;
    display: block;
    margin: 2rem auto;
    text-align: center;
    width: var(--main-width);
    left: calc((100vw - var(--main-width)) / 2);
}
.ltx_authors:not(:has(> *:not(:last-child) .ltx_role_address)):has( :last-child.ltx_role_address),
.ltx_authors:not(:has(> *:not(:last-child) .ltx_role_affiliation)):has( :last-child.ltx_role_affiliation) {
  margin-bottom: 4rem;
}

/* in multi-affiliation markup, e.g. produced by authblk.sty,
   we can do a vertical stack for each author */
/* Detail: avoid vertical breaks for the case in which affiliations are notes */
span.ltx_role_affiliation:not(.ltx_note)
  + span.ltx_role_affiliation:not(.ltx_note),
span.ltx_role_orcid + span.ltx_role_affiliation:not(.ltx_note) {
  margin-top: 0.5rem;
  display: block;
}

/* sometimes ltx_keywords only contains a single text node */
/* and we can't write a selector for ".ltx_keywords that only has text" via CSS...
   so just fix the completely empty buggy case */
div.ltx_keywords:empty:before {
  content: "Keywords: ";
  font-weight: bold;
}
.ltx_keywords,
.ltx_classification {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-family: var(--text-font-family);
  font-weight: normal;
}
/* classification and keyword titles can have the same appearance
   as unified frontmatter metadata is less bumpy to read through. */
.ltx_title.ltx_title_keywords,
.ltx_title.ltx_title_classification {
  display: inline;
  font-size: 1rem;
  font-weight: bold;
  font-style: normal;
}
/* Two-column papers may want to choose their break-points in titles,
  yet the browser can manage on its own in single-column ar5iv.
  Example: section headings of 1701.00123 */
.ltx_title > br.ltx_break {
  display: none;
}

/* TODO: Untested */
.ltx_date {
  font-family: var(--text-font-family);
  text-align: center;
  font-size: 120%;
  margin: 0.5em 0 0.5em 0;
}

/* Mainmatter Footnotes */
.ltx_note {
  position: relative;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  word-spacing: -0.05rem;
  font-style: normal;
  font-size: 0.85em;
}
.ltx_note + .ltx_note {
  padding-left: 0.2rem;
}
/* the mark is in "em", but the outer note is in "rem",
  as we have a unified footnote presentation */
.ltx_note_outer {
  font-size: 0.85rem;
}
.ltx_note > .ltx_note_mark {
  position: relative;
  top: -0.2em;
  max-height: 2rem;
  font-size: 0.85em;
  color: var(--note-mark-color);
}

.ltx_note_content {
  display: block;
  opacity: 100;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin: 0.6rem;
  font-family: var(--text-font-family);
  line-height: 1.5rem;
  white-space: normal;
  overflow-wrap: break-word;
  /* getting some rather unpleasant horizontal scroll on Chrome on large screens,
   likely due to the way footnotes get laid out? Upgrade ideas welcome.
   See arXiv:1004.5196, footnote 6 */
  overflow-x: auto;
}
.ltx_author_notes {
  display: block;
  opacity: 100;
  /* The flex experiment here is trying to contain the width to the current flex block,
     but allow the note to expand to the full page width if it is standalone/single author */
  width: fit-content;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  font-family: var(--text-font-family);
  font-size: 0.9rem;
  padding: 0.2rem;
}

/* responsive footnote viewport widths */
@media only screen and (max-width: 46rem) {
  .ltx_note_outer {
    width: 20rem;
  }
}
@media only screen and (min-width: 46.01rem) and (max-width: 51.99rem) {
  .ltx_note_outer {
    width: 46rem;
  }
}
@media only screen and (min-width: 52rem) and (max-width: 95.99rem) {
  .ltx_note_outer {
    width: 50rem;
  }
}
@media only screen and (min-width: 96rem) and (max-width: 108.99rem) {
  .ltx_note_outer {
    width: 20rem;
    margin-right: -24rem;
  }
}
@media only screen and (min-width: 109rem) {
  .ltx_note_outer {
    width: 27rem;
    margin-right: -31rem;
  }
}

/* responsive footnote UI */

/* small screens */
@media only screen and (max-width: 95.99rem) {
  .ltx_note_outer {
    display: none;
    opacity: 0;
  }
  .ltx_note_content {
    overflow-wrap: break-word;
    width: 90%;
  }
  .ltx_note:not(.ltx_note_frontmatter):not(.ltx_role_affiliationmark):not(
      .ltx_role_footnotemark
    ):hover
    > .ltx_note_outer,
  .ltx_note:not(.ltx_note_frontmatter):not(.ltx_role_affiliationmark):not(
      .ltx_role_footnotemark
    ):active
    > .ltx_note_outer {
    display: block;
    opacity: 100;
    z-index: 100;
    position: absolute;
    top: 0;
    margin: auto;
    padding: 2rem;
    background-color: var(--background-color);
    border-width: 0.1rem 0;
    border-bottom: double;
    border-top: double;
  }
  /* Frontmatter notes: Author notes, Affiliation notes, Preprint notes
     get a standalone line in small-screen mode. */
  .ltx_note.ltx_note_frontmatter {
    display: block;
    opacity: 100;
    opacity: inherit;
    text-align: left;
  }
  .ltx_note.ltx_note_frontmatter > .ltx_note_mark {
    display: none;
    opacity: 0;
  }
  .ltx_note.ltx_note_frontmatter .ltx_note_outer {
    display: block;
    opacity: 100;
    opacity: inherit;
  }
  .ltx_note.ltx_note_frontmatter .ltx_note_content {
    border: none;
    margin-left: 0px;
  }
  .ltx_note.ltx_note_frontmatter .ltx_note_content > .ltx_note_mark {
    display: inline;
  }
  /* similarly for notes left stranded in the top-level authors container */
  .ltx_authors > .ltx_note .ltx_note_mark {
    display: none;
    opacity: 0;
  }
}

/* Exceptions aside, large screens get footnotes
   displayed in the right margin of the article. */
@media only screen and (min-width: 96rem) {
  .ltx_note_outer {
    display: block;
    opacity: 100;
    position: relative;
    clear: both;
    float: right;
    padding-bottom: 2rem;
    padding-right: 3rem;
  }
  .ltx_note_content {
    border-style: double none none none;
    border-width: 0.1rem 0;
  }
  .ltx_note_content > .ltx_note_mark {
    position: absolute;
    display: block;
    opacity: 100;
    margin-top: -1.8rem;
  }
  /* highlight feature: */
  .ltx_note > .ltx_note_mark:hover + .ltx_note_outer .ltx_note_content,
  .ltx_note > .ltx_note_mark:active + .ltx_note_outer .ltx_note_content,
  /* special case: affiliation in title */
  .ltx_title.ltx_title_document > .ltx_role_affiliation > .ltx_note_mark:hover + .ltx_note_outer .ltx_note_content,
  .ltx_title.ltx_title_document > .ltx_role_affiliation > .ltx_note_mark:active + .ltx_note_outer .ltx_note_content,
  /* special case: badly formatted author notes without inner markup */
  .ltx_author_notes > .ltx_note > .ltx_note_mark:hover + .ltx_note_outer .ltx_note_content,
  .ltx_author_notes > span > .ltx_note > .ltx_note_mark:hover + .ltx_note_outer .ltx_note_content {
    background-color: var(--note-highlight-color);
    z-index: 100;
  }
  /* affiliatons have some weirdness... e.g. if they appear in titles, they're special footnotes */
  .ltx_title.ltx_title_document .ltx_note_outer {
    display: block;
    opacity: 100;
  }
  .ltx_title.ltx_title_document .ltx_note_type {
    display: none;
    opacity: 0;
  }
  /* TODO:
1. Until we can dedup affiliations, we have no choice but to hide them first, show them on hover.
  Even on large screens.
2. AND! footnotes in Tables are ALWAYS collapsed
  until we figure out side margins with
  relative positioning in tables (flexbox?)
3. a related issue to the in-table footnotes appears also in figcaptions
  since we are currently using flex for them, the relative margin-right offset
  in the rule below produces rather unpredictable results, placing the footnotes
  somewhat scattered, based on the current width of the figcaption.
  So we also collapse in figcaption for now...
4. the "PSFrag replacing x by y was dropped" notes are also distracting,
   e.g. cs/0001008 (not acted on here)
*/
  th .ltx_note_outer,
  td .ltx_note_outer,
  .ltx_th .ltx_note_outer,
  .ltx_td .ltx_note_outer,
  figcaption .ltx_note_outer,
  .ltx_role_affiliation > .ltx_note_outer,
  .ltx_author_notes > .ltx_note .ltx_note_outer,
  .ltx_author_notes > span > .ltx_note .ltx_note_outer {
    display: none;
    opacity: 0;
  }
  th .ltx_note_content,
  td .ltx_note_content,
  figcaption .ltx_note_content {
    font-weight: normal;
    overflow-wrap: break-word;
    width: 90%;
  }
  th .ltx_note:hover > .ltx_note_outer,
  th .ltx_note:active > .ltx_note_outer,
  .ltx_th .ltx_note:hover > .ltx_note_outer,
  .ltx_th .ltx_note:active > .ltx_note_outer,
  td .ltx_note:hover > .ltx_note_outer,
  td .ltx_note:active > .ltx_note_outer,
  .ltx_td .ltx_note:hover > .ltx_note_outer,
  .ltx_td .ltx_note:active > .ltx_note_outer,
  figcaption .ltx_note:hover > .ltx_note_outer,
  figcaption .ltx_note:active > .ltx_note_outer {
    display: block;
    opacity: 100;
    z-index: 100;
    position: absolute;
    top: 0;
    margin: auto;
    padding: 2rem;
    background-color: var(--background-color);
    border-width: 0.1rem 0;
    border-bottom: double;
    border-top: double;
  }
  /* affiliations may still pop-up in the side margin,
     looks a bit better in the title page */
  .ltx_role_affiliation > .ltx_note_mark:hover + .ltx_note_outer,
  .ltx_role_affiliation > .ltx_note_mark:active + .ltx_note_outer,
  .ltx_personname .ltx_role_footnote > .ltx_note_mark:hover + .ltx_note_outer,
  .ltx_personname .ltx_role_footnote > .ltx_note_mark:active + .ltx_note_outer,
  .ltx_author_notes > .ltx_note > .ltx_note_mark:hover + .ltx_note_outer,
  .ltx_author_notes
    > span
    > .ltx_note
    > .ltx_note_mark:hover
    + .ltx_note_outer {
    display: block;
    opacity: 100;
    z-index: 100;
    position: absolute;
    left: 0;
  }
  /* also regular footnotes are hidden on author names, to avoid unfortunate collisions */
  .ltx_personname .ltx_role_footnote .ltx_note_outer {
    display: none;
    opacity: 0;
  }
  /* footnotemark + footnotetext combinations come from hand-crafted typesetting
     see 1806.0319 for a good example. Let us try to avoid the obvious clashes
     with similarly hand-crafted CSS typesetting. */
  .ltx_note.ltx_role_footnotetext .ltx_note_outer {
    position: absolute;
    left: var(--main-width-margin);
  }
  .ltx_note.ltx_role_footnotetext:nth-of-type(2) .ltx_note_outer {
    top: 8rem;
  }
  .ltx_note.ltx_role_footnotetext:nth-of-type(3) .ltx_note_outer {
    top: 16rem;
  }
  .ltx_note.ltx_role_footnotetext:nth-of-type(4) .ltx_note_outer {
    top: 24rem;
  }
  .ltx_note.ltx_role_footnotetext:nth-of-type(5) .ltx_note_outer {
    top: 32rem;
  }
  .ltx_note.ltx_role_footnotetext:nth-of-type(6) .ltx_note_outer {
    top: 40rem;
  }
  .ltx_note.ltx_role_footnotetext:nth-of-type(7) .ltx_note_outer {
    top: 48rem;
  }
  .ltx_note.ltx_role_footnotetext:nth-of-type(8) .ltx_note_outer {
    top: 56rem;
  }
  /* notes directly in abstract, or document, don't benefit from
     having a mark on wide displays */
  .ltx_abstract > .ltx_note > .ltx_note_mark,
  .ltx_title_document > .ltx_note > .ltx_note_mark,
  .ltx_document > .ltx_note > .ltx_note_mark,
  .ltx_document > .ltx_note:not(.ltx_role_footnotetext) > .ltx_note_outer > .ltx_note_content > .ltx_note_mark,
  /* also frontmatter notes: Author notes, Affiliation notes, Preprint notes */
  .ltx_note.ltx_note_frontmatter > .ltx_note_mark,
  .ltx_note.ltx_note_frontmatter > .ltx_note_outer > .ltx_note_content > .ltx_note_mark,
  /* the inner marks on "malformed" author block notes */
  .ltx_author_notes > .ltx_note  > .ltx_note_outer .ltx_note_mark,
  .ltx_author_notes > span > .ltx_note > .ltx_note_outer .ltx_note_mark {
    display: none;
    opacity: 0;
  }

  .ltx_note.ltx_note_frontmatter .ltx_note_content {
    border: none;
    margin-bottom: 0rem;
    padding-bottom: 0rem;
    margin-top: 0rem;
    padding-top: 0rem;
  }
  .ltx_note.ltx_note_frontmatter > .ltx_note_outer {
    margin-bottom: 0rem;
    padding-bottom: 0rem;
  }
}

/* footnotetext are low-level notes without a type description */
.ltx_note.ltx_role_footnotetext .ltx_note_type {
  display: none;
  opacity: 0;
}
/* margin notes do not need the type description visualized */
.ltx_note.ltx_role_margin .ltx_note_type {
  display: none;
  opacity: 0;
}
/* some notes were only provided a verbatim mark, deactivate them */
.ltx_note.ltx_role_affiliationmark > .ltx_note_mark,
.ltx_note.ltx_role_footnotemark > .ltx_note_mark {
  color: var(--text-color);
}
.ltx_note.ltx_role_affiliationmark > .ltx_note_outer,
.ltx_note.ltx_role_footnotemark > .ltx_note_outer {
  display: none !important;
  opacity: 0 !important;
}

.ltx_note.ltx_marginpar_left {
  display: none;
}

/*======================================================================
  Document Structure; Titles & Frontmatter */

/* undo bold here to remove the browser's native h# styling,
   at let all other styles override it (with more specific rules)*/
.ltx_title {
  font-size: 100%;
  font-weight: normal;
  font-family: var(--headings-font-family);
  text-wrap: balance;
  max-inline-size: 52rem;
}
/* Abstract */
.ltx_abstract {
  margin-top: 4rem;
  margin-bottom: 2rem;
}

/* TODO: Can we get a better handle on the ToC title?
   Update: we now have a "ltx_title_contents" class, consider
           deprecating the h6 selector soon. */
.ltx_title_abstract,
.ltx_TOC > h6,
.ltx_title_contents {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-top: 0;
  color: var(--link-text-color);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: bold;
  font-family: var(--headings-font-family);
  line-height: 1.15rem;
  /*padding-bottom: 1.3125rem;*/
  box-sizing: border-box;
  list-style: none;
}
.ltx_abstract p:first-of-type {
  /* TODO: this is debatable */
  text-indent: 0rem;
}

/* TODO: not yet tested */
.ltx_role_dedicatory {
  font-size: 100%;
  font-style: italic;
  text-align: center;
  margin: 1em;
}

/* ensure emails are presented on a standalone line */
.ltx_role_email {
  display: block;
}

.ltx_role_email > a {
  color: var(--email-link-color);
  text-decoration: none;
}

/* Table of Contents, main page display */
.ltx_TOC {
  margin-top: 2rem;
  margin-bottom: 2rem;
}
ul.ltx_toclist {
  padding-left: 2.5rem;
}
ul.ltx_toclist > .ltx_tocentry:first-of-type {
  margin-top: 0.3rem;
}
/* top-level TOC has no indent */
.ltx_TOC > ul.ltx_toclist {
  padding-left: 0rem;
}
.ltx_TOC > .ltx_toclist > .ltx_tocentry {
  list-style-type: none;
  margin-bottom: 1.3rem;
}
.ltx_tocentry {
  list-style-type: none;
  margin-bottom: 0.5rem;
}
.ltx_TOC > .ltx_toclist > .ltx_tocentry > a.ltx_ref {
  display: inline-block;
  border-bottom: none;
  font-weight: bold;
  margin-bottom: 0.5em;
}
.ltx_tocentry_part > .ltx_ref > .ltx_ref_title > .ltx_tag,
.ltx_tocentry_chapter > .ltx_ref > .ltx_ref_title > .ltx_tag,
.ltx_tocentry_section > .ltx_ref > .ltx_ref_title > .ltx_tag {
  margin-right: 1rem;
  display: inline-block;
  min-width: 1.5rem;
}
/* chapter tags under part can be a little narrower,
   see 2105.04227 */
.ltx_toclist_part
  > .ltx_tocentry_chapter
  > .ltx_ref
  > .ltx_ref_title
  > .ltx_tag {
  min-width: 0.5rem;
}

.ltx_tocentry_part .ltx_tocentry_chapter > .ltx_ref,
.ltx_tocentry_chapter .ltx_tocentry_section > .ltx_ref > .ltx_ref_title,
.ltx_tocentry_subsection > .ltx_ref > .ltx_ref_title {
  font-family: var(--text-font-family);
}
.ltx_tocentry_part .ltx_tocentry_chapter > .ltx_ref,
.ltx_tocentry_chapter .ltx_tocentry_section > .ltx_ref,
.ltx_tocentry_subsection > .ltx_ref,
.ltx_tocentry_subsubsection > .ltx_ref {
  border-bottom: none;
}

.ltx_tocentry_part
  .ltx_tocentry_chapter
  > .ltx_ref
  > .ltx_ref_title
  > .ltx_tag_ref,
.ltx_tocentry_chapter
  .ltx_tocentry_section
  > .ltx_ref
  > .ltx_ref_title
  > .ltx_tag_ref,
.ltx_tocentry_subsection > .ltx_ref > .ltx_ref_title > .ltx_tag_ref,
.ltx_tocentry_subsubsection > .ltx_ref > .ltx_ref_title > .ltx_tag_ref {
  border-bottom: 0.063rem dotted var(--link-text-color);
  width: min-content;
  display: inline-block;
  line-height: 1.1rem;
  margin-right: 0.3rem;
}

/* Various kinds of visual Tags */
.ltx_tag_part,
.ltx_tag_chapter,
.ltx_tag_appendix,
.ltx_tag_section,
.ltx_tag_subsection,
.ltx_tag_subsubsection {
  display: inline-block;
  padding-right: 1rem;
  min-width: 1.33em;
}
.ltx_tag_table,
.ltx_tag_figure {
  display: inline-block;
  padding-right: 0.2rem;
  min-width: 1.33em;
}
/* Various kinds of titles */
.ltx_title_part,
.ltx_title_chapter {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}
.ltx_title_section,
.ltx_title_acknowledgements,
.ltx_title_appendix,
.ltx_title_index,
.ltx_title_bibliography,
/* semantic heuristic (part 1)
   bold spans with trailing breaks are headings
   see math/0002050 for example */
span.ltx_font_bold > .ltx_break:last-child {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}
/* semantic heuristic (part 2)
   bold spans with trailing breaks are section headings
   so they were preceded by a section.
   add to top would have been the .ltx_subsection bottom margin */
span.ltx_font_bold > .ltx_break:last-child {
  margin-top: 2rem;
}
.ltx_title_subsection {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}
.ltx_title_subsubsection {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 1rem;
}
.ltx_title_paragraph {
  font-size: 1rem;
  font-weight: bold;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}
.ltx_title_subparagraph {
  font-size: 1rem;
  font-weight: bold;
  display: inline;
  margin: 0rem 1rem 0rem 2rem;
}

/* indent the first subparagraph content p for visual effect (maybe?) */
.ltx_section .ltx_subparagraph > .ltx_para:first-of-type > .ltx_p {
  text-indent: 2rem;
}
/* Hack to simulate run-in! put class="ltx_runin" on a title or tag
   for it to run-into the following text. */
.ltx_runin {
  display: inline;
}
.ltx_runin:after {
  content: " ";
}
.ltx_runin + .ltx_para,
.ltx_runin + .ltx_para p:first-child,
.ltx_runin + p:first-child {
  display: inline;
}

.ltx_outdent {
  margin-left: -2em;
}

.ltx_part,
.ltx_chapter {
  margin-bottom: 5rem;
}
.ltx_section,
.ltx_bibliography {
  margin-bottom: 2.5rem;
}
.ltx_subsection {
  margin-bottom: 2rem;
}
.ltx_subsubsection {
  margin-bottom: 0.5rem;
}
.ltx_section .ltx_para:first-of-type .ltx_p:first-of-type {
  /* TODO: this is debatable */
  text-indent: 0rem;
}

/* Theorems and other statements */
.ltx_theorem,
.ltx_proof {
  margin: 2rem 0rem 1rem 0rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* TODO: this approach to .ltx_item is still not satisfying, especially for nested lists */
.ltx_item > .ltx_theorem {
  margin-left: 1em;
}

/* reduce bottom margin for logical paragraphs in theorem envs */
.ltx_theorem > .ltx_para {
  margin-bottom: 0.5rem;
}

.ltx_title_theorem,
.ltx_title_proof {
  font-family: var(--headings-font-family);
  font-size: 1rem;
  font-weight: bold;
  display: inline;
  padding-right: 0.25em;
}

/* Bibliographies */
.ltx_bibliography dt {
  margin-right: 0.5em;
  float: left;
}
.ltx_bibliography dd {
  margin-left: clamp(1em, 4.5%, 3em);
}

.ltx_bibitem {
  display: table;
  table-layout: fixed;
  list-style-type: none;
  width: 100%;
  padding-bottom: 0.75em;
  font-family: var(--text-font-family);
}
.ltx_bibitem .ltx_tag {
  display: table-cell;
  position: relative;
  left: -2.5rem;
  top: 0.24rem;
  line-height: 1.5rem;
  text-align: left;
  /* alternative:
     but what is the stable best practice here? */
  /*
    text-align: right;
    left: -1.8rem;
    top: 0.5rem;

    .ltx_biblist {
      margin-left: -6rem;
    }
  */
  vertical-align: text-top;
  word-break: normal;
  overflow-wrap: break-word;
}
@media only screen and (max-width: 52rem) {
  .ltx_bibitem .ltx_tag {
    display: block;
    padding-bottom: 0.33em;
    width: 36%;
  }
}
@media only screen and (min-width: 52.01rem) {
  .ltx_bibitem .ltx_tag {
    width: 14%;
  }
}
.ltx_bibitem .ltx_bibblock {
  display: inline-block;
  text-align: left;
  padding-left: 0.5em;
  max-width: 40rem;
  line-height: 1.5rem;
  vertical-align: text-top;
}
/*.bibitem-tag + div { display:inline; }*/
.ltx_bib_title {
  font-style: italic;
}
.ltx_bib_article .bib-title {
  font-style: normal !important;
}
.ltx_bib_journal {
  font-style: italic;
}
.ltx_bib_volume {
  font-weight: bold;
}

/* highlight feature for bibitem-tag */
.ltx_tag_bibitem ~ *:active,
.ltx_tag_bibitem ~ *:hover,
.ltx_tag_bibitem:active ~ *,
.ltx_tag_bibitem:hover ~ * {
  background-color: var(--note-highlight-color);
  z-index: 100;
}

/* indexes */
.ltx_indexlist {
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2;
  list-style-type: none;
  padding-left: 0rem;
}
/* nested index sub-entries */
.ltx_indexentry > .ltx_indexlist {
  columns: 1;
  -webkit-columns: 1;
  -moz-columns: 1;
  margin: 0.2rem 1rem 0rem;
}
.ltx_indexentry {
  font-family: var(--text-font-family);
  font-size: 0.85rem;
  padding-bottom: 0.15rem;
}
.ltx_indexrefs .ltx_ref {
  color: var(--index-ref-color);
  white-space: nowrap;
}

/* conversion log report */
section.ltx_conversion_report > .ltx_para {
  background: whitesmoke;
  width: var(--main-width);
  padding: 0.1rem 1rem 0.1rem 1rem;
  border-radius: 0.8rem;
  line-height: 1rem;
  font-family: var(--code-font-family);
  font-size: 0.8rem;
  word-break: break-word;
}
section.ltx_conversion_report > .ltx_para > .ltx_p {
  text-align: left;
  line-height: 1rem;
}

/* Feature: stylized standalone quotes

   Note:
   exclude epigraphs, which have their own right-aligned
   design, currently via inline "style" attributes. */
:not(.ltx_quote) > blockquote.ltx_quote:not(.ltx_epigraph) {
  border-left: 0.188rem solid var(--border-color);
  font-size: 1em;
  font-style: italic;
  line-height: 1.5em;
  margin: 1.1em 0rem;
  padding: 0.5em 2em;
  position: relative;
  z-index: 0;
}
:not(.ltx_quote) > blockquote.ltx_quote:not(.ltx_epigraph):before {
  content: "";
  position: absolute;
  top: 50%;
  left: -0.25rem;
  height: 2rem;
  background-color: var(--background-color);
  width: 0.25rem;
  margin-top: -1rem;
}
:not(.ltx_quote) > blockquote.ltx_quote:not(.ltx_epigraph):after {
  content: "“";
  position: absolute;
  top: 50%;
  left: -0.6rem;
  color: var(--border-color);
  font-style: normal;
  font-size: 1.5rem;
  line-height: 2rem;
  text-align: center;
  width: 1rem;
  margin-top: -0.7rem;
}

/* suppress bottom margins */
.ltx_quote > .ltx_p:last-child {
  margin-bottom: 0;
}
.ltx_quote > .ltx_break:last-child {
  display: none;
}
/* paper over:
  see 1910.06706 for a quote with a child p
  with many trailing breaks */
.ltx_quote .ltx_break + .ltx_break + .ltx_break {
  display: none;
}
/* suppress top margins, e.g. via breaks */
.ltx_quote > .ltx_break:first-child,
.ltx_quote > .ltx_break:first-child + .ltx_break,
.ltx_quote > .ltx_break:first-child + .ltx_break + .ltx_break {
  display: none;
}

/* Feature: epigraphs, see e.g. 1911.01547 */
/* we use important for now, as latexml adds
   per-element "style" attributes */
blockquote.ltx_epigraph {
  width: calc(0.5 * var(--main-width)) !important;
  margin-left: calc(0.45 * var(--main-width)) !important;
}

/* Exception: some articles carelessly use {quote} instead of abstract */
/* see ar5iv#253 and ar5iv-css#3 for examples */
.ltx_authors + .ltx_para:has(+ .ltx_section) > blockquote.ltx_quote:only-child,
.ltx_titlepage:not(:has(.ltx_abstract)) > blockquote.ltx_quote:last-child,
.ltx_abstract > .ltx_title_abstract + blockquote.ltx_quote:last-child {
  max-width: 90%;
  margin: auto;
  border-left: initial;
  font-size: initial;
  font-style: initial;
  line-height: initial;
  padding: initial;
  position: initial;
  z-index: initial;
}

/* ================================= */
/* from LaTeXML.css, possibly edited */
/* ================================= */

/* Blocks, Lists, Floats */
.ltx_p,
.ltx_quote,
.ltx_block,
.ltx_logical-block,
.ltx_para {
  display: block;
}
.ltx_inline-quote,
.ltx_quote.ltx_outerquote,
.ltx_quote.ltx_innerquote {
  display: inline;
}
/* alignment within blocks */
.ltx_align_left {
  text-align: left;
}
.ltx_align_right {
  text-align: right;
}
.ltx_align_center {
  text-align: center;
}
.ltx_align_justify {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.ltx_align_top {
  vertical-align: top;
}
.ltx_align_bottom {
  vertical-align: bottom;
}
.ltx_align_middle {
  vertical-align: middle;
}
.ltx_align_baseline {
  vertical-align: baseline;
}

.ltx_align_floatleft {
  float: left;
}
.ltx_align_floatright {
  float: right;
}

.ltx_td.ltx_align_left,
.ltx_th.ltx_align_left,
.ltx_td.ltx_align_right,
.ltx_th.ltx_align_right,
.ltx_td.ltx_align_center,
.ltx_th.ltx_align_center {
  white-space: nowrap;
}
.ltx_td.ltx_align_left.ltx_wrap,
.ltx_th.ltx_align_left.ltx_wrap,
.ltx_td.ltx_align_right.ltx_wrap,
.ltx_th.ltx_align_right.ltx_wrap,
.ltx_td.ltx_align_center.ltx_wrap,
.ltx_th.ltx_align_center.ltx_wrap,
.ltx_td.ltx_align_justify,
.ltx_th.ltx_align_justify {
  white-space: normal;
}

/* graphics, subfigures */

/* Single central figure image */
/* Sizing here is a bit biased towards landscape images */
/* ideally this is mediated through the zoom-on-click CSS feature */
.ltx_graphics {
  display: block;
}
/* let us avoid overflowing the screen width with images
   when we're viewing at less than --main-width */
@media only screen and (max-width: 52rem) {
  .ltx_graphics {
    max-width: 95%;
  }
}
@media only screen and (min-width: 52.01rem) {
  .ltx_graphics {
    max-width: var(--main-width);
  }
}
/* mini images in captions, personnames are used inline */
.ltx_caption .ltx_graphics,
.ltx_personname .ltx_graphics,
.ltx_author_notes .ltx_graphics {
  display: inline-block;
}

/* Note 1: The common use of negations is likely a sign we need more work in the data model
   for subfigures and images in general... but it's a start. */
/* Note 2: what is a reasonable "tallest" figure? All ratios subject to further tweaking. */
:not(mtext):not(.ltx_flex_cell)
  > :not(mtext):not(.ltx_flex_cell)
  > .ltx_img_landscape {
  max-width: 100%;
  max-height: calc(var(--main-width) / 1.66);
  width: auto;
  height: auto;
}
:not(mtext):not(.ltx_flex_cell)
  > :not(mtext):not(.ltx_flex_cell)
  > .ltx_img_portrait {
  max-height: var(--main-width);
  max-width: calc(var(--main-width) / 1.33);
  width: auto;
}
:not(mtext):not(.ltx_flex_cell)
  > :not(mtext):not(.ltx_flex_cell)
  > .ltx_img_square {
  max-height: calc(var(--main-width) / 1.33);
  width: auto;
}

/* intention: downsize keeping the aspect ratio, when on a viewport smaller than main-width */
@media only screen and (max-width: 52rem) {
  :not(mtext):not(.ltx_flex_cell)
    > :not(mtext):not(.ltx_flex_cell)
    > .ltx_img_portrait {
    height: auto;
  }
  :not(mtext):not(.ltx_flex_cell)
    > :not(mtext):not(.ltx_flex_cell)
    > .ltx_img_square {
    height: auto;
  }
}

/* images in the text/math flow are sometimes used when
   e.g. unicode didn't have the appropriate symbol at the time.
   We size them close to letters. See e.g. 2108.04810 */
:not(.ltx_eqn_cell) > math mtext img.ltx_img_landscape,
:not(.ltx_eqn_cell) > math mtext img.ltx_img_portrait,
:not(.ltx_eqn_cell) > math mtext img.ltx_img_square,
:not(.ltx_eqn_cell) > math mtext object.ltx_img_landscape,
:not(.ltx_eqn_cell) > math mtext object.ltx_img_portrait,
:not(.ltx_eqn_cell) > math mtext object.ltx_img_square,
/* with all of these negations, starting to wonder if this should just be a rule only on .ltx_para > .ltx_p ? */
:not(.ltx_flex_cell):not(.ltx_figure):not(.ltx_transformed_inner):not(.ltx_td):not(.ltx_th) > .ltx_p:not(.ltx_align_center) img.ltx_img_landscape,
:not(.ltx_flex_cell):not(.ltx_figure):not(.ltx_transformed_inner):not(.ltx_td):not(.ltx_th) > .ltx_p:not(.ltx_align_center) img.ltx_img_portrait,
:not(.ltx_flex_cell):not(.ltx_figure):not(.ltx_transformed_inner):not(.ltx_td):not(.ltx_th) > .ltx_p:not(.ltx_align_center) img.ltx_img_square,
:not(.ltx_flex_cell):not(.ltx_figure):not(.ltx_transformed_inner):not(.ltx_td):not(.ltx_th) > .ltx_p:not(.ltx_align_center) object.ltx_img_landscape,
:not(.ltx_flex_cell):not(.ltx_figure):not(.ltx_transformed_inner):not(.ltx_td):not(.ltx_th) > .ltx_p:not(.ltx_align_center) object.ltx_img_portrait,
:not(.ltx_flex_cell):not(.ltx_figure):not(.ltx_transformed_inner):not(.ltx_td):not(.ltx_th) > .ltx_p:not(.ltx_align_center) object.ltx_img_square {
  width: 1rem;
  /* setting height is not that reliable here, as we have cases genuinely used as inline diagrams
     see 1502.04633, just above Observation 3.2 */
  /* height: 1rem; */
  /* also, these rules need to be !important or we get weird collisions,
     see 1712.01103 */
  min-width: 1rem !important;
  min-height: 1rem !important;
}

mtext > .ltx_graphics,
.ltx_markedasmath > .ltx_graphics,
.ltx_markedasmath.ltx_graphics {
  display: inline;
  /* see 1502.04633 at (3.3) for a width overflow example */
  max-width: calc(0.9 * var(--main-width)) !important;
}
.ltx_flex_cell .ltx_img_landscape,
.ltx_flex_cell .ltx_img_portrait,
.ltx_flex_cell .ltx_img_square {
  width: 100%;
  height: auto;
  max-height: var(--main-width);
}

/* footnote graphics need to be contained to small sizes */
.ltx_note_content .ltx_graphics {
  max-width: 10rem;
  max-height: 3rem;
}

/* Multiple subfigures via flexbox */
.ltx_flex_figure {
  display: flex;
  flex-flow: row wrap;
  width: auto;
  justify-content: center;
  align-items: flex-end;
  object-fit: contain;
  margin-bottom: 1rem;
}
.ltx_flex_figure > .ltx_flex_cell > .ltx_graphics,
.ltx_flex_figure > .ltx_flex_cell > .ltx_figure,
.ltx_flex_figure > .ltx_flex_cell > .ltx_float,
.ltx_flex_figure > .ltx_flex_cell > .ltx_minipage,
.ltx_flex_figure > .ltx_flex_cell > .ltx_graphics.ltx_centering {
  margin: 0.1rem 1px 0.1rem;
  width: 100%;
  max-height: 100%;
}
.ltx_flex_figure > .ltx_flex_cell > .ltx_minipage,
.ltx_flex_figure > .ltx_flex_cell > .ltx_inline-block {
  width: 100% !important;
}
@media only screen and (max-width: 46rem) {
  .ltx_flex_figure > .ltx_flex_cell.ltx_flex_size_1 {
    min-width: 20rem;
  }
}
@media only screen and (min-width: 46.01rem) {
  .ltx_flex_figure > .ltx_flex_cell.ltx_flex_size_1 {
    min-width: 25rem;
  }
}
.ltx_flex_figure > .ltx_flex_cell.ltx_flex_size_2 img.ltx_graphics {
  min-width: 20rem;
}
.ltx_flex_figure > .ltx_flex_cell.ltx_flex_size_3 img.ltx_graphics {
  min-width: 15rem;
}
.ltx_flex_figure > .ltx_flex_cell.ltx_flex_size_4 img.ltx_graphics {
  min-width: 10rem;
}
/* default: */
.ltx_flex_figure > .ltx_flex_cell img.ltx_graphics {
  min-width: 7rem;
}

.ltx_flex_cell.ltx_flex_size_1,
.ltx_flex_cell.ltx_flex_size_1 .ltx_tabular,
.ltx_lstlisting.ltx_flex_size_1,
.ltx_table.ltx_flex_size_1 .ltx_caption,
.ltx_minipage.ltx_flex_size_1 .ltx_float .ltx_caption {
  max-width: var(--main-width);
}
.ltx_flex_figure.ltx_flex_table .ltx_flex_size_2 {
  max-width: calc(0.5 * var(--main-width));
}
.ltx_flex_cell.ltx_flex_size_2,
.ltx_flex_size_2.ltx_tabular,
.ltx_flex_size_2 .ltx_tabular,
.ltx_lstlisting.ltx_flex_size_2,
.ltx_table.ltx_flex_size_2 .ltx_caption,
.ltx_minipage.ltx_flex_size_2 .ltx_float .ltx_caption {
  max-width: calc(0.5 * var(--main-width));
}
.ltx_flex_figure.ltx_flex_table .ltx_flex_size_3 {
  max-width: calc(0.33 * var(--main-width));
}

.ltx_flex_cell.ltx_flex_size_3,
.ltx_flex_size_3.ltx_tabular,
.ltx_flex_size_3 .ltx_tabular,
.ltx_lstlisting.ltx_flex_size_3,
.ltx_table.ltx_flex_size_3 .ltx_caption,
.ltx_minipage.ltx_flex_size_3 .ltx_float .ltx_caption {
  max-width: calc(0.33 * var(--main-width));
}

.ltx_flex_figure.ltx_flex_table .ltx_flex_size_4,
.ltx_flex_figure.ltx_flex_table .ltx_flex_size_many {
  max-width: calc(0.25 * var(--main-width));
}

.ltx_flex_cell.ltx_flex_size_4,
.ltx_flex_size_4.ltx_tabular,
.ltx_flex_size_4 .ltx_tabular,
.ltx_lstlisting.ltx_flex_size_4,
.ltx_table.ltx_flex_size_4 .ltx_caption,
.ltx_minipage.ltx_flex_size_4 .ltx_float .ltx_caption {
  max-width: calc(0.25 * var(--main-width));
}
/*Default: More than 4 items, tricky.
  quite often intended to auto-reflow... */

.ltx_flex_figure.ltx_flex_table .ltx_flex_size_many {
  max-width: calc(0.28 * var(--main-width));
}

.ltx_flex_cell.ltx_flex_size_many,
.ltx_flex_size_many.ltx_tabular,
.ltx_flex_size_many .ltx_tabular,
.ltx_lstlisting.ltx_flex_size_many,
.ltx_table.ltx_flex_size_many .ltx_caption,
.ltx_minipage.ltx_flex_size_many .ltx_float .ltx_caption {
  max-width: calc(0.25 * var(--main-width));
}

.ltx_flex_figure .ltx_flex_cell {
  flex: 1 1 0px;
  margin: 0.1rem 1px 0.1rem;
}
.ltx_flex_figure .ltx_flex_break {
  flex-basis: 100%;
  height: 0;
}

.ltx_flex_cell > .ltx_figure {
  margin: 0rem;
}
.ltx_flex_figure .ltx_tabular .ltx_td,
.ltx_flex_figure .ltx_tabular .ltx_th {
  padding: 0.1rem 0.2rem;
}
/* Feature: zoom figure image on hover */
.ltx_figure img {
  color: var(--image-color);
  background-color: var(--image-background-color);
  -webkit-transition: all 0.2s ease;
  -moz-transition: all 0.2s ease;
  -ms-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
.ltx_figure img:active,
.ltx_p > img.ltx_graphics:active,
.ltx_text > img.ltx_graphics:active {
  -webkit-transform: scale(1.8); /* Safari and Chrome */
  -moz-transform: scale(1.8); /* Firefox */
  -ms-transform: scale(1.8); /* IE 9 */
  -o-transform: scale(1.8); /* Opera */
  transform: scale(1.8);
  overflow: visible;
  /* white zoom even in dark mode */
  background-color: white;
}
/* Tweaks from arXiv */
/* not all images are in figures, some are even inline in ltx_p */
.ltx_p > img.ltx_graphics {
  display: inline;
}
/* some svg figures use raw TeX to find themselves in an ltx_para */
.ltx_para > svg:only-child {
  margin: auto;
  display: block;
  max-width: var(--main-width);
}
svg {
  /* Collisions can be really bizarre, especially when
    due to flawed latex interpretation.
    See Fig 1 in 0709.4426, for a vertical case.
    For now: require svg content is underneath the main page. */
  z-index: -1;
}

/*SVG (pgf/tikz & xy) basics */
svg text,
svg .ltx_foreignobject_content {
  line-height: 1rem;
  font-family: var(--text-font-family);
  /* This adjustment is specific for Noto Sans, and is generally quite fragile.
       Changing the text font will likely damage the positioning in SVG, which is very sensitive
       to font metrics. This will likely be a subject of future improvements in LaTeXML. */
  font-size: var(--svg-text-size);
  text-align: left; }
foreignObject {
  /* translate: 0 0.1em; */
  --fo_width: 100%;
}
/* Use flex to vertically center foreignObject,
   to accommodate potentially tall line-box */
svg foreignObject > .ltx_foreignobject_container {
  display: flex;
  align-items: end; /* see examples from latexml PR #2541 */
  width: clamp(calc(0.1 * var(--main-width)), var(--fo_width), 100%);
  height: 100%;
}
svg foreignObject > .ltx_foreignobject_container {
  /* Also horizontally for single math, since Chrome adds a lot of left/right spacing. */
  /* Note: there is a diversity of arrangement, see arXiv:2501.11021, arXiv:1604.02256 */
  /* One limitation is that the flex use on foreignObject does not recognize the flex-direction
     which was _implied_ by the diagram's source, so we are always centering horizontally. */
  &:has( > .ltx_foreignobject_content > math:only-child) {
    align-items: center;
  }
  /* If multiple children, give more space to avoid unexpected line breaks
   due to font differences. */
  &:has(> .ltx_foreignobject_content > :not(:only-child)) {
    width: calc(1.1 * var(--fo_width));
  }
  & > .ltx_foreignobject_content {
    display: block;
    & * {
      width: inherit !important;
      line-height: 1;
    }
    & .ltx_description,
    & .ltx_itemize,
    & .ltx_enumerate {
      margin-top: 0.2em;
      margin-left: 0.2em;
    }
    /* In fixed-height contexts, the extra padding can lead to collding with the frame.
       see https://github.com/dginev/ar5iv/issues/529 */
    & .ltx_item + .ltx_item {
      margin-top: 0.2em;
    }
    & span.ltx_p:not(:last-child) {
      margin-bottom: 0.3em;
    }
    & .ltx_para {
      /* see arXiv:2407.16893v1 */
      margin-bottom: 0.2rem;
    }
  }
}

/* Stuff appearing in svg:foreignObject */
.ltx_svg_fog foreignObject {
  margin: 0;
  padding: 0;
  overflow: visible;
}
.ltx_svg_fog foreignObject > p {
  margin: 0;
  padding: 0;
  display: block;
}
/*.ltx_svg_fog foreignObject > p { margin:0; padding:0; display:block; white-space:nowrap; }*/

/* tables in logical paragraphs get spaced out
   similar to a textual paragraph */
.ltx_para > .ltx_tabular {
  margin-bottom: 1rem;
}

/* TODO: test! subtables */
.ltx_tabular .ltx_tabular {
  width: 100%;
}
.ltx_tabular.ltx_tabbing {
  display: table;
}
.ltx_inline-logical-block,
.ltx_inline-logical-block .ltx_para {
  display: inline;
  text-indent: 0px;
}
.ltx_inline-block,
.ltx_inline-block .ltx_para {
  display: inline-block;
}
.ltx_nodisplay {
  display: none;
}

/* TODO: it appears our width estimations for the individual rows of an inline block
         are not always accurate? Revert ot auto for now,
         see 2105.00613 for examples */
.ltx_inline-block > .ltx_p {
  width: auto !important;
}
/* also some parbox sizing goes wrong in the title of hep-th/0001161, avoid for now. */
.ltx_title_document > .ltx_parbox,
.ltx_title_document > .ltx_inline-block {
  width: auto !important;
}

/* experimental, only for figures: flex model, to center short captions, justify long ones */
:not(.ltx_flex_cell) > .ltx_figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 4rem auto 4rem;
}
/* tables use their usual block display with automatic overflow-x;
   unsolved: should we allow growth into the margins for very wide tables?
             or introduce a separate pop-out display mode?
*/
.ltx_table{
  text-align: center;
  margin: 4rem auto 4rem;
}
/* don't use the auto overflow rule in subfigure cases
   see https://arxiv.org/html/2503.09799v1#S2.T2   */
.ltx_table:not(:has(> .ltx_flex_table)) {
  overflow-x: auto;
  overflow-y: hidden;
}
.ltx_table .ltx_caption {
  margin-left: auto;
  margin-right: auto;
  max-width: max-content;
}

.ltx_caption {
  font-family: var(--text-font-family);
}
.ltx_table .ltx_caption,
.ltx_figure .ltx_caption {
  text-align: justify;
  line-height: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.ltx_flex_figure .ltx_figure .ltx_caption {
  text-align: center;
}
/* other notes, for example, the ones in deluxetable */
.ltx_figure .ltx_parbox {
  text-align: justify;
}
.ltx_parbox {
  text-indent: 0rem;
  display: inline-block;
}
/* floats, such as Algorithm listings */
.ltx_minipage {
  align-self: normal;
  display: inline-block;
}
.ltx_minipage.ltx_align_center {
  align-self: center;
}
.ltx_minipage .ltx_float {
  display: inline-block;
}
/* inline-block or bliock display for captions in listings in minipage?
  see listings in arXiv:1712.01103 */
.ltx_minipage .ltx_float .ltx_caption {
  display: block;
}
/* often minipages are inline-blocks, for which "vertical-align" is inactive */
/* so we also default to an auto margin in order to center */
.ltx_minipage.ltx_align_middle {
  margin: auto;
  width: auto !important;
}
.ltx_minipage > .ltx_graphics {
  max-width: 100%;
}
/* minipages need some dedicated work (ar5iv#83),
   but for now we can accommodate with a bit of special-case padding; */
.ltx_flex_size_2 .ltx_tabular.ltx_minipage {
  margin: 1rem;
}
.ltx_flex_size_3 .ltx_tabular.ltx_minipage {
  margin: 0.66rem;
}
.ltx_flex_size_4 .ltx_tabular.ltx_minipage {
  margin: 0.5rem;
}

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

.ltx_listing {
  display: block;
  max-width: var(--main-width);
  margin-bottom: 1rem;
}
.ltx_framed > .ltx_listing {
  margin-bottom: 0rem;
}
.ltx_listing > .ltx_framed_rectangle {
  /* download arrow has a glitchy border, disable it. */
  border-style: none;
}
/* ensure that listingline rules have a listing ancestor,
   as e.g. 1403.1525 currently has listinglines inside ltx_theorem */
.ltx_listing .ltx_listingline {
  text-align: justify;
  white-space: nowrap;
  min-height: 1rem;
  display: block;
  /* default font-size for a listing line, as sometimes text doesn't have a wrapper,
     e.g. see the leading "#" in 2109.04981, figure 5 */
  font-size: 0.7rem;
}
.ltx_listing .ltx_tag_listingline {
  padding-right: 0.3rem;
  border-right: solid;
  border-width: thin;
  margin-right: 0.3rem;
  text-align: right;
  width: 1.3rem;
  display: inline-block;
  & > .ltx_text {
    /* see algorithm 2 in 2406.04076, for an example of the numbering tags getting wide. */
    word-break: keep-all;
    word-wrap: normal;
    /* !important needed due to use of element "style" attributes in latexml */
    /* Sometimes the 80% downscale is too much, 0.7rem is a good pragmatic constant */
    font-size: 0.7rem !important;
  }
}
.ltx_lst_space {
  white-space: pre;
}
/* for now hide the download button for listings,
   needs some styling thought and also ensuring it works. */
.ltx_listing_data {
  display: none;
}
/* keep listings spaced as-is in justified paragraphs
   example: 2111.08099, end of Intro */
.ltx_lstlisting.ltx_text {
  white-space: break-spaces;
}
/* also, keep listings left-aligned,
   even if the author wanted them centered in TeX.
   The authors of 2006.16852 made the request. */
.ltx_lstlisting.ltx_align_center {
  text-align: left;
}

.ltx_float {
  margin: 3.5rem auto 3.5rem;
}
.ltx_minipage > .ltx_float {
  margin: 0.2rem auto 0.2rem;
}
.ltx_float .ltx_caption {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  border-top: solid var(--border-color);
  border-bottom: solid var(--border-color);
  border-width: 0.1rem;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  padding: 0.2rem;
}
.ltx_rule {
  color: var(--border-color);
  /* for hand-drwan bits such as  a QED symbol */
  vertical-align: middle;
  /* latexml often produces an element style="background:black;" for
    .ltx_rule nodes, which makes them impossible to style beyond the author intent.
    as this is experimental, we take the liberty of overriding those with !important.
  */
  background-color: var(--border-color) !important;
}

/* ltx_transformed_outer and ltx_transformed_inner mostly come out broken at the moment
   e.g. we need to debug 2106.15835, where we try to squeeze a table down, and fail
   There are plenty of other examples in arXiv. For now, disable the outer sizing
*/
.ltx_transformed_outer {
  width: auto !important;
  height: auto !important;
  vertical-align: initial !important;
}

/* For now, disable transformed_inner over figures and tables as well */
.ltx_table > .ltx_inline-block > .ltx_transformed_inner,
.ltx_figure > .ltx_inline-block > .ltx_transformed_inner,
.ltx_table > .ltx_transformed_outer > .ltx_transformed_inner,
.ltx_figure > .ltx_transformed_outer > .ltx_transformed_inner,
/* see 0901.0489 for an example where the div.ltx_table itself has a transform */
.ltx_table.ltx_transformed_outer > .ltx_transformed_inner,
/* see 2006.13760 for an example where the div.ltx_figure itself has a transform */
.ltx_figure.ltx_transformed_outer > .ltx_transformed_inner,
/* see 1504.02179 for an example where div.ltx_inline-block itself has a transform */
.ltx_inline-block.ltx_transformed_outer > .ltx_transformed_inner,
/* sometimes latexml copies a tabular scaffold under a figure too faithfully,
   see figures in 1909.02255 for examples. */
.ltx_tr:only-child > .ltx_td:only-child > .ltx_inline-block > .ltx_transformed_inner,
.ltx_tr:only-child > .ltx_td:only-child > .ltx_p:only-child > .ltx_inline-block > .ltx_transformed_inner,
.ltx_tr:only-child > .ltx_td:only-child > .ltx_transformed_outer > .ltx_transformed_inner,
.ltx_tr:only-child > .ltx_td:only-child > .ltx_p:only-child > .ltx_transformed_outer > .ltx_transformed_inner,
/* sometimes the inline block is *wrapping* the table, see
/* https://ar5iv.labs.arxiv.org/html/2110.07681#A1.p6.10
   a :has(table) selector could be made more precise, when browser support is available. */
.ltx_para > .ltx_inline-block:only-child.ltx_transformed_outer > .ltx_transformed_inner {
  transform: none !important;
  width: initial !important;
}

span.ltx_transformed_inner {
  display: inline-block;
}
/* see flipped RL in 1912.02875 for one example */
.ltx_transformed_inner > .ltx_p {
  margin: 0;
  padding: 0;
}
/* TODO: Maybe re-allow after latexml becomes very accurate with equation transforms?
 see equations 1 and 2 in arXiv:2111.15640 */
.ltx_eqn_cell > .ltx_transformed_outer > .ltx_transformed_inner,
/* TODO: Similarly, scale() on tables seems to be unpredictably different than the intention in PDF,
 disable for now? Needs a proper latexml fix.
 Example: subfigure scaled tables in 2111.00396 */
.ltx_flex_cell > .ltx_transformed_outer > .ltx_transformed_inner {
  transform: none !important;
}

/* \phantom - hide content but still allocate stand-in space */
.ltx_phantom {
  visibility: hidden;
}

/*======================================================================
 Inline Basics

 Note that LaTeX(ML)'s font model doesn't map quite exactly to CSS's
 Font Families => font-family
*/
.ltx_font_serif {
  font-family: var(--text-font-family);
}
.ltx_font_sansserif {
  font-family: var(--headings-font-family);
}
.ltx_font_typewriter {
  font-family: var(--code-font-family);
}
/* dingbats should be converted to unicode? */
/* Math font families handled within math: script, symbol, fraktur, blackboard ? */
/* Font Series => font-weight */
.ltx_font_bold {
  font-weight: bold;
}
.ltx_font_medium {
  font-weight: normal;
}
/* Font Shapes => font-style or font-variant */
.ltx_font_italic {
  font-style: italic;
}
.ltx_font_upright {
  font-style: normal;
  font-variant: normal;
}
.ltx_font_slanted {
  font-style: oblique;
}
.ltx_font_smallcaps {
  font-variant: small-caps;
  font-style: normal;
}
.ltx_font_mathcaligraphic {
  font-family: var(--math-caligraphic-font-family);
}

/* Fallbacks for when content+mathvariant cannot be mapped to Unicode */
.ltx_mathvariant_italic {
  font-style: italic;
}
.ltx_mathvariant_bold {
  font-weight: bold;
}
.ltx_mathvariant_bold-italic {
  font-style: italic;
  font-weight: bold;
}
.ltx_mathvariant_sans-serif {
  font-family: sans-serif;
}
.ltx_mathvariant-bold-sans-serif {
  font-family: sans-serif;
  font-weight: bold;
}
.ltx_mathvariant-sans-serif-italic {
  font-family: sans-serif;
  font-style: italic;
}
.ltx_mathvariant-bold-sans-serif-italic {
  font-family: sans-serif;
  font-style: italic;
  font-weight: bold;
}
.ltx_mathvariant_monospace {
  font-family: monospace;
}
/* Can we say anything generic about double-struck, script or fraktur ? */
.ltx_mathvariant_double-struck {
  font-weight: bold;
}
.ltx_mathvariant_script {
  font-family: var(--math-caligraphic-font-family), cursive;
}
.ltx_mathvariant_bold-script {
  font-family: var(--math-caligraphic-font-family), cursive;
  font-weight: bold;
}
.ltx_mathvariant_bold-fraktur {
  font-weight: bold;
}

/* equations in non-aligned mode (not normally used) */
.ltx_eqn_div {
  display: block;
  width: 95%;
  text-align: center;
}

/* equations in aligned mode (aligning tags, etc as well as equations) */
.ltx_eqn_table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  margin: 0.65rem auto 0.65rem;
}
.ltx_eqn_row {
  display: table-row;
}
.ltx_eqn_cell {
  display: table-cell;
  width: auto;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  padding-right: 0.2rem;
  padding-left: 0.2rem;
}
.ltx_eqn_cell.ltx_eqn_eqno {
  width: 3em;
  /* avoid line-breaking complex eqn labels */
  /* see eqn. A_2 at 0708.2787 for an example */
  white-space: nowrap;
}
.ltx_tag.ltx_tag_equation,
.ltx_tag.ltx_tag_equationgroup {
  font-size: 0.9em;
}

/* Padding between column pairs in ams align */
table.ltx_eqn_align tr.ltx_equation td.ltx_align_left + td.ltx_align_right,
table.ltx_eqn_align tr.ltx_equation td.ltx_align_left + td.ltx_align_center,
table.ltx_eqn_align tr.ltx_equation td.ltx_align_center + td.ltx_align_right,
table.ltx_eqn_align tr.ltx_equation td.ltx_align_center + td.ltx_align_center {
  padding-left: 3em;
}
table.ltx_eqn_eqnarray tr.ltx_eqn_lefteqn + tr td.ltx_align_right {
  min-width: 2em;
}

.ltx_eqn_eqno.ltx_align_right .ltx_tag {
  float: right;
}

.ltx_eqn_center_padleft,
.ltx_eqn_center_padright {
  width: 50%;
  min-width: 2em;
}
.ltx_eqn_left_padleft,
.ltx_eqn_right_padright {
  min-width: 2em;
}
.ltx_eqn_left_padright,
.ltx_eqn_right_padleft {
  width: 100%;
}

/* Various lists */
.ltx_itemize,
.ltx_enumerate,
.ltx_description {
  display: block;
}
.ltx_item > .ltx_para > .ltx_description,
.ltx_item > .ltx_para > .ltx_itemize,
.ltx_item > .ltx_para > .ltx_enumerate {
  margin-top: 0.5rem;
  margin-left: 0.5rem;
}
.ltx_description .ltx_item,
.ltx_itemize .ltx_item,
.ltx_enumerate .ltx_item {
  display: list-item;
}
/* Position the tag to look like a normal item bullet. */
/* TODO: This needs extra work, particularly for nested lists,
         and is made difficult between the padding needs (typical to "block")
         and the list-like display (close to "inline").
  Can't figure out a better approach at the moment,
        so I'm instead documenting the need here for now. */
li.ltx_item > .ltx_tag {
  display: inline;
  margin-left: -2.5rem;
  padding-right: 0.5rem;
  text-align: right;
}
.ltx_item .ltx_tag + .ltx_para {
  vertical-align: top;
  display: inline-block;
  width: calc(100% - 0.5rem);
  & .ltx_p {
    display: inline;
  }
}
span.ltx_item .ltx_tag + span.ltx_para {
  display: inline;
}

.ltx_item > .ltx_para > .ltx_p:first-child {
  text-indent: 0rem;
}
.ltx_item > .ltx_para > .ltx_p {
  margin-top: 0rem;
  margin-bottom: 0rem;
}

.ltx_item .ltx_para {
  margin-bottom: 0rem;
  display: inline;
}
.ltx_item + .ltx_item {
  margin-top: 1em;
}
dt.ltx_item + dd.ltx_item {
  margin-top: 0;
}

/*TODO: Confusing override. maybe dt should have the ltx_tag_item class instead of ltx_item? */
dd.ltx_item + dt.ltx_item {
  margin-top: 0rem;
}
dl.ltx_description {
  list-style-type: none;
}
dl.ltx_description dt {
  margin-right: 0.5em;
  float: left;
  font-weight: bold;
  font-size: 95%;
}
dl.ltx_description dd.ltx_item {
  margin-left: 3em;
  text-indent: 0rem;
}
dl.ltx_description dl.ltx_description dd {
  margin-left: 3em;
  margin-bottom: 0.75em;
}

/* Lists inside a table-containing figure
   should still be left-aligned.
   See 2005.00832, Table IV, for example */
.ltx_table .ltx_itemize,
.ltx_table .ltx_enumerate,
.ltx_table .ltx_description {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  font-family: var(--text-font-family);
  line-height: 1.5rem;
}

/*======================================================================
 Borders and such */
.ltx_tabular {
  display: inline-table;
  border-collapse: collapse;
}
.ltx_tabular.ltx_centering {
  display: table;
  margin-left: auto;
  margin-right: auto;
}
.ltx_graphics.ltx_centering,
.ltx_picture.ltx_centering {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
/* usually within text, center them vertically as well */
.ltx_picture.ltx_centering {
  vertical-align: middle;
}

.ltx_thead,
.ltx_tfoot,
.ltx_tbody {
  display: table-row-group;
}
.ltx_tr {
  display: table-row;
}
.ltx_td,
.ltx_th {
  display: table-cell;
}

.ltx_tabular .ltx_td,
.ltx_tabular .ltx_th {
  padding: 0.1em 0.5em;
  max-width: var(--main-width);
  word-wrap: break-word;
  white-space: normal;
}
.ltx_tabular .ltx_td.ltx_nopad_l,
.ltx_tabular .ltx_th.ltx_nopad_l {
  padding-left: 0;
}
.ltx_tabular .ltx_td.ltx_nopad_r,
.ltx_tabular .ltx_th.ltx_nopad_r {
  padding-right: 0;
}

/* min-height does NOT apply to tr! */
.ltx_tabular .ltx_tr td:first-child::after,
.ltx_tabular .ltx_tr th:first-child::after {
  content: "";
  display: inline-block;
  vertical-align: top;
  min-height: 1em;
}

/* see the last table in 1607.01446 for why
   th should be nowrap;
  TODO: Maybe our latexml data model needs to evolve to add classes,
  with types of content in the cells?
  Numbers and text may be best treated separately. */
.ltx_tabular .ltx_th.ltx_th_column {
  white-space: nowrap;
}
/* regular lines */
.ltx_border_t {
  border-top: 0.063rem solid var(--border-color);
}
.ltx_border_r {
  border-right: 0.063rem solid var(--border-color);
}
.ltx_border_b {
  border-bottom: 0.063rem solid var(--border-color);
}
.ltx_border_l {
  border-left: 0.063rem solid var(--border-color);
}
/* double lines */
.ltx_border_tt {
  border-top: 0.188rem double var(--border-color);
}
.ltx_border_rr {
  border-right: 0.188rem double var(--border-color);
}
.ltx_border_bb {
  border-bottom: 0.188rem double var(--border-color);
}
.ltx_border_ll {
  border-left: 0.188rem double var(--border-color);
}
/* Light lines */
.ltx_border_T {
  border-top: 0.063rem solid var(--border-light-color);
}
.ltx_border_R {
  border-right: 0.063rem solid var(--border-light-color);
}
.ltx_border_B {
  border-bottom: 0.063rem solid var(--border-light-color);
}
.ltx_border_L {
  border-left: 0.063rem solid var(--border-light-color);
}
/* arydshln.sty */
.ltx_border_r_dashed {
  border-right: 0.063rem dashed var(--border-color);
}
.ltx_border_b_dashed {
  border-bottom: 0.063rem dashed var(--border-color);
}
/* Framing */
/* set theme's frame color for all variants */
.ltx_framed {
  border-color: var(--border-color);
}
/* avoid padding/margin collapse */
span.ltx_framed {
  display: inline-block;
  text-indent: 0;
}
/* common setup, but what is the right selector?
   they need to be inline inside ltx_p (see 1703.08608),
   and inline-block when used on images...
   On closer look, the difference is that framed rectangles which are *empty*
   render correct only with display:inline;
   This became clear while also examining cases of spans in p which *require*
   inline-block to get the right border (see 1708.02728). */
.ltx_framed_rectangle:not(:empty),
.ltx_framed_top:not(:empty),
.ltx_framed_left:not(:empty),
.ltx_framed_right:not(:empty),
.ltx_framed_bottom:not(:empty),
.ltx_framed_underline:not(:empty),
.ltx_framed_topbottom:not(:empty) {
  display: inline-block;
}
/* specific features */
.ltx_framed_rectangle {
  border-style: solid;
  border-width: 0.063rem;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}
.ltx_framed_top {
  border-top-style: solid;
  border-top-width: 0.063rem;
}
.ltx_framed_left {
  border-left-style: solid;
  border-left-width: 0.063rem;
}
.ltx_framed_right {
  border-right-style: solid;
  border-right-width: 0.063rem;
}
.ltx_framed_bottom,
.ltx_framed_underline {
  border-bottom-style: solid;
  border-bottom-width: 0.063rem;
}
.ltx_framed_topbottom {
  border-top-style: solid;
  border-top-width: 0.063rem;
  border-bottom-style: solid;
  border-bottom-width: 0.063rem;
}
.ltx_framed_leftright {
  border-left-style: solid;
  border-left-width: 0.063rem;
  border-right-style: solid;
  border-right-width: 0.063rem;
}

/*======================================================================
 Misc */
.ltx_verbatim {
  text-align: left;
  font-size: 90%;
}
/*======================================================================
 Meta stuff */
.ltx_tag_note {
  display: none;
}
.ltx_INFO,
.ltx_WARNING,
.ltx_ERROR,
.ltx_FATAL {
  text-align: left;
  display: inline;
}
.ltx_INFO {
  color: var(--info-text-color);
}
.ltx_WARNING {
  color: var(--warning-text-color);
}
.ltx_ERROR {
  font-weight: normal;
  color: var(--error-text-color);
}
.ltx_FATAL {
  font-weight: normal;
  color: var(--fatal-text-color);
}
.ltx_rdf {
  display: none;
}
.ltx_missing,
.ltx_nounicode {
  color: var(--error-text-color);
}
.ltx_nodisplay {
  display: none;
}
.ltx_missing_label {
  color: var(--warning-text-color);
}

/* math specific */
merror.ltx_ERROR {
  font-size: 0.75rem;
  background-color: var(--background-color);
}
mjx-merror {
  background-color: var(--background-color) !important;
}

/*======================================================================
  Fine-tuning for the state of MathML in 2023

  When a formula starts approaching half the line in horizontal width,
   today's "text-align: justify" tends to fail pretty miserably
   (adding large wells of whitespace),
   as we have no way of reflowing/breaking the formula.
   Meanwhile, "text-align: left" remains reliable in its simplicity.

  We us a latexml-specific heuristic of "7 mrows" for formulas of this quality.
   An example is item 2.9 in section 2.6 of arXiv:2105.10386 */
.ltx_item:has(> .ltx_para > .ltx_p > math mrow:nth-of-type(7)),
.ltx_p:has(> math mrow:nth-of-type(7)) {
  text-align: left;
}

/* see discussion at github.com/w3c/mathml-core/issues/39 */
mfrac > * {
  font-size: inherit;
  padding: 0.1em;
}

/*======================================================================
  Fixes for known markup Bugs

  B1. We have certain semi-supported bindings where a bibliography will be detected, but a paper
   will also mark it manually as e.g. \section{Bibliography}.
   (see arXiv:astro-ph/0001001)
   Detect: A section with only a title (no content) as a previous sibling to a bibliography
   Resolution: hide the extra section element. */
.ltx_section:has(> .ltx_title_section:only-child):has(+ .ltx_bibliography) {
  display: none;
}

/* B2. Bibitems whose bib blocks are entirely empty are better hidden (maybe?)
   best avoided entirely in latexml
.ltx_bibitem:not(:has(> .ltx_bibblock > *)) {
  display: none;
} */

/* B3. ltx_parbox having too narrow widths in tables (see ar5iv#191) */
.ltx_th .ltx_parbox,
.ltx_tr .ltx_parbox {
  width: initial !important;
}

.ltx_para.ltx_minipage.ltx_align_center {
  margin: auto;
  display: block;
}
