:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-panel: #f6f7f9;
  --bg-panel-2: #2e3035;
  --border: #e4e6eb;
  --border-strong: #d5d8de;
  --accent: #1f5fe0;
  --accent-dark: #1748b3;
  --on-accent: #ffffff;
  --text: #26282d;
  --text-muted: #6a6f78;
  --text-faint: #a4a9b1;
  --success: #2f9e62;
  --warn: #e8b33a;
  --error: #d9485f;
  --violet: #8a63d2;
  --tint-blue: #e4ecfb;
  --tint-pink: #fae9ec;
  --tint-yellow: #fcf6e7;
  --tint-violet: #f1ecfa;
  --tint-green: #e6f3ec;
  --ink-pink: #b8324a;
  --ink-yellow: #8a6516;
  --ink-violet: #6c47b5;
  --ink-green: #237447;
  --ring-blue: rgba(31, 95, 224, 0.26);
  --ring-pink: rgba(217, 72, 95, 0.28);
  --ring-yellow: rgba(232, 179, 58, 0.42);
  --ring-violet: rgba(138, 99, 210, 0.28);
  --graphite: #1f2023;
  --graphite-edge: #36383d;
  --graphite-highlight: rgba(255, 255, 255, 0.07);
  --screen-edge: #0c0d0f;
  --camera: #2c2e33;
  --camera-ring: #17181b;
  --veil: rgba(38, 40, 45, 0.28);
  --footer-muted: #c4c8d0;
  --footer-border: #53565e;
  --clear: transparent;

  --font-display: Georgia, 'Times New Roman', 'Songti SC', 'STSong', 'Noto Serif SC', 'Source Han Serif SC', 'Noto Sans SC', 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-2xs: 11px;
  --text-xs: 12px;
  --text-chip: 12.5px;
  --text-sm: 13px;
  --text-tool: 13.5px;
  --text-nav: 14.5px;
  --text-small: 14px;
  --text-fact: 15.5px;
  --text-code: 15px;
  --text-base: 16px;
  --text-lead: 20px;
  --text-card-title: 24px;
  --text-h3: 26px;
  --text-h2: clamp(26px, 2.5vw, 36px);
  --text-h1: clamp(34px, 2.6vw + 10px, 48px);
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-brand: 650;
  --weight-bold: 700;
  --leading-body: 1.6;
  --leading-title: 1.16;
  --tracking-title: -0.012em;
  --tracking-small: -0.005em;

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 28px;
  --r-pill: 999px;
  --r-bezel: 36px;
  --r-bezel-mobile: 22px;
  --r-screen: 14px;
  --r-shot: 10px;
  --r-cursor: 1px;
  --shadow-sm: 0 1px 2px rgba(38, 40, 45, 0.08), 0 6px 14px -8px rgba(38, 40, 45, 0.18);
  --shadow-lg: 0 1px 2px rgba(38, 40, 45, 0.08), 0 24px 48px -24px rgba(38, 40, 45, 0.28);
  --shadow-device: 0 1px 2px rgba(38, 40, 45, 0.14), 0 24px 48px -24px rgba(38, 40, 45, 0.42);
  --shadow-accent: 0 1px 2px rgba(31, 95, 224, 0.28), 0 10px 22px -12px rgba(31, 95, 224, 0.6);

  --container: 1240px;
  --header-container: 1280px;
  --reading-width: 780px;
  --gutter: 32px;
  --section-space: 104px;
  --header-height: 68px;
  --code-col: 420px;
  --row-h: 30px;
  --ease-ui: cubic-bezier(.2, .7, .2, 1);
  --duration-ui: 150ms;
  --duration-reveal: 550ms;
  --layer-header: 50;
  --layer-fab: 30;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-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(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; vertical-align: middle; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--ring-blue); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
::selection { background: var(--tint-blue); color: var(--text); }
h1, h2, h3, h4 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-title);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1, h2 { font-family: var(--font-display); letter-spacing: var(--tracking-title); }
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); margin: 0 0 24px; }
h3 { font-size: var(--text-h3); margin: 0 0 16px; }
p { margin: 0 0 20px; }
ul, ol { padding-inline-start: 1.5em; }
li + li { margin-top: .3em; }
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: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-panel);
  color: var(--text);
  font-size: var(--text-small);
  line-height: 1.8;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}
