:root {
  --bg: #FFFFFF;
  --bg-panel: #F5F2FF;
  --bg-panel-2: #ECE6FF;
  --border: #E2DDF0;
  --accent: #5B2EFF;
  --accent-dark: #2A0E8C;
  --text: #17132B;
  --text-muted: #5F5A75;
  --text-faint: #A39DBA;
  --success: #1F9D6B;
  --warn: #C98A00;
  --error: #E0443A;
  --hero-a: #5124FF;
  --hero-mid: #2D0DA3;
  --hero-b: #160838;
  --sun: #FF6B57;
  --sun-80: rgba(255,107,87,.78);
  --sun-40: rgba(255,107,87,.36);
  --sun-glow: rgba(255,107,87,.2);
  --sun-ring: rgba(255,107,87,.2);
  --sun-0: rgba(255,107,87,0);
  --on-dark: #FFFFFF;
  --on-dark-muted: rgba(255,255,255,.8);
  --on-dark-soft: rgba(255,255,255,.62);
  --on-dark-line: rgba(255,255,255,.32);
  --on-dark-fill: rgba(255,255,255,.07);
  --on-dark-hover: rgba(255,255,255,.12);
  --ray: rgba(255,255,255,.22);
  --ray-key: rgba(255,255,255,.42);
  --toggle-off: #D8D2EA;
  --clear: transparent;
  --veil: rgba(22,8,56,.42);
  --font-display: 'Inter','Noto Sans SC','PingFang SC','Microsoft YaHei',system-ui,sans-serif;
  --font-body: 'Inter','Noto Sans SC','PingFang SC','Hiragino Sans','Malgun Gothic','Microsoft YaHei',system-ui,sans-serif;
  --font-mono: 'JetBrains Mono',ui-monospace,'SFMono-Regular',Menlo,Consolas,monospace;
  --weight-normal: 400;
  --weight-medium: 500;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-round: 50%;
  --radius-pill: 999px;
  --shadow-card: 0 2px 4px rgba(22,8,56,.16),0 26px 54px -20px rgba(22,8,56,.62);
  --shadow-card-lift: 0 2px 6px rgba(22,8,56,.18),0 40px 80px -24px rgba(22,8,56,.72);
  --shadow-knob: 0 1px 2px rgba(22,8,56,.28);
  --shadow-btn: 0 1px 2px rgba(22,8,56,.22),0 12px 28px -12px rgba(22,8,56,.6);
  --shadow-soft: 0 1px 2px rgba(42,14,140,.06),0 16px 36px -18px rgba(91,46,255,.32);
  --gutter: 40px;
  --content-width: 1200px;
  --reading-width: 820px;
  --header-height: 64px;
  --section-space: 96px;
  --ease: cubic-bezier(.2,.7,.3,1);
  --duration: .2s;
  --focus-width: 3px;
}
*, *::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: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--clear); }
button { color: var(--text); }
img { display: block; max-width: 100%; height: auto; }
svg { vertical-align: middle; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: 4px; }
.hero :focus-visible { outline-color: var(--on-dark); }
::selection { background: var(--bg-panel-2); color: var(--accent-dark); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(34px,3.4vw,48px); line-height: 1.2; letter-spacing: -.008em; }
h2 { font-size: clamp(26px,2.6vw,38px); line-height: 1.25; letter-spacing: -.005em; }
h3 { font-size: 23px; line-height: 1.4; }
h4 { font-size: 18px; line-height: 1.45; }
strong { font-weight: var(--weight-medium); }
code, pre, kbd, samp { font-family: var(--font-mono); }
code { font-size: .88em; overflow-wrap: anywhere; }
pre {
  margin: 24px 0;
  padding: 20px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.8;
  tab-size: 2;
}
pre code { font-size: inherit; overflow-wrap: normal; word-break: normal; white-space: pre; }
.wrap {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-width: 0;
}
.reading { max-width: var(--reading-width); }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.section--panel { background: var(--bg-panel); color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.grid > *, .feature-pair > *, .footer-grid > *, .dl-grid > * { min-width: 0; }
.stack > * + * { margin-top: 24px; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { color: var(--accent-dark); }
.grad-title {
  text-align: center;
  background: linear-gradient(90deg,var(--accent) 0%,var(--sun) 100%);
  color: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: var(--clear);
}
.lead { max-width: 660px; margin: 16px auto 0; text-align: center; font-size: 17px; color: var(--text-muted); }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose > * + *, .article-body > * + * { margin-top: 20px; }
.prose h2, .article-body h2 { margin-top: 56px; scroll-margin-top: 28px; }
.prose h3, .article-body h3 { margin-top: 32px; scroll-margin-top: 28px; }
.prose ul, .prose ol, .article-body ul, .article-body ol { padding-left: 1.5em; }
.prose li + li, .article-body li + li { margin-top: 10px; }
.prose a:not(.btn), .article-body a:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose :not(pre) > code, .article-body :not(pre) > code { background: var(--bg-panel); color: var(--accent-dark); padding: 2px 4px; border-radius: var(--radius-xs); }
.skip {
  position: absolute; left: 16px; top: 12px; z-index: 100;
  width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  padding: 0; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-dark); font-size: 14px;
}
.skip:focus {
  width: auto; height: auto; padding: 8px 14px;
  overflow: visible; clip-path: none;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 10px 26px;
  border: 1px solid var(--clear); border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-dark);
  font-family: var(--font-body); font-size: 16px; font-weight: var(--weight-medium);
  line-height: 1.5; text-align: center;
  transition: transform var(--duration) var(--ease),background-color var(--duration) var(--ease),box-shadow var(--duration) var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover, .btn.is-hover { background: var(--accent-dark); color: var(--on-dark); transform: translateY(-1px); }
.btn:active, .btn.is-pressed { transform: translateY(1px); }
.btn--primary { background: var(--bg); color: var(--hero-a); box-shadow: var(--shadow-btn); }
.btn--primary:hover { background: var(--bg-panel); color: var(--hero-a); }
.btn--outline { background: var(--bg); color: var(--accent); border-color: var(--border); }
.btn--outline:hover { background: var(--bg-panel); color: var(--accent-dark); }
.btn--ghost { background: var(--clear); color: var(--on-dark); border-color: var(--on-dark-muted); }
.btn--ghost:hover { background: var(--on-dark-hover); color: var(--on-dark); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-panel-2); color: var(--text-muted); border-color: var(--border); box-shadow: none; transform: none; cursor: not-allowed; }
.btn.is-focus { outline: var(--focus-width) solid var(--accent); outline-offset: 4px; }
.btn-chev { font-size: 18px; line-height: 1; }
.panel, .surface-card {
  min-width: 0; padding: 28px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft);
}
.panel { background: var(--bg-panel); color: var(--text); box-shadow: none; }
.surface-card > * + *, .panel > * + * { margin-top: 16px; }
.topbar { position: relative; z-index: 50; background: var(--bg); color: var(--text); }
.topbar-inner {
  max-width: min(100%,calc(1280px + var(--gutter) * 2));
  height: var(--header-height); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 32px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: 17px; font-weight: var(--weight-medium); letter-spacing: -.005em; color: var(--text); }
