/* Article/archive presentation only. Existing admin typography and archive-column settings remain authoritative. */
body.article-shell-page #site-main .article-frame {
  --reader-measure: 95ch;
  --reader-aside: clamp(178px, 17vw, 224px);
  --reader-gap: clamp(20px, 3vw, 42px);
  inline-size: min(calc(100% - var(--hl-gutter, 20px) * 2), calc(var(--reader-measure) + var(--reader-aside) + var(--reader-gap)));
  max-inline-size: none;
  margin-inline: auto;
}
body.article-shell-page #site-main .article-hero {
  margin: 0;
  min-block-size: 0;
  padding: 0;
  background: var(--sot-surface)!important;
  border-block-start: 0;
  border-block-end: 1px solid var(--sot-line);
  box-shadow: none;
}
body.article-shell-page #site-main .article-hero::before,
body.article-shell-page #site-main .article-hero::after { display: none; }
body.article-shell-page #site-main .article-hero__inner {
  width: auto;
  max-inline-size: var(--reader-measure);
  margin: 0;
  padding-block: clamp(14px,2.45vw,34px) clamp(16px,2.2vw,28px);
}
body.article-shell-page #site-main .article-back-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-block-size: 42px;
  margin: -5px 0 .45rem;
  padding: 0;
  color: var(--sot-link);
  text-decoration: none;
  font-weight: 640;
}
body.article-shell-page #site-main .article-back-link:hover { text-decoration: underline; }
body.article-shell-page #site-main .article-back-link svg { width: 16px; height: 16px; flex: none; }
html[dir="rtl"] body.article-shell-page #site-main .article-back-link svg { transform: scaleX(-1); }
body.article-shell-page #site-main #articleKicker {
  margin: 0;
  color: var(--sot-link);
  line-height: 1.45;
  letter-spacing: .065em;
}
body.article-shell-page #site-main #articleTitle {
  margin: .35rem 0 .5rem;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
