:root {
  --bg: #FFFFFF;
  --bg-panel: #F6F7FB;
  --bg-panel-2: #EEF0F7;
  --border: #E4E6EF;
  --border-soft: #EDEEF4;
  --accent: #6E52F5;
  --accent-dark: #4A31C9;
  --accent-soft: #F1EEFE;
  --sky: #4AA8F2;
  --text: #15133A;
  --text-muted: #5E6280;
  --text-faint: #686C88;
  --success: #1FB39C;
  --warn: #E39B2E;
  --error: #F0565A;
  --navy: #14123A;
  --navy-raise: rgba(255, 255, 255, 0.06);
  --navy-line: rgba(255, 255, 255, 0.09);
  --navy-muted: #B6B0D5;
  --seg-on: #E6E0FF;
  --on-accent: #FFFFFF;
  --on-dark: #F4F3FF;
  --dot-gray: #D8DBE6;
  --glow-lavender: #EDE8FF;
  --glow-sky: #E3F1FD;
  --glow-fade: rgba(255, 255, 255, 0);
  --grad-accent: linear-gradient(100deg, var(--accent) 0%, var(--sky) 100%);
  --grad-text: linear-gradient(95deg, var(--accent) 8%, var(--sky) 92%);
  --grad-coral: linear-gradient(120deg, var(--accent) 0%, var(--error) 100%);
  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', '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;
  --weight-regular: 400;
  --weight-medium: 500;
  --r-card: 24px;
  --r-card-sm: 20px;
  --r-row: 16px;
  --r-tile: 11px;
  --r-app: 12px;
  --r-pill: 999px;
  --r-circle: 50%;
  --shadow-1: 0 1px 2px rgba(21, 19, 58, 0.04), 0 18px 36px -22px rgba(21, 19, 58, 0.18);
  --shadow-2: 0 2px 6px rgba(21, 19, 58, 0.04), 0 44px 90px -36px rgba(21, 19, 58, 0.26), 0 18px 40px -24px rgba(74, 49, 201, 0.12);
  --shadow-3: 0 4px 12px rgba(21, 19, 58, 0.07), 0 54px 96px -30px rgba(21, 19, 58, 0.36), 0 22px 44px -22px rgba(74, 49, 201, 0.18);
  --shadow-cta: 0 14px 28px -14px rgba(110, 82, 245, 0.7);
  --shadow-knob: 0 1px 3px rgba(21, 19, 58, 0.25);
  --veil: rgba(20, 18, 58, 0.36);
  --wrap: 1280px;
  --reading: 840px;
  --gutter: 40px;
  --nav-h: 76px;
  --space-section: 96px;
  --ease-ui: 180ms ease;
  --ease-reveal: 600ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
html, body { margin: 0; padding: 0; }
html.nav-open { overflow: hidden; }
body {
  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;
}
[hidden] { display: none !important; }
img, svg { vertical-align: middle; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: var(--accent-soft); }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
p, h1, h2, h3, h4, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: var(--weight-regular); text-wrap: balance; }
h1 { font-size: clamp(34px, 3.4vw, 48px); line-height: 1.2; letter-spacing: -0.015em; }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.25; letter-spacing: -0.01em; }
h3 { font-size: 22px; line-height: 1.4; }
strong, b { font-weight: var(--weight-medium); }
small { font-size: 13px; }
ul, ol { padding-left: 1.5em; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  margin: 0;
  border-radius: var(--r-row);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
  -webkit-overflow-scrolling: touch;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.reading { max-width: var(--reading); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section--panel { background: var(--bg-panel); color: var(--text); }
.section__intro { max-width: 680px; margin-bottom: 36px; }
.section__intro p { margin-top: 14px; color: var(--text-muted); }
.nowrap { white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--accent-dark);
  -webkit-text-fill-color: transparent;
}
.grid { display: grid; gap: 24px; }
.grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > *, .prose, .prose div, main, article, section { min-width: 0; }
.stack > * + * { margin-top: 20px; }
.prose { line-height: 1.9; }
.prose h2 { margin-top: 56px; margin-bottom: 22px; }
.prose h3 { margin-top: 32px; margin-bottom: 16px; }
.prose p + p, .prose pre, .prose ul, .prose ol { margin-top: 20px; }
.prose a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.prose :not(pre) > code {
  padding: 2px 5px;
  border-radius: var(--r-tile);
  background: var(--bg-panel);
  color: var(--text);
}
.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: 10px;
  min-height: 54px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: var(--weight-medium);
  line-height: 1.5;
  text-align: center;
  transition: transform var(--ease-ui), background var(--ease-ui);
}
.btn:hover, .btn.is-hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-cta); }
.btn--primary:hover, .btn--primary.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn--ghost { background: var(--bg); color: var(--text); border-color: var(--border); padding-inline: 24px; }
.btn--ghost:hover { background: var(--bg-panel); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-panel-2); color: var(--text-muted); box-shadow: none; transform: none; }
.btn.is-focus { outline: 3px solid var(--accent); outline-offset: 4px; }
.btn--small { min-height: 44px; padding: 9px 20px; font-size: 14px; }
.card, .panel {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-1);
}
.panel { background: var(--bg-panel); color: var(--text); box-shadow: none; }
.card--active {
  border: 1.5px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad-accent) border-box;
  color: var(--text);
  box-shadow: var(--shadow-2);
}
.card p, .panel p { margin-top: 12px; color: var(--text-muted); }
.card__link { display: inline-flex; margin-top: 22px; color: var(--accent-dark); font-weight: var(--weight-medium); }

