/* User Provided Stylesheet */

/* ---- CDIF Handbook custom styles (MyST v2 book-theme) ----
   The theme uses Tailwind "prose" rules (line-height 1.75, large heading and
   list margins) via low-specificity :where() selectors, so these overrides are
   scoped to `article` and use !important to win.
   NOTE: MyST renders the page title as <h1> and shifts content headings +1, so a
   source-level "### property" heading is rendered as <h4>. */

/* Header CDIF logo — slightly enlarged from the default size.
   The book-theme renders the logo with Tailwind h-9 (height: 2.25rem ≈ 36px);
   override to 2.5rem (40px) to make it a little more prominent while
   still fitting within the header's `min-h-[60px]` + `p-3` padding
   constraint. A larger value (e.g. 5.625rem) made the header overflow
   that minimum and pushed sticky elements like the right-side TOC and
   the pancake-menu flyout — which use a hard-coded ~60px top offset —
   underneath the now-taller header.
   The `.myst-home-link-logo` wrapper class raises specificity over the
   bare `h-9` utility. */
.myst-home-link-logo img {
  height: 2.5rem !important;
}

/* Underline property-name headings. With a single H1 (page title) per doc,
   mystmd does not shift levels, so source "### property" renders as <h3>. */
article h3 {
  text-decoration: underline;
}

/* Tighten the gap between a heading and the content immediately following it */
article h1, article h2, article h3, article h4, article h5, article h6 {
  margin-bottom: 0.25em !important;
}
/* Generous breathing room above H2-H6, but not above the page title (H1) */
article h2, article h3, article h4, article h5, article h6 {
  margin-top: 3em !important;
}
/* Page title sits close to the top of the content area */
article h1 {
  margin-top: 0 !important;
}
article :is(h1, h2, h3, h4, h5, h6) + * {
  margin-top: 0.1em !important;
}

/* Decrease general line spacing and block gaps */
article p, article li {
  line-height: 1.2 !important;
}
article p, article ul, article ol {
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
}
article li {
  margin-top: 0.1em !important;
  margin-bottom: 0.1em !important;
}

/* Footer is now appended to each TOC markdown page via an {include}
   directive of _static/footer.md — see myst.yml's `toc:` for the list
   of pages. The earlier JS injection / CSS ::after fallback approaches
   were removed because React's hydration interfered (either stripping
   the <a> tags, or — when the workaround used body's class attribute —
   ping-ponging with React's reconciliation and locking up the page).
   Rendering the footer as part of the source markdown side-steps React
   entirely. */
