:root {
  --paper: #f2f7fb;
  --paper-deep: #e4eef6;
  --ink: #263746;
  --muted: #718291;
  --line: #d5e2eb;
  --accent: #70b3d0;
  --accent-dark: #3f819f;
  --card: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 45px rgba(55, 91, 116, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(112, 179, 208, 0.18), transparent 30rem),
    radial-gradient(circle at 92% 18%, rgba(170, 182, 225, 0.12), transparent 26rem),
    linear-gradient(180deg, #fbfdff 0%, var(--paper) 58%, #edf4f8 100%);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.85;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(217, 209, 196, 0.86);
  background: rgba(248, 252, 255, 0.88);
  backdrop-filter: blur(16px);
}

.site-header-inner,
.document-wrap,
.site-footer-inner {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

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

.brand {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

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

.site-nav a {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent-dark);
  background: #e3f2f7;
  border-color: #c9e2ec;
}

.site-nav a.active { font-weight: 650; }

.document-wrap {
  padding: 58px 0 84px;
}

.document {
  padding: clamp(28px, 5vw, 68px) clamp(22px, 6vw, 76px);
  border: 1px solid rgba(217, 209, 196, 0.85);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.document::before {
  display: block;
  width: 42px;
  height: 4px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.document h1,
.document h2,
.document h3,
.document h4 {
  color: var(--ink);
  line-height: 1.3;
  scroll-margin-top: 100px;
}

.document h1 {
  margin: 0 0 32px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.03em;
}

.document h2 {
  margin: 54px 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: clamp(22px, 3vw, 30px);
}

.document h3 { margin-top: 32px; font-size: 21px; }

.document p,
.document ul,
.document ol,
.document blockquote,
.document table,
.document pre,
.document figure { margin: 0 0 20px; }

.document strong { color: var(--accent-dark); }

.document blockquote {
  margin-left: 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: #eaf5f9;
  color: #526b79;
}

.document ul,
.document ol { padding-left: 1.55em; }

.document li + li { margin-top: 5px; }

.document hr {
  height: 1px;
  margin: 42px 0;
  border: 0;
  background: var(--line);
}

.document img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 28px auto 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(66, 52, 35, 0.1);
}

.document table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}

.document th,
.document td {
  min-width: 100px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.document th {
  color: #fffaf5;
  background: var(--accent-dark);
  font-weight: 650;
}

.document tr:nth-child(even) td { background: rgba(228, 238, 246, 0.5); }

.document code {
  padding: 0.12em 0.38em;
  border-radius: 5px;
  background: var(--paper-deep);
  font-size: 0.9em;
}

.document pre {
  padding: 18px;
  overflow-x: auto;
  border-radius: 12px;
  background: #282621;
  color: #f8f3e9;
}

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

.document figure { text-align: center; }
.document figcaption { color: var(--muted); font-size: 13px; }

.site-footer {
  padding: 0 0 40px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer p { margin: 0; }

@media (max-width: 720px) {
  body { font-size: 15px; }
  .site-header-inner,
  .document-wrap,
  .site-footer-inner { width: min(100% - 24px, 1080px); }
  .site-header-inner { display: block; padding: 12px 0; }
  .site-nav { justify-content: flex-start; margin-top: 8px; gap: 4px 14px; }
  .document-wrap { padding: 28px 0 48px; }
  .document { border-radius: 16px; }
  .document h2 { margin-top: 40px; }
}
