:root {
  --c-bg: #3E3D3B;
  --c-panel: #2F2F2E;
  --c-light: #3E3D3B;
  --c-on-accent: #2F2F2E;
  --c-border: #545452;
  --c-accent: #FFD43B;
  --c-accent-dark: #E0B21A;
  --c-accent-soft: rgba(255, 212, 59, .55);
  --c-text: #F2F2F0;
  --c-muted: #A9A8A5;
  --c-success: #74B98A;
  --c-warn: #E9A64B;
  --c-error: #E2685C;
  --c-ink: #F2F2F0;
  --c-ink-2: #CECDC9;
  --c-ink-3: #AAA9A5;
  --c-line: #565550;
  --c-line-2: #6A6964;
  --c-paper: #484744;
  --c-paper-2: #343330;
  --c-chip: #565550;
  --c-track: #706F69;
  --c-ring: #5C5B56;
  --c-code-dim: #7E7D7A;
  --c-bezel-deep: #232322;
  --c-glass: rgba(47, 47, 46, .94);
  --c-glass-edge: rgba(242, 242, 240, .2);
  --c-glow: rgba(160, 158, 148, .16);
  --c-glow-end: rgba(160, 158, 148, 0);
  --c-veil: rgba(35, 35, 34, .45);
  --c-clear: transparent;
  --grad-stage: linear-gradient(180deg, #3E3D3B 0%, #343330 100%);
  --grad-logo-a: var(--c-accent);
  --grad-logo-b: var(--c-accent-dark);
  --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;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-body: 16px;
  --fs-lead: 20px;
  --fs-h1: clamp(34px, 3.4vw, 48px);
  --fs-h2: clamp(28px, 3vw, 42px);
  --fs-h3: 24px;
  --fs-nav: 15px;
  --fs-brand: 18px;
  --fs-micro: 11px;
  --r-window: 22px;
  --r-panel: 28px;
  --r-phone: 36px;
  --r-screen: 29px;
  --r-btn: 12px;
  --r-sm: 9px;
  --r-mini: 6px;
  --r-dot: 50%;
  --r-pill: 999px;
  --r-menu: 18px;
  --r-sheet: 20px;
  --r-code: 16px;
  --r-segment: 10px;
  --r-segment-item: 7px;
  --r-kbd: 5px;
  --r-line: 3px;
  --r-mark: 4px;
  --r-square: 0;
  --sh-win: 0 1px 2px rgba(30,30,29,.06), 0 10px 24px -6px rgba(30,30,29,.10), 0 34px 60px -18px rgba(30,30,29,.18);
  --sh-sheet: 0 1px 2px rgba(30,30,29,.06), 0 16px 32px -8px rgba(30,30,29,.14), 0 48px 80px -24px rgba(30,30,29,.22);
  --sh-phone: 0 2px 4px rgba(30,30,29,.10), 0 24px 40px -10px rgba(30,30,29,.22), 0 70px 110px -30px rgba(30,30,29,.34);
  --sh-card: 0 2px 4px rgba(30,30,29,.12), 0 18px 34px -10px rgba(30,30,29,.30), 0 50px 80px -30px rgba(30,30,29,.32);
  --sh-pop: 0 1px 2px rgba(30,30,29,.06), 0 18px 40px -12px rgba(30,30,29,.22);
  --sh-btn: inset 0 -2px 0 rgba(30,30,29,.08), 0 12px 24px -12px rgba(224,178,26,.9);
  --sh-seg: 0 1px 2px rgba(30,30,29,.14);
  --sh-knob: 0 1px 2px rgba(30,30,29,.25);
  --hl-top: inset 0 1px 0 rgba(255,255,255,.12);
  --header-h: 76px;
  --gutter: 72px;
  --width-body: 1200px;
  --width-reading: 820px;
  --space-section: 88px;
  --ease-ui: 180ms ease;
  --ease-reveal: 600ms ease;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--c-ink);
  background: var(--c-light);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.nav-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; background: var(--c-clear); border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
img, svg { max-width: 100%; vertical-align: middle; }
img { height: auto; }
svg { flex-shrink: 0; }
p, ul, ol, pre, blockquote, figure, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; text-wrap: balance; }
h1, .h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -.014em; }
h2 { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: var(--fs-h3); font-weight: 750; }
h1, h2, h3 { display: block; }
ul, ol { padding-inline-start: 1.4em; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  border-radius: var(--r-code);
  background: var(--c-panel);
  color: var(--c-text);
  font-size: var(--fs-sm);
  line-height: 1.7;
  tab-size: 2;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; border-radius: var(--r-mini); }
.dark :focus-visible, .site-footer :focus-visible { outline-color: var(--c-accent); }
::selection { color: var(--c-on-accent); background: var(--c-accent); }
.wrap {
  width: 100%;
  max-width: calc(var(--width-body) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--width-reading) + var(--gutter) * 2); }
