:root {
  --bg: #070a14;
  --bg-soft: #0b1020;
  --panel: rgba(17, 24, 43, 0.72);
  --panel-solid: #10172b;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.3);
  --text: #e8edf7;
  --muted: #8d99ae;
  --accent: #6ee7ff;
  --accent-2: #a78bfa;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
code, pre, .mono { font-family: var(--mono); }
code {
  background: rgba(110, 231, 255, 0.09);
  border: 1px solid rgba(110, 231, 255, 0.16);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.88em;
}
pre {
  background: #0a0f1e;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  overflow-x: auto;
  line-height: 1.6;
}
pre code { background: none; border: 0; padding: 0; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.main { padding-bottom: 90px; }

.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.76rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(700px 420px at 12% -8%, rgba(110, 231, 255, 0.14), transparent 62%),
    radial-gradient(760px 460px at 88% 4%, rgba(167, 139, 250, 0.14), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(52, 211, 153, 0.06), transparent 70%);
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 20, 0.76);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071018;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 0.98rem; }
.brand-text small { color: var(--muted); font-size: 0.74rem; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover, .nav a.active { color: var(--text); background: rgba(148, 163, 184, 0.1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.version-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 255, 0.35);
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.95), rgba(167, 139, 250, 0.95));
  color: #071018;
  font-weight: 650;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 8px 24px rgba(110, 231, 255, 0.18);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(110, 231, 255, 0.26); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(148, 163, 184, 0.14); box-shadow: none; }
.btn-sm { padding: 7px 14px; font-size: 0.84rem; }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
button.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.text-link { color: var(--accent); font-size: 0.9rem; }
.text-link:hover { text-decoration: underline; }

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  padding: 84px 0 56px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hero h1 { margin-bottom: 20px; }
.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { color: var(--muted); font-size: 1.05rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 0.82rem; }
.sep { width: 1px; height: 12px; background: var(--line-strong); }

.hero-visual { position: relative; }
.window {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, #0e1528, #0a0f1e);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.04);
}
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2c3852; }
.window-bar span:first-child { background: #f87171; }
.window-bar span:nth-child(2) { background: #fbbf24; }
.window-bar span:nth-child(3) { background: #34d399; }
.window-bar em { margin-left: auto; font-style: normal; font-size: 0.74rem; color: var(--muted); }
.window-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.chat-line { border-radius: 12px; padding: 12px 14px; font-size: 0.84rem; line-height: 1.6; }
.chat-line.user { align-self: flex-end; background: rgba(110, 231, 255, 0.1); border: 1px solid rgba(110, 231, 255, 0.18); max-width: 88%; }
.chat-line.agent { display: flex; gap: 10px; background: rgba(148, 163, 184, 0.06); border: 1px solid var(--line); }
.chat-line p { margin: 0 0 6px; }
.chat-line p:last-child { margin: 0; }
.chat-line .ok { color: var(--ok); font-size: 0.78rem; }
.agent-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--accent-2); flex: none; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-row span {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--line);
  color: var(--muted);
}
.tool-row .tool-ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.3); }
.float-card {
  position: absolute;
  right: -14px;
  bottom: -26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  max-width: 230px;
}
.float-card strong { color: var(--accent); font-size: 0.86rem; }
.float-card span { color: var(--muted); font-size: 0.76rem; }

/* stats */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 26px 0 70px;
}
.stat-strip > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 22px 26px;
  background: rgba(11, 16, 32, 0.92);
}
.stat-strip strong { font-size: 1.8rem; letter-spacing: -0.03em; }
.stat-strip span { color: var(--muted); font-size: 0.82rem; }

/* sections */
.section { padding: 36px 0; }
.section.tight { padding-top: 10px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 32px; }
.section-head.compact { margin-bottom: 22px; align-items: center; }
.section-head h2 { margin: 0; }
.section-sub { color: var(--muted); max-width: 440px; font-size: 0.92rem; margin: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
a.card:hover { transform: translateY(-3px); border-color: rgba(110, 231, 255, 0.35); background: rgba(23, 32, 56, 0.8); }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-grid.three { grid-template-columns: repeat(3, 1fr); }
.feature .icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(110, 231, 255, 0.1);
  border: 1px solid rgba(110, 231, 255, 0.2);
  color: var(--accent);
  font-size: 1.1rem;
}
.feature h3 { font-size: 1rem; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 0.86rem; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(110, 231, 255, 0.08);
  border: 1px solid rgba(110, 231, 255, 0.18);
  border-radius: 999px;
  padding: 3px 10px;
}
.article-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.excerpt {
  color: var(--muted);
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
  min-height: 4.2em;
}
.card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.read-more { color: var(--accent); font-size: 0.82rem; }

.release-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.release-card { display: flex; flex-direction: column; gap: 8px; }
.release-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.release-card h3 { font-size: 0.98rem; margin: 0; word-break: break-word; }
.release-card .read-more { margin-top: auto; padding-top: 10px; }
.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.category-card { display: flex; align-items: center; gap: 18px; padding: 20px 22px; }
.cat-emoji {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 12px;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  font-size: 1.25rem;
}
.category-card h3 { font-size: 0.98rem; margin: 0 0 4px; }
.category-card p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.count { margin-left: auto; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }

/* page head */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding: 64px 0 36px;
}
.page-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 12px; }
.page-head .lead { margin: 0; }
.search { display: flex; gap: 8px; align-items: center; }
.search input {
  width: 280px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(11, 16, 32, 0.8);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(110, 231, 255, 0.12); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 26px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.05);
  color: var(--muted);
  font-size: 0.84rem;
}
.pill span { font-family: var(--mono); font-size: 0.72rem; opacity: 0.8; }
.pill:hover { border-color: var(--line-strong); color: var(--text); }
.pill.active { background: rgba(110, 231, 255, 0.1); border-color: rgba(110, 231, 255, 0.35); color: var(--accent); }

.pager { display: flex; align-items: center; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.pager-btn, .pager-num {
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}
.pager-num { min-width: 38px; text-align: center; }
.pager-num.active { background: rgba(110, 231, 255, 0.12); border-color: rgba(110, 231, 255, 0.35); color: var(--accent); }
.pager-btn.disabled { opacity: 0.4; }
.pager a:hover { border-color: var(--line-strong); color: var(--text); }

/* article */
.article { max-width: 780px; margin: 0 auto; padding-top: 52px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.8rem; margin-bottom: 26px; }
.crumbs a:hover { color: var(--accent); }
.article-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 0.82rem; margin-top: 18px; }
.article-body { margin-top: 38px; }
.prose { font-size: 1rem; line-height: 1.85; color: #cfd8e8; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 2em; margin-bottom: 0.7em; }
.prose h2 { font-size: 1.45rem; padding-bottom: 0.35em; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 1.15rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.prose li { margin: 0.35em 0; }
.prose blockquote {
  margin: 1.4em 0;
  padding: 4px 20px;
  border-left: 3px solid var(--accent-2);
  background: rgba(167, 139, 250, 0.06);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.9rem; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.prose th { background: rgba(148, 163, 184, 0.06); }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.article-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line); }
.related { max-width: 780px; margin: 0 auto; }

/* downloads */
.download-note {
  max-width: 320px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.06);
  font-size: 0.84rem;
}
.download-note strong { display: block; color: var(--ok); margin-bottom: 4px; }
.download-note span { color: var(--muted); }
.download-grid { grid-template-columns: repeat(3, 1fr); }
.download-card { gap: 6px; }
.download-card .card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.info-card h3 { margin-bottom: 12px; }
.info-card p { font-size: 0.88rem; }
.steps { margin: 0; padding-left: 1.3em; color: var(--muted); font-size: 0.88rem; }
.steps li { margin-bottom: 10px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 640px; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th { color: var(--muted); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(148, 163, 184, 0.04); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .filename { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.data-table tr:hover td { background: rgba(148, 163, 184, 0.03); }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { position: relative; }
.step-num { font-family: var(--mono); color: var(--accent); font-size: 0.8rem; letter-spacing: 0.1em; }
.step-card h3 { margin-top: 12px; }
.step-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.check-list { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: 0.88rem; }
.check-list li { margin-bottom: 8px; }
details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 0.88rem;
}
details:first-of-type { border-top: 0; }
summary { cursor: pointer; color: var(--text); }
details p { margin: 8px 0 0; color: var(--muted); }
.callout {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 30px 34px;
  border-radius: var(--radius);
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.06), rgba(248, 113, 113, 0.04));
}
.callout h3 { margin-bottom: 6px; }
.callout p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.callout .btn { flex: none; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: rgba(7, 10, 20, 0.7); padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid h4 { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-grid a, .footer-grid p { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 10px; }
.footer-grid a:hover { color: var(--accent); }
.footer-brand p { max-width: 300px; margin-top: 16px; }
.brand-static { cursor: default; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }

/* error */
.error-page { text-align: center; padding: 120px 0; max-width: 520px; margin: 0 auto; }
.error-code {
  font-family: var(--mono);
  font-size: 4.5rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
}
.error-page .hero-actions { justify-content: center; }

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 64px; }
  .hero-visual { max-width: 640px; }
  .feature-grid, .feature-grid.three { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .release-grid, .download-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 32px, 1180px); }
  .header-inner { height: 64px; gap: 14px; }
  .header-actions .version-pill { display: none; }
  .hero { padding-top: 48px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); margin-bottom: 46px; }
  .section-head, .page-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .search { width: 100%; }
  .search input { flex: 1; width: auto; }
  .feature-grid, .feature-grid.three, .card-grid, .release-grid, .download-grid,
  .category-grid, .steps-grid, .split, .footer-grid { grid-template-columns: 1fr; }
  .callout { flex-direction: column; align-items: flex-start; gap: 18px; }
  .article { padding-top: 34px; }
  .float-card { position: static; margin-top: 16px; max-width: none; }
  .window { transform: none; }
  .download-note { max-width: none; }
}
