:root {
  --bg: #FFFFFF;
  --bg-panel: #F7F7F9;
  --bg-panel2: #F0EFFB;
  --border: #E3E3E8;
  --border-strong: #C9C9D3;
  --accent: #4E3FE6;
  --accent-dark: #3A2CC2;
  --text: #0C0C14;
  --text-muted: #5E6070;
  --text-faint: #A2A4B2;
  --success: #12A88F;
  --warn: #C4860A;
  --error: #D3354A;
  --on-accent: #FFFFFF;
  --transparent: transparent;
  --bg-fade0: rgba(255,255,255,0);
  --success-ring: rgba(18,168,143,.16);
  --veil: rgba(12,12,20,.24);
  --shadow-float: 0 1px 2px rgba(12,12,20,.06),0 20px 40px -20px rgba(58,44,194,.38);
  --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,"SFMono-Regular",Menlo,Consolas,monospace;
  --fs-xs: 12px;
  --fs-code: 13px;
  --fs-sm: 14px;
  --fs-nav: 15px;
  --fs-body: 16px;
  --fs-lead: 18px;
  --fs-h3: 24px;
  --fs-h2: clamp(24px,2.5vw,36px);
  --fs-h1: clamp(34px,3.4vw,48px);
  --r-small: 4px;
  --r-ctl: 6px;
  --r-card: 10px;
  --r-pill: 999px;
  --wrap: 1440px;
  --read-wrap: 920px;
  --gutter: 64px;
  --bar-h: 72px;
  --hero-h: 784px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --time-fast: .15s;
  --time-reveal: .55s;
}
*, *::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(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, input, select, textarea { max-width: 100%; }
button { color: var(--text); }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex-shrink: 0; }
svg:not([width]) { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-small); }
::selection { background: var(--bg-panel2); color: var(--text); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; }
h1 { margin: 0 0 24px; font-size: var(--fs-h1); font-weight: 900; line-height: 1.14; letter-spacing: -.02em; }
h2 { margin: 0 0 24px; font-size: var(--fs-h2); font-weight: 900; line-height: 1.2; letter-spacing: -.02em; }
h3 { margin: 0 0 12px; font-size: var(--fs-h3); font-weight: 750; line-height: 1.35; letter-spacing: -.015em; }
p { margin: 0 0 20px; }
strong { font-weight: 650; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
  font-size: var(--fs-code);
  line-height: 1.8;
  tab-size: 2;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
hr { border: 0; height: 1px; background: var(--border); color: var(--text); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.read-wrap { width: 100%; max-width: calc(var(--read-wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-top: 88px; padding-bottom: 88px; }
.section-panel { background: var(--bg-panel); color: var(--text); }
.section-indigo { background: var(--bg-panel2); color: var(--text); }
.section-head { margin-bottom: 36px; max-width: 880px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-family: var(--font-mono); font-size: var(--fs-code); letter-spacing: .02em; }
.lead { color: var(--text-muted); font-size: var(--fs-lead); line-height: 1.75; }
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }
.keep { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.grid-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.grid-two > *, .hero-grid > *, .footer-grid > *, .feature-detail > * { min-width: 0; }
.flow > * + * { margin-top: 24px; }
.prose { min-width: 0; line-height: 1.85; }
.prose h2 { margin-top: 64px; }
.prose h3 { margin-top: 36px; }
.prose a:not([class*="btn"]):not([class*="button"]), .text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.prose a:not([class*="btn"]):not([class*="button"]):hover, .text-link:hover { color: var(--accent-dark); }
.prose :not(pre) > code { padding: 2px 5px; background: var(--bg-panel); color: var(--text); border-radius: var(--r-small); font-size: .9em; }
.prose li { margin-block: 8px; }
.prose img, .prose figure { max-width: 100%; margin-inline: 0; }
.prose section { min-width: 0; }
.decorated, .hero { position: relative; overflow-x: clip; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border: 1px solid var(--transparent);
  border-radius: var(--r-ctl);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 600;
  letter-spacing: -.005em;
  text-align: center;
  transition: background-color var(--time-fast),border-color var(--time-fast),color var(--time-fast);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-primary:active, .btn-primary.is-active { background: var(--accent-dark); color: var(--on-accent); border-color: var(--text); }
.btn-ghost { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-ghost:hover, .btn-ghost.is-hover { border-color: var(--border-strong); }
.btn-ghost:active { background: var(--bg-panel); color: var(--text); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-panel); color: var(--text-muted); border-color: var(--border); cursor: not-allowed; }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: var(--fs-sm); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.card, .panel { min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.panel-soft { background: var(--bg-panel); color: var(--text); }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.card-link { display: block; transition: border-color var(--time-fast); }
.card-link:hover { border-color: var(--accent); }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.reveal { opacity: 1; transform: none; }
.reveal.is-waiting { opacity: 0; transform: translateY(16px); transition: opacity var(--time-reveal) var(--ease),transform var(--time-reveal) var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

/* 顶条与移动导航的四个主体保持同级。 */
.topbar { height: var(--bar-h); position: relative; z-index: 50; background: var(--bg); color: var(--text); }
.header-wrap { width: 100%; max-width: max(var(--wrap),calc(1280px + var(--gutter) * 2)); height: 100%; margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lead); letter-spacing: -.015em; color: var(--text); }
.brand img { width: 32px; height: 32px; flex-shrink: 0; }
.desktop-nav { min-width: 0; margin-left: auto; }
.navline { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.navline li { display: flex; align-items: center; flex-shrink: 0; }
.navline li + li::before { content: "·"; color: var(--text-faint); padding-inline: 14px; font-weight: 700; }
.navline a { position: relative; display: inline-block; padding-block: 6px; font-size: var(--fs-nav); color: var(--text-muted); transition: color var(--time-fast); }
.navline a:hover { color: var(--text); }
.navline a[aria-current="page"] { color: var(--text); font-weight: 600; }
.navline a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 18px; height: 2px; margin-left: -9px; border-radius: var(--r-small); background: var(--accent); color: var(--on-accent); }
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.language-box { position: relative; }
.lang { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: var(--fs-sm); cursor: pointer; transition: border-color var(--time-fast); white-space: nowrap; }
.lang:hover { border-color: var(--border-strong); }
.lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-caret { color: var(--text-muted); font-size: var(--fs-xs); }
.lang-short { display: none; }
.language-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 4; width: 200px; margin: 0; padding: 8px; list-style: none; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.language-menu a { display: flex; align-items: center; min-height: 44px; width: 100%; padding: 10px 12px; border-radius: var(--r-ctl); }
.language-menu a:hover, .language-menu a[aria-current="true"] { background: var(--bg-panel2); color: var(--accent-dark); }
.menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--bg); color: var(--text); }
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-nav { display: none; }
.nav-veil { position: fixed; inset: var(--bar-h) 0 0; z-index: -1; border: 0; background: var(--veil); color: var(--text); }
.static-language { position: relative; }
.static-language summary { list-style: none; }
.static-language summary::-webkit-details-marker { display: none; }

/* 页脚 */
.site-footer { padding-top: 64px; padding-bottom: 28px; border-top: 1px solid var(--border); background: var(--bg-panel); color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.25fr .8fr 1.25fr .75fr; gap: 40px; }
.footer-brand p { margin-top: 20px; max-width: 29em; font-size: var(--fs-sm); color: var(--text-muted); }
.footer-heading { margin: 0 0 18px; font-size: var(--fs-sm); font-weight: 700; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding-block: 5px; font-size: var(--fs-sm); color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-links a[aria-current="true"] { color: var(--text); font-weight: 600; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-muted); }
.footer-bottom p { margin: 0; }

/* 已确认首屏：左编辑器，右文案。 */
.hero { height: var(--hero-h); overflow: hidden; }
.hero .wrap { height: 100%; }
.hero-grid { height: 100%; display: grid; grid-template-columns: 716px minmax(0,1fr); column-gap: 64px; align-items: center; }
.hero-copy { grid-column: 2; grid-row: 1; padding-bottom: 12px; }
.device { grid-column: 1; grid-row: 1; align-self: stretch; position: relative; width: 716px; }
.stage { position: absolute; left: 0; top: 0; width: 716px; height: 784px; transform-origin: 0 0; }
.badge { display: inline-flex; align-items: center; gap: 9px; min-height: 30px; max-width: 100%; margin: 0; padding: 4px 13px 4px 11px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text-muted); font-size: var(--fs-code); }
.badge-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--success); color: var(--text); box-shadow: 0 0 0 3px var(--success-ring); }
.badge b { color: var(--text); font-weight: 600; }
.hero-title { margin: 24px 0 0; font-family: var(--font-display); font-weight: 900; font-size: clamp(30px,3.4vw,48px); line-height: 1.14; letter-spacing: -.02em; color: var(--text); }
.hero-title > span { display: block; }
.hero-title em { font-style: normal; color: var(--accent); }
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 20px 0 0; padding: 0; list-style: none; }
.pf { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-sm); color: var(--text-muted); transition: color var(--time-fast); }
.pf svg { width: 16px; height: 16px; color: var(--text); transition: color var(--time-fast); }
.pf:hover, .pf:hover svg { color: var(--accent); }
.hero-rule { height: 1px; border: 0; background: var(--border); color: var(--text); margin: 30px 0 24px; }
.hero-desc { margin: 0; max-width: 31em; font-size: 16.5px; line-height: 1.75; color: var(--text-muted); }
.hero-desc strong { color: var(--text); font-weight: 600; }
.proto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.proto-label { font-size: var(--fs-code); color: var(--text-muted); margin-right: 4px; }
.chip { display: inline-flex; align-items: center; min-height: 28px; max-width: 100%; padding: 3px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text); font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.dv-panel { position: absolute; left: 0; top: 64px; width: 540px; height: 760px; border-radius: var(--r-card); background: var(--bg-panel2); color: var(--text); }
.dv-editor { position: absolute; left: 48px; top: 112px; width: 456px; height: 720px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.ed-bar { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; border-bottom: 1px solid var(--border); }
.ed-file { display: flex; align-items: baseline; gap: 10px; }
.ed-name { font-family: var(--font-mono); font-size: var(--fs-code); font-weight: 700; color: var(--text); }
.ed-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.ed-tools { display: flex; gap: 2px; }
.ed-tool { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-ctl); color: var(--text); }
.ed-tool svg, .sel-btn svg, .seg-ico svg, .fl-ico svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ed-tool svg { width: 16px; height: 16px; }
.ed-code { padding: 18px 12px 0; font-family: var(--font-mono); font-size: var(--fs-code); counter-reset: ln; }
.ln { display: grid; grid-template-columns: 30px minmax(0,1fr); column-gap: 14px; height: 23px; line-height: 23px; counter-increment: ln; }
.ln::before { content: counter(ln); text-align: right; color: var(--text-muted); font-size: var(--fs-xs); }
.tx { white-space: pre; color: var(--text-muted); }
.k { color: var(--text); }
.ed-code .s, pre .s { color: var(--success); }
.ed-code .n, pre .n { color: var(--accent); }
.sel { position: relative; }
.sel::before { content: ""; position: absolute; inset: -4px -6px; border-radius: var(--r-ctl); background: var(--bg-panel2); color: var(--text); }
.sel::after { content: ""; position: absolute; inset: -4px -6px; border: 2px solid var(--accent); border-radius: var(--r-ctl); pointer-events: none; }
.sel .ln { position: relative; z-index: 1; }
.sel .ln::before { color: var(--accent); }
.sel-tag { position: absolute; left: -6px; top: -24px; z-index: 2; height: 20px; padding-inline: 8px; border-radius: var(--r-small) var(--r-small) 0 0; background: var(--accent); color: var(--on-accent); font-family: var(--font-mono); font-size: 11px; font-weight: 600; line-height: 20px; }
.sel-tools { position: absolute; left: -47px; top: -4px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.sel-btn { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--bg); color: var(--text); }
.sel-btn svg { width: 14px; height: 14px; }
.caret { display: inline-block; width: 2px; height: 15px; margin-left: 1px; vertical-align: -3px; background: var(--accent); color: var(--text); animation: editor-caret 1.1s steps(1) infinite; }
@keyframes editor-caret { 50% { opacity: 0; } }
.dv-rail { position: absolute; left: 580px; top: 48px; width: 136px; height: 704px; overflow: hidden; }
.dv-rail::before, .dv-rail::after { content: ""; position: absolute; left: 0; right: 0; height: 96px; z-index: 2; pointer-events: none; }
.dv-rail::before { top: 0; background: linear-gradient(to bottom,var(--bg) 8%,var(--bg-fade0)); color: var(--text); }
.dv-rail::after { bottom: 0; background: linear-gradient(to top,var(--bg) 8%,var(--bg-fade0)); color: var(--text); }
.rail-list { display: flex; flex-direction: column; gap: 16px; margin: -84px 0 0; padding: 0; list-style: none; }
.seg { height: 156px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.seg-ico { width: 52px; height: 44px; display: grid; place-items: center; border-radius: var(--r-ctl); background: var(--bg-panel); color: var(--text); }
.seg-ico svg { width: 22px; height: 22px; }
.seg-name { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--text); }
.seg--slot { border: 1.5px dashed var(--border-strong); background: var(--bg-panel); color: var(--text); }
.seg--slot .seg-ico, .seg--slot .seg-name { opacity: .38; }
.seg--slot .seg-ico { background: var(--bg); color: var(--text); }
.dv-float { position: absolute; left: 410px; top: 498px; z-index: 3; width: 184px; padding: 16px; border: 1.5px solid var(--accent); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-float); }
.fl-top { display: flex; align-items: flex-start; justify-content: space-between; }
.fl-ico { width: 44px; height: 38px; display: grid; place-items: center; border-radius: var(--r-ctl); background: var(--bg-panel2); color: var(--accent); }
.fl-ico svg { width: 20px; height: 20px; }
.fl-grip { width: 14px; height: 14px; fill: var(--text-faint); }
.fl-title { margin-top: 14px; font-size: var(--fs-sm); font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.fl-title code { font-family: var(--font-mono); font-size: var(--fs-code); font-weight: 600; }
.fl-key { margin-top: 3px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); }

