:root {
  color-scheme: dark;
  --bg: #0E0E0E;
  --bg-panel: #171717;
  --bg-panel-2: #1F1F1F;
  --border: #2A2A2A;
  --border-soft: #222222;
  --accent: #A47CF3;
  --accent-dark: #6B42D9;
  --accent-grad: linear-gradient(135deg, var(--accent), var(--accent-dark));
  --accent-soft: rgba(164, 124, 243, 0.14);
  --accent-shadow: rgba(107, 66, 217, 0.45);
  --text: #ECECEC;
  --text-muted: #9A9A9A;
  --text-faint: #909090;
  --detail: #5E5E5E;
  --on-accent: #FFFFFF;
  --success: #4FBF7F;
  --success-ring: rgba(79, 191, 127, 0.16);
  --warn: #D9A441;
  --error: #E5604F;
  --ink: #050505;
  --light-core: rgba(236, 241, 250, 0.11);
  --light-mid: rgba(236, 241, 250, 0.055);
  --light-low: rgba(236, 241, 250, 0.02);
  --glint: rgba(242, 245, 252, 0.5);
  --sheen: rgba(242, 245, 252, 0.05);
  --edge-hi: rgba(255, 255, 255, 0.045);
  --shadow-soft: rgba(0, 0, 0, 0.55);
  --shadow-deep: rgba(0, 0, 0, 0.82);
  --clear: rgba(0, 0, 0, 0);
  --mask-solid: #000000;
  --mask-mid: rgba(0, 0, 0, 0.35);
  --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;
  --weight-strong: 600;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-h3: 21px;
  --text-h2: clamp(24px, 2.4vw, 32px);
  --text-display: clamp(34px, 3.4vw + 0.5rem, 48px);
  --r-ctl: 6px;
  --r-panel: 10px;
  --r-pill: 999px;
  --r-phone: 34px;
  --r-check: 4px;
  --r-line: 2px;
  --r-circle: 50%;
  --gutter: 40px;
  --wrap: 1200px;
  --reading: 800px;
  --header-h: 64px;
  --section-space: 100px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.1, 1);
  --duration: 180ms;
  --shadow-panel: inset 0 1px 0 var(--edge-hi), 0 20px 48px -28px var(--shadow-soft);
  --shadow-window: inset 0 1px 0 var(--edge-hi), 0 1px 2px var(--shadow-soft), 0 40px 90px -30px var(--shadow-deep), 0 18px 40px -24px var(--shadow-soft);
  --shadow-phone: inset 0 1px 0 var(--edge-hi), 0 0 0 4px var(--ink), 0 0 0 5px var(--border-soft), 0 30px 60px -12px var(--shadow-deep), 0 10px 22px -6px var(--shadow-deep);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); 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(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, svg, video { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: var(--accent-soft); }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
ul { padding-left: 1.4em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--weight-medium); text-wrap: balance; }
h1 { font-size: var(--text-display); line-height: 1.14; letter-spacing: -0.02em; }
h2 { font-size: var(--text-h2); line-height: 1.3; letter-spacing: -0.015em; }
h3 { font-size: var(--text-h3); line-height: 1.4; }
p { margin-top: 0; margin-bottom: 1.2em; }
strong { font-weight: var(--weight-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-ctl); }
::selection { background: var(--accent-soft); color: var(--text); }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.8;
  tab-size: 2;
}
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);
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); border-top: 1px solid var(--border); }
.section-head { margin-bottom: 36px; max-width: 680px; }
.section-head h2 { margin-top: 0; margin-bottom: 14px; }
.section-head p, .muted { color: var(--text-muted); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.grid { display: grid; gap: 24px; }
.grid > *, .hero-top > *, .footer-grid > *, .settings-layout > * { min-width: 0; }
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack > * + * { margin-top: 20px; }
.flow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.panel, .card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-panel);
}
.card h3 { margin-top: 0; margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.prose { min-width: 0; line-height: 1.85; }
.prose h2 { margin-top: 2.6em; margin-bottom: 0.8em; }
.prose h3 { margin-top: 2em; margin-bottom: 0.7em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.prose li { margin-block: 8px; }
.prose :not(pre) > code { font-size: 0.9em; color: var(--text); }
.prose img { display: block; }
.prose > *, .prose div, .prose section { min-width: 0; max-width: 100%; }

.btn-primary, .btn-secondary, .button, .btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  padding: 9px 20px;
  border: 1px solid var(--clear);
  border-radius: var(--r-ctl);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  transition: transform var(--duration) ease, border-color var(--duration) ease, color var(--duration) ease, box-shadow var(--duration) ease;
}
.btn-primary, .button {
  background: var(--accent-grad);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 var(--sheen), 0 10px 24px -12px var(--accent-shadow);
}
.btn-primary:hover, .button:hover, .demo-hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 var(--sheen), 0 14px 28px -12px var(--accent-shadow);
}
.btn-primary:active, .button:active, .demo-active { transform: translateY(1px); box-shadow: inset 0 2px 4px var(--shadow-soft); }
.btn-secondary { background: var(--bg-panel); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg-panel-2); color: var(--text); }
.btn-link { padding-inline: 0; background: var(--clear); color: var(--accent); border-color: var(--clear); }
.btn-link:hover { color: var(--text); }
.btn-link svg { transition: transform var(--duration) ease; }
.btn-link:hover svg { transform: translateX(2px); }
.btn-primary:disabled, .btn-secondary:disabled, .button:disabled {
  transform: none;
  box-shadow: none;
  background: var(--bg-panel-2);
  color: var(--text-muted);
  border-color: var(--border);
}
.demo-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-bottom: 22px; }

