:root {
  --bg: #FFFFFF;
  --white: var(--bg);
  --bg-panel: #F6F7FB;
  --bg-panel-2: #EEF0F7;
  --border: #E3E6EF;
  --border-strong: #D3D8E5;
  --guide: #ECEEF4;
  --accent: #5D2CE6;
  --accent-dark: #3F17B8;
  --accent-soft: #F3EFFE;
  --accent-line: #CDBFF7;
  --text: #0A1A33;
  --text-muted: #5B6B85;
  --text-faint: #8C98AE;
  --success: #11A36A;
  --success-halo: rgb(17 163 106 / .16);
  --warn: #D9820F;
  --error: #D93A4A;
  --ribbon-a: #FF9A3C;
  --ribbon-b: #FF5FA2;
  --ribbon-c: #9B6BFF;
  --dot: #C9CEDA;
  --silk: rgb(255 255 255 / .78);
  --silk-faint: rgb(255 255 255 / .28);
  --ribbon-shade: rgb(63 23 184 / .30);
  --header-line: rgb(211 216 229 / .72);
  --shadow-near: rgb(10 26 51 / .09);
  --shadow-far: rgb(10 26 51 / .17);
  --shadow-tint: rgb(93 44 230 / .14);
  --veil: rgb(10 26 51 / .30);
  --clear: transparent;
  --ribbon-spectrum: linear-gradient(100deg, var(--ribbon-c), var(--ribbon-b) 46%, var(--ribbon-a));
  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --type-xs: 12px;
  --type-sm: 14px;
  --type-body: 16px;
  --type-lede: 18px;
  --type-h3: clamp(20px, 1.65vw, 25px);
  --type-h2: clamp(24px, 2.3vw, 32px);
  --type-h1: clamp(34px, 3.2vw, 46px);
  --type-hero: clamp(28px, 3.2vw, 46px);
  --weight-normal: 400;
  --weight-medium: 500;
  --r-pin: 2px;
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-pill: 999px;
  --r-circle: 50%;
  --wrap: 1240px;
  --head-span: 1280px;
  --reading: 76ch;
  --gutter: 48px;
  --header-h: 72px;
  --section-space: clamp(48px, 7vw, 96px);
  --card-pad: clamp(18px, 2.5vw, 32px);
  --gap: 16px;
  --shadow-card: 0 2px 4px var(--shadow-near), 0 16px 32px -24px var(--shadow-far);
  --shadow-lift: 0 3px 6px var(--shadow-near), 0 21px 36px -22px var(--shadow-far);
  --ease-short: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--type-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
button, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:where(main, section, article, aside, nav, header, footer, .wrap, .prose, .content, .panel) { min-width: 0; }
:where(.grid, .hero__grid, .feature-grid, .card-grid, .foot-grid, .swatches) > * { min-width: 0; }
:where(p, li, dd) { overflow-wrap: break-word; }
:where([id]) { scroll-margin-block-start: 16px; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  line-height: 1.3;
  letter-spacing: -.016em;
  text-wrap: balance;
}
h1 { font-size: var(--type-h1); line-height: 1.16; letter-spacing: -.02em; }
h2 { font-size: var(--type-h2); }
h3 { font-size: var(--type-h3); }
p { margin: 0 0 1em; }
.nowrap, .h1-key { white-space: nowrap; }
.muted { color: var(--text-muted); }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: var(--type-xs); letter-spacing: .12em; }
.prose { max-width: var(--reading); line-height: 1.8; }
.prose :where(h2, h3) { margin-block: 1.55em .6em; }
.prose > :first-child { margin-block-start: 0; }
.prose :where(ul, ol) { padding-inline-start: 1.5em; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
:not(pre) > code { color: var(--text); background: var(--bg-panel); border-radius: var(--r-xs); padding: .08em .26em; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  background: var(--bg-panel);
}
pre code { white-space: pre; overflow-wrap: normal; }

.page { position: relative; min-height: 100vh; }
.page::before, .page::after {
  content: "";
  position: absolute;
  inset-block: 0;
  width: 1px;
  background: var(--guide);
  pointer-events: none;
  z-index: 0;
}
.page::before { left: calc(50% - var(--wrap) / 2); }
.page::after { left: calc(50% + var(--wrap) / 2 - 1px); }
.wrap, .head-rail {
  position: relative;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  position: relative;
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}
.section + .section { border-top: 1px solid var(--border); }
.section__intro { max-width: 640px; margin-block: 18px 30px; color: var(--text-muted); }
.decor-boundary { overflow-x: clip; }
.stage { position: relative; overflow-x: clip; }
.grid, .card-grid { display: grid; gap: var(--gap); }
.card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cluster, .badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.cluster > :where(svg, img, .dot), .icon, .kicker__dot { flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  max-width: 100%;
  padding: 8px 20px;
  border: 0;
  border-radius: var(--r-sm);
  font: var(--weight-medium) 15px/1.35 var(--font-body);
  letter-spacing: .005em;
  text-decoration: none;
  transition: background-color var(--ease-short), color var(--ease-short), border-color var(--ease-short);
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { color: var(--white); background: var(--accent); box-shadow: 0 1px 1px var(--shadow-near), 0 10px 22px -10px var(--shadow-tint); }
.btn--primary:is(:hover, .sample-hover) { color: var(--white); background: var(--accent-dark); }
.btn--ghost { color: var(--accent); background: var(--white); border: 1px solid var(--accent-line); }
.btn--ghost:is(:hover, .sample-hover) { color: var(--accent-dark); background: var(--accent-soft); border-color: var(--accent); }
.btn:is(:active, .sample-active) { box-shadow: inset 0 2px 4px var(--shadow-far); }
.btn:is(:focus-visible, .sample-focus) { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { cursor: not-allowed; color: var(--text-muted); background: var(--bg-panel-2); border: 1px solid var(--border); box-shadow: none; }

.card, .panel {
  min-width: 0;
  padding: var(--card-pad);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
}
.card { background: var(--bg); box-shadow: var(--shadow-card); }
.panel { background: var(--bg-panel); }
.panel--inset { background: var(--bg-panel-2); }
.card :where(p), .panel :where(p) { margin: 12px 0 0; color: var(--text-muted); }

.site-head {
  position: relative;
  z-index: 20;
  height: var(--header-h);
  border-bottom: 1px solid var(--header-line);
}
.site-head::after, .hero::after {
  content: "";
  position: absolute;
  left: calc(50% - var(--wrap) / 2 - 4px);
  bottom: -5px;
  width: 9px;
  height: 9px;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pin);
  pointer-events: none;
  z-index: 6;
}
.head-rail {
  height: 100%;
  max-width: min(100%, calc(var(--head-span) + var(--gutter) * 2));
  display: flex;
  align-items: center;
  gap: 44px;
}
/* 中等宽度沿用定稿的首屏界线；宽屏为页头单独展开版心。 */
@media (min-width: 1291px) and (max-width: 1535px) {
  .stage .head-rail { max-width: var(--wrap); }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--text);
  text-decoration: none;
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  letter-spacing: -.01em;
}
.brand__mark { display: block; width: 32px; height: 32px; flex-shrink: 0; }
.tabs { min-width: 0; height: 100%; }
.tabs ul {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tabs li { height: 100%; }
.tabs a {
  display: flex;
  position: relative;
  align-items: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease-short);
}
.tabs a:is(:hover, [aria-current="page"]) { color: var(--text); }
.tabs a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  border-radius: var(--r-pin) var(--r-pin) 0 0;
  background: var(--accent);
}
.head-tools { display: flex; align-items: center; flex: none; gap: 8px; margin-inline-start: auto; }
.lang-box { position: relative; }
.lang, .nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: 0 1px 2px var(--shadow-near);
  cursor: pointer;
}
.lang { min-height: 36px; padding-inline: 14px; font-size: var(--type-sm); white-space: nowrap; }
.lang svg, .nav-toggle svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: var(--text-muted); stroke-width: 1.5; }
.lang__caret { color: var(--text-muted); font-size: 11px; }
.lang__short, .nav-toggle, .hand-nav, .nav-veil { display: none; }
.lang-menu {
  position: absolute;
  z-index: 2;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  min-width: 154px;
  padding: 5px;
  margin: 0;
  list-style: none;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lift);
}
.lang-menu a, .hand-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--r-sm);
}
:where(.lang-menu, .hand-nav) a:is(:hover, [aria-current="true"], [aria-current="page"]) { background: var(--accent-soft); color: var(--accent-dark); }
.lang-box summary { list-style: none; }
.lang-box summary::-webkit-details-marker { display: none; }

