:root {
  --bg: #FFFFFF;
  --bg-panel: #F7F7F8;
  --bg-panel-2: #EFEFF1;
  --border: #E6E6E8;
  --accent: #5E6B1F;
  --accent-dark: #434D14;
  --text: #161616;
  --text-muted: #6B6B70;
  --success: #2F8F4E;
  --warn: #B7791F;
  --error: #C2412D;
  --dawn: #F0A868;
  --halo: #F2F2F3;
  --sky: #0A0B0D;
  --sky-2: #18191D;
  --on-accent: #FFFFFF;
  --star: #FFFFFF;
  --clear: transparent;
  --veil: rgba(22, 22, 22, 0.24);

  --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 Sans", "Apple SD Gothic Neo", "Malgun Gothic", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-xs: 12px;
  --fs-small: 13px;
  --fs-meta: 14px;
  --fs-control: 15px;
  --fs-body: 16px;
  --fs-brand: 17px;
  --fs-subtitle: 20px;
  --fs-h3: 24px;
  --fs-h2: 30px;
  --fs-h1: clamp(34px, 3.4vw, 48px);
  --fs-h1-mobile: 28px;
  --fs-render: 168px;
  --fs-render-mobile: 96px;
  --fs-code: 0.88em;
  --fs-tile-mono: 12.5px;
  --weight-regular: 400;
  --weight-medium: 500;

  --r-panel: 32px;
  --r-card: 28px;
  --r-tile: 24px;
  --r-note: 20px;
  --r-menu: 20px;
  --r-item: 12px;
  --r-code: 6px;
  --r-pill: 999px;
  --r-circle: 50%;

  --shadow-hair: 0 1px 2px rgba(22, 22, 22, 0.04);
  --shadow-panel: 0 1px 2px rgba(22, 22, 22, 0.04), 0 12px 28px -14px rgba(22, 22, 22, 0.10), 0 48px 110px -36px rgba(22, 22, 22, 0.16);
  --shadow-tile-on: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 20px -10px rgba(67, 77, 20, 0.55);
  --shadow-menu: 0 2px 4px rgba(22, 22, 22, 0.04), 0 20px 44px -18px rgba(22, 22, 22, 0.20);
  --shadow-fab: 0 1px 2px rgba(22, 22, 22, 0.06), 0 14px 32px -14px rgba(22, 22, 22, 0.28);
  --nav-h: 72px;
  --peek: 80px;
  --gutter: 56px;
  --wrap: 1328px;
  --reading: 800px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --speed: 0.2s;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, input, select, textarea { max-width: 100%; }
button { border: 0; }
img, video { display: block; max-width: 100%; height: auto; }
svg { vertical-align: middle; flex-shrink: 0; }
p, h1, h2, h3, h4, figure, blockquote { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); line-height: 1.16; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.25; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-h3); line-height: 1.35; }
strong { font-weight: var(--weight-medium); }
code {
  font-family: var(--font-mono);
  font-size: var(--fs-code);
  overflow-wrap: anywhere;
}
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-note);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.75;
  tab-size: 2;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-item);
}
[hidden] { display: none !important; }
::selection { background: var(--bg-panel-2); color: var(--text); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.nowrap { white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.section { padding-top: 96px; padding-bottom: 96px; }
.section-head { margin-bottom: 36px; }
.section-head p { margin-top: 16px; max-width: 45em; color: var(--text-muted); }
.stack > * + * { margin-top: 24px; }
.grid-two, .grid-three {
  display: grid;
  gap: 24px;
}
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-two > *, .grid-three > *, .hero-grid > *, .feat-grid > *, .footer-grid > * { min-width: 0; }
.card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-hair);
}
.card p { margin-top: 14px; color: var(--text-muted); }
.panel {
  min-width: 0;
  padding: 40px;
  border-radius: var(--r-panel);
  background: var(--bg-panel);
  color: var(--text);
}
.text-link, .prose a:not(.btn) {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.text-link:hover, .prose a:not(.btn):hover { text-decoration-thickness: 2px; }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose > * + *, .article-body > * + * { margin-top: 24px; }
.prose h2 { margin-top: 64px; scroll-margin-top: 24px; }
.prose h3 { margin-top: 36px; }
.prose p, .prose li { line-height: 1.85; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: 10px; }
.prose :not(pre) > code {
  padding: 1px 5px;
  border-radius: var(--r-code);
  background: var(--bg-panel);
  color: var(--text);
}
.cta-row, .chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.cta-row { margin-top: 32px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 24px;
  border: 1px solid var(--clear);
  border-radius: var(--r-pill);
  font-size: var(--fs-control);
  font-weight: var(--weight-medium);
  letter-spacing: 0.005em;
  line-height: 1.5;
  text-align: center;
  transition: background-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.btn:active, .btn.is-pressed { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-tile-on);
}
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-secondary { background: var(--bg-panel-2); color: var(--text); }
.btn-secondary:hover, .btn-secondary.is-hover { background: var(--border); color: var(--text); }
.btn-outline { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg-panel); color: var(--text); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel-2);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.badge, .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.badge { min-height: 32px; box-shadow: var(--shadow-hair); }
.badge-dot {
  position: relative;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: var(--r-circle);
  background: var(--accent);
  color: var(--on-accent);
}
.badge-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-circle);
  background: var(--accent);
  animation: breathe 2.6s var(--ease) infinite;
}
@keyframes breathe {
  0% { transform: scale(1); opacity: 0.5; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

/* 顶部独立宽版心，不复用正文的 max-width。 */
.topbar { position: relative; z-index: 60; height: var(--nav-h); background: var(--bg); color: var(--text); }
.header-shell {
  width: 100%;
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-right: auto;
  font-family: var(--font-display);
  font-size: var(--fs-brand);
  letter-spacing: -0.01em;
}
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.mainnav { min-width: 0; }
.mainnav .nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.nav-link, .nav-more-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--clear);
  color: var(--text);
  font-size: var(--fs-control);
  white-space: nowrap;
  transition: background-color var(--speed) var(--ease);
}
.nav-link:hover, .nav-more-btn:hover { background: var(--bg-panel); color: var(--text); }
.nav-link[aria-current="page"]::after, .nav-more-btn.is-current::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--accent);
}
.chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-more, .language-picker { position: relative; }
.nav-menu, .language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 4;
  width: 264px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-menu);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-menu);
}
.nav-menu-label { padding: 8px 12px 6px; font-size: var(--fs-xs); color: var(--text-muted); }
.nav-menu a, .language-menu a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r-item);
  font-size: var(--fs-control);
  line-height: 1.5;
}
.nav-menu a:hover, .language-menu a:hover { background: var(--bg-panel); color: var(--text); }
.nav-menu a[aria-current="page"], .language-menu a[aria-current="true"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.nav-menu small { display: block; margin-top: 2px; font-size: var(--fs-small); color: var(--text-muted); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text);
  font-size: var(--fs-meta);
  white-space: nowrap;
}
.lang:hover { background: var(--bg-panel-2); color: var(--text); }
.lang-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lang-short { display: none; }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-drawer { display: none; }
.nav-veil { position: fixed; inset: var(--nav-h) 0 0; z-index: 1; background: var(--veil); color: var(--text); }
.mobile-drawer, .header-tools, .mainnav, .header-shell > .brand { position: relative; z-index: 2; }
.preview-dropdown { position: relative; }
.preview-dropdown > summary { list-style: none; cursor: pointer; }
.preview-dropdown > summary::-webkit-details-marker { display: none; }

