/* ================================================================
   CoCode — 设计令牌
   ================================================================ */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-strong: rgba(120, 120, 128, 0.2);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --success: #248a3d;
  --success-soft: rgba(52, 199, 89, 0.14);
  --warning: #b25000;
  --warning-soft: rgba(255, 149, 0, 0.14);
  --danger: #d70015;
  --danger-soft: rgba(255, 59, 48, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.76);
  --code-bg: #1d1d1f;
  --code-text: #f5f5f7;
  --shadow-pop: 0 20px 60px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --nav-h: 52px;
  --gutter: 22px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --bg-alt: #101012;
    --surface: #1c1c1e;
    --surface-2: #161618;
    --fill: rgba(120, 120, 128, 0.24);
    --fill-strong: rgba(120, 120, 128, 0.36);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-text: #2997ff;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --success: #30d158;
    --success-soft: rgba(48, 209, 88, 0.16);
    --warning: #ff9f0a;
    --warning-soft: rgba(255, 159, 10, 0.16);
    --danger: #ff453a;
    --danger-soft: rgba(255, 69, 58, 0.16);
    --nav-bg: rgba(22, 22, 23, 0.76);
    --code-bg: #161618;
    --shadow-pop: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

/* ================================================================
   基础
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
code, kbd, pre { font-family: var(--mono); }
::selection { background: var(--accent-soft); }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: 1024px; margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.muted { color: var(--text-2); }
.mono { font-family: var(--mono); letter-spacing: 0; }
.nowrap { white-space: nowrap; }

/* ================================================================
   按钮
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 8px 18px;
  border: 0; border-radius: 980px;
  font-size: 15px; font-weight: 500; line-height: 1.2;
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), opacity .2s, transform .1s;
  text-decoration: none !important;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not([disabled]) { background: var(--accent-hover); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover:not([disabled]) { opacity: .86; }
.btn-secondary { background: var(--fill); color: var(--text); }
.btn-secondary:hover:not([disabled]) { background: var(--fill-strong); }
.btn-outline { background: transparent; color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.btn-outline:hover:not([disabled]) { background: var(--accent); color: #fff; box-shadow: none; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover:not([disabled]) { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); padding-inline: 10px; }
.btn-ghost:hover:not([disabled]) { background: var(--fill); color: var(--text); }
.btn-lg { min-height: 48px; padding: 12px 26px; font-size: 17px; }
.btn-sm { min-height: 30px; padding: 5px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn .spinner { width: 14px; height: 14px; }
.btn-lg svg { width: 18px; height: 18px; }

.link-more { font-size: 17px; font-weight: 400; }
.link-more::after { content: " ›"; }
.link-more:hover { text-decoration: underline; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; }

.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   导航
   ================================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text); font-weight: 600; font-size: 18px; letter-spacing: -0.02em;
  text-decoration: none !important;
}
.brand-mark { width: 26px; height: 26px; color: var(--text); }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0 auto 0 12px; padding: 0; }
.nav-links a {
  color: var(--text); opacity: .8; font-size: 13px; letter-spacing: -0.01em;
  text-decoration: none; transition: opacity .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }
.nav-links a[aria-current="page"] { font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-user {
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px;
  border-radius: 980px; background: var(--fill); color: var(--text);
  font-size: 13px; text-decoration: none !important;
}
.nav-user:hover { background: var(--fill-strong); }
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  font-size: 12px; font-weight: 600; text-transform: uppercase;
}
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }
.nav-toggle { display: none; width: 36px; height: 36px; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 8px; }
.nav-toggle span { display: block; width: 17px; height: 1.5px; margin: 5px auto; background: var(--text); transition: transform .3s var(--ease); }
.nav.open .nav-toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav.open .nav-toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; order: 3; }
  .nav-inner { gap: 10px; }
  .nav-actions { margin-left: auto; }
  .nav-actions .btn-download { display: none; }
  .nav-links {
    position: fixed; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links a { display: block; padding: 14px 0; font-size: 20px; font-weight: 600; opacity: 1; }
  .nav-user .nav-user-name { display: none; }
  .nav-user { padding-right: 3px; }
}

/* ================================================================
   版式
   ================================================================ */