.mainnav { margin-left: auto; min-width: 0; }
.mainnav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mainnav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 5px 15px;
  border-radius: var(--radius-pill); font-size: 15px; white-space: nowrap; color: var(--text-muted);
  transition: background-color var(--duration) var(--ease),color var(--duration) var(--ease);
}
.mainnav a:hover { background: var(--bg-panel); color: var(--text); }
.mainnav a.is-active, .drawer a.is-active { background: var(--bg-panel-2); color: var(--accent-dark); font-weight: var(--weight-medium); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language-control { position: relative; }
.lang {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--bg); color: var(--text); font-size: 14px;
  white-space: nowrap;
}
.lang:hover { border-color: var(--accent); background: var(--bg-panel); color: var(--text); }
.lang svg { width: 16px; height: 16px; color: var(--text-muted); }
.lang-caret { font-size: 11px; color: var(--text-muted); }
.lang-short { display: none; }
.language-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 4;
  min-width: 180px; padding: 8px; list-style: none;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-soft);
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--radius-xs); }
.language-menu a:hover, .language-menu a[aria-current] { background: var(--bg-panel); color: var(--accent-dark); }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; }
.drawer {
  position: absolute; top: var(--header-height); left: 0; right: 0; z-index: 3;
  max-height: calc(100vh - var(--header-height));
  max-height: calc(100dvh - var(--header-height));
  padding: 16px var(--gutter) 24px;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); color: var(--text); border-top: 1px solid var(--border);
}
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm); }
.drawer a:hover { background: var(--bg-panel); color: var(--accent-dark); }
.drawer-label { margin: 20px 14px 8px; font-size: 13px; color: var(--text-muted); }
.nav-veil { position: fixed; inset: var(--header-height) 0 0; z-index: 2; background: var(--veil); color: var(--on-dark); border: 0; }
.site-footer { background: var(--bg-panel); color: var(--text); border-top: 1px solid var(--border); padding-top: 64px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1.5fr .8fr; gap: 40px; }
.footer-intro { margin-top: 18px; max-width: 290px; font-size: 14px; color: var(--text-muted); }
.footer-title { font-size: 15px; font-weight: var(--weight-medium); margin-bottom: 16px; }
.footer-list { list-style: none; }
.footer-list li + li { margin-top: 8px; }
.footer-list a { font-size: 14px; color: var(--text-muted); overflow-wrap: anywhere; }
.footer-list a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer-list a[aria-current] { color: var(--accent-dark); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--text-muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
.reveal { opacity: 1; transform: none; }
.reveal-pending { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease),transform .55s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }
@media (max-width: 1100px) {
  .mainnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .topbar-inner { gap: 16px; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 1101px) {
  .drawer, .nav-veil { display: none !important; }
}
@media (max-width: 768px) {
  :root { --gutter: 20px; --section-space: 64px; }
  h1 { font-size: clamp(24px,4vw,30px); }
  h2 { font-size: clamp(24px,4vw,30px); }
  h3 { font-size: 21px; }
  .grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
  .tilt, [data-tilt] { transform: none !important; }
  .brand-name { font-size: 15px; }
  .topbar-inner { gap: 10px; }
  .lang { min-height: 40px; padding-inline: 10px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .header-tools { margin-left: auto; gap: 6px; }
  .panel, .surface-card { padding: 22px; }
  .footer-grid { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .brand { gap: 6px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-name { font-size: 14px; }
  .lang svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal-pending { opacity: 1; transform: none; }
}
@media print {
  .header-tools, .drawer, .nav-veil, .dl-fab { display: none !important; }
  .reveal, .reveal-pending { opacity: 1; transform: none; }
}