/* tufte-custom.css — Tufte refinements for Quarto HTML */

/* Light mode */
[data-bs-theme="light"] body {
  background-color: #fffff8 !important;
}

/* Dark mode */
[data-bs-theme="dark"] body {
  background-color: #151515 !important;
  color: #ddd !important;
}

/* Dark mode: muted text elements */
[data-bs-theme="dark"] .column-margin,
[data-bs-theme="dark"] .column-margin figcaption,
[data-bs-theme="dark"] .margin-caption,
[data-bs-theme="dark"] .panel-caption,
[data-bs-theme="dark"] .figure-caption,
[data-bs-theme="dark"] figcaption,
[data-bs-theme="dark"] .blockquote p {
  color: #aab0b8 !important;
}

/* Body text */
#quarto-content {
  font-family: "Source Serif Pro", Georgia, serif !important;
  font-size: 18px;
  line-height: 1.6;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* --- TOC: sticky on the left --- */
#TOC,
nav#TOC,
.sidebar nav[role=doc-toc] {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

/* --- Links: consistent green across light and dark --- */
#quarto-content a,
#quarto-content a:visited {
  color: #2e8b57 !important;
}

#quarto-content a:hover {
  color: #236b43 !important;
}

[data-bs-theme="dark"] #quarto-content a,
[data-bs-theme="dark"] #quarto-content a:visited {
  color: #3cb371 !important;
}

[data-bs-theme="dark"] #quarto-content a:hover {
  color: #5dce89 !important;
}

/* TOC active link — green to match */
.sidebar nav[role=doc-toc] ul > li > a.active,
.sidebar nav[role=doc-toc] ul > li > ul > li > a.active {
  border-left: 2px solid #2e8b57;
  color: #2e8b57 !important;
}

[data-bs-theme="dark"] .sidebar nav[role=doc-toc] ul > li > a.active,
[data-bs-theme="dark"] .sidebar nav[role=doc-toc] ul > li > ul > li > a.active {
  border-left: 2px solid #3cb371;
  color: #3cb371 !important;
}

/* Margin content — muted, smaller */
.column-margin figcaption,
.margin-caption,
div.aside,
aside,
.column-margin {
  color: #5a6570;
  font-size: 0.825rem;
}

/* Figure captions */
.panel-caption,
.figure-caption,
figcaption {
  color: #5a6570;
  font-size: 0.825rem;
  margin-bottom: 0.825rem;
}

/* Section numbers — muted */
.header-section-number {
  color: #5a6570;
}

/* Blockquotes — Tufte style: no border, italic, muted */
.blockquote {
  border-left: none;
}

.blockquote p {
  font-size: smaller;
  color: #5a6570;
  font-style: italic;
}

/* Smallcaps for \newthought equivalent */
.smallcaps {
  font-variant: small-caps;
  font-size: 1.1em;
  letter-spacing: 0.05em;
}

/* Callout boxes — minimal Tufte highlight style */
.callout-note {
  border-left: 2px solid #4169E1;
  background-color: transparent !important;
}

.callout-note .callout-title {
  font-weight: bold;
  color: #4169E1;
}

/* Figure images centered */
.figure-img {
  margin: auto;
}