/* arXiv-HTML-style layer over LaTeXML's default stylesheets.
   Light-theme only, matching the ar5iv / arxiv.org/html look. */

:root {
  --ink: #1a1a1a;
  --ink-soft: #5c554d;
  --link: #a04620;
  --rail: #f4f2ef;
  --rail-rule: #e2ddd6;
  --page: #ffffff;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Lato,
          Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --rail-w: 15rem;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  margin: 0;
}

/* ---------- left TOC rail ---------- */
.ltx_page_navbar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  padding: 3.2rem 1.4rem 3rem;
  box-sizing: border-box;
  background: var(--rail);
  border-right: 1px solid var(--rail-rule);
  overflow-y: auto;
  font-size: .93rem;
}
.ltx_page_navbar .ltx_TOC { margin: 0; }
.ltx_toclist { list-style: none; margin: 0; padding: 0; }
.ltx_toclist .ltx_toclist { margin: .45rem 0 .7rem .2rem; }
.ltx_tocentry { margin: 0 0 .95rem; line-height: 1.35; }
.ltx_tocentry_paragraph {
  margin: 0 0 .5rem .9rem;
  font-size: .88rem;
  font-weight: 400;
}
.ltx_page_navbar a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
}
.ltx_tocentry_paragraph a { font-weight: 400; }
.ltx_page_navbar a:hover,
.ltx_page_navbar a:focus-visible { color: var(--link); }
.ltx_page_navbar .ltx_tag_ref {
  display: inline-block;
  min-width: 1.6em;
  color: var(--ink-soft);
}

/* ---------- download links, at the top of the rail ---------- */
.ltx_downloads {
  margin: 0 0 2rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--rail-rule);
}
.ltx_downloads_label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .7rem;
}
.ltx_downloads ul { list-style: none; margin: 0; padding: 0; }
.ltx_downloads li { margin: 0 0 .3rem; }
.ltx_downloads a {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .3rem .5rem;
  margin-left: -.5rem;
  border-radius: 4px;
  font-size: .88rem;
  font-weight: 400;
  color: var(--link);
  text-decoration: none;
}
.ltx_downloads a:hover,
.ltx_downloads a:focus-visible {
  background: #fff;
  color: var(--link);
}
.ltx_downloads_fmt { font-weight: 600; }
.ltx_downloads_size {
  margin-left: auto;
  font-size: .78rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- main column ---------- */
.ltx_page_main { margin-left: var(--rail-w); }
.ltx_page_content {
  max-width: 52rem;
  margin: 0 auto;
  padding: 3.2rem clamp(1.1rem, 4vw, 3rem) 6rem;
}

.ltx_masthead {
  text-align: center;
  color: #8b8377;
  font-size: .95rem;
  line-height: 1.9;
  margin: 0 0 2.6rem;
}
.ltx_masthead code { font-family: var(--mono); font-size: .9em; }

h1.ltx_title_document {
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1.24;
  text-align: center;
  letter-spacing: -.012em;
  margin: 0 0 1.9rem;
  text-wrap: balance;
}
/* One column per author, side by side and centred as the NeurIPS style sets
   them; they stack once there is no room. LaTeXML puts a whitespace-only
   ltx_author_before between creators — the flex gap replaces it. */
.ltx_authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.4rem 3.4rem;
  text-align: center;
  margin: 0 0 3rem;
  line-height: 1.72;
}
.ltx_authors .ltx_creator { display: block; }
.ltx_authors .ltx_author_before { display: none; }
.ltx_personname { font-weight: 400; }
.ltx_name { font-weight: 600; }
.ltx_font_typewriter { font-family: var(--mono); font-size: .93em; }

/* ---------- headings ---------- */
h2.ltx_title_section {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2.9rem 0 1rem;
  line-height: 1.3;
  text-wrap: balance;
  scroll-margin-top: 1.5rem;
}
h2.ltx_title_section .ltx_tag_section { margin-right: .75rem; }
h3.ltx_title_subsection {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2.2rem 0 .8rem;
  scroll-margin-top: 1.5rem;
}
h6.ltx_title_abstract {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 1rem;
}
h6.ltx_title_paragraph,
.ltx_title_paragraph {
  font-size: 1rem;
  font-weight: 700;
  display: inline;
  margin: 0 .5em 0 0;
}
.ltx_para { margin: 0; }

