:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #0A0A0B;
  --panel-2: #141416;
  --line: #26262A;
  --line-soft: #1A1A1D;
  --accent: #1A8CFF;
  --accent-deep: #0B5FD1;
  --text: #F5F5F7;
  --text-soft: #C7C7CC;
  --text-muted: #8E8E93;
  --text-faint: #4C4C52;
  --ok: #34C77B;
  --warn: #E8A33D;
  --err: #F0524A;
  --canvas-ink: #03101F;
  --canvas-ink-deep: #01060D;
  --glow-05: rgba(26,140,255,.05);
  --glow-10: rgba(26,140,255,.10);
  --glow-18: rgba(26,140,255,.18);
  --glow-28: rgba(26,140,255,.28);
  --glow-45: rgba(26,140,255,.45);
  --glow-60: rgba(26,140,255,.60);
  --hairline-hi: rgba(255,255,255,.04);
  --veil: rgba(0,0,0,.72);
  --clear: transparent;
  --shade-float: 0 12px 32px rgba(0,0,0,.6);
  --r-xl: 28px;
  --r-lg: 16px;
  --r-md: 10px;
  --r-sm: 7px;
  --r-xs: 3px;
  --r-micro: 2px;
  --r-control: 5px;
  --r-port: 6px;
  --r-mobile: 20px;
  --r-pill: 999px;
  --r-round: 50%;
  --font-display: "Inter","Noto Sans SC","PingFang SC","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;
  --shell: 1200px;
  --reading: 800px;
  --header-shell: 1280px;
  --gutter: 32px;
  --topbar-h: 68px;
  --space-section: 88px;
  --ease-out: cubic-bezier(.2,.7,.1,1);
  --duration: .2s;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); 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: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, input, select, textarea { max-width: 100%; }
button:disabled { cursor: not-allowed; }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
img, svg { max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(34px,3.34vw,48px); line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: clamp(25px,2.6vw,36px); line-height: 1.25; margin: 0 0 24px; }
h3 { font-size: 21px; line-height: 1.4; margin: 0 0 12px; }
p { margin: 0 0 18px; }
:where(section, article, aside, nav, main, div, li) { min-width: 0; }
code { font-family: var(--font-mono); overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel-2);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  -webkit-overflow-scrolling: touch;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.shell, .wrap {
  width: 100%;
  max-width: calc(var(--shell) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.sec { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p, .muted { color: var(--text-muted); }
.nowrap { white-space: nowrap; }
.eyebrow { color: var(--text-muted); font-size: 12px; letter-spacing: .06em; margin-bottom: 14px; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.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-size: 15px; font-weight: 500; line-height: 1.4; text-align: center; text-decoration: none;
  transition: background-color var(--duration), color var(--duration), border-color var(--duration);
}
.btn .ico { width: 17px; height: 17px; stroke-width: 2; }
.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover, .btn-solid.is-hover { background: var(--text-soft); color: var(--bg); }
.btn-quiet { background: var(--panel-2); color: var(--text); }
.btn-quiet:hover, .btn-quiet.is-hover { background: var(--line); color: var(--text); }
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-accent:hover, .btn-accent.is-hover { background: var(--accent); color: var(--bg); border-color: var(--text); }
.btn:active, .btn.is-active { border-color: var(--accent); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--panel-2); color: var(--text-muted); border-color: var(--line); }
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.card, .panel {
  padding: 28px; border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--panel); color: var(--text);
}
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.card p:last-child { margin-bottom: 0; }
.prose { line-height: 1.9; overflow-wrap: break-word; }
.prose h2 { margin-top: 64px; }
.prose h3 { margin-top: 32px; }
.prose p, .prose li { color: var(--text-soft); }
.prose :not(pre) > code { color: var(--text); }
.prose li + li { margin-top: 8px; }
.prose :where(section, div, figure) { max-width: 100%; }
.prose figure { margin-inline: 0; }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
html.reveal-ready .reveal { transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.decorated, [data-hero-visual] { overflow-x: clip; }

/* 头部版心独立于正文，工具区始终保留宽度。 */
.topbar { height: var(--topbar-h); position: relative; z-index: 50; background: var(--bg); color: var(--text); }
.topbar-row {
  width: 100%; max-width: min(100%,calc(var(--header-shell) + var(--gutter) * 2));
  padding-inline: var(--gutter); margin-inline: auto;
  height: 100%; display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: 15.5px; font-weight: 500; letter-spacing: -.005em; }
.mainnav { margin-left: auto; min-width: 0; }
.mainnav ul { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.mainnav a { display: block; padding-block: 12px; color: var(--text-muted); font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.mainnav a:hover, .mainnav a[aria-current="page"] { color: var(--text); }
.mainnav a[aria-current="page"] { font-weight: 500; }
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.language-picker { position: relative; }
.lang {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--bg); color: var(--text-soft); font-size: 13.5px; line-height: 1;
  min-height: 32px;
}
.lang-caret { color: var(--text-muted); font-size: 11px; }
.lang-short { display: none; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 170px;
  padding: 8px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel); color: var(--text);
}
.lang-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; color: var(--text-soft); text-decoration: none; border-radius: var(--r-sm); }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: var(--panel-2); color: var(--text); }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 9px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; }
.nav-veil { position: fixed; inset: var(--topbar-h) 0 0; z-index: 1; border: 0; background: var(--veil); color: var(--text); }
.mobile-drawer {
  position: absolute; inset: var(--topbar-h) 0 auto; z-index: 2;
  max-height: calc(100dvh - var(--topbar-h)); overflow-y: auto; overscroll-behavior: contain;
  padding: 16px var(--gutter) 24px; background: var(--panel); color: var(--text);
  border-bottom: 1px solid var(--line);
}
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 12px; color: var(--text-soft); text-decoration: none; }
.mobile-drawer a[aria-current] { color: var(--accent); }
.drawer-languages { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.preview-menu { display: none; }
.preview-menu summary { cursor: pointer; padding: 10px; }
.preview-menu nav { position: absolute; inset: var(--topbar-h) 0 auto; padding: 20px var(--gutter); background: var(--panel); color: var(--text); border-bottom: 1px solid var(--line); }
.preview-menu a { display: block; min-height: 44px; padding: 10px; color: var(--text-soft); text-decoration: none; }

/* 页脚只用同一黑底，以留白与细线划分。 */
.site-footer { border-top: 1px solid var(--line); padding-top: 56px; padding-bottom: 28px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.5fr 1fr; gap: 36px; }
.footer-brand p { max-width: 280px; margin-top: 18px; color: var(--text-muted); font-size: 13px; }
.footer-heading { font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 9px; }
.footer-links a { color: var(--text-muted); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; gap: 16px; color: var(--text-muted); font-size: 12px; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.footer-legal a { color: var(--text-muted); text-decoration: none; }

@media (max-width: 1279px) {
  .topbar-row { gap: 20px; }
  .mainnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .preview-menu { display: block; }
}
@media (min-width: 1280px) {
  .mobile-drawer, .nav-veil { display: none; }
}
@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px,4.5vw,30px); }
  :root { --space-section: 56px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .tilt, [data-tilt] { transform: none !important; }
  .card-grid { grid-template-columns: minmax(0,1fr); }
  .card, .panel { padding: 22px; }
  .brand-name { font-size: 14.5px; }
  .topbar-row { gap: 8px; }
  .header-tools { gap: 6px; margin-left: auto; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang { min-height: 44px; padding-inline: 11px; }
  .footer-grid { gap: 32px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-legal { margin-left: 0; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .brand-name { font-size: 13px; }
  .brand { gap: 7px; }
}
@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; }
}