:root {
  --bg-0: #041024;
  --bg-1: #0d1b36;
  --panel: rgba(13, 28, 58, 0.86);
  --panel-strong: rgba(7, 17, 39, 0.94);
  --text: #edf3ff;
  --text-soft: #c7d5ef;
  --text-muted: #9aaccd;
  --brand: #1f63ef;
  --brand-soft: #59b7ff;
  --border: rgba(89, 131, 209, 0.34);
  --shadow: 0 18px 40px rgba(2, 8, 20, 0.36);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(60rem 30rem at -12% -12%, rgba(30, 99, 239, 0.28), transparent 60%),
    radial-gradient(40rem 22rem at 110% 0%, rgba(89, 183, 255, 0.18), transparent 55%),
    linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 100%);
  color: var(--text);
  font: 16px/1.65 "Segoe UI", sans-serif;
}

a { color: inherit; }
code, pre { font-family: "Cascadia Code", "Consolas", monospace; }

.docs-shell {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.docs-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.docs-brand {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}

.docs-subtitle {
  color: var(--text-muted);
  margin: 4px 0 0;
}

.docs-top-nav {
  align-items: center;
  display: flex;
  gap: 12px;
}

.docs-top-nav a,
.docs-visibility {
  background: rgba(17, 37, 78, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  padding: 8px 14px;
  text-decoration: none;
}

.docs-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: 280px minmax(0, 1fr) 240px;
}

.sidebar,
.doc-article,
.toc,
.section-block,
.landing-hero {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 18px;
  position: sticky;
  top: 20px;
  height: fit-content;
}

.sidebar-group + .sidebar-group { margin-top: 18px; }

.sidebar h2,
.toc h2,
.related h2 {
  color: var(--text);
  font-size: 0.92rem;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar ul,
.toc ul,
.related ul { list-style: none; margin: 0; padding: 0; }

.sidebar li + li,
.toc li + li,
.related li + li { margin-top: 8px; }

.sidebar li a,
.toc a,
.related a {
  color: var(--text-soft);
  text-decoration: none;
}

.sidebar li.active a {
  color: var(--text);
  font-weight: 700;
}

.content { min-width: 0; }

.doc-article {
  padding: 28px;
}

.doc-article h1,
.landing-hero h1 {
  line-height: 1.15;
  margin-top: 0;
}

.doc-article h2,
.doc-article h3 {
  margin-top: 30px;
}

.doc-article p,
.doc-article li,
.landing-copy {
  color: var(--text-soft);
}

.doc-article pre {
  background: rgba(3, 10, 23, 0.88);
  border: 1px solid rgba(83, 122, 190, 0.34);
  border-radius: 14px;
  overflow: auto;
  padding: 14px;
}

.doc-article code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.12rem 0.35rem;
}

.doc-article pre code { background: transparent; padding: 0; }

.doc-article img {
  border: 1px solid var(--border);
  border-radius: 18px;
  display: block;
  margin: 20px 0;
  max-width: 100%;
  box-shadow: var(--shadow);
}

.toc {
  padding: 18px;
  position: sticky;
  top: 20px;
  height: fit-content;
}

.toc-depth-3 { margin-left: 12px; }

.related {
  border-top: 1px solid var(--border);
  margin-top: 34px;
  padding-top: 18px;
}

.landing-hero,
.section-block {
  padding: 26px;
}

.eyebrow {
  color: var(--brand-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.doc-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.doc-card {
  background: rgba(9, 20, 43, 0.8);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.doc-card h3 {
  margin: 8px 0 10px;
}

.doc-card p {
  color: var(--text-soft);
  margin: 0;
}

.doc-card a {
  text-decoration: none;
}

.doc-type {
  color: var(--brand-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .toc {
    position: static;
  }
}
