:root {
  color-scheme: dark;
  --bg: #1e1d23;
  --bg-panel: #27262d;
  --bg-panel-2: #151419;
  --border: #34333b;
  --accent: #3a6df0;
  --accent-dark: #1f4fc9;
  --text: #f2f1f5;
  --text-muted: #a3a2ab;
  --success: #3fb37f;
  --warn: #cdb98c;
  --error: #e5534b;
  --basin-deep: #1c3a8a;
  --basin-light: #8fb4ff;
  --glow: rgba(143, 180, 255, 0.34);
  --white: #ffffff;
  --nav-bg: #ffffff;
  --nav-ink: #1e1d23;
  --nav-ink-muted: #55545d;
  --nav-line: #e7e7ec;
  --nav-hover: #f3f3f6;
  --notice-ink: #1e1d23;
  --on-basin: rgba(242, 241, 245, 0.8);
  --on-basin-line: rgba(242, 241, 245, 0.26);
  --on-basin-hover: rgba(242, 241, 245, 0.1);
  --screen: #f7f7fa;
  --screen-ink: #34333b;
  --screen-muted: #696773;
  --screen-rule: #e6e6ec;
  --camera: #2c2b33;
  --camera-lens: #3d4a6b;
  --rim: rgba(255, 255, 255, 0.14);
  --rim-top: rgba(255, 255, 255, 0.26);
  --veil: rgba(21, 20, 25, 0.68);
  --clear: transparent;

  --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;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 600;
  --text-xs: 12.5px;
  --text-sm: 13px;
  --text-notice: 13.5px;
  --text-label: 14px;
  --text-nav: 15px;
  --text-base: 16px;
  --text-lede: 17px;
  --text-brand: 18px;
  --text-card: 20px;
  --text-h3: 24px;
  --text-h2: clamp(26px, 2.4vw, 34px);
  --text-h1: clamp(34px, 3.4vw, 48px);
  --text-hero: clamp(30px, 3.4vw, 48px);
  --text-mobile-h1: clamp(24px, 6.6vw, 30px);
  --leading-body: 1.6;
  --leading-heading: 1.25;
  --leading-display: 1.15;
  --tracking-title: -0.02em;
  --tracking-brand: -0.015em;
  --tracking-label: 0.005em;
  --tracking-eyebrow: 0.08em;

  --r-pill: 999px;
  --r-card: 28px;
  --r-feature: 32px;
  --r-basin: 48px;
  --r-ipad: 36px;
  --r-screen: 20px;
  --r-menu: 18px;
  --r-small: 12px;
  --r-mark: 8px;
  --r-focus: 6px;
  --r-shot: 10px;
  --r-circle: 50%;
  --r-mobile-basin: 32px;
  --r-mobile-ipad: 26px;
  --r-mobile-screen: 16px;

  --gutter: 40px;
  --content-width: 1200px;
  --head-width: 1280px;
  --reading-width: 800px;
  --section-space: 160px;
  --notice-h: 34px;
  --bar-h: 64px;
  --touch: 44px;
  --button-h: 50px;
  --stroke: 1px;
  --stroke-strong: 1.5px;
  --focus-width: 2px;
  --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-10: 40px;
  --space-12: 48px;
  --motion-reveal: 600ms;
  --ease-reveal: cubic-bezier(0.2, 0.65, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-8);
}
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; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary { -webkit-tap-highlight-color: var(--clear); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img, svg { vertical-align: middle; }
img { max-width: 100%; }
svg { flex-shrink: 0; }
p, h1, h2, h3, h4, figure, blockquote, pre, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--text-h1); line-height: var(--leading-display); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
strong { font-weight: var(--weight-bold); }
code, kbd, samp, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: var(--space-6);
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-small);
  background: var(--bg-panel-2);
  color: var(--text);
  font-size: var(--text-label);
  overscroll-behavior-x: contain;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
:focus-visible {
  outline: var(--focus-width) solid var(--basin-light);
  outline-offset: 3px;
  border-radius: var(--r-focus);
}
.bar :focus-visible, .notice :focus-visible {
  outline-color: var(--accent-dark);
}
::selection { background: var(--basin-light); color: var(--bg-panel-2); }

.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.head-wrap {
  width: 100%;
  max-width: min(100%, calc(var(--head-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);
}
.section + .section { padding-top: 0; }
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
.section__head > *, .grid > *, .footer-grid > *, .tabs > * { min-width: 0; }
.section__head p { max-width: 560px; margin-top: var(--space-3); color: var(--text-muted); }
.eyebrow { font-size: var(--text-sm); letter-spacing: var(--tracking-eyebrow); color: var(--warn); }
.eyebrow + h2 { margin-top: var(--space-3); }
.muted { color: var(--text-muted); }
.text-link { color: var(--basin-light); text-underline-offset: 4px; }
.text-link:hover { text-decoration: underline; }
.nowrap { white-space: nowrap; }
.grid { display: grid; gap: var(--space-5); }
.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); }

