:root {
  --bg: #000000;
  --panel: #0C0C0C;
  --panel-2: #161616;
  --panel-3: #1E1E1E;
  --border: #262626;
  --border-strong: #363636;
  --accent: #2F6BFF;
  --accent-dark: #1A47C2;
  --accent-soft: #8FB0FF;
  --accent-line: rgba(47, 107, 255, 0.38);
  --accent-glow: rgba(47, 107, 255, 0.62);
  --accent-glow-in: rgba(47, 107, 255, 0.30);
  --accent-haze: rgba(47, 107, 255, 0.22);
  --accent-haze-soft: rgba(47, 107, 255, 0.09);
  --canvas: #020615;
  --text: #F2F2F2;
  --muted: #8A8A8A;
  --code-val: #B4B4B4;
  --dim: #5A5A5A;
  --dot: #3A3A3A;
  --success: #3DD68C;
  --warn: #F5B83D;
  --error: #FF5A5F;
  --shade: rgba(0, 0, 0, 0.85);
  --sheen: rgba(255, 255, 255, 0.045);
  --clear: transparent;

  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --weight-regular: 400;
  --weight-medium: 500;
  --r-xl: 28px;
  --r-lg: 16px;
  --r-code: 14px;
  --r-md: 12px;
  --r-nav: 10px;
  --r-icon: 9px;
  --r-sm: 8px;
  --r-xs: 6px;
  --r-pill: 999px;
  --r-round: 50%;
  --shadow-card: inset 0 1px 0 0 var(--sheen), 0 48px 90px -44px var(--shade);
  --shadow-float: 0 14px 34px -10px var(--shade);
  --topbar-h: 68px;
  --peek: 36px;
  --gutter: 48px;
  --content-width: 1216px;
  --header-width: 1280px;
  --reading-width: 800px;
  --section-space: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --duration-fast: 160ms;
  --duration-reveal: 600ms;
  --focus-ring: 2px solid var(--accent);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; color-scheme: dark; }
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: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; vertical-align: middle; }
img { height: auto; }
svg, .status-dot { flex-shrink: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: var(--clear); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
:focus-visible { outline: var(--focus-ring); outline-offset: 3px; border-radius: var(--r-sm); }
::selection { background: var(--accent-dark); color: var(--text); }
h1, h2, h3, h4 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  line-height: 1.25;
  letter-spacing: -.012em;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 3.4vw, 48px); line-height: 1.14; }
h2 { font-size: clamp(26px, 2.6vw, 36px); }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p { margin: 0 0 18px; }
strong, b { font-weight: var(--weight-medium); }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  margin: 20px 0;
  padding: 20px;
  overflow-x: auto;
  background: var(--panel-2);
  color: var(--code-val);
  border: 1px solid var(--border);
  border-radius: var(--r-code);
  font-size: 13px;
  line-height: 1.8;
  tab-size: 2;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
:where(main, section, article, aside, div, nav, li) { min-width: 0; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.reading { max-width: calc(var(--reading-width) + var(--gutter) * 2); }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.section-heading { margin-bottom: 28px; }
.section-heading p { max-width: 660px; color: var(--muted); }
.keep { white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.text-link, .prose a { color: var(--accent-soft); text-underline-offset: 4px; }
.text-link { flex: none; font-size: 14px; }
.text-link:hover, .prose a:hover { color: var(--text); text-decoration: underline; }
.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: fixed;
  top: 8px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--clear);
  border-radius: var(--r-md);
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: var(--weight-medium);
  line-height: 1.4;
  text-align: center;
  transition: background-color var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover, .btn-primary.is-hover { transform: translateY(-1px); background: var(--text); color: var(--bg); }
.btn-ghost { background: var(--panel-2); color: var(--text); }
.btn-ghost:hover, .btn-ghost.is-hover { background: var(--panel-3); color: var(--text); }
.btn-outline { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn:active, .btn.is-pressed { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--panel-2); color: var(--muted); border-color: var(--border); transform: none; }
.btn.is-focus { outline: var(--focus-ring); outline-offset: 3px; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* 页头独立宽版心，不复用阅读宽度。 */
#site-header, .preview-header { position: relative; z-index: 40; }
.topbar {
  position: relative;
  width: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: var(--weight-medium);
  letter-spacing: -.005em;
  color: var(--text);
}
.brand-mark { width: 28px; height: 28px; flex: none; }
.desktop-nav { margin-left: auto; min-width: 0; }
.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.nav-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}
.nav-list a:hover { color: var(--text); }
.nav-list a[aria-current="page"] { background: var(--panel-2); color: var(--text); }
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.language-control { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  white-space: nowrap;
}
.lang:hover { color: var(--text); border-color: var(--border-strong); }
.lang svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-float);
  z-index: 45;
}
.language-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-nav);
  color: var(--muted);
}
.language-menu a:hover, .language-menu a[aria-current] { background: var(--panel-2); 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-md);
  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; }
