/* ══════════════════════════════════════
   DOC PAGE LAYOUT
══════════════════════════════════════ */
.doc-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 76px);
}

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.doc-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  overflow-y: auto;
  padding: 32px 24px;
  border-right: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.015);
}

.doc-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 16px;
}

.doc-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.doc-sidebar nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}

.doc-sidebar nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.doc-sidebar nav a.active {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  font-weight: 600;
}

.doc-sidebar-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.doc-sidebar-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.15s;
}

.doc-sidebar-footer a:hover {
  color: var(--text);
}

/* ══════════════════════════════════════
   CONTENT AREA
══════════════════════════════════════ */
.doc-content {
  flex: 1;
  min-width: 0;
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 48px 120px;
}

/* ══════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════ */
.doc-content h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #fff 60%, rgba(255,255,255,0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.doc-content h2 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 56px 0 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
}

.doc-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.doc-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text);
}

.doc-content > p:first-of-type {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 40px;
}

.doc-content p {
  color: #d0d0cc;
  font-size: 0.98rem;
  line-height: 1.8;
  margin: 0 0 16px;
}

.doc-content strong {
  color: var(--text);
  font-weight: 600;
}

.doc-content em {
  color: var(--muted);
  font-style: italic;
}

/* ══════════════════════════════════════
   PART DIVIDER (h2.part-title)
══════════════════════════════════════ */
.doc-content .part-title {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 64px 0 8px;
  padding: 24px 0 16px;
  border-top: 2px solid rgba(255,255,255,0.1);
  background: linear-gradient(135deg, #fff 60%, rgba(255,255,255,0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════
   LISTS
══════════════════════════════════════ */
.doc-content ul, .doc-content ol {
  padding-left: 24px;
  margin: 0 0 20px;
}

.doc-content li {
  color: #d0d0cc;
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 6px;
}

.doc-content li strong {
  color: var(--text);
}

/* ══════════════════════════════════════
   IMAGES
══════════════════════════════════════ */
.doc-content .doc-img {
  margin: 28px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.doc-content .doc-img img {
  width: 100%;
  display: block;
}

.doc-content .doc-img figcaption {
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--dim);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ══════════════════════════════════════
   CODE BLOCKS
══════════════════════════════════════ */
.doc-content code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88em;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  color: #e8e8e4;
}

.doc-content pre {
  margin: 20px 0;
  padding: 20px 24px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  overflow-x: auto;
}

.doc-content pre code {
  padding: 0;
  background: none;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #c8c8c4;
}

/* ══════════════════════════════════════
   BLOCKQUOTE / CALLOUT
══════════════════════════════════════ */
.doc-content blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 3px solid rgba(255,255,255,0.15);
  border-radius: 0 12px 12px 0;
  background: rgba(255,255,255,0.025);
}

.doc-content blockquote p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.doc-content blockquote strong {
  color: #e0e0dc;
}

/* ══════════════════════════════════════
   TABLES
══════════════════════════════════════ */
.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}

.doc-content th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.doc-content td {
  padding: 12px 16px;
  color: #d0d0cc;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.doc-content tr:last-child td {
  border-bottom: none;
}

/* ══════════════════════════════════════
   HORIZONTAL RULE
══════════════════════════════════════ */
.doc-content hr {
  border: none;
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 40px 0;
}

/* ══════════════════════════════════════
   STEP NUMBERS
══════════════════════════════════════ */
.doc-content .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-right: 8px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   MOBILE RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .doc-sidebar {
    display: none;
  }
  .doc-content {
    padding: 32px 24px 80px;
  }
}

/* Mobile sidebar toggle */
.doc-mobile-nav {
  display: none;
  padding: 12px 24px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.doc-mobile-nav select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

@media (max-width: 900px) {
  .doc-mobile-nav {
    display: block;
  }
}
