:root {
  --bg: #ffffff;
  --bg-panel: #f1f4f7;
  --bg-panel-2: #f8fafb;
  --border: #dfe4e9;
  --accent: #1b97dc;
  --accent-dark: #0d6fa8;
  --text: #2c353d;
  --text-muted: #66717b;
  --success: #2f9e62;
  --warn: #c98a12;
  --error: #d6453d;
  --grid: #eef2f5;
  --device-edge: #d3dae1;
  --line-no: #b7c0c8;
  --sky-wash: #e2f1fb;
  --sky-mist: #edf6fc;
  --on-accent: #ffffff;
  --mask: #000000;
  --clear: transparent;
  --shadow-1: rgba(44, 53, 61, .06);
  --shadow-2: rgba(44, 53, 61, .10);
  --shadow-3: rgba(44, 53, 61, .14);
  --shadow-cool: rgba(13, 111, 168, .12);
  --shadow-accent: rgba(27, 151, 220, .38);
  --shadow-contact: rgba(44, 53, 61, .20);
  --veil: rgba(44, 53, 61, .20);
  --font-display: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-card: 6px;
  --r-btn: 8px;
  --r-device: 18px;
  --r-device-phone: 26px;
  --r-screen: 8px;
  --r-shot: 10px;
  --r-pill: 999px;
  --r-squircle: 23%;
  --nav-h: 60px;
  --gutter: 24px;
  --content-w: 1120px;
  --reading-w: 760px;
  --section-space: 160px;
  --track-display: -.025em;
  --track-cjk: -.02em;
  --track-small: -.01em;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-display: 800;
  --shadow-card: 0 1px 2px var(--shadow-1), 0 18px 42px -24px var(--shadow-2);
  --shadow-float: 0 1px 2px var(--shadow-1), 0 14px 30px -12px var(--shadow-3);
  --reveal-duration: 480ms;
}

*, *::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: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
svg { display: block; flex-shrink: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--clear); }
a { color: var(--accent-dark); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-btn);
}
::selection { background: var(--sky-wash); color: var(--text); }
h1, h2, h3, h4 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: 1.2;
  letter-spacing: var(--track-display);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(34px, 3.4vw + .5rem, 48px); line-height: 1.12; }
h2 { font-size: clamp(26px, 2.4vw, 36px); }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
:lang(zh-CN) h2, :lang(zh-CN) h3, :lang(zh-TW) h2, :lang(zh-TW) h3 {
  letter-spacing: var(--track-cjk);
}
p { margin: 0 0 20px; }
ul, ol { padding-inline-start: 1.5em; }
li + li { margin-top: 6px; }
strong { font-weight: var(--weight-bold); }
small, .small { font-size: 13px; }
.muted { color: var(--text-muted); }
.nowrap { white-space: nowrap; }
.mono, code, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; font-size: .9em; }
:not(pre) > code {
  background: var(--bg-panel);
  color: var(--text);
  padding: .12em .3em;
  border-radius: var(--r-card);
}
pre {
  max-width: 100%;
  min-width: 0;
  margin: 24px 0;
  padding: 20px;
  overflow-x: auto;
  background: var(--bg-panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  line-height: 1.8;
  tab-size: 2;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-w) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--reading { max-width: calc(var(--reading-w) + var(--gutter) * 2); }
.section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}
.section--panel { background: var(--bg-panel); color: var(--text); }
.section--white { background: var(--bg); color: var(--text); }
.section__intro { max-width: var(--reading-w); margin-bottom: 48px; }
.grid { 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 > *, .wrap > *, .prose > * { min-width: 0; }
.stack > * + * { margin-top: 24px; }
.flow-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  transform: translateY(-160%);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: var(--r-btn);
}
.skip-link:focus { transform: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--text);
  font: var(--weight-semibold) 15px/1.3 var(--font-body);
  text-decoration: none;
  text-align: center;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  box-shadow: 0 1px 2px var(--shadow-1), 0 10px 22px -10px var(--shadow-accent);
}
.btn--primary:hover, .btn--primary.is-hover {
  background: var(--accent-dark);
  color: var(--on-accent);
  border-color: var(--accent-dark);
}
.btn--ghost { box-shadow: 0 1px 2px var(--shadow-1); }
.btn--ghost:hover, .btn--ghost.is-hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.btn:active, .btn.is-active { box-shadow: inset 0 2px 4px var(--shadow-2); }
.btn:disabled {
  cursor: not-allowed;
  background: var(--bg-panel);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: none;
}
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.card, .panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  min-width: 0;
  box-shadow: var(--shadow-card);
}
.panel--quiet { background: var(--bg-panel-2); color: var(--text); box-shadow: none; }
.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 p, .prose li { line-height: 1.9; }
.prose section { scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose img { height: auto; }
.decorated { position: relative; overflow-x: clip; }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(12px); }
html.reveal-ready .reveal {
  transition: opacity var(--reveal-duration) ease, transform var(--reveal-duration) ease;
}