.menu-veil {
  position: fixed;
  inset: var(--topbar-h) 0 0;
  z-index: 20;
  border: 0;
  background: var(--shade);
  color: var(--text);
}

/* 内容默认可见；只有观察脚本接管后才淡入。 */
.reveal { opacity: 1; transform: none; }
.reveal.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--duration-reveal) var(--ease), transform var(--duration-reveal) var(--ease);
}
.reveal.shown { opacity: 1; transform: none; }
.card, .panel {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--panel);
  color: var(--text);
  padding: 32px;
}
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.prose { overflow-wrap: break-word; }
.prose h2 { margin-top: 52px; }
.prose h3 { margin-top: 32px; }
.prose p, .prose li { color: var(--code-val); line-height: 1.9; }
.prose strong { color: var(--text); }
.prose :not(pre) > code {
  padding: 2px 5px;
  border-radius: var(--r-xs);
  background: var(--panel-2);
  color: var(--text);
}
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose [id] { scroll-margin-top: 24px; }

/* 页脚 */
.site-footer { padding-top: 64px; padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.25fr .8fr 1.4fr .7fr; gap: 40px; padding-top: 36px; border-top: 1px solid var(--border); }
.footer-brand p { margin-top: 18px; max-width: 300px; color: var(--muted); font-size: 14px; }
.footer-title { font-size: 14px; margin-bottom: 16px; }
.footer-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.footer-bottom p { margin: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 20px; }
.legal-links a:hover { color: var(--text); }

/* 已确认首屏排版 */
.hero {
  min-height: calc(100vh - var(--topbar-h) - var(--peek));
  min-height: calc(100svh - var(--topbar-h) - var(--peek));
  display: grid;
  align-content: center;
  padding-top: 24px;
  padding-bottom: 28px;
  overflow-x: clip;
}
.hero-head { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 56px; row-gap: 28px; }
.hero-title { grid-column: 1; grid-row: 1; align-self: end; margin: 0; font-size: clamp(32px, 3.4vw, 48px); }
.hero-title > span { display: block; }
.lede { grid-column: 2; grid-row: 1; align-self: end; margin: 0; padding-bottom: 4px; font-size: 15px; line-height: 1.72; color: var(--muted); }
.lede strong { color: var(--text); }
.cta-row { grid-column: 1; grid-row: 2; align-self: baseline; display: flex; align-items: center; gap: 12px; }
.facts { grid-column: 2; grid-row: 2; align-self: baseline; margin: 0; font-size: 14px; color: var(--muted); white-space: nowrap; }
.facts b { font-weight: var(--weight-regular); color: var(--text); }
.facts .sep { margin: 0 8px; color: var(--muted); }
.platforms { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.platforms-label { margin-right: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.plat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 13px 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--muted);
  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.plat svg { width: 14px; height: 14px; flex: none; }
.plat:hover { color: var(--text); border-color: var(--border-strong); background: var(--panel); }
.hero-visual, .decorated { position: relative; overflow-x: clip; }
.decorative-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]) {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 42;
    display: block;
    max-height: calc(100vh - var(--topbar-h));
    max-height: calc(100dvh - var(--topbar-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px var(--gutter) 24px;
    border-bottom: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
  }
  .drawer-list { margin: 0; padding: 0; list-style: none; }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 12px 16px; border-radius: var(--r-md); color: var(--muted); }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--panel-2); color: var(--text); }
  .drawer-languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
  .drawer-label { margin: 0 16px 8px; font-size: 12px; color: var(--muted); }
}
@media (max-width: 1100px) {
  :root { --gutter: 28px; }
  .hero-head { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .hero-title, .lede, .cta-row, .facts { grid-column: 1; grid-row: auto; }
  .cta-row { grid-row: 2; }
  .lede { grid-row: 3; max-width: 650px; }
  .facts { white-space: normal; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  :root { --gutter: 16px; --section-space: 40px; }
  h1, .hero-title { font-size: clamp(24px, 7vw, 30px); }
  .hero { min-height: 0; padding-top: 20px; padding-bottom: 40px; }
  .hero-title > span { overflow-wrap: normal; }
  .topbar { gap: 12px; }
  .cta-row { flex-wrap: wrap; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 24px 20px; }
  .site-footer { padding-top: 40px; }
  .footer-grid { gap: 28px; }
}
@media (max-width: 640px) {
  .tilt, [data-tilt] { transform: none !important; }
  .platforms { flex-direction: row; flex-wrap: wrap; }
  .platforms-label { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .lang-long { display: none; }
  .lang-short { display: inline; }
  .brand { font-size: 13px; gap: 8px; }
  .header-tools { gap: 6px; margin-left: auto; }
  .lang { padding-inline: 10px; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.reveal-pending { opacity: 1; transform: none; }
}