:root {
  --note-ink: #26313d;
  --note-muted: #52606d;
  --note-navy: #1e3765;
  --note-link: #245a80;
  --note-rule: #dce2ea;
  --note-wash: #f3f6fa;
  --note-ui: system-ui, sans-serif;
  --note-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

body {
  background-color: #fff;
  color: var(--note-ink);
  font-family: var(--course-font, Georgia, serif);
}

#quarto-header .navbar {
  background-color: #fff !important;
  border-bottom: 1px solid var(--note-rule);
  padding-block: 0.15rem;
  font-family: var(--note-ui);
  font-size: 0.85rem;
}

#quarto-header .navbar-brand,
#quarto-header .nav-link,
#quarto-header #quarto-search .aa-SubmitIcon {
  color: var(--note-navy);
}

#quarto-header .nav-link:hover {
  color: var(--note-link);
}

#quarto-header .navbar-toggler-icon {
  filter: brightness(0);
  opacity: 0.7;
}

main.content {
  width: 100%;
  max-width: 45rem;
  min-width: 0;
  font-size: 1.1rem;
  line-height: 1.63;
  overflow-wrap: break-word;
}

main.content p {
  margin-bottom: 1em;
}

main.content :is(h1, h2, h3, h4) {
  color: var(--note-navy);
  font-family: var(--note-ui);
  font-weight: 650;
  line-height: 1.24;
}

main.content h1.title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

#title-block-header {
  margin: 0.75rem 0 1.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--note-rule);
}

#title-block-header :is(.subtitle, .quarto-title-meta-contents) {
  margin: 0;
  color: var(--note-muted);
  font-family: var(--note-ui);
  font-size: 0.85rem;
  line-height: 1.45;
}

#title-block-header .note-term {
  display: block;
  margin-top: 0.2rem;
}

#title-block-header .quarto-title-meta {
  display: block;
  margin-top: 0.35rem;
}

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

#title-block-header .quarto-title-meta-contents p {
  margin: 0;
}

main.content section > h1 {
  margin: 2.1rem 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--note-rule);
  font-size: 1.45rem;
}

main.content section > h2 {
  margin: 1.55rem 0 0.65rem;
  padding: 0;
  border: 0;
  font-size: 1.18rem;
}

main.content section > :is(h3, h4) {
  margin: 1.3rem 0 0.55rem;
  font-size: 1.03rem;
}

.header-section-number {
  margin-inline-end: 0.15em;
  color: var(--note-muted);
  font-variant-numeric: tabular-nums;
}

main.content a,
.nav-footer a {
  color: var(--note-link);
  text-underline-offset: 0.18em;
}

#TOC {
  color: var(--note-ink);
  font-family: var(--note-ui);
}

#TOC .nav-link {
  color: var(--note-muted);
}

#TOC .nav-link.active {
  border-left-color: var(--note-link);
  color: var(--note-link) !important;
}

.note-tools {
  display: flex;
  align-items: start;
  gap: 0.6rem;
  margin-top: 0.7rem;
  font: 0.88rem/1.4 var(--note-ui);
}

.note-contents {
  display: none;
}

.note-contents summary,
.note-tools .note-pdf,
.chapter-nav a {
  box-sizing: border-box;
  border: 1px solid var(--note-rule);
  border-radius: 4px;
  padding: 0.38rem 0.65rem;
  color: var(--note-navy);
  text-decoration: none;
}

.note-contents summary {
  cursor: pointer;
  width: fit-content;
}

.note-contents ul {
  margin: 0.45rem 0 0;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--note-rule);
  border-radius: 4px;
  background: #fff;
  list-style: none;
}

.note-contents li > a {
  display: block;
  padding-block: 0.45rem;
}

.note-tools .note-pdf:hover,
.note-contents summary:hover,
.chapter-nav a:hover {
  background-color: var(--note-wash);
}

main.content code {
  font-family: var(--note-mono);
}

