:root {
  --c-bg: #ffffff;
  --c-panel: #f1ecff;
  --c-panel-2: #1b0757;
  --c-border: #e3def2;
  --c-accent: #4a0fe8;
  --c-accent-dark: #3108b3;
  --c-text: #17122e;
  --c-muted: #5d5875;
  --c-success: #1f9d6b;
  --c-warn: #c98a12;
  --c-coral: #ff5a4e;
  --c-magenta: #a52889;
  --c-on-dark: #ffffff;
  --c-on-dark-muted: rgba(255, 255, 255, 0.8);
  --c-on-dark-soft: rgba(255, 255, 255, 0.62);
  --c-on-dark-line: rgba(255, 255, 255, 0.3);
  --c-on-dark-fill: rgba(255, 255, 255, 0.08);
  --c-on-dark-fill-strong: rgba(255, 255, 255, 0.14);
  --c-on-dark-grid: rgba(255, 255, 255, 0.05);
  --c-backer: rgba(241, 236, 255, 0.16);
  --c-backer-line: rgba(241, 236, 255, 0.36);
  --c-scan: rgba(74, 15, 232, 0.08);
  --c-scan-edge: rgba(74, 15, 232, 0.55);
  --c-glow-violet: rgba(164, 124, 255, 0.6);
  --c-glow-coral: rgba(255, 90, 78, 0.3);
  --c-line-no: #b3adc6;
  --c-bar-bg: #faf8ff;
  --c-ring-success: rgba(31, 157, 107, 0.18);
  --c-ring-coral: rgba(255, 90, 78, 0.2);
  --c-clear: transparent;
  --c-mask: #000000;
  --c-veil: rgba(27, 7, 87, 0.38);
  --f-display: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --f-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-card: 10px;
  --r-btn: 8px;
  --r-pill: 999px;
  --r-mark: 7px;
  --r-shot: 10px;
  --r-line: 2px;
  --r-circle: 50%;
  --sh-card: 0 1px 2px rgba(23, 18, 46, 0.08), 0 10px 28px rgba(23, 18, 46, 0.14), 0 40px 80px -16px rgba(27, 7, 87, 0.5);
  --sh-pill: 0 1px 2px rgba(23, 18, 46, 0.1), 0 12px 30px -8px rgba(27, 7, 87, 0.45);
  --sh-btn: 0 1px 2px rgba(23, 18, 46, 0.2), 0 10px 24px -10px rgba(23, 18, 46, 0.55);
  --sh-soft: 0 2px 4px rgba(23, 18, 46, 0.04), 0 18px 40px -18px rgba(27, 7, 87, 0.22);
  --ring-focus: 0 0 0 3px var(--c-bg), 0 0 0 5px var(--c-accent);
  --ls-display: -0.02em;
  --nav-h: 64px;
  --hero-h: 716px;
  --overlap: 44px;
  --lh-code: 30px;
  --wrap: 1200px;
  --reading: 800px;
  --header-span: 1280px;
  --gutter: 32px;
  --section-gap: 144px;
  --motion-fast: 180ms;
  --motion-reveal: 650ms;
  --ease-rise: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a, button { -webkit-tap-highlight-color: var(--c-scan); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; }
img { max-width: 100%; }
svg { display: block; flex-shrink: 0; }
p, h1, h2, h3, h4, figure { margin: 0; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: var(--ls-display);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(34px, 3.2vw, 48px); line-height: 1.18; }
h2 { font-size: clamp(26px, 2.5vw, 38px); line-height: 1.25; }
h3 { font-size: clamp(21px, 1.8vw, 26px); line-height: 1.35; }
ul, ol { padding-left: 1.4em; }
code { font-family: var(--f-mono); font-size: .88em; overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-bar-bg);
  color: var(--c-text);
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.9;
}
pre code { font: inherit; white-space: pre; overflow-wrap: normal; word-break: normal; }
section, article, aside, nav, .grid > *, .pair > *, .wrap > * { min-width: 0; }
[id] { scroll-margin-top: 24px; }
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: var(--reading); margin-inline: auto; }
.section { padding-top: var(--section-gap); }
.section:last-child { padding-bottom: var(--section-gap); }
.section-head { margin-bottom: 40px; }
.section-head > p { margin-top: 18px; max-width: 44em; color: var(--c-muted); }
.section-head--center { text-align: center; }
.section-head--center > p { margin-inline: auto; }
.gradient-title {
  color: var(--c-accent);
  background: linear-gradient(110deg, var(--c-accent), var(--c-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: var(--c-clear);
}
.nowrap { white-space: nowrap; }
.muted { color: var(--c-muted); }
.mono { font-family: var(--f-mono); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; }
.grid, .pair { display: grid; gap: 28px; }
.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack > * + * { margin-top: 20px; }
.card, .panel {
  min-width: 0;
  padding: 36px;
  border-radius: var(--r-card);
  background: var(--c-panel);
  color: var(--c-text);
}
.card--white {
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: var(--sh-soft);
}
.card p, .panel p { margin-top: 18px; color: var(--c-muted); }
.card a.text-link { display: inline-block; margin-top: 24px; }
.text-link { color: var(--c-accent); }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose p, .prose ul, .prose ol { margin-top: 20px; margin-bottom: 20px; }
.prose h2 { margin-top: 64px; margin-bottom: 24px; }
.prose h3 { margin-top: 36px; margin-bottom: 18px; }
.prose pre, .prose figure { margin-block: 28px; }
.prose a { text-decoration: underline; text-underline-offset: .2em; }
.prose :not(pre) > code { color: var(--c-accent-dark); }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border: 1px solid var(--c-clear);
  border-radius: var(--r-btn);
  background: var(--c-accent);
  color: var(--c-on-dark);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: transform var(--motion-fast), background-color var(--motion-fast);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--c-accent-dark); color: var(--c-on-dark); text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.btn--primary {
  background: var(--c-bg);
  color: var(--c-accent);
  box-shadow: var(--sh-btn);
}
.btn--primary:hover { background: var(--c-panel); color: var(--c-accent); }
.btn--outline { background: var(--c-bg); color: var(--c-accent); border-color: var(--c-border); }
.btn--outline:hover { background: var(--c-panel); color: var(--c-accent); }
.btn--ghost {
  border-color: var(--c-on-dark-line);
  background: var(--c-clear);
  color: var(--c-on-dark);
}
.btn--ghost:hover { background: var(--c-on-dark-fill); color: var(--c-on-dark); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; transform: none; box-shadow: none; pointer-events: none; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.topbar {
  position: relative;
  z-index: 50;
  height: var(--nav-h);
  background: var(--c-bg);
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border);
}
.topbar-inner {
  width: 100%;
  max-width: min(100%, calc(var(--header-span) + var(--gutter) * 2));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--c-text);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo, .brand-mark { width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--r-mark); }
