/* KernLens site styles, layered on top of mkdocs-material.
 *
 * Two things are here: a hint of the language switcher the theme renders
 * from `extra.alternate`, and a tightening of the typography.  Everything
 * is expressed in the theme's own custom properties
 * (`--md-primary-fg-color` and friends) so the light and dark schemes
 * both keep working -- a hard-coded colour that looks right in one is
 * wrong in the other.
 */

/* --- language switcher ------------------------------------------------ */

/* The switcher is the theme's `partials/alternate.html`, in the header on
 * the same row as the palette toggle and the search box.  It is a
 * dropdown, so almost nothing needs styling.
 *
 * One thing does: the menu cannot mark the language you are currently
 * reading.  mkdocs renders `extra.alternate` as a plain list, so both
 * entries look identical and the one that leads nowhere new is presented
 * as if it did.  There is no per-page signal to compare against -- the
 * page context is not available where the header renders -- so the
 * entries carry `hreflang` and the hover state is styled to make the
 * target explicit instead of implying a selection. */
.md-header .md-select__link:hover {
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
}

/* --- typography ------------------------------------------------------- */

/* The default measure is 61 characters, which suits prose and leaves a
 * command table or a captured output block scrolling.  Widen the content
 * column only on wide screens, so the reading measure on a laptop is
 * untouched. */
@media screen and (min-width: 76.25em) {
  .md-grid {
    max-width: 68rem;
  }
}

/* Section headings carry a rule, so a long page has visible structure
 * when scrolled past the navigation. */
.md-typeset h2 {
  margin-top: 2.4em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset h3 {
  margin-top: 1.8em;
}

/* Captured output is the point of the tutorial pages; give the fences a
 * little more room and a fixed line height so the columns of a decoded
 * page-table walk or a slab listing still line up. */
.md-typeset pre > code {
  line-height: 1.55;
  font-size: 0.72rem;
}

/* Tables in this documentation are mostly two-column reference material
 * (`| Option | Meaning |`).  Zebra striping and a lighter rule make a
 * 40-row table scannable. */
.md-typeset table:not([class]) th {
  font-weight: 600;
  white-space: nowrap;
}

.md-typeset table:not([class]) tbody tr:nth-child(odd) {
  background: var(--md-default-fg-color--lightest);
}

/* The banner is an image at the top of the front page; do not let the
 * default content margin push it down from the header. */
.md-typeset > div[align="center"]:first-of-type {
  margin-top: 0;
}