:root {
  --bg: #FFFFFF;
  --bg-panel: #F6F7FB;
  --bg-panel-2: #EEF0F7;
  --border: #E3E6EF;
  --accent: #5462E8;
  --accent-dark: #3A45C2;
  --text: #15171F;
  --text-muted: #5D6375;
  --success: #3F9F63;
  --warn: #C98512;
  --error: #D6453D;
  --success-ink: #27683F;
  --warn-ink: #805207;
  --error-ink: #A52D27;
  --text-faint: #5D6375;
  --clear: transparent;
  --mask-solid: #000000;
  --accent-06: rgba(84, 98, 232, 0.06);
  --accent-10: rgba(84, 98, 232, 0.10);
  --accent-12: rgba(84, 98, 232, 0.12);
  --accent-16: rgba(84, 98, 232, 0.16);
  --accent-30: rgba(84, 98, 232, 0.30);
  --accent-40: rgba(84, 98, 232, 0.40);
  --accent-dark-06: rgba(58, 69, 194, 0.06);
  --accent-dark-12: rgba(58, 69, 194, 0.12);
  --accent-dark-16: rgba(58, 69, 194, 0.16);
  --success-06: rgba(63, 159, 99, 0.06);
  --success-10: rgba(63, 159, 99, 0.10);
  --success-16: rgba(63, 159, 99, 0.16);
  --warn-soft: rgba(201, 133, 18, 0.10);
  --error-soft: rgba(214, 69, 61, 0.08);
  --ink-04: rgba(21, 23, 31, 0.04);
  --ink-06: rgba(21, 23, 31, 0.06);
  --ink-14: rgba(21, 23, 31, 0.14);
  --veil: rgba(21, 23, 31, 0.24);
  --white-pattern: rgba(255, 255, 255, 0.22);
  --shade-24: rgba(40, 48, 110, 0.22);
  --shade-28: rgba(40, 48, 110, 0.28);
  --grad: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%);
  --grad-diag: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 46%, var(--success) 100%);
  --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', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-strong: 600;
  --r-chip: 6px;
  --r-btn: 8px;
  --r-win: 10px;
  --r-mini: 2px;
  --r-logo-small: 5px;
  --r-pill: 999px;
  --r-circle: 50%;
  --shadow-soft: 0 1px 2px var(--ink-04), 0 2px 6px var(--ink-04);
  --shadow-btn: 0 1px 2px var(--ink-06), 0 8px 18px -8px var(--accent-40);
  --shadow-window: 0 1px 2px var(--ink-04), 0 2px 8px var(--ink-04), 0 34px 80px -34px var(--shade-24);
  --shadow-float: 0 1px 2px var(--ink-06), 0 18px 36px -16px var(--shade-28);
  --nav-h: 64px;
  --bar-h: 44px;
  --peek: 34px;
  --bleed: 4vw;
  --gutter: max(56px, calc((100vw - 1328px) / 2));
  --assist-w: 228px;
  --content-w: 1240px;
  --reading-w: 800px;
  --section-space: 88px;
  --motion-fast: 180ms;
  --motion-reveal: 600ms;
  --tab-cycle: 7s;
}

*, *::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;
}
[hidden] { display: none !important; }
img, svg { vertical-align: middle; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: var(--clear); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent-dark); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  color: var(--text);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.012em;
}
h2 { margin: 0 0 24px; font-size: clamp(26px, 3vw, 36px); line-height: 1.3; }
h3 { margin: 0 0 14px; font-size: 22px; line-height: 1.4; }
p { margin: 0 0 18px; }
strong, b { font-weight: var(--weight-strong); }
code, pre, .mono { font-family: var(--font-mono); }
code { font-size: 0.9em; overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  margin: 20px 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg-panel);
  color: var(--text);
  line-height: 1.8;
  tab-size: 2;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-w) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-w) + var(--gutter) * 2); }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.section-panel { background: var(--bg-panel); color: var(--text); }