html:not([data-typo-article-title="on"]) body.article-shell-page #site-main #articleTitle { line-height: 1.3; }
body.article-shell-page #site-main #articleExcerpt {
  margin: .35rem 0 0;
  max-inline-size: var(--reader-measure);
  line-height: 1.6;
  color: var(--sot-text-soft);
  overflow-wrap: anywhere;
}
body.article-shell-page #site-main .article-head-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .35rem 1rem;
  margin-top: .65rem;
}
body.article-shell-page #site-main .article-head-meta[hidden] { display: none; }
body.article-shell-page #site-main .article-byline {
  min-inline-size: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .55rem;
  margin: 0;
  color: var(--sot-text-soft);
  font-size: var(--hl-reading-size,10pt);
}
body.article-shell-page #site-main .article-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
body.article-shell-page #site-main .article-tools[hidden] { display: none; }
body.article-shell-page #site-main .article-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-block-size: 44px;
  padding-inline: .65rem;
  border-radius: 0;
  border: 1px solid var(--sot-line);
  background: var(--sot-surface);
  color: var(--sot-link);
  font: inherit;
  font-weight: 640;
  cursor: pointer;
}
body.article-shell-page #site-main .article-tools button:hover,
body.article-shell-page #site-main .article-tools button[aria-pressed="true"] { background: var(--sot-surface-2); border-color: var(--sot-secondary); }
body.article-shell-page #site-main .article-tools svg { width: 16px; height: 16px; flex: none; }
body.article-shell-page #site-main .article-tool-status { margin: 0; color: var(--sot-text-soft); }
body.article-shell-page #site-main .article-tool-status:not(:empty) { flex-basis: 100%; }
body.article-shell-page #site-main .article-tool-status:empty { position: absolute; }
body.article-shell-page #site-main .article-link-fallback { display: grid; gap: .3rem; width: 100%; max-inline-size: 48rem; }
body.article-shell-page #site-main .article-link-fallback[hidden] { display: none; }
body.article-shell-page #site-main .article-link-fallback input { min-block-size: 40px; padding-inline: .5rem; min-inline-size: 0; }
body.article-shell-page #site-main .article-content-section {
  padding: clamp(18px,2.6vw,36px) 0 clamp(26px,4.5vw,62px);
  margin: 0;
}
body.article-shell-page #site-main .article-reading-layout {
  display: grid;
  grid-template-columns: minmax(0,var(--reader-measure));
  grid-template-areas: "reader";
  gap: .9rem var(--reader-gap);
  align-items: start;
}
body.article-shell-page #site-main .article-reading-layout:has(>#articleToc:not([hidden])) {
  grid-template-areas: "toc" "reader";
}
body.article-shell-page #site-main .article-reader {
  grid-area: reader;
  min-inline-size: 0;
  max-inline-size: var(--reader-measure);
  inline-size: 100%;
  margin: 0;
  padding: 0;
}
body.article-shell-page #site-main #articleBody {
  min-inline-size: 0;
  max-inline-size: var(--reader-measure);
  margin-inline: 0;
  overflow-wrap: anywhere;
}
html:not([data-typo-article-body="on"]) body.article-shell-page #site-main #articleBody { line-height: 1.72; }
html:not([data-typo-article-body="on"]) body.article-shell-page #site-main #articleBody :is(p,li) { line-height: 1.72; }
body.article-shell-page #site-main #articleBody > :first-child { margin-block-start: 0; }
body.article-shell-page #site-main #articleBody :is(h2,h3,h4,h5,h6) {
  scroll-margin-block-start: calc(var(--shell-offset,74px) + .85rem);
  overflow-wrap: anywhere;
}
body.article-shell-page #site-main #articleBody :is(p,ul,ol,dl,blockquote,.article-table-wrap,figure,pre) { margin-block-end: 1em; }
body.article-shell-page #site-main #articleBody img { max-inline-size: 100%; block-size: auto; }
body.article-shell-page #site-main #articleBody .article-media-unavailable {
  display: inline-block;
  padding: .35em .6em;
  border-inline-start: 2px solid var(--sot-line-strong);
  color: var(--sot-text-soft);
  background: var(--sot-surface-2);
  overflow-wrap: anywhere;
}
body.article-shell-page #site-main #articleBody .article-table-wrap { inline-size: 100%; max-inline-size: 100%; overflow: auto; }
body.article-shell-page #site-main #articleBody .article-table-wrap > table { display: table; min-inline-size: 100%; margin: 0; }
body.article-shell-page #site-main #articleToc {
  grid-area: toc;
  position: static;
  min-inline-size: 0;
  max-block-size: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 1px solid var(--sot-line);
  border-radius: 0;
  background: var(--sot-surface);
  box-shadow: none;
}
body.article-shell-page #site-main #articleToc[hidden] { display: none; }
body.article-shell-page #site-main #articleTocHeading {
  display: flex;
  min-block-size: 44px;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-inline: .85rem;
  color: var(--sot-heading);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
body.article-shell-page #site-main #articleTocHeading::-webkit-details-marker { display: none; }
body.article-shell-page #site-main #articleTocHeading svg { flex: none; width: 16px; height: 16px; }
body.article-shell-page #site-main #articleToc details[open] #articleTocHeading svg { transform: rotate(180deg); }
body.article-shell-page #site-main #articleTocLinks {
  display: grid;
  gap: 0;
  padding: .3rem .45rem .55rem;
  border-block-start: 1px solid var(--sot-line);
  max-block-size: min(48vh, 24rem);
  overflow: auto;
}
body.article-shell-page #site-main #articleTocLinks a {
  display: flex;
  align-items: center;
  padding: .55rem .5rem;
  min-block-size: 37px;
  font-size: var(--hl-reading-size,10pt);
  line-height: 1.44;
  overflow-wrap: anywhere;
}
body.article-shell-page #site-main #articleTocLinks a[data-depth="nested"] { padding-inline-start: 1.12rem; }
body.article-shell-page #site-main #articleTocLinks a[aria-current="location"] { border-inline-start-color: var(--sot-secondary); background: var(--sot-surface-2); }
body.article-shell-page #site-main .reading-progress { pointer-events: none; }
body.article-shell-page #site-main #readingProgressBar { inline-size: 0; background: var(--sot-secondary); }
@media (min-width: 940px) {
  body.article-shell-page #site-main .article-reading-layout:has(>#articleToc:not([hidden])) {
    grid-template-columns: minmax(0,var(--reader-measure)) var(--reader-aside);
    grid-template-areas: "reader toc";
  }
  body.article-shell-page #site-main #articleToc { position: sticky; inset-block-start: calc(var(--shell-offset,74px) + 12px); }
}
html[dir="rtl"] body.article-shell-page #site-main :is(#articleTitle,#articleKicker) { letter-spacing: normal; }

