@font-face {
  font-family: ManropeLinks;
  src: url("/fonts/manrope-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: ManropeLinks;
  src: url("/fonts/manrope-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: ManropeLinks;
  src: url("/fonts/manrope-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #030303;
  --panel: #0c0d0f;
  --panel-soft: #141519;
  --line: #25262c;
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f4f3ee;
  --muted: #9a9ca3;
  --soft: #c5c6c0;
  --accent: #f0ede5;
  --accent-text: #050505;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: ManropeLinks, "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 58% 16%, rgba(255, 255, 255, 0.045), transparent 26%),
    linear-gradient(180deg, #020202, var(--bg) 48%, #000);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

::selection {
  color: #050505;
  background: #f2f0e8;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

code {
  color: #f2efe8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 720px) 260px;
  gap: clamp(28px, 5vw, 64px);
  width: min(1360px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 20px 0;
}

.docs-sidebar {
  border-right: 1px solid var(--line-soft);
}

.docs-brand {
  display: inline-grid;
  place-items: center;
  align-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 34px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background:
    radial-gradient(circle at 42% 28%, rgba(255, 255, 255, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 220ms var(--ease);
}

.docs-brand:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    radial-gradient(circle at 42% 28%, rgba(255, 255, 255, 0.18), transparent 34%),
    rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.docs-brand img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.docs-nav {
  display: grid;
  gap: 7px;
  padding-right: 20px;
}

.docs-nav p,
.docs-toc p,
.eyebrow {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.docs-nav a,
.docs-toc a {
  display: flex;
  min-height: 34px;
  align-items: center;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 220ms var(--ease);
}

.docs-nav a {
  padding: 0 12px;
}

.docs-nav a:hover,
.docs-nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
}

.back-link {
  position: absolute;
  bottom: 22px;
  left: 0;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  font-weight: 800;
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.back-link:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.docs-content {
  padding: 50px 0 96px;
}

.crumbs {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.crumbs span {
  margin: 0 8px;
  color: #56575d;
}

.docs-hero {
  margin-bottom: 86px;
}

.docs-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.docs-hero p:not(.eyebrow) {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 800;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 220ms var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button-light {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.button-dark {
  background: rgba(255, 255, 255, 0.025);
}

.docs-section {
  scroll-margin-top: 36px;
  border-top: 1px solid var(--line-soft);
  padding: 54px 0;
}

.docs-section h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(27px, 2.6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.docs-section h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
}

.docs-section p,
.steps {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.75;
}

.docs-section a:not(.button) {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.24);
  text-underline-offset: 4px;
}

.steps {
  display: grid;
  gap: 14px;
  padding-left: 22px;
}

.steps span,
.note {
  color: var(--text);
}

.note {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.feature-grid,
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

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

.feature-grid article,
.plan-grid article,
.metric-row > div,
.code-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 58%),
    rgba(11, 12, 14, 0.82);
}

.feature-grid article,
.plan-grid article {
  padding: 18px;
}

.feature-grid p,
.plan-grid p {
  font-size: 14px;
  line-height: 1.6;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.metric-row > div {
  padding: 18px;
}

.metric-row strong {
  display: block;
  margin-bottom: 5px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.metric-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.code-card {
  overflow: hidden;
  margin-top: 22px;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding: 13px 16px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.code-head button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 18px;
  color: #efeee8;
  font: 700 13px / 1.7 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.endpoint-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.endpoint-list div {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.endpoint-list code {
  color: var(--text);
}

.docs-toc {
  border-left: 1px solid var(--line-soft);
  padding-left: 18px;
}

.docs-toc a {
  padding: 0;
}

.docs-toc a:hover,
.docs-toc a.is-active {
  color: var(--text);
}

@media (max-width: 1080px) {
  .docs-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .docs-shell {
    display: block;
    width: min(100% - 28px, 720px);
  }

  .docs-sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .docs-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 6px;
  }

  .docs-nav p {
    display: none;
  }

  .docs-nav a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    padding: 0 12px;
  }

  .back-link {
    position: static;
    margin-top: 16px;
  }

  .docs-content {
    padding-top: 34px;
  }

  .feature-grid,
  .metric-row,
  .endpoint-list div {
    grid-template-columns: 1fr;
  }
}
