:root {
  --bg: #ffffff;
  --bg-panel: #f3f4f7;
  --bg-panel-2: #eceefe;
  --border: #e3e5ec;
  --accent: #5058ee;
  --accent-dark: #3a40c9;
  --text: #1b1c22;
  --text-muted: #5c606e;
  --success: #2fc794;
  --warn: #d98a1c;
  --error: #d6404a;

  --bg-tint: color-mix(in srgb, var(--accent) 6%, var(--bg));
  --bg-ink: #202147;
  --ink-text: #ffffff;
  --ink-muted: #d3d6ec;
  --ink-link: #c9ccfb;
  --blob-deep: #b9bdfa;
  --accent-soft: #c9ccfb;
  --stand: #e8e9ef;
  --wood-top: #f3e2c6;
  --wood: #e8cfa8;
  --wood-side: #d5b488;
  --wood-hole: #b8946a;

  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', '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, 'SF Mono', Menlo, Consolas, monospace;
  --r-card: 8px;
  --r-btn: 6px;
  --r-pill: 999px;
  --r-shot: 8px;
  --r-mark: 9px;
  --shadow-flat: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent);
  --shadow-float: 0 34px 64px -24px color-mix(in srgb, var(--accent-dark) 30%, transparent), 0 12px 24px -14px color-mix(in srgb, var(--text) 18%, transparent);
  --shadow-btn: 0 12px 26px -10px color-mix(in srgb, var(--accent) 60%, transparent), 0 2px 4px color-mix(in srgb, var(--accent-dark) 24%, transparent);
  --shadow-btn-hover: 0 16px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent);
  --shadow-highlight: inset 0 1px 0 color-mix(in srgb, var(--bg) 26%, transparent);
  --shadow-tint: 0 18px 34px -22px color-mix(in srgb, var(--accent-dark) 40%, transparent);
  --veil: color-mix(in srgb, var(--text) 38%, transparent);

  --header-h: 72px;
  --wrap: 1120px;
  --wide: 1280px;
  --reading: 760px;
  --gutter: 24px;
  --gap: 16px;
  --section-pad: 72px;
  --title-size: clamp(34px, 3.3vw, 48px);
  --title-small: clamp(24px, 7vw, 30px);
  --fab-size: 52px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
:where(main, article, section, aside, nav, .wrap, .grid > *, .prose > *) { min-width: 0; }
:where(img, svg) { max-width: 100%; }
:where(img) { height: auto; }
:where(button, input, select, textarea) { font: inherit; }
button { cursor: pointer; }
:where(button:disabled) { cursor: not-allowed; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:where(section, article, h2, h3, [role="tabpanel"])[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.wrap, .wrap-wide, .reading, .topbar__in {
  margin-inline: auto;
  padding-inline: var(--gutter);
  width: 100%;
}
.wrap { max-width: calc(var(--wrap) + var(--gutter) * 2); }
.wrap-wide { max-width: calc(var(--wide) + var(--gutter) * 2); }
.reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.skip { position: fixed; top: 12px; left: var(--gutter); z-index: 70; transform: translateY(-160%); }
.skip:focus {
  transform: none;
  background: var(--bg);
  color: var(--accent-dark);
  padding: 8px 14px;
  border-radius: var(--r-btn);
  box-shadow: var(--shadow-flat);
}
h1, h2, h3 {
  margin: 0 0 .55em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--title-size); }
h2 { font-size: clamp(24px, 2.6vw, 36px); }
h3 { font-size: clamp(18px, 2vw, 23px); }
p { margin: 0 0 1em; }
.nowrap { white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); font-weight: 700; letter-spacing: -.01em; }
.prose { overflow-wrap: break-word; line-height: 1.8; }
.prose :where(ul, ol) { padding-inline-start: 1.5em; }
.prose a:not(.btn, .store-btn, .dl-fab) { text-decoration: underline; text-underline-offset: .18em; }
code, kbd, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
:not(pre) > code {
  padding: .1em .3em;
  border-radius: var(--r-btn);
  background: var(--bg-panel);
  color: var(--text);
}
pre {
  max-width: 100%;
  min-width: 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
}
pre code { white-space: pre; overflow-wrap: normal; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  max-width: 100%;
  padding: 8px 22px;
  border: 0;
  border-radius: var(--r-btn);
  font: 700 16px/1.2 var(--font-body);
  text-align: center;
  overflow-wrap: break-word;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { text-decoration: none; }
.btn--primary {
  color: var(--bg);
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  box-shadow: var(--shadow-btn), var(--shadow-highlight);
}
.btn--primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-btn-hover), var(--shadow-highlight); }
.btn--primary:active:not(:disabled) { transform: none; background: var(--accent-dark); color: var(--bg); }
.btn--ghost {
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border: 1px solid var(--border);
}
.btn--ghost:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); color: var(--accent-dark); }
.btn:disabled { box-shadow: none; background: var(--bg-panel); color: var(--text-muted); border: 1px solid var(--border); }

