
.ltx_page_content{ max-width: 70ch; margin: auto; }

body {
  font-family: Times New Roman, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height:1.3;
}

h6.ltx_title_contents{margin:0.5rem 0;}
/*
.ltx_enumerate {
  padding-left: 1em;  
line-height: inherit;
} */

/* Works for \begin{itemize} and \begin{enumerate} output by LaTeXML */
ul.ltx_itemize, ol.ltx_enumerate {
  margin: 0.5em 0;
  padding: 0;
  list-style: none;           /* LaTeXML usually renders custom tags anyway */
}

/* Each list item becomes a 2-column row: [tag][content] */
ul.ltx_itemize > li.ltx_item,
ol.ltx_enumerate > li.ltx_item {
  /* Prefer Grid with first-line baseline; fall back to flex */
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 0.6rem;
  align-items: first baseline; /* makes the number/bullet align with first text line */
}

/* Fallback for older engines (if first baseline is unsupported) */
@supports not (align-items: first baseline) {
  ul.ltx_itemize > li.ltx_item,
  ol.ltx_enumerate > li.ltx_item,
  ol.ltx_toclist_section > li.ltx_tocentry_subsection {
    display: flex;
    align-items: baseline;   /* aligns to first line of the content box */
  }
}

/* Label (bullet/number). LaTeXML commonly uses one of these spans. */
li.ltx_item > .ltx_item_tag,
li.ltx_item > .ltx_tag,
li.ltx_item > .ltx_refnum {
  /* Neutralize any floats from built-ins */
  float: none !important;
  grid-column: 1;
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: right;
  min-width: 1ch;           /* keeps multi-digit numbers tidy */
  padding-inline-end: 0.2rem;
  margin-left:0em;
}

/* Item content container (LaTeXML varies: p/div/span) */
.ltx_item > .ltx_item_content,
.ltx_item > .ltx_para,
.ltx_item > p,
.ltx_item > div {
  grid-column: 2;
  margin: 0;                /* remove extra gap under the marker line */
  /* Expose a proper first-line baseline for baseline alignment: */
  display: inline-block;
  width: 100%;
  line-height: inherit;     /* match the surrounding text line height */
}

/* Math inline: ensure it participates in the baseline, not middle/top */
math, .ltx_Math { vertical-align: baseline; }

/* Nested lists indent nicely without breaking the grid */
.ltx_item .ltx_itemize,
.ltx_item .ltx_enumerate {
  margin: 0.2em 0 0.6em 0.4rem; /* tweak as you like */
}

/* Description lists (optional, for completeness) */
dl.ltx_description { margin: 1em 0; }
dl.ltx_description > dt { font-weight: 600; }
dl.ltx_description > dd { margin: 0 0 0 1.4rem; }

