/* Custom styles layered on top of Bootstrap 5.3 */

:root {
  --accent: #0b6b78;
  --side-bg: #16212e;
  --side-ink: #e8eef3;
  --side-muted: #9fb0bf;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --bs-body-font-family: var(--font-body);
  --bs-link-color-rgb: 11, 107, 120;
  --bs-link-hover-color-rgb: 8, 80, 90;
}

[data-bs-theme="dark"] {
  --accent: #55c2d0;
  --side-bg: #0a1118;
  --bs-link-color-rgb: 85, 194, 208;
  --bs-link-hover-color-rgb: 140, 215, 225;
}

body {
  background-color: var(--bs-tertiary-bg);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

h1, h2, h3, .score {
  font-family: var(--font-head);
}

/* Sidebar */
.sidebar {
  background-color: var(--side-bg);
  color: var(--side-ink);
}

.sidebar-inner {
  top: 3rem;
}

.sidebar h1 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar h2 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--side-muted);
}

.sidebar .role,
.sidebar .text-muted-side {
  color: var(--side-muted);
}

.sidebar a {
  color: var(--side-ink);
  text-decoration-color: var(--side-muted);
  text-underline-offset: 3px;
  word-break: break-word;
}

.sidebar a:hover {
  text-decoration-color: var(--side-ink);
}

/* Main content */
main {
  max-width: 52rem;
}

main h2 {
  font-size: 1.7rem;
  font-weight: 700;
}

.card {
  border-radius: 10px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 500;
}

.card-body p,
.card-body ul {
  max-width: 62ch;
}

.score {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* Accent-colored button */
.btn-accent {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #08505a;
  --bs-btn-hover-border-color: #08505a;
  --bs-btn-active-bg: #08505a;
  --bs-btn-active-border-color: #08505a;
}

[data-bs-theme="dark"] .btn-accent {
  --bs-btn-color: #0f1720;
  --bs-btn-hover-color: #0f1720;
  --bs-btn-hover-bg: #8cd7e1;
  --bs-btn-hover-border-color: #8cd7e1;
  --bs-btn-active-bg: #8cd7e1;
  --bs-btn-active-border-color: #8cd7e1;
}

.course-score {
  color: var(--accent);
  font-weight: 500;
}

/* Small screens */
@media (max-width: 991.98px) {
  .sidebar h1 {
    font-size: 2.2rem;
  }
}

/* Print */
@media print {
  .sidebar {
    background: none;
    color: #000;
  }
  .sidebar a,
  .sidebar h2,
  .sidebar .role {
    color: #000;
  }
  .btn {
    display: none;
  }
}