#site-header, .topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  position: relative;
  width: 100%;
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  min-height: var(--nav-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text); text-decoration: none; }
.brand__mark {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--r-squircle);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px var(--shadow-1);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: 15px;
  letter-spacing: var(--track-small);
}
.mainnav { min-width: 0; margin-left: auto; }
.mainnav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.mainnav li { margin: 0; }
.mainnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--nav-h);
  padding: 0 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
  text-decoration: none;
}
.nav-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mainnav a:hover { color: var(--text); }
.mainnav a[aria-current="page"] { color: var(--accent-dark); font-weight: var(--weight-semibold); }
.mainnav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 10px -1px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--accent);
}
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language-picker { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--text-muted);
  font: var(--weight-medium) 13px/1 var(--font-body);
  white-space: nowrap;
}
.lang svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang__caret { font-size: 11px; }
.lang__short { display: none; }
.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 4;
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  box-shadow: var(--shadow-float);
}
.language-menu li { margin: 0; }
.language-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--r-card);
  text-decoration: none;
  color: var(--text);
}
.language-menu a:hover, .language-menu a[aria-current="true"] {
  background: var(--bg-panel);
  color: var(--accent-dark);
}
.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-btn);
  background: var(--bg);
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 3;
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px var(--gutter) 24px;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-float);
}
.mobile-nav ul { list-style: none; padding: 0; margin: 0; }
.mobile-nav li { margin: 0; }
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--r-card);
  color: var(--text);
  text-decoration: none;
}
.mobile-nav a:hover, .mobile-nav a[aria-current] { background: var(--bg-panel); color: var(--accent-dark); }
.mobile-nav__label { margin: 18px 16px 6px; color: var(--text-muted); font-size: 13px; }
.nav-veil {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 55;
  border: 0;
  padding: 0;
  background: var(--veil);
  color: var(--text);
  cursor: default;
}

.site-footer {
  padding-top: 80px;
  padding-bottom: 104px;
  background: var(--bg-panel);
  color: var(--text);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr 1fr;
  gap: 40px;
}
.footer-grid > * { min-width: 0; }
.footer-brand p { max-width: 310px; margin-top: 20px; color: var(--text-muted); font-size: 14px; }
.footer-title { font-size: 14px; margin-bottom: 18px; }
.footer-links { padding: 0; margin: 0; list-style: none; }
.footer-links li { margin: 0 0 8px; }
.footer-links a { display: inline-block; padding-block: 4px; font-size: 14px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent-dark); text-decoration: underline; }
.footer-links a[aria-current="true"] { color: var(--accent-dark); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 56px; color: var(--text-muted); font-size: 12px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--text-muted); }
@media (max-width: 1199px) {
  .topbar__inner { gap: 12px; }
  .mainnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav:not([hidden]) { display: block; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px, 4vw, 30px); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid--two, .grid--three { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 22px; }
  .tilt, [data-tilt] { transform: none !important; }
  .brand__name { font-size: 13px; }
  .lang__full { display: none; }
  .lang__short { display: inline; }
  .lang { min-height: 44px; padding-inline: 10px; }
  .topbar__inner { gap: 8px; }
  .header-tools { gap: 6px; margin-left: auto; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@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; }
}