:root {
  color-scheme: dark;
  --bg: #110a33;
  --bg-panel: #1b1347;
  --bg-light: #f5f4fa;
  --border: #2e2566;
  --border-strong: #3b3180;
  --accent: #7b5cff;
  --accent-dark: #5a3ee0;
  --accent-hover: #8b70ff;
  --magenta: #e2409c;
  --text: #f3f1ff;
  --text-muted: #a8a2cc;
  --text-faint: #7a74a3;
  --success: #2fbf8a;
  --success-ring: rgba(47, 191, 138, .45);
  --warn: #f2b441;
  --error: #ff5a5f;
  --on-accent: #ffffff;
  --ink: #171233;
  --ink-muted: #5d5878;
  --ink-policy: #3d3760;
  --ink-faint: #9a96b3;
  --ink-ghost: #c6c3d8;
  --paper: #ffffff;
  --paper-bar: #faf9fd;
  --paper-line: #ece9f4;
  --paper-tint: #f3f0ff;
  --paper-neutral: #f1f0f6;
  --star-a: rgba(243, 241, 255, .62);
  --star-b: rgba(243, 241, 255, .34);
  --star-c: rgba(214, 206, 255, .88);
  --star-d: rgba(243, 241, 255, .16);
  --veil: rgba(17, 10, 51, .78);
  --glow-violet: rgba(123, 92, 255, .30);
  --glow-magenta: rgba(226, 64, 156, .14);
  --glow-edge: rgba(170, 150, 255, .9);
  --orb-core: #ece6ff;
  --orb-ring: rgba(255, 255, 255, .28);
  --hairline-light: rgba(255, 255, 255, .22);
  --accent-soft: rgba(123, 92, 255, .12);
  --accent-softer: rgba(123, 92, 255, .06);
  --accent-ring: rgba(123, 92, 255, .20);
  --accent-shadow: rgba(123, 92, 255, .55);
  --btn-highlight: rgba(255, 255, 255, .18);
  --shadow-deep: rgba(6, 2, 24, .85);
  --shadow-mid: rgba(6, 2, 24, .55);
  --shadow-light: rgba(23, 18, 51, .10);
  --clear: transparent;
  --radius-card: 8px;
  --radius-btn: 6px;
  --radius-float: 6px;
  --radius-tag: 6px;
  --radius-mark: 7px;
  --radius-small: 4px;
  --radius-line: 2px;
  --radius-shot: 10px;
  --radius-pill: 999px;
  --radius-round: 50%;
  --font-display: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --weight-body: 400;
  --weight-title: 500;
  --track-title: -.01em;
  --size-body: 16px;
  --size-small: 14px;
  --size-caption: 12px;
  --size-h1: clamp(34px, calc(2.2vw + 16px), 48px);
  --size-h2: clamp(26px, 3vw, 38px);
  --size-h3: 22px;
  --gutter: 24px;
  --wrap: 1120px;
  --reading: 800px;
  --header-wrap: 1280px;
  --nav-h: 64px;
  --section-space: 88px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --time-fast: .2s;
  --time-reveal: .65s;
  --shadow-card: 0 28px 70px -28px var(--shadow-light);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: var(--weight-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: var(--accent-soft); }
button:disabled { cursor: not-allowed; }
img { max-width: 100%; }
svg { flex-shrink: 0; vertical-align: middle; }
button svg, a svg { pointer-events: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-btn); }
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--size-h1); line-height: 1.15; }
h2 { font-size: var(--size-h2); line-height: 1.3; }
h3 { font-size: var(--size-h3); line-height: 1.4; }
p, ul, ol, dl, figure { margin-top: 0; }
strong { font-weight: var(--weight-title); }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  margin-block: 24px;
  padding: 20px;
  overflow-x: auto;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  font-size: var(--size-small);
  line-height: 1.8;
  overscroll-behavior-inline: contain;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 32px; }
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.section { position: relative; padding-top: var(--section-space); padding-bottom: var(--section-space); }
.decorated, .stage, .hero { overflow-x: clip; }
.section--light { color-scheme: light; background: var(--bg-light); color: var(--ink); }
.section--dark { background: var(--bg); color: var(--text); }
.section__intro { max-width: 720px; margin-bottom: 36px; }
.section__intro h2 { margin-top: 0; margin-bottom: 18px; }
.section--light .muted { color: var(--ink-muted); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.keep { white-space: nowrap; }
.accent-text { color: var(--accent-hover); }
.section--light .accent-text, .panel .accent-text { color: var(--accent-dark); }
.eyebrow { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--size-caption); letter-spacing: .08em; }
.section--light .eyebrow { color: var(--ink-muted); }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-two > *, .grid-three > *, .feature-layout > *, .footer-grid > * { min-width: 0; }
.stack > * + * { margin-top: 24px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  z-index: 100;
  left: var(--gutter);
  top: 8px;
  padding: 10px 16px;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border-radius: var(--radius-btn);
  background: var(--paper);
  color: var(--ink);
}
.skip-link:focus { width: auto; height: auto; padding: 10px 16px; overflow: visible; clip-path: none; }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid var(--clear);
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: var(--weight-title);
  line-height: 1.5;
  text-align: center;
  transition: background-color var(--time-fast) ease, border-color var(--time-fast) ease, transform var(--time-fast) ease;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 var(--btn-highlight), 0 10px 28px -10px var(--accent-shadow);
}
.btn--primary:hover, .btn--primary.is-hover { background: var(--accent-dark); color: var(--on-accent); transform: translateY(-1px); }
.btn--primary:active, .btn--primary.is-pressed { background: var(--accent-dark); color: var(--on-accent); transform: translateY(1px); }
.btn--ghost { background: var(--bg-panel); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--quiet { background: var(--paper); color: var(--accent-dark); border-color: var(--paper-line); }
.btn--quiet:hover { background: var(--paper-tint); color: var(--accent-dark); border-color: var(--accent); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--border); color: var(--text-muted); box-shadow: none; transform: none; }
.text-link { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 4px; }
.section--light .text-link, .panel .text-link { color: var(--accent-dark); }
.card, .panel {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}
.card h3, .panel h3 { margin-top: 0; }
.card p, .panel p { color: var(--ink-muted); }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card--dark { background: var(--bg-panel); color: var(--text); border-color: var(--border); box-shadow: 0 24px 64px -36px var(--shadow-deep); }
.card--dark p { color: var(--text-muted); }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose h2 { margin-top: 56px; margin-bottom: 20px; scroll-margin-top: 24px; }
.prose h3 { margin-top: 32px; }
.prose p, .prose li { line-height: 1.9; }
.prose a { text-decoration: underline; text-underline-offset: 4px; }
.prose :not(pre) > code { font-size: .9em; }
.prose img { display: block; height: auto; }
.prose > :first-child { margin-top: 0; }
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
.reveal-ready .reveal { transition: opacity var(--time-reveal) var(--ease), transform var(--time-reveal) var(--ease); }

