:root {
  --bg: #FFFFFF;
  --bg-panel: #F3F4F7;
  --bg-panel-2: #E9EBF1;
  --border: #E2E4EA;
  --border-strong: #CFD2DB;
  --accent: #4A50E8;
  --accent-dark: #2F33B8;
  --accent-soft: #C4C7F8;
  --accent-wash: #EEEFFD;
  --accent-a10: rgba(74, 80, 232, 0.10);
  --accent-a16: rgba(74, 80, 232, 0.16);
  --text: #1A1B22;
  --text-muted: #5E6170;
  --text-faint: #8C8F9C;
  --success: #2EC99A;
  --success-a20: rgba(46, 201, 154, 0.20);
  --warn: #D99A2B;
  --error: #D6453E;
  --on-accent: #FFFFFF;

  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-ctl: 6px;
  --r-card: 10px;
  --r-float: 14px;
  --r-pill: 999px;
  --r-tab: 8px;
  --r-mark: 5px;
  --r-line: 2px;
  --r-edge: 3px;
  --r-dot: 50%;

  --shadow-float: 0 40px 90px rgba(74, 80, 232, 0.16), 0 2px 6px rgba(26, 27, 34, 0.07);
  --shadow-ctl: 0 1px 2px rgba(26, 27, 34, 0.08);
  --shadow-knob: 0 1px 2px rgba(26, 27, 34, 0.22);
  --veil: rgba(26, 27, 34, 0.38);

  --header-h: 72px;
  --header-span: 1280px;
  --gutter: max(40px, calc((100vw - 1312px) / 2));
  --wrap: 1200px;
  --measure: 760px;
  --section-space: clamp(56px, 7vw, 104px);
  --card-pad: clamp(18px, 3vw, 32px);
  --size-h1: clamp(34px, 3.4vw, 48px);
  --size-h2: clamp(24px, 2.4vw, 36px);
  --size-h3: clamp(18px, 1.65vw, 22px);
  --weight-heavy: 800;
  --track-title: -0.02em;
  --track-hero: -0.025em;
  --ease-ui: .15s ease;
  --z-header: 5;
  --z-fab: 3;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-padding-top: 1rem; }