.grid { display: grid; gap: 24px; }
.grid > *, .hero-inner > *, .footer-grid > *, .settings-browser > *, .card > * { min-width: 0; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 24px; min-width: 0; }
.muted { color: var(--text-muted); }
.keep { white-space: nowrap; }
.eyebrow { margin-bottom: 12px; color: var(--text-muted); font-size: 13px; }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose h2 { margin-top: 56px; }
.prose h3 { margin-top: 32px; }
.prose p, .prose li { line-height: 1.9; }
.prose li + li { margin-top: 8px; }
.prose :is(h2, h3, h4, section)[id] { scroll-margin-top: 24px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: 8px;
  left: var(--gutter);
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-btn);
}
.skip-link:focus { width: auto; height: auto; overflow: visible; clip-path: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid var(--clear);
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: var(--weight-medium);
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  transition: transform var(--motion-fast) ease;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active, .btn.is-pressed { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--bg); box-shadow: var(--shadow-btn); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--bg); }
.btn-ghost { background: var(--bg); color: var(--accent-dark); border-color: var(--accent-30); }
.btn-ghost:hover, .btn-ghost.is-hover { background: var(--accent-06); color: var(--accent-dark); border-color: var(--accent); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-panel-2); color: var(--text-muted); border-color: var(--border); box-shadow: none; transform: none; pointer-events: none; }
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 13px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.card, .panel {
  min-width: 0;
  padding: 28px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-win);
}
.card { box-shadow: var(--shadow-soft); }
.panel-soft { background: var(--bg-panel); color: var(--text); }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.card h3 { font-size: 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-head h3 { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li, .chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: var(--r-chip);
  background: var(--bg-panel);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 12.5px;
}
.chips li.mono { font-size: 11.5px; }
.topbar {
  position: relative;
  z-index: 30;
  height: var(--nav-h);
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.brand img { width: 30px; height: 30px; flex-shrink: 0; }
.mainnav { min-width: 0; margin-left: auto; }
.mainnav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.mainnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.mainnav a:hover { background: var(--bg-panel); color: var(--text); }
.mainnav a[aria-current="page"], .mobile-drawer a[aria-current="page"] { background: var(--accent-10); color: var(--accent-dark); font-weight: var(--weight-medium); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  white-space: nowrap;
  text-decoration: none;
  list-style: none;
}
.lang::-webkit-details-marker { display: none; }
.lang svg { width: 15px; height: 15px; fill: none; stroke: var(--text-muted); stroke-width: 1.6; flex-shrink: 0; }
.caret-down { color: var(--text-muted); font-size: 11px; }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  box-shadow: var(--shadow-float);
  z-index: 35;
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; color: var(--text-muted); text-decoration: none; border-radius: var(--r-chip); }
.language-menu a:hover, .language-menu a[aria-current="true"] { background: var(--accent-10); 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(--r-btn);
  background: var(--bg);
  color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mobile-drawer { display: none; }
.nav-veil {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 20;
  border: 0;
  padding: 0;
  background: var(--veil);
  color: var(--text);
}
.site-footer { background: var(--bg-panel); color: var(--text); border-top: 1px solid var(--border); padding-top: 56px; padding-bottom: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.25fr 0.8fr; gap: 40px; }
.footer-brand p { margin-top: 18px; max-width: 28em; color: var(--text-muted); font-size: 14px; }
.site-footer h2 { font-size: 14px; font-weight: var(--weight-medium); margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { color: var(--text-muted); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--accent-dark); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-legal a { color: var(--text-muted); }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(16px); }
html.reveal-ready .reveal { transition: opacity var(--motion-reveal) ease, transform var(--motion-reveal) ease; }
.decorated, .hero { overflow-x: clip; }

@media (max-width: 1280px) {
  :root { --gutter: 32px; }
}
@media (max-width: 1100px) {
  .mainnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]) {
    display: block;
    position: absolute;
    z-index: 34;
    top: 100%;
    left: 0;
    right: 0;
    padding: 16px var(--gutter) 24px;
    background: var(--bg);
    color: var(--text);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r-btn); color: var(--text-muted); text-decoration: none; }
  .mobile-drawer a:hover { background: var(--bg-panel); color: var(--text); }
  .drawer-languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
  .drawer-languages p { margin-bottom: 8px; font-size: 12px; color: var(--text-muted); }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px, 5vw, 30px); line-height: 1.25; }
  :root { --section-space: 56px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .topbar-inner { gap: 10px; }
  .brand { gap: 8px; font-size: 14px; }
  .brand img { width: 28px; height: 28px; }
  .header-tools { gap: 6px; margin-left: auto; }
  .lang { padding-inline: 10px; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
  .grid-2, .grid-3, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 22px; }
  .footer-grid { gap: 32px; }
  .chips { flex-direction: row; flex-wrap: wrap; }
  .tilt, [data-tilt] { transform: none !important; }
  .btn { padding-inline: 17px; }
}
@media (max-width: 359px) {
  :root { --gutter: 16px; }
}
@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; }
}