.article-layout {
  display: grid;
  grid-template-columns: 218px minmax(0, 790px);
  gap: 64px;
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 52px 0 72px;
  align-items: start;
}
.article-sidebar { position: sticky; top: 96px; min-width: 0; }
.article-toc { max-height: calc(100dvh - 128px); overflow-y: auto; }
.article-toc summary { color: var(--lab-faint); font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; cursor: pointer; }
.article-toc summary::after { content: '−'; float: right; padding-right: 4px; color: var(--lab-accent); }
.article-toc:not([open]) summary::after { content: '+'; }
.article-toc ol { list-style: none; padding: 0; margin: 18px 0 0; border-left: 1px solid var(--lab-border); }
.article-toc li { margin: 0; }
.article-toc a { display: block; padding: 7px 12px; border-left: 2px solid transparent; margin-left: -1px; font-size: 12px; line-height: 1.6; text-decoration: none; color: var(--lab-faint); }
.article-toc a:hover { color: var(--lab-accent); }
.article-toc a[aria-current="location"] { color: var(--lab-accent); border-left-color: var(--lab-accent); }
.article-content { min-width: 0; }
.article-header { margin-bottom: 38px; }
.article-back { display: inline-block; font-size: 13px; margin-bottom: 30px; color: var(--lab-faint); text-decoration: none; }
.article-header .eyebrow { margin-bottom: 14px; color: var(--lab-accent); }
.article-header h1 { margin: 0 0 24px; color: #302d2a; font-size: clamp(30px, 3.2vw, 42px); font-weight: 600; line-height: 1.2; letter-spacing: -.045em; }
.article-byline { display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 0; font-size: 13px; color: var(--lab-faint); }
.article-author { color: #302d2a; font-weight: 700; }
.article-body { font-size: 16px; line-height: 1.85; overflow-wrap: break-word; }
.article-body p { margin: 0 0 23px; }
.article-body blockquote { margin: 28px 0; padding: 0 0 0 20px; border-left: 2px solid var(--lab-border); }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body ul { list-style: disc; margin: 0 0 26px; padding-left: 24px; }
.article-body li { padding-left: 4px; margin-bottom: 14px; }
.article-body li p { margin-bottom: 10px; }
.article-body h2 { font-size: 25px; line-height: 1.3; font-weight: 600; color: #302d2a; letter-spacing: -.025em; margin: 58px 0 24px; padding-top: 30px; border-top: 1px solid var(--lab-border); }
.article-body a, .article-end a, .article-bibliography-download a { color: var(--lab-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body a:hover, .article-back:hover { text-decoration: underline; }
.article-body .citation { font-size: .9em; }
.article-body .citation a { text-decoration: none; }
.article-body strong { font-weight: 700; }
.article-body figure { margin: 32px 0 12px; }
.article-body figure img { display: block; width: 100%; height: auto; background: white; border: 1px solid var(--lab-border); border-radius: 4px; }
.article-body figcaption { color: var(--lab-faint); font-size: 12px; line-height: 1.6; margin-top: 10px; text-align: center; }
.article-body figure + p:has(> em:only-child) { font-size: 12px; line-height: 1.7; color: var(--lab-faint); margin-bottom: 30px; }
.article-thesis { margin: 28px 0; padding: 16px 0; border-block: 1px solid var(--lab-border); font-weight: 600; font-size: 15px; }
.article-thesis p { margin: 0; }
.article-table { overflow-x: auto; margin: 28px 0; }
.article-table table { width: 100%; min-width: 690px; border-collapse: collapse; font-size: 12px; line-height: 1.65; }
.article-table caption { text-align: left; margin-bottom: 14px; font-size: 13px; }
.article-table th { text-align: left; padding: 12px 12px 12px 0; font-weight: 700; vertical-align: bottom; border-bottom: 2px solid var(--lab-border); }
.article-table td { padding: 16px 12px 16px 0; vertical-align: top; border-bottom: 1px solid var(--lab-border); }
.article-table th:first-child { width: 16%; }
.article-table th:nth-child(2) { width: 22%; }
.article-equation { position: relative; display: flex; gap: 16px; align-items: center; margin: 28px 0; }
.article-equation > p:first-child { min-width: 0; overflow-x: auto; flex: 1; padding: 6px 2px; margin: 0; }
.article-equation > p:last-child { flex: 0 0 auto; margin: 0; color: var(--lab-faint); font-size: 13px; }
.equation-number::before { content: '('; }
.equation-number::after { content: ')'; }
.article-body .katex { font-size: 1.05em; }
.article-body .katex-display { margin: .5em 0; text-align: left; }
.article-body .katex-display > .katex { text-align: left; }
.article-body .csl-bib-body { font-size: 13px; line-height: 1.8; }
.article-body .csl-entry { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; margin: 0 0 24px; overflow-wrap: anywhere; }
.csl-left-margin { color: var(--lab-faint); }
.csl-right-inline p { margin: 0; }
.reference-back { display: inline-block; margin-left: 8px; text-decoration: none; }
.article-bibliography-download { font-size: 13px; margin: 30px 0; }
.article-end { border-top: 1px solid var(--lab-border); padding-top: 28px; font-size: 14px; }
.article-page :is(h2, .article-header, .article-equation, .csl-entry, .citation a, figure, table) { scroll-margin-top: 16px; }
.article-page a:focus-visible, .article-page summary:focus-visible, .article-table:focus-visible { outline: 2px solid var(--lab-accent); outline-offset: 4px; }
.article-skip { position: fixed; left: 20px; top: -100px; z-index: 50; padding: 10px 16px; background: var(--lab-bg); color: var(--lab-accent); }
.article-skip:focus { top: 10px; }
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 34px; width: calc(100% - 48px); }
}
@media (max-width: 760px) {
  .article-layout { display: flex; flex-direction: column; width: calc(100% - 36px); padding-top: 26px; gap: 28px; }
  .article-sidebar { position: static; width: 100%; }
  .article-toc { max-height: none; border-bottom: 1px solid var(--lab-border); padding-bottom: 18px; }
  .article-toc summary { font-size: 12px; }
  .article-toc a { padding-block: 9px; font-size: 13px; }
  .article-content { width: 100%; }
  .article-header h1 { font-size: 30px; }
  .article-back { margin-bottom: 22px; }
  .article-body { font-size: 15px; line-height: 1.85; }
  .article-body h2 { font-size: 22px; margin-top: 44px; padding-top: 24px; }
  .article-byline { font-size: 12px; }
  .article-byline time { flex-basis: 100%; margin-top: 2px; }
  .article-body .csl-entry { grid-template-columns: 26px minmax(0, 1fr); gap: 6px; }
}
@media print {
  .article-sidebar, .site-header, .site-footer, .article-skip, .article-back, .article-end { display: none; }
  .article-layout { display: block; width: 100%; padding: 0; }
  .article-content { max-width: none; }
  .article-table { overflow: visible; }
  .article-table table { min-width: 0; }
  .article-body figure, .article-equation { break-inside: avoid; }
}
