:root {
  color-scheme: light;
  --paper: #f5f2eb;
  --white: #fdfcf8;
  --ink: #303632;
  --muted: #707267;
  --rule: #dcdcd1;
  --lake: #536974;
  --pine: #72785d;
  --wash: #eaece4;
  --display: 'Songti SC', 'STSong', 'Noto Serif CJK SC', Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --brand: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 36px; }
body.article-page {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--lake);
  outline-offset: 5px;
  border-radius: 2px;
}
::selection { background: #d6ddca; color: var(--ink); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
.skip-link {
  position: fixed;
  top: -90px;
  left: 24px;
  z-index: 10;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.article-site-header {
  width: min(1184px, calc(100% - 96px));
  margin: auto;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}
.article-brand {
  font: 28px/1.2 var(--brand);
  letter-spacing: -.7px;
  text-decoration: none;
}
.article-brand .accent { color: var(--lake); }
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  color: var(--lake);
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none;
}
.article-back:hover { color: var(--ink); }
.article-back svg { width: 17px; height: 17px; }
.article-shell { width: min(968px, calc(100% - 96px)); margin: auto; }
.article-header {
  position: relative;
  width: calc(100% - 248px);
  margin: 0 0 0 auto;
  padding: 78px 0 42px;
}
.article-header::before {
  content: '';
  position: absolute;
  top: 85px;
  left: -54px;
  width: 27px;
  height: 7px;
  border-top: 1px solid #a59e7e;
  border-bottom: 1px solid #a59e7e;
  transform: rotate(-13deg);
  pointer-events: none;
}
.eyebrow {
  display: block;
  margin: 0;
  color: var(--pine);
  font-size: 11px;
  line-height: 1.8;
  font-weight: 500;
  letter-spacing: .12em;
}
.article-header h1 {
  margin: 22px 0 0;
  font: 500 clamp(34px, 3.6vw, 47px)/1.5 var(--display);
  letter-spacing: .01em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.article-deck {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
  text-wrap: pretty;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 27px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.article-meta a { text-underline-offset: 4px; text-decoration-color: var(--rule); }
.article-meta a:hover { color: var(--lake); text-decoration-color: currentColor; }
.article-layout {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.article-toc {
  position: sticky;
  top: 36px;
  min-width: 0;
  max-height: calc(100svh - 72px);
  overflow: auto;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  scrollbar-width: thin;
}
.article-toc > .eyebrow,
.article-toc h2 {
  margin: 0 0 15px;
  color: var(--pine);
  font: 500 11px/1.8 var(--body);
  letter-spacing: .12em;
}
.article-toc nav { display: grid; gap: 3px; }
.article-toc ul, .article-toc ol { margin: 0; padding: 0; list-style: none; }
.article-toc li { margin: 0; }
.article-toc a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s;
}
.article-toc a:hover { color: var(--lake); }
.article-toc a[aria-current] { color: var(--lake); font-weight: 600; }
.article-toc li ul, .article-toc li ol { padding-left: 14px; }
.article-body {
  min-width: 0;
  padding: 31px 0 0;
  border-top: 1px solid var(--rule);
  font-size: 17px;
  line-height: 1.95;
  letter-spacing: .015em;
  overflow-wrap: anywhere;
}
.article-body > :first-child { margin-top: 0; }
.article-body > :last-child { margin-bottom: 0; }
.article-body p { margin: 0 0 1.45em; }
.article-body h2 {
  margin: 2.3em 0 .9em;
  font: 600 28px/1.6 var(--display);
  letter-spacing: .025em;
  text-wrap: pretty;
}
.article-body h3 {
  margin: 1.9em 0 .8em;
  font: 600 20px/1.75 var(--body);
  letter-spacing: .015em;
  text-wrap: pretty;
}
.article-body h4 { margin: 1.8em 0 .65em; font-size: 18px; line-height: 1.7; }
.article-body h2, .article-body h3, .article-body h4 { scroll-margin-top: 30px; }
.article-body strong { font-weight: 650; }
.article-body em { font-style: italic; }
.article-body a {
  color: var(--lake);
  text-decoration-thickness: 1px;
  text-decoration-color: #a1adb0;
  text-underline-offset: 4px;
}
.article-body a:hover { text-decoration-color: currentColor; }
.article-body ul, .article-body ol { margin: 1.25em 0 1.55em; padding-left: 1.5em; }
.article-body li { margin: .55em 0; padding-left: .25em; }
.article-body li::marker { color: var(--pine); }
.article-body li > ul, .article-body li > ol { margin: .6em 0; }
.article-body li > p { margin: .6em 0; }
.article-body blockquote {
  margin: 1.7em 0;
  padding: 20px 25px;
  border-left: 2px solid #8e977b;
  background: #eaece470;
  color: #4c584e;
}
.article-body blockquote > :last-child { margin-bottom: 0; }
.article-body figure { margin: 2em 0; }
.article-body figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  margin: auto;
  border: 1px solid #30363212;
  border-radius: 5px;
  background: var(--white);
}
.article-body figcaption {
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0;
  text-align: center;
}
.article-body pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.6em 0;
  padding: 22px 25px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #eeeee6;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0;
  tab-size: 2;
}
.article-body code {
  padding: .1em .35em;
  border-radius: 3px;
  background: #e9e9df;
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: .86em;
  letter-spacing: 0;
}
.article-body pre code { padding: 0; background: transparent; font-size: inherit; }
.article-body table {
  display: block;
  max-width: 100%;
  width: 100%;
  overflow-x: auto;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.8;
}
.article-body th, .article-body td {
  padding: 11px 15px;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
  min-width: 110px;
}
.article-body th { background: var(--wash); font-weight: 600; }
.article-body hr { width: 70px; margin: 48px auto; border: 0; border-top: 1px solid #acb29d; }
.article-source {
  width: calc(100% - 248px);
  margin: 64px 0 0 auto;
  padding: 25px 0 28px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.article-source p { margin: 0 0 12px; }
.article-source p:last-child { margin-bottom: 0; }
.article-source a { color: var(--lake); text-underline-offset: 4px; }
.article-source .eyebrow { margin-bottom: 13px; }
.article-page-footer {
  width: min(1184px, calc(100% - 96px));
  margin: 55px auto 0;
  padding: 27px 0 36px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.article-page-footer a { color: var(--lake); text-decoration: none; }
.article-page-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.article-page-footer p { margin: 0; }

@media (max-width: 960px) {
  .article-shell { width: min(720px, calc(100% - 80px)); }
  .article-header { width: 100%; padding-top: 60px; }
  .article-header::before { display: none; }
  .article-layout { display: block; }
  .article-toc {
    position: static;
    max-height: none;
    overflow: visible;
    margin: 0 0 32px;
    padding: 18px 22px;
    border: 1px solid var(--rule);
    border-radius: 5px;
    background: #fdfcf854;
  }
  .article-toc nav, .article-toc nav > ol, .article-toc nav > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 25px;
  }
  .article-toc nav > ol, .article-toc nav > ul { grid-column: 1 / -1; }
  .article-toc a { padding: 7px 0; }
  .article-toc > .eyebrow, .article-toc h2 { margin-bottom: 8px; }
  .article-body { padding-top: 0; border-top: 0; }
  .article-source { width: 100%; }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 24px; }
  .article-site-header { width: calc(100% - 40px); min-height: 80px; gap: 16px; }
  .article-brand { font-size: 25px; }
  .article-back { font-size: 12px; gap: 7px; }
  .article-shell { width: calc(100% - 44px); }
  .article-header { padding: 42px 0 30px; }
  .article-header h1 { margin-top: 18px; font-size: 31px; line-height: 1.55; }
  .article-deck { margin-top: 17px; font-size: 14px; }
  .article-meta { margin-top: 21px; gap: 6px 15px; font-size: 11px; }
  .article-toc { padding: 16px 18px; margin-bottom: 28px; }
  .article-toc nav, .article-toc nav > ol, .article-toc nav > ul { grid-template-columns: 1fr; }
  .article-toc a { font-size: 12px; padding: 6px 0; }
  .article-body { font-size: 16px; line-height: 1.95; letter-spacing: .01em; }
  .article-body h2 { margin-top: 2em; font-size: 25px; line-height: 1.65; }
  .article-body h3 { font-size: 19px; }
  .article-body p { margin-bottom: 1.35em; }
  .article-body blockquote { padding: 17px 18px; margin: 1.5em 0; }
  .article-body pre { padding: 17px; font-size: 12px; }
  .article-body figure { margin: 1.6em 0; }
  .article-body figcaption { font-size: 11px; }
  .article-source { margin-top: 45px; padding-top: 23px; font-size: 12px; }
  .article-page-footer { width: calc(100% - 44px); margin-top: 28px; padding: 22px 0 28px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  @page { margin: 20mm 18mm; }
  :root { --ink: #222; --muted: #555; --rule: #ccc; }
  body.article-page { background: #fff; color: #222; }
  .article-site-header, .article-toc, .article-page-footer, .skip-link { display: none; }
  .article-shell, .article-header, .article-source { width: 100%; max-width: none; margin-left: 0; }
  .article-header { padding: 0 0 24px; }
  .article-header::before { display: none; }
  .article-header h1 { font-size: 25pt; }
  .article-deck { font-size: 11pt; }
  .article-meta { font-size: 9pt; }
  .article-layout { display: block; }
  .article-body { padding-top: 24px; border-top: 1px solid #ccc; font-size: 11pt; line-height: 1.8; }
  .article-body h2 { font-size: 17pt; }
  .article-body h3 { font-size: 13pt; }
  .article-body h2, .article-body h3, .article-body h4 { break-after: avoid; }
  .article-body p, .article-body li { orphans: 3; widows: 3; }
  .article-body figure, .article-body blockquote { break-inside: avoid; }
  .article-body figure img { max-height: 220mm; object-fit: contain; }
  .article-body pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .article-body table { display: table; font-size: 9pt; }
  .article-body th, .article-body td { min-width: 0; padding: 6px 8px; }
  .article-source { margin-top: 32px; padding-bottom: 0; font-size: 9pt; }
  a, .article-body a, .article-source a { color: #333; }
  .article-source a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 8pt; }
}

.article-body .article-cover { margin-top: 0; margin-bottom: 2.2em; }
.article-body .article-cover img { width: 100%; }
.article-body .article-figure--portrait img { max-width: min(100%, 460px); }
.article-body .article-figure > a { display: block; width: fit-content; max-width: 100%; margin: auto; }
.article-body p[id] { scroll-margin-top: 36px; }
