/* Compact presentation overrides for Material for MkDocs. */

/* Base text size in the content area (reduced from 16px) */
.md-typeset {
  font-size: 15px;
  line-height: 1.25;
}

/* Reduced rem Headings use rem */
.md-typeset h1 { font-size: 1.15rem; }
.md-typeset h2 { font-size: 1.10rem; font-weight: 400; }
.md-typeset h3 { font-size: 1.05rem; font-weight: 300; }
.md-typeset h4 { font-size: 1.0rem; }

/* --- Section gaps -------------------------------------------------
   Adjacent sibling margins collapse (the larger wins), so:
   - gap ABOVE a heading = max(previous element margin-bottom,
     heading margin-top) -> controlled by the :has rule below.
   - gap BELOW a heading (title -> content) = max(heading
     margin-bottom, first content element margin-top). The theme
     gives lists etc. margin-top: 1em, which dominated the gap, so
     the first element after a heading gets margin-top: 0.
   Result: between-section gap > within-section gap at every level. */
.md-typeset > *:has(+ h1) { margin-bottom: 1.3em; }
.md-typeset > *:has(+ h2) { margin-bottom: 1.1em; }
.md-typeset > *:has(+ h3) { margin-bottom: 0.9em; }
.md-typeset h1 { margin-top: 0; margin-bottom: 0.5em; }
.md-typeset h2 { margin-top: 0; margin-bottom: 0.4em; }
.md-typeset h3 { margin-top: 0; margin-bottom: 0.3em; }
.md-typeset h1 + *,
.md-typeset h2 + *,
.md-typeset h3 + *,
.md-typeset h4 + * {
  margin-top: 0;
}