.section { padding: 120px 0; }
.section-sm { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: #000; color: #f5f5f7; }
.section-dark .muted { color: #a1a1a6; }
.section-dark a:not(.btn) { color: #2997ff; }

.eyebrow { font-size: 21px; font-weight: 600; letter-spacing: .004em; color: var(--text-2); margin-bottom: 8px; }
.eyebrow-accent { color: var(--accent-text); }
.display {
  font-size: clamp(44px, 8vw, 96px); font-weight: 700;
  line-height: 1.04; letter-spacing: -0.03em;
}
.headline {
  font-size: clamp(32px, 5vw, 56px); font-weight: 700;
  line-height: 1.07; letter-spacing: -0.028em;
}
.title { font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.125; letter-spacing: -0.02em; }
.lead {
  font-size: clamp(19px, 2.2vw, 24px); line-height: 1.38; font-weight: 500;
  color: var(--text-2); letter-spacing: -0.01em;
}
.body-lg { font-size: 19px; line-height: 1.42; color: var(--text-2); }
.section-head { max-width: 900px; margin: 0 auto 64px; text-align: center; }
.section-head .lead { margin-top: 18px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.view { animation: viewIn .45s var(--ease); }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }

/* ================================================================
   首页 · Hero
   ================================================================ */
.hero { padding: 96px 0 0; text-align: center; overflow: hidden; }
.hero .display { margin-top: 6px; }
.hero .lead { max-width: 720px; margin: 22px auto 0; }
.hero .cta-row { margin-top: 36px; }
.hero-meta { margin-top: 18px; font-size: 14px; color: var(--text-3); }
.hero-stage { margin: 72px auto 0; max-width: 1080px; padding: 0 var(--gutter); }

/* 应用窗口示意 */
.window {
  text-align: left;
  border-radius: 14px 14px 0 0;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong), 0 40px 100px -20px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.window-bar {
  height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--text-3);
}
.window-dots { display: flex; gap: 8px; margin-right: 12px; }
.window-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--fill-strong); }
.window-title { margin: 0 auto; font-weight: 500; transform: translateX(-30px); }
.window-body { display: grid; grid-template-columns: 220px 1fr; min-height: 520px; }
.win-side { border-right: 1px solid var(--line); padding: 14px 10px; background: var(--surface-2); font-size: 13px; }
.win-side h5 { margin: 14px 8px 6px; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.win-side h5:first-child { margin-top: 2px; }
.win-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-item.active { background: var(--fill); color: var(--text); font-weight: 500; }
.win-item svg { width: 15px; height: 15px; flex: none; }
.win-main { display: flex; flex-direction: column; min-width: 0; }
.win-thread { flex: 1; padding: 26px 32px 12px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.bubble-user {
  align-self: flex-end; max-width: 78%;
  padding: 10px 16px; border-radius: 18px 18px 4px 18px;
  background: var(--fill); color: var(--text); line-height: 1.5;
}
.step { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); line-height: 1.5; }
.step-ico { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--text-3); }
.step strong { color: var(--text); font-weight: 600; }
.step code { font-size: 12.5px; padding: 1px 6px; border-radius: 5px; background: var(--fill); color: var(--text); }
.plan-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.plan-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.plan-list .ck { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.plan-list .done .ck { background: var(--success); border-color: var(--success); }
.plan-list .done .ck::after { content: ""; width: 6px; height: 3px; border: 1.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.plan-list .done span { color: var(--text-3); text-decoration: line-through; }
.plan-list .doing .ck { border-color: var(--accent); border-right-color: transparent; animation: spin 1s linear infinite; }
.diff-card { margin-left: 28px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 12.5px; }
.diff-head { display: flex; justify-content: space-between; padding: 7px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--text-2); }
.diff-head b { font-weight: 500; color: var(--text); font-family: var(--mono); letter-spacing: 0; }
.diff-stat .add { color: var(--success); }
.diff-stat .del { color: var(--danger); margin-left: 6px; }
.diff-lines { font-family: var(--mono); letter-spacing: 0; padding: 6px 0; line-height: 1.7; }
.diff-lines div { padding: 0 12px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.diff-lines .a { background: var(--success-soft); }
.diff-lines .d { background: var(--danger-soft); }
.approval {
  margin-left: 28px; padding: 12px 14px; border-radius: 12px;
  background: var(--accent-soft); display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.approval p { flex: 1; min-width: 200px; font-size: 13.5px; }
.approval code { font-size: 12.5px; }
.approval .btn { min-height: 28px; padding: 4px 12px; font-size: 13px; }
.composer {
  margin: 0 24px 20px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--line-strong); background: var(--surface);
  display: flex; flex-direction: column; gap: 10px;
}
.composer-input { color: var(--text-3); font-size: 14px; }
.composer-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 980px; background: var(--fill); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.chip-accent { background: var(--accent-soft); color: var(--accent-text); }
.composer-send { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; }
.composer-send svg { width: 14px; height: 14px; }

.hero-stage .seq > * { opacity: 0; animation: seqIn .6s var(--ease) forwards; }
.hero-stage .seq > *:nth-child(1) { animation-delay: .3s; }
.hero-stage .seq > *:nth-child(2) { animation-delay: .9s; }
.hero-stage .seq > *:nth-child(3) { animation-delay: 1.5s; }
.hero-stage .seq > *:nth-child(4) { animation-delay: 2.1s; }
.hero-stage .seq > *:nth-child(5) { animation-delay: 2.7s; }
.hero-stage .seq > *:nth-child(6) { animation-delay: 3.3s; }
.hero-stage .seq > *:nth-child(7) { animation-delay: 3.9s; }
@keyframes seqIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .window-body { grid-template-columns: 1fr; min-height: 0; }
  .win-side { display: none; }
  .win-thread { padding: 20px 16px 8px; }
  .diff-card, .approval { margin-left: 0; }
  .composer { margin: 0 12px 14px; }
  .window-title { transform: none; }
}

/* 接入方式 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.split-card { padding: 44px; border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.split-card .tag { align-self: flex-start; }
.split-card h3 { font-size: 28px; line-height: 1.14; letter-spacing: -0.02em; }
.split-card ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--text-2); }
.split-card li { display: flex; gap: 10px; }
.split-card li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent-text); }
.split-card .btn, .split-card .link-more { margin-top: auto; align-self: flex-start; }
.split-card ul + * { margin-top: 18px; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split-card { padding: 30px; }
}

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 980px;
  font-size: 12px; font-weight: 600; letter-spacing: 0;
  background: var(--fill); color: var(--text-2);
}
.tag-accent { background: var(--accent-soft); color: var(--accent-text); }
.tag-success { background: var(--success-soft); color: var(--success); }
.tag-warning { background: var(--warning-soft); color: var(--warning); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ================================================================
   下载
   ================================================================ */
.dl-primary { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dl-primary .muted { font-size: 14px; }

.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.platforms > * { min-width: 0; }
.platform { padding: 32px; border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.platform.detected { box-shadow: inset 0 0 0 2px var(--accent); }
.platform-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.platform-head svg { width: 30px; height: 30px; }
.platform h3 { font-size: 24px; letter-spacing: -0.02em; }
.platform .req { font-size: 14px; color: var(--text-3); margin-bottom: 16px; }
.build-list { display: grid; gap: 8px; margin-top: auto; }
.build {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--bg-alt); color: var(--text); text-decoration: none !important;
  transition: background-color .2s;
}
.build:hover { background: var(--fill-strong); }
.build-name { font-weight: 600; font-size: 15px; }
.build-file { font-size: 12px; color: var(--text-3); font-family: var(--mono); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.build-meta { margin-left: auto; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.build svg { width: 18px; height: 18px; color: var(--accent-text); flex: none; }
.build > div { min-width: 0; }
@media (max-width: 900px) { .platforms { grid-template-columns: minmax(0, 1fr); } }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps-grid > div { padding: 28px; border-radius: var(--radius-md); background: var(--bg-alt); }
.steps-grid > div::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; margin-bottom: 16px;
}
.steps-grid h4 { font-size: 19px; margin-bottom: 6px; }
.steps-grid p { color: var(--text-2); font-size: 15px; }
@media (max-width: 760px) { .steps-grid { grid-template-columns: 1fr; } }

.notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.notes li { display: flex; gap: 12px; color: var(--text-2); }
.notes li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 10px; }

/* ================================================================
   分段控件 · 常见问题
   ================================================================ */
.segmented {
  display: inline-flex; padding: 3px; border-radius: 10px; background: var(--fill);
  position: relative;
}
.segmented button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: 6px 18px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text);
  transition: background-color .2s, box-shadow .2s;
}
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] {
  background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px var(--line);
}
.segmented .save { color: var(--success); font-size: 12px; margin-left: 4px; }
.segmented-block { display: flex; }
.segmented-block button { flex: 1; }

