:root {
  --bg: #FBFBFD;
  --bg-panel: #F5F5F8;
  --bg-panel-2: #EEEEF2;
  --surface: #FFFFFF;
  --border: #E4E4EA;
  --border-strong: #D3D3DB;
  --dot: #DEDEE5;
  --accent: #EE5E3F;
  --accent-dark: #C8462B;
  --accent-tint: #FDEEE9;
  --accent-on: #FFFFFF;
  --text: #17171C;
  --text-muted: #63636F;
  --text-faint: #9A9AA6;
  --success: #22A77A;
  --success-tint: #E4F4ED;
  --warn: #B9820F;
  --error: #D63B3B;
  --clear: transparent;
  --veil: rgba(23, 23, 28, .24);
  --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, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  --r-ctl: 6px;
  --r-card: 8px;
  --r-pill: 999px;
  --r-round: 50%;
  --shadow-card: 0 1px 2px rgba(23, 23, 28, .04);
  --shadow-window: 0 1px 0 rgba(23, 23, 28, .02), 0 32px 64px -44px rgba(23, 23, 28, .22);
  --container: 1200px;
  --rail: 1320px;
  --header-width: 1280px;
  --reading-width: 840px;
  --gutter: 24px;
  --header-height: 60px;
  --size-body: 15px;
  --size-small: 13px;
  --size-h1: clamp(34px, 1.6vw + 21px, 46px);
  --size-h2: clamp(25px, 2.6vw, 34px);
  --size-h3: 21px;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-strong: 600;
  --leading-body: 1.6;
  --leading-title: 1.15;
  --tracking-title: -.02em;
  --duration-reveal: 420ms;
  --ease-reveal: cubic-bezier(.2, .6, .3, 1);
}

*, *::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: var(--size-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--clear); }
img, video { display: block; max-width: 100%; height: auto; }
svg { display: block; flex-shrink: 0; }
button svg, a svg { flex-shrink: 0; }
figure { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  line-height: var(--leading-title);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--size-h1); letter-spacing: var(--tracking-title); }
h2 { font-size: var(--size-h2); letter-spacing: -.015em; }
h3 { font-size: var(--size-h3); }
p { margin-top: 0; }
strong { font-weight: var(--weight-strong); }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
hr { border: 0; border-top: 1px solid var(--border); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-ctl); }
::selection { background: var(--accent-tint); color: var(--text); }
.wrap {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-width) + var(--gutter) * 2); }
.section { position: relative; padding-top: 72px; padding-bottom: 80px; border-top: 1px solid var(--border); overflow-x: clip; }
.section-panel { background: var(--bg-panel); color: var(--text); }
.section-white { background: var(--surface); color: var(--text); }
.section-head { margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 10px 0 0; color: var(--text-muted); font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid > *, .wrap > *, .prose > *, .panel > *, .card > * { min-width: 0; }
.nowrap { white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.text-link { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { 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: 8px;
  min-height: 40px; padding: 10px 18px;
  border: 1px solid var(--clear); border-radius: var(--r-ctl);
  font-family: var(--font-body); font-size: 15px; font-weight: var(--weight-medium);
  line-height: 1.2; text-align: center;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--accent-on); }
.btn-primary:active { background: var(--accent-dark); color: var(--accent-on); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover, .btn-ghost.is-hover { background: var(--bg-panel); color: var(--text); }
.btn-text { background: var(--clear); color: var(--accent-dark); }
.btn-text:hover { background: var(--accent-tint); color: var(--accent-dark); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-panel-2); border-color: var(--border); color: var(--text-muted); cursor: not-allowed; }
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-arrow { color: var(--text-muted); font-weight: var(--weight-regular); }
.button-row, .cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.card, .panel {
  min-width: 0; padding: 24px; border: 1px solid var(--border);
  border-radius: var(--r-card); background: var(--surface); color: var(--text);
}
.card h3, .panel h3 { margin-top: 0; }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.prose { min-width: 0; line-height: 1.85; }
.prose h2 { margin-top: 56px; margin-bottom: 20px; scroll-margin-top: 28px; }
.prose h3 { margin-top: 32px; margin-bottom: 14px; scroll-margin-top: 28px; }
.prose p, .prose ul, .prose ol { margin-bottom: 20px; }
.prose a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose :not(pre) > code { background: var(--bg-panel); color: var(--text); padding: 2px 5px; border-radius: var(--r-ctl); font-size: .9em; }
.prose pre { background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px; font-size: 13px; line-height: 1.75; }
.prose li + li { margin-top: 8px; }

/* 独立页头版心，工具区与抽屉互为兄弟。 */
.topbar { position: relative; z-index: 40; background: var(--bg); color: var(--text); }
.topbar-in {
  position: relative; width: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  margin-inline: auto; padding-inline: var(--gutter); min-height: var(--header-height);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; margin-right: auto; flex-shrink: 0; }
.brand img { width: 22px; height: 22px; flex-shrink: 0; }
.brand-name { font-size: 15px; font-weight: var(--weight-medium); letter-spacing: -.01em; color: var(--text); }
.mainnav { min-width: 0; }
.mainnav ul {
  display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 2px;
}
.mainnav li { min-width: 0; }
.mainnav a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 10px;
  border-radius: var(--r-ctl); font-size: 14px; color: var(--text-muted); white-space: nowrap;
}
.mainnav a svg { width: 15px; height: 15px; color: var(--text-faint); }
.mainnav a:hover { background: var(--bg-panel); color: var(--text); }
.mainnav a[aria-current="page"] { color: var(--text); }
.mainnav a[aria-current="page"] svg { color: var(--accent); }
.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: 6px;
  min-height: 32px; padding: 5px 10px 5px 9px;
  border: 1px solid var(--border); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--text); font-size: 13.5px; white-space: nowrap;
}
.lang svg { width: 15px; height: 15px; color: var(--text-muted); }
.lang-caret { font-size: 10px; color: var(--text-muted); }
.lang:hover { border-color: var(--border-strong); }
.lang-short { display: none; }
.language-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px;
  margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); z-index: 4;
}
.language-menu a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 12px; border-radius: var(--r-ctl); }
.language-menu a:hover, .language-menu a[aria-current="true"] { background: var(--bg-panel); color: var(--text); }
.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(--surface); color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-nav {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 3;
  max-height: calc(100dvh - var(--header-height)); overflow-y: auto; overscroll-behavior: contain;
  padding: 16px var(--gutter) 24px;
  border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 12px; border-radius: var(--r-ctl); }
