/* DeepSeek-style documentation shell, scoped to the shared docs/pricing/tools hub. */
.docs-hub-body {
  --docs-border: #e5e7eb;
  --docs-muted: #6b7280;
  background: #fff;
}

.dark .docs-hub-body {
  --docs-border: #26272b;
  --docs-muted: #9ca3af;
  background: #0a0a0a;
}

.docs-hub-body #docs-header {
  background: rgb(255 255 255 / 96%);
  border-color: var(--docs-border);
  backdrop-filter: blur(12px);
}

.dark .docs-hub-body #docs-header {
  background: rgb(10 10 10 / 96%);
}

.docs-hub-body #docs-header > div:first-child {
  height: 3.75rem;
}

.docs-hub-body #docs-tabs {
  height: 2.75rem;
}

.docs-hub-body .docs-tab {
  height: 100%;
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}

.docs-hub-layout {
  min-height: calc(100vh - 6.5rem);
}

@media (min-width: 1024px) {
  .docs-hub-layout {
    display: grid !important;
    width: 100%;
    max-width: none;
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: start;
  }

  .docs-hub-body #docs-sidebar {
    grid-column: 1;
    grid-row: 1;
  }

  .docs-hub-body #docs-main {
    grid-column: 2;
    grid-row: 1;
  }
}

.docs-hub-body #docs-sidebar {
  width: 310px;
  border-left: 0;
  border-right-color: var(--docs-border);
  padding: 1.5rem 1.25rem 2.5rem;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.dark .docs-hub-body #docs-sidebar {
  scrollbar-color: #404044 transparent;
}

.docs-hub-body #docs-sidebar [data-docs-group] > p,
.docs-hub-body #docs-sidebar [data-docs-group] > div > p {
  color: var(--docs-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.045em;
}

.docs-hub-body #docs-sidebar .docs-nav-link,
.docs-hub-body #docs-sidebar .tool-toc-item {
  min-height: 2rem;
  border-radius: 0.3rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.docs-hub-body #docs-main {
  padding: 2.5rem clamp(1.25rem, 3vw, 3rem) 4rem;
  width: 100%;
}

.docs-hub-body #docs-api-toc {
  display: none;
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.docs-hub-body #docs-api-toc.hidden {
  display: none !important;
}

.docs-hub-body .docs-api-toc-title {
  margin: 0 0 0.5rem;
  padding-inline: 0.5rem;
  color: #171717;
  font-size: 0.75rem;
  font-weight: 650;
}

.dark .docs-hub-body .docs-api-toc-title {
  color: #f5f5f5;
}

.docs-hub-body .docs-toc-link {
  display: block;
  border-left: 2px solid transparent;
  border-radius: 0 0.25rem 0.25rem 0;
  padding: 0.4rem 0.5rem;
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  transition: color 120ms ease, background-color 120ms ease;
}

.docs-hub-body .docs-toc-subitem {
  padding-left: 1.15rem;
}

.docs-hub-body .docs-toc-link:hover {
  color: #171717;
}

.dark .docs-hub-body .docs-toc-link {
  color: #a1a1aa;
}

.dark .docs-hub-body .docs-toc-link:hover {
  color: #f5f5f5;
}

.docs-hub-body ::selection {
  background: #2f57e9;
  color: #fff;
}

.docs-tab-active {
  border-color: #2f57e9 !important;
  color: #2f57e9 !important;
  font-weight: 600 !important;
}

.dark .docs-tab-active {
  border-color: #5b7cf7 !important;
  color: #ffffff !important;
}

.docs-link-active {
  background-color: rgba(47, 87, 233, 0.1) !important;
  color: #2f57e9 !important;
  font-weight: 600 !important;
}

.dark .docs-link-active {
  background-color: rgba(47, 87, 233, 0.18) !important;
  color: #7b97fc !important;
}

.docs-hub-body .docs-toc-link.docs-toc-active {
  border-color: #2f57e9;
  background: rgb(47 87 233 / 10%);
  color: #2f57e9;
  font-weight: 600;
}

.dark .docs-hub-body .docs-toc-link.docs-toc-active {
  color: #7b97fc;
}

.docs-hub-body .docs-hub-article {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
}

.docs-hub-body .docs-hub-layout[data-docs-current-group="api"] .docs-hub-article {
  max-width: 58rem;
}

/* Model catalog and price tables use the full grid column width. */
.docs-hub-body .docs-hub-layout[data-docs-current-group="models"] .docs-hub-article {
  max-width: none;
}

.docs-hub-body .docs-hub-article > .space-y-8 > div:first-child {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--docs-border);
}

.docs-hub-body .docs-hub-article .page-title {
  margin: 0;
  color: #171717;
  font-size: clamp(1.8rem, 3vw, 2.15rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.dark .docs-hub-body .docs-hub-article .page-title {
  color: #f5f5f5;
}

.docs-hub-body .docs-hub-article .page-subtitle {
  color: #60656f;
  font-size: 0.95rem;
  line-height: 1.65;
}

.dark .docs-hub-body .docs-hub-article .page-subtitle {
  color: #a1a1aa;
}

/* The API guide reads like an article; reserve cards for examples and quickstart steps. */
.docs-hub-body #docs-panel-api > .space-y-8 > section:not(#quickstart) {
  border: 0;
  border-bottom: 1px solid var(--docs-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 2.25rem;
}

.docs-hub-body #docs-panel-api > .space-y-8 > section > h2 {
  margin: 0;
  color: #171717;
  font-size: 1.35rem;
  font-weight: 620;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.dark .docs-hub-body #docs-panel-api > .space-y-8 > section > h2 {
  color: #f5f5f5;
}

.docs-hub-body #docs-backdrop {
  top: 6.5rem;
}

.docs-hub-body > footer > div {
  width: 100%;
  max-width: none;
}

@media (min-width: 1280px) {
  .docs-hub-body #docs-main {
    padding-inline: 2rem;
  }

  .docs-hub-body .docs-hub-layout[data-docs-current-group="api"] {
    display: grid !important;
    grid-template-columns: 310px minmax(0, 1fr) 250px;
  }

  .docs-hub-body .docs-hub-layout[data-docs-current-group="api"] #docs-api-toc:not(.hidden) {
    display: block;
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    flex-shrink: 0;
    box-sizing: border-box;
    grid-column: 3;
    grid-row: 1;
    position: sticky;
    top: 8rem;
    max-height: calc(100vh - 9rem);
    overflow-y: auto;
    padding: 2.5rem 0.75rem 2rem 0.5rem;
    scrollbar-width: thin;
  }
}

@media (max-width: 1023px) {
  .docs-hub-body #docs-sidebar {
    top: 6.5rem;
    height: calc(100vh - 6.5rem);
  }

  .docs-hub-body #docs-main {
    padding-top: 2rem;
  }
}

@media (max-width: 640px) {
  .docs-hub-body #docs-main {
    padding: 1.5rem 1rem 3rem;
  }

  .docs-hub-body .docs-hub-article .page-title {
    font-size: 1.65rem;
  }
}

