  /* ── Layout ── */
  .docs-root {
    display: flex;
    min-height: calc(100vh - 4rem);
    background: #fff;
  }

  /* Sidebar */
  .docs-sidebar {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid #e5e7eb;
    background: #fff;
  }
  .docs-sidebar-inner {
    position: sticky;
    top: 4rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    padding: 2rem 1.25rem 2rem 1.5rem;
  }
  .sidebar-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.75rem;
  }
  .slink {
    display: block;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.82rem;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
    margin-bottom: 1px;
  }
  .slink:hover { background: #f3f4f6; color: #111827; }
  .slink.active { background: #fef2f4; color: var(--pink); font-weight: 600; }

  /* Mobile TOC */
  .docs-mobile-toc {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 16px;
    position: sticky;
    top: 3.5rem;
    z-index: 10;
  }
  .docs-mobile-toc select {
    width: 100%;
    font-size: 0.85rem;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    outline: none;
  }

  /* Content */
  .docs-content {
    flex: 1;
    min-width: 0;
    padding: 2.5rem 2rem 4rem 3rem;
    max-width: 780px;
  }
  @media (max-width: 768px) {
    .docs-content { padding: 1.5rem 1.25rem 3rem; }
  }

  /* Sections */
  .dsec {
    margin-bottom: 3.5rem;
    scroll-margin-top: 5rem;
  }

  /* Typography */
  .dh1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.3;
  }
  .dh2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
  }
  .dh3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
  }
  .dp {
    font-size: 0.875rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 0.75rem;
  }
  .dlink { color: var(--pink); text-decoration: underline; }

  /* Notice */
  .dnotice {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 0 6px 6px 0;
    padding: 12px 16px;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #78350f;
    margin-top: 1rem;
  }

  /* Formula */
  .dformula {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 9px 14px;
    color: #111827;
    margin-bottom: 0.5rem;
  }

  /* Glossary */
  .dglossary { display: flex; flex-direction: column; }
  .dterm {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    font-size: 0.875rem;
  }
  .dterm dt { font-weight: 600; color: #111827; padding-top: 1px; }
  .dterm dd { color: #4b5563; line-height: 1.65; margin: 0; }
  @media (max-width: 500px) {
    .dterm { grid-template-columns: 1fr; gap: 4px; }
  }

  /* Citation block */
  .dcite {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.82rem;
    font-family: Georgia, serif;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 0.5rem;
  }

  /* FAQ / Details */
.faq-item {
  border-bottom: 1px solid #f3f4f6;
  padding: 0.75rem 0;
}

.faq-item:first-of-type {
  border-top: 1px solid #f3f4f6;
}

.faq-q {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: '+';
  font-size: 1rem;
  font-weight: 400;
  color: #9ca3af;
  flex-shrink: 0;
  margin-left: 1rem;
}

details[open] .faq-q::after {
  content: '-';
}

.faq-item .dp {
  margin-top: 0.6rem;
  padding-bottom: 0.25rem;
}