.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section, .decorated, .hero { overflow-x: clip; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > *, .flex > *, .wrap > *, .prose > *, .prose div { min-width: 0; }
.flex { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.stack > * + * { margin-top: 24px; }
.nowrap { white-space: nowrap; }
.muted { color: var(--c-ink-2); }
.dark { background: var(--c-bg); color: var(--c-text); }
.dark .muted { color: var(--c-muted); }
.light { background: var(--c-light); color: var(--c-ink); }
.paper { background: var(--c-paper); color: var(--c-ink); }
.panel { padding: 32px; border-radius: var(--r-panel); background: var(--c-paper); color: var(--c-ink); box-shadow: var(--sh-win); }
.panel-dark { background: var(--c-panel); color: var(--c-text); }
.card { padding: 28px; border-radius: var(--r-panel); background: var(--c-paper); color: var(--c-ink); box-shadow: var(--sh-win); min-width: 0; }
.card h3 { margin-top: 0; }
.card p { color: var(--c-ink-2); }
.prose { min-width: 0; }
.prose > * + *, .prose section > * + * { margin-top: 20px; }
.prose h2 { margin-top: 56px; }
.prose h3 { margin-top: 32px; }
.prose p, .prose li { line-height: 1.9; }
.prose a { text-decoration: underline; text-decoration-color: var(--c-line-2); text-underline-offset: 4px; }
.prose :not(pre) > code { padding: 2px 5px; background: var(--c-chip); color: var(--c-ink); border-radius: var(--r-mark); font-size: .9em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: 12px; z-index: 100; padding: 10px 14px; background: var(--c-panel); color: var(--c-text); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 24px; max-width: 100%;
  border-radius: var(--r-btn); font-size: var(--fs-body); font-weight: 700; letter-spacing: .005em;
  line-height: 1.4; text-align: center;
  transition: background var(--ease-ui), border-color var(--ease-ui), transform var(--ease-ui);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-main { background: var(--c-accent); color: var(--c-on-accent); box-shadow: var(--sh-btn); }
.btn-main:hover, .btn-main.is-hover { background: var(--c-accent-dark); color: var(--c-on-accent); transform: translateY(-1px); }
.btn-main:active { transform: translateY(1px); box-shadow: var(--sh-seg); }
.btn-sub { background: var(--c-paper); color: var(--c-ink); border: 1px solid var(--c-line-2); }
.btn-sub:hover { border-color: var(--c-ink-3); }
.btn-outline { background: var(--c-clear); color: var(--c-text); border: 1px solid var(--c-text); }
.btn-outline:hover { background: var(--c-paper); color: var(--c-ink); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--c-chip); color: var(--c-ink-2); box-shadow: none; transform: none; border: 1px solid var(--c-line-2); }
.btn.is-focus { outline: 2px solid var(--c-ink); outline-offset: 3px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* 页头使用独立宽版心；桌面导航的 ul 本身就是横排。 */
.topbar { position: relative; z-index: 40; height: var(--header-h); background: var(--c-light); color: var(--c-ink); border-bottom: 1px solid var(--c-line); }
.topbar-in {
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  height: 100%; margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-brand); letter-spacing: -.005em; line-height: 1.4; color: var(--c-ink); }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.desktop-nav { margin-left: auto; min-width: 0; height: 100%; }
.nav { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; height: 100%; }
.nav > li { position: relative; display: flex; height: 100%; align-items: center; }
.nav-link { position: relative; display: flex; align-items: center; gap: 6px; height: calc(var(--header-h) - 1px); padding-inline: 16px; color: var(--c-ink-2); font-size: var(--fs-nav); font-weight: 500; white-space: nowrap; }
.nav-link:hover { color: var(--c-ink); }
.nav-link[aria-current="page"], .nav-link.is-current { color: var(--c-ink); font-weight: 700; }
.nav-link[aria-current="page"]::after, .nav-link.is-current::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 3px; border-radius: var(--r-line) var(--r-line) var(--r-square) var(--r-square); background: var(--c-accent); color: var(--c-on-accent); }
.nav-more { position: relative; }
.nav-more > summary { list-style: none; cursor: pointer; }
.nav-more > summary::-webkit-details-marker { display: none; }
.caret { width: 10px; height: 10px; flex-shrink: 0; transition: transform var(--ease-ui); }
details[open] > summary .caret { transform: rotate(180deg); }
.nav-drop { position: absolute; top: calc(100% - 10px); right: 0; width: 250px; padding: 8px; border-radius: var(--r-menu); background: var(--c-paper); color: var(--c-ink); border: 1px solid var(--c-line); box-shadow: var(--sh-pop); }
.drop-cap { display: block; padding: 8px 12px 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; color: var(--c-ink-2); }
.drop-item { display: block; padding: 10px 12px; border-radius: var(--r-btn); min-height: 44px; }
.drop-item:hover { background: var(--c-paper-2); color: var(--c-ink); }
.drop-item b { display: block; font-size: var(--fs-nav); font-weight: 700; }
.drop-item span { display: block; margin-top: 3px; font-size: var(--fs-xs); color: var(--c-ink-2); }
.drop-item[aria-current="page"] { background: var(--c-chip); color: var(--c-ink); }
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-sep { width: 1px; height: 22px; background: var(--c-line-2); color: var(--c-ink); margin-inline: 6px; }
.language { position: relative; }
.lang { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 12px; border-radius: var(--r-btn); font-size: var(--fs-sm); font-weight: 500; color: var(--c-ink-2); border: 1px solid var(--c-clear); white-space: nowrap; }
.lang:hover { border-color: var(--c-line-2); background: var(--c-paper); color: var(--c-ink); }
.lang svg { width: 15px; height: 15px; }
.lang-short { display: none; }
.language-list { position: absolute; right: 0; top: calc(100% + 10px); min-width: 180px; list-style: none; margin: 0; padding: 8px; border-radius: var(--r-menu); background: var(--c-paper); color: var(--c-ink); box-shadow: var(--sh-pop); border: 1px solid var(--c-line); }
.language-list a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.language-list a:hover, .language-list a[aria-current="true"] { background: var(--c-chip); color: var(--c-ink); }
.menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--c-line-2); border-radius: var(--r-btn); }
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-drawer { display: none; }
.nav-veil { position: fixed; inset: var(--header-h) 0 0; z-index: 30; background: var(--c-veil); color: var(--c-text); }
.preview-mobile { display: none; }

