:root {
  --c-bg: #f7f9f9;
  --c-panel: #ffffff;
  --c-panel-2: #eef4f3;
  --c-border: #e1e8e7;
  --c-accent: #178244;
  --c-accent-dark: #0f5f30;
  --c-text: #1d2321;
  --c-muted: #5d6865;
  --c-success: #2b9a5b;
  --c-warn: #b7791f;
  --c-error: #c63b32;
  --c-on-accent: #ffffff;
  --c-mist-blue: #e2f2f5;
  --c-mist-mint: #e4f5ea;
  --c-haze: rgba(255, 255, 255, .55);
  --c-glass: rgba(255, 255, 255, .68);
  --c-glass-line: rgba(255, 255, 255, .92);
  --c-hairline: rgba(29, 35, 33, .07);
  --c-faint: #8b9693;
  --c-line-no: #b4bdbb;
  --c-dot: #d7dedd;
  --c-tint: #e3f1e8;
  --c-tint-line: #cde5d6;
  --c-scan-a: rgba(23, 130, 68, .13);
  --c-scan-b: rgba(23, 130, 68, .035);
  --c-ring: rgba(43, 154, 91, .16);
  --c-clear: transparent;
  --c-veil: rgba(29, 35, 33, .24);

  --sh-soft: 0 24px 60px rgba(31, 52, 49, .08), 0 2px 8px rgba(31, 52, 49, .035);
  --sh-lift: 0 34px 76px rgba(31, 52, 49, .15), 0 8px 22px rgba(31, 52, 49, .07);
  --sh-btn: 0 12px 26px rgba(23, 130, 68, .22), inset 0 1px 0 rgba(255, 255, 255, .16);
  --sh-chip: 0 6px 18px rgba(31, 52, 49, .05);

  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 20px;
  --r-sm: 12px;
  --r-xs: 7px;
  --r-shot: 10px;
  --r-mark: 9px;
  --r-pill: 999px;
  --r-circle: 50%;

  --f-display: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --weight-normal: 400;
  --weight-medium: 600;
  --weight-bold: 700;
  --ls-tight: -.025em;
  --ls-cjk: -.02em;
  --text-xs: 12px;
  --text-sm: 13.5px;
  --text-nav: 15px;
  --text-base: 16px;
  --text-lede: 17px;
  --text-h1: clamp(34px, 3.4vw, 48px);
  --text-h2: clamp(24px, 2.4vw, 34px);
  --text-h3: 22px;
  --header-h: 76px;
  --gutter: 48px;
  --content-max: 1320px;
  --reading-max: 800px;
  --section-space: 140px;
  --row-h: 32px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --speed: .2s;
  --reveal-speed: .65s;
  --focus-width: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font: var(--weight-normal) var(--text-base)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.nav-open { overflow: hidden; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
img { vertical-align: middle; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--c-accent-dark); }
a, button { -webkit-tap-highlight-color: var(--c-ring); }
:focus-visible { outline: var(--focus-width) solid var(--c-accent); outline-offset: 4px; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: var(--weight-bold);
  letter-spacing: var(--ls-cjk);
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
h1 { font-size: var(--text-h1); line-height: 1.16; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
p { margin-block: 0 1.25em; }
code, pre { font-family: var(--f-mono); }
code { font-size: .9em; overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-panel-2);
  color: var(--c-text);
  line-height: 1.8;
  tab-size: 2;
}
pre code { font-size: .85em; white-space: pre; overflow-wrap: normal; word-break: normal; }
figure { margin: 0; }
hr { margin-block: var(--section-space); border: 0; border-top: 1px solid var(--c-border); }
.wrap {
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-max) + var(--gutter) * 2); }
.wrap > *, .grid > *, .split > *, .hero .wrap > * { min-width: 0; }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); border-bottom: 1px solid var(--c-border); }
.section-mint { background: var(--c-panel-2); color: var(--c-text); }
.section-heading { max-width: 720px; margin-bottom: 40px; }
.section-heading p, .muted { color: var(--c-muted); }
.center { text-align: center; }
.keep { white-space: nowrap; }
.accent { color: var(--c-accent); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.stack { display: grid; gap: 24px; }
.card, .panel {
  min-width: 0;
  background: var(--c-panel);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-soft);
}
.card { padding: 32px; }
.panel { padding: 72px 64px 80px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose h2 { margin-top: 2.5em; }
.prose h3 { margin-top: 2em; }
.prose p, .prose li { line-height: 1.9; }
.prose img { max-width: 100%; height: auto; }
.prose > :first-child { margin-top: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border: 1px solid var(--c-clear);
  border-radius: var(--r-sm);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  letter-spacing: -.01em;
  line-height: 1.5;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--speed), border-color var(--speed), transform var(--speed);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--c-accent); color: var(--c-on-accent); box-shadow: var(--sh-btn); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--c-accent-dark); color: var(--c-on-accent); transform: translateY(-1px); }
