body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #212529;
  background: #ffffff;
}

h3 {
  font-style: italic;
}

main.content {
  max-width: 60rem;
  margin: 0 auto;
  padding: 4.5rem 1rem 2rem 1rem;
}

/* Fixed top bar */
header.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  z-index: 100;
}

nav.topnav {
  display: flex;
  align-items: stretch;
  max-width: 46rem;
  margin: 0 auto;
}

.topnav-item {
  display: block;
  padding: 0.75rem 1rem;
  color: #212529;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.topnav-item.disabled {
  color: #adb5bd;
  cursor: default;
}

.topnav-item.source {
  margin-left: auto;
}

a.topnav-item:hover {
  background: #e9ecef;
}

/* CSS-only dropdowns, open on hover or focus */
.topnav-dropdown {
  position: relative;
}

.topnav-dropdown:hover .topnav-item {
  background: #e9ecef;
}

.topnav-dropdown summary {
  list-style: none;
}

.topnav-dropdown summary::-webkit-details-marker {
  display: none;
}

.topnav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  max-height: 70vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0;
}

.topnav-dropdown:hover .topnav-menu,
.topnav-dropdown[open] .topnav-menu {
  display: block;
}

/* Menu lists (chapters, appendices, and the page TOC) */
.topnav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.topnav-menu li a {
  display: block;
  padding: 0.4rem 1rem;
  color: #212529;
  text-decoration: none;
}

.topnav-menu li a:hover {
  background: #f1f3f5;
}

/* Bibliography */
.hanging-indent .csl-entry {
  margin-left: 2em;
  text-indent: -2em;
}

div.syllabus {
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

div.syllabus::before {
  content: "Syllabus";
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

div.syllabus > :first-child {
  margin-top: 0;
}

div.syllabus > :last-child {
  margin-bottom: 0;
}

span.smallcaps {
  font-variant: small-caps;
}

header.quarto-title-block {
  display: none;
}

/* Code blocks */
pre {
  background: #f5f5f5;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  overflow-x: auto;
}

/* Notes */
.note {
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

.note::before {
  content: "Note";
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

.note[data-title]::before {
  content: attr(data-title);
}

.note > :first-child {
  margin-top: 0;
}

.note > :last-child {
  margin-bottom: 0;
}

/* Page footer (previous/next pager) */
.page-footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem 2rem 1rem;
}

.pager {
  display: flex;
}

.pager .next {
  margin-left: auto;
}
