:root {
  --bg: #ffffff;
  --bg-panel: #f5f7fa;
  --bg-panel-2: #edf3fd;
  --border: #e4e7ec;
  --accent: #1d63d6;
  --accent-dark: #154ba8;
  --text: #111316;
  --text-muted: #5b6270;
  --text-faint: #a7adb8;
  --on-accent: #ffffff;
  --success: #1e8e5a;
  --warn: #b7791f;
  --error: #c8382e;
  --transparent: transparent;
  --white-clear: rgba(255, 255, 255, 0);
  --veil: rgba(17, 19, 22, .28);

  --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", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-display: 800;
  --tracking-display: -.035em;
  --tracking-cjk: -.02em;

  --r-pill: 999px;
  --r-circle: 50%;
  --r-panel: 40px;
  --r-card: 32px;
  --r-card-mobile: 24px;
  --r-row: 14px;
  --r-menu: 18px;
  --r-item: 12px;
  --r-mark: 10px;
  --r-none: 0;

  --shadow-card:
    0 1px 2px rgba(17, 19, 22, .05),
    0 6px 14px -6px rgba(17, 19, 22, .08),
    0 34px 70px -24px rgba(17, 19, 22, .14),
    0 80px 160px -40px rgba(17, 19, 22, .12);
  --shadow-menu: 0 2px 6px rgba(17, 19, 22, .05), 0 24px 48px -16px rgba(17, 19, 22, .18);
  --shadow-btn: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 8px 18px -8px rgba(21, 75, 168, .55);
  --shadow-mark: 0 18px 34px -12px rgba(21, 75, 168, .55), 0 2px 4px rgba(21, 75, 168, .25);
  --shadow-tag: 0 10px 22px -10px rgba(17, 19, 22, .45);

  --header-h: 72px;
  --gutter: clamp(16px, 3vw, 40px);
  --content-w: 1120px;
  --reading-w: 760px;
  --header-w: 1280px;
  --wrap: min(1120px, 92vw);
  --section-space: 160px;
  --ease: cubic-bezier(.2, .6, .3, 1);
  --time-fast: 150ms;
  --time-reveal: 600ms;
  --focus-width: 2px;
  --focus-offset: 3px;
  --z-header: 30;
  --z-veil: 31;
  --z-drawer: 32;
  --z-popup: 33;
  --z-fab: 15;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--weight-regular);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
svg { display: block; flex-shrink: 0; }
button svg, a svg { flex-shrink: 0; }
figure { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: 1.2;
  letter-spacing: var(--tracking-cjk);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(34px, 3.4vw, 48px); }
h2 { font-size: clamp(28px, 3vw, 40px); }
h3 { font-size: clamp(21px, 2vw, 26px); }
p { margin: 0 0 1.25em; }
strong { font-weight: var(--weight-bold); }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-item);
  font-size: 14px;
  line-height: 1.8;
  tab-size: 2;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
:focus-visible {
  outline: var(--focus-width) solid var(--accent);
  outline-offset: var(--focus-offset);
  border-radius: var(--r-mark);
}
::selection { background: var(--bg-panel-2); color: var(--text); }
.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: 0; }
.section:last-child { padding-bottom: var(--section-space); }
.section__head { max-width: 800px; margin: 0 auto 44px; text-align: center; }
.section__head h2 { margin: 0 0 18px; }
.section__head p { color: var(--text-muted); }
.keep { white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.flow > * + * { margin-top: 24px; }
.grid { display: grid; gap: 28px; }
.grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > *, .split > *, .footer-grid > *, .prose, .prose * { min-width: 0; }
.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;
  top: 8px;
  left: var(--gutter);
  z-index: var(--z-popup);
  padding: 10px 18px;
  transform: translateY(-160%);
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--on-accent);
}
.skip-link:focus { transform: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-height: 48px;
  padding: 10px 24px;
  border: 1px solid var(--transparent);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--weight-bold);
  letter-spacing: -.005em;
  line-height: 1.4;
  text-align: center;
  transition: background-color var(--time-fast) ease, color var(--time-fast) ease;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-btn); }
