/* Backboard-inspired documentation shell */
@import url('/docs-shell-api.css');
@import url('/docs-shell-howto.css');
@import url('/docs-getting-started-stepper.css');
@import url('/docs-empty-state.css');
@import url('/docs-goal-chips.css');

body.docs-page {
  --docs-sidebar: 260px;
  --docs-toc: 220px;
  --docs-top: 56px;
  --docs-mono: 'IBM Plex Mono', ui-monospace, monospace;
  background: #050508;
}

body.docs-page .site-header {
  display: none;
}

body.docs-page .site-footer {
  margin-left: var(--docs-sidebar);
}

.docs-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--docs-top);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(12px);
}

.docs-topbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.docs-topbar-logo img {
  width: 24px;
  height: 24px;
}

.docs-topbar-tabs {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.docs-topbar-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.docs-topbar-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.docs-topbar-tab.is-active {
  color: var(--accent);
  background: rgba(54, 191, 250, 0.1);
}

.docs-topbar-tab svg {
  width: 15px;
  height: 15px;
  opacity: 0.85;
}

.docs-topbar-search {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
}

.docs-topbar-search input {
  width: 100%;
  padding: 0.5rem 0.85rem 0.5rem 2.25rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.85rem;
}

.docs-topbar-search input::placeholder {
  color: var(--muted);
}

.docs-topbar-search-wrap {
  position: relative;
}

.docs-topbar-search-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
}

.docs-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.docs-topbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--accent);
  color: #001018;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.docs-body {
  display: flex;
  flex: 1;
  align-items: stretch;
}

.docs-sidebar {
  width: var(--docs-sidebar);
  flex-shrink: 0;
  position: sticky;
  top: var(--docs-top);
  height: calc(100vh - var(--docs-top));
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0 2rem;
  background: rgba(0, 0, 0, 0.25);
}

.docs-sidebar-group {
  margin-bottom: 1.35rem;
}

.docs-sidebar-label {
  padding: 0 1.25rem;
  margin-bottom: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-sidebar-link {
  display: block;
  padding: 0.38rem 1.25rem;
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.docs-sidebar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.docs-sidebar-link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(54, 191, 250, 0.06);
}

.docs-sidebar-link--method {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--docs-mono);
  font-size: 0.78rem;
}

.docs-method {
  display: inline-block;
  min-width: 2.4rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.12rem 0.3rem;
  border-radius: 4px;
}

.docs-method--post { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.docs-method--get { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.docs-method--put { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.docs-method--del { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.docs-main {
  flex: 1;
  min-width: 0;
  padding: 2rem clamp(1.5rem, 4vw, 3rem) 4rem;
  max-width: 820px;
}

.docs-main h1 {
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.docs-lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.docs-main h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.85rem;
  padding-top: 0.5rem;
}

.docs-main h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.6rem;
}

.docs-main p,
.docs-main li {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.docs-main ul,
.docs-main ol {
  margin: 0.75rem 0 1rem 1.25rem;
}

.docs-main li { margin-bottom: 0.35rem; }

.docs-main strong { color: var(--text); }

.docs-main code {
  font-family: var(--docs-mono);
  font-size: 0.84em;
  padding: 0.12rem 0.38rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #c8e8ff;
}

.docs-main pre {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0c12;
  overflow-x: auto;
  font-family: var(--docs-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #b8c5d9;
}

.docs-main pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.docs-toc {
  width: var(--docs-toc);
  flex-shrink: 0;
  position: sticky;
  top: var(--docs-top);
  height: calc(100vh - var(--docs-top));
  overflow-y: auto;
  padding: 2rem 1.25rem 2rem 0;
}

.docs-toc-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.docs-toc a {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.28rem 0;
  line-height: 1.4;
}

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

@media (max-width: 1100px) {
  .docs-toc { display: none; }
}

.docs-figure {
  margin: 1.25rem 0 1.75rem;
}

.docs-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.docs-figure figcaption {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
}

.docs-table th,
.docs-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.docs-table th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}

@media (max-width: 900px) {
  .docs-sidebar {
    display: none;
  }

  body.docs-page .site-footer {
    margin-left: 0;
  }

  .docs-topbar-tabs {
    display: none;
  }
}
