/* Article reading layer: source prose and figures remain authoritative. */
.main-content__body {
  max-width: 72ch;
  color: var(--gh-ink);
  font-size: 1.125rem;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.main-content__body :is(p, ul, ol, dl) {
  font-size: inherit;
  line-height: inherit;
  letter-spacing: normal;
  margin-block: 0 1.4em;
}
.main-content__body :is(h2, h3, h4, h5, h6) {
  color: var(--gh-ink);
  margin-block: 2.25em .7em;
  font-weight: 600;
  text-wrap: balance;
  scroll-margin-top: 2rem;
}
.main-content__body [data-article-heading]::before { content: none; counter-increment: none; }
.main-content__body [data-article-number]::before {
  content: attr(data-article-number) " ";
  counter-increment: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  padding: 0;
  position: static;
}
.main-content__body .aside-heading { font-size: 1.25rem; }
.main-content__body h2 { font-size: 1.75rem; }
.main-content__body h3 { font-size: 1.5rem; }
.main-content__body :is(h4, h5, h6) { font-size: 1.25rem; }
/* Native markers retain ordered-list start/value/reversed semantics. */
.main-content__body :is(ul, ol):not(.easy-footnotes-wrapper) {
  margin-block: 1.5rem 2rem;
  padding-inline-start: 2rem;
}
.main-content__body ul:not(.easy-footnotes-wrapper) { list-style: square outside; }
.main-content__body ul:not(.easy-footnotes-wrapper) > li {
  list-style: inherit;
  padding: .45rem 0 .45rem .5rem;
  margin: 0;
  text-wrap: pretty;
}
.main-content__body ul:not(.easy-footnotes-wrapper) > li::before { content: none; }
.main-content__body ul > li::marker { color: var(--gh-link); font-size: .8em; }
.main-content__body ol:not(.easy-footnotes-wrapper) { padding-inline-start: 1.5rem; }
.main-content__body ol:not(.easy-footnotes-wrapper) > li {
  padding: .65rem 0 .65rem .2rem;
  margin: 0;
  border: 0;
  text-wrap: pretty;
}
.main-content__body ol:not(.easy-footnotes-wrapper) > li:first-child { border-top: 0; }
.main-content__body ol:not(.easy-footnotes-wrapper) > li::marker {
  color: var(--gh-muted);
  font-size: .9em;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.main-content__body li > p:last-child { margin-bottom: 0; }
.main-content__body li > :is(ul, ol):not(.easy-footnotes-wrapper) { margin-block: .65rem .25rem; padding-inline-start: 1.5rem; }
.main-content__body li > ul > li { padding-block: .25rem; }
.main-content__body li > ol > li { padding-block: .5rem; border: 0; }
.main-content__body li > ol > li:first-child { border-top: 0; }
@media (min-width: 700px) {
  .main-content__body > ul[data-article-list="compact"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
    padding-inline-start: 1.5rem;
  }
  .main-content__body > ul[data-article-list="compact"] > li {
    padding-block: .8rem;
    border-bottom: 1px solid var(--gh-soft-border);
  }
}
.main-content__body a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
.main-content__body [id] { scroll-margin-top: 2rem; }
.main-content__body :is(figure, .wp-caption) { margin-block: 2rem; }
.main-content__body :is(figcaption, .wp-caption-text) { font-size: 1rem; line-height: 1.55; color: var(--gh-muted); }
/* Tables use the article's full canvas; prose retains its reading measure. */
.article-with-tables .main-content__body { max-width: none; }
/* Wider canvas, same reading measure: never wider than the viewport, because
   legacy figures carry an inline pixel width larger than a phone screen. */
.article-with-tables .main-content__body > :not(.article-table-region) { max-width: min(72ch, 100%); }
@media (min-width: 992px) {
  .article-with-tables .grid-container { grid-template-areas: 'header right' 'main main'; }
}
.main-content__body .article-table-region {
  max-width: 100%;
  overflow-x: auto;
  margin-block: 2rem 2.5rem;
  scrollbar-color: var(--gh-border) var(--gh-paper);
}
.article-table-region:focus-visible { outline: 2px solid var(--gh-link); outline-offset: 4px; }
/* The legacy script injects this invalid paragraph inside wide tables. The
   region already provides full-width viewing and native horizontal scrolling. */
.article-table-region .expand-button { display: none !important; }
.main-content__body .article-table-region :is(table, table.tablepress) {
  display: table;
  width: 100%;
  min-width: 34rem;
  max-width: none;
  overflow: visible;
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  border-collapse: collapse;
  table-layout: auto;
  margin: 0;
  color: var(--gh-ink);
  background: white;
}
.main-content__body .article-table-region :is(td, th) {
  vertical-align: top;
  text-align: left;
  min-width: 0;
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--gh-soft-border);
  background: transparent;
}
.main-content__body .article-table-region thead th {
  /* Override the legacy theme's forced 10rem header widths. */
  width: auto !important;
  color: var(--gh-emphasis);
  background: var(--gh-paper);
  font-size: .9375rem;
  font-weight: 600;
  border-top: 1px solid var(--gh-soft-border);
  border-bottom: 1px solid var(--gh-border);
}
.main-content__body .article-table-region tbody tr:nth-child(even) > * { background: #fffaf6; }
.main-content__body .article-table-region tbody tr:hover > * { background: var(--gh-paper); }
.main-content__body .article-table-region :is(p, ul, ol) { font-size: inherit; line-height: inherit; margin-block: 0 .75rem; }
.main-content__body .article-table-region :is(ul, ol) { padding-inline-start: 1.15rem; }
.main-content__body .article-table-region li { padding: .2rem 0 .2rem .15rem; }
.main-content__body .article-table-region :is(ul, ol) > br { display: none; }
.main-content__body .article-table-region :is(td, th) > :last-child { margin-bottom: 0; }
.main-content__body .article-table-region a { text-decoration-color: var(--gh-soft-border); }
.main-content__body .article-table-region a:hover { text-decoration-color: currentColor; }
.main-content__body .article-table-region table[data-article-table="medium"] { min-width: 46rem; }
.main-content__body .article-table-region table[data-article-table="wide"] { min-width: 62rem; }
.main-content__body .article-table-region table[data-article-table="studies"] { min-width: 70rem; table-layout: fixed; }
.main-content__body table[data-article-table="studies"] :is(td, th):nth-child(1) { width: 19% !important; }
.main-content__body table[data-article-table="studies"] :is(td, th):nth-child(2) { width: 14% !important; }
.main-content__body table[data-article-table="studies"] :is(td, th):nth-child(3) { width: 10% !important; }
.main-content__body table[data-article-table="studies"] :is(td, th):nth-child(4) { width: 10% !important; }
.main-content__body table[data-article-table="studies"] :is(td, th):nth-child(5) { width: 10% !important; }
.main-content__body table[data-article-table="studies"] :is(td, th):nth-child(6) { width: 24% !important; }
.main-content__body table[data-article-table="studies"] :is(td, th):nth-child(7) { width: 13% !important; }
.main-content__body #tablepress-stem-cell-risks { table-layout: fixed; }
.main-content__body #tablepress-stem-cell-risks :is(td, th):nth-child(1) { width: 22% !important; }
.main-content__body #tablepress-stem-cell-risks :is(td, th):nth-child(2) { width: 44% !important; }
.main-content__body #tablepress-stem-cell-risks :is(td, th):nth-child(3) { width: 34% !important; }

/* A reusable term/definition composition, from IBS types to SCD comparisons. */
.main-content__body dl[data-article-definitions] { margin-block: 1.75rem 2.25rem; }
.main-content__body .article-definition {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(0, 3fr);
  column-gap: 1.5rem;
  padding-block: 1.15rem;
  border-top: 1px solid var(--gh-soft-border);
}
.main-content__body .article-definition:last-child { border-bottom: 1px solid var(--gh-soft-border); }
.main-content__body .article-definition dt {
  grid-column: 1;
  margin: 0;
  color: var(--gh-link);
  font-weight: 600;
  line-height: 1.6;
}
.main-content__body .article-definition dd {
  grid-column: 2;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}
.main-content__body .article-definition :is(dd:empty, dd > p:empty) { display: none; }
.main-content__body .article-definition dd > :last-child { margin-bottom: 0; }
.main-content__body dl[class*="qna"] dt { margin-block: 1.75rem .75rem; font-weight: 600; color: var(--gh-ink); }
.main-content__body dl[class*="qna"] dd { margin-inline-start: 0; }

/* Use native markers instead of the legacy zero-width generated counter. */
.main-content .main-content__body ol.easy-footnotes-wrapper {
  list-style: decimal outside;
  padding: 1.5rem 0 0 2rem;
  margin-block: 3rem 2rem;
  border-top: 1px solid var(--gh-border);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gh-muted);
}
.main-content__body .easy-footnotes-wrapper .easy-footnote-single {
  display: list-item;
  padding: 0 0 1rem .4rem;
  margin: 0;
  counter-increment: none;
}
.main-content__body .easy-footnote-single::before { content: none; display: none; }
.main-content__body .easy-footnote-single::marker { color: var(--gh-link); font-variant-numeric: tabular-nums; }
.main-content__body .easy-footnote a,
.main-content__body .easy-footnote a:hover,
.main-content__body a.easy-footnote-to-top {
  text-decoration: none;
  border-bottom: 0;
}
.main-content__body .easy-footnote a { white-space: nowrap; }
.main-content__body a.easy-footnote-to-top {
  display: inline-block;
  padding: .15rem .35rem;
  margin-inline-start: .3rem;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}
.main-content__body a.easy-footnote-to-top:hover { background: var(--gh-paper); color: var(--gh-link-hover); }
.main-content__body .easy-footnote-margin-adjust { white-space: normal; }
.main-content__body :is(.easy-footnote a, .easy-footnote-to-top):focus-visible {
  outline: 3px solid var(--gh-link);
  outline-offset: 3px;
}
.main-content__body .easy-footnote-single:has(:target) { background: var(--gh-paper); }
@media (max-width: 600px) {
  .main-content__body { font-size: 1.0625rem; }
  .main-content__body h2 { font-size: 1.5rem; }
  .main-content__body h3 { font-size: 1.3125rem; }
  .main-content__body .article-definition { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .main-content__body .article-definition dd { grid-column: 1; }
  .main-content .main-content__body ol.easy-footnotes-wrapper { padding-inline-start: 1.65rem; }
}
