/* D2L custom styles — fonts, type scale, utilities */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Type scale ────────────────────────────────────────── */

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: #3A4049;
  -webkit-font-smoothing: antialiased;
}

code, pre, .sourceCode {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ── Scrollable output ─────────────────────────────────── */

.d2l-output-scroll {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #E7E9EC;
  border-radius: 4px;
}
.d2l-output-scroll pre {
  margin: 0;
}

/* Hide tab headers on output-only tabsets */
.d2l-output-tabs > .nav {
  display: none;
}

/* ── Inline code in headings should match heading size ─── */

h1 code, h2 code, h3 code, h4 code {
  font-size: inherit;
}

/* ── Equalize tabbed and non-tabbed code blocks ────────── */

/* Bootstrap's compiled CSS applies padding:1em to both
   .tab-content and .tab-pane > *, plus borders on .tab-content.
   Override all of them so tabbed code matches standalone code. */
.panel-tabset > .tab-content {
  border: none !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}
.panel-tabset > .tab-content > .tab-pane > * {
  padding: 0 !important;
}

/* ── Text-only tabs: unwrap to plain text ──────────────── */

/* JS adds this class to tabsets whose active pane has no code.
   Use !important to beat any Bootstrap/Quarto tab overrides. */
.panel-tabset.d2l-text-only > .nav.nav-tabs {
  display: none !important;
}
.panel-tabset.d2l-text-only {
  border: none !important;
  margin-top: 0;
  margin-bottom: 0;
}
.panel-tabset.d2l-text-only > .tab-content {
  border: none !important;
  padding: 0 !important;
}

/* ── TOC slides button (right-sidebar) ─────────────────── */

.d2l-toc-slides {
  margin: 1rem 0 0.5rem 0;
  padding-top: 0.75rem;
  border-top: 1px solid #E7E9EC;
}
.d2l-toc-slides a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: #2196F3;
  color: white;
  border-radius: 3px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.1s, transform 0.1s;
  border: 1px solid #1976D2;
}
.d2l-toc-slides a:hover {
  background: #1976D2;
  transform: translateY(-1px);
  color: white;
}
.d2l-toc-slides a.disabled {
  background: #f0f0f0;
  color: #999;
  border-color: #d8d8d8;
  cursor: not-allowed;
  pointer-events: none;
}
.d2l-toc-slides a .d2l-toc-slides-icon {
  font-size: 0.7rem;
  line-height: 1;
}
.d2l-toc-slides a .d2l-toc-slides-fw {
  font-weight: 400;
  opacity: 0.85;
  font-size: 0.8rem;
}
