:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-panel: #f6f6f8;
  --bg-panel-2: #efeefc;
  --border: #e4e4ea;
  --accent: #4f3ee6;
  --accent-dark: #3a2cc4;
  --text: #0b0b10;
  --text-muted: #5c5f6b;
  --text-faint: #a3a5b1;
  --on-accent: #ffffff;
  --success: #0e9f9a;
  --success-ink: #08716e;
  --warn: #b97800;
  --warn-ink: #845500;
  --error: #d1343f;
  --veil: rgba(11, 11, 16, 0.24);
  --shadow-sheet: 0 1px 2px rgba(11, 11, 16, 0.06);
  --shadow-lift: 0 1px 2px rgba(11, 11, 16, 0.06), 0 18px 32px -14px rgba(79, 62, 230, 0.38);

  --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;

  --text-xs: 0.75rem;
  --text-sm: 0.84375rem;
  --text-nav: 0.90625rem;
  --text-button: 0.96875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-h3: 1.5rem;
  --text-h2: clamp(1.75rem, 3.2vw, 3.5rem);
  --text-h1: clamp(2.125rem, 3.4vw, 3rem);
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-display: 800;
  --leading-body: 1.6;
  --leading-prose: 1.85;
  --leading-title: 1.15;
  --tracking-title: -0.02em;

  --radius-card: 6px;
  --radius-btn: 6px;
  --radius-board: 14px;
  --radius-mark: 9px;
  --radius-shot: 10px;
  --radius-pill: 999px;
  --radius-round: 50%;
  --radius-tab: 2px;

  --gutter: 32px;
  --content-width: 1200px;
  --header-width: 1280px;
  --reading-width: 800px;
  --header-height: 72px;
  --section-space: 144px;
  --line-h: 34px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 40px;
  --space-10: 48px;
  --space-11: 64px;
  --space-12: 80px;
  --motion-fast: 180ms;
  --motion-base: 250ms;
  --motion-reveal: 550ms;
  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);
  --layer-header: 50;
  --layer-fab: 30;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + var(--space-6)); }
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: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
svg { display: block; flex-shrink: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: var(--bg-panel-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--bg-panel-2); color: var(--text); }
h1, h2, h3, h4 {
  margin: 0 0 var(--space-6);
  font-family: var(--font-display);
  color: var(--text);
  line-height: var(--leading-title);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--text-h1); font-weight: var(--weight-display); letter-spacing: var(--tracking-title); }
h2 { font-size: var(--text-h2); font-weight: var(--weight-display); letter-spacing: var(--tracking-title); }
h3 { font-size: var(--text-h3); font-weight: var(--weight-bold); }
p { margin: 0 0 var(--space-5); }
ul, ol { margin-top: 0; padding-left: 1.4em; }
li + li { margin-top: var(--space-2); }
figure, blockquote { margin: 0; }
code, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; font-size: 0.9em; }
pre {
  max-width: 100%;
  min-width: 0;
  margin: var(--space-6) 0;
  padding: var(--space-6);
  overflow-x: auto;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  font-size: var(--text-sm);
  line-height: 1.9;
  tab-size: 2;
}
pre code { font-size: inherit; white-space: pre; overflow-wrap: normal; word-break: normal; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-9) 0; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading {
  width: 100%;
  max-width: calc(var(--reading-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap > *, .reading > *, .grid > *, .head-row > *, .footer-grid > * { min-width: 0; }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-4);
  z-index: calc(var(--layer-header) + 10);
  padding: var(--space-3) var(--space-4);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-btn);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.keep { white-space: nowrap; }
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }
.eyebrow { margin-bottom: var(--space-4); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-muted); }
.section { padding-top: var(--section-space); padding-bottom: var(--space-6); }
.section-head { max-width: 880px; margin-bottom: var(--space-10); }
.section-head p { color: var(--text-muted); max-width: 44em; }
.grid { display: grid; gap: var(--space-6); }
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack > * + * { margin-top: var(--space-6); }
.prose, .article-body { min-width: 0; line-height: var(--leading-prose); }
.prose h2, .article-body h2 { margin-top: var(--space-12); font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
.prose h3, .article-body h3 { margin-top: var(--space-9); }
.prose a:not(.btn):not(.appstore-button), .article-body a:not(.btn):not(.appstore-button) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.prose :not(pre) > code, .article-body :not(pre) > code {
  background: var(--bg-panel);
  color: var(--text);
  padding: 0.12em 0.3em;
  border-radius: var(--radius-tab);
}
.prose > :first-child, .article-body > :first-child { margin-top: 0; }
.card, .panel {
  min-width: 0;
  padding: var(--space-7);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.panel { background: var(--bg-panel); color: var(--text); border-radius: var(--radius-board); }
.panel-lilac { background: var(--bg-panel-2); color: var(--text); }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card-link { display: block; transition: border-color var(--motion-fast), transform var(--motion-base) var(--ease); }
.card-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: var(--space-3) 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-button);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  text-align: center;
  transition: background-color var(--motion-fast), border-color var(--motion-fast);
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--on-accent); border-color: var(--accent-dark); }
.btn-ghost:hover, .btn-ghost.is-hover { border-color: var(--text-muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
}
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 4px; }
.text-link { color: var(--accent); font-weight: var(--weight-semibold); text-underline-offset: 0.2em; }
.text-link:hover { text-decoration: underline; }
.section-close { display: flex; align-items: center; gap: var(--space-8); margin-top: var(--space-10); }
.section-close::before, .section-close::after { content: ""; height: 1px; background: var(--text); flex: 1; }
.section-close a { flex-shrink: 1; min-width: 0; min-height: 44px; display: inline-flex; align-items: center; gap: var(--space-3); overflow-wrap: anywhere; }

