/* Compact overrides: keep the theme's normal 16px body font but tighten
   the vertical rhythm towards readthedocs-theme density — smaller, firmer
   headings (the theme default h1 is 42px thin), tighter line-height, and
   much less air around images. Spacing/typography only — no colors, so
   light and dark color modes are unaffected. */

/* Bootstrap sets a global smooth scroll-behavior, which (in Chromium)
   animates keyboard/scrollbar scrolling too and makes it feel sluggish. */
:root {
  scroll-behavior: auto;
}

body {
  line-height: 1.4;
}

body > .container {
  margin-top: 10px;
}

.navbar {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

p, ul, ol {
  margin-bottom: 0.5rem;
}

li > p {
  margin-bottom: 0.125rem;
}

.admonition {
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

/* Theme default wraps every image in a 20px/30px margin + padded border
   box, which balloons the stats page (56 graphs). */
.col-md-9 img {
  margin: 4px 2px;
  padding: 2px;
}