.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font-size: 19px; font-weight: 600; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--text-2); }

/* ================================================================
   表单
   ================================================================ */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 56px var(--gutter) 80px; background: var(--bg-alt); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .brand-mark { width: 48px; height: 48px; margin: 0 auto 22px; }
.auth-card h1 { font-size: 32px; text-align: center; letter-spacing: -0.025em; }
.auth-card .sub { text-align: center; color: var(--text-2); margin: 8px 0 28px; }
.card { padding: 28px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.input {
  width: 100%; height: 44px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-lg { height: 52px; font-size: 18px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; min-width: 0; }
.input-group .btn { flex: none; min-width: 112px; border-radius: var(--radius-sm); min-height: 44px; }
.field-hint { font-size: 13px; color: var(--text-3); }
.field-error { font-size: 13px; color: var(--danger); min-height: 0; }
.form-error {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px;
  background: var(--danger-soft); color: var(--danger); font-size: 14px;
}
.form-error svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.form-note {
  padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px;
}
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.captcha-box {
  min-height: 65px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong);
  display: flex; align-items: center; gap: 12px; padding: 0 14px; font-size: 14px; color: var(--text-2);
}
.captcha-box svg { width: 20px; height: 20px; flex: none; }
.captcha-box.verified { border-style: solid; border-color: var(--success); color: var(--success); }
.captcha-box.live { border: 0; padding: 0; justify-content: center; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-3); margin-top: 20px; }