.mobile-nav a svg { width: 17px; height: 17px; color: var(--text-muted); }
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { background: var(--bg-panel); color: var(--text); }
.mobile-nav-title { margin: 16px 12px 6px; color: var(--text-muted); font-size: 13px; }
.nav-veil { position: fixed; inset: var(--header-height) 0 0; z-index: 30; border: 0; padding: 0; background: var(--veil); color: var(--text); }

/* 页脚 */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-panel); color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.15fr .85fr 1.3fr .7fr; gap: 36px; padding-top: 56px; padding-bottom: 48px; }
.footer-grid > * { min-width: 0; }
.footer-brand p { max-width: 280px; margin: 16px 0 0; color: var(--text-muted); font-size: 14px; }
.footer-title { margin: 0 0 16px; font-size: 14px; font-weight: var(--weight-medium); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { display: inline-block; padding-block: 3px; color: var(--text-muted); font-size: 13.5px; }
.footer-links a:hover { color: var(--accent-dark); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { color: var(--accent-dark); }

/* 无脚本默认可见，只有观察器就绪才进入过渡状态。 */
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(12px); }
.reveal-ready .reveal { transition: opacity var(--duration-reveal) var(--ease-reveal), transform var(--duration-reveal) var(--ease-reveal); }
.reveal-ready .reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1200px) {
  .topbar-in { gap: 14px; }
  .mainnav a { padding-inline: 7px; }
}
@media (max-width: 1100px) {
  .mainnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 1101px) {
  .mobile-nav, .nav-veil { display: none !important; }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  :root { --size-h1: clamp(24px, 4vw, 30px); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section { padding-top: 48px; padding-bottom: 56px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .topbar-in { gap: 8px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .brand-name { font-size: 14px; }
  .footer-grid { gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .tilt, [data-tilt] { transform: none !important; }
  .card, .panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}