:root {
  color-scheme: light;
  --bg: #f9fbfd;
  --surface: #fff;
  --text: #0a0a0b;
  --muted: #45454b;
  --line: #dfe0e3;
  --accent: #527e94;
  --soft: #f2f2f4;
  --radius: 12px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b10;
  --surface: #131319;
  --text: #fafafa;
  --muted: #b4b4bc;
  --line: #303036;
  --accent: #b4edfb;
  --soft: #1e1e23;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Century Gothic", "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 950px;
  pointer-events: none;
  background: linear-gradient(#659eb914, transparent);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
img { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: #659eb944; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -100px; left: 20px; background: var(--surface); padding: 10px; z-index: 200; }
.skip-link:focus { top: 10px; }
.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1040px, calc(100% - 48px));
  min-height: 48px;
  margin: 16px auto 40px;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: background .2s, border-color .2s, padding .2s;
}
.site-header.is-scrolled {
  padding: 0 12px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px);
}
.brand { font-size: 20px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 24px; margin-left: auto; font-size: 16px; }
.nav a[aria-current], .nav .is-current { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-button, .language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}
.icon-button { width: 34px; padding: 0; }
.icon-button:hover, .language-button:hover { background: var(--soft); }
.menu-toggle { display: none; }
.nav-dropdown { position: relative; }
.nav-dropdown summary { cursor: pointer; list-style: none; white-space: nowrap; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown-panel {
  position: absolute; top: calc(100% + 12px); left: -16px;
  min-width: 185px; padding: 8px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); box-shadow: 0 8px 20px #0000000a;
}
.nav-dropdown-panel a { display: block; padding: 8px 10px; font-size: 14px; border-radius: 5px; }
.nav-dropdown-panel a:hover { background: var(--soft); }
.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  width: min(1040px, calc(100% - 48px)); margin: 64px auto 0;
  padding: 24px 0 30px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.site-footer p { margin: 5px 0 0; font-size: 12px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.inner-page { width: min(1040px, calc(100% - 48px)); margin: 0 auto; }
.back-link { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.page-heading { margin-bottom: 32px; }
h1.page-heading, .page-heading h1 { font-size: 32px; font-weight: 500; line-height: 1.3; letter-spacing: -.8px; margin-top: 0; }
.page-heading p { color: var(--muted); margin: 10px 0; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; align-items: start; }
.page-content { min-width: 0; }
.page-content section { margin-bottom: 40px; }
.page-content h2 { font-size: 24px; font-weight: 500; margin: 0 0 20px; line-height: 1.4; }
.page-content h3 { font-size: 19px; line-height: 1.5; }
.page-content p { margin: 0 0 16px; }
.page-content p a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.page-toc { position: sticky; top: 100px; font-size: 16px; color: var(--muted); }
.page-toc h2, .page-toc h3, .page-toc p { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.page-toc a { display: block; padding: 5px 12px; border-left: 2px solid transparent; }
.page-toc a.is-active { color: var(--accent); background: var(--soft); border-left-color: var(--accent); border-radius: 0 14px 14px 0; }
.page-toc ul { list-style: none; padding: 0; margin: 0; }
.muted { color: var(--muted); }
.outline-link { display: inline-flex; align-items: center; gap: 18px; padding: 6px 13px; background: var(--soft); border: 1px solid var(--line); border-radius: 7px; font-size: 14px; }
.noscript-nav { text-align: center; padding: 20px; }
@media (max-width: 900px) {
  .site-header { gap: 16px; }
  .nav { gap: 16px; font-size: 14px; }
  .brand { font-size: 18px; }
  .header-actions { gap: 8px; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 175px; gap: 28px; }
}
@media (max-width: 760px) {
  .site-header { width: calc(100% - 32px); margin: 12px auto 32px; top: 12px; gap: 10px; min-height: 44px; }
  .header-actions { margin-left: auto; gap: 6px; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 24px #0000000a; }
  .nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .nav > a, .nav-dropdown summary { display: block; padding: 10px 8px; }
  .nav-dropdown-panel { position: static; box-shadow: none; border: none; padding: 0 10px; }
  .article-layout { display: block; }
  .page-toc { display: none; }
  .inner-page { width: calc(100% - 40px); }
  h1.page-heading, .page-heading h1 { font-size: 30px; }
  .site-footer { width: calc(100% - 40px); align-items: flex-start; flex-direction: column; gap: 18px; margin-top: 44px; }
}
@media (max-width: 360px) {
  .brand { font-size: 15px; }
  .header-actions { gap: 4px; }
  .site-header { gap: 6px; }
  .language-button { padding: 0 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