.site-foot {
  position: relative;
  border-top: 1px solid var(--border);
  color: var(--text);
  background: var(--bg);
  padding-top: 52px;
}
.foot-grid { display: grid; grid-template-columns: 1.45fr .8fr 1.3fr .75fr; gap: 28px; }
.foot-grid p { margin: 14px 0 0; color: var(--text-muted); }
.foot-grid h2 { font-size: var(--type-body); font-weight: var(--weight-medium); }
.foot-grid ul { list-style: none; margin: 12px 0 0; padding: 0; }
.foot-grid li + li { margin-top: 6px; }
.foot-grid nav a { color: var(--text-muted); overflow-wrap: anywhere; }
.foot-grid nav a:hover { color: var(--accent-dark); }
.foot-copy { margin: 36px 0 0; padding-block: 16px 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--type-sm); }

.reveal-ready .reveal { transition: opacity .36s ease; }
.reveal-ready .reveal:not(.shown):not(:focus-within) { opacity: 0; }

@media (max-width: 1290px) {
  .page::before, .page::after, .site-head::after, .hero::after { display: none; }
  .head-rail { gap: 24px; }
  .tabs ul { gap: 18px; }
}
@media (max-width: 1024px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px), (max-width: 1280px) and (not (language: zh-CN)) {
  /* 局部语言断点由下方 :lang() 规则处理。 */
}
@media (max-width: 1280px) {
  html:not(:lang(zh)) .site-head--runtime .tabs { display: none; }
  html:not(:lang(zh)) .site-head--runtime .nav-toggle { display: inline-flex; }
  html:not(:lang(zh)) .site-head--runtime .hand-nav:not([hidden]),
  html:not(:lang(zh)) .site-head--runtime .nav-veil:not([hidden]) { display: block; }
}
html.nav-open { overflow: hidden; }
.nav-toggle { min-width: 44px; min-height: 44px; padding: 0; }
.nav-veil { position: fixed; inset: var(--header-h) 0 0; z-index: 0; border: 0; background: var(--veil); color: var(--white); }
.hand-nav {
  position: absolute;
  inset-inline: var(--gutter);
  top: 100%;
  z-index: 1;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: var(--shadow-lift);
}
.hand-nav ul { list-style: none; margin: 0; padding: 0; }
.hand-nav ul + ul { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
@media (max-width: 1024px) {
  .site-head--runtime .tabs { display: none; }
  .site-head--runtime .nav-toggle { display: inline-flex; }
  .site-head--runtime .hand-nav:not([hidden]), .site-head--runtime .nav-veil:not([hidden]) { display: block; }
}
@media (max-width: 860px) {
  :root { --gutter: 20px; --header-h: 64px; --type-h1: 28px; }
  .head-rail { gap: 12px; }
  .site-head--sample { height: auto; }
  .site-head--sample .head-rail { flex-wrap: wrap; gap: 0 16px; padding-top: 12px; }
  .site-head--sample .brand { min-height: 40px; }
  .site-head--sample .tabs { order: 3; width: 100%; height: 44px; overflow-x: auto; scrollbar-width: none; }
  .site-head--sample .tabs ul { gap: 22px; }
  .site-head--sample .tabs a[aria-current="page"]::after { bottom: 0; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .tilt, .tilt--left, .tilt--right { transform: none; rotate: none; }
  .badge-row { justify-content: center; }
  .foot-grid { gap: 24px 14px; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .lang { padding-inline: 9px; }
  .lang__full { display: none; }
  .lang__short { display: inline; }
  .site-head--runtime .brand { flex: 0 1 auto; min-width: 0; font-size: var(--type-sm); }
  .site-head--runtime .brand span { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; }
}