:root {
  --bg: #FFFFFF;
  --bg-panel: #F5F6FE;
  --bg-panel-2: #ECEEFD;
  --border: #E3E5EF;
  --border-strong: #CDD0DD;
  --accent: #5161F0;
  --accent-dark: #3B47C8;
  --text: #17181F;
  --text-muted: #5F6475;
  --success: #1F9D6B;
  --warn: #C98A12;
  --error: #D6453D;
  --success-ink: #176B4B;
  --warn-ink: #805608;
  --error-ink: #A42E28;
  --on-accent: #FFFFFF;
  --chrome-bar: #FAFAFC;
  --cmd-bg: #F4F5F8;
  --dot-1: #DCDDE3;
  --dot-2: #D0D2D9;
  --dot-3: #C4C6CE;
  --accent-ring: rgba(81,97,240,.16);
  --glow-ring: rgba(81,97,240,.07);
  --glow-near: rgba(81,97,240,.30);
  --glow-far: rgba(81,97,240,.22);
  --glow-halo: rgba(81,97,240,.16);
  --shadow-soft: rgba(23,24,31,.06);
  --shadow-accent: rgba(59,71,200,.30);
  --veil: rgba(23,24,31,.30);
  --clear: rgba(255,255,255,0);
  --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','Microsoft YaHei',sans-serif;
  --font-mono: 'JetBrains Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  --size-body: 15px;
  --size-small: 13px;
  --size-h1: clamp(34px,calc(3.4vw + 4px),48px);
  --size-h2: 30px;
  --size-h3: 21px;
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 10px;
  --r-pill: 999px;
  --r-round: 50%;
  --gutter: 32px;
  --content-width: 1200px;
  --reading-width: 780px;
  --header-width: 1280px;
  --nav-h: 64px;
  --section-space: 88px;
  --ease: .2s ease;
  --shadow-card: 0 14px 26px -18px var(--shadow-accent);
  --shadow-window: 0 0 0 5px var(--glow-ring),0 1px 2px var(--shadow-soft),0 22px 44px -18px var(--glow-near),0 40px 100px -24px var(--glow-far);
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
html.nav-open { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
button, input, select, textarea { border-radius: var(--r); }
button:disabled { cursor: not-allowed; }
img, svg, video { max-width: 100%; vertical-align: middle; }
img { height: auto; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--bg-panel-2); color: var(--text); }
:where(main, section, article, aside, nav, div, li) { min-width: 0; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-width) + var(--gutter) * 2); }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.panel-band { background: var(--bg-panel); color: var(--text); }
.decorated { position: relative; overflow-x: clip; }
.stack > * + * { margin-top: 20px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; }
h1, .h1 { font-size: var(--size-h1); font-weight: 800; line-height: 1.13; letter-spacing: -.02em; }
h2, .h2 { font-size: var(--size-h2); font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
h3, .h3 { font-size: var(--size-h3); font-weight: 700; line-height: 1.4; }
.keep { white-space: nowrap; }
.muted, small { color: var(--text-muted); }
small { font-size: var(--size-small); }
.accent, .h1-em { color: var(--accent); }
.mono, code, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
:not(pre) > code {
  padding: 2px 5px;
  border-radius: var(--r-xs);
  background: var(--bg-panel);
  color: var(--accent-dark);
  font-size: .9em;
}
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--chrome-bar);
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
  tab-size: 2;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
