:root {
  color-scheme: light;
  --brand: #1769e0;
  --brand-dark: #0f51b5;
  --brand-soft: #eaf2ff;
  --ink: #172033;
  --muted: #5f6b7c;
  --line: #dfe5ee;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --shadow: 0 12px 36px rgba(25, 43, 75, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.75;
}

a {
  color: var(--brand-dark);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand);
}

a:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.28);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.page-shell,
.home-main,
.site-footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 9px;
  font-size: 17px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--brand-dark);
  font-weight: 650;
}

.home-main {
  padding: 72px 0 88px;
}

.hero {
  max-width: 720px;
  margin-bottom: 40px;
}

.eyebrow {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1 {
  margin: 8px 0 14px;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.hero p,
.document-intro {
  color: var(--muted);
  font-size: 17px;
}

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

.document-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.document-card:hover {
  color: inherit;
  border-color: #abc9f6;
  transform: translateY(-2px);
}

.document-card h2 {
  margin: 18px 0 8px;
  font-size: 22px;
}

.document-card p {
  margin: 0;
  color: var(--muted);
}

.card-index {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.card-action {
  margin-top: auto;
  padding-top: 22px;
  color: var(--brand-dark);
  font-weight: 650;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  align-items: start;
  padding: 48px 0 80px;
}

.document {
  min-width: 0;
  padding: clamp(24px, 5vw, 52px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.document h1 {
  font-size: clamp(30px, 5vw, 44px);
}

.document-meta {
  margin: 0 0 24px;
  padding: 12px 16px;
  color: var(--muted);
  background: var(--brand-soft);
  border-radius: 10px;
  font-size: 14px;
}

.document h2 {
  margin: 42px 0 14px;
  padding-top: 4px;
  font-size: 23px;
  line-height: 1.4;
  scroll-margin-top: 24px;
}

.document p {
  margin: 0 0 18px;
}

.toc {
  position: sticky;
  top: 24px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.toc-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.toc ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}

.toc a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.site-footer {
  padding: 26px 0;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 820px) {
  .document-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .toc {
    position: static;
    grid-row: 1;
  }
}

@media (max-width: 600px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .home-main {
    padding-top: 48px;
  }

  .page-shell,
  .home-main,
  .header-inner,
  .site-footer-inner {
    width: min(100% - 24px, 1120px);
  }

  .document {
    padding: 24px 20px;
    border-radius: 14px;
  }

  .site-footer-inner {
    flex-direction: column;
  }
}

@media print {
  body {
    background: #fff;
    font-size: 11pt;
  }

  .site-header,
  .toc,
  .site-footer {
    display: none;
  }

  .page-shell {
    display: block;
    width: 100%;
    padding: 0;
  }

  .document {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .document h2 {
    break-after: avoid;
  }

  .document p {
    orphans: 3;
    widows: 3;
  }
}
