:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #f1f6f9;
  --border: #e5edf3;
  --text: #142033;
  --muted: #637083;
  --navy: #003366;
  --navy-2: #062342;
  --teal: #00d4aa;
  --teal-soft: rgba(0, 212, 170, 0.12);
  --warning: #f59e0b;
  --code-bg: #1f2937;
  --code-text: #e5e7eb;
  --shadow: 0 10px 28px rgba(15, 47, 79, 0.06);
  --sidebar: 292px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(0, 212, 170, 0.45);
  outline-offset: 3px;
}

.docs-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.docs-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 14px 28px;
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.docs-brand:hover {
  text-decoration: none;
}

.docs-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.docs-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.docs-brand-title {
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.docs-brand-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.docs-back-home {
  display: block;
  padding: 10px 10px;
  margin: 10px 0 16px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
}

.docs-back-home:hover {
  background: var(--surface-soft);
  text-decoration: none;
  color: var(--navy);
}

.nav-group {
  margin: 12px 0;
}

.nav-group-title {
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #047857;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  color: #334155;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.nav-link:hover {
  background: var(--surface-soft);
  color: var(--navy);
  text-decoration: none;
}

.nav-link.active {
  background: var(--teal-soft);
  color: var(--navy);
  font-weight: 700;
}

.nav-link.endpoint::after {
  content: "›";
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
}

.docs-main {
  min-width: 0;
}

.docs-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  height: 58px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.menu-button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-size: 22px;
  cursor: pointer;
}

.docs-content {
  max-width: 1120px;
  padding: 64px 64px 84px;
}

.docs-content > p,
.docs-content > ul,
.docs-content > ol,
.docs-content > .lead,
.docs-content > .callout,
.docs-content > pre,
.docs-content > table {
  max-width: 860px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--muted);
}

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(0, 212, 170, 0.28);
  background: rgba(0, 212, 170, 0.1);
  color: #047857;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 7px 11px;
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

h2 {
  margin: 38px 0 14px;
  color: var(--navy);
  font-size: 25px;
  letter-spacing: -0.03em;
}

h3 {
  margin: 28px 0 10px;
  color: var(--navy-2);
  font-size: 18px;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 860px;
  margin: 0 0 28px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--muted);
}

.callout {
  border-left: 4px solid var(--teal);
  background: rgba(0, 212, 170, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 22px 0;
  font-size: 15px;
}

.callout.warning {
  border-left-color: var(--warning);
  background: rgba(245, 158, 11, 0.09);
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin: 7px 0;
}

li::marker {
  color: var(--navy);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px 13px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #f8fafc;
  color: var(--navy);
  font-weight: 800;
}

tr:last-child td {
  border-bottom: none;
}

/* Inline code */

code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 0.92em;
}

/* Code blocks */

pre {
  max-width: 860px;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: none;
  font-size: 13px;
  line-height: 1.65;
  margin: 16px 0 24px;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

pre + pre {
  margin-top: 14px;
}

h2 + pre,
h3 + pre,
.endpoint-label + pre {
  margin-top: 14px;
}

/* Code syntax highlighting */

pre .code-key {
  color: #93c5fd;
}

pre .code-string {
  color: #a7f3d0;
}

pre .code-number {
  color: #fbbf24;
}

pre .code-null,
pre .code-bool {
  color: #c4b5fd;
}

pre .code-method {
  color: #5eead4;
  font-weight: 800;
}

pre .code-url {
  color: #86efac;
}

pre .code-placeholder {
  color: #fcd34d;
  font-weight: 700;
}

pre .code-comment {
  color: #94a3b8;
  font-style: italic;
}

pre .code-path {
  color: #bfdbfe;
  font-weight: 700;
}

pre .code-punctuation {
  color: #cbd5e1;
}

.endpoint-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eef2f7;
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
  margin: 8px 0 18px;
}

.method {
  color: #047857;
}

/* Pager */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 860px;
  margin-top: 54px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pager a {
  display: block;
  width: fit-content;
  max-width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #047857;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: none;
  overflow-wrap: anywhere;
  transition: color 0.15s ease, transform 0.15s ease;
}

.pager a:hover {
  color: #00a98a;
  text-decoration: none;
  transform: translateY(-1px);
}

.pager .prev {
  justify-self: start;
  text-align: left;
}

.pager .next {
  justify-self: end;
  text-align: right;
}

.pager-label {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}

.docs-footer {
  max-width: 860px;
  margin-top: 54px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: #94a3b8;
  font-size: 13px;
}

/* Private access gate */

.access-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 212, 170, 0.16), transparent 26%),
    radial-gradient(circle at 80% 20%, rgba(0, 51, 102, 0.28), transparent 32%),
    linear-gradient(135deg, #071827, #0b2238);
}

.access-card {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  text-align: left;
}

.access-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.access-logo {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex: 0 0 auto;
}

.access-card .page-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  white-space: nowrap;
}

.access-card h1 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.access-card p {
  color: var(--muted);
  line-height: 1.6;
}

.access-card label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 18px 0 7px;
  color: #334155;
}

.access-card input {
  width: 100%;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
  color: var(--text);
}

.access-card input:focus {
  border-color: rgba(0, 212, 170, 0.7);
  box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.14);
}

.access-card button {
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--navy);
  color: #ffffff;
  font-weight: 800;
  padding: 13px 16px;
  cursor: pointer;
  font: inherit;
}

.access-card button:hover {
  background: #062342;
}

.access-error {
  display: none;
  color: #b91c1c !important;
  font-size: 13px;
  margin-top: 12px;
}

.access-help {
  margin-top: 18px;
  font-size: 12px;
  text-align: center;
}

.access-back {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font-size: 13px;
}

.access-back:hover {
  color: var(--navy);
  text-decoration: underline;
}

@media (max-width: 1100px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    display: none;
    position: fixed;
    z-index: 20;
    top: 58px;
    left: 0;
    bottom: 0;
    width: min(340px, 88vw);
    height: calc(100vh - 58px);
    overflow-y: auto;
    background: var(--surface);
    border-right: 1px solid var(--border);
    border-top: 1px solid var(--border);
    box-shadow: 18px 0 45px rgba(15, 47, 79, 0.16);
  }

  body.sidebar-open .docs-sidebar {
    display: block;
  }

  .docs-topbar {
    display: flex;
  }

  .docs-content {
    padding: 34px 20px 56px;
  }

  h1 {
    font-size: 34px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  th,
  td {
    min-width: 140px;
  }

  table::-webkit-scrollbar {
    height: 6px;
  }

  pre {
    max-width: 100%;
    padding: 16px;
    font-size: 12.5px;
    border-radius: 10px;
  }

  .pager {
    gap: 10px;
  }

  .pager a {
    font-size: 14px;
  }

  .pager-label {
    font-size: 11px;
  }

  .access-card {
    padding: 24px;
  }

  .access-header {
    align-items: flex-start;
  }

  .access-logo {
    width: 62px;
    height: 62px;
  }

  .access-card .page-badge {
    font-size: 11px;
    padding: 6px 9px;
  }
}