/* 实色页头；导航列表本身负责横排。 */
#site-header, .topbar { position: relative; z-index: 50; }
.topbar { background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border); }
.topbar__inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--nav-h);
  width: 100%;
  max-width: min(100%, calc(var(--header-wrap) + var(--gutter) * 2));
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__mark {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: var(--radius-mark);
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--accent-ring), 0 0 0 1px var(--border);
}
.brand__name { font-size: 15px; font-weight: var(--weight-title); letter-spacing: var(--track-title); }
.desktop-nav { min-width: 0; margin-left: auto; align-self: stretch; }
.tabs {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  height: 100%;
}
.tabs li { display: flex; align-self: stretch; min-width: 0; }
.tabs__item {
  position: relative;
  display: flex;
  align-items: center;
  padding-inline: 15px;
  min-height: var(--nav-h);
  color: var(--text-muted);
  font-size: var(--size-small);
  white-space: nowrap;
  transition: color var(--time-fast) ease;
}
.tabs__item::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: -1px;
  height: 2px;
  border-radius: var(--radius-line);
  background: var(--border-strong);
  color: var(--text);
  transform: scaleX(0);
  transition: transform var(--time-fast) ease;
}
.tabs__item:hover, .tabs__item.is-active { color: var(--text); }
.tabs__item:hover::after, .tabs__item.is-active::after { transform: scaleX(1); }
.tabs__item.is-active::after { background: var(--accent); color: var(--on-accent); }
.header-tools { position: relative; display: flex; align-items: center; gap: 8px; margin-left: 20px; flex-shrink: 0; }
.language { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  transition: border-color var(--time-fast) ease, color var(--time-fast) ease;
}
.lang svg { width: 15px; height: 15px; }
.lang:hover { color: var(--text); border-color: var(--border-strong); }
.lang__short { display: none; }
.language__list {
  position: absolute;
  z-index: 56;
  top: calc(100% + 8px);
  right: 0;
  width: 190px;
  list-style: none;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: 0 20px 40px -12px var(--shadow-deep);
}
.language__list a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--radius-small); }
.language__list a:hover, .language__list a[aria-current="true"] { background: var(--border); color: var(--text); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-drawer {
  position: absolute;
  z-index: 54;
  left: 0;
  right: 0;
  top: 100%;
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px var(--gutter) 24px;
  border-bottom: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
}
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.mobile-drawer a[aria-current] { color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.mobile-drawer__label { margin: 24px 14px 8px; color: var(--text-muted); font-size: var(--size-caption); }
.nav-veil { position: fixed; z-index: 51; inset: var(--nav-h) 0 0; border: 0; padding: 0; background: var(--veil); color: var(--text); }
.site-footer { padding-top: 64px; padding-bottom: 28px; border-top: 1px solid var(--border); background: var(--bg); color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr .8fr; gap: 40px; }
.footer-brand p { max-width: 320px; margin-top: 22px; color: var(--text-muted); font-size: var(--size-small); }
.footer-title { margin-top: 0; margin-bottom: 16px; font-size: var(--size-small); }
.footer-links { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding-block: 3px; color: var(--text-muted); font-size: var(--size-small); overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--size-caption); }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
@media (max-width: 1279px) {
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 1280px) {
  .mobile-drawer, .nav-veil { display: none !important; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --section-space: 56px; }
  .grid-two, .grid-three, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 22px; }
  .brand { gap: 8px; }
  .brand__name { font-size: 13px; }
  .brand__mark { width: 28px; height: 28px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .lang { padding-inline: 10px; }
  .lang__full { display: none; }
  .lang__short { display: inline; }
  .lang svg { display: none; }
  .tilt, [data-tilt] { transform: none !important; }
  .footer-grid { gap: 30px; }
  .footer-bottom { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}