html.nav-open { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, svg, video { max-width: 100%; }
img, video { height: auto; }
.icon, .status-dot, .vg-btn svg, .vg-tools svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; }
a { color: var(--accent-dark); text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--track-title);
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }
.nowrap { white-space: nowrap; }
.prose, .article-body, .doc-body { min-width: 0; line-height: 1.8; overflow-wrap: anywhere; }
.prose :is(h2, h3), .article-body :is(h2, h3), .doc-body :is(h2, h3) {
  margin-block: 1.65em .6em;
  scroll-margin-top: var(--toc-offset, 80px);
}
.prose :is(ul, ol), .article-body :is(ul, ol), .doc-body :is(ul, ol) { padding-inline-start: 1.5em; }
code, kbd, samp, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
:not(pre) > code {
  padding: .12em .35em;
  border-radius: var(--r-line);
  background: var(--bg-panel-2);
  color: var(--text);
}
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
  white-space: pre;
}
pre code { overflow-wrap: normal; white-space: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--reading { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.band { padding-block: var(--section-space); }
.band--panel { background: var(--bg-panel); color: var(--text); }
.decor-zone { position: relative; overflow-x: clip; }
.decor-zone > .decor-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tilt-art { transform: rotate(-.45deg); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 20px;
}
.card-grid > *, .vg-hero-grid > *, .footer-grid > * { min-width: 0; }
.card, .panel {
  min-width: 0;
  padding: var(--card-pad);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  overflow-wrap: anywhere;
}
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.card p, .panel p { line-height: 1.7; }
.flow > * + * { margin-block-start: 1.25rem; }
.section-heading { margin-bottom: clamp(24px, 4vw, 52px); }
.section-heading > h2 { margin-top: 8px; }
.vg-dash { display: block; width: 24px; height: 3px; border-radius: var(--r-line); background: var(--success); }
.vg-eyebrow {
  margin: 14px 0 0;
  font: 500 12.5px var(--font-mono);
  letter-spacing: .06em;
  color: var(--text-muted);
}

.button, .vg-btn {
  display: inline-flex;
  min-height: 52px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 24px;
  font: 700 16px/1.25 var(--font-body);
  text-decoration: none;
  text-align: center;
  border: 1.5px solid var(--accent);
  border-radius: var(--r-ctl);
  cursor: pointer;
  transition: background-color var(--ease-ui), color var(--ease-ui), border-color var(--ease-ui);
}
.button svg, .vg-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.button, .vg-btn--main { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-ctl); }
.button:hover, .button:active, .vg-btn--main:hover, .vg-btn--main:active, .button.demo-hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--on-accent);
}
.button--outline, .vg-btn--ghost { background: var(--bg); color: var(--accent); box-shadow: none; }
.button--outline:hover, .button--outline:active, .vg-btn--ghost:hover, .vg-btn--ghost:active {
  background: var(--accent-wash);
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}
.button:active, .vg-btn:active, .button.demo-active { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.button.demo-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.button:disabled {
  background: var(--bg-panel-2);
  border-color: var(--border);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.vg-head {
  position: relative;
  z-index: var(--z-header);
  height: var(--header-h);
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.vg-head-in {
  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;
}
.vg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--text);
  text-decoration: none;
  font: var(--weight-heavy) 19px/1.2 var(--font-display);
  letter-spacing: -.015em;
}
.vg-brand img { display: block; width: 30px; height: 30px; flex: none; }
.vg-nav { height: 100%; min-width: 0; margin-left: 56px; }
.vg-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vg-nav li { height: 100%; flex: none; }
.vg-nav a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease-ui);
}
.vg-nav a:hover { color: var(--accent); }
.vg-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--r-line) var(--r-line) 0 0;
}
.vg-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.vg-language { position: relative; }
.vg-lang, .vg-burger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  height: 38px;
  font: 600 14px var(--font-body);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  cursor: pointer;
  white-space: nowrap;
}
.vg-lang:hover, .vg-burger:hover { background: var(--bg-panel); border-color: var(--border-strong); color: var(--text); }
.vg-lang svg { width: 16px; height: 16px; color: var(--text-muted); }
.vg-lang .vg-caret { width: 10px; height: 10px; }
.vg-lang-short { display: none; }
.vg-burger { display: none; min-width: 44px; min-height: 44px; }
.vg-burger svg { width: 20px; height: 20px; }
.vg-burger[aria-expanded="true"] .vg-burger-lines,
.vg-burger[aria-expanded="false"] .vg-burger-close { display: none; }
.vg-language summary { list-style: none; }
.vg-language summary::-webkit-details-marker { display: none; }
.vg-lang-list {
  position: absolute;
  z-index: 2;
  inset: calc(100% + 8px) 0 auto auto;
  min-width: 148px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
}
.vg-lang-list a, .vg-drawer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--r-ctl);
  color: var(--text);
  text-decoration: none;
}
.vg-lang-list a:hover, .vg-drawer a:hover,
.vg-lang-list a[aria-current], .vg-drawer a[aria-current] {
  background: var(--accent-wash);
  color: var(--accent-dark);
}
.vg-drawer, .vg-veil { display: none; }
.vg-veil {
  position: fixed;
  z-index: 0;
  inset: calc(var(--header-h) - 1px) 0 0;
  background: var(--veil);
  color: var(--on-accent);
}
.vg-drawer {
  position: absolute;
  z-index: 1;
  inset: 100% 0 auto;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px var(--gutter) 20px;
  background: var(--bg);
  color: var(--text);
  border-block: 1px solid var(--border);
}
.vg-drawer ul { list-style: none; margin: 0; padding: 0; }
.vg-drawer p {
  margin: 12px 0 3px;
  padding: 12px 12px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.site-foot {
  padding-block: clamp(48px, 6vw, 86px) 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 52px);
}
.footer-brand p { max-width: 30em; margin: 16px 0 0; color: var(--text-muted); line-height: 1.7; }
.footer-title { font-size: 16px; }
.footer-links { list-style: none; margin: 12px 0 0; padding: 0; }
.footer-links li + li { margin-top: 6px; }
.footer-links a, .footer-line a {
  display: inline-block;
  padding-block: 3px;
  color: var(--text-muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.footer-links a:hover, .footer-line a:hover { color: var(--accent-dark); }
.footer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 14px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .reveal.is-observed { transition: opacity .4s ease-out, transform .4s ease-out; }
  .reveal.is-observed:not(.shown):not(:focus-within) { opacity: 0; transform: translateY(10px); }
}
@media (max-width: 1280px) {
  .vg-nav { margin-left: 36px; }
  .vg-nav ul { gap: 22px; }
}
/* Localized desktop tabs use tighter spacing, with a drawer at laptop widths. */
html:not([lang="zh-CN"]):not([lang="zh-TW"]) .vg-nav { margin-left: 22px; }
html:not([lang="zh-CN"]):not([lang="zh-TW"]) .vg-nav ul { gap: clamp(12px, 1.25vw, 22px); }
html:not([lang="zh-CN"]):not([lang="zh-TW"]) .vg-nav a { font-size: 14px; }
@media (max-width: 1280px) {
  html:not([lang="zh-CN"]):not([lang="zh-TW"]) .vg-nav { display: none; }
  html:not([lang="zh-CN"]):not([lang="zh-TW"]) .vg-burger,
  html:not([lang="zh-CN"]):not([lang="zh-TW"]) .vg-drawer:not([hidden]),
  html:not([lang="zh-CN"]):not([lang="zh-TW"]) .vg-veil:not([hidden]) { display: block; }
}
@media (max-width: 1024px) {
  .vg-head { --header-h: 64px; }
  .vg-nav { display: none; }
  .vg-tools { margin-left: auto; }
  .vg-burger { display: flex; }
  .vg-drawer:not([hidden]), .vg-veil:not([hidden]) { display: block; }
  .vg-head--preview { height: auto; }
  .vg-head--preview .vg-head-in { flex-wrap: wrap; gap: 10px; padding-top: 12px; }
  .vg-head--preview .vg-nav { display: block; width: 100%; order: 3; margin: 0; overflow-x: auto; }
  .vg-head--preview .vg-nav ul { height: 46px; }
  .vg-head--preview .vg-nav a[aria-current="page"]::after { bottom: 0; }
}
@media (max-width: 768px) {
  :root { --size-h1: clamp(24px, 6.8vw, 30px); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .tilt, .tilt-art { transform: none !important; }
  .vg-lang-full { display: none; }
  .vg-lang-short { display: inline; }
  .vg-brand { gap: 7px; font-size: 17px; }
}
@media (max-width: 380px) {
  .vg-tools { gap: 5px; }
  .vg-lang { padding-inline: 7px; gap: 5px; }
  .vg-brand img { width: 26px; height: 26px; }
  .footer-brand { grid-column: 1 / -1; }
}