:root {
  --fg: #1a1a1a;
  --fg-muted: #5a5a5a;
  --fg-faint: #8a8a8a;
  --rule: #d6d6d6;
  --rule-soft: #ececec;
  --chip-bg: #f5f4ef;
  --chip-br: #e5e3da;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 18px;
}

body,
.ltx_document,
.ltx_p,
.ltx_text,
.ltx_title,
.ltx_abstract,
.ltx_theorem,
.ltx_proof,
.ltx_ref,
.ltx_bibitem,
.ltx_bibblock,
.ltx_caption,
.ltx_tag,
figcaption,
.ltx_tabular,
.ltx_note,
.ltx_toc,
.ltx_tocentry,
.ltx_centering,
.ltx_authors,
.ltx_dates {
  font-family: var(--sans) !important;
}

body {
  margin: 0;
  color: var(--fg);
  background: #fff;
  font-size: 17px !important;
  line-height: 1.6 !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: #315f68;
  text-underline-offset: 0.14em;
}

a:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid #d8e6e8;
  outline-offset: 3px;
}

.ltx_page_main,
.ltx_page_content {
  max-width: 900px !important;
  margin: 0 auto !important;
}

article.ltx_document {
  max-width: none !important;
  padding: 20px 32px 48px !important;
}

.ltx_title_document {
  font-size: 1.55rem !important;
  line-height: 1.25 !important;
  letter-spacing: -0.015em;
}

.ltx_Math { font-size: 1.22em !important; }
math[display="block"] { font-size: 1.28em !important; }

.ltx_graphics {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  margin-inline: auto;
}