/* 页脚不使用强调色作大面积背景。 */
.site-footer { background: var(--c-panel); color: var(--c-text); padding-top: 64px; padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.4fr .7fr; gap: 40px; }
.footer-grid > * { min-width: 0; }
.site-footer .brand { color: var(--c-text); }
.footer-intro { max-width: 320px; margin-top: 18px; color: var(--c-muted); font-size: var(--fs-sm); }
.footer-title { margin: 0 0 16px; font-size: var(--fs-sm); font-weight: 700; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li + li { margin-top: 8px; }
.footer-list a { display: inline-block; padding-block: 3px; color: var(--c-muted); font-size: var(--fs-sm); }
.footer-list a:hover { color: var(--c-text); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--c-border); color: var(--c-muted); font-size: var(--fs-xs); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--ease-reveal), transform var(--ease-reveal); }
html.reveal-ready .reveal.shown { opacity: 1; transform: none; }
@media (max-width: 1280px) {
  :root { --gutter: 56px; }
  .topbar-in { gap: 12px; }
  .nav-link { padding-inline: 12px; }
  .nav-link[aria-current="page"]::after, .nav-link.is-current::after { left: 12px; right: 12px; }
}
@media (max-width: 1000px) {
  :root { --gutter: 24px; --header-h: 64px; --space-section: 64px; }
  .desktop-nav, .header-tools .nav-sep { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer {
    display: block; position: absolute; left: 0; right: 0; top: var(--header-h);
    z-index: 2; max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    overscroll-behavior: contain; padding: 16px var(--gutter) 24px;
    background: var(--c-paper); color: var(--c-ink); border-bottom: 1px solid var(--c-line); box-shadow: var(--sh-pop);
  }
  .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-radius: var(--r-btn); }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--c-chip); color: var(--c-ink); }
  .mobile-language-title { padding: 20px 16px 8px; border-top: 1px solid var(--c-line); margin-top: 12px; font-size: var(--fs-xs); color: var(--c-ink-2); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-mobile { display: block; }
  .preview-mobile summary { list-style: none; display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: var(--r-btn); border: 1px solid var(--c-line-2); cursor: pointer; }
  .preview-mobile summary::-webkit-details-marker { display: none; }
}
@media (max-width: 768px) {
  :root { --fs-h1: clamp(24px, 7vw, 30px); --fs-h2: 28px; --fs-h3: 21px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --space-section: 48px; }
  .grid-2, .grid-3, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .brand { font-size: var(--fs-sm); gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .topbar-in { gap: 8px; }
  .header-tools { gap: 4px; margin-left: auto; }
  .lang { padding-inline: 8px; min-height: 44px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .btn { min-height: 48px; padding: 10px 20px; font-size: var(--fs-nav); }
  .card, .panel { padding: 24px; }
  .tilt, .tilt-card, [data-tilt] { transform: none !important; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.reveal-ready .reveal { opacity: 1; transform: none; }
}