.prose { line-height: 1.85; min-width: 0; }
.prose > * + *, .prose section > * + * { margin-top: 18px; }
.prose h2 { margin-top: 52px; scroll-margin-top: 28px; }
.prose h3 { margin-top: 30px; scroll-margin-top: 28px; }
.prose p, .prose li { overflow-wrap: break-word; }
.prose a:not(.btn) { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid var(--clear);
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  transition: background-color var(--ease),border-color var(--ease),color var(--ease);
}
.btn svg { width: 17px; height: 17px; }
.btn-pri {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 22px -12px var(--glow-near);
}
.btn-pri:hover, .btn-pri.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-pri:active, .btn-pri.is-active { background: var(--accent-dark); color: var(--on-accent); transform: translateY(1px); }
.btn-sec { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn-sec:hover, .btn-sec.is-hover { background: var(--bg-panel); color: var(--accent-dark); border-color: var(--accent); }
.btn-sec:active, .btn-sec.is-active { background: var(--bg-panel-2); color: var(--accent-dark); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--cmd-bg); color: var(--text-muted); border-color: var(--border); box-shadow: none; }
.btn.is-focus { outline: 3px solid var(--accent-ring); outline-offset: 3px; }
.cta, .button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta { margin-top: 26px; }
.text-link { color: var(--accent-dark); font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.card, .panel {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--text);
}
.card { transition: border-color var(--ease),transform var(--ease),box-shadow var(--ease); }
a.card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.panel-soft { background: var(--bg-panel); color: var(--text); }
.panel-deep { background: var(--bg-panel-2); color: var(--text); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.topbar, #site-header { position: relative; z-index: 50; background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border); }
.header-shell {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: min(100%,calc(var(--header-width) + var(--gutter) * 2));
  min-height: var(--nav-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; flex-shrink: 0; }
.desktop-nav { margin-left: auto; min-width: 0; }
.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tabs a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nav-h);
  padding: 0 16px;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--ease);
}
.tabs a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 2px;
  border-radius: var(--r-xs);
  background: var(--accent);
  color: var(--on-accent);
  transform: scaleX(0);
  opacity: 0;
  transition: transform .25s ease,opacity .25s ease;
}
.tabs a:hover { color: var(--text); }
.tabs a:hover::after { transform: scaleX(.45); opacity: .45; }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; }
.tabs a[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }
.header-tools { display: flex; align-items: center; flex-shrink: 0; gap: 8px; margin-left: 20px; }
.language-picker { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13.5px;
  white-space: nowrap;
}
.lang svg { width: 15px; height: 15px; }
.lang:hover { border-color: var(--accent); color: var(--accent-dark); }
.lang-caret { font-size: 11px; }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 55;
  width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 12px 32px var(--shadow-soft);
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); }
.language-menu a:hover, .language-menu a[aria-current] { background: var(--bg-panel); color: var(--accent-dark); }
.menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 52;
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px var(--gutter) 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
.mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px; border-radius: var(--r-sm); }
.mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--bg-panel); color: var(--accent-dark); }
.drawer-languages { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.drawer-caption { padding: 8px 12px; color: var(--text-muted); font-size: 13px; }
.nav-veil { position: fixed; inset: var(--nav-h) 0 0; z-index: 40; background: var(--veil); color: var(--on-accent); border-radius: 0; width: 100%; }
.site-footer { border-top: 1px solid var(--border); background: var(--bg); color: var(--text); padding-top: 52px; padding-bottom: 26px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr .85fr 1.4fr .85fr; gap: 40px; }
.footer-brand p { margin-top: 16px; max-width: 28em; color: var(--text-muted); font-size: 14px; }
.footer-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: 7px; }
.footer-links a { display: inline-block; padding-block: 3px; color: var(--text-muted); font-size: 13px; }
.footer-links a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12.5px; }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(14px); }
html.reveal-ready .reveal { transition: opacity .55s ease,transform .55s ease; }
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 960px) {
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 961px) {
  .mobile-drawer, .nav-veil { display: none !important; }
}
@media (max-width: 768px) {
  :root { --size-h1: clamp(24px,4vw,30px); --size-h2: 26px; --section-space: 60px; }
  .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid-2, .grid-3, .footer-grid { grid-template-columns: minmax(0,1fr); }
  .footer-grid { gap: 28px; }
  .card, .panel { padding: 22px; }
  .tilt, [data-tilt] { transform: none !important; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
  .lang { min-height: 44px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .brand { font-size: 16px; gap: 8px; }
  .prose h2 { margin-top: 38px; }
}
@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; }
}