:root {
  --bg: #f7fbfe;
  --panel: #ffffff;
  --panel-2: #eef4f9;
  --border: #dfe7ee;
  --accent: #6b46c1;
  --accent-dark: #4f2f9a;
  --text: #1b1b22;
  --muted: #5d6570;
  --faint: #9aa3ad;
  --success: #2f9e6a;
  --warn: #e0832b;
  --error: #d14343;
  --hl: #ebe5f8;
  --hl-edge: #ddd3f2;
  --ink: #1b1b22;
  --ink-hover: #2b2b35;
  --on-ink: #ffffff;
  --wave: #ffffff;
  --clear: transparent;
  --bezel: #111115;
  --bezel-edge: #2c2d34;
  --ti-edge: #4a4c54;
  --alu-1: #f2f4f7;
  --alu-2: #dce0e6;
  --alu-3: #bdc3cb;
  --alu-4: #959ca6;
  --ground: rgba(20, 28, 40, 0.3);
  --ground-deep: rgba(10, 12, 20, 0.46);
  --warn-ring: rgba(224, 131, 43, 0.16);
  --focus-ring: rgba(107, 70, 193, 0.35);
  --veil: rgba(27, 27, 34, 0.24);
  --shadow-chip: 0 1px 2px rgba(27, 40, 60, 0.05);
  --shadow-mark: 0 1px 2px rgba(27, 40, 60, 0.06), 0 6px 14px -8px rgba(27, 40, 60, 0.22);
  --shadow-btn: 0 1px 2px rgba(27, 27, 34, 0.18), 0 12px 24px -10px rgba(27, 27, 34, 0.5);
  --shadow-btn-hover: 0 2px 4px rgba(27, 27, 34, 0.2), 0 16px 30px -12px rgba(27, 27, 34, 0.55);
  --shadow-btn-soft: 0 1px 2px rgba(27, 40, 60, 0.06), 0 10px 22px -12px rgba(27, 40, 60, 0.22);
  --shadow-panel: 0 2px 5px rgba(27, 40, 60, 0.04), 0 24px 64px -28px rgba(27, 40, 60, 0.2);
  --shadow-mac: 0 2px 4px rgba(20, 28, 40, 0.08), 0 26px 44px -20px rgba(20, 28, 40, 0.32), 0 60px 100px -48px rgba(20, 28, 40, 0.38);
  --shadow-phone: 0 4px 8px rgba(10, 12, 20, 0.2), 0 28px 42px -16px rgba(10, 12, 20, 0.48), 0 54px 76px -34px rgba(10, 12, 20, 0.42);
  --font-display: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans', 'Apple SD Gothic Neo', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans', 'Apple SD Gothic Neo', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-nav: 0.9375rem;
  --fs-body: 1rem;
  --fs-lead: 1.125rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.625rem, 2.2vw, 2.375rem);
  --fs-h1: clamp(2.125rem, 2.2vw + 1rem, 3rem);
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;
  --r-pill: 999px;
  --r-panel: 28px;
  --r-mark: 10px;
  --r-small: 4px;
  --r-mid: 6px;
  --r-device: 20px;
  --r-phone: 36px;
  --r-screen: 29px;
  --r-shot: 10px;
  --gutter: 80px;
  --nav-h: 76px;
  --content-max: 1280px;
  --reading-max: 800px;
  --section-gap: 160px;
  --panel-pad: 36px;
  --duration: 200ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.nav-open { overflow: hidden; }
body, main, section, article, aside, nav, header, footer, div, figure { min-width: 0; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--clear); }
button { color: var(--text); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-dark); }
a, button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-heavy);
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p, li, dd { overflow-wrap: break-word; }
strong { font-weight: var(--weight-bold); }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 22px;
  border-radius: var(--r-mark);
  background: var(--panel-2);
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.9;
  tab-size: 2;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
svg { vertical-align: middle; }
button svg, a svg, .eyebrow-dot { flex-shrink: 0; }
.site { position: relative; isolation: isolate; overflow-x: clip; }
.shell, .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); }
.section { padding-top: var(--section-gap); }
.section:last-child { padding-bottom: var(--section-gap); }
.section-head { margin-bottom: 48px; }
.section-head p { max-width: 640px; margin-top: 18px; color: var(--muted); }
.section-head.center { text-align: center; }
.section-head.center p { margin-inline: auto; }
.keyword { white-space: nowrap; }
.muted { color: var(--muted); }
.text-link { font-weight: var(--weight-semibold); }
.mono { font-family: var(--font-mono); }
.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;
  left: var(--gutter);
  top: 8px;
  transform: translateY(-150%);
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--on-ink);
}
.skip-link:focus { transform: none; color: var(--on-ink); }

.topbar { position: relative; height: var(--nav-h); z-index: 40; }
.header-shell {
  position: relative;
  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: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: var(--weight-heavy);
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: var(--r-mark);
  box-shadow: var(--shadow-mark);
}
.brand-placeholder {
  position: relative;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}
