/* User Provided Stylesheet */

/* Systems From Scratch — minimal overrides on top of the MyST book theme. */

/* The chapter header table (target / prerequisites / what it measures) appears on every
   chapter. Keep it compact and visually distinct from body tables. */
.chapter-header table {
  font-size: 0.9rem;
}

/* Result tables are wide and numeric; never let them break the page layout. */
table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

/* Tabular figures so measured columns line up down the page. */
td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}

code {
  font-size: 0.9em;
}

/* Diagrams are SVG written by scripts/render-figures.py. They carry their own type sizes, so
   all the theme has to do is stop them overflowing on a phone. */
img[src$=".svg"] {
  max-width: 100%;
  height: auto;
}

/* The provenance line under every figure used to be styled here, by `p > em:only-child`, on the
 * reasoning that no other paragraph in the book is written as nothing but emphasis.
 *
 * That selector does not mean what it reads as. `:only-child` counts *element* children and
 * ignores text nodes, so it matched every paragraph containing one emphasis and no other inline
 * element -- which is a great many of them. "It is much harder to be able to *find out* -- on a
 * machine in front of you" put `find out` on its own line, at 0.78rem and 72% opacity, in the
 * middle of a sentence.
 *
 * CSS cannot express "this paragraph is entirely emphasis": there is no way to require the
 * absence of text nodes. Styling it properly needs a real class on the element, which means the
 * renderer emitting one and `scripts/build-pdf.py` gaining a branch for it. Until that is done
 * the line renders at body weight, which is how it read for the whole of the book's life before
 * the attempt, and is wrong in a way that costs nothing. */
