:root {
  --paper: #faf9f6;
  --ink: #202b35;
  --muted: #66717c;
  --line: #dcdedb;
  --blue: #245bca;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "PingFang SC", "Microsoft YaHei", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 var(--sans);
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--blue);
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}
::selection {
  background: #dbe6fb;
}
.site-header,
.site-footer,
.index-main,
.detail-main {
  width: min(1160px, calc(100% - 64px));
  margin: auto;
}
.site-header {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 23px;
  letter-spacing: -1px;
  font-weight: 800;
}
.brand span {
  font-weight: 400;
  margin-left: 3px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 14px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: var(--blue);
  color: white;
  padding: 14px 24px;
  font-size: 15px;
  border: 1px solid var(--blue);
}
.button:hover {
  background: #184aa9;
  color: white;
}
.button.small {
  padding: 9px 18px;
  font-size: 13px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--blue);
}

.cta {
  margin: 64px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #edf1f8;
  padding: 38px 42px;
  border-left: 3px solid var(--blue);
  gap: 24px;
}
.cta h2 {
  font: 500 28px/1.5 var(--serif);
  margin: 10px 0;
}
.cta p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.cta .button {
  flex-shrink: 0;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 34px 0;
  font-size: 14px;
}
.pagination span {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 30px 0 36px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer .brand {
  color: var(--ink);
  font-size: 18px;
}
.site-footer > a:last-child {
  margin-left: auto;
}
.breadcrumb {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  padding: 30px 0;
}
.article-header {
  max-width: 900px;
  margin: 32px 0 44px;
}
.article-header h1 {
  font: 600 clamp(30px, 4.5vw, 48px) / 1.5 var(--serif);
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
  margin: 20px 0;
}
.standfirst {
  font-size: 18px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 800px;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 28px;
}
.reading-layout {
  border-top: 1px solid var(--line);
  padding-top: 36px;
  display: flex;
  gap: 56px;
  align-items: flex-start;
}
.toc {
  width: 210px;
  flex-shrink: 0;
  position: sticky;
  top: 28px;
  max-height: 70vh;
  overflow: auto;
}
.toc nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  margin-top: 20px;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.prose {
  max-width: 780px;
  min-width: 0;
  flex: 1;
  font-size: 17px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}
.prose > :first-child {
  margin-top: 0;
}
.prose h2 {
  font: 600 27px/1.6 var(--serif);
  margin: 45px 0 18px;
}
.prose h3 {
  font-size: 21px;
  margin: 30px 0 14px;
}
.prose h4,
.prose h5,
.prose h6 {
  font-size: 18px;
}
.prose p {
  margin: 0 0 24px;
}
.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  margin: 16px 0;
}
.prose blockquote {
  margin: 24px 0;
  background: #eef2f7;
  border-left: 3px solid var(--blue);
  padding: 20px 24px;
  color: #43576b;
}
.prose blockquote p:last-child {
  margin: 0;
}
.prose pre {
  padding: 24px;
  background: #202b35;
  color: #e3e8f0;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
}
.prose :not(pre) > code {
  background: #e9edf1;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 38px 0;
}
.prose li {
  margin: 8px 0;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.prose td,
.prose th {
  border: 1px solid var(--line);
  padding: 10px;
}
.back-link {
  display: inline-block;
  color: var(--blue);
  margin: 0 0 48px;
  font-size: 14px;
}
.preview-banner {
  background: #fff0c9;
  text-align: center;
  padding: 10px;
  color: #70541c;
  font-size: 13px;
}
.error-main {
  width: min(900px, calc(100% - 48px));
  margin: 100px auto 150px;
}
.error-main h1 {
  font: 36px/1.5 var(--serif);
}
.error-main p {
  color: var(--muted);
  margin-bottom: 30px;
}
@media (max-width: 900px) {
  .toc {
    width: 170px;
  }
  .reading-layout {
    gap: 30px;
  }
}
@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .index-main,
  .detail-main {
    width: calc(100% - 36px);
  }
  .site-header {
    height: 76px;
  }
  .site-header nav {
    gap: 16px;
    font-size: 12px;
  }
  .brand {
    font-size: 20px;
  }
  .button.small {
    font-size: 12px;
    padding: 7px 10px;
    gap: 8px;
  }

  .cta {
    margin: 38px 0;
    padding: 26px 22px;
    align-items: flex-start;
    flex-direction: column;
  }
  .cta h2 {
    font-size: 24px;
  }
  .cta .button {
    margin-top: 4px;
  }
  .site-footer {
    flex-wrap: wrap;
    gap: 12px;
  }
  .site-footer p {
    order: 3;
    width: 100%;
    margin: 0;
  }
  .article-header {
    margin: 20px 0 28px;
  }
  .standfirst {
    font-size: 16px;
  }
  .reading-layout {
    flex-direction: column;
    gap: 28px;
    padding-top: 24px;
  }
  .toc {
    position: static;
    width: 100%;
    max-height: none;
  }
  .toc nav {
    gap: 8px;
  }
  .prose {
    width: 100%;
    font-size: 16px;
  }
  .prose h2 {
    font-size: 24px;
  }
  .byline {
    gap: 8px 16px;
  }
  .breadcrumb {
    padding: 24px 0 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.index-main {
  width: min(900px, calc(100% - 36px));
  padding: 40px 0 56px;
  min-height: calc(100vh - 230px);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.section-heading h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}
.section-heading span,
.article-item time {
  color: var(--muted);
  font-size: 13px;
}
.article-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.article-item h2 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.article-item p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty-state {
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}
