:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #f7f8fb;
  --border: #d9dee8;
  --text: #172033;
  --muted: #5f6b7a;
  --accent: #2457d6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.language {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
}

.language a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.22;
}

h2 {
  margin: 32px 0 12px;
  font-size: 22px;
  line-height: 1.35;
}

h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  line-height: 1.45;
}

p, li {
  font-size: 15px;
}

ol, ul {
  padding-left: 22px;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.notice,
.toc {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.toc h2 {
  margin-top: 0;
  font-size: 18px;
}

.toc ol {
  column-count: 2;
  column-gap: 28px;
  margin: 0;
}

.toc li {
  break-inside: avoid;
}

.footer-links {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

strong {
  font-weight: 700;
}

@media (max-width: 720px) {
  .page {
    padding: 22px 16px 48px;
  }

  .toc ol {
    column-count: 1;
  }
}
