.content-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.content-wrapper .content {
  flex: 1;
  min-width: 0;
}
.sidebar {
  flex: 0 0 240px;
}
@media (max-width: 900px) {
  .content-wrapper {
    flex-direction: column;
  }
  .sidebar {
    flex: 1;
    order: 2;
  }
}

.sidebar-nav {
  font-size: 0.95rem;
  line-height: 1.5;
}

.sidebar-title {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--color-primary, #ffb454);
  margin-top: 1.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-title a {
  text-decoration: none;
  color: inherit;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.sidebar-list .sidebar-list {
  margin-left: 0.9rem;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.15rem;
  margin-bottom: 0.4rem;
}

.sidebar-nav li {
  margin: 0.15rem 0;
}

.sidebar-nav a {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  margin: -0.15rem -0.4rem;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  opacity: 0.85;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  opacity: 1;
}

.sidebar-nav a.active {
  font-weight: bold;
  opacity: 1;
  background: rgba(255, 180, 84, 0.12);
  color: var(--color-primary, #ffb454);
}

.sidebar-nav details > summary {
  cursor: pointer;
  list-style: none;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.sidebar-nav details > summary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav details > summary::-webkit-details-marker {
  display: none;
}

.sidebar-nav details > summary::before {
  content: "▸";
  display: inline-block;
  width: 1em;
  margin-right: 0.3rem;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.15s ease;
}

.sidebar-nav details[open] > summary::before {
  transform: rotate(90deg);
}

.highlight-wrapper {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

li .highlight-wrapper {
  overflow: visible;
}

.highlight-wrapper .copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: inherit;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.highlight-wrapper:hover .copy-btn {
  opacity: 1;
}

.highlight-wrapper .copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.highlight-wrapper .copy-btn.copied {
  color: #6ee7b7;
  border-color: #6ee7b7;
}