.site-head {
  position: relative;
  z-index: var(--layer-header);
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.head-row {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
}
.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-mark);
  background: var(--bg-panel-2);
  color: var(--text);
}
.tabs { min-width: 0; height: 100%; margin-left: auto; }
.tabs ul {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tabs li { height: 100%; margin: 0; }
.tabs a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: 14px;
  color: var(--text-muted);
  font-size: var(--text-nav);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  transition: color var(--motion-fast);
}
.tabs a:hover { color: var(--text); }
.tabs a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-tab) var(--radius-tab) 0 0;
  transform: scaleX(0);
  transition: transform var(--motion-base) var(--ease);
}
.tabs a:hover::after { transform: scaleX(0.4); }
.tabs a[aria-current="page"] { color: var(--text); font-weight: var(--weight-semibold); }
.tabs a[aria-current="page"]::after { transform: scaleX(1); }
.head-tools { display: flex; align-items: center; gap: var(--space-2); margin-left: 22px; flex-shrink: 0; }
.language-picker { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.lang svg { width: 15px; height: 15px; }
.lang-short { display: none; }
.lang-caret { font-size: var(--text-xs); color: var(--text-muted); }
.language-list {
  position: absolute;
  top: calc(100% + var(--space-3));
  right: 0;
  min-width: 180px;
  margin: 0;
  padding: var(--space-2);
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sheet);
  z-index: 5;
}
.language-list li { margin: 0; }
.language-list a { display: flex; align-items: center; min-height: 44px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-btn); }
.language-list a:hover, .language-list a[aria-current] { background: var(--bg-panel-2); color: var(--accent); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-drawer { display: none; }
.menu-veil {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 1;
  width: 100%;
  border: 0;
  background: var(--veil);
  color: var(--text);
}
.preview-mobile { display: none; }

.site-footer {
  margin-top: var(--section-space);
  padding-top: var(--space-11);
  padding-bottom: 112px;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: var(--space-10); }
.footer-brand p { max-width: 26em; margin-top: var(--space-5); color: var(--text-muted); font-size: var(--text-sm); }
.footer-title { font-size: var(--text-sm); font-weight: var(--weight-bold); margin-bottom: var(--space-4); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0; }
.footer-links a { display: inline-block; padding-top: var(--space-2); padding-bottom: var(--space-2); color: var(--text-muted); font-size: var(--text-sm); }
.footer-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; }
.footer-languages, .footer-legal { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer-languages { margin-top: var(--space-9); }
.footer-languages a { min-height: 44px; display: inline-flex; align-items: center; font-size: var(--text-sm); color: var(--text-muted); }
.footer-languages a[aria-current] { color: var(--accent); }
.footer-bottom { margin-top: var(--space-7); padding-top: var(--space-6); border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--text-xs); }
.footer-legal { margin-top: var(--space-3); }
.footer-legal a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-legal a:hover { color: var(--accent); }

.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(16px); }
html.reveal-ready .reveal { transition: opacity var(--motion-reveal) var(--ease), transform var(--motion-reveal) var(--ease); }
html.reveal-ready .reveal.shown { opacity: 1; transform: none; }
.hero, .decoration-zone { overflow-x: clip; }
.background-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

@media (max-width: 1199px) {
  .tabs { display: none; }
  .head-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]) {
    position: absolute;
    display: block;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 3;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--space-4) var(--gutter) var(--space-6);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
  }
  .mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
  .mobile-drawer li { margin: 0; }
  .mobile-drawer a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-btn);
    font-size: var(--text-base);
  }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--bg-panel-2); color: var(--accent); }
  .drawer-label { margin: var(--space-5) var(--space-4) var(--space-2); color: var(--text-muted); font-size: var(--text-xs); }
  .preview-mobile { display: block; }
  .preview-mobile summary { list-style: none; }
  .preview-mobile summary::-webkit-details-marker { display: none; }
  .preview-mobile[open] .mobile-drawer { display: block; }
}

@media (max-width: 768px) {
  :root { --text-h1: clamp(1.5rem, 4vw, 1.875rem); --text-h2: clamp(1.75rem, 5vw, 2.25rem); --section-space: 88px; }
  .grid-three { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .section-close { gap: var(--space-4); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid-two, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-brand { grid-column: auto; }
  .brand { gap: var(--space-2); font-size: var(--text-sm); }
  .head-tools { gap: var(--space-2); margin-left: auto; }
  .lang { min-height: 44px; padding-inline: 10px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang > svg { display: none; }
  .card, .panel { padding: var(--space-5); }
  .tilt, [data-tilt] { transform: none !important; }
  pre { padding: var(--space-4); }
  .footer-grid { gap: var(--space-8); }
}
@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; }
  .card-link:hover { transform: none; }
}