:root {
  --bg: #0a0d16; --panel: #11162a; --panel2: #161c34; --line: #232c4a; --text: #e9eefb; --muted: #8f9bb8;
  --accent: #4f9dff; --accent2: #9b6bff; --ok: #3ddc97; --warn: #ffb547; --bad: #ff5d6c; --r: 16px;
  --grad: linear-gradient(120deg, #4f9dff, #9b6bff);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-image: radial-gradient(900px 500px at 12% -5%, rgba(79, 157, 255, .16), transparent 70%), radial-gradient(800px 480px at 100% 4%, rgba(155, 107, 255, .13), transparent 70%); background-repeat: no-repeat; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code { background: #0b0f1d; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font: 13.5px ui-monospace, Consolas, monospace; }
kbd { background: #0b0f1d; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font: 12px ui-monospace, monospace; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0; } h2 { font-size: 34px; } h3 { font-size: 19px; }
p { margin: 0 0 14px; } .muted { color: var(--muted); } .small { font-size: 14px; }
img { max-width: 100%; display: block; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(10, 13, 22, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1180px; margin: 0 auto; padding: 10px 22px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); } .brand:hover { text-decoration: none; } .brand img { width: 32px; height: 32px; border-radius: 9px; }
.top nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.top nav a { color: var(--muted); padding: 6px 12px; border-radius: 9px; font-size: 14.5px; } .top nav a:hover, .top nav a.on { color: var(--text); background: var(--panel2); text-decoration: none; }
.menu-btn { display: none; margin-left: auto; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 6px 12px; font-size: 18px; }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
section { padding: 70px 0 10px; } section > .wrap > p.lead { font-size: 18px; color: var(--muted); max-width: 760px; margin-top: 12px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; padding: 70px 0 20px; font-size: 14.5px; }
.toc b { display: block; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 8px; }
.toc a { display: block; color: var(--muted); padding: 5px 12px; border-left: 2px solid var(--line); } .toc a:hover { color: var(--text); text-decoration: none; } .toc a.on { color: var(--text); border-color: var(--accent); background: linear-gradient(90deg, rgba(79, 157, 255, .12), transparent); }
.docs section { padding-top: 70px; } .docs section:first-child { padding-top: 70px; }

/* ---------- hero ---------- */
.hero { padding: 64px 22px 20px; text-align: center; }
.hero .logo { width: 108px; height: 108px; margin: 0 auto 22px; border-radius: 26px; box-shadow: 0 18px 50px rgba(79, 157, 255, .35); }
.hero h1 { font-size: clamp(38px, 6vw, 64px); } .hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: 20px; color: var(--muted); max-width: 720px; margin: 18px auto 28px; }
.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font-weight: 650; border: 1px solid var(--line); background: var(--panel2); color: var(--text); } .btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 10px 30px rgba(79, 157, 255, .35); }
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 22px; } .badges span { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }

/* ---------- phone gallery ---------- */
.gallery { margin: 38px auto 0; max-width: 860px; }
.tabs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 16px; cursor: pointer; font: inherit; font-size: 14px; } .tabs button.on { color: #fff; border-color: var(--accent); background: rgba(79, 157, 255, .2); }
.phone { background: linear-gradient(160deg, #1d2440, #05070d 60%); border: 2px solid #2f3a5a; border-radius: 38px; padding: 14px 26px 14px 16px; box-shadow: 0 30px 70px rgba(0, 0, 0, .55); position: relative; }
.phone::after { content: ""; position: absolute; right: 9px; top: 50%; width: 6px; height: 46px; margin-top: -23px; border-radius: 3px; background: #0a0d14; }
.phone img { border-radius: 22px; width: 100%; aspect-ratio: 844 / 390; object-fit: cover; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 18px; margin-top: 28px; } .g3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); } .g2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; } .card h3 { margin-bottom: 8px; } .card p:last-child { margin-bottom: 0; }
.card .ic { font-size: 28px; margin-bottom: 8px; }
.demo { max-width: 980px; margin: 8px auto 0; padding: 30px 22px 0; text-align: center; } .demo h2 { margin-bottom: 6px; } .demo video { width: 100%; margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; background: #05070d; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); }
.shot { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #05070d; cursor: zoom-in; } .shot img { width: 100%; }
.shot figcaption { padding: 10px 14px; color: var(--muted); font-size: 14px; background: var(--panel); } figure { margin: 0; }

/* ---------- steps ---------- */
.steps { counter-reset: s; display: grid; gap: 16px; margin-top: 26px; }
.step { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.step::before { counter-increment: s; content: counter(s); display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--grad); font-weight: 800; font-size: 19px; }
.step h3 { margin-bottom: 6px; } .step > div > :last-child { margin-bottom: 0; }

/* ---------- code ---------- */
.code { position: relative; background: #060913; border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.6 ui-monospace, Consolas, monospace; color: #cfe0ff; }
.code button { position: absolute; top: 8px; right: 8px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 3px 10px; font-size: 12px; cursor: pointer; } .code button:hover { color: #fff; }
.tok-c { color: #6f7ea6; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; } th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; } th { background: var(--panel); color: var(--muted); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; } tr:last-child td { border-bottom: none; }

/* ---------- misc ---------- */
.note { border-left: 3px solid var(--accent); background: rgba(79, 157, 255, .08); padding: 12px 16px; border-radius: 0 12px 12px 0; margin: 18px 0; }
.note.warn { border-color: var(--warn); background: rgba(255, 181, 71, .08); } .note.ok { border-color: var(--ok); background: rgba(61, 220, 151, .08); }
.diagram { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-top: 26px; } .diagram svg { width: 100%; height: auto; display: block; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin: 10px 0; } summary { cursor: pointer; padding: 12px 0; font-weight: 650; } details[open] summary { margin-bottom: 4px; }
footer { margin-top: 90px; border-top: 1px solid var(--line); padding: 36px 0 60px; color: var(--muted); font-size: 14px; } footer .wrap { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.lightbox { position: fixed; inset: 0; z-index: 99; background: rgba(3, 5, 10, .9); display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; } .lightbox.on { display: flex; } .lightbox img { max-height: 92vh; border-radius: 14px; box-shadow: 0 30px 80px #000; }

@media (max-width: 960px) {
  .docs { grid-template-columns: minmax(0, 1fr); } .toc { display: none; }
  .top nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--panel); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 14px 14px; } .top nav.open { display: flex; } .menu-btn { display: block; }
  h2 { font-size: 28px; } .phone { border-radius: 26px; padding: 8px 14px 8px 8px; } .phone img { border-radius: 16px; }
}
.docs > div, .docs section { min-width: 0; } body { overflow-x: hidden; }