.nomo-diagram {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.nomo-topnav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  box-sizing: border-box;
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 32px;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.nomo-topnav a {
  color: var(--fg-muted);
  text-decoration: none;
}

.nomo-topnav a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.nomo-topnav .brand {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nomo-toc {
  margin: 8px 0 48px;
  padding: 18px 22px;
  border-left: 3px solid var(--chip-br);
  border-radius: 2px;
  background: var(--chip-bg);
}

.nomo-toc-heading {
  margin: 0 0 14px !important;
  color: var(--fg);
  font-family: var(--sans) !important;
  font-size: 21px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}

.nomo-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nomo-toc-list > li {
  margin: 6px 0;
  font-size: 15px;
}

.nomo-toc-list > li > a {
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
}

.nomo-toc-list > li > a:hover { text-decoration: underline; }

.nomo-toc-sublist {
  margin: 4px 0 10px 16px !important;
  font-size: 14px;
}

.nomo-toc-sublist > li { margin: 2px 0; }

.nomo-toc-sublist > li > a {
  color: var(--fg-muted);
  font-weight: 400;
  text-decoration: none;
}

.nomo-toc-sublist > li > a:hover {
  color: var(--fg);
  text-decoration: underline;
}

section[id],
figure[id],
.ltx_bibitem[id] { scroll-margin-top: 18px; }

.ltx_title_section {
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 0.25em;
}

figure.ltx_figure,
figure.ltx_table {
  max-width: 100%;
  box-sizing: border-box;
  margin: 30px 0 !important;
}

figure.ltx_figure > .ltx_inline-block,
figure.ltx_figure > .ltx_centering {
  display: block !important;
  max-width: 100% !important;
}

.ltx_caption {
  max-width: 100%;
  box-sizing: border-box;
  color: #383d40;
  font-size: 0.88rem !important;
  line-height: 1.48 !important;
}

/* Remove point-widths inherited from tabularx and longtable. */
figure.ltx_table .ltx_inline-block,
figure.ltx_table .ltx_p[style*="width:"] {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

figure.ltx_table .ltx_p {
  margin: 0 !important;
  line-height: 1.42 !important;
}

.nomo-table-scroll {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 2px 0 8px;
  scrollbar-color: #b6bec1 transparent;
}

.nomo-table-scroll > table.ltx_tabular {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
}

.nomo-table-scroll .ltx_text[style*="font-size:"] {
  font-size: 100% !important;
}

.nomo-table-scroll th,
.nomo-table-scroll td {
  box-sizing: border-box;
  padding: 7px 8px !important;
  vertical-align: top !important;
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.nomo-table-scroll th {
  background: #f6f6f4;
  font-weight: 600;
}

/* Table-specific proportions keep prose columns legible. */
#S3\.T1 th:nth-child(1), #S3\.T1 td:nth-child(1) { width: 7%; }
#S3\.T1 th:nth-child(2), #S3\.T1 td:nth-child(2) { width: 30%; }
#S3\.T1 th:nth-child(3), #S3\.T1 td:nth-child(3) { width: 28%; }
#S3\.T1 th:nth-child(4), #S3\.T1 td:nth-child(4) { width: 35%; }

#S4\.T2 th:nth-child(1), #S4\.T2 td:nth-child(1) { width: 22%; }
#S4\.T2 th:nth-child(2), #S4\.T2 td:nth-child(2) { width: 21%; }
#S4\.T2 th:nth-child(3), #S4\.T2 td:nth-child(3) { width: 25%; }
#S4\.T2 th:nth-child(4), #S4\.T2 td:nth-child(4) { width: 32%; }

#S6\.T5 th:nth-child(1), #S6\.T5 td:nth-child(1) { width: 13%; }
#S6\.T5 th:nth-child(2), #S6\.T5 td:nth-child(2) { width: 27%; }
#S6\.T5 th:nth-child(3), #S6\.T5 td:nth-child(3) { width: 30%; }
#S6\.T5 th:nth-child(4), #S6\.T5 td:nth-child(4) { width: 30%; }

#S11\.T6 th:nth-child(1), #S11\.T6 td:nth-child(1) { width: 24%; }
#S11\.T6 th:nth-child(2), #S11\.T6 td:nth-child(2) { width: 13%; }
#S11\.T6 th:nth-child(3), #S11\.T6 td:nth-child(3) { width: 31%; }
#S11\.T6 th:nth-child(4), #S11\.T6 td:nth-child(4) { width: 32%; }

#S13\.T7 th:nth-child(1), #S13\.T7 td:nth-child(1) { width: 25%; }
#S13\.T7 th:nth-child(2), #S13\.T7 td:nth-child(2) { width: 75%; }

/* The eight-column evidence map is intentionally wide and scrollable. */
#S5\.T3 .nomo-table-scroll {
  width: min(1180px, calc(100vw - 36px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

#S5\.T3 .nomo-table-scroll > table.ltx_tabular {
  min-width: 1080px;
  font-size: 12.25px !important;
}

#S5\.T3 .nomo-table-scroll th,
#S5\.T3 .nomo-table-scroll td { padding: 6px 7px !important; }

.ltx_equation,
.ltx_equationgroup {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.ltx_theorem_proposition,
.ltx_theorem_theorem,
.ltx_theorem_lemma,
.ltx_theorem_corollary,
.ltx_theorem_definition {
  margin: 24px 0 !important;
  padding: 10px 20px !important;
  border-left: 3px solid var(--rule) !important;
  background: #fbfaf7;
}

.ltx_bibliography { margin-top: 54px !important; }
.ltx_bibitem { font-size: 0.9rem; line-height: 1.48; }
.ltx_bibitem:target { background: #fff6ce; }

footer.ltx_page_footer { display: none !important; }

.nomo-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  max-width: 900px;
  box-sizing: border-box;
  margin: 72px auto 0;
  padding: 24px 32px 48px;
  color: var(--fg-muted);
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13px;
}

.nomo-footer a {
  color: var(--fg-muted);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.nomo-footer a:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

@media (max-width: 640px) {
  body { font-size: 16px !important; }
  article.ltx_document { padding: 16px 18px 40px !important; }
  .nomo-topnav,
  .nomo-footer { padding: 20px 18px; }
  .ltx_Math { font-size: 1.16em !important; }
  math[display="block"] { font-size: 1.2em !important; }
  .nomo-toc { padding: 16px 18px; }
  .nomo-table-scroll > table.ltx_tabular { min-width: 720px; }
  #S5\.T3 .nomo-table-scroll > table.ltx_tabular { min-width: 1080px; }
}

@media print {
  .nomo-topnav { display: none !important; }
  .ltx_page_main,
  .ltx_page_content { max-width: none !important; }
  article.ltx_document { padding: 0 !important; }
  .nomo-table-scroll { overflow: visible; }
  #S5\.T3 .nomo-table-scroll {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
}