.brand-mark {
  display: block;
  background: var(--c-bg);
  color: var(--c-accent);
  border: 1.5px solid var(--c-accent);
  box-shadow: inset 0 0 0 3px var(--c-panel);
}
.mainnav { margin-left: auto; min-width: 0; }
.mainnav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.mainnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: var(--r-btn);
  color: var(--c-muted);
  font-size: 14.5px;
  white-space: nowrap;
  text-decoration: none;
}
.mainnav svg { width: 16px; height: 16px; }
.mainnav a:hover { color: var(--c-accent); }
.mainnav a[aria-current="page"] { background: var(--c-panel); color: var(--c-accent); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.language-control { position: relative; }
.lang, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 13.5px;
  white-space: nowrap;
}
.lang svg { width: 15px; height: 15px; color: var(--c-muted); }
.lang-short { display: none; }
.lang-caret { color: var(--c-muted); font-size: 11px; }
.language-list {
  position: absolute;
  z-index: 3;
  right: 0;
  top: calc(100% + 12px);
  min-width: 180px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: var(--sh-soft);
}
.language-list a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r-btn); }
.language-list a:hover, .language-list a[aria-current="true"] { background: var(--c-panel); color: var(--c-accent); text-decoration: none; }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; border-radius: var(--r-btn); }
.menu-toggle svg { width: 21px; height: 21px; }
.mobile-drawer {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: var(--nav-h);
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px var(--gutter) 28px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-text);
}
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  color: var(--c-text);
  border-radius: var(--r-btn);
}
.mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--c-panel); color: var(--c-accent); text-decoration: none; }
.mobile-drawer svg { width: 18px; height: 18px; }
.drawer-languages { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.drawer-label { color: var(--c-muted); font-size: 13px; padding-inline: 12px; margin-bottom: 8px; }
.nav-veil { position: fixed; z-index: 40; inset: var(--nav-h) 0 0; border: 0; background: var(--c-veil); color: var(--c-on-dark); }
.site-footer {
  margin-top: var(--section-gap);
  padding-top: 64px;
  padding-bottom: 28px;
  background: var(--c-panel);
  color: var(--c-text);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr 1fr; gap: 40px; }
.footer-grid > * { min-width: 0; }
.footer-brand p { margin-top: 20px; max-width: 24em; color: var(--c-muted); font-size: 14px; }
.footer-heading { margin-bottom: 16px; font-size: 15px; font-weight: 500; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding-block: 6px; color: var(--c-muted); font-size: 14px; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--c-accent); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--c-border); color: var(--c-muted); font-size: 12px; }
.footer-bottom a { color: var(--c-muted); }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--motion-reveal), transform var(--motion-reveal) var(--ease-rise); }
html.reveal-ready .reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1279px) {
  .mainnav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-tools { margin-left: auto; }
}
@media (min-width: 1280px) {
  .mobile-drawer, .nav-veil { display: none !important; }
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px, 4vw, 30px); }
  .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --section-gap: 144px; }
  .topbar-inner { gap: 12px; }
  .brand { font-size: 14px; gap: 7px; }
  .brand-logo, .brand-mark { width: 27px; height: 27px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang { min-height: 44px; padding-inline: 10px; }
  .lang svg { display: none; }
  .header-tools { margin-left: auto; gap: 6px; }
  .card, .panel { padding: 24px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-bottom { flex-direction: column; }
  .tilt, [data-tilt] { transform: none !important; }
  pre { padding: 18px; }
}
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .brand { font-size: 12px; }
  .brand-logo, .brand-mark { width: 24px; height: 24px; }
  .topbar-inner { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.reveal-ready .reveal { opacity: 1; transform: none; }
}