:root {
  --bg: #FFFFFF;
  --bg-panel: #F6F7F9;
  --bg-panel-2: #ECEEF2;
  --border: #E2E5EA;
  --border-strong: #D3D7DE;
  --accent: #1F4FD8;
  --accent-dark: #163A9C;
  --accent-tint: #EAF0FD;
  --violet: #8E4FE0;
  --violet-tint: #F4EDFD;
  --text: #121418;
  --text-muted: #5A606C;
  --text-faint: #8C929C;
  --on-dark: #FFFFFF;
  --dot: #CDD1D8;
  --grid-line: #E8EAEE;
  --mask-solid: #000000;
  --clear: transparent;
  --success: #1F8A5B;
  --warn: #B7791F;
  --error: #C9372C;

  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe 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;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-brand: 800;
  --weight-display: 900;
  --size-xs: 12px;
  --size-sm: 14px;
  --size-nav: 15px;
  --size-body: 16px;
  --size-lede: 17px;
  --size-card-title: 20px;
  --size-h3: 24px;
  --size-h2: 34px;
  --size-h1: clamp(34px, 3.4vw, 48px);
  --size-h1-mobile: clamp(24px, 5.8vw, 30px);
  --leading-body: 1.6;
  --leading-title: 1.14;
  --tracking-title: -0.02em;
  --tracking-brand: -0.01em;
  --tracking-label: 0.1em;

  --r-pill: 999px;
  --r-panel: 32px;
  --r-board: 28px;
  --r-board-mobile: 22px;
  --r-card: 16px;
  --r-tile: 20px;
  --r-step: 10px;
  --r-ctl: 8px;
  --r-tag: 6px;
  --r-icon: 12px;
  --r-check: 5px;
  --r-circle: 50%;

  --shadow-board: 0 48px 96px -40px rgba(18, 20, 24, 0.18), 0 16px 40px -20px rgba(18, 20, 24, 0.10);
  --shadow-step: 0 1px 2px rgba(18, 20, 24, 0.05), 0 3px 8px -3px rgba(18, 20, 24, 0.08);
  --shadow-far: 0 8px 16px -8px rgba(18, 20, 24, 0.14), 0 2px 4px rgba(18, 20, 24, 0.05);
  --shadow-mid: 0 18px 34px -14px rgba(18, 20, 24, 0.22), 0 5px 12px -5px rgba(18, 20, 24, 0.09);
  --shadow-near: 0 32px 60px -20px rgba(18, 20, 24, 0.32), 0 12px 22px -8px rgba(18, 20, 24, 0.13);
  --shadow-btn: 0 10px 22px -10px rgba(31, 79, 216, 0.60);
  --shadow-fab: 0 14px 30px -12px rgba(18, 20, 24, 0.40);
  --ring-focus: 0 0 0 3px rgba(31, 79, 216, 0.28);

  --gutter: 24px;
  --width-content: 1120px;
  --width-reading: 800px;
  --width-header: 1280px;
  --height-header: 72px;
  --space-section: 96px;
  --duration-fast: 150ms;
  --duration-reveal: 500ms;
  --ease-standard: ease;
  --z-header: 30;
  --z-overlay: 20;
  --z-fab: 40;
  --z-skip: 60;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
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; }
img, svg, video { max-width: 100%; vertical-align: middle; }
img { height: auto; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-dark); }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: var(--clear); }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  box-shadow: var(--ring-focus);
}
button:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--size-h1); font-weight: var(--weight-display); letter-spacing: var(--tracking-title); }
h2 { font-size: var(--size-h2); letter-spacing: var(--tracking-title); }
h3 { font-size: var(--size-h3); }
p, ul, ol, dl, blockquote, figure { margin-top: 0; }
:where(main, section, article, aside, nav, div, li) { min-width: 0; }
:where(h1, h2, h3, h4, section, article, [id]) { scroll-margin-top: 24px; }
code, kbd, pre, samp { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; font-size: 0.88em; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-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(--size-sm); }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 40px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.text-link { font-weight: var(--weight-semibold); }
.skip {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: var(--z-skip);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--on-dark);
  font-size: var(--size-sm);
}
.skip:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { color: var(--on-dark); }
.wrap {
  width: 100%;
  max-width: calc(var(--width-content) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--width-reading) + var(--gutter) * 2); }