/* ---------- body text ---------- */
p.ltx_p {
  margin: 0 0 1.1rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.ltx_abstract { margin: 0 0 3rem; }
.ltx_abstract p.ltx_p { margin-bottom: 0; }

a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.ltx_ref .ltx_text, .ltx_ref { color: inherit; }
.ltx_page_content .ltx_ref { color: var(--link); }

/* ---------- math ---------- */
math { font-size: 1.02em; }
.ltx_equation {
  margin: 1.5rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.ltx_eqn_table { width: 100%; border-collapse: collapse; }
.ltx_eqn_cell { padding: 0; }
.ltx_eqn_center_padleft, .ltx_eqn_center_padright { width: 50%; }
.ltx_tag_equation { color: var(--ink-soft); font-size: .95em; }

/* ---------- figures & tables ---------- */
figure.ltx_figure, figure.ltx_table {
  margin: 2.4rem 0;
  text-align: center;
  scroll-margin-top: 1.5rem;
}
figure.ltx_figure img { max-width: 100%; height: auto; }
figcaption.ltx_caption {
  margin-top: .9rem;
  font-size: .93rem;
  line-height: 1.55;
  text-align: justify;
  hyphens: auto;
}
figcaption.ltx_caption .ltx_tag_figure,
figcaption.ltx_caption .ltx_tag_table { font-weight: 700; }
figure.ltx_table figcaption.ltx_caption { margin: 0 0 .9rem; }

.ltx_tabular {
  border-collapse: collapse;
  margin: 0 auto;
  font-size: .93rem;
  font-variant-numeric: tabular-nums;
}
.ltx_tabular td, .ltx_tabular th { padding: .35rem .7rem; }
.ltx_border_t  { border-top: 1px solid var(--ink); }
.ltx_border_tt { border-top: 2px solid var(--ink); }
.ltx_border_bb { border-bottom: 2px solid var(--ink); }
.ltx_tabular_wrap, .ltx_table > .ltx_tabular { overflow-x: auto; }

/* ---------- footnotes & bibliography ---------- */
.ltx_note_content {
  font-size: .9rem;
  line-height: 1.5;
  background: var(--rail);
  border: 1px solid var(--rail-rule);
  border-radius: 3px;
  padding: .6rem .8rem;
}
.ltx_bibliography { margin-top: 2.5rem; }
.ltx_bibitem {
  margin: 0 0 .8rem;
  padding-left: 2.2rem;
  text-indent: -2.2rem;
  font-size: .93rem;
  line-height: 1.5;
}
.ltx_bibitem .ltx_tag_bibitem { font-weight: 700; }

.ltx_colophon {
  margin-top: 4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rail-rule);
  font-size: .82rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.ltx_colophon code { font-family: var(--mono); }

/* ---------- narrow screens: rail collapses to a block on top ---------- */
@media (max-width: 60rem) {
  .ltx_page_navbar {
    position: static;
    width: auto;
    border-right: none;
    border-bottom: 1px solid var(--rail-rule);
    padding: 1.6rem 1.2rem;
  }
  .ltx_page_main { margin-left: 0; }
  .ltx_page_content { padding-top: 2rem; }
  p.ltx_p, figcaption.ltx_caption { text-align: left; }
}

@media print {
  .ltx_page_navbar { display: none; }
  .ltx_page_main { margin-left: 0; }
}

/* LaTeXML's TOC clips long titles to one line; let them wrap in the rail. */
.ltx_page_navbar .ltx_ref,
.ltx_page_navbar .ltx_ref_title {
  display: inline;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
}

/* No first-line indent: arXiv's HTML sets paragraphs flush left.
   ltx-article.css indents the first paragraph of the abstract and of any
   indent_first section, so override those selectors specifically. */
p.ltx_p,
.ltx_title_abstract + .ltx_p,
section.ltx_indent_first > .ltx_title + .ltx_para > .ltx_p { text-indent: 0; }

/* Printing: paginate with page numbers (HTML has no pages on screen). */
@page {
  margin: 18mm 16mm;
  @bottom-center { content: counter(page); }
}
@media print {
  body { font-size: 10.5pt; }
  .ltx_page_content { max-width: none; padding: 0; }
  h2.ltx_title_section { break-after: avoid; }
  figure.ltx_figure, figure.ltx_table, .ltx_equation { break-inside: avoid; }
  .ltx_masthead { margin-bottom: 1.5rem; }
}