/* 页脚 */
.site-footer {
  padding-top: 72px;
  padding-bottom: 96px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 56px; }
.footer-brand p { margin-top: 20px; max-width: 26em; color: var(--text-muted); font-size: var(--fs-meta); }
.footer-title { font-size: var(--fs-meta); font-weight: var(--weight-medium); margin-bottom: 18px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { display: inline-block; padding-block: 5px; font-size: var(--fs-meta); color: var(--text-muted); }
.footer-links a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.footer-languages { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 48px; }
.footer-languages a { min-height: 44px; display: inline-flex; align-items: center; font-size: var(--fs-small); color: var(--text-muted); }
.footer-languages [aria-current="true"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-small); }

/* 默认可见，只有观察器成功启动后才淡入。 */
.reveal { opacity: 1; }
.reveal-pending { opacity: 0; transform: translateY(16px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }
.decor-zone, .hero, .features { overflow-x: clip; }

@media (max-width: 1279px) {
  .header-shell { gap: 16px; }
  .mainnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]) {
    display: block;
    position: absolute;
    inset: var(--nav-h) 0 auto;
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px var(--gutter) 28px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-menu);
  }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px; border-radius: var(--r-item); font-size: var(--fs-control); }
  .mobile-drawer a:hover { background: var(--bg-panel); color: var(--text); }
  .mobile-drawer a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
  .drawer-languages { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
}
@media (max-width: 1080px) {
  :root { --gutter: 32px; }
  .grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { gap: 32px; }
}
@media (max-width: 768px) {
  :root { --gutter: 20px; --nav-h: 64px; --fs-h1: 28px; }
  .header-shell { gap: 8px; }
  .header-tools { margin-left: auto; }
  .brand { gap: 8px; font-size: var(--fs-control); }
  .brand-mark { width: 30px; height: 30px; }
  .lang { padding-inline: 12px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .panel { padding: 24px; }
  .grid-two, .grid-three, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 24px; }
  .footer-grid { gap: 40px; }
  .chip-row { justify-content: center; }
}
@media (max-width: 640px) {
  .tilt, [data-tilt] { transform: none !important; }
  .header-tools { gap: 4px; }
  .lang { gap: 6px; }
  .lang-ico { display: none; }
  pre { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
}