.skip {
  position: absolute;
  left: var(--space-4);
  top: -80px;
  z-index: 100;
  padding: 10px var(--space-4);
  background: var(--white);
  color: var(--accent-dark);
  border-radius: var(--r-pill);
  font-size: var(--text-label);
}
.skip:focus { top: var(--space-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--button-h);
  min-width: 196px;
  max-width: 100%;
  padding: 10px var(--space-7);
  border: var(--stroke-strong) solid var(--clear);
  border-radius: var(--r-pill);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  letter-spacing: var(--tracking-label);
  text-align: center;
}
.btn svg { width: 17px; height: 17px; }
.btn--solid { background: var(--white); color: var(--accent-dark); border-color: var(--white); }
.btn--solid:hover, .btn--solid.is-hover { background: var(--screen); color: var(--accent-dark); }
.btn--line { background: var(--clear); color: var(--text); border-color: var(--white); }
.btn--line:hover, .btn--line.is-hover { background: var(--on-basin-hover); color: var(--text); }
.btn--blue { background: var(--accent-dark); color: var(--white); border-color: var(--accent-dark); }
.btn--blue:hover, .btn--blue.is-hover { background: var(--basin-deep); color: var(--white); border-color: var(--basin-deep); }
.btn:active { border-color: var(--basin-light); }
.btn.is-focus { outline: var(--focus-width) solid var(--basin-light); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel);
  color: var(--text-muted);
  border-color: var(--border);
}

.site-head, #site-header { position: relative; z-index: 60; }
.notice {
  position: relative;
  z-index: 2;
  background: var(--warn);
  color: var(--notice-ink);
  font-size: var(--text-notice);
  letter-spacing: var(--tracking-label);
}
.notice__in {
  min-height: var(--notice-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.notice__text { min-width: 0; padding-block: 5px; }
.notice__text svg { width: 13px; height: 13px; margin-right: var(--space-2); }
.notice__dot { margin-inline: 7px; opacity: 0.55; }
.notice__link { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-weight: var(--weight-medium); }
.notice__link svg { width: 14px; height: 14px; }
.notice__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.bar {
  position: relative;
  z-index: 2;
  background: var(--nav-bg);
  color: var(--nav-ink);
  border-bottom: var(--stroke) solid var(--nav-line);
  color-scheme: light;
}
.bar__in {
  position: relative;
  min-height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-3); flex-shrink: 0; margin-right: auto; }
.brand__mark { display: block; width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-mark); }
.brand__placeholder { background: var(--nav-hover); color: var(--nav-ink); border: var(--stroke) solid var(--nav-line); }
.brand__name {
  font-family: var(--font-display);
  font-size: var(--text-brand);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-brand);
}
.desktop-nav { min-width: 0; }
.menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; min-width: 0; }
.menu__link, .menu__more summary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding-inline: 14px;
  border-radius: var(--r-pill);
  font-size: var(--text-nav);
  color: var(--nav-ink-muted);
  white-space: nowrap;
  cursor: pointer;
}
.menu__link:hover, .menu__more summary:hover { background: var(--nav-hover); color: var(--nav-ink); }
.menu__link[aria-current="page"], .menu__more summary.is-current { color: var(--nav-ink); }
.menu__link[aria-current="page"]::after, .menu__more summary.is-current::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--r-pill);
}
.menu__more summary, .language summary { list-style: none; }
.menu__more summary::-webkit-details-marker, .language summary::-webkit-details-marker { display: none; }
.menu__more summary svg { width: 12px; height: 12px; }
.menu__more[open] summary { background: var(--nav-hover); color: var(--nav-ink); }
.menu__more[open] summary svg { transform: rotate(180deg); }
.drop, .language__list {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 30;
  width: 280px;
  max-width: calc(100vw - var(--gutter) * 2);
  padding: var(--space-2);
  background: var(--nav-bg);
  color: var(--nav-ink);
  border: var(--stroke) solid var(--nav-line);
  border-radius: var(--r-menu);
}
.drop a, .language__list a {
  display: block;
  min-height: var(--touch);
  padding: var(--space-3) 14px;
  border-radius: var(--r-small);
  font-size: var(--text-nav);
}
.drop a:hover, .language__list a:hover, .language__list a[aria-current="true"] {
  background: var(--nav-hover);
  color: var(--nav-ink);
}
.drop a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.drop small { display: block; margin-top: 2px; font-size: var(--text-sm); line-height: 1.5; color: var(--nav-ink-muted); }
.head-tools { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.language { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: var(--stroke) solid var(--nav-line);
  border-radius: var(--r-pill);
  background: var(--nav-bg);
  color: var(--nav-ink);
  font-size: var(--text-label);
  white-space: nowrap;
  cursor: pointer;
}
.lang:hover { background: var(--nav-hover); color: var(--nav-ink); }
.lang__short { display: none; }
.language__list { width: 190px; }
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: var(--space-2);
  background: var(--nav-bg);
  color: var(--nav-ink);
  border: var(--stroke) solid var(--nav-line);
  border-radius: var(--r-small);
}
.hamburger svg { width: 22px; height: 22px; }
.mobile-nav { display: none; }
.nav-veil { position: fixed; inset: 0; z-index: 1; border: 0; background: var(--veil); color: var(--text); }
.preview-mobile { display: none; }

