:root {
  --ink: #172023;
  --muted: #5b676c;
  --line: #d7dee2;
  --soft: #f5f7f7;
  --accent: #087785;
  --signal: #b94a3a;
  --paper: #ffffff;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.72;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--signal); }

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--ink);
  font-size: 15px;
  font-weight: 720;
  text-decoration: none;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--ink); }

.page-shell { padding: 64px 0 80px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1, h2, h3 { letter-spacing: 0; }
h1 { max-width: 820px; margin: 0; font-size: 46px; line-height: 1.16; }
h2 { margin: 0 0 14px; font-size: 24px; line-height: 1.35; }
h3 { margin: 0 0 7px; font-size: 18px; line-height: 1.4; }

.lead {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
}

.section { margin-top: 56px; }
.section-head { max-width: 720px; margin-bottom: 22px; }
.section-head p, .topic-row p, .prose p, .empty-state { margin: 0; color: var(--muted); }

.topic-list { border-top: 1px solid var(--line); }

.topic-row {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.topic-row h3 { font-size: 17px; }
.topic-row > a { white-space: nowrap; font-size: 14px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 48px;
  align-items: start;
}

.prose { max-width: 720px; }
.prose p + p { margin-top: 16px; }
.prose ul { margin: 14px 0 0; padding-left: 22px; }
.prose ol { margin: 14px 0 0; padding-left: 22px; }
.prose li + li { margin-top: 8px; }

.comparison-table {
  width: 100%;
  margin: 20px 0 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}

.comparison-table th,
.comparison-table td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.comparison-table thead th { background: var(--soft); }

.index-panel {
  border-left: 3px solid var(--signal);
  padding: 4px 0 4px 20px;
}

.index-panel h2 { font-size: 18px; }
.index-panel ul { margin: 10px 0 0; padding: 0; list-style: none; }
.index-panel li + li { margin-top: 9px; }

.publication-list { border-top: 1px solid var(--line); }
.publication-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.publication-item p { margin: 6px 0 0; color: var(--muted); }
.publication-item time { color: var(--muted); font-size: 13px; }

.article-header { max-width: 820px; }
.article-body { max-width: 760px; margin-top: 48px; font-size: 17px; }
.article-body h2 { margin-top: 42px; }
.article-body h3 { margin-top: 32px; }
.article-body p, .article-body ul, .article-body ol, .article-body blockquote,
.article-body pre, .article-body figure, .article-body table { margin: 20px 0 0; }
.article-body img { display: block; max-width: 100%; height: auto; }
.article-body blockquote { padding-left: 18px; border-left: 3px solid var(--line); color: var(--muted); }
.article-body pre { overflow-x: auto; padding: 18px; background: var(--soft); }
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.article-body table { width: 100%; border-collapse: collapse; }
.article-body th, .article-body td { padding: 9px 10px; border: 1px solid var(--line); text-align: left; }

.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { padding: 26px 0 36px; display: flex; justify-content: space-between; gap: 24px; font-size: 13px; }
.footer-inner p { margin: 0; }

@media (max-width: 760px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 18px 0; gap: 12px; }
  .site-nav { gap: 10px 16px; }
  .page-shell { padding: 44px 0 64px; }
  h1 { font-size: 34px; }
  .lead { font-size: 17px; }
  .topic-row { grid-template-columns: 1fr; gap: 8px; }
  .topic-row > a { white-space: normal; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .footer-inner { flex-direction: column; gap: 8px; }
}

@media (max-width: 380px) {
  .header-inner, .page-shell, .footer-inner { width: min(100% - 28px, 1040px); }
  h1 { font-size: 30px; overflow-wrap: anywhere; }
}
