body.article-page {
  font-family: "PingFang SC", "Microsoft YaHei", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 85% 0%, rgba(22,91,67,.08), transparent 34rem),
    var(--paper);
}

.article-page .nav { max-width: 1480px; }
.article-page .wordmark > span:last-child { font-family: Inter, ui-sans-serif, sans-serif; }
.article-page .nav nav a { font-family: Inter, ui-sans-serif, sans-serif; }

.article-hero {
  padding-top: 70px;
  padding-bottom: 55px;
  border-bottom: 1px solid var(--line);
}
.article-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 70px;
  align-items: end;
}
.article-hero h1 {
  max-width: 900px;
  font-family: "Songti SC", "STSong", Iowan Old Style, Georgia, serif;
  font-size: clamp(56px, 6.7vw, 96px);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.article-hero .lead {
  max-width: 610px;
  color: #46544c;
  font-size: 18px;
  line-height: 1.82;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}
.article-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,253,248,.55);
  color: #4d5a52;
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 10px;
  font-weight: 700;
}
.article-provenance {
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.article-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 790px);
  justify-content: center;
  gap: 68px;
  padding-top: 64px;
  padding-bottom: 100px;
}
.article-toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 16px 10px 16px 0;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.article-toc strong {
  display: block;
  margin-bottom: 14px;
  color: var(--green);
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.article-toc a {
  display: block;
  margin: 0 12px 8px 0;
  padding: 5px 8px;
  border-radius: 7px;
  color: #647168;
  font-size: 11px;
  line-height: 1.4;
  text-decoration: none;
}
.article-toc a:hover { background: var(--green-soft); color: var(--green); }

.article-body {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.9;
  color: #25332c;
}
.article-body > *:first-child { margin-top: 0; }
.article-body h2,
.article-body h3,
.article-body h4 {
  scroll-margin-top: 100px;
  color: var(--ink);
}
.article-body h2 {
  margin: 78px 0 24px;
  font-family: "Songti SC", "STSong", Iowan Old Style, Georgia, serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.035em;
}
.article-body h2::before {
  content: "";
  display: block;
  width: 44px;
  margin-bottom: 18px;
  border-top: 3px solid var(--green);
}
.article-body h3 {
  margin: 42px 0 15px;
  font-size: 23px;
  font-weight: 750;
  line-height: 1.45;
  letter-spacing: -.02em;
}
.article-body h4 {
  margin: 30px 0 12px;
  font-size: 17px;
}
.article-body p { margin: 0 0 19px; }
.article-body strong { color: #12261d; }
.article-body a { color: var(--green); }
.article-body code {
  padding: .14em .38em;
  border: 1px solid #d6dcd3;
  border-radius: 5px;
  background: #eaede7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
}
.article-body p code,
.article-body li code,
.article-body td code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article-body hr {
  margin: 62px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-body blockquote {
  margin: 30px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #e6ece6;
  color: #274137;
  font-size: 16px;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body ul,
.article-body ol {
  margin: 0 0 24px;
  padding-left: 1.45em;
}
.article-body li { margin: 7px 0; padding-left: .25em; }
.article-body li::marker { color: var(--green); }

.article-figure {
  margin: 38px 0 42px;
}
.article-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ddd;
  box-shadow: var(--shadow-small);
}
.article-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.table-wrap {
  width: 100%;
  margin: 28px 0 36px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,253,248,.58);
}
.article-table { min-width: 620px; }
.article-table th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line-strong);
  background: #e7ebe4;
  color: #445249;
  font-size: 11px;
  font-weight: 750;
  text-align: left;
}
.article-table td {
  padding: 11px 13px;
  border-bottom: 1px solid #dfe2db;
  font-size: 12px;
  line-height: 1.55;
  vertical-align: top;
}
.article-table tr:last-child td { border-bottom: 0; }

.code-block,
.diagram-block,
.math-block {
  margin: 28px 0 36px;
  overflow: hidden;
  border: 1px solid #cbd2ca;
  border-radius: 12px;
  box-shadow: var(--shadow-small);
  width: 100%;
}
.code-block { background: #18241f; color: #e8eee9; }
.code-label {
  padding: 8px 13px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: #a9b8ae;
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.code-block pre {
  max-height: none;
  margin: 0;
  padding: 18px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre;
  overflow: auto;
}
.code-block code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}
.code-block pre code {
  overflow-wrap: normal;
  word-break: normal;
}

.diagram-block { background: #e5ebe5; color: var(--ink); }
.diagram-block .code-label {
  border-bottom-color: #ced8cf;
  color: var(--green);
  background: rgba(255,253,248,.45);
}
.diagram-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 620px;
  height: auto;
  margin: 0 auto;
  padding: 24px 22px 28px;
}

.math-block {
  background: #f7f7f2;
  color: #24342c;
}
.math-block .code-label {
  border-bottom-color: #d4dcd3;
  color: var(--green);
  background: #e9eee8;
}
.math-figure img {
  display: block;
  width: auto;
  max-width: calc(100% - 32px);
  height: 46px;
  margin: 26px auto 28px;
}

.article-endnote {
  margin-top: 75px;
  padding: 26px 28px;
  border: 1px solid #cbd4ca;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: #3d4e44;
  font-size: 13px;
}
.article-endnote p:last-child { margin-bottom: 0; }
.article-page .footer { border-top: 1px solid var(--line); }

@media (max-width: 960px) {
  .article-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .article-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 38px; }
  .article-body { font-size: 15px; }
}

@media (max-width: 760px) {
  .article-hero { padding-top: 42px; padding-bottom: 38px; }
  .article-hero h1 { font-size: clamp(42px, 11vw, 48px); letter-spacing: -.04em; }
  .article-hero .lead { font-size: 16px; }
  .article-layout { display: block; padding-top: 35px; padding-bottom: 70px; }
  .article-toc {
    position: static;
    max-height: none;
    margin-bottom: 44px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,253,248,.55);
  }
  .article-toc nav { columns: 2; column-gap: 16px; }
  .article-toc a { break-inside: avoid; margin-right: 0; font-size: 10px; }
  .article-body h2 { margin-top: 58px; font-size: 31px; }
  .article-body h3 { margin-top: 35px; font-size: 21px; }
  .article-body blockquote { padding: 17px 19px; font-size: 15px; }
  .diagram-figure img { padding: 18px 10px 20px; }
  .math-figure img { height: 40px; max-width: calc(100% - 24px); margin: 22px auto 24px; }
}

@media (max-width: 460px) {
  .article-toc nav { columns: 1; }
  .article-meta span { font-size: 9px; }
  .article-body { font-size: 15px; line-height: 1.82; }
  .article-figure { margin-left: -8px; margin-right: -8px; }
}