body.articles-shell-page #site-main .archive-frame {
  inline-size: min(100% - var(--hl-gutter,20px) * 2, 1230px);
  max-inline-size: none;
  margin-inline: auto;
}
body.articles-shell-page #site-main .archive-intro {
  min-block-size: 0;
  margin: 0;
  padding: 0;
  background: var(--sot-surface)!important;
}
body.articles-shell-page #site-main .archive-intro::after,
body.articles-shell-page #site-main .archive-intro::before { display: none; }
body.articles-shell-page #site-main .archive-intro-copy {
  max-inline-size: 72ch;
  padding-block: clamp(18px,3.6vw,50px);
}
body.articles-shell-page #site-main .archive-kicker {
  margin: 0 0 .4em;
  color: var(--sot-link);
  font-weight: 700;
}
body.articles-shell-page #site-main .archive-intro-copy h1 { margin: 0 0 .45em; }
body.articles-shell-page #site-main .archive-description,
body.articles-shell-page #site-main .archive-count { margin: 0; color: var(--sot-text-soft); }
body.articles-shell-page #site-main .archive-count:not(:empty) { margin-block-end: .8rem; }
body.articles-shell-page #site-main .articles-section { padding: clamp(16px,2vw,27px) 0 clamp(25px,4vw,55px); }
body.articles-shell-page #site-main #articlesGrid {
  display: grid;
  grid-template-columns: repeat(var(--sot-article-columns,3), minmax(0,1fr));
  align-items: start;
  gap: clamp(.65rem,1.1vw,1rem);
  inline-size: 100%;
}
body.articles-shell-page #site-main #articlesGrid > .editorial-card--archive {
  display: flex;
  flex-direction: column;
  min-block-size: 0;
  max-inline-size: 42rem;
  block-size: auto;
  aspect-ratio: auto;
}
body.articles-shell-page #site-main #articlesGrid > .editorial-card--archive:not(.editorial-card--illustrated)::before { display: none; }
body.articles-shell-page #site-main #articlesGrid .editorial-art {
  inline-size: 100%;
  block-size: auto;
  max-block-size: 142px;
  aspect-ratio: 2.7/1;
  border-block-end: 1px solid var(--sot-line);
}
body.articles-shell-page #site-main #articlesGrid .editorial-art img { object-fit: cover; }
body.articles-shell-page #site-main #articlesGrid .editorial-copy {
  gap: .5rem;
  padding: .85rem .9rem .75rem;
  min-inline-size: 0;
}
body.articles-shell-page #site-main #articlesGrid .editorial-title { margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
body.articles-shell-page #site-main #articlesGrid .editorial-summary { line-height: 1.55; -webkit-line-clamp: 3; }
body.articles-shell-page #site-main #articlesGrid .editorial-read { padding-block-start: .55rem; margin-block-start: .2rem; }
body.articles-shell-page #site-main .archive-loading { grid-column: 1/-1; padding-block: .6rem; }
body.articles-shell-page #site-main .archive-more { text-align: start; padding-block: .85rem 0; }
body.articles-shell-page #site-main .archive-more:has(button[hidden]):has(p:empty) { display: none; }
@media (max-width: 759px) {
  body.articles-shell-page #site-main #articlesGrid { grid-template-columns: repeat(min(var(--sot-article-columns,2),2),minmax(0,1fr)); }
}
@media (max-width: 540px) {
  body.articles-shell-page #site-main #articlesGrid { grid-template-columns: minmax(0,1fr); }
  body.article-shell-page #site-main .article-head-meta { align-items: flex-start; }
}