@media (max-width: 1279px) {
  :root { --gutter: 40px; }
  .hero-grid { grid-template-columns: 588px minmax(0,1fr); column-gap: 48px; }
  .device { width: 588px; }
  .stage { transform: scale(.82); }
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: flex; }
  .mobile-nav:not([hidden]) { display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: 3; max-height: calc(100dvh - var(--bar-h)); overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--gutter) 24px; border-block: 1px solid var(--border); background: var(--bg); color: var(--text); }
  .mobile-nav ul { list-style: none; padding: 0; margin: 0; }
  .mobile-nav a { display: flex; width: 100%; align-items: center; min-height: 48px; padding: 12px 8px; border-bottom: 1px solid var(--border); }
  .mobile-nav a[aria-current] { color: var(--accent-dark); font-weight: 600; }
  .mobile-languages { margin-top: 24px !important; }
}
@media (max-width: 980px) {
  :root { --gutter: 24px; }
  .hero { height: auto; padding-top: 40px; }
  .hero-grid { grid-template-columns: minmax(0,1fr); row-gap: 40px; }
  .hero-copy { grid-column: 1; grid-row: 1; padding-bottom: 0; }
  .device { grid-column: 1; grid-row: 2; width: 588px; height: 644px; margin-inline: auto; overflow: hidden; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  :root { --fs-h1: 30px; }
  .hero-title { font-size: 30px; }
  .grid-two { grid-template-columns: minmax(0,1fr); }
  .section { padding-top: 56px; padding-bottom: 56px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .header-wrap { gap: 10px; }
  .brand { font-size: var(--fs-body); gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang { min-height: 44px; padding-inline: 9px; }
  .header-tools { gap: 8px; margin-left: auto; }
  .device { width: 100%; max-width: 330px; height: 361px; }
  .stage { transform: scale(.46); }
  .tilt, [data-tilt] { transform: none; }
  .hero .btn { flex: 1 1 auto; }
  .hero-title { font-size: clamp(24px,6.8vw,30px); }
  .hero-title .keep { white-space: nowrap; }
  .platforms { gap: 10px 18px; }
  .proto { flex-direction: row; flex-wrap: wrap; }
  .card, .panel { padding: 22px; }
  .footer-grid { grid-template-columns: minmax(0,1fr); gap: 30px; }
  pre { padding: 18px; }
}
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .stage { transform: scale(.40); }
  .device { height: 314px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .reveal.is-waiting { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}