:root {
  --bg: #FCFCFD;
  --panel: #F5F5F7;
  --panel-2: #ECECEF;
  --border: #E3E3E8;
  --accent: #3A7BF7;
  --accent-dark: #1F57D6;
  --text: #16161A;
  --muted: #6B6B76;
  --success: #1FA855;
  --warn: #E89B00;
  --error: #E5484D;
  --white: #FFFFFF;
  --transparent: transparent;
  --tile-sky: #5AC8FA;
  --tile-coral: #FF6F91;
  --tile-lime: #5CD66A;
  --tile-sun: #FFC93C;
  --tile-tangerine: #FF9533;
  --band: #FFCC00;
  --sky-a1: rgba(90, 200, 250, .82);
  --sky-a2: rgba(58, 170, 245, .58);
  --sky-glow: rgba(90, 200, 250, .55);
  --coral-a1: rgba(255, 111, 145, .74);
  --coral-a2: rgba(240, 84, 160, .52);
  --coral-glow: rgba(255, 111, 145, .5);
  --lime-a1: rgba(92, 214, 106, .84);
  --lime-a2: rgba(60, 190, 80, .6);
  --lime-glow: rgba(92, 214, 106, .5);
  --sun-a1: rgba(255, 201, 60, .82);
  --sun-a2: rgba(255, 176, 30, .6);
  --sun-glow: rgba(255, 201, 60, .55);
  --tangerine-a1: rgba(255, 149, 51, .86);
  --tangerine-a2: rgba(255, 118, 30, .64);
  --tangerine-glow: rgba(255, 149, 51, .55);
  --white-hi: rgba(255, 255, 255, .78);
  --white-line: rgba(255, 255, 255, .46);
  --white-glyph: rgba(255, 255, 255, .94);
  --nav-glass: rgba(252, 252, 253, .8);
  --accent-glow: rgba(58, 123, 247, .38);
  --accent-soft: rgba(58, 123, 247, .1);
  --success-ring: rgba(31, 168, 85, .16);
  --ink-08: rgba(22, 22, 26, .08);
  --ink-05: rgba(22, 22, 26, .05);
  --ink-04: rgba(22, 22, 26, .04);
  --veil: rgba(22, 22, 26, .24);

  --font-display: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "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, "SFMono-Regular", Menlo, Consolas, monospace;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;
  --weight-black: 900;
  --text-xs: 12.5px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lede: 16.5px;
  --text-h1: clamp(34px, 3.4vw, 48px);
  --text-h2: clamp(24px, 2.4vw, 32px);
  --text-h3: 20px;
  --r-pill: 999px;
  --r-circle: 50%;
  --r-sm: 12px;
  --r-md: 18px;
  --r-card: 24px;
  --r-hl: 16px;
  --r-panel: 32px;
  --r-tile: 48px;
  --shadow-sm: 0 1px 2px var(--ink-05), 0 2px 8px var(--ink-04);
  --shadow-md: 0 2px 4px var(--ink-04), 0 12px 32px -8px var(--ink-08);
  --shadow-lg: 0 4px 10px var(--ink-05), 0 24px 48px -16px var(--ink-08);
  --nav-h: 64px;
  --peek: 56px;
  --wrap: 1200px;
  --reading: 800px;
  --header-width: 1280px;
  --gutter: 32px;
  --section-space: 96px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --transition: .2s ease;
  --tab-duration: 8s;
}
*, *::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(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main, section, article, aside, nav, header, footer, div, li { min-width: 0; }
img, video { max-width: 100%; height: auto; }
img, svg { display: block; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: var(--transparent); }
button { cursor: pointer; }
button { border: 0; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
p { margin: 0 0 1.2em; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); text-wrap: balance; }
h1 { font-size: var(--text-h1); line-height: 1.12; font-weight: var(--weight-black); letter-spacing: -.02em; }
h2 { font-size: var(--text-h2); line-height: 1.25; font-weight: var(--weight-heavy); letter-spacing: -.015em; }
h3 { font-size: var(--text-h3); line-height: 1.4; font-weight: var(--weight-bold); }
h1, h2, h3 { display: block; }
strong { font-weight: var(--weight-bold); }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; font-size: .9em; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--text);
  line-height: 1.7;
  tab-size: 2;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; font-size: var(--text-sm); }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 32px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.section--panel { background: var(--panel); color: var(--text); }