.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--size-h2);
  font-weight: var(--weight-normal);
  line-height: 1.25;
  letter-spacing: var(--tracking-title);
}
.section-title b { font-weight: var(--weight-display); }
.section-sub { margin: 12px 0 0; color: var(--text-muted); }
.section-head { margin-bottom: 40px; }
.panel {
  border-radius: var(--r-panel);
  background: var(--bg-panel);
  color: var(--text);
  padding: 40px;
}
.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  background: var(--bg);
  color: var(--text);
}
.card h3 { margin-top: 0; font-size: var(--size-card-title); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prose { line-height: 1.85; }
.prose h2 { margin-top: 64px; margin-bottom: 22px; font-weight: var(--weight-display); }
.prose h3 { margin-top: 36px; margin-bottom: 16px; }
.prose p { margin-bottom: 22px; }
.prose :where(ul, ol) { padding-left: 1.5em; }
.prose li + li { margin-top: 8px; }
.prose figure, .prose div { max-width: 100%; min-width: 0; }
.prose :not(pre) > code {
  padding: 2px 5px;
  border-radius: var(--r-tag);
  background: var(--bg-panel);
  color: var(--text);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid var(--clear);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--on-dark); box-shadow: var(--shadow-btn); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--on-dark); }
.btn-primary:active, .btn-primary.is-active { background: var(--accent-dark); color: var(--on-dark); box-shadow: none; }
.btn-ghost { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-ghost svg { width: 15px; height: 15px; color: var(--accent); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel-2);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: none;
}
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 4px; box-shadow: var(--ring-focus); }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.topbar { height: var(--height-header); position: relative; z-index: var(--z-header); background: var(--bg); color: var(--text); }
.topbar-inner {
  max-width: min(100%, calc(var(--width-header) + var(--gutter) * 2));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; display: block; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-weight: var(--weight-brand);
  font-size: var(--size-lede);
  letter-spacing: var(--tracking-brand);
}
.desktop-nav { margin-left: auto; min-width: 0; }
.nav-links { display: flex; align-items: center; gap: 40px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block;
  padding-block: 12px;
  font-size: var(--size-nav);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { font-weight: var(--weight-bold); color: var(--text); }
.header-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.language-picker { position: relative; }
.lang {
  position: relative;
  min-height: 44px;
  padding: 0 0 0 40px;
  border: 0;
  background: var(--clear);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.lang::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 18px;
  margin-top: -9px;
  background: var(--border);
  color: var(--text);
}
.lang-short { display: none; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 190px;
  padding: 8px;
  margin: 0;
  list-style: none;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-mid);
}
.lang-menu a { display: block; min-height: 44px; padding: 10px 14px; border-radius: var(--r-ctl); text-decoration: none; color: var(--text-muted); }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: var(--bg-panel); 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(--bg);
  color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-drawer {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--height-header);
  padding: 16px var(--gutter) 24px;
  max-height: calc(100dvh - var(--height-header));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-mid);
}
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer a {
  display: flex;
  width: 100%;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--r-ctl);
}
.mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--bg-panel); color: var(--text); }
.drawer-label { margin: 20px 16px 8px; font-size: var(--size-xs); color: var(--text-muted); }
.menu-veil { position: fixed; inset: var(--height-header) 0 0; z-index: var(--z-overlay); background: var(--bg-panel-2); color: var(--text); border: 0; opacity: 0.7; }
.preview-menu { display: none; }
.site-footer {
  padding-top: 64px;
  padding-bottom: 100px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.7fr 1.4fr; gap: 56px; }
.footer-intro { margin: 18px 0 0; max-width: 320px; font-size: var(--size-sm); color: var(--text-muted); }
.footer-heading { margin: 0 0 16px; font-size: var(--size-sm); 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(--text-muted); font-size: var(--size-sm); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-searches { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.footer-languages, .footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.footer-bottom a { color: var(--text-muted); font-size: var(--size-sm); text-decoration: none; padding-block: 8px; }
.footer-bottom a[aria-current="true"] { color: var(--text); font-weight: var(--weight-bold); }
.copyright { font-size: var(--size-sm); color: var(--text-muted); margin: 20px 0 0; }
.reveal { opacity: 1; transition: opacity var(--duration-reveal) var(--ease-standard), transform var(--duration-reveal) var(--ease-standard); }
.reveal.is-pending { opacity: 0; transform: translateY(16px); }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1280px) {
  .topbar-inner { gap: 20px; }
  .nav-links { gap: 28px; }
  .lang { padding-left: 28px; }
}
@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .lang { padding-left: 0; }
  .lang::before { display: none; }
  .preview-menu { display: block; }
  .preview-menu > summary { display: grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; list-style: none; }
  .preview-menu > summary::-webkit-details-marker { display: none; }
  .preview-menu .mobile-drawer { z-index: var(--z-header); }
}
@media (min-width: 1101px) {
  .mobile-drawer, .menu-veil { display: none; }
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  :root { --height-header: 60px; --size-h2: 26px; --space-section: 64px; }
  h1 { font-size: var(--size-h1-mobile); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .topbar-inner { gap: 8px; }
  .brand-name { font-size: var(--size-nav); }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 24px 20px; }
  .card { padding: 24px 20px; }
  .btn { min-height: 46px; padding-inline: 22px; font-size: var(--size-nav); }
  .tilt, .float, .feature-backing, .settings-card { transform: none !important; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { margin-bottom: 28px; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .header-tools { gap: 4px; }
  .brand { gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
}