:root {
  color-scheme: dark;
  --bg: #090A0C;
  --bg-panel: #101114;
  --bg-panel2: #17181C;
  --bg-sunk: #0C0D10;
  --border: #23252A;
  --border-win: #2A2C31;
  --border-strong: #2E3036;
  --accent: #E4E6EA;
  --accent-dark: #B4B8C0;
  --text: #EDEEF0;
  --text-muted: #8A8F98;
  --text-faint: #565A62;
  --success: #4FB3A9;
  --warn: #D6A73C;
  --error: #D9584F;
  --stage-end: #3A3D43;
  --glow: #6A6E76;
  --glow-soft: rgba(106,110,118,.62);
  --glow-spill: rgba(106,110,118,.09);
  --glow-none: rgba(106,110,118,0);
  --hairline-hi: rgba(237,238,240,.05);
  --veil: rgba(0,0,0,.65);
  --clear: transparent;
  --shadow-fab: 0 10px 28px rgba(0,0,0,.45);
  --font-display: "Inter","Noto Sans SC",-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --font-body: "Inter","Noto Sans SC",-apple-system,"Segoe UI","PingFang SC","Hiragino Sans","Microsoft YaHei",sans-serif;
  --font-mono: "JetBrains Mono",ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  --weight-normal: 400;
  --weight-medium: 500;
  --r-sm: 6px;
  --r-md: 8px;
  --r-round: 50%;
  --container: 1180px;
  --header-container: 1280px;
  --reading: 800px;
  --gutter: 24px;
  --header-height: 64px;
  --fz-body: 15px;
  --fz-h1: clamp(34px,3.2vw,46px);
  --fz-h2: clamp(24px,2.4vw,34px);
  --fz-h3: 20px;
  --fz-small: 13px;
  --fz-statement: clamp(22px,2.1vw,30px);
  --tracking-title: -.02em;
  --ease: cubic-bezier(.2,.7,.2,1);
  --duration-fast: .2s;
  --duration-slide: .32s;
  --duration-reveal: .6s;
  --tab-cycle: 8s;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--text);
  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(--fz-body);
  line-height: 1.6;
  font-weight: var(--weight-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--accent-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, input, select, textarea {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
}
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
svg { flex-shrink: 0; }
button svg, a svg { pointer-events: none; }
[hidden] { display: none !important; }
:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
::selection { background: var(--accent); color: var(--bg); }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { margin: 0 0 24px; font-size: var(--fz-h1); line-height: 1.15; }
h2 { margin: 0 0 24px; font-size: var(--fz-h2); line-height: 1.25; }
h3 { margin: 0 0 14px; font-size: var(--fz-h3); line-height: 1.35; }
p { margin: 0 0 20px; }
strong { font-weight: var(--weight-medium); }
ul, ol { margin-top: 0; padding-left: 1.5em; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; font-size: .9em; }
pre {
  margin: 20px 0;
  padding: 20px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: var(--fz-small);
  line-height: 1.75;
  tab-size: 2;
}
pre code { font-size: inherit; white-space: pre; overflow-wrap: normal; word-break: normal; }
hr { margin: 32px 0; border: 0; border-top: 1px solid var(--border); }
.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); }
.section { padding-top: 80px; padding-bottom: 80px; }
.section-line { border-top: 1px solid var(--border); }
.grid-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.grid-three { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.grid-two > *, .grid-three > *, .wrap > *, main, article, section { min-width: 0; }
.stack > * + * { margin-top: 24px; }
.muted { color: var(--text-muted); }
.mono, .eyebrow { font-family: var(--font-mono); }
.eyebrow { margin-bottom: 20px; font-size: 12px; color: var(--text-muted); letter-spacing: .04em; }
.keep { 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: absolute;
  top: 8px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--r-sm);
}
.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ico {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid var(--clear);
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease),border-color var(--duration-fast) var(--ease),color var(--duration-fast) var(--ease);
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--bg); }
.btn-ghost { background: var(--clear); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover, .btn-ghost.is-hover { background: var(--bg-panel2); color: var(--text); border-color: var(--border-win); }
.btn:active, .btn.is-active { background: var(--accent-dark); color: var(--bg); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-panel2); color: var(--text-muted); border-color: var(--border-strong); }
.btn.is-focus { outline: 1px solid var(--accent); outline-offset: 3px; }
.panel, .card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-panel);
  color: var(--text);
  min-width: 0;
}
.panel-raised { background: var(--bg-panel2); color: var(--text); }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose h2 { margin-top: 64px; }
.prose h3 { margin-top: 36px; }
.prose li + li { margin-top: 8px; }
.prose :where(div,section,article,figure) { min-width: 0; max-width: 100%; }
.prose figure { margin-inline: 0; }
.prose a { color: var(--accent); }
.prose :not(pre) > code { color: var(--accent); }
.reveal { opacity: 1; transform: none; }
.reveal.is-pending:not(.shown) { opacity: 0; transform: translateY(14px); }
.reveal.is-pending {
  transition: opacity var(--duration-reveal) var(--ease),transform var(--duration-reveal) var(--ease);
}
.reveal.shown { opacity: 1; transform: none; }

