/* ==========================================================================
   The LaTeX notes: LaTeXML's ltx_* markup (latexml-oxide, through
   tools/tex2html.ts), styled to look like the old org pages. Only the
   design's tokens (site.css: --fg, --mut, --faint, --rule, --surface,
   --acc, --serif, --sans…), so both themes follow.
   ========================================================================== */

/* ---------- Sections ---------- */
/* Text flows around the floated contents box (site.css .doc .toc); framed
   blocks and headings keep their frames beside it, as .doc--centered main > … */
.doc--centered main :is(.ltx_title_section,.ltx_title_appendix,.ltx_title_bibliography,.ltx_title_subsection,
  .ltx_title_subsubsection,.ltx_figure,.ltx_theorem,details.ltx_proof,.ltx_bibliography,.footnotes){display:flow-root}
/* …but not the sections, which site.css makes flow-root as children of main. */
.doc--centered main > :is(section.ltx_section,section.ltx_appendix){display:block}
.ltx_title_section,.ltx_title_appendix,.ltx_title_bibliography{scroll-margin-top:1.5rem}
.ltx_title_subsection,.ltx_title_subsubsection{scroll-margin-top:1.5rem}
.ltx_title_subsubsection{font-size:1rem;font-weight:600;margin:1.6rem 0 .5rem}
.ltx_title_paragraph{display:inline;font-size:1rem;font-weight:600;margin:0 .5em 0 0}
/* Section numbers, as the old .header-section-number */
:is(.ltx_tag_section,.ltx_tag_subsection,.ltx_tag_subsubsection,.ltx_tag_appendix){
  color:var(--faint);font-weight:400;margin-right:.15rem;font-variant-numeric:lining-nums tabular-nums}
.ltx_title_appendix .ltx_tag_appendix{font-variant:small-caps}
.ltx_p:empty{display:none}

/* ---------- Inline text ---------- */
.ltx_font_bold{font-weight:600}
.ltx_font_italic{font-style:italic}
.ltx_font_upright{font-style:normal}
.ltx_font_smallcaps{font-variant:small-caps}
.ltx_font_typewriter{font-family:var(--mono);font-size:.86em}
.ltx_font_sansserif{font-family:var(--sans)}
.ltx_align_center{text-align:center}
.ltx_align_right{text-align:right}
.ltx_align_left{text-align:left}
.ltx_ref:not(.ltx_href){white-space:nowrap}
.ltx_ref_tag{font-variant-numeric:lining-nums}
cite.ltx_cite{font-style:normal}

/* ---------- Lists: LaTeXML writes the labels (ltx_tag) itself ---------- */
.doc main :is(ul.ltx_itemize,ol.ltx_enumerate,dl.ltx_description){list-style:none;padding-left:1.6rem;margin:0 0 1rem}
.ltx_item{position:relative}
.ltx_item > .ltx_tag_item{position:absolute;left:-1.6rem;width:1.3rem;text-align:right}
.ltx_item > .ltx_para > .ltx_p{margin:0 0 .3rem}
.ltx_item > .ltx_para:last-child > .ltx_p:last-child{margin-bottom:0}

/* ---------- Display math ---------- */
/* One table per display (ltx_equation) or alignment (ltx_equationgroup):
   formula cells, then the number at the right, as LaTeX. The table
   scrolls sideways on narrow screens instead of overflowing the page. */
.doc main table:is(.ltx_equation,.ltx_equationgroup){display:block;overflow-x:auto;overflow-y:hidden;max-width:100%;
  margin:.7rem 0 1rem;font-size:1rem;border:0;scroll-margin-top:1rem}
:is(.ltx_equation,.ltx_equationgroup) > tbody{display:table;width:100%;border-collapse:collapse}
.doc main .ltx_eqn_cell{padding:.12rem 0;border:0;vertical-align:middle;white-space:nowrap}
.ltx_eqn_center_padleft,.ltx_eqn_center_padright{width:50%}
.ltx_eqn_cell.ltx_align_right{text-align:right}
.ltx_eqn_cell.ltx_align_left{text-align:left}
.ltx_eqn_cell.ltx_align_center{text-align:center}
/* A new column pair of align (`a &= b & \text{note}`): LaTeX's gap between pairs. */
.doc main .ltx_eqn_cell.ltx_align_left + .ltx_eqn_cell.ltx_align_right{padding-left:2em}
.ltx_eqn_eqno{width:0;padding-left:1rem !important;color:var(--fg);font-variant-numeric:lining-nums}
.ltx_eqn_eqno .ltx_tag_equation{white-space:nowrap}
/* KaTeX: an equation table already spaces its rows. */
.ltx_eqn_cell .katex-display{margin:0;overflow:visible}
tbody[id]{scroll-margin-top:1rem}

