/* MyST tables get no scroll wrapper from Furo, and the host inventory tables
   run to nine columns; without this they compress to unreadable. */
article[role=main] table.docutils {
  display: block;
  overflow-x: auto;
}

/* Host inventory tables are dense identifier data: MAC, DNA, serial, model.
   Letting those cells wrap shreds every column to a few characters, so the
   tables marked `{rst-class} nowrap` keep each cell on one line and scroll
   instead. Tables whose cells hold prose are left to wrap normally. */
article[role=main] table.docutils.nowrap td,
article[role=main] table.docutils.nowrap th {
  white-space: nowrap;
}

/* -- Full width ------------------------------------------------------------
   The theme centres a 46em text column and leaves the rest of the window
   empty on both sides. Here the page takes the whole window: the navigation
   keeps its own width at the left edge and the content fills what is left
   (Tim, 6 October 2026: "page should take up 100% of horizontal space").
   Below 63em the theme turns the navigation into a drawer; it gives the
   content the full width only below 48em, so the band between has a rule of
   its own after this one. */
@media (min-width: 63em) {
  .sidebar-drawer {
    flex: 0 0 15em;
    width: 15em;
    justify-content: flex-start;
  }
  /* without this a wide table widens the whole page instead of scrolling in its own box */
  .main {
    min-width: 0;
  }
  .content {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 0 2em;
  }
}

/* From 48em to 63em the theme still centres a 46em column; below 48em it
   already sets exactly this. */
@media (max-width: 63em) {
  .content {
    width: 100%;
    overflow-x: auto;
  }
}

/* -- Tables ----------------------------------------------------------------
   A cell's code (a command, an address, a pin list, a device DNA) is one
   thing to read or copy: it does not break in the middle. A table that is
   then wider than the page scrolls sideways in its own box (the rule at the
   top of this file) instead of crushing its columns. */
article[role=main] table.docutils td code,
article[role=main] table.docutils th code {
  white-space: nowrap;
}
article[role=main] table.docutils th {
  white-space: nowrap;
}
/* ...except the code in a message column: what a check prints, under a
   header such as "The failing line" (docs/_ext/table_code.py marks it
   message-code; no other code is marked). Kept on one line, a failing line
   on "verifying 2" took the whole width and crushed the column beside it to
   a word per line. It wraps at its spaces only: Sphinx puts each of its
   words in a span.pre, which does not break, not even at a hyphen (Furo,
   unlike Sphinx's basic theme, would let it). */
article[role=main] table.docutils:not(.nowrap) td code.message-code {
  white-space: normal;
}
article[role=main] table.docutils td code.message-code span.pre {
  white-space: nowrap;
}

/* -- Pictures --------------------------------------------------------------
   No panel behind pictures. Every drawing brings its own paper and comes in
   two: the light one (class only-light) and a dark twin on the dark theme's
   background (only-dark), and the theme shows the one for its mode. A light
   panel behind a picture would only ever show through a transparent one,
   and on the dark theme that is exactly what it must not do (Tim, 7 Oct
   2026: "Giant white diagrams on a dark-mode site is bad"). */
