/* Fonts ship with the theme (SIL OFL 1.1, see fonts/), so pages contact no font host. */
@font-face {
  font-family: Manrope;
  src: url("fonts/Manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/RobotoMono.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

/* Mode-independent: identical metrics in light and dark (Asta type scale). */
body { font-size: 16px; line-height: 1.6; }
h1, .title { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h4, h5, h6 { font-size: 1rem; font-weight: 600; }
pre, code { font-size: 14px; }

/* Keep the current section heading in view while reading a long page. */
body { --asta-heading-top: 0px; }
body:has(#quarto-header:not(.headroom--unpinned)) {
  --asta-heading-top: var(--asta-header-height, 0px);
}
main section.level2 { margin-top: 1.5rem; }
main section.level2 > h2 {
  position: sticky;
  top: var(--asta-heading-top);
  z-index: 3;
  background: var(--bs-body-bg);
  margin-top: 0;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--bs-border-color);
}
main section.level3 > h3 { scroll-margin-top: calc(var(--asta-heading-top) + 3.5rem); }