.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: var(--fill-strong); transition: background-color .25s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

/* ================================================================
   控制台
   ================================================================ */
.console { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - var(--nav-h)); background: var(--bg-alt); }
.console-side { padding: 28px 14px; border-right: 1px solid var(--line); background: var(--bg); position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; display: flex; flex-direction: column; }
.console-user { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.console-user div { min-width: 0; }
.console-user strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-user span { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  color: var(--text); font-size: 14px; text-decoration: none !important;
}
.side-nav a:hover { background: var(--fill); }
.side-nav a[aria-current="page"] { background: var(--accent); color: #fff; }
.side-nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.side-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 2px; }
.side-foot a, .side-foot button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none;
  color: var(--text-2); font-size: 14px; text-align: left; cursor: pointer; text-decoration: none !important;
}
.side-foot a:hover, .side-foot button:hover { background: var(--fill); color: var(--text); }
.side-foot svg { width: 18px; height: 18px; }

.console-main { padding: 40px clamp(20px, 4vw, 56px) 80px; min-width: 0; max-width: 1120px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: 32px; letter-spacing: -0.025em; line-height: 1.1; }
.page-head p { color: var(--text-2); margin-top: 6px; font-size: 15px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.span-2 { grid-column: span 2; }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.panel { padding: 24px; border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 0 0 1px var(--line); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.panel-head .sub { font-size: 13px; color: var(--text-3); }
.panel-flush { padding: 0; overflow: hidden; }
.panel-flush .panel-head { padding: 20px 24px 0; }
.panel + .panel, .grid + .panel, .panel + .grid { margin-top: 16px; }

.stat-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.stat-value { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 20px; font-weight: 600; margin-right: 2px; }
.stat-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.stat-foot .muted { font-size: 13px; }

.meter { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; margin: 12px 0 8px; }
.meter span { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .8s var(--ease); }
.meter.warn span { background: var(--warning); }
.meter.crit span { background: var(--danger); }
.meter-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-3); gap: 8px; }
.meter-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.quota + .quota { margin-top: 18px; }
.quota-head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; }

.quick { display: grid; gap: 8px; }
.quick a {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg-alt);
  color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none !important;
}
.quick a:hover { background: var(--fill-strong); }
.quick a svg { width: 20px; height: 20px; color: var(--accent-text); flex: none; }
.quick a::after { content: "›"; margin-left: auto; color: var(--text-3); font-size: 18px; }