.btn--primary:hover, .btn--primary.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn--primary:active { background: var(--accent-dark); color: var(--on-accent); box-shadow: none; }
.btn--soft { background: var(--bg-panel-2); color: var(--text); }
.btn--soft: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--inverse { background: var(--bg); color: var(--accent-dark); }
.btn--inverse:hover { background: var(--bg-panel-2); color: var(--accent-dark); }
.btn--sm { min-height: 42px; height: 42px; padding: 0 20px; font-size: 15px; }
.btn--sm svg { width: 16px; height: 16px; }
.btn--lg { min-height: 54px; padding: 14px 28px; font-size: 16.5px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
}
.btn.is-focus { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: var(--bg);
  color: var(--text);
}
.topbar__inner {
  position: relative;
  height: 100%;
  max-width: min(100%, calc(var(--header-w) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: 18px;
  letter-spacing: var(--tracking-cjk);
  white-space: nowrap;
}
.brand__logo { display: block; width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--r-circle); }
.brand__placeholder {
  display: block;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-mark);
  background: var(--bg-panel);
  color: var(--text);
}
.nav {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  margin-left: auto;
}
.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  white-space: nowrap;
}
.nav__link:hover { background: var(--bg-panel); color: var(--text); }
.nav__link[aria-current="page"] { color: var(--text); font-weight: var(--weight-semibold); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.more, .language { position: relative; }
.more__btn, .lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: var(--weight-semibold);
}
.more__btn { background: var(--bg-panel-2); color: var(--accent-dark); }
.more__btn svg { width: 12px; height: 12px; }
.lang { background: var(--transparent); color: var(--text-muted); font-size: 14px; font-weight: var(--weight-medium); padding-inline: 12px; }
.lang svg { width: 16px; height: 16px; }
.lang:hover { background: var(--bg-panel); color: var(--text); }
.lang__short { display: none; }
.popup {
  position: absolute;
  z-index: var(--z-popup);
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  max-width: calc(100vw - var(--gutter) * 2);
  padding: 10px;
  margin: 0;
  list-style: none;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-menu);
  box-shadow: var(--shadow-menu);
}
.popup__group { display: block; padding: 6px 12px 4px; font-size: 12px; font-weight: var(--weight-semibold); color: var(--text-muted); }
.popup a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r-item);
  font-size: 15px;
  font-weight: var(--weight-medium);
}
.popup a:hover, .popup a[aria-current] { background: var(--bg-panel); color: var(--text); }
.popup small { display: block; font-size: 12.5px; color: var(--text-muted); font-weight: var(--weight-regular); }
.more--static .popup { display: none; }
.more--static:hover .popup, .more--static:focus-within .popup { display: block; }
.hamburger {
  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(--bg);
  color: var(--text);
}
.hamburger svg { width: 20px; height: 20px; }
.drawer {
  position: fixed;
  z-index: var(--z-drawer);
  inset: var(--header-h) 0 auto;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px var(--gutter) 32px;
  background: var(--bg);
  color: var(--text);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-menu);
}
.drawer ul { margin: 0; padding: 0; list-style: none; }
.drawer a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--r-item);
  font-weight: var(--weight-medium);
}
.drawer a:hover, .drawer a[aria-current] { background: var(--bg-panel-2); color: var(--text); }
.drawer__label { margin: 20px 16px 8px; font-size: 13px; color: var(--text-muted); }
.drawer .btn { margin-top: 16px; }
.nav-veil {
  position: fixed;
  z-index: var(--z-veil);
  inset: var(--header-h) 0 0;
  border: 0;
  background: var(--veil);
  color: var(--text);
  cursor: default;
}

.card {
  padding: 32px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.card--raised { box-shadow: var(--shadow-card); }
.panel { padding: 64px; border-radius: var(--r-panel); background: var(--bg-panel); color: var(--text); }
.card h3, .panel h2 { margin-top: 0; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 60px; align-items: center; }
.prose { font-size: 17px; line-height: 1.9; }
.prose h2 { margin-top: 2.8em; margin-bottom: .8em; }
.prose h3 { margin-top: 2em; }
.prose a:not(.btn) { text-decoration: underline; text-underline-offset: 4px; }
.prose li + li { margin-top: .6em; }
.prose :not(pre) > code { background: var(--bg-panel); color: var(--text); border-radius: var(--r-mark); padding: .1em .3em; font-size: .88em; }
.prose > :first-child { margin-top: 0; }
.decorated, [data-hero-visual] { overflow-x: clip; }

.site-footer {
  margin-top: var(--section-space);
  padding-top: 64px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 22px; max-width: 340px; font-size: 14px; color: var(--text-muted); }
.site-footer h2 { margin: 0 0 16px; font-size: 14px; letter-spacing: 0; font-weight: var(--weight-bold); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 4px; }
.site-footer li a { display: block; padding-block: 6px; font-size: 14px; color: var(--text-muted); overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { margin-left: auto; }

.reveal { opacity: 1; }
.reveal-enabled .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
.reveal-enabled .reveal { transition: opacity var(--time-reveal) var(--ease), transform var(--time-reveal) var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1279px) {
  .nav { display: none; }
  .header-tools { margin-left: auto; }
  .hamburger { display: inline-flex; }
}
@media (min-width: 1280px) {
  .drawer, .nav-veil { display: none !important; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { gap: 32px; }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px, 5vw, 30px); }
  .grid--two, .split { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 32px 24px; border-radius: var(--r-card-mobile); }
}
@media (max-width: 640px) {
  :root { --section-space: 96px; }
  .wrap { width: 100%; padding-inline: var(--gutter); }
  .topbar__inner { gap: 8px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand__logo, .brand__placeholder { width: 32px; height: 32px; }
  .header-tools { gap: 4px; margin-left: auto; }
  .header-tools > .btn { display: none; }
  .lang { min-height: 44px; padding-inline: 10px; }
  .lang__full { display: none; }
  .lang__short { display: inline; }
  .lang > svg { display: none; }
  .btn--lg { min-height: 48px; padding: 12px 22px; font-size: 15.5px; }
  .card { padding: 24px; border-radius: var(--r-card-mobile); }
  .section__head { margin-bottom: 32px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-bottom { margin-top: 32px; }
  .footer-bottom a { margin-left: 0; }
  .prose { font-size: 16px; }
  pre { padding: 18px; font-size: 12px; }
  .tilt, [class*="tilt--"] { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-enabled .reveal:not(.shown) { opacity: 1; transform: none; }
}