.card, .panel {
  min-width: 0;
  padding: var(--space-8);
  background: var(--bg-panel);
  color: var(--text);
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-card);
}
.panel--deep { background: var(--bg-panel-2); color: var(--text); }
.card h3 { font-size: var(--text-card); font-weight: var(--weight-medium); }
.card p { margin-top: 10px; color: var(--text-muted); }
.card__step { display: block; margin-bottom: 18px; font: var(--text-xs)/1.6 var(--font-mono); color: var(--text-muted); }

.prose { min-width: 0; }
.prose > * + * { margin-top: var(--space-6); }
.prose h2 { margin-top: 64px; }
.prose h3 { margin-top: var(--space-10); }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); }
.prose a { color: var(--basin-light); text-decoration: underline; text-underline-offset: 4px; }
.prose ul { list-style: disc; padding-left: var(--space-6); }
.prose ol { list-style: decimal; padding-left: var(--space-6); }
.prose li + li { margin-top: var(--space-2); }
.prose code { font-size: 0.9em; color: var(--text); }
.prose section, .prose div { min-width: 0; max-width: 100%; }

.site-foot {
  padding-top: 80px;
  padding-bottom: var(--space-10);
  border-top: var(--stroke) solid var(--border);
  background: var(--bg-panel-2);
  color: var(--text);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1.2fr 0.7fr; gap: var(--space-10); }
.footer-brand .brand { margin-bottom: var(--space-5); }
.footer-brand p { max-width: 330px; color: var(--text-muted); font-size: var(--text-label); }
.footer-title { margin-bottom: var(--space-4); font-size: var(--text-label); font-weight: var(--weight-medium); }
.footer-links li + li { margin-top: var(--space-2); }
.footer-links a { display: inline-block; padding-block: 3px; color: var(--text-muted); font-size: var(--text-label); overflow-wrap: break-word; }
.footer-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer-links a[aria-current="true"] { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
  margin-top: 64px;
  padding-top: var(--space-6);
  border-top: var(--stroke) solid var(--border);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.footer-legal a:hover { color: var(--text); text-decoration: underline; }

.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--motion-reveal) var(--ease-reveal), transform var(--motion-reveal) var(--ease-reveal);
}
html.reveal-ready .reveal.shown { opacity: 1; transform: none; }
.decorated-section { position: relative; overflow-x: clip; }
.decorative-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .head-tools { margin-left: auto; }
  .hamburger { display: inline-flex; }
  .bar__in { gap: var(--space-3); }
  .mobile-nav:not([hidden]) {
    display: block;
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    z-index: 40;
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--space-3);
    border: var(--stroke) solid var(--nav-line);
    border-radius: 0 0 var(--r-menu) var(--r-menu);
    background: var(--nav-bg);
    color: var(--nav-ink);
  }
  .mobile-nav a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: var(--touch);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--r-small);
    font-size: var(--text-base);
  }
  .mobile-nav a:hover, .mobile-nav a[aria-current="page"], .mobile-nav a[aria-current="true"] {
    background: var(--nav-hover);
    color: var(--nav-ink);
  }
  .mobile-nav__languages { margin-top: var(--space-3); padding-top: var(--space-3); border-top: var(--stroke) solid var(--nav-line); }
  .mobile-nav__label { padding-inline: var(--space-4); font-size: var(--text-sm); color: var(--nav-ink-muted); }
  .preview-mobile { display: block; position: relative; }
  .preview-mobile > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch);
    min-height: var(--touch);
    list-style: none;
    cursor: pointer;
  }
  .preview-mobile > summary::-webkit-details-marker { display: none; }
  .preview-mobile .drop { width: 260px; }
  .notice__link { display: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --gutter: 16px; }
}
@media (max-width: 768px) {
  :root { --text-h1: var(--text-mobile-h1); }
  .section__head { align-items: flex-start; flex-direction: column; gap: var(--space-6); }
  .grid--three { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .notice { font-size: var(--text-xs); }
  .notice__text { line-height: 1.6; }
  .notice__in { min-height: var(--notice-h); }
  .bar__in { gap: var(--space-2); }
  .brand { gap: var(--space-2); max-width: 170px; }
  .brand__name { font-size: var(--text-label); }
  .lang { min-height: var(--touch); padding-inline: var(--space-3); }
  .lang__full { display: none; }
  .lang__short { display: inline; }
  .head-tools { margin-left: auto; gap: var(--space-1); }
  .grid--two { grid-template-columns: 1fr; }
  .card, .panel { padding: var(--space-6); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { margin-top: var(--space-10); }
  .tilt, [data-tilt] { transform: none !important; }
  pre { padding: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}