.brand-placeholder::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: var(--r-small);
  border: 1px solid var(--hl-edge);
  background: linear-gradient(135deg, var(--hl), var(--panel));
}
.mainnav { margin-left: auto; min-width: 0; }
.mainnav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: clamp(18px, 2.8vw, 40px);
}
.mainnav a {
  display: block;
  padding-block: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-nav);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.mainnav a:hover, .mainnav a[aria-current="page"] { color: var(--text); }
.mainnav a[aria-current="page"] { font-weight: var(--weight-bold); }
.header-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.language-switch { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 0 0 28px;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--clear);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.lang:hover { color: var(--text); }
.lang-caret { font-size: var(--fs-xs); }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-mark);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-panel);
  list-style: none;
}
.language-menu a, .mobile-drawer a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--muted);
  text-decoration: none;
}
.language-menu a:hover, .language-menu a[aria-current="true"] {
  border-radius: var(--r-mid);
  background: var(--panel-2);
  color: var(--text);
}
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--panel);
  color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mobile-drawer { display: none; }
.menu-veil {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 30;
  border: 0;
  width: 100%;
  background: var(--veil);
  color: var(--text);
}

.cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  max-width: 100%;
  padding: 12px 28px;
  border: 1px solid var(--clear);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: var(--weight-bold);
  line-height: 1.4;
  letter-spacing: -0.005em;
  text-decoration: none;
  text-align: center;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background-color var(--duration) var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover, .btn-primary.is-hover {
  background: var(--ink-hover);
  color: var(--on-ink);
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-btn-soft);
}
.btn-secondary:hover { color: var(--text); transform: translateY(-1px); }
.btn:active, .btn.is-active { transform: translateY(1px); box-shadow: var(--shadow-chip); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: 0.5; transform: none; }
.btn.is-focus { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.btn-arrow { color: var(--accent); font-weight: var(--weight-bold); }

.panel, .card {
  padding: var(--panel-pad);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-panel);
}
.panel-soft { background: var(--panel-2); color: var(--text); box-shadow: none; }
.card p, .panel p { margin-top: 16px; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card-grid > *, .hero .shell > *, .footer-grid > * { min-width: 0; }
.prose { min-width: 0; }
.prose :is(p, ul, ol, pre, blockquote, figure, table) { margin-block: 22px; }
.prose :is(ul, ol) { padding-left: 1.5em; }
.prose li + li { margin-top: 10px; }
.prose h2 { margin-top: 72px; margin-bottom: 24px; scroll-margin-top: 24px; }
.prose h3 { margin-top: 36px; margin-bottom: 16px; }
.prose :not(pre) > code {
  padding: 0.1em 0.3em;
  border-radius: var(--r-small);
  background: var(--panel-2);
  color: var(--accent-dark);
  font-size: 0.9em;
}
.prose a { overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }

.site-footer { margin-top: var(--section-gap); padding-top: 64px; padding-bottom: 32px; background: var(--panel-2); color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1.4fr 0.7fr; gap: 48px; }
.footer-brand p { margin-top: 22px; max-width: 320px; color: var(--muted); font-size: var(--fs-sm); }
.footer-title { margin-bottom: 18px; font-size: var(--fs-body); font-weight: var(--weight-bold); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding-block: 6px; color: var(--muted); text-decoration: none; font-size: var(--fs-sm); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
html.reveal-ready .reveal { transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1280px) {
  html:not([lang="zh-CN"]):not([lang="zh-TW"]) .mainnav { display: none; }
  html:not([lang="zh-CN"]):not([lang="zh-TW"]) .header-tools { margin-left: auto; }
  html:not([lang="zh-CN"]):not([lang="zh-TW"]) .menu-toggle { display: inline-flex; }
}
@media (max-width: 1240px) {
  :root { --gutter: 48px; }
}
@media (max-width: 1080px) {
  .mainnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .lang { padding-left: 0; border-left: 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  .mobile-drawer:not([hidden]) {
    display: block;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 45;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px var(--gutter) 24px;
    border-block: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    box-shadow: var(--shadow-panel);
  }
  .mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--panel-2); color: var(--text); }
  .mobile-drawer .drawer-languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
}
@media (max-width: 768px) {
  :root { --fs-h1: clamp(1.5rem, 4.5vw, 1.875rem); --panel-pad: 24px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .header-shell { gap: 8px; }
  .brand { font-size: var(--fs-nav); gap: 8px; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .header-tools { gap: 6px; margin-left: auto; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang { padding-inline: 4px; }
  .btn { min-height: 50px; padding: 12px 22px; font-size: var(--fs-nav); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .tilt, [data-tilt] { transform: none !important; }
  .section-head { margin-bottom: 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; }
}