.btn-primary:active, .btn-primary.is-pressed { background: var(--c-accent-dark); color: var(--c-on-accent); transform: translateY(1px); box-shadow: none; }
.btn-ghost { background: var(--c-panel); color: var(--c-text); border-color: var(--c-border); box-shadow: var(--sh-chip); }
.btn-ghost:hover { border-color: var(--c-accent); color: var(--c-text); transform: translateY(-1px); }
.btn.is-focus { outline: var(--focus-width) solid var(--c-accent); outline-offset: 3px; }
.btn-small { min-height: 44px; padding: 9px 16px; font-size: var(--text-sm); }

.site-header { position: relative; z-index: 50; height: var(--header-h); border-bottom: 1px solid var(--c-hairline); }
.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
  width: 100%;
  max-width: min(100%, calc(1320px + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--c-text);
  text-decoration: none;
  font-family: var(--f-display);
  font-size: var(--text-lede);
  font-weight: var(--weight-bold);
  letter-spacing: var(--ls-tight);
}
.brand:hover { color: var(--c-text); }
.brand-mark { display: block; width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--r-circle); }
.brand-placeholder {
  background: linear-gradient(145deg, var(--c-panel), var(--c-panel-2));
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: var(--r-mark);
  box-shadow: var(--sh-chip);
}
.desktop-nav { min-width: 0; height: 100%; margin-left: auto; }
.tabs {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  gap: 0;
}
.tabs li { display: flex; height: 100%; }
.tabs a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 15px;
  min-height: 44px;
  color: var(--c-muted);
  font-size: var(--text-nav);
  text-decoration: none;
  white-space: nowrap;
}
.tabs a::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: -1px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-on-accent);
  transform: scaleX(0);
  opacity: 0;
  transition: transform .25s, opacity .25s;
}
.tabs a:hover { color: var(--c-text); }
.tabs a:hover::after { transform: scaleX(.4); opacity: .45; }
.tabs a[aria-current="page"] { color: var(--c-text); font-weight: var(--weight-medium); }
.tabs a[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }
.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: 7px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-glass);
  color: var(--c-text);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.lang svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--c-muted); }
.lang:hover { border-color: var(--c-accent); }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  z-index: 5;
  right: 0;
  top: calc(100% + 12px);
  width: 200px;
  padding: 8px;
  background: var(--c-panel);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-lift);
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; text-decoration: none; color: var(--c-text); border-radius: var(--r-xs); }
.language-menu a:hover, .language-menu a[aria-current] { background: var(--c-panel-2); color: var(--c-accent-dark); }
.menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px; border: 1px solid var(--c-border); border-radius: var(--r-sm); background: var(--c-panel); color: var(--c-text); }
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-drawer { position: absolute; z-index: 3; top: 100%; left: 0; right: 0; background: var(--c-panel); color: var(--c-text); padding: 16px var(--gutter) 28px; border-bottom: 1px solid var(--c-border); box-shadow: var(--sh-soft); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px; color: var(--c-text); text-decoration: none; border-radius: var(--r-xs); }
.mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--c-panel-2); color: var(--c-accent-dark); }
.drawer-languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.nav-veil { position: fixed; z-index: 40; inset: var(--header-h) 0 0; border: 0; background: var(--c-veil); color: var(--c-text); }

.site-footer { padding-top: 72px; padding-bottom: 32px; background: var(--c-panel-2); color: var(--c-text); border-top: 1px solid var(--c-border); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 40px; }
.footer-grid > * { min-width: 0; }
.footer-brand p { max-width: 30em; margin-top: 20px; font-size: var(--text-sm); color: var(--c-muted); }
.footer-grid h2 { margin: 0 0 16px; font-size: var(--text-base); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li + li { margin-top: 10px; }
.footer-grid a:not(.brand) { color: var(--c-muted); text-decoration: none; font-size: var(--text-sm); }
.footer-grid a:hover { color: var(--c-accent-dark); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--c-border); color: var(--c-muted); font-size: var(--text-xs); }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-legal a { color: var(--c-muted); }

.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
html.reveal-ready .reveal { transition: opacity var(--reveal-speed) var(--ease), transform var(--reveal-speed) var(--ease); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.top, .hero, [data-hero-visual], .decorated { overflow-x: clip; }

@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 768px) {
  :root { --gutter: 24px; --text-h1: clamp(24px, 7vw, 30px); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --header-h: 68px; --row-h: 28px; --section-space: 140px; }
  .header-shell { gap: 8px; }
  .brand { gap: 8px; font-size: var(--text-sm); }
  .brand-mark { width: 30px; height: 30px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .lang { min-height: 44px; padding-inline: 11px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang svg { display: none; }
  .grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 48px 22px 56px; }
  .card { padding: 24px; }
  .btn { min-height: 48px; padding: 11px 20px; font-size: var(--text-nav); }
  .tilt, [data-tilt] { transform: none !important; }
  pre { padding: 18px; }
  .site-footer { padding-bottom: 88px; }
}
@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; }
}