/* Constrain long code blocks to a fixed height instead of letting them grow
   as tall as the content. Material for MkDocs doesn't have a built-in
   option for this (open feature requests: squidfunk/mkdocs-material#3444
   and #4964, both still open as of 2026). Without this, a long code block's
   horizontal scrollbar sits at the very bottom of the ENTIRE block, so on a
   tall block you have to scroll the page all the way past the code first
   to even reach the scrollbar.

   The scrollable element in Material's own markup is .md-typeset pre>code,
   not the outer <pre> - that's where Material already sets overflow:auto
   and its custom scrollbar styling (confirmed in main.<hash>.min.css). An
   earlier version of this rule targeted the outer <pre> instead, which
   added a second, unstyled browser scrollbar on the wrapper without
   actually clipping the visible box, since the inner <code> still grew to
   its full natural height. Targeting pre>code directly clips the right
   element and reuses Material's existing scrollbar styling.

   Uses vh (viewport height) rather than a fixed rem value on purpose: a
   fixed rem height looked right on a 32" 2K monitor but ran off the bottom
   of the visible area on a 23" 1080p monitor, since rem doesn't scale with
   how much actual vertical screen space is available - it only scales with
   Material's own font-size breakpoints, which if anything get LARGER on
   bigger screens. A vh value scales with the real viewport instead, so it
   holds up across different monitors/resolutions without retuning. */
.md-typeset pre > code {
  max-height: 55vh;
}