/*
 * Typographic density for the Netavo BNG manual.
 *
 * Material's defaults are tuned for prose-led product sites and read as oversized for reference
 * material — an operator scanning a 180-row configuration table wants more rows on screen, not
 * larger type. This scales the content down while leaving the reading experience intact; it does
 * not change colours, spacing rhythm or the theme's responsive behaviour.
 *
 * Material sets html{font-size:125%} (20px) and .md-typeset{font-size:.8rem} (16px). Heading sizes
 * inside .md-typeset are em-based, so lowering the base scales the whole type ramp with it.
 */

.md-typeset {
  font-size: 0.72rem; /* 14.4px */
  line-height: 1.65;
}

/* Page titles at the default 2em are disproportionate once the body text is smaller. */
.md-typeset h1 {
  font-size: 1.75em;
  margin-bottom: 0.9em;
}

.md-typeset h2 {
  font-size: 1.35em;
}

.md-typeset h3 {
  font-size: 1.1em;
}

/*
 * Reference headings are frequently a bare code span — a CLI command, an API path. At the default
 * inline-code size, and wearing the code chip's background, they stop reading as headings at all
 * and the page becomes an undifferentiated list. Drop the chip and let them inherit heading
 * weight and colour, keeping only the monospace face.
 */
.md-typeset h1 > code,
.md-typeset h2 > code,
.md-typeset h3 > code,
.md-typeset h4 > code {
  font-size: 0.94em;
  font-weight: inherit;
  background-color: transparent;
  padding: 0;
  color: inherit;
}

/* Give each command/endpoint section room to read as its own block. */
.md-typeset h3 {
  margin-top: 2em;
}

/* The permalink marker is navigation, not content: visible on hover, quiet otherwise. */
.md-typeset .headerlink {
  opacity: 0;
  margin-left: 0.4em;
  font-weight: 400;
  transition: opacity 125ms;
}

.md-typeset h1:hover .headerlink,
.md-typeset h2:hover .headerlink,
.md-typeset h3:hover .headerlink,
.md-typeset h4:hover .headerlink,
.md-typeset .headerlink:focus {
  opacity: 0.45;
}

/* Tables carry most of the reference content — the denser the better, within reason. */
.md-typeset table:not([class]) {
  font-size: 0.64rem;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  padding: 0.5em 0.8em;
}

/* Monospace runs visually larger than the surrounding text at the same nominal size. */
.md-typeset code {
  font-size: 0.85em;
}

.md-typeset pre > code {
  font-size: 0.68rem;
  line-height: 1.5;
}

/* Navigation and table of contents: secondary to the content, so a step smaller again. */
.md-nav {
  font-size: 0.66rem;
}

.md-nav__title {
  font-size: 0.66rem;
}

/* Admonitions inherit the body size but their titles are set in rem. */
.md-typeset .admonition,
.md-typeset details {
  font-size: 0.68rem;
}
