@import url('https://fonts.googleapis.com/css2?family=Averia+Serif+Libre:wght@300;400;700&family=Lexend:wght@300;400;500;600;700&display=swap');

:root {
  --font-display: 'Averia Serif Libre', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-body: 'Lexend', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --radius-button: 0.55rem;
  --radius-card: 1rem;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
  --bg: #000;
  --panel: #070707;
  --panel-2: #0d0d0d;
  --panel-3: #151515;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #e7e7e7;
  --muted: #a1a1aa;
  --faint: #71717a;
  --green: #3a5a40;
  --blue: #0f2a44;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 74% 0%, rgba(58, 90, 64, 0.16), transparent 32rem),
    radial-gradient(circle at 18% 8%, rgba(15, 42, 68, 0.18), transparent 34rem);
  opacity: 0.8;
}

::selection { background: #fff; color: #000; }

a { color: #fff; text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, h4, .deca-font {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(32px, 4vw, 54px); }
h2 { font-size: clamp(24px, 2.6vw, 36px); margin-top: 64px; }
h3 { font-size: 22px; margin-top: 36px; }
h4 { font-size: 17px; margin-top: 24px; }
p { margin: 14px 0 0; color: #d4d4d8; }
code { font-family: var(--font-mono); font-size: 0.92em; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.topbar-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 0.375rem;
}

.topnav { display: none; }

@media (min-width: 1050px) {
  .topnav { display: flex; align-items: center; gap: 32px; }
}

.topnav a {
  color: #a1a1aa;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  border: none;
  background: none;
  padding: 0;
  min-height: auto;
  border-radius: 0;
  transition: color 0.22s ease;
}

.topnav a:hover {
  color: #fff;
  background: none;
  border-color: transparent;
}

.top-actions { display: flex; align-items: center; gap: 8px; }

.dashboard-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 0.55rem;
  background: #fff;
  color: #000 !important;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.dashboard-link:hover {
  background: #e8e8ee;
  transform: translateY(-1px);
}

.search-wrap { position: relative; }

.search-pill {
  width: 200px;
  height: 34px;
  padding: 0 12px;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #ececec;
  outline: none;
  font-family: var(--font-body);
  font-size: 13px;
  transition: border-color 0.22s ease, background 0.22s ease;
}

.search-pill:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.search-pill::placeholder { color: var(--muted); }

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 310px;
  max-height: 360px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(5, 5, 5, 0.98);
  box-shadow: var(--shadow);
}

.search-results.open { display: block; }

.search-result {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #d7d7d7;
  text-align: left;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
}

.search-result:hover,
.search-result.active { background: rgba(255, 255, 255, 0.07); color: #fff; }

.search-result small { display: block; margin-top: 2px; color: var(--faint); font-size: 11px; }

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  margin-top: 64px;
}

.sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  padding: 18px 12px 28px;
  border-right: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.72);
  overflow: auto;
}

.sidebar-title {
  margin: 18px 10px 7px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 2px 0;
  padding: 7px 10px;
  border-radius: 0.5rem;
  color: #d7d7d7;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.25;
}

.sidebar a:hover, .sidebar a.active { background: rgba(255, 255, 255, 0.07); color: #fff; }
.sidebar a.sub { min-height: 29px; padding-left: 22px; color: var(--muted); font-size: 12px; }

.main { min-width: 0; }

.page-section { display: none; }
.page-section.active { display: block; }

.hero {
  max-width: 1160px;
  padding: 66px 44px 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #cfd1d0;
  font-family: var(--font-body);
  font-size: 13px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(58, 90, 64, 0.8);
}

.hero p { max-width: 760px; font-size: 17px; color: #d8d8dc; }

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-button);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.button.primary { background: #fff; color: #000; border-color: #fff; }
.button.green { background: transparent; border-color: rgba(255, 255, 255, 0.16); color: #fff; }
.button:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.26); }
.button.primary:hover { background: #e8e8ee; border-color: #e8e8ee; }

.content-wrap { max-width: 1160px; padding: 0 44px 72px; }

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow);
  padding: 22px;
}

.card h3 { margin-top: 0; }
.card p { color: var(--muted); font-size: 14px; }
.card code { color: #e9d7ef; }

.stat-list { display: grid; gap: 12px; margin-top: 18px; }
.stat-row { display: flex; justify-content: space-between; gap: 16px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.stat-label { color: var(--faint); font-family: var(--font-body); font-size: 12px; }
.stat-value { color: #fff; text-align: right; font-size: 13px; }

.dots { display: inline-flex; gap: 3px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.32); }
.dot.on { background: #fff; border-color: #fff; }

.callout {
  margin: 26px 0;
  padding: 18px 20px;
  border: 1px solid rgba(58, 90, 64, 0.45);
  border-radius: var(--radius-card);
  background: rgba(58, 90, 64, 0.13);
}

.docs-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.82fr);
  gap: 28px;
  max-width: 1220px;
  padding: 44px 44px 84px;
  align-items: start;
}

.docs-copy { min-width: 0; }
.docs-copy > p { max-width: 760px; }

.method-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 22px;
  font-family: var(--font-mono);
  color: #fff;
  font-size: 16px;
}

.method-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 0.45rem;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: #f5f5f5;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.method-badge.get { background: rgba(58, 90, 64, 0.18); }

.field {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.field:first-of-type { border-top: 0; }
.field-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.field-name { color: #fff; font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.field-meta { color: var(--faint); font-family: var(--font-body); font-size: 12px; }
.field p { margin-top: 8px; color: var(--muted); font-size: 14px; }

.code-card {
  position: sticky;
  top: 76px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #050505;
  box-shadow: var(--shadow);
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-3);
  overflow-x: auto;
}

.tab {
  height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
  color: #d4d4d8;
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.tab.active { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.08); color: #fff; }

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
}

.copy-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
}

pre {
  margin: 0;
  max-height: 560px;
  overflow: auto;
  background: #050505 !important;
}

pre code.hljs {
  display: block;
  padding: 18px;
  background: #050505 !important;
  color: #e8e8e8;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
}

table {
  width: 100%;
  margin-top: 18px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  overflow: hidden;
}

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

th { border-top: 0; background: rgba(255, 255, 255, 0.045); color: #fff; font-family: var(--font-body); }
td + td, th + th { border-left: 1px solid var(--line); }

.guide { max-width: 920px; padding: 44px 44px 88px; }
.guide ul { margin: 14px 0 0; padding-left: 20px; color: #d4d4d8; }
.guide li { margin: 7px 0; }

.inline-code {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  color: #eee;
}

.mobile-menu { display: none; }

[id] { scroll-margin-top: 80px; }

pre { position: relative; }

.code-block {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #050505;
}

.code-block .code-block-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-3);
}

.code-block pre {
  margin: 0;
  border: 0;
  border-radius: 0;
}

@media (max-width: 1050px) {
  .topnav, .search-wrap { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-menu { display: inline-flex; }
  .docs-page { grid-template-columns: 1fr; }
  .code-card { position: static; }
  .grid.three, .grid.two { grid-template-columns: 1fr; }
  .topbar-inner { padding: 0 14px; }
}

@media (max-width: 680px) {
  .topbar-inner { padding: 0 14px; }
  .top-actions a:not(.dashboard-link) { display: none; }
  .hero, .content-wrap, .docs-page, .guide { padding-left: 18px; padding-right: 18px; }
  .hero { padding-top: 42px; }
  .method-line { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 36px; }
}