/* ---------- Theorem-like blocks (as the old .theorem…, monochrome) ---------- */
.ltx_theorem{margin:1.6rem 0;padding:.9rem 1.15rem .3rem;scroll-margin-top:1rem}
:is(.ltx_theorem_theorem,.ltx_theorem_proposition,.ltx_theorem_lemma,.ltx_theorem_corollary,
    .ltx_theorem_definition,.ltx_theorem_assumption){
  background:var(--surface);border:1px solid var(--rule);border-left:3px solid var(--fg)}
:is(.ltx_theorem_definition,.ltx_theorem_assumption){border-left-style:double;border-left-width:4px}
:is(.ltx_theorem_remark,.ltx_theorem_eg){border-left:1px solid var(--rule);background:transparent;padding:.2rem 0 .1rem 1rem}
.ltx_theorem_exercise{border:1px dashed var(--faint);background:transparent}
.doc main h6.ltx_title_theorem{font-family:var(--serif);font-variant:small-caps;letter-spacing:.04em;font-size:1.02rem;
  font-weight:600;margin:0 0 .5rem;color:var(--fg);line-height:1.4}
.ltx_title_theorem .ltx_font_bold{font-weight:600}
/* Examples: a plain sans title, no small caps (as the old .example) */
.doc main .ltx_theorem_eg h6.ltx_title_theorem{font-family:var(--sans);font-variant:normal;letter-spacing:normal;font-size:.92rem}
.ltx_title_theorem .ltx_tag_theorem{font-variant-numeric:lining-nums}
/* The note in parentheses: the text's case, not small caps */
.ltx_title_theorem{text-transform:none}
.ltx_theorem .ltx_para:last-child .ltx_p:last-child{margin-bottom:.6rem}

/* Algorithms: ruled, the title on top (as algorithm2e's "ruled") */
.ltx_theorem_algorithm{border-top:1.5px solid var(--fg);border-bottom:1.5px solid var(--fg);padding:0 0 .3rem;margin:1.5rem 0;background:transparent}
.doc main .ltx_theorem_algorithm h6.ltx_title_theorem{font-family:var(--sans);font-variant:normal;letter-spacing:0;font-size:.85rem;
  border-bottom:1px solid var(--fg);padding:.25rem 0;margin:0 0 .4rem}

/* ---------- Proofs and answers: collapsed (details.proof, site.css) ---------- */
details.ltx_proof .ltx_para:last-child .ltx_p:last-child{margin-bottom:.4rem}

/* ---------- Figures ---------- */
.ltx_figure{margin:2rem 0;scroll-margin-top:1rem}
.ltx_figure > .ltx_p{margin:0}
.ltx_figure img.ltx_graphics{display:block;margin:0 auto;max-width:100%;height:auto}
figcaption.ltx_caption{font-family:var(--sans);font-size:.85rem;color:var(--mut);line-height:1.45;margin-top:.6rem;text-align:left}
.ltx_caption .ltx_tag_figure{color:var(--fg);font-weight:600}
.ltx_figure .dynamic-figure{text-align:left}

/* ---------- Tables (tabular) ---------- */
.ltx_tabular{border-collapse:collapse;margin:1rem auto}
.ltx_tabular .ltx_td,.ltx_tabular .ltx_th{padding:.3rem .7rem}
.ltx_border_t{border-top:1px solid var(--fg)}
.ltx_border_b{border-bottom:1px solid var(--fg)}
.ltx_border_tt{border-top:1.5px solid var(--fg)}
.ltx_border_bb{border-bottom:1.5px solid var(--fg)}

/* ---------- Abstract ---------- */
.ltx_abstract{display:flow-root;border-top:1px solid var(--fg);border-bottom:1px solid var(--fg);
  padding:.8rem .2rem .1rem;margin:0 0 1.6rem;font-size:.97rem}
.ltx_abstract > .ltx_title_abstract{display:none}

/* ---------- References (APA, hanging indent) ---------- */
.ltx_bibliography{font-size:.93rem}
.doc main ul.ltx_biblist{list-style:none;padding:0;margin:0}
.doc main .ltx_biblist > li.csl-entry{padding-left:1.5rem;text-indent:-1.5rem;margin:0 0 .5rem;text-align:left;hyphens:manual}
.ltx_biblist .ltx_tag_bibitem{display:none}

/* ---------- Footnotes (moved to the end by tex2html) ---------- */
.footnote-ref{font-family:var(--sans);font-size:.75em;vertical-align:super;line-height:0}
.footnote-ref a{text-decoration:none}
.footnotes{font-size:.9rem;color:var(--mut);margin-top:3rem}
.footnotes > h2{color:var(--fg)}
.footnotes ol{padding-left:1.3rem}
.footnote-back{margin-left:.3rem}

@media print{
  .ltx_equation,.ltx_equationgroup{overflow:visible}
}
