:root {
  --bg: #FFFFFF;
  --bg-panel: #F5F6F8;
  --bg-panel-2: #ECEEF1;
  --border: #E2E4E8;
  --accent: #1D64E0;
  --accent-dark: #154BAD;
  --accent-alt: #9C5CF0;
  --text: #15171C;
  --text-muted: #5E6470;
  --success: #1F8A5B;
  --warn: #B9740C;
  --error: #D2393B;
  --on-accent: #FFFFFF;
  --grid-line: #E8EBEF;
  --slot-line: #C8CCD3;
  --success-soft: #E7F3ED;
  --accent-soft: #E9F0FC;
  --error-soft: #FBECEC;
  --mask-solid: #000000;
  --clear: transparent;
  --veil: rgba(21, 23, 28, .38);

  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius-pill: 999px;
  --radius-board: 32px;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-card: 12px;
  --radius-sm: 7px;
  --radius-round: 50%;

  --shadow-board: 0 44px 96px -40px rgba(21, 23, 28, .18);
  --shadow-card: 0 1px 2px rgba(21, 23, 28, .06), 0 10px 22px -12px rgba(21, 23, 28, .14);
  --shadow-lift: 0 2px 4px rgba(21, 23, 28, .06), 0 28px 48px -14px rgba(21, 23, 28, .26);
  --shadow-wide: 0 2px 6px rgba(21, 23, 28, .05), 0 26px 64px -18px rgba(21, 23, 28, .20);
  --shadow-menu: 0 2px 6px rgba(21, 23, 28, .05), 0 24px 48px -16px rgba(21, 23, 28, .18);
  --shadow-btn: 0 10px 22px -10px rgba(29, 100, 224, .55);
  --focus-ring: 0 0 0 3px rgba(29, 100, 224, .32);

  --gutter: 48px;
  --content-width: 1280px;
  --reading-width: 840px;
  --header-width: 1280px;
  --header-height: 72px;
  --size-h1: clamp(34px, 16px + 2.2vw, 48px);
  --size-h2: clamp(24px, 14px + 1.5vw, 36px);
  --size-h3: 22px;
  --size-body: 16px;
  --size-small: 14px;
  --weight-display: 800;
  --leading-body: 1.6;
  --leading-title: 1.14;
  --tracking-title: -.02em;
  --section-space: 112px;
  --motion-fast: .15s;
  --motion-reveal: .5s;
  --ease-standard: ease;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
button, a { -webkit-tap-highlight-color: var(--clear); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
}
h1 { font-size: var(--size-h1); font-weight: var(--weight-display); }
h2 { font-size: var(--size-h2); font-weight: var(--weight-display); }
h3 { font-size: var(--size-h3); }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 22px;
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
  line-height: 1.75;
  tab-size: 2;
}
pre code { overflow-wrap: normal; white-space: pre; }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 32px; }
.wrap, .shell {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: var(--reading-width); }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.section-title { margin: 0; }
.section-heading { text-align: center; margin-bottom: 36px; }
.section-heading p { margin: 14px auto 0; max-width: 620px; color: var(--text-muted); }
.word { white-space: nowrap; }
.muted { color: var(--text-muted); }
.prose { min-width: 0; }
.prose p, .prose li { line-height: 1.85; overflow-wrap: break-word; }
.prose h2 { margin-block: 64px 20px; }
.prose h3 { margin-block: 32px 14px; }
.prose a { text-decoration: underline; text-underline-offset: .2em; }
.prose > :first-child { margin-top: 0; }
.prose div, .prose section, .prose article { min-width: 0; max-width: 100%; }
.prose :is(h2, h3), [id] { scroll-margin-top: 24px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  font-size: var(--size-small);
  font-weight: 600;
}
.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { color: var(--bg); }

.btn, .btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  max-width: 100%;
  padding: 12px 32px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  letter-spacing: .01em;
  box-shadow: var(--shadow-btn);
  transition: background-color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}
