:root {
  --bg: #07070c;
  --bg2: #0d1117;
  --card: #121826;
  --line: #27324a;
  --text: #edf3ff;
  --muted: #9db0d1;
  --cyan: #77e8ff;
  --violet: #b794ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(900px 420px at -10% -10%, #16304d 0%, transparent 55%),
    radial-gradient(700px 330px at 105% -20%, #34204b 0%, transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
}
.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: .03;
  background-image: radial-gradient(#fff 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}
.shell { max-width: 1100px; margin: 0 auto; padding: 20px 16px 64px; position: relative; z-index: 1; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(14, 20, 32, .7); backdrop-filter: blur(8px);
}
.brand { font-weight: 700; letter-spacing: .2px; }
.topbar nav { display: flex; gap: 12px; }
.topbar a { color: #dbe8ff; text-decoration: none; font-size: .94rem; opacity: .9; }
.topbar a:hover { opacity: 1; }

.hero {
  margin-top: 14px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px;
}
.badge {
  display: inline-block; margin: 0 0 8px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid #35557a; color: #bfeeff; background: rgba(20, 49, 79, .6);
  font-size: .82rem; letter-spacing: .03em;
}
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.02; }
h1 span { color: var(--cyan); }
.lead { color: var(--muted); max-width: 720px; font-size: 1.05rem; line-height: 1.55; }
.cta-row { display: flex; gap: 10px; margin-top: 14px; }

.hero-card {
  background: linear-gradient(180deg, #121a2a, #0f1522);
  border: 1px solid var(--line); border-radius: 16px; padding: 14px;
}
.hero-card h3 { margin-top: 0; }
.hero-card p { color: var(--muted); margin-bottom: 0; }

.btn {
  border: 1px solid #32506f; color: #dff6ff; text-decoration: none;
  padding: 10px 14px; border-radius: 10px; font-weight: 700; display: inline-block;
  cursor: pointer;
}
.btn.primary { background: linear-gradient(180deg, #1f4864, #16354a); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .65; cursor: wait; }

.stats {
  margin-top: 14px; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
}
.stats article {
  background: #0f1623; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.stats h4 { margin: 0 0 8px; color: #cce7ff; }
.stats p { margin: 0; color: var(--muted); }

.panel {
  margin-top: 14px; background: linear-gradient(180deg, var(--card), #0e1522);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px;
}
.panel h2 { margin-top: 0; font-size: 1.4rem; }
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
ol { padding-left: 20px; }
li { margin: 8px 0; color: #d3def2; }

pre {
  margin: 8px 0 12px;
  background: #0a1019; border: 1px solid #1d293d; border-radius: 10px;
  padding: 10px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  color: #d7ecff;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--muted); }

.result {
  margin-top: 12px; display: grid; gap: 10px;
  border: 1px dashed #3a5b80; border-radius: 12px; padding: 12px; background: #0b1320;
}
.result label { display: block; margin-bottom: 6px; color: #c5dcff; font-weight: 700; }
.hidden { display: none; }

.footer {
  margin-top: 16px; border-top: 1px solid #213049; padding-top: 14px;
  display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap;
}
.footer p { margin: 4px 0 0; color: var(--muted); }
.links { display: flex; gap: 12px; }
.links a { color: #d8ecff; text-decoration: none; border-bottom: 1px dotted #55779d; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
}