/* 独立的宽页头版心。 */
.topbar { position: relative; z-index: 50; border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.topbar-row {
  display: flex;
  align-items: center;
  height: var(--header-height);
  width: 100%;
  max-width: min(100%,calc(var(--header-container) + var(--gutter) * 2));
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: var(--weight-medium);
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--text);
}
.brand img { width: 24px; height: 24px; flex-shrink: 0; }
.tabs { margin-left: auto; align-self: stretch; min-width: 0; }
.tabs ul { display: flex; align-items: center; gap: 0; height: 100%; list-style: none; margin: 0; padding: 0; }
.tabs li { height: 100%; }
.tabs a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: 14px;
  white-space: nowrap;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--duration-fast) var(--ease);
}
.tabs a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--duration-slide) var(--ease);
}
.tabs a:hover, .tabs a[aria-current="page"] { color: var(--text); }
.tabs a:hover::after, .tabs a[aria-current="page"]::after { transform: scaleX(1); }
.tabs ul:hover a[aria-current="page"]:not(:hover)::after { transform: scaleX(0); transform-origin: right center; }
.header-tools { display: flex; align-items: center; flex-shrink: 0; gap: 8px; margin-left: 18px; }
.language { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 0 0 20px;
  min-height: 20px;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: var(--clear);
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}
.lang svg { width: 14px; height: 14px; }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 18px);
  min-width: 180px;
  padding: 6px;
  margin: 0;
  list-style: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--bg-panel2);
  color: var(--text);
  z-index: 8;
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; text-decoration: none; border-radius: var(--r-sm); }
.language-menu a:hover, .language-menu a[aria-current="true"] { background: var(--bg-sunk); color: var(--text); }
.menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px; background: var(--clear); color: var(--text); }
.menu-toggle svg { width: 20px; height: 20px; }
.nav-drawer {
  position: absolute;
  top: var(--header-height);
  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;
  background: var(--bg-panel);
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
}
.nav-drawer ul { list-style: none; margin: 0; padding: 0; }
.nav-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 12px; text-decoration: none; color: var(--text-muted); }
.nav-drawer a:hover, .nav-drawer a[aria-current] { background: var(--bg-panel2); color: var(--text); }
.drawer-languages { margin-top: 16px !important; border-top: 1px solid var(--border); padding-top: 12px !important; }
.nav-veil { position: fixed; inset: var(--header-height) 0 0; z-index: 1; background: var(--veil); color: var(--text); border: 0; border-radius: 0; width: 100%; }
.site-footer { border-top: 1px solid var(--border); padding-top: 64px; padding-bottom: 96px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1fr; gap: 40px; }
.footer-grid > * { min-width: 0; }
.footer-about p { max-width: 300px; margin-top: 18px; color: var(--text-muted); font-size: 13px; }
.footer-title { margin: 0 0 18px; font-size: 13px; color: var(--text); letter-spacing: 0; }
.footer-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.footer-list a { color: var(--text-muted); text-decoration: none; font-size: 13px; overflow-wrap: break-word; }
.footer-list a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.footer-bottom a { margin-left: auto; }

/* 装饰只能作用于短小图形，不旋转正文容器。 */
.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; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 1101px) {
  .nav-drawer, .nav-veil { display: none; }
}
@media (max-width: 768px) {
  :root { --fz-h1: clamp(24px,4.2vw,30px); --fz-h2: 25px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .grid-two, .grid-three { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .wrap { width: 100%; padding-inline: var(--gutter); }
  .brand { font-size: 13px; gap: 8px; }
  .brand img { width: 22px; height: 22px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang { padding-left: 12px; min-height: 44px; }
  .header-tools { margin-left: auto; gap: 4px; }
  .footer-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .footer-bottom a { margin-left: 0; }
  .panel, .card { padding: 20px; }
  pre { padding: 16px; }
  .tilt, [data-tilt] { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.is-pending:not(.shown) { opacity: 1; transform: none; }
}