.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-text { fill: var(--text-3); font-size: 11px; font-family: var(--font); letter-spacing: 0; }
.chart .bar { fill: var(--accent); transition: opacity .15s; }
.chart .bar-hit { fill: transparent; cursor: default; }
.chart svg:hover .bar { opacity: .45; }
.chart svg .col:hover .bar { opacity: 1; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 2;
  padding: 8px 12px; border-radius: 10px; background: var(--text); color: var(--bg);
  font-size: 12px; line-height: 1.5; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .15s;
}
.chart-tip b { font-size: 14px; }
.chart-tip.show { opacity: 1; }

.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .s { font-size: 13px; color: var(--text-3); }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.pos { color: var(--success); }
.tx-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); flex: none; color: var(--text-2); }
.tx-ico svg { width: 17px; height: 17px; }

.redeem-box { display: grid; gap: 14px; }
.redeem-box .input { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.redeem-box .input::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--font); }

.setting-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; }
.setting-row .grow { flex: 1; }
.setting-row .t { font-weight: 500; font-size: 15px; }
.setting-row .s { font-size: 13px; color: var(--text-3); margin-top: 2px; }

.empty { padding: 48px 24px; text-align: center; color: var(--text-2); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--text-3); }
.empty h3 { font-size: 19px; color: var(--text); margin-bottom: 6px; }
.empty p { font-size: 14px; margin-bottom: 18px; }

.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--fill) 25%, var(--fill-strong) 37%, var(--fill) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.console-tabs { display: none; }
@media (max-width: 860px) {
  .console { grid-template-columns: 1fr; }
  .console-side { display: none; }
  .console-tabs {
    display: flex; gap: 6px; overflow-x: auto; padding: 12px var(--gutter);
    background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: var(--nav-h); z-index: 5;
    scrollbar-width: none;
  }
  .console-tabs::-webkit-scrollbar { display: none; }
  .console-tabs a { flex: none; padding: 7px 14px; border-radius: 980px; font-size: 14px; color: var(--text); background: var(--fill); text-decoration: none !important; }
  .console-tabs a[aria-current="page"] { background: var(--text); color: var(--bg); }
  .console-main { padding: 28px var(--gutter) 64px; }
}

/* ================================================================
   设备授权
   ================================================================ */
.device-code { text-align: center; font-family: var(--mono); font-size: 28px; letter-spacing: .18em; }
.result-ico { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.result-ico svg { width: 30px; height: 30px; }

/* ================================================================
   对话框与提示
   ================================================================ */
dialog.modal {
  width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop);
}
dialog.modal[open] { animation: modalIn .3s var(--ease); }
dialog.modal::backdrop { background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes modalIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.modal-body { padding: 28px; }
.modal-body h2 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 8px; }
.modal-body > p { color: var(--text-2); font-size: 15px; margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.toast-region { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast {
  display: inline-flex; align-items: center; gap: 10px; max-width: 520px;
  padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-pop);
  animation: toastIn .35s var(--ease);
}
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: var(--success); }
.toast.err svg { color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.demo-banner {
  font-size: 12px; text-align: center; padding: 7px var(--gutter);
  background: var(--warning-soft); color: var(--warning);
}

/* ================================================================
   页脚
   ================================================================ */
.footer { background: var(--bg-alt); color: var(--text-2); font-size: 12px; padding: 40px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer h4 { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); }
.footer .brand { font-size: 15px; margin-bottom: 10px; }
.footer .brand-mark { width: 22px; height: 22px; }
.footer-blurb { max-width: 300px; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: span 2; }
}

/* ================================================================
   首页 · 下载
   ================================================================ */
