/* Index articles share an open reading canvas and a persistent section index. */
.article-page-main {
  --article-sticky-top: 97px;
  width: min(1480px, calc(100% - 2 * var(--sti-pad, 24px)));
  margin: 0 auto;
  padding: clamp(3rem, 5vw, 5rem) 0 6rem;
}
.article-shell { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.article-hero { max-width: 960px; margin: 0 auto; padding: 0 0 clamp(2.5rem, 5vw, 4rem); border: 0; text-align: center; }
.article-meta { justify-content: center; align-items: center; gap: .5rem 1.25rem; font-size: .875rem; font-weight: 400; }
.article-meta #article-date { color: var(--sti-ink); }
.article-category a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sti-muted); text-underline-offset: .25em; }
.article-category a:hover { color: var(--sti-ink); text-decoration: underline; }
.article-title { margin: 1.25rem 0 0; font-size: clamp(2.25rem, 4.4vw, 4.25rem); font-weight: 500; line-height: 1.12; letter-spacing: -.04em; text-wrap: balance; overflow-wrap: anywhere; }
.article-excerpt { max-width: none; margin: 0 0 2rem; font-size: 1.125rem; line-height: 1.65; }
.article-excerpt:empty { display: none; }
.article-reading-layout { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 800px) minmax(160px, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.article-reading-column { grid-column: 2; min-width: 0; }
.article-actions { margin: 0 0 2rem; padding-top: 1rem; border-top: 1px solid var(--sti-line); justify-content: space-between; flex-wrap: nowrap; min-height: 60px; }
.article-actions #article-author { color: var(--sti-muted); font-size: .8125rem; }
.article-citation { margin-left: auto; position: relative; flex-shrink: 0; }
.article-cite-button { min-height: 44px; padding: .5rem .25rem .5rem .75rem; border: 0; background: transparent; font-weight: 500; box-shadow: none; }
.article-cite-button:hover, .article-cite-button:focus-visible { background: transparent; box-shadow: none; transform: none; color: var(--sti-blue); }
.article-cite-status { position: absolute; right: 0; top: 100%; white-space: nowrap; font-size: .75rem; }
.article-cover { max-height: none; height: auto; object-fit: contain; border: 0; margin: 0 0 2rem; }
.article-pdf-preview { border: 0; }
.article-reading-column .latex-article { max-width: none; padding: 0; font-size: 1.125rem; line-height: 1.8; overflow-wrap: anywhere; }
.latex-article :is(h1, h2, h3, h4) { scroll-margin-top: calc(var(--article-sticky-top) + 24px); }
.latex-article :is(h2, h3) { line-height: 1.3; }
.latex-article img { box-shadow: none; }
.article-toc { position: sticky; top: var(--article-sticky-top); align-self: start; grid-column: 1; grid-row: 1; padding-top: 1rem; }
.article-toc[hidden] { display: none; }
.article-toc summary { display: none; }
.article-toc nav { max-height: calc(100dvh - var(--article-sticky-top) - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.article-toc ol { list-style: none; padding: 0; margin: 0; }
.article-toc li + li { margin-top: .25rem; }
.article-toc a { display: block; padding: .6rem 0; color: var(--sti-muted); font-size: .8125rem; line-height: 1.5; text-decoration: none; transition: color .15s; overflow-wrap: anywhere; }
.article-toc a:hover, .article-toc a[aria-current="location"] { color: var(--sti-ink); }
.article-toc a[aria-current="location"] { font-weight: 700; }
.article-toc .is-subsection a { padding-left: .75rem; font-size: .75rem; }
.article-page-main :is(a, button, summary):focus-visible { outline: 2px solid var(--sti-blue); outline-offset: 4px; border-radius: 2px; }
@media (max-width: 1199px) and (min-width: 1024px) {
  .article-reading-layout { grid-template-columns: 180px minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .content-page .site-header { position: sticky; top: 0; }
  .content-page .site-nav-panel[inert] { display: none; }
  .article-page-main { padding-top: 2rem; }
  .article-hero { padding-bottom: 2rem; }
  .article-reading-layout { display: block; }
  .article-toc { padding: 0; top: calc(var(--article-sticky-top) - 24px); z-index: 20; background: var(--sti-bg); border-block: 1px solid var(--sti-line); margin-bottom: 1.5rem; }
  .article-toc summary { min-height: 48px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: .875rem; list-style: none; }
  .article-toc summary::-webkit-details-marker { display: none; }
  .article-toc details[open] summary i { transform: rotate(180deg); }
  .article-toc nav { max-height: min(40dvh, 360px); padding-bottom: .75rem; }
  .article-toc a { padding-block: .75rem; min-height: 44px; }
  .article-reading-column .latex-article { font-size: 1rem; }
  .article-excerpt { font-size: 1rem; }
  .latex-article :is(h1, h2, h3, h4) { scroll-margin-top: calc(var(--article-sticky-top) + 64px); }
}

.article-reading-column .katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-block: .5rem; }

.article-category { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
