:root {
  --bg: #fafafa;
  --bg-panel: #ffffff;
  --bg-panel-2: #f3f3f4;
  --border: #e7e6ea;
  --accent: #b24bd8;
  --accent-dark: #7d2aa3;
  --text: #17161b;
  --text-muted: #66646e;
  --success: #1f9d6b;
  --warn: #c98a12;
  --error: #d6453d;
  --grad-1: #8f6bff;
  --grad-2: #b24bd8;
  --grad-3: #ff9f86;
  --gradient: linear-gradient(90deg, var(--grad-1) 0%, var(--grad-2) 52%, var(--grad-3) 100%);
  --gradient-v: linear-gradient(180deg, var(--grad-1) 0%, var(--grad-2) 55%, var(--grad-3) 100%);
  --gradient-text: linear-gradient(90deg, var(--grad-1) 0%, var(--grad-2) 68%, var(--grad-3) 135%);
  --ink: #17161b;
  --ink-hover: #2b2931;
  --on-ink: #ffffff;
  --chip: #ececee;
  --chip-hover: #e3e3e6;
  --hairline: rgba(23, 22, 27, 0.07);
  --seg-track: rgba(23, 22, 27, 0.055);
  --nav-bg: rgba(250, 250, 250, 0.86);
  --veil: rgba(23, 22, 27, 0.28);
  --glass: rgba(255, 255, 255, 0.76);
  --glass-2: rgba(243, 243, 244, 0.84);
  --glass-tint: linear-gradient(140deg, rgba(143, 107, 255, 0.10) 0%, rgba(255, 159, 134, 0.16) 100%);
  --stripe-1: rgba(143, 107, 255, 0.06);
  --stripe-2: rgba(143, 107, 255, 0.12);
  --stripe-3: rgba(143, 107, 255, 0.20);
  --stripe-4: rgba(143, 107, 255, 0.30);
  --stripe-5: rgba(158, 98, 246, 0.36);
  --stripe-6: rgba(178, 75, 216, 0.36);
  --stripe-7: rgba(206, 92, 190, 0.36);
  --stripe-8: rgba(238, 124, 160, 0.40);
  --stripe-9: rgba(255, 159, 134, 0.46);
  --band-1-from: rgba(238, 124, 160, 0.20);
  --band-1-to: rgba(255, 159, 134, 0.52);
  --band-2-from: rgba(255, 159, 134, 0.10);
  --band-2-to: rgba(255, 159, 134, 0.34);
  --policy-proxy: #8f6bff;
  --policy-direct: #b24bd8;
  --policy-reject: #f0806a;
  --halo-proxy: rgba(143, 107, 255, 0.16);
  --halo-direct: rgba(178, 75, 216, 0.15);
  --halo-reject: rgba(240, 128, 106, 0.18);
  --wire-proxy: rgba(143, 107, 255, 0.62);
  --wire-direct: rgba(178, 75, 216, 0.55);
  --wire-reject: rgba(240, 128, 106, 0.70);
  --lane-proxy: rgba(143, 107, 255, 0.07);
  --lane-direct: rgba(178, 75, 216, 0.06);
  --lane-reject: rgba(240, 128, 106, 0.08);
  --final-tint: rgba(143, 107, 255, 0.06);
  --shadow-near: 0 1px 2px rgba(23, 22, 27, 0.08);
  --shadow-mid: 0 10px 24px rgba(23, 22, 27, 0.06);
  --shadow-far: 0 40px 80px rgba(125, 42, 163, 0.16);
  --shadow-board: var(--shadow-near), var(--shadow-mid), var(--shadow-far);
  --shadow-cell: 0 1px 2px rgba(23, 22, 27, 0.05), 0 8px 20px rgba(23, 22, 27, 0.04);
  --shadow-cell-hover: 0 1px 2px rgba(23, 22, 27, 0.06), 0 16px 32px rgba(23, 22, 27, 0.07), 0 24px 48px rgba(125, 42, 163, 0.08);
  --shadow-seg: 0 1px 2px rgba(23, 22, 27, 0.10), 0 0 0 0.5px rgba(23, 22, 27, 0.06);
  --r-xs: 7px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-pill: 999px;
  --r-dot: 50%;
  --font-display: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --container: 1280px;
  --reading: 800px;
  --gutter: 40px;
  --nav-h: 64px;
  --lane-w: 148px;
  --board-gap: 44px;
  --board-overlap: 90px;
  --space-section: 88px;
  --ease: 0.2s ease;
  --focus-ring: 0 0 0 3px var(--halo-proxy);
}
*, *::before, *::after { box-sizing: border-box; }
html { 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.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--halo-proxy); }
button:disabled { cursor: not-allowed; opacity: 0.5; }
:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 4px; }
img, svg { max-width: 100%; }
svg { flex-shrink: 0; }
img { height: auto; }
figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.16; letter-spacing: -0.02em; font-weight: 400; }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 400; }
h3 { font-size: 21px; line-height: 1.4; font-weight: 500; }
p { margin-block: 0 1em; }
strong { font-weight: 600; }
code { font-family: var(--font-mono); font-size: 0.9em; overflow-wrap: anywhere; }
pre { max-width: 100%; min-width: 0; overflow-x: auto; padding: 20px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel-2); color: var(--text); line-height: 1.8; }
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(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.wrap > *, .bento > *, .card-grid > *, .footer-grid > *, .feature-tabs > *, .prose, .prose > * { min-width: 0; }
.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section--panel { background: var(--bg-panel); color: var(--text); border-block: 1px solid var(--border); }
.section-title { margin-top: 0; margin-bottom: 20px; }
.muted, .lede { color: var(--text-muted); }
.nowrap { white-space: nowrap; }
.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; left: 16px; top: 8px; z-index: 100; transform: translateY(-160%); padding: 10px 16px; background: var(--ink); color: var(--on-ink); border-radius: var(--r-sm); }
.skip-link:focus { transform: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px 0 19px; border: 1px solid var(--border);
  border-radius: var(--r-pill); font: 500 16px/1.3 var(--font-body);
  letter-spacing: -0.005em; text-align: center; text-decoration: none;
  transition: background-color var(--ease), box-shadow var(--ease);
}
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn--primary:hover, .btn--primary.is-hover { background: var(--ink-hover); color: var(--on-ink); }
.btn--ghost { background: var(--chip); color: var(--text); border-color: var(--chip); }
.btn--ghost:hover, .btn--ghost.is-hover { background: var(--chip-hover); color: var(--text); }
.btn--outline { background: var(--bg-panel); color: var(--text); }
.btn--outline:hover { background: var(--bg-panel-2); color: var(--text); }
.btn.is-focus { outline: 2px solid var(--accent-dark); outline-offset: 4px; }
.cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.card, .panel { padding: 28px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-cell); min-width: 0; }
.card h3, .panel h3 { margin-top: 0; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.prose { overflow-wrap: break-word; }
.prose h2 { margin-top: 64px; }
.prose h3 { margin-top: 32px; }
.prose p, .prose li { max-width: 78ch; }
.prose a:not(.btn):not(.store-button) { color: var(--accent-dark); }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(14px); }
.reveal { transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* 页头采用独立宽版心，导航列表本身横排。 */
.site-head { position: relative; z-index: 40; height: var(--nav-h); background: var(--nav-bg); color: var(--text); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.head-wrap { position: relative; width: 100%; max-width: min(100%, calc(1280px + var(--gutter) * 2)); padding-inline: var(--gutter); margin-inline: auto; height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.4; }
.brand-mark { display: block; width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--r-xs); }
.brand-placeholder { background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-near); }
.desktop-nav { min-width: 0; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list li { min-width: 0; }
.nav-link { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); color: var(--text-muted); font-size: 14.5px; text-decoration: none; white-space: nowrap; transition: background-color var(--ease), color var(--ease); }
.nav-link svg { width: 16px; height: 16px; }
.nav-link:hover { background: var(--bg-panel-2); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--chip); color: var(--text); }
.head-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.head-divider { width: 1px; height: 20px; background: var(--border); }
.language { position: relative; }
.lang { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding-inline: 14px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text); font: 400 14px/1.2 var(--font-body); white-space: nowrap; }
.lang svg { width: 15px; height: 15px; color: var(--text-muted); }
.lang-short { display: none; }
.language-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 190px; padding: 6px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-mid); z-index: 6; }
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; text-decoration: none; border-radius: var(--r-xs); }
.language-menu a:hover, .language-menu a[aria-current] { background: var(--bg-panel-2); color: var(--text); }
.menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text); }
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-nav { display: none; }
.nav-veil { position: fixed; inset: var(--nav-h) 0 0; z-index: 1; background: var(--veil); color: var(--text); border: 0; width: 100%; }

