/* for LaTeXML posts：.ltx_document */
.post-content .ltx_document {
  margin: 0 auto;
  padding: 0 1rem;                 
  font-family:
  "STIX Two Text", "Libertinus Serif",
  "Noto Serif SC", "Songti SC", "Source Han Serif SC",
  "Cambria", "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.2;
  text-align: justify;             
  text-align-last: left;
  color: inherit;                  
}

/* 标题层级（LaTeXML 会输出自身类名，也保留原生 h2 等） */
/* .post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6,
.post-content .ltx_title_section {
  font-weight: 600;
  line-height: 1.25;
  margin: 1.25em 0 .6em;
} */

/* 缩小标题与正文的间距 */
.post-content .ltx_document h1,
.post-content .ltx_document h2,
.post-content .ltx_document h3,
.post-content .ltx_document h4,
.post-content .ltx_document h5,
.post-content .ltx_document h6,
.post-content .ltx_document .ltx_title_section,
.post-content .ltx_document .ltx_title_subsection,
.post-content .ltx_document .ltx_title_subsubsection {
  margin-top: 0.0em;     
  margin-bottom: 0.0em;  
}

/* para and list */
.post-content p { margin: .5em 0; }
.post-content ul, .post-content ol { margin: .6em 0 .8em 1.4em; }


@media (max-width: 768px) {
  .post-content .ltx_eqn_table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .post-content .ltx_eqn_table .ltx_align_center {
    min-width: max-content;
  }
}

/* ===== Theorem env ===== */
.post-content .ltx_theorem,
.post-content .ltx_lemma,
.post-content .ltx_corollary,
.post-content .ltx_proposition,
.post-content .ltx_definition,
.post-content .ltx_assumption,
.post-content .ltx_example,
.post-content .ltx_remark {
  margin-top: 0.8em;   
  margin-bottom: 0.8em; 
}

/* ======  LaTeXML bib）====== */
.post-content .ltx_bibliography { margin-top: 2em; }
.post-content .ltx_title_bibliography {margin-bottom: 0.4em; }
.post-content .ltx_bibitem { margin: .2em 0; } 
.ltx_bibliography [class*="ltx_bib_cited"] {
  display: none !important;
}
.ltx_bibliography .ltx_bibitem .ltx_bibblock:has(.ltx_bib_links a) {
  font-size: 0 !important;   
}
.ltx_bibliography .ltx_bibitem .ltx_bibblock:has(.ltx_bib_links a) .ltx_bib_links a {
  font-size: 0 !important;   
}
.ltx_bibliography .ltx_bibitem .ltx_bibblock:has(.ltx_bib_links a) .ltx_bib_links a[href^="http"]::after {
  content: attr(href);
  font-size: 1.2rem;
  word-break: break-all;
  color: inherit;
}


/* position for cross ref */
:root { --nav-h: 56px; }  /* 56~72px  */
html { scroll-padding-top: var(--nav-h); }
.post-content [id] { scroll-margin-top: var(--nav-h); }