:root {
  --bg: #f6f8fb;
  --paper: #ffffff;
  --paper-soft: #eef4f8;
  --ink: #17202a;
  --muted: #637083;
  --line: #dce3ea;
  --teal: #197c78;
  --blue: #315f9f;
  --coral: #c95e4a;
  --green: #3d7b42;
  --gold: #a66c12;
  --shadow: 0 14px 34px rgba(31, 45, 61, 0.08);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

code,
pre,
kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111827;
  color: #e5edf5;
  font-size: 0.92rem;
}

code {
  padding: 0.1rem 0.32rem;
  border-radius: 5px;
  background: #edf1f5;
  color: #243241;
}

pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 210px;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: 0;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.main-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  color: #344254;
  font-size: 0.9rem;
  white-space: nowrap;
}

.main-nav a[aria-current="page"],
.main-nav a:hover {
  background: #e7eef6;
  color: var(--blue);
  text-decoration: none;
}

.header-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.icon-button,
.text-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
}

.icon-button:hover,
.text-button:hover {
  border-color: #b8c7d8;
  background: #f3f7fb;
  text-decoration: none;
}

.icon-button svg,
.text-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 28px;
  align-items: start;
}

.article {
  min-width: 0;
}

.toc {
  position: sticky;
  top: 98px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.toc a {
  display: block;
  padding: 7px 0;
  border-top: 1px solid #edf1f5;
  color: var(--muted);
  font-size: 0.86rem;
}

.toc a:first-of-type {
  border-top: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 26px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero h1,
.page-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p,
.page-title p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-media {
  align-self: stretch;
  display: grid;
  align-content: center;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}

.page-title {
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.primary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.primary-button:hover {
  background: #244f8b;
  text-decoration: none;
}

.secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #b8c7d8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.secondary-button:hover {
  background: #f1f6fb;
  text-decoration: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.stat strong {
  display: block;
  font-size: 1.2rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
}

.section {
  margin-top: 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.section h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
  letter-spacing: 0;
}

.section h3 {
  margin: 24px 0 10px;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.section h3:first-child {
  margin-top: 0;
}

.section p {
  margin: 10px 0;
}

.muted {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cards.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.card h3,
.card h4 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f8fb;
  color: #3d4a5b;
  font-size: 0.8rem;
}

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.flow-step {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.flow-step strong {
  display: block;
  margin-bottom: 5px;
}

.flow-step span {
  color: var(--muted);
  font-size: 0.9rem;
}

.figure {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.figure img {
  width: 100%;
  object-fit: contain;
  background: #fff;
}

.figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #edf4f8;
  color: #233142;
  font-size: 0.9rem;
}

tr:last-child td {
  border-bottom: 0;
}

.callout {
  margin: 16px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  background: #edf8f6;
}

.callout.warn {
  border-left-color: var(--gold);
  background: #fff7e8;
}

.callout.risk {
  border-left-color: var(--coral);
  background: #fff0ed;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.check-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--teal);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.pager a {
  flex: 1;
  min-height: 58px;
  display: grid;
  align-content: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.pager a:hover {
  border-color: #b8c7d8;
  background: #f5f9fc;
}

.pager span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.pager strong {
  display: block;
  font-size: 0.98rem;
}

.pager .next {
  text-align: right;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.source-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.source-list a:hover {
  border-color: #b8c7d8;
  background: #f5f9fc;
}

.source-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

.footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: 1fr;
    padding: 12px 0;
  }

  .brand {
    min-width: 0;
  }

  .main-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .content-grid,
  .hero {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    order: -1;
  }

  .stats,
  .cards,
  .cards.two,
  .flow,
  .source-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 22px, 1180px);
    padding-top: 18px;
  }

  .hero,
  .section {
    padding: 18px;
  }

  .hero-media {
    min-height: 220px;
  }

  .stats,
  .cards,
  .cards.two,
  .flow,
  .source-list {
    grid-template-columns: 1fr;
  }

  .pager {
    flex-direction: column;
  }

  .pager .next {
    text-align: left;
  }
}