/* 页头独立宽版心，不复用正文 wrap。 */
#site-header { position: relative; z-index: 50; }
.topbar { position: relative; z-index: 50; height: var(--nav-h); background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border-soft); }
.topbar__inner {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__mark { display: block; width: 34px; height: 34px; flex-shrink: 0; }
.brand__name { font-family: var(--font-display); font-size: 18px; font-weight: var(--weight-medium); letter-spacing: -0.01em; color: var(--text); }
.mainnav { min-width: 0; margin-left: 56px; }
.mainnav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mainnav a { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 14px; border-radius: var(--r-pill); font-size: 15px; color: var(--text-muted); white-space: nowrap; }
.mainnav a:hover { color: var(--text); }
.mainnav a[aria-current="page"] { background: var(--bg-panel); color: var(--text); }
.mainnav a[aria-current="page"] svg { stroke: var(--accent); }
.nav-icon { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.lang-wrap { position: relative; }
.lang { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 14px 7px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text); font-size: 14px; white-space: nowrap; }
.lang__short { display: none; }
.lang__caret { font-size: 11px; color: var(--text-muted); }
.lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 190px;
  padding: 8px;
  margin: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--r-card-sm);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-2);
  z-index: 4;
}
.lang-menu a { display: flex; align-items: center; min-height: 44px; width: 100%; padding: 10px 14px; border-radius: var(--r-tile); }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-dark); }
.menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text); }
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.mobile-nav { display: none; }
.nav-veil { position: fixed; inset: var(--nav-h) 0 0; z-index: 40; border: 0; background: var(--veil); color: var(--text); }

/* 深色仅用于核心特性整块分区与页脚。 */
.site-footer { background: var(--navy); color: var(--on-dark); padding-top: 72px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.8fr 1.3fr 0.8fr; gap: 40px; }
.footer-grid > * { min-width: 0; }
.site-footer .brand__name { color: var(--on-dark); }
.footer-intro { max-width: 300px; margin-top: 20px; color: var(--navy-muted); font-size: 14px; line-height: 1.9; }
.footer-heading { font-size: 15px; font-weight: var(--weight-medium); margin-bottom: 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 9px; }
.footer-links a { display: inline-block; padding-block: 3px; font-size: 14px; color: var(--navy-muted); }
.footer-links a:hover { color: var(--on-dark); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--navy-line); font-size: 13px; color: var(--navy-muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
html.reveal-ready .reveal { transition: opacity var(--ease-reveal), transform var(--ease-reveal); }
.decorated, .hero, .features { overflow-x: clip; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (max-width: 1280px) {
  .mainnav { margin-left: 28px; }
  .mainnav a { padding-inline: 10px; }
}
@media (max-width: 1100px) {
  .mainnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav:not([hidden]) {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 16px var(--gutter) 24px;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    color: var(--text);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-2);
  }
  .mobile-nav ul { margin: 0; padding: 0; list-style: none; }
  .mobile-nav a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-tile); }
  .mobile-nav a[aria-current] { background: var(--bg-panel); color: var(--accent-dark); }
  .mobile-nav__languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
}
@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) {
  :root { --gutter: 20px; --space-section: 64px; --nav-h: 64px; }
  h1 { font-size: clamp(24px, 6vw, 30px); }
  .brand__name { font-size: 16px; }
  .grid--two, .grid--three { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 22px; }
  .lang__text { display: none; }
  .lang__short { display: inline; }
  .lang { min-height: 44px; padding-inline: 11px; }
  .header-tools { margin-left: auto; gap: 8px; }
}
@media (max-width: 640px) {
  .tilt, .tilt-card { transform: none !important; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .btn { max-width: 100%; white-space: normal; }
  pre { padding: 18px; font-size: 12px; }
}
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .brand { gap: 7px; }
  .brand__name { font-size: 14px; }
  .brand__mark { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html.reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}