/* Sidebar tweaks for the course website (HTML pages only — slides use theme.scss). */

/* Bold the collapsible section headers in the docked sidebar
   ("Course info", "Before you start", "Day 1 — ...", "Day 2 — ...", etc.)
   so they stand out from the leaf-page entries below them. */
.sidebar-item.sidebar-item-section > .sidebar-item-container,
.sidebar-item.sidebar-item-section > .sidebar-item-container > a,
.sidebar-item.sidebar-item-section > .sidebar-item-container > .sidebar-item-toggle,
.sidebar-item.sidebar-item-section > .sidebar-item-container .sidebar-item-text {
  font-weight: 700;
}

/* Colour sidebar leaf links by type so they're identifiable at a glance:
   - Lectures (any file with "lec" in the name) → green
   - Quizzes (any file with "quiz" in the name) → blue
   The exercises and concepts pages keep the default (black/grey) colour. */
.sidebar a.sidebar-item-text[href*="lec"],
.sidebar-item .sidebar-item-text > a[href*="lec"] {
  color: #1a7a3b;       /* lecture green */
}
.sidebar a.sidebar-item-text[href*="lec"]:hover,
.sidebar-item .sidebar-item-text > a[href*="lec"]:hover {
  color: #105025;
}

.sidebar a.sidebar-item-text[href*="quiz"],
.sidebar-item .sidebar-item-text > a[href*="quiz"] {
  color: #2a55c2;       /* quiz blue */
}
.sidebar a.sidebar-item-text[href*="quiz"]:hover,
.sidebar-item .sidebar-item-text > a[href*="quiz"]:hover {
  color: #1a3a8c;
}

/* Interactive demos (links to an exercise's #explore section) → orange */
.sidebar a.sidebar-item-text[href*="#explore"],
.sidebar-item .sidebar-item-text > a[href*="#explore"] {
  color: #b35900;
}
.sidebar a.sidebar-item-text[href*="#explore"]:hover,
.sidebar-item .sidebar-item-text > a[href*="#explore"]:hover {
  color: #7a3d00;
}

/* Exercise / warm-up sidebar entries — italic.
   We italicise every dayN/ leaf link, then explicitly exclude
   lectures (lec*), quizzes (*quiz*), and the concept summary
   (00-concepts) so only the exercises themselves are italic. */
.sidebar a.sidebar-item-text[href*="/day"]:not([href*="lec"]):not([href*="quiz"]):not([href*="00-concepts"]) {
  font-style: italic;
}

/* One colour per week in the sidebar: a stripe down the left of the whole
   block and a tinted header, so the weeks are easy to tell apart.
   Positional: top-level items are Home (1), Course info (2), Week 1 (3) ...
   Week 5 (7), Further reading (8). Update if top-level items change. */
.sidebar-menu-container > ul > li.sidebar-item-section:nth-child(n+3) {
  border-left: 4px solid var(--week-color);
  padding-left: 0.35rem;
  margin: 0.4rem 0;
}
.sidebar-menu-container > ul > li.sidebar-item-section:nth-child(n+3) > .sidebar-item-container {
  background: var(--week-tint);
  border-radius: 0 4px 4px 0;
  padding-left: 0.3rem;
}
.sidebar-menu-container > ul > li.sidebar-item-section:nth-child(n+3) > .sidebar-item-container .menu-text {
  color: var(--week-color);
}
.sidebar-menu-container > ul > li:nth-child(3) { --week-color: #2a7f8f; --week-tint: #e6f3f5; } /* Week 1 teal */
.sidebar-menu-container > ul > li:nth-child(4) { --week-color: #6b4fa0; --week-tint: #efebf7; } /* Week 2 purple */
.sidebar-menu-container > ul > li:nth-child(5) { --week-color: #a8324a; --week-tint: #f8e9ec; } /* Week 3 crimson */
.sidebar-menu-container > ul > li:nth-child(6) { --week-color: #8a6a12; --week-tint: #f6f0de; } /* Week 4 ochre */
.sidebar-menu-container > ul > li:nth-child(7) { --week-color: #3b5bab; --week-tint: #e9eef8; } /* Week 5 blue */
.sidebar-menu-container > ul > li:nth-child(8) { --week-color: #6c757d; --week-tint: #f1f3f5; } /* Further reading grey */