.section__intro { max-width: 640px; margin-bottom: 32px; }
.section__intro h2 { margin: 0 0 12px; }
.muted { color: var(--muted); }
.keep { white-space: nowrap; }
.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: 16px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow-md);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid > *, .flex-row > * { min-width: 0; }
.grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flex-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.panel, .card {
  background: var(--white);
  color: var(--text);
  border-radius: var(--r-card);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.panel { border-radius: var(--r-panel); padding: 48px; background: var(--panel); color: var(--text); }
.card h3 { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.prose { line-height: 1.85; min-width: 0; }
.prose h2 { margin-top: 2.5em; margin-bottom: .8em; }
.prose h3 { margin-top: 1.8em; margin-bottom: .7em; }
.prose :is(ul, ol) { padding-inline-start: 1.5em; }
.prose li { margin-block: .5em; }
.prose :not(pre) > code { background: var(--panel); color: var(--text); padding: .12em .35em; border-radius: var(--r-sm); }
.prose a { overflow-wrap: anywhere; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  border: 1px solid var(--transparent);
  border-radius: var(--r-pill);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  letter-spacing: .005em;
  text-align: center;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}
.btn:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: inset 0 1px 0 var(--white-line), 0 10px 24px -10px var(--accent-glow), 0 2px 6px var(--ink-05);
}
.btn--primary:hover, .btn--primary.is-hover { background: var(--accent-dark); color: var(--white); transform: translateY(-1px); }
.btn--primary:active, .btn--primary.is-pressed { background: var(--accent-dark); color: var(--white); transform: translateY(1px); box-shadow: var(--shadow-sm); }
.btn--soft { background: var(--panel-2); color: var(--accent-dark); }
.btn--soft:hover, .btn--soft.is-hover { background: var(--border); color: var(--accent-dark); }
.btn--outline { background: var(--white); color: var(--text); border-color: var(--border); }
.btn--outline:hover { background: var(--panel); color: var(--text); }
.btn--small { height: 44px; padding-inline: 20px; font-size: var(--text-sm); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--panel-2); color: var(--muted); box-shadow: none; transform: none; cursor: not-allowed; }
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--nav-glass);
  color: var(--text);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
}
.topbar__inner {
  position: relative;
  height: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: var(--weight-heavy);
  font-size: 18px;
  letter-spacing: -.01em;
  white-space: nowrap;
  justify-self: start;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; flex-shrink: 0; }
.topnav { min-width: 0; }
.topnav__list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 4px; }
.topnav__link, .more__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: 15px;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--transition);
}
.topnav__link:hover, .more__toggle:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.topnav__link[aria-current="page"] { background: var(--panel-2); color: var(--text); }
.more, .lang { position: relative; }
.more summary, .lang summary, .preview-mobile > summary { list-style: none; }
.more summary::-webkit-details-marker, .lang summary::-webkit-details-marker, .preview-mobile > summary::-webkit-details-marker { display: none; }
.caret { font-size: 11px; color: var(--muted); transition: transform var(--transition); }
details[open] > summary .caret { transform: rotate(180deg); }
.menu {
  position: absolute;
  top: calc(100% + 10px);
  z-index: 5;
  min-width: 232px;
  padding: 8px;
  margin: 0;
  list-style: none;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}
.more .menu { left: 50%; transform: translateX(-50%); }
.lang .menu { right: 0; min-width: 168px; }
.menu__link {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.5;
}
.menu__link:hover, .menu__link[aria-current] { background: var(--panel); color: var(--text); text-decoration: none; }
.menu__hint { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-normal); }
.topbar__tools { display: flex; align-items: center; gap: 8px; justify-self: end; flex-shrink: 0; }
.lang__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.lang__toggle svg { width: 16px; height: 16px; color: var(--muted); }
.lang__short { display: none; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--r-pill);
  background: var(--panel);
  color: var(--text);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-drawer { display: none; }
.nav-veil {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 0;
  background: var(--veil);
  color: var(--text);
}
.preview-mobile { display: none; }

.site-footer { background: var(--panel); color: var(--text); padding-top: 64px; padding-bottom: 100px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.5fr .8fr; gap: 40px; }
.footer-brand p { max-width: 290px; margin-top: 18px; color: var(--muted); font-size: var(--text-sm); }
.footer-title { margin: 0 0 16px; font-size: var(--text-sm); font-weight: var(--weight-bold); }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding-block: 6px; color: var(--muted); font-size: var(--text-sm); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: var(--text-xs); color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 24px; }

.reveal { opacity: 1; transform: none; }
.reveal.is-pending { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .topbar__inner { gap: 16px; }
  .topnav__link, .more__toggle { padding-inline: 12px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .topbar__inner { display: flex; gap: 12px; }
  .topnav { display: none; }
  .topbar__tools { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .nav-drawer:not([hidden]) {
    display: block;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 2;
    padding: 16px var(--gutter) 24px;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--white);
    color: var(--text);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-drawer ul { padding: 0; margin: 0; list-style: none; }
  .nav-drawer a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: var(--r-sm);
    color: var(--text);
  }
  .nav-drawer a:hover, .nav-drawer a[aria-current] { background: var(--panel); color: var(--text); text-decoration: none; }
  .nav-drawer__languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
  .nav-drawer__label { padding-inline: 16px; margin-bottom: 8px; font-size: var(--text-xs); color: var(--muted); }
  .preview-mobile { display: block; }
  .preview-mobile > summary { display: inline-flex; }
  .preview-mobile .nav-drawer { display: block; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  :root { --text-h1: 30px; --text-h2: 24px; --gutter: 20px; --section-space: 64px; }
}
@media (max-width: 640px) {
  :root { --nav-h: 58px; --peek: 40px; --gutter: 16px; }
  .topbar__inner { gap: 8px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand__mark { width: 28px; height: 28px; }
  .topbar__tools { gap: 6px; margin-left: auto; }
  .lang__label { display: none; }
  .lang__short { display: inline; }
  .lang__toggle { padding-inline: 10px; gap: 6px; }
  .lang__toggle svg { width: 15px; height: 15px; }
  .grid, .grid--two, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 28px 20px; border-radius: var(--r-card); }
  .card { padding: 24px; }
  .tilt, [data-tilt] { transform: none !important; }
  .footer-grid { gap: 28px; }
  .btn { padding-inline: 22px; }
  pre { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
}