:root {
  --bg: #F9F9F7;
  --panel: #FFFFFF;
  --panel-2: #F2F1ED;
  --border: #E3E2DD;
  --border-strong: #D2D1CB;
  --accent: #0E2FD6;
  --accent-dark: #0A21A0;
  --text: #15151A;
  --text-2: #3E3E45;
  --muted: #6E6E73;
  --faint: #A3A3A6;
  --code-gutter: #C6C5C0;
  --code-str: #7A7A80;
  --code-punc: #9C9CA0;
  --ink-hover: #2C2C34;
  --on-ink: #FFFFFF;
  --success: #2F8F5B;
  --warn: #B7791F;
  --error: #C2362B;
  --veil: rgba(21, 21, 26, .28);
  --clear: transparent;

  --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;
  --font-serif: Georgia, 'Songti SC', 'STSong', 'Noto Serif SC', 'Source Han Serif SC', serif;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lead: 18px;
  --text-h3: 22px;
  --text-h2: clamp(24px, 2.4vw, 32px);
  --text-h1: clamp(34px, 3.4vw, 48px);

  --r-focus: 2px;
  --r-ctrl: 4px;
  --r-card: 6px;
  --r-pop: 8px;
  --r-pill: 999px;
  --r-circle: 50%;
  --shadow-slice: 0 1px 1px rgba(21,21,26,.03), 0 6px 14px -8px rgba(21,21,26,.08), 0 24px 44px -22px rgba(21,21,26,.14);
  --shadow-pop: 0 1px 2px rgba(21,21,26,.06), 0 10px 24px -10px rgba(21,21,26,.18);
  --shadow-fab: 0 1px 2px rgba(21,21,26,.10), 0 12px 28px -12px rgba(21,21,26,.35);

  --gutter: 28px;
  --edge: 28px;
  --wrap-width: 1120px;
  --reading-width: 760px;
  --header-width: 1280px;
  --nav-h: 72px;
  --peek-h: 56px;
  --mark: 6px;
  --section-space: 120px;
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --duration: .2s;
  --reveal-duration: .55s;
  --layer-header: 50;
  --layer-fab: 40;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main, section, article, aside, nav, header, footer, div { min-width: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
svg, .icon { flex-shrink: 0; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: var(--clear); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: var(--r-focus); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--text-h1); letter-spacing: -.02em; line-height: 1.14; }
h2 { font-size: var(--text-h2); letter-spacing: -.02em; }
h3 { font-size: var(--text-h3); }
p, ul, ol, dl { margin-top: 0; }
p { margin-bottom: 1.4em; }
li + li { margin-top: .25em; }
code {
  font-family: var(--font-mono);
  font-size: .875em;
  overflow-wrap: anywhere;
  word-break: normal;
}
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-pop);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.8;
  tab-size: 2;
  overscroll-behavior-inline: contain;
}
pre code { font-size: inherit; white-space: pre; overflow-wrap: normal; word-break: normal; }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 48px; }
[id] { scroll-margin-top: 28px; }
.wrap {
  width: 100%;
  max-width: calc(var(--wrap-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-width) + var(--gutter) * 2); }
