.sidebar {
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.sidebar h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.93rem;
  transition: background 0.15s, color 0.15s;
}
.sidebar a:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.sidebar .num,
.drawer .num {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-deep);
}
@media (max-width: 899.98px) {
  .sidebar {
    display: none;
  }
}

.drawer-toggle {
  display: none;
}
@media (max-width: 899.98px) {
  .drawer-toggle {
    display: inline-flex;
  }
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(84vw, 330px);
  z-index: 100;
  background: var(--card);
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3);
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}
.drawer.open {
  transform: translateX(0);
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2));
  color: #fff;
}
.drawer-head strong {
  margin-right: auto;
}
.drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
}
.drawer-close svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.drawer nav {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}
.drawer nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}
.drawer nav a:active,
.drawer nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}
