:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #0d1526;
  --ink-2: #263247;
  --muted: #5d6b82;
  --faint: #8a97ab;
  --line: #e4e8f0;
  --line-soft: #eef1f7;
  --brand: #5b5bf0;
  --brand-2: #06b6d4;
  --brand-ink: #3a3ad6;
  --brand-soft: #eef0ff;
  --dark: #0a0f1e;
  --dark-2: #10182c;
  --ok: #0f9f6e;
  --warn: #b45309;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13, 21, 38, 0.04), 0 10px 30px rgba(13, 21, 38, 0.06);
  --shadow-lg: 0 20px 60px rgba(13, 21, 38, 0.16);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; }
code, kbd, pre { font-family: var(--mono); }
code {
  font-size: 0.88em;
  background: #eef1f8;
  border: 1px solid #e3e8f2;
  border-radius: 5px;
  padding: 1px 5px;
  color: #33406a;
  white-space: nowrap;
}
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: 0.35em 0; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 34px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 6px 16px rgba(91, 91, 240, 0.28); }
.brand-text { display: flex; align-items: baseline; gap: 5px; letter-spacing: -0.02em; }
.brand-text b { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.brand-text small { font-size: 12px; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: 0.08em; margin-left: 2px; }
.topnav { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.topnav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.topnav a:hover { background: #f1f3fa; color: var(--ink); }
.topnav a.active { color: var(--brand-ink); background: var(--brand-soft); }
.topnav .ext { font-size: 11px; color: var(--faint); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 24px; font-size: 15px; border-radius: 11px; }
.btn-primary {
  background: linear-gradient(135deg, #6161f2, #4c4ce0);
  color: #fff;
  box-shadow: 0 6px 18px rgba(76, 76, 224, 0.28);
}
.btn-primary:hover { box-shadow: 0 9px 24px rgba(76, 76, 224, 0.38); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #c9d0e0; background: #fbfcff; }
.hero .btn-ghost, .cta .btn-ghost { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.hero .btn-ghost:hover, .cta .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.32); }

.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 9px;
  cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; background: var(--ink-2); border-radius: 2px; margin: 3px 0; }

/* ---------------- Layout ---------------- */
.page { max-width: 1440px; margin: 0 auto; }
.page.has-sidebar {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  align-items: start;
}
.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 26px 18px 40px 28px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
  scrollbar-width: thin;
}
.side-group { margin-bottom: 26px; }
.side-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 8px 10px;
}
.sidebar a, .side-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.45;
  transition: background 0.12s, color 0.12s;
}
.sidebar a:hover { background: #eff2f9; color: var(--ink); }
.sidebar a.active, .sidebar a.sub.active { color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }
.sidebar a.sub { padding-left: 18px; color: var(--muted); font-size: 13px; }
.side-cat { color: var(--ink); font-weight: 600; margin-top: 6px; padding-left: 10px; }
.side-cat.active { color: var(--brand-ink); }
.sidebar .count {
  font-size: 11px;
  color: var(--faint);
  background: #eef1f8;
  border-radius: 20px;
  padding: 1px 7px;
  font-weight: 600;
}
.sidebar a.active .count { background: #dfe3ff; color: var(--brand-ink); }
.main { min-width: 0; padding: 44px 56px 100px; }
.page.has-sidebar .main { max-width: 1040px; }
.page-wide .main { max-width: 1280px; margin: 0 auto; padding: 44px 32px 96px; }
body.home .main { padding: 0; max-width: none; }

/* ---------------- Shared bits ---------------- */
.lead { font-size: 17px; color: var(--muted); line-height: 1.75; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 30px; }
.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand);
  margin-bottom: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: #eef1f8;
  border: 1px solid #e2e7f1;
}
.pill.tone-entry { color: #0b7a5a; background: #e7f8f1; border-color: #c6f0e0; }
.pill.tone-control { color: #6b46c1; background: #f1ecff; border-color: #e3d9ff; }

/* ---------------- Code block ---------------- */
.codeblock {
  background: #0b1020;
  border-radius: 12px;
  overflow: hidden;
  margin: 14px 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 30px rgba(7, 11, 24, 0.16);
  max-width: 100%;
  min-width: 0;
}
.codebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--mono);
  font-size: 11.5px;
  color: #8b97b5;
  letter-spacing: 0.04em;
}
.codebar::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 11px 0 #febc2e, 22px 0 #28c840;
  margin-right: -14px;
}
.codeblock pre {
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  max-width: 100%;
  font-size: 12.8px;
  line-height: 1.7;
  color: #dbe3f5;
  tab-size: 2;
}
.codeblock code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; font-size: inherit; }
.copy {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #aab4cc;
  font-size: 11px;
  border-radius: 5px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.copy:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.copy.done { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); }
