:root {
  color-scheme: dark;
  --bg: #07080a;
  --panel: #101216;
  --panel-soft: #0c0e12;
  --text: #f2f4f8;
  --muted: #9aa3b2;
  --muted-strong: #d1d6df;
  --border: #2f343d;
  --accent: #26c84f;
  --link: #9eb8ff;
  --link-hover: #c6d4ff;
  --code: #1b1e24;
  --shadow: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

::selection {
  background: #3a4352;
  color: #ffffff;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #101216 0%, #08090c 44%, #050609 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

.site-header {
  align-items: center;
  background: rgba(12, 14, 18, 0.94);
  border-bottom: 1px solid #3a3f47;
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: #0d1711;
  border: 1px solid rgba(38, 200, 79, 0.36);
  border-radius: 8px;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand-mark img {
  display: block;
  height: 27px;
  width: 31px;
}

.brand strong,
.brand em {
  display: block;
  line-height: 1;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand em {
  color: var(--accent);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.top-nav a,
.side-nav a {
  color: var(--muted-strong);
  font-size: 14px;
  text-decoration: none;
}

.top-nav a {
  display: inline-grid;
}

.top-nav a::before {
  content: attr(data-label);
  font-weight: 700;
  grid-area: 1 / 1;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

.top-nav a:hover,
.side-nav a:hover {
  color: var(--text);
  font-weight: 700;
}

.top-nav a.active,
.side-nav a.active {
  color: var(--text);
  font-weight: 700;
}

.site-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.side-nav {
  align-self: start;
  padding: 8px 20px 24px 0;
  position: sticky;
  top: 78px;
}

.side-nav p {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 18px 0 8px;
  text-transform: uppercase;
}

.side-nav p:first-child {
  margin-top: 0;
}

.side-nav a {
  display: block;
  border-radius: 6px;
  margin: 2px 0;
  padding: 5px 8px;
}

.side-nav a:hover {
  background: transparent;
}

.content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 80px var(--shadow);
  margin-left: 28px;
  min-width: 0;
  padding: 34px;
}

.content h1 {
  font-size: 40px;
  line-height: 1.12;
  margin: 0 0 18px;
}

.content h2 {
  border-top: 1px solid var(--border);
  font-size: 24px;
  margin-top: 34px;
  padding-top: 26px;
}

.content h3 {
  font-size: 18px;
  margin-top: 24px;
}

.content p,
.content li {
  color: var(--muted-strong);
}

.content strong,
.content h1,
.content h2,
.content h3 {
  color: var(--text);
}

.content code {
  background: var(--code);
  border-radius: 5px;
  color: #eef2f7;
  font-size: 0.92em;
  padding: 2px 5px;
}

.content pre {
  background: #07090d;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #f5f8fa;
  overflow-x: auto;
  padding: 16px;
}

.content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.content blockquote {
  border-left: 4px solid #6f7887;
  color: var(--muted);
  margin-left: 0;
  padding-left: 16px;
}

.content img {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: block;
  height: auto;
  margin: 22px 0 30px;
  max-width: 100%;
}

.mermaid {
  background: #07090d;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 22px 0 30px;
  overflow-x: auto;
  padding: 18px;
}

.mermaid svg {
  height: auto;
  max-width: 100%;
}

.content table {
  border-collapse: collapse;
  display: block;
  margin: 18px 0 28px;
  overflow-x: auto;
  width: 100%;
}

.content th,
.content td {
  border-bottom: 1px solid var(--border);
  color: var(--muted-strong);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.content th {
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
}

.api-method {
  border: 1px solid #586174;
  border-radius: 5px;
  color: #f2f4f8;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  min-width: 48px;
  padding: 5px 7px;
  text-align: center;
}

.api-method.get {
  background: #253149;
  border-color: #455779;
}

.api-method.post {
  background: #2d3140;
  border-color: #585f73;
}

.api-method.patch,
.api-method.put {
  background: #33303f;
  border-color: #625b78;
}

.api-method.delete {
  background: #3a2830;
  border-color: #765763;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 12px;
  justify-content: center;
  padding: 24px;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-shell {
    display: block;
    padding: 18px;
  }

  .side-nav {
    margin-bottom: 18px;
    padding: 8px 4px 12px;
    position: static;
  }

  .content {
    margin-left: 0;
    padding: 24px;
  }

  .content h1 {
    font-size: 32px;
  }
}