.section {
  position: relative;
  overflow-x: clip;
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
  border-top: 1px solid var(--border);
}
.section--white { background: var(--panel); color: var(--text); }
.section--gray { background: var(--panel-2); color: var(--text); }
.section--base { background: var(--bg); color: var(--text); }
.section-head { margin-bottom: 48px; }
.split-h2 { margin: 0; font-size: var(--text-h2); letter-spacing: -.025em; }
.split-h2__soft { color: var(--faint); }
.keep { white-space: nowrap; }
.muted, .eyebrow { color: var(--muted); }
.eyebrow { font-family: var(--font-mono); font-size: var(--text-xs); }
.lead { font-family: var(--font-serif); font-size: var(--text-lead); line-height: 1.72; color: var(--text-2); }
.prose { overflow-wrap: break-word; }
.prose h2 { margin-top: 2.5em; margin-bottom: .8em; }
.prose h3 { margin-top: 2em; margin-bottom: .7em; }
.prose li { padding-left: .25em; }
.prose a, .prose-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--duration) ease;
}
.prose a:hover, .prose-link:hover { text-decoration-color: var(--accent-dark); }
.prose :not(pre) > code {
  padding: .1em .3em;
  border-radius: var(--r-focus);
  background: var(--panel-2);
  color: var(--text);
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  max-width: 100%;
  padding: 10px 22px;
  border: 1px solid var(--text);
  border-radius: var(--r-ctrl);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: var(--weight-medium);
  line-height: 1.6;
  letter-spacing: -.005em;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--duration) ease, border-color var(--duration) ease;
}
.btn svg { width: 16px; height: 16px; }
.btn--solid { background: var(--text); color: var(--on-ink); }
.btn--solid:hover, .btn--solid.is-hover { background: var(--ink-hover); color: var(--on-ink); border-color: var(--ink-hover); }
.btn--line { background: var(--panel); color: var(--text); }
.btn--line:hover, .btn--line.is-hover { background: var(--panel-2); color: var(--text); }
.btn:active, .btn.is-pressed { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.is-focus { outline: 2px solid var(--text); outline-offset: 3px; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.card, .panel {
  min-width: 0;
  padding: 28px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.card h3 { margin-top: 0; }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.panel--raised { border-radius: var(--r-pop); box-shadow: var(--shadow-pop); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card-grid > * { min-width: 0; }
.icon { width: 18px; height: 18px; }
.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; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* 页头独立于正文版心。 */
.masthead { position: relative; z-index: var(--layer-header); background: var(--panel); color: var(--text); }
.masthead__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  min-height: var(--nav-h);
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand__mark { width: 30px; height: 30px; flex-shrink: 0; }
.topnav { margin-left: auto; min-width: 0; }
.topnav__list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 2px; }
.topnav__list li { margin: 0; }
.topnav__link {
  display: block;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--duration) ease, background-color var(--duration) ease;
}
.topnav__link:hover { color: var(--text); }
.topnav__link[aria-current="page"] { background: var(--panel-2); color: var(--text); font-weight: var(--weight-medium); }
.masthead__tools { display: flex; flex-shrink: 0; align-items: center; gap: 18px; }
.masthead__rule { width: 1px; height: 20px; background: var(--border); color: var(--text); }
.language { position: relative; }
.langpick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}
.langpick:hover { border-color: var(--border-strong); }
.langpick svg { width: 14px; height: 14px; color: var(--muted); }
.langpick__short { display: none; }
.language__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 180px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-pop);
  box-shadow: var(--shadow-pop);
  z-index: 4;
}
.language__list li { margin: 0; }
.language__list a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; text-decoration: none; border-radius: var(--r-ctrl); }
.language__list a:hover, .language__list 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-ctrl);
  background: var(--panel);
  color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-drawer { display: none; }
.nav-veil { display: none; }

/* 页脚。 */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 80px;
  padding-bottom: 96px;
  background: var(--panel-2);
  color: var(--text);
}
.footer-grid { display: grid; grid-template-columns: 1.35fr .8fr 1.2fr .65fr; gap: 48px; }
.footer-brand p { margin-top: 20px; max-width: 300px; font-size: var(--text-sm); color: var(--muted); }
.footer-title { margin: 0 0 18px; font-size: var(--text-sm); font-weight: var(--weight-medium); }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: var(--text-sm); }
.footer-links li { margin: 0 0 8px; }
.footer-links a { display: inline-block; padding-block: 3px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: var(--text-xs); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-legal a { text-decoration: none; }
.reveal { opacity: 1; transform: none; }
.reveal.is-pending { opacity: 0; transform: translateY(20px); transition: opacity var(--reveal-duration) var(--ease-out), transform var(--reveal-duration) var(--ease-out); }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1279px) {
  .topnav { display: none; }
  .masthead__tools { margin-left: auto; gap: 12px; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]) {
    display: block;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    z-index: 3;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px var(--gutter) 28px;
    border-top: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
  }
  .mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
  .mobile-drawer li { margin: 0; }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-ctrl); text-decoration: none; color: var(--muted); }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--panel-2); color: var(--text); }
  .mobile-drawer__languages { margin-top: 16px !important; padding-top: 16px !important; border-top: 1px solid var(--border); }
  .nav-veil:not([hidden]) { display: block; position: fixed; inset: var(--nav-h) 0 0; z-index: 1; border: 0; background: var(--veil); color: var(--text); }
  .masthead__row { z-index: 2; background: var(--panel); color: var(--text); }
}
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
}
@media (max-width: 768px) {
  :root { --text-h1: clamp(24px, 5vw, 30px); --section-space: 80px; }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; --edge: 14px; --nav-h: 72px; }
  .masthead__row { gap: 10px; }
  .brand { font-size: var(--text-sm); gap: 8px; }
  .brand__mark { width: 28px; height: 28px; }
  .masthead__tools { margin-left: auto; gap: 8px; }
  .masthead__rule { display: none; }
  .langpick { min-height: 44px; padding-inline: 10px; }
  .langpick__full { display: none; }
  .langpick__short { display: inline; }
  .card-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 22px; }
  .section-head { margin-bottom: 32px; }
  .tilt, [data-tilt] { transform: none !important; }
  pre { padding: 18px; font-size: var(--text-xs); }
  .site-footer { padding-bottom: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
}