.tk-key { color: #93c5fd; }
.tk-str { color: #a7f3d0; }
.tk-bool { color: #fca5a5; }
.tk-num { color: #fcd34d; }
.tk-null { color: #fca5a5; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(91, 91, 240, 0.42), transparent 60%),
    radial-gradient(700px 420px at 90% 10%, rgba(6, 182, 212, 0.22), transparent 60%),
    linear-gradient(180deg, #0a0f1e 0%, #0c1326 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 84px 32px 96px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 60px;
  align-items: center;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hero .pill { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.12); color: #c3cbe2; }
.hero h1 {
  font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #fff;
  margin-bottom: 22px;
}
.grad {
  background: linear-gradient(100deg, #8b8bff 0%, #4cc9f0 55%, #7ef0c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { color: #a9b4cc; font-size: 17px; max-width: 560px; }
.hero .lead code { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: #c9d4ee; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 22px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 18px; color: #7f8ba6; font-size: 13px; }
.hero-points span { color: #8fa0c0; }
.hero-copy, .hero-visual, .window, .hero-grid > * { min-width: 0; }
.hero-visual { position: relative; }
.hero-visual .glow {
  position: absolute; inset: -30px;
  background: radial-gradient(closest-side, rgba(91, 91, 240, 0.3), transparent 75%);
  filter: blur(20px);
  z-index: 0;
}
.window {
  position: relative;
  z-index: 1;
  background: rgba(13, 20, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 4px 8px 10px; }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }
.window-bar span { margin-left: 8px; font-family: var(--mono); font-size: 11.5px; color: #73809e; }
.window .codeblock { margin: 0; border: 0; box-shadow: none; background: transparent; }
.window .codebar { display: none; }
.window .codeblock pre { max-height: 310px; font-size: 12.2px; padding: 4px 12px 12px; }
.window-terminal {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px 10px;
  font-family: var(--mono);
  font-size: 11.8px;
  line-height: 1.85;
  color: #b8c4de;
  word-break: break-all;
}
.window-terminal .prompt { color: #6ee7b7; margin-right: 4px; }
.terminal-ok { color: #86efac; }
.terminal-out { color: #93c5fd; }

.stats {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: -38px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 18px 10px;
}
.stats > div { text-align: center; padding: 8px 12px; border-right: 1px solid var(--line-soft); }
.stats > div:last-child { border-right: 0; }
.stats b { display: block; font-size: 28px; letter-spacing: -0.03em; color: var(--ink); line-height: 1.2; }
.stats span { font-size: 12.5px; color: var(--muted); }

/* ---------------- Sections ---------------- */
.section { max-width: 1200px; margin: 0 auto; padding: 78px 32px 10px; }
.section-alt { max-width: none; padding: 70px 32px; margin-top: 70px; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-alt > * { max-width: 1136px; margin-left: auto; margin-right: auto; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 750; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 15.5px; margin: 0; }

.pipeline { display: flex; align-items: stretch; gap: 10px; }
.step {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  position: relative;
}
.step-no { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 14px; }
.step h3 { font-size: 16px; margin-bottom: 8px; }
.step p { font-size: 13.5px; color: var(--muted); margin: 0; }
.step-arrow { display: flex; align-items: center; color: #c3cad9; font-size: 18px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d6ddef; }
.feature-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eef0ff, #e6fbff);
  color: var(--brand-ink);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 14px;
}
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--muted); margin: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cfd7ea; }
.cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cat-head h3 { font-size: 18px; }
.cat-count { font-family: var(--mono); font-size: 12px; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 9px; border-radius: 20px; font-weight: 700; }
.cat-card p { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chips span { font-size: 11.5px; color: var(--ink-2); background: #f2f4fa; border: 1px solid #e8ebf4; border-radius: 6px; padding: 2px 7px; }
.chips .more { color: var(--faint); background: transparent; border-style: dashed; }
.cat-link { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--brand-ink); }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quick-step { background: #fbfcff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.quick-step > span {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.quick-step h3 { font-size: 15px; margin-bottom: 6px; }
.quick-step .codeblock { margin-bottom: 0; }
.quick-step .codeblock pre { font-size: 11.5px; padding: 12px; }

.eco-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.eco-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.eco-card:hover { border-color: #cfd7ea; box-shadow: var(--shadow); }
.eco-card b { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.eco-card > span { font-size: 11.5px; color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.eco-card p { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }

.cta {
  max-width: 1136px;
  margin: 80px auto;
  padding: 44px 46px;
  border-radius: 22px;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(6, 182, 212, 0.25), transparent 60%),
    linear-gradient(135deg, #141c33, #0b1020);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.cta h2 { color: #fff; font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 8px; }
.cta p { color: #9aa7c2; margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-shrink: 0; }

/* ---------------- Footer ---------------- */
.footer { background: #fff; border-top: 1px solid var(--line); margin-top: 90px; }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 32px 34px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 50px;
}
.footer-brand p { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; max-width: 360px; }
.footer-meta { color: var(--faint) !important; font-size: 12px !important; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.footer-cols h4 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.footer-cols a { display: block; font-size: 13.5px; color: var(--ink-2); padding: 3px 0; }
.footer-cols a:hover { color: var(--brand-ink); }
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 32px 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--faint);
}

/* ---------------- Docs ---------------- */
.doc-head { padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12.5px; color: var(--faint); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-ink); }
.breadcrumb span { color: #c3cad9; }
.doc-head h1 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 780; margin-bottom: 12px; }
.doc-head .lead { max-width: 760px; margin: 0; }
.doc-section { padding: 10px 0 30px; border-bottom: 1px solid var(--line-soft); margin-bottom: 26px; }
.doc-section:last-of-type { border-bottom: 0; }
.doc-section h2 { font-size: 25px; font-weight: 750; margin: 18px 0 16px; letter-spacing: -0.025em; }
.doc-section h2::before { content: "#"; color: #c7cee0; margin-right: 8px; font-weight: 500; }
.doc-section h3 { font-size: 17px; margin: 26px 0 10px; }
.doc-section p { color: var(--ink-2); }
.doc-section ul, .doc-section ol { color: var(--ink-2); }
.doc-section code { white-space: break-spaces; }
.doc-section a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.callout {
  background: #f4f7ff;
  border: 1px solid #dfe6ff;
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 16px 0;
}
.callout.warn { background: #fff9ed; border-color: #f6e3bd; border-left-color: #d97706; }
.callout strong { color: var(--ink); }
.arch {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
  padding: 20px;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.arch-node {
  flex: 1;
  min-width: 170px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.arch-node b { font-size: 13.5px; }
.arch-node span { font-size: 11.5px; color: var(--muted); }
.arch-node.accent { border-color: #cfd3ff; background: linear-gradient(135deg, #f3f4ff, #f0fbff); }
.arch-node.accent b { color: var(--brand-ink); }
.arch-arrow { font-family: var(--mono); font-size: 10.5px; color: var(--faint); display: flex; align-items: center; gap: 4px; }
.arch-arrow::before, .arch-arrow::after { content: ""; width: 16px; height: 1px; background: #cfd6e4; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin: 14px 0 20px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { background: #f8f9fd; font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { font-size: 11.8px; }
.props-table td:first-child { white-space: nowrap; }
.prop-label { font-size: 11px; color: var(--faint); margin-top: 2px; }
.prop-options { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.prop-options code { font-size: 11px; }
.yes { color: #0b7a5a; font-size: 12px; font-weight: 600; }
.no { color: var(--faint); font-size: 12px; }
.dep-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fbf7ff;
  border: 1px solid #eadcff;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink-2);
  margin: 14px 0;
}
.dep-banner b { flex-shrink: 0; color: #6b46c1; }
.doc-next { display: flex; gap: 12px; margin-top: 34px; }

/* ---------------- Catalog ---------------- */
.catalog-head { margin-bottom: 28px; }
.catalog-tools { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.search-box { position: relative; max-width: 560px; }
.search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 44px 0 38px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box input:focus { border-color: #b9bdfa; box-shadow: 0 0 0 4px rgba(91, 91, 240, 0.1); }
.search-icon { position: absolute; left: 13px; top: 9px; color: var(--faint); font-size: 17px; }
.search-box kbd {
  position: absolute; right: 10px; top: 10px;
  font-size: 11px; color: var(--faint);
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; background: #f8f9fd;
}
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.filter span { color: var(--faint); font-size: 11px; margin-left: 3px; }
.filter:hover { border-color: #cfd6e6; }
.filter.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter.active span { color: #aeb8cc; }
.search-status { font-size: 12.5px; color: var(--faint); margin-top: 12px; min-height: 18px; }
.node-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.node-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.node-card:hover { transform: translateY(-2px); border-color: #cfd7ea; box-shadow: var(--shadow); }
.node-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.node-card-top code { font-size: 11px; background: #f2f4fa; border-color: #e8ebf4; color: #4a5878; }
.node-cat { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: #f1f3f9; color: var(--muted); white-space: nowrap; }
.node-cat.entry { background: #e7f8f1; color: #0b7a5a; }
.node-cat.data { background: #eaf3ff; color: #1d5fbf; }
.node-cat.control { background: #f1ecff; color: #6b46c1; }
.node-cat.call { background: #fff3e6; color: #b45309; }
.node-cat.integration { background: #e8f7fb; color: #0e7490; }
.node-card h3 { font-size: 16.5px; margin-bottom: 5px; }
.node-card p { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.6; }
.node-card-foot { margin-top: auto; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); }
.node-card-foot .go { color: var(--brand-ink); font-weight: 600; }
.empty { text-align: center; color: var(--faint); padding: 60px 0; font-size: 14px; }

/* ---------------- Node detail ---------------- */
.node-head { border-bottom: 1px solid var(--line); }
.node-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.node-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.node-head h1 { margin-bottom: 6px; }
.node-type { font-size: 12.5px; color: var(--faint); margin: 0; }
.node-type code { font-size: 11.5px; }
.related { display: flex; flex-wrap: wrap; gap: 8px; }
.related a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.related a:hover { border-color: #cfd7ea; box-shadow: var(--shadow); }
.related code { background: none; border: 0; padding: 0; color: var(--brand-ink); font-size: 11.5px; }
.related span { color: var(--ink-2); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; }
.pager-item {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pager-item:hover { border-color: #cfd7ea; }
.pager-item span { font-size: 11px; color: var(--faint); }
.pager-item b { font-size: 13.5px; font-weight: 600; }
.pager-item.next { text-align: right; }

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 40;
  font-size: 16px;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1120px) {
  .hero-grid { gap: 36px; padding: 68px 28px 84px; }
  .feature-grid, .cat-grid, .quick-grid, .eco-grid { grid-template-columns: repeat(2, 1fr); }
  .node-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { display: grid; grid-template-columns: 1fr 1fr; }
  .step-arrow { display: none; }
  .topnav { display: none; }
  .menu-toggle { display: block; }
  body.menu-open .topnav {
    display: flex;
    position: absolute;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 16px;
    gap: 2px;
    box-shadow: var(--shadow);
  }
  body.menu-open .topnav a { padding: 10px 12px; }
  .page.has-sidebar { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    width: 290px;
    z-index: 55;
    background: #fff;
    border-right: 1px solid var(--line);
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .main { padding: 34px 24px 80px; }
  .page.has-sidebar .main { max-width: none; }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; padding: 52px 22px 72px; }
  .hero h1 { font-size: 38px; }
  .hero-visual { order: 2; }
  .stats { margin: -28px 18px 0; grid-template-columns: repeat(3, 1fr); }
  .stats > div:nth-child(4), .stats > div:nth-child(5) { display: none; }
  .section { padding: 54px 20px 0; }
  .section-alt { padding: 52px 20px; margin-top: 52px; }
  .feature-grid, .cat-grid, .quick-grid, .eco-grid, .node-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .cta { margin: 54px 16px; padding: 30px 24px; flex-direction: column; align-items: flex-start; }
  .cta-actions { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; padding: 36px 20px 24px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { padding: 16px 20px 24px; flex-direction: column; }
  .page-wide .main { padding: 32px 20px 72px; }
  .doc-head h1 { font-size: 30px; }
  .doc-section h2 { font-size: 22px; }
  .node-title-row { flex-direction: column; }
  .arch { flex-direction: column; align-items: stretch; }
  .arch-arrow { display: none; }
  .pager { grid-template-columns: 1fr; }
  .pager-item.next { text-align: left; }
  .brand-text small { display: none; }
  .hero .lead { font-size: 15px; }
}

@media (max-width: 480px) {
  .topbar-inner { padding: 0 16px; gap: 12px; }
  .top-actions .btn-primary { display: none; }
  .hero h1 { font-size: 32px; }
  .hero-actions .btn { width: 100%; }
  .stats b { font-size: 22px; }
  .stats span { font-size: 11px; }
}

/* ---------------- 动效层 ---------------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes glowPulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .95; transform: scale(1.12); } }
@keyframes arrowSlide { to { background-position: -200% 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -100% 0; } }

/* 滚动入场（无 JS 时保持内容可见） */
.js .reveal,
.js .reveal-group > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s cubic-bezier(.2, .7, .2, 1), transform .65s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}
.js .reveal.in,
.js .reveal-group.in > * { opacity: 1; transform: none; }
.reveal-group.in > *:nth-child(1) { transition-delay: .02s; }
.reveal-group.in > *:nth-child(2) { transition-delay: .08s; }
.reveal-group.in > *:nth-child(3) { transition-delay: .14s; }
.reveal-group.in > *:nth-child(4) { transition-delay: .2s; }
.reveal-group.in > *:nth-child(5) { transition-delay: .26s; }
.reveal-group.in > *:nth-child(6) { transition-delay: .32s; }
.reveal-group.in > *:nth-child(7) { transition-delay: .38s; }
.reveal-group.in > *:nth-child(8) { transition-delay: .44s; }
.reveal-group.in > *:nth-child(9) { transition-delay: .5s; }

/* Hero 微动 */
.hero .window { animation: floaty 7s ease-in-out infinite; }
.hero .glow { animation: glowPulse 7s ease-in-out infinite; }
.window-terminal::after {
  content: '▍';
  margin-left: 3px;
  color: #6ee7b7;
  animation: blink 1.1s step-end infinite;
}

/* 统计条 */
.stats b {
  background: linear-gradient(120deg, #4f46e5 10%, #0ea5e9 60%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats > div { transition: transform .28s ease; }
.stats > div:hover { transform: translateY(-4px); }

/* 流水线 */
.step { overflow: hidden; transition: transform .28s, box-shadow .28s, border-color .28s; }
.step::before {
  content: '';
  position: absolute;
  left: 0; top: 20px; bottom: 20px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(#6366f1, #06b6d4);
  opacity: 0;
  transform: scaleY(.25);
  transform-origin: top;
  transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.step::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(99, 102, 241, .12), transparent 62%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.step:hover::before { opacity: 1; transform: none; }
.step:hover::after { opacity: 1; }
.step-arrow {
  background: linear-gradient(90deg, #c3cad9 0%, #6366f1 45%, #06b6d4 55%, #c3cad9 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: arrowSlide 3.4s linear infinite;
}

/* 能力卡 */
.feature { position: relative; overflow: hidden; }
.feature::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(99, 102, 241, .13), transparent 65%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfd7ea; }
.feature:hover::before { opacity: 1; }
.feature-icon { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.feature:hover .feature-icon {
  transform: translateY(-2px) rotate(-6deg) scale(1.07);
  box-shadow: 0 8px 18px rgba(99, 102, 241, .18);
}

/* 节点分类卡 */
.cat-card { position: relative; overflow: hidden; }
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(99, 102, 241, .08), transparent 42%, rgba(6, 182, 212, .08));
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.cat-card:hover::before { opacity: 1; }
.cat-card > * { position: relative; z-index: 1; }
.cat-card:hover .cat-count { background: var(--brand); color: #fff; transform: scale(1.08); }
.cat-count { transition: background .3s, color .3s, transform .3s; }
.chips span { transition: background .25s, border-color .25s, color .25s, transform .25s; }
.cat-card:hover .chips span { background: #eef1ff; border-color: #dfe4ff; color: var(--brand-ink); }
.cat-card:hover .chips span:nth-child(2) { transition-delay: .02s; }
.cat-card:hover .chips span:nth-child(3) { transition-delay: .04s; }
.cat-card:hover .chips span:nth-child(4) { transition-delay: .06s; }
.cat-card:hover .chips span:nth-child(5) { transition-delay: .08s; }
.cat-card:hover .chips span:nth-child(6) { transition-delay: .1s; }
.cat-link { transition: transform .28s, color .25s; }
.cat-card:hover .cat-link { transform: translateX(5px); }

/* 快速开始 */
.quick-step { transition: transform .28s, box-shadow .28s, border-color .28s; }
.quick-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfd7ea; }
.quick-step > span { transition: transform .4s cubic-bezier(.2, .8, .2, 1), background .3s; }
.quick-step:hover > span { transform: rotate(-8deg) scale(1.12); background: var(--brand); }

/* 生态卡 */
.eco-card { transition: transform .28s, border-color .28s, box-shadow .28s; }
.eco-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfd7ea; }

/* CTA 光效 */
.cta { position: relative; overflow: hidden; }
.cta::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  right: -140px; top: -260px;
  background: radial-gradient(circle, rgba(99, 102, 241, .5), transparent 66%);
  pointer-events: none;
  animation: glowPulse 8s ease-in-out infinite;
}
.cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, .09) 47%, transparent 62%);
  background-size: 250% 100%;
  pointer-events: none;
  animation: shimmer 7s linear infinite;
}
.cta > * { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal, .js .reveal-group > * { opacity: 1 !important; transform: none !important; }
}