main.content :not(pre) > code:not(.sourceCode) {
  padding: 0.08em 0.22em;
  border-radius: 3px;
  background: var(--note-wash);
  color: #234a70;
  font-size: 0.82em;
  overflow-wrap: anywhere;
}

main.content pre {
  margin-inline: 0;
  border: 1px solid var(--note-rule);
  border-radius: 5px;
  background: var(--note-wash);
  color: var(--note-ink);
  font: 0.83rem/1.55 var(--note-mono);
  overflow-x: auto;
}

main.content div.sourceCode pre {
  padding: 0.7rem 0.85rem;
  border-inline-start: 3px solid #becde0;
}

main.content code.sourceCode span:is(.bu, .cf, .dt, .ex, .fu, .im, .kw, .ot, .pp) {
  color: #294d76;
}

main.content code.sourceCode span:is(.ch, .ss, .st, .vs) {
  color: #386448;
}

main.content code.sourceCode span:is(.bn, .cn, .dv, .fl) {
  color: #805628;
}

main.content code.sourceCode span:is(.an, .co, .cv, .do, .in) {
  color: var(--note-muted);
}

main.content code.sourceCode span:is(.op, .va) {
  color: var(--note-ink);
}

main.content pre code {
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.note-table,
main.content mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
}

main.content mjx-container[display="true"] {
  position: relative;
  overflow-y: hidden;
}

.note-table {
  margin: 1rem 0 1.15rem;
}

main.content .table {
  --bs-table-color: var(--note-ink);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--note-rule);
  --bs-table-striped-color: var(--note-ink);
  --bs-table-striped-bg: #f8fafc;
  margin-bottom: 0;
  font-size: 0.95em;
}

main.content .table th {
  background: var(--note-wash);
  color: var(--note-navy);
  font: 650 0.82rem/1.35 var(--note-ui);
}

main.content .table :is(th, td) {
  padding: 0.45rem 0.65rem;
  vertical-align: top;
}

main.content .table [style*="text-align: right"] {
  font-variant-numeric: tabular-nums;
}

#what-does-one-number-in-the-price-table-mean td:first-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

main.content .quarto-figure {
  margin-block: 1.2rem;
}

main.content figcaption {
  color: var(--note-muted);
  font-size: 0.9em;
  line-height: 1.45;
}

.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 1.6rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--note-rule);
  font: 0.88rem/1.4 var(--note-ui);
}

.chapter-nav p {
  margin: 0;
}

.chapter-nav a {
  display: block;
}

.chapter-nav .prev::before {
  content: "← ";
}

.chapter-nav .next::after {
  content: " →";
}

.chapter-nav p:has(.disabled) {
  display: none;
}

.chapter-nav p:has(.next) {
  margin-inline-start: auto;
}

.nav-footer {
  border-top-color: var(--note-rule);
  color: var(--note-muted);
}

@media (max-width: 991px) {
  .note-contents {
    display: block;
  }

  .note-contents[open] + .note-pdf {
    flex: none;
  }
}

@media (max-width: 620px) {
  main.content {
    font-size: 1.05rem;
    line-height: 1.56;
  }

  main.content section > h1 {
    margin-top: 1.7rem;
    font-size: 1.28rem;
  }

  main.content section > h2 {
    font-size: 1.12rem;
  }

  main.content pre > code,
  main.content pre > code > span {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  main.content .table :is(th, td) {
    padding: 0.4rem 0.35rem;
  }

  main.content mjx-container[display="true"] {
    text-align: start !important;
  }

  main.content .figure-img {
    width: 100% !important;
    height: auto;
  }

  .quarto-layout-panel .quarto-layout-row {
    display: block;
  }

  .quarto-layout-panel .quarto-layout-cell {
    width: 100% !important;
    margin-right: 0;
  }

  .chapter-nav {
    flex-direction: column;
  }

  .chapter-nav a,
  .note-tools .note-pdf,
  .note-contents summary {
    min-height: 44px;
    padding-block: 0.62rem;
  }

  .chapter-nav p:has(.next) {
    margin-inline-start: 0;
  }
}