.topbar { position: relative; z-index: 50; height: var(--header-h); border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.topbar-in {
  width: 100%;
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  height: 100%;
  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; margin-right: auto; font-size: 16px; font-weight: var(--weight-strong); letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; display: block; flex-shrink: 0; }
.tabs { min-width: 0; height: 100%; }
.tabs ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; height: 100%; gap: 2px; }
.tabs li { height: 100%; }
.tabs a { position: relative; display: flex; align-items: center; height: 100%; padding-inline: 14px; font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.tabs a:hover, .tabs a.is-active { color: var(--text); }
.tabs a.is-active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: var(--r-line); background: var(--accent-grad); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language-picker { position: relative; }
.lang { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--bg); color: var(--text-muted); font-size: var(--text-sm); white-space: nowrap; }
.lang:hover { color: var(--text); border-color: var(--text-faint); }
.lang svg { width: 15px; height: 15px; flex-shrink: 0; }
.lang-short { display: none; }
.lang-caret { font-size: 11px; color: var(--text-muted); }
.language-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-panel);
}
.language-menu a { display: flex; align-items: center; min-height: 44px; width: 100%; padding: 10px 12px; border-radius: var(--r-ctl); font-size: 14px; }
.language-menu a:hover, .language-menu a[aria-current] { background: var(--bg-panel-2); color: var(--accent); }
.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(--r-ctl); background: var(--bg); color: var(--text); }
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-drawer { display: none; }
.nav-veil { position: fixed; z-index: 40; inset: var(--header-h) 0 0; border: 0; background: var(--shadow-deep); color: var(--text); }
.static-menu { display: none; }
.static-menu > summary { list-style: none; }
.static-menu > summary::-webkit-details-marker { display: none; }

.site-footer { padding-top: 64px; padding-bottom: 28px; border-top: 1px solid var(--border); background: var(--bg); color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: 1.35fr 0.8fr 1.2fr 0.7fr; gap: 48px; }
.footer-brand .brand { color: var(--text); margin-bottom: 18px; }
.footer-brand p { max-width: 310px; font-size: 14px; }
.footer-title { margin-top: 0; margin-bottom: 18px; color: var(--text); font-size: 14px; font-weight: var(--weight-medium); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding-block: 6px; font-size: 13px; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--accent); }
.footer-links a[aria-current] { color: var(--text); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: var(--text-xs); }

.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(14px); }
.reveal { transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.shown { opacity: 1; transform: none; }
.decorated, .hero { position: relative; overflow-x: clip; isolation: isolate; }

@media (max-width: 1100px) {
  .topbar-in { gap: 20px; }
  .topbar .tabs { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer {
    position: absolute;
    z-index: 5;
    top: var(--header-h);
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px var(--gutter) 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
  }
  .mobile-drawer:not([hidden]) { display: block; }
  .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 16px; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
  .mobile-drawer a:hover, .mobile-drawer a.is-active, .mobile-drawer a[aria-current] { background: var(--bg-panel); color: var(--accent); }
  .drawer-label { margin: 24px 16px 8px; font-size: var(--text-xs); color: var(--text-muted); }
  .static-menu { display: block; }
  .static-menu .menu-toggle { display: flex; }
  .static-menu:not([open]) .mobile-drawer { display: none; }
  html:has(.static-menu[open]) { overflow: hidden; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
  .grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  :root { --text-display: clamp(24px, 4.2vw, 30px); --section-space: 64px; }
  h1 { font-size: var(--text-display); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .wrap { width: 100%; padding-inline: var(--gutter); }
  .topbar-in { gap: 10px; }
  .topbar .brand span { display: none; }
  .header-tools { margin-left: auto; gap: 6px; }
  .lang { min-height: 44px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .grid-two, .grid-three, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .panel, .card { padding: 22px; }
  .tilt, [data-tilt] { transform: none !important; }
  .footer-grid { gap: 28px; }
  .footer-brand p { max-width: none; }
  .cta { gap: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}