.docs-layout {
  gap: 2rem;
}

@media (min-width: 1024px) {
  .docs-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 3.5rem;
  }
}

.docs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - var(--nav-height) - 2rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}

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

.docs-sidebar-part {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.375rem;
  padding-left: 0.5rem;
}

.docs-sidebar a {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.4;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-md);
  border-left: 2px solid transparent;
}

.docs-sidebar a:hover {
  background: rgb(255 255 255 / 0.04);
}

.docs-sidebar a.is-active {
  color: var(--foreground);
  background: rgb(59 130 246 / 0.1);
  border-left-color: var(--primary);
}

.docs-content {
  max-width: 46rem;
}

.docs-breadcrumb {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.docs-part {
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.docs-part:last-of-type {
  border-bottom: none;
}

.docs-part-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.docs-part > h2 {
  font-family: var(--font-heading);
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.docs-step {
  margin-bottom: 2.5rem;
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

.docs-step-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.docs-step-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  background: rgb(59 130 246 / 0.12);
  border: 1px solid rgb(59 130 246 / 0.25);
  border-radius: 0.5rem;
}

.docs-step h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 2.25rem;
  margin: 0;
}

.docs-step-body > p:last-child,
.docs-step-body > ul:last-child,
.docs-step-body > ol:last-child {
  margin-bottom: 0;
}

.docs-callout-warning {
  border-color: rgb(251 191 36 / 0.35);
  background: rgb(251 191 36 / 0.06);
}

.docs-callout-info {
  border-color: rgb(59 130 246 / 0.35);
  background: rgb(59 130 246 / 0.06);
}

.docs-pre {
  margin: 1rem 0;
  padding: 1rem 1.125rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgb(248 250 252 / 0.9);
  background: rgb(0 0 0 / 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

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

.docs-checklist {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.docs-checklist li {
  position: relative;
  padding-left: 1.75rem;
  color: rgb(248 250 252 / 0.85);
  font-size: 0.9375rem;
}

.docs-checklist li::before {
  content: "☐";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.docs-checklist-group {
  margin-bottom: 1.5rem;
}

.docs-checklist-group h4 {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.625rem;
  color: var(--foreground);
}

.docs-kv-table td:first-child {
  white-space: nowrap;
  width: 38%;
}

.docs-tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.08);
  color: rgb(248 250 252 / 0.7);
}

.docs-tag-yes {
  background: rgb(22 163 74 / 0.15);
  color: rgb(134 239 172 / 0.95);
}

.docs-tag-auto {
  background: rgb(6 182 212 / 0.15);
  color: var(--accent);
}

.docs-mobile-toc {
  display: block;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.docs-mobile-toc summary {
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
}

.docs-mobile-toc nav {
  margin-top: 1rem;
  display: grid;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .docs-mobile-toc {
    display: none;
  }
}

.docs-figures {
  display: grid;
  gap: 1.5rem;
  margin: 1.25rem 0;
}

.docs-figure {
  margin: 0;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgb(0 0 0 / 0.25);
}

.docs-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.docs-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgb(248 250 252 / 0.7);
  border-top: 1px solid rgb(255 255 255 / 0.06);
  background: rgb(255 255 255 / 0.02);
}

.docs-figure-num {
  display: inline-block;
  margin-right: 0.375rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent);
}

.docs-screenshot-flow {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.25rem;
  background: rgb(59 130 246 / 0.06);
  border: 1px solid rgb(59 130 246 / 0.2);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: rgb(248 250 252 / 0.8);
}

.docs-screenshot-flow strong {
  color: var(--foreground);
}
