:root {
  color-scheme: light;
  --ink: #182132;
  --muted: #5b6678;
  --line: #dfe5ee;
  --paper: #ffffff;
  --wash: #f5f7fb;
  --brand: #244b9b;
  --brand-dark: #17346d;
  --accent: #d9e5ff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.72;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(223, 229, 238, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(145deg, #3264c7, #17346d);
  font-size: 15px;
  letter-spacing: -0.04em;
}

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

.page {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 46px;
  padding: 56px 0 76px;
}

.toc {
  align-self: start;
  position: sticky;
  top: 100px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.toc strong { display: block; margin-bottom: 8px; font-size: 14px; }
.toc a { display: block; padding: 4px 0; color: var(--muted); font-size: 13px; text-decoration: none; }

.document {
  min-width: 0;
  padding: 46px clamp(24px, 5vw, 68px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 22px 60px rgba(30, 48, 80, 0.08);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.lede { max-width: 760px; margin: 18px 0 0; color: var(--muted); font-size: 18px; }
.meta { margin: 22px 0 42px; color: var(--muted); font-size: 13px; }

h2 {
  margin: 46px 0 12px;
  padding-top: 8px;
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

h3 { margin: 28px 0 8px; font-size: 18px; line-height: 1.4; }
p { margin: 10px 0; }
ul, ol { margin: 10px 0 18px; padding-left: 24px; }
li + li { margin-top: 8px; }

.notice {
  margin: 26px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--brand);
  border-radius: 0 10px 10px 0;
  background: #f1f5ff;
}

.contact-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #cbd8ef;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8faff, #eef4ff);
}

.contact-card p { margin: 5px 0; }
.muted { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { padding: 28px 0 38px; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
.footer-links a { text-decoration: none; }

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #edf1f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; gap: 22px; padding-top: 30px; }
  .toc { position: static; }
  .document { padding-top: 34px; }
}

@media (max-width: 640px) {
  .header-inner, .page, .footer-inner { width: min(100% - 24px, 1120px); }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 12px 0; gap: 8px; }
  .nav { gap: 12px; }
  .document { padding-right: 20px; padding-left: 20px; border-radius: 14px; }
  h2 { margin-top: 38px; }
}

@media print {
  body { background: #fff; }
  .site-header, .toc, .site-footer { display: none; }
  .page { display: block; width: 100%; padding: 0; }
  .document { border: 0; box-shadow: none; padding: 0; }
}