.hero-download { padding: 88px 0 96px; }
.hero-title {
  font-size: clamp(36px, 6vw, 68px); font-weight: 700;
  line-height: 1.12; letter-spacing: -0.03em; margin-top: 6px;
}
.hero-download .lead { max-width: 880px; margin: 22px auto 0; font-size: clamp(17px, 2vw, 21px); }
.hero-download .dl-primary { margin-top: 36px; }
.platforms-compact { margin-top: 48px; text-align: left; }
.platforms-compact .platform { padding: 24px; background: var(--bg-alt); }
.platforms-compact .platform h3 { font-size: 19px; }
.platforms-compact .platform-head svg { width: 24px; height: 24px; }
.platforms-compact .req { margin-bottom: 12px; font-size: 13px; }
.platforms-compact .build-list { margin-top: 0; }
.platforms-compact .build { background: var(--surface); padding: 10px 12px; }
.platforms-compact .build-name { font-size: 14px; }
.dl-account { margin-top: 28px; font-size: 14px; color: var(--text-2); }
.dl-account a { margin-left: 6px; }

/* 普通聊天与智能体对比 */
.split-card { background: var(--surface); }
.example { margin-top: 6px; padding: 18px; border-radius: var(--radius-sm); background: var(--bg-alt); display: grid; gap: 10px; font-size: 15px; line-height: 1.6; }
.example-accent { background: var(--accent-soft); }
.example-q { font-weight: 600; }
.example-a { color: var(--text-2); }

/* 任务示例 */
.tasks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.task { padding: 22px; border-radius: var(--radius-md); background: var(--bg-alt); display: flex; flex-direction: column; gap: 12px; }
.task-head { display: flex; align-items: center; gap: 8px; }
.task-head svg { width: 16px; height: 16px; }
.task h3 { font-size: 18px; letter-spacing: -0.01em; }
.prompt {
  flex: 1; margin: 0; padding: 12px 14px; border-radius: 14px 14px 14px 4px;
  background: var(--surface); font-size: 14px; line-height: 1.6; color: var(--text);
}
.task .btn { align-self: flex-start; }
@media (max-width: 1000px) { .tasks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tasks { grid-template-columns: 1fr; } }

/* 工作方式 */
.window-full { border-radius: 14px; }
.steps-4 { grid-template-columns: repeat(4, 1fr); }
.section-alt .steps-grid > div { background: var(--surface); }
@media (max-width: 1000px) { .steps-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps-4 { grid-template-columns: 1fr; } }

/* 安全 */
.safety { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.safety article { padding: 28px; border-radius: var(--radius-md); background: var(--bg-alt); }
.safety-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 18px; }
.safety-ico svg { width: 22px; height: 22px; }
.safety h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -0.01em; }
.safety p { color: var(--text-2); font-size: 15px; }
@media (max-width: 900px) { .safety { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .safety { grid-template-columns: 1fr; } }
.note-box {
  display: flex; gap: 14px; margin-top: 16px; padding: 22px 24px; border-radius: var(--radius-md);
  background: var(--warning-soft);
}
.note-box > svg { width: 22px; height: 22px; flex: none; color: var(--warning); margin-top: 2px; }
.note-box strong { display: block; margin-bottom: 4px; }
.note-box p { color: var(--text-2); font-size: 15px; }

.release { margin-top: 16px; padding: 28px; }
.release .panel-head h2 { font-size: 19px; }

/* ================================================================
   控制台 · 补充
   ================================================================ */
.dl-card .dl-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.dl-card h2 { font-size: 24px; letter-spacing: -0.02em; margin-top: 6px; }
.dl-card p { color: var(--text-2); font-size: 15px; margin-top: 6px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 15px; }
.checklist .ck { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; display: grid; place-items: center; color: #fff; }
.checklist .ck svg { width: 13px; height: 13px; }
.checklist .done .ck { background: var(--success); border-color: var(--success); }
.checklist .done .t { color: var(--text-3); text-decoration: line-through; }
.checklist .grow { flex: 1; }
.checklist a { font-size: 14px; white-space: nowrap; }
.invite-code { font-family: var(--mono); font-size: 34px; font-weight: 600; letter-spacing: .12em; margin: 10px 0 4px; }
.copy-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--bg-alt); font-size: 13px; }
.copy-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); letter-spacing: 0; color: var(--text-2); }
.chart-empty { padding: 40px 0; text-align: center; color: var(--text-3); font-size: 14px; }
.section .hero-stage { padding: 0; max-width: none; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 2px; }
.auth-links a { font-size: 13px; }
.build-soon { opacity: .55; cursor: default; }
.build-soon:hover { background: var(--bg-alt); }
.platforms-compact .build-soon:hover { background: var(--surface); }