pre code { font-size: inherit; white-space: pre; overflow-wrap: normal; }
:where(main, section, article, aside, nav, div, figure) { min-width: 0; }
:where(.grid, .split, .card-grid, .feature-detail, .footer-grid) > * { min-width: 0; }
.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: absolute;
  top: 8px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--on-accent);
}
.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.wrap {
  width: 100%;
  max-width: calc(var(--container) + 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); }
.section-tight { padding-top: 64px; padding-bottom: 64px; }
.section-intro { max-width: 680px; margin-bottom: 40px; }
.section-intro p, .muted { color: var(--text-muted); }
.panel-band { background: var(--bg-panel); color: var(--text); }
.center { text-align: center; }
.keep { white-space: nowrap; }
.lead-copy { font-size: var(--text-lead); color: var(--text-muted); }
.card-grid, .split { display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card, .panel {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--text);
}
.card { box-shadow: var(--shadow-sm); }
.card h3 { font-family: var(--font-display); font-size: var(--text-card-title); }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.prose { overflow-wrap: break-word; }
.prose :where(h2, h3) { scroll-margin-top: 32px; }
.prose h2 { margin-top: 64px; }
.prose h3 { margin-top: 36px; }
.prose p, .prose li { line-height: 1.9; }
.prose :where(ul, ol) { margin-bottom: 28px; }
.prose figure { max-width: 100%; }
.prose a { text-decoration: underline; text-underline-offset: .2em; }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  max-width: 100%;
  padding: 12px 26px;
  border: 1px solid var(--clear);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  letter-spacing: var(--tracking-small);
  text-align: center;
  transition: background-color var(--duration-ui) var(--ease-ui), box-shadow var(--duration-ui) var(--ease-ui);
}
.btn:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-primary:active { box-shadow: var(--shadow-sm); }
.btn-ghost { background: var(--bg-panel); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
}
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.masthead {
  position: relative;
  z-index: var(--layer-header);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.header-shell {
  width: 100%;
  max-width: min(100%, calc(var(--header-container) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.masthead-row {
  position: relative;
  z-index: 2;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 26px;
  background: var(--bg);
  color: var(--text);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-pill); }
.brand-placeholder {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.brand-name { font-size: var(--text-fact); font-weight: var(--weight-brand); letter-spacing: var(--tracking-small); white-space: nowrap; }
.brand-name span { color: var(--text-muted); font-weight: var(--weight-medium); }
.primary-nav { flex: 1; min-width: 0; }
.primary-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav li { margin: 0; }
.primary-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-size: var(--text-nav);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  transition: color var(--duration-ui) var(--ease-ui), background-color var(--duration-ui) var(--ease-ui);
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-panel);
  text-decoration: none;
}
.primary-nav a[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--border); }
.primary-nav svg, .header-tools svg, .mobile-drawer svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.language-picker { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-tool);
  font-weight: var(--weight-medium);
  line-height: 1;
  white-space: nowrap;
}
.lang:hover { background: var(--bg-panel); color: var(--text); }
.lang-short { display: none; }
.lang-caret { font-size: var(--text-2xs); color: var(--text-muted); }
.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 6;
  width: 196px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.language-menu li { margin: 0; }
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text); }
.language-menu a:hover, .language-menu a[aria-current] { background: var(--bg-panel); color: var(--text); text-decoration: none; }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  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: 4;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px var(--gutter) 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.mobile-drawer ul { margin: 0; padding: 0; list-style: none; }
.mobile-drawer li { margin: 0; }
.mobile-drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  border-radius: var(--r-sm);
}
.mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--bg-panel); color: var(--text); text-decoration: none; }
.drawer-label { margin: 20px 14px 8px; font-size: var(--text-sm); color: var(--text-muted); }
.nav-veil {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 1;
  border: 0;
  padding: 0;
  background: var(--veil);
  color: var(--text);
}

