/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 90;
}

/* scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Sidebar title ── */
.sidebar-title {
  padding: 1.75rem 1.4rem 1.4rem;
  border-bottom: 2px solid var(--border);
}

.sidebar-title a {
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 1.375rem;
  color: var(--text);
  line-height: 1.3;
  text-decoration: none;
  display: block;
}

.sidebar-title a:hover { text-decoration: none; color: var(--purple-dark); }

/* ── Week links ── */
.sidebar-weeks {
  flex: 1;
  padding: 1rem 0;
}

.sidebar-weeks ul { list-style: none; }

.sidebar-weeks ul li a {
  display: block;
  padding: 0.45rem 1.4rem;
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.12s, background 0.12s;
  border-left: 3px solid transparent;
}

.sidebar-weeks ul li a:hover {
  color: var(--text);
  background: rgba(207, 109, 252, 0.07);
  text-decoration: none;
  border-left-color: var(--lavender);
}

.sidebar-weeks ul li a.active {
  color: var(--purple-dark);
  background: rgba(207, 109, 252, 0.1);
  border-left-color: var(--purple);
  font-weight: 700;
}

/* ── Attribution footer ── */
.sidebar-attribution {
  padding: 1rem 1.4rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.sidebar-attribution a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-attribution a:hover { color: var(--purple-dark); }

/* ── Hamburger (mobile) ── */
.nav-toggle {
  display: none;
  position: fixed;
  top: 0.85rem;
  left: 1rem;
  z-index: 110;
  background: var(--purple);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  margin: 4px 0;
  border-radius: 2px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  }
}
