/* The drto registry render (Info._repr_html_): a bordered panel on the
   theme's surface color, distinct from the page and from code blocks
   in both palettes, with the theme's text color throughout. The second
   selector of each pair matches the committed notebooks' earlier
   markup, a <b> heading followed by a bare table, which carries no
   class. */
div.drto-registry,
.cell_output .text_html > div:has(> b:first-child + table) {
  background-color: var(--pst-color-surface, transparent);
  border: 1px solid var(--pst-color-border, #888);
  border-radius: 4px;
  padding: 0.5em 0.8em;
  color: var(--pst-color-text-base, inherit);
  /* a model with many declarations runs the length of the page:
     the panel scrolls in both directions instead */
  max-height: 24em;
  overflow: auto;
}

/* In dark mode the theme paints every text_html output that is not a
   dataframe with a light panel, expecting the content to bring its own
   dark text; its corners would show around the registry panel's
   radius. !important spares the selector from having to outrank the
   theme rule's specificity. */
.cell_output .text_html:has(> div.drto-registry),
.cell_output .text_html:has(> div > b:first-child + table) {
  background-color: transparent !important;
}

div.drto-registry table,
.cell_output .text_html > div > b:first-child + table {
  width: auto;
  border-collapse: collapse;
  margin: 0.4em 0 0.8em;
  background-color: transparent;
}

div.drto-registry td,
.cell_output .text_html > div > b:first-child + table td {
  border: 1px solid var(--pst-color-border, #888);
  padding: 0.15em 0.6em;
  background-color: transparent;
}

div.drto-registry code,
.cell_output .text_html td > code,
.cell_output .text_html li > code {
  color: inherit;
  background: transparent;
}

/* A solver log is committed as executed, which can be hundreds of
   iteration lines. The docs build joins a cell's consecutive stdout
   entries into one output (see docs/conf.py); this gives that output a
   fixed height with a scrollbar, so a long log stays readable in place
   instead of running down the page, the way JupyterLab presents one. */
.cell_output div.output.stream {
  max-height: 24em;
  overflow-y: auto;
}
