/* ── Docs two-column layout inside #bc_main ── */
#docs_layout {
  display: flex;
  gap: 0 32px;
  min-height: calc(100vh - 60px);
}

/* ── Left TOC sidebar ── */
#docs_toc {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px var(--color-greyLight) solid;
  padding: 32px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

#docs_toc .toc-section-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-greyMedium);
  padding: 16px 12px 6px;
}

#docs_toc a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-greyDark);
  text-decoration: none;
  line-height: 1.4;
  transition: background-color 0.1s;
  width: 88%;
}

#docs_toc a:hover {
  background-color: #f5f5f5;
  color: var(--color-black);
  text-decoration: none;
}

#docs_toc a.active {
  background-color: #f0f0f0;
  color: var(--color-black);
  font-weight: 600;
}

#docs_toc .toc-sub a {
  padding-left: 24px;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-greyMedium);
}

#docs_toc .toc-sub a:hover,
#docs_toc .toc-sub a.active {
  color: var(--color-black);
  background-color: #f5f5f5;
}

/* ── Right content area ── */
#docs_content {
  flex: 1;
  min-width: 0;
  max-width: 800px;
  padding: 40px 0 80px;
}

#docs_content h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

#docs_content .docs-subtitle {
  font-size: 15px;
  color: var(--color-greyDark);
  margin-bottom: 40px;
}

#docs_content h2 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px var(--color-greyLight) solid;
}

#docs_content h3 {
  font-size: 14px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--color-greyDark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#docs_content p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-black);
  margin-bottom: 16px;
}

#docs_content ul,
#docs_content ol {
  font-size: 14px;
  line-height: 1.8;
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--color-black);
}

#docs_content li {
  margin-bottom: 6px;
}

/* ── Code blocks ── */
#docs_content pre {
  background-color: #1a1a1a;
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 20px;
  max-width: 100%;
}

#docs_content pre code {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #e8e8e8;
  background: none;
  padding: 0;
  border-radius: 0;
}

#docs_content code {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 12px;
  background-color: #f0f0f0;
  color: #333;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Callout boxes ── */
#docs_content .docs-tip,
#docs_content .docs-warning {
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.7;
}

#docs_content .docs-tip {
  background-color: #f0f7ff;
  border-left: 3px solid #3b82f6;
  color: #1e40af;
}

#docs_content .docs-warning {
  background-color: #fffbeb;
  border-left: 3px solid #f59e0b;
  color: #92400e;
}

#docs_content .docs-tip strong,
#docs_content .docs-warning strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Step badges ── */
#docs_content .docs-step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

#docs_content .docs-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-black);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

#docs_content .docs-step-body {
  flex: 1;
  min-width: 0;
}

#docs_content .docs-step-body p:last-child {
  margin-bottom: 0;
}

/* ── Comparison table (Type A vs B) ── */
#docs_content .docs-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

#docs_content .docs-compare-card {
  border: 1px var(--color-greyLight) solid;
  border-radius: 12px;
  padding: 20px;
}

#docs_content .docs-compare-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

#docs_content .docs-compare-card ul {
  margin-bottom: 0;
}

/* ── External link button ── */
#docs_content a.docs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  background-color: var(--color-black);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 28px;
  transition: opacity 0.15s;
}

#docs_content a.docs-btn:hover {
  opacity: 0.8;
  text-decoration: none;
  color: #fff;
}

/* ── Step images ── */
#docs_content .docs-img-row {
  display: flex;
  gap: 12px;
  margin: 16px 0 24px;
  flex-wrap: wrap;
}

#docs_content .docs-img-row img {
  border-radius: 10px;
  border: 1px solid var(--color-greyLight);
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left top;
}

/* ── Video embed ── */
#docs_content .docs-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}

#docs_content .docs-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Mobile docs TOC nav ── */
.docs-mobile-nav {
  display: none;
}

/* ── RWD ── */
@media (max-width: 1300px) {
  #docs_toc {
    display: none;
  }

  #docs_layout {
    gap: 0;
    flex-direction: column;
  }

  #docs_content {
    padding-top: 0;
  }

  .docs-mobile-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 16px 0 12px;
    border-bottom: 1px solid var(--color-greyLight);
    margin-bottom: 28px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .docs-mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .docs-mobile-nav a {
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-greyDark);
    background-color: #f2f2f2;
    text-decoration: none;
    flex-shrink: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
  }

  .docs-mobile-nav a.active {
    background-color: var(--color-black);
    color: #fff;
  }
}

@media (max-width: 768px) {
  #docs_content h1 {
    font-size: 22px;
  }

  #docs_content h2 {
    font-size: 16px;
  }

  #docs_content .docs-img-row {
    flex-direction: column;
  }
}