/* 页脚的热门词保留自然换行，不把长词裁成省略号。 */
.site-foot { background: var(--bg-panel-2); color: var(--text); border-top: 1px solid var(--border); padding-top: 56px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.15fr 0.65fr 1.2fr 0.65fr; gap: 36px; }
.footer-intro p { max-width: 34ch; margin-top: 18px; font-size: 14px; color: var(--text-muted); }
.footer-heading { margin: 0 0 14px; font-size: 14px; font-weight: 500; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding-block: 5px; font-size: 13px; color: var(--text-muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--accent-dark); text-decoration: underline; }
.footer-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--text-muted); font-size: 12px; }
.footer-bottom p { margin: 0; }

@media (max-width: 1279px) {
  .desktop-nav { display: none; }
  .head-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav:not([hidden]) { display: block; }
  .mobile-nav { position: absolute; z-index: 3; top: var(--nav-h); left: 0; right: 0; padding: 16px var(--gutter) 24px; max-height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain; background: var(--bg-panel); color: var(--text); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-mid); }
  .mobile-nav ul { list-style: none; padding: 0; margin: 0; }
  .mobile-nav a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 16px; text-decoration: none; border-radius: var(--r-sm); }
  .mobile-nav a svg { width: 18px; height: 18px; }
  .mobile-nav a:hover, .mobile-nav a[aria-current] { background: var(--bg-panel-2); color: var(--text); }
  .mobile-languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; --space-section: 64px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px, 5vw, 30px); }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --space-section: 48px; }
  .head-wrap { gap: 8px; }
  .head-tools { margin-left: auto; gap: 6px; }
  .head-divider { display: none; }
  .brand { gap: 7px; font-size: 13px; }
  .brand-mark { width: 26px; height: 26px; }
  .lang { padding-inline: 10px; min-height: 40px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .card, .panel { padding: 20px; }
  .tilt, .board { transform: none !important; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .footer-bottom { display: block; }
  .footer-bottom p + p { margin-top: 8px; }
}
@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; }
}