:root {
  --bg: #0b0b10;
  --panel: #12121a;
  --panel-strong: #181824;
  --line: #292936;
  --ink: #f6f4ff;
  --muted: #9d9aaa;
  --purple: #8b5cf6;
  --cyan: #22d3ee;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 80% -10%, rgba(139, 92, 246, .16), transparent 36rem), var(--bg);
  font: 15px/1.7 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
.shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(11,11,16,.86); backdrop-filter: blur(16px); }
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 14px; }
.nav-links .active { color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; font-weight: 650; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.8); }
.button.primary { border-color: transparent; color: #fff; background: linear-gradient(120deg, var(--purple), #6d5dfc); }
.button.ghost { background: rgba(255,255,255,.03); }
.eyebrow { color: var(--cyan); font-size: 13px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 20px; font-size: clamp(42px, 7vw, 78px); line-height: 1.04; letter-spacing: -.055em; }
h2 { margin-bottom: 10px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.035em; }
h3 { margin-bottom: 8px; font-size: 18px; }
.muted { color: var(--muted); }
.hero { padding: 112px 0 90px; }
.hero-copy { max-width: 860px; }
.hero-copy p { max-width: 680px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section { padding: 68px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); }
.card:hover { border-color: rgba(139,92,246,.55); }
.icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, rgba(139,92,246,.8), rgba(34,211,238,.5)); font-weight: 800; }
.card p { margin-bottom: 0; color: var(--muted); }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.doc-row .arrow { color: var(--cyan); font-size: 20px; }
.footer { padding: 34px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 42px; padding: 48px 0 80px; }
.sidebar { position: sticky; top: 100px; align-self: start; }
.sidebar h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.side-link { display: block; padding: 8px 12px; margin: 3px 0; border-radius: 7px; color: var(--muted); }
.side-link:hover, .side-link.active { color: var(--ink); background: rgba(139,92,246,.14); }
.doc-content { min-width: 0; }
.doc-content h1 { font-size: clamp(36px, 5vw, 56px); }
.doc-content h2 { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 28px; }
.doc-content p, .doc-content li { color: #c8c5d2; }
.code { overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #08080c; color: #d7d2ff; font: 13px/1.7 "SFMono-Regular", Consolas, monospace; }
.callout { padding: 18px 20px; border-left: 3px solid var(--cyan); border-radius: 8px; background: rgba(34,211,238,.08); }
.external { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; border: 1px solid rgba(139,92,246,.5); border-radius: 12px; background: linear-gradient(120deg, rgba(139,92,246,.13), rgba(34,211,238,.06)); }
.external p { margin: 4px 0 0; color: var(--muted); }
.frame-wrap { overflow: hidden; margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.frame-wrap iframe { display: block; width: 100%; height: 720px; border: 0; }
@media (max-width: 800px) {
  .shell { width: min(var(--max), calc(100% - 28px)); }
  .nav-links a:not(.button) { display: none; }
  .hero { padding: 78px 0 58px; }
  .grid.three, .grid.two, .docs-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .section-head, .doc-row, .external { align-items: flex-start; flex-direction: column; }
  .frame-wrap iframe { height: 560px; }
}
.doc-lead { max-width: 760px; color: #c8c5d2; font-size: 18px; }
.doc-section h2 code, .doc-content p code, .steps code { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.05); color: #e3ddff; font-size: .9em; }
.tabs-note { display: inline-flex; margin: 10px 0 8px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.steps { display: grid; gap: 10px; padding-left: 22px; }
.kv { display: grid; grid-template-columns: minmax(110px, .35fr) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.kv > * { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
.kv span { color: var(--muted); background: rgba(255,255,255,.025); }
.kv code { overflow-wrap: anywhere; color: #ddd7ff; }
.tag { display: inline-flex; margin-bottom: 16px; padding: 3px 8px; border-radius: 999px; background: rgba(139,92,246,.14); color: #c9b8ff; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv > :nth-last-child(2) { border-bottom: 1px solid var(--line); } }