.topbar {
  position: relative;
  z-index: 20;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.topbar__in {
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand__mark {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--r-mark);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-flat);
}
.brand__name { font: 800 18px/1.35 var(--font-display); letter-spacing: -.02em; }
.brand__name span { font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.mainnav { flex: 1; min-width: 0; }
.mainnav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mainnav__list a {
  display: block;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease;
}
.mainnav__list a:hover { color: var(--text); background: var(--bg-panel); text-decoration: none; }
.mainnav__list a[aria-current="page"] { background: var(--bg-panel-2); color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto; }
.lang-box { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 4px 8px 22px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: 600 14px/1 var(--font-body);
  letter-spacing: .02em;
  white-space: nowrap;
  list-style: none;
  cursor: pointer;
}
.lang::-webkit-details-marker { display: none; }
.lang svg { width: 16px; height: 16px; flex-shrink: 0; }
.lang:hover { color: var(--text); }
.lang-short, .nav-toggle, .nav-drawer, .nav-veil { display: none; }
.lang-list {
  position: absolute;
  z-index: 3;
  top: calc(100% + 4px);
  right: 0;
  min-width: 156px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-flat);
}
.lang-list a, .nav-drawer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  padding: 8px 12px;
  color: var(--text-muted);
}
.lang-list a:hover, .nav-drawer a:hover,
.lang-list a[aria-current], .nav-drawer a[aria-current] {
  background: var(--bg-panel-2);
  color: var(--accent-dark);
  text-decoration: none;
}
.nav-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-foot {
  background: var(--bg-panel);
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 48px;
  padding-bottom: 24px;
}
.foot-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .75fr) minmax(0, 1fr); gap: 28px; }
.foot-layout > * { min-width: 0; }
.foot-layout h2 { font-size: 16px; margin-bottom: 12px; }
.foot-intro { margin-top: 14px; max-width: 28em; color: var(--text-muted); }
.foot-list, .foot-line { margin: 0; padding: 0; list-style: none; }
.foot-list { display: grid; gap: 6px; }
.foot-line { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-base {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}
.foot-base p { margin: 0; }

.sec { padding-top: var(--section-pad); padding-bottom: var(--section-pad); background: var(--bg); color: var(--text); }
.sec--panel { background: var(--bg-panel); color: var(--text); }
.sec--tint { background: var(--bg-tint); color: var(--text); }
.sec--ink { background: var(--bg-ink); color: var(--ink-text); }
.sec--ink :where(.eyebrow, .muted) { color: var(--ink-muted); }
.sec--ink a:not(.btn, .store-btn) { color: var(--ink-link); text-decoration: underline; }
.sec--ink :focus-visible { outline-color: var(--ink-link); }
.sec-head { margin-bottom: 28px; }
.sec-head::before { content: ""; display: block; width: 24px; height: 4px; margin-bottom: 14px; background: var(--success); color: var(--text); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: var(--r-pill);
  background: var(--success);
  color: var(--text);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 18%, transparent);
}
.dot--sm { width: 6px; height: 6px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent); }
.card, .panel {
  min-width: 0;
  padding: clamp(16px, 3vw, 26px);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow-wrap: anywhere;
}
.panel { background: var(--bg-panel); color: var(--text); }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.ambient { position: relative; isolation: isolate; overflow-x: clip; }
.ambient__art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.reveal { opacity: 1; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(10px); }
.reveal { transition: opacity .44s ease, transform .44s ease; }

@media (max-width: 1320px) {
  .topbar__in { gap: 24px; }
  .mainnav__list a { padding-inline: 11px; }
}
@media (max-width: 1280px) {
  html:not([lang="zh-CN"], [lang="zh-TW"]) .topbar__in { gap: 12px; }
  html:not([lang="zh-CN"], [lang="zh-TW"]) .mainnav__list a { padding-inline: 8px; font-size: 14px; }
}
@media (max-width: 960px), (max-width: 1280px) and (min-width: 961px) {
  @media (min-width: 961px) {
    html:not([lang="zh-CN"], [lang="zh-TW"]) .topbar:has(.nav-toggle) { --drawer-mode: 1; }
  }
  @media (max-width: 960px) {
    .topbar:has(.nav-toggle) { --drawer-mode: 1; }
  }
}
/* The same layout applies at the runtime breakpoint for the current language. */
.topbar.is-mobile {
  position: sticky;
  top: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: var(--bg);
  color: var(--text);
}
.is-mobile .topbar__in { gap: 8px; }
.is-mobile .mainnav { display: none; }
.is-mobile .header-tools { margin-inline-start: auto; }
.is-mobile .nav-toggle { display: inline-grid; }
.is-mobile .nav-drawer {
  display: block;
  position: absolute;
  inset: 100% 0 auto;
  z-index: 2;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  color: var(--text);
  padding: 8px var(--gutter) 20px;
  border-block-end: 1px solid var(--border);
}
.nav-drawer ul { list-style: none; padding: 0; margin: 0; }
.nav-drawer a { border-bottom: 1px solid var(--border); }
.drawer-label { margin: 14px 12px 2px; font-weight: 700; color: var(--text-muted); }
.is-mobile .nav-veil {
  display: block;
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 1;
  border: 0;
  background: var(--veil);
  color: var(--text);
}
@media (max-width: 960px) {
  .foot-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-layout > :first-child { grid-column: 1 / -1; }
  .topbar--sample { height: auto; }
  .topbar--sample .topbar__in { flex-wrap: wrap; gap: 8px 16px; padding-block: 14px; }
  .topbar--sample .mainnav { order: 3; flex-basis: 100%; overflow-x: auto; padding-block: 4px; }
  .topbar--sample .mainnav__list { width: max-content; }
}
@media (max-width: 768px) {
  :root { --section-pad: 56px; }
  h1 { font-size: var(--title-small); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --section-pad: 48px; }
  .tilt, .tilt:hover, .tilt:focus-within, [data-tilt] { transform: none !important; rotate: none !important; }
  .topbar .brand { gap: 7px; }
  .topbar .brand__name { font-size: 15px; }
  .topbar .brand__mark { width: 30px; height: 30px; }
  .lang { border: 0; padding-inline: 6px; gap: 5px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .foot-layout { gap: 24px 14px; }
}
@media (max-width: 360px) {
  .topbar .brand__name { font-size: 13px; }
  .topbar .lang svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
  .reveal, .btn, .mainnav__list a { transition: none; }
  .btn--primary:hover:not(:disabled) { transform: none; }
}