.btn:hover, .btn-primary:hover, .btn.is-hover {
  background: var(--accent-dark);
  color: var(--on-accent);
  transform: translateY(-1px);
}
.btn:active, .btn-primary:active { transform: none; }
.btn:focus-visible, .btn-primary:focus-visible, .btn.is-focus {
  outline: none;
  box-shadow: var(--shadow-btn), var(--focus-ring);
}
.btn-secondary {
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: none;
}
.btn-secondary:hover { background: var(--bg-panel-2); color: var(--text); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel-2);
  color: var(--text-muted);
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
}
.link-arrow .arr { display: inline-block; transition: transform var(--motion-fast) var(--ease-standard); }
.link-arrow:hover .arr { transform: translateX(3px); }
.card, .panel {
  min-width: 0;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.panel { background: var(--bg-panel); color: var(--text); box-shadow: none; }
.card h3, .panel h3 { margin-top: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card-grid > *, .split > * { min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; }
.decoration-host { position: relative; overflow-x: clip; }
.reveal { opacity: 1; }
.reveal.reveal-pending {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--motion-reveal) var(--ease-standard), transform var(--motion-reveal) var(--ease-standard);
}
.reveal.shown { opacity: 1; transform: none; }

.site-header, #site-header { position: relative; z-index: 40; background: var(--bg); color: var(--text); }
.header-shell {
  width: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav-bar { min-height: var(--header-height); display: flex; align-items: center; gap: 36px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.01em;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; display: block; flex-shrink: 0; }
.desktop-nav { min-width: 0; }
.nav-main { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-main > li { flex-shrink: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  background: var(--clear);
  color: var(--text);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-link:hover { background: var(--bg-panel); color: var(--text); }
.nav-link[aria-current="page"], .menu-item[aria-current="page"] { color: var(--accent); font-weight: 600; }
.chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-more, .language-picker { position: relative; }
.nav-menu, .language-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 300px;
  padding: 8px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-menu);
}
.language-menu { left: auto; right: 0; min-width: 190px; }
.menu-group { margin: 4px 10px 6px; color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.menu-item {
  display: block;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: var(--radius-card);
  color: var(--text);
}
.menu-item:hover { background: var(--bg-panel); color: var(--text); }
.menu-title { display: block; font-size: 15px; font-weight: 600; }
.menu-desc { display: block; margin-top: 2px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.lang:hover { background: var(--bg-panel-2); }
.lang-globe { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lang-short { display: none; }
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text);
}
.hamburger svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.nav-drawer {
  position: absolute;
  z-index: 3;
  top: 100%;
  inset-inline: 0;
  padding: 16px var(--gutter) 24px;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-menu);
}
.nav-drawer ul { list-style: none; margin: 0; padding: 0; }
.nav-drawer a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  color: var(--text);
  border-radius: var(--radius-card);
}
.nav-drawer a:hover { background: var(--bg-panel); color: var(--text); }
.nav-drawer a[aria-current="page"] { color: var(--accent); }
.drawer-label { margin: 16px 16px 8px; color: var(--text-muted); font-size: 13px; }
.nav-veil { position: fixed; z-index: 1; inset: var(--header-height) 0 0; border: 0; background: var(--veil); color: var(--text); }
.native-menu > summary { list-style: none; cursor: pointer; }
.native-menu > summary::-webkit-details-marker { display: none; }
.preview-mobile { display: none; }

.site-footer, #site-footer {
  padding-top: 64px;
  padding-bottom: 28px;
  background: var(--bg-panel);
  color: var(--text);
}
.footer-grid { display: grid; grid-template-columns: 1.3fr .9fr 1.3fr .7fr; gap: 40px; }
.footer-grid > * { min-width: 0; }
.footer-intro { margin-top: 18px; max-width: 340px; color: var(--text-muted); font-size: 14px; line-height: 1.8; }
.footer-heading { margin: 0 0 16px; font-size: 15px; font-weight: 700; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding-block: 5px; color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--text-muted); font-size: 13px; }
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .nav-bar { gap: 24px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .desktop-nav { display: none; }
  .hamburger { display: inline-flex; }
  .nav-tools { margin-left: auto; }
  .preview-mobile { display: block; }
  .preview-mobile > summary { display: inline-flex; }
  .preview-mobile .nav-drawer { display: block; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1001px) {
  .nav-drawer, .nav-veil { display: none !important; }
}
@media (max-width: 768px) {
  :root { --size-h1: clamp(24px, 4vw, 30px); --section-space: 72px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --header-height: 68px; }
  .nav-bar { gap: 8px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang { padding-inline: 10px; gap: 5px; }
  .lang-globe { display: none; }
  .nav-tools { margin-left: auto; gap: 6px; }
  .card-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { gap: 28px; }
  .card, .panel { padding: 22px; }
  .tilt, .is-tilted, .feature-art::before { transform: none !important; }
  pre { padding: 16px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal.reveal-pending { opacity: 1; transform: none; }
}