.hero { text-align: center; padding-top: 48px; overflow-x: clip; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  max-width: 100%;
  padding: 3px 13px 3px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.eyebrow-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: var(--r-pill);
  background: var(--success);
  box-shadow: 0 0 0 3px var(--tint-green);
}
.eyebrow b { color: var(--text); font-weight: var(--weight-semibold); }
.hero-title {
  margin: 20px auto 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-h1);
  line-height: 1.08;
  letter-spacing: var(--tracking-title);
  color: var(--text);
}
.hero-title > span { display: block; }
.cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-fact { max-width: 640px; margin: 18px auto 0; color: var(--text-muted); font-size: var(--text-fact); }
.hero-fact strong { color: var(--text); font-weight: var(--weight-semibold); }
.device-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: var(--text-tool);
  font-weight: var(--weight-medium);
}
.device-row li { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.device-row a { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); min-height: 30px; }
.device-row svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.device-row svg .fill { fill: currentColor; stroke: none; }
.device-row .divider { width: 1px; height: 16px; background: var(--border-strong); flex-shrink: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  max-width: 100%;
  padding: 3px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-chip);
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}

.site-footer { padding-top: 64px; padding-bottom: 28px; background: var(--bg-panel-2); color: var(--on-accent); }
.footer-grid { display: grid; grid-template-columns: 1.35fr .8fr 1.2fr .7fr; gap: 44px; }
.site-footer .brand, .site-footer a { color: var(--on-accent); }
.site-footer .brand-name span, .site-footer p { color: var(--footer-muted); }
.footer-brand p { margin-top: 20px; font-size: var(--text-small); max-width: 310px; line-height: 1.8; }
.site-footer h2 { font-family: var(--font-body); font-size: var(--text-small); letter-spacing: normal; margin-bottom: 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-block; padding-top: 5px; padding-bottom: 5px; font-size: var(--text-small); }
.site-footer a:hover { text-decoration: underline; text-underline-offset: .2em; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--footer-border); color: var(--footer-muted); font-size: var(--text-sm); }
.footer-bottom p { margin: 0; }
.footer-bottom a { margin-left: auto; }
.reveal { opacity: 1; }
.reveal.is-waiting:not(.shown) { opacity: 0; transform: translateY(14px); }
.reveal.is-waiting { transition: opacity var(--duration-reveal) var(--ease-ui), transform var(--duration-reveal) var(--ease-ui); }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1279px) {
  .primary-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-tools { margin-left: auto; }
  .preview-header .masthead-row { flex-wrap: wrap; gap: 10px 18px; padding-top: 12px; }
  .preview-header .primary-nav { display: block; flex: 1 0 100%; order: 3; overflow-x: auto; padding-bottom: 10px; }
  .preview-header .primary-nav ul { justify-content: flex-start; }
}
@media (max-width: 1180px) {
  :root { --code-col: 380px; }
}
@media (max-width: 1040px) {
  :root { --code-col: 340px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  :root { --gutter: 18px; --section-space: 72px; }
  .hero { padding-top: 32px; }
  .hero-title { font-size: clamp(24px, 6.4vw, 30px); line-height: 1.12; }
  .cta-row { flex-direction: column; align-items: stretch; max-width: 320px; margin-inline: auto; }
  .hero-fact { font-size: var(--text-nav); }
  .card-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 24px; }
}
@media (max-width: 640px) {
  :root { --text-h1: clamp(24px, 6.4vw, 30px); --text-h2: 26px; --text-h3: 22px; }
  .masthead-row { gap: 12px; }
  .header-tools { gap: 7px; margin-left: auto; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang { min-height: 44px; padding-inline: 10px; }
  .lang > svg { display: none; }
  .brand-name { font-size: var(--text-small); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-bottom { flex-direction: column; }
  .footer-bottom a { margin-left: 0; }
  .tilt, [data-tilt] { transform: none !important; }
  pre { padding: 16px; }
}
@media (max-width: 400px) {
  .masthead .brand-name span { display: none; }
  .device-row { gap: 8px 14px; }
  .device-row .divider { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.is-waiting:not(.shown) { opacity: 1; transform: none; }
}