/* Local overrides for quarto-live (Pyodide) cells.
   Kept separate from obooks.scss, which is synced from the obooks repo. */

/* A wide document-term matrix must scroll inside its own box. Without this the
   pandas table pushes past the content column, overlaps the table of contents,
   and gives the whole page a horizontal scrollbar. */
.cell-output-container-pyodide {
  max-width: 100%;
}

.cell-output-pyodide {
  overflow-x: auto;
  max-width: 100%;
}

.cell-output-pyodide table.dataframe {
  margin-bottom: 0.25rem;
}

/* Verbatim source documents (e.g. the sample pathology report in Chapter 2).
   The real corpus stores each report as one long unbroken field, so a code
   fence would scroll sideways forever. This keeps the raw look -- monospace,
   boxed, every OCR artifact intact -- while wrapping like prose. */
.sample-report {
  font-family: var(--bs-font-monospace, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 30rem;
  overflow-y: auto;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-left: 3px solid rgba(128, 128, 128, 0.6);
  border-radius: 3px;
  background: rgba(128, 128, 128, 0.06);
}

/* Pandoc wraps the div's text in a <p>; drop its margin so the box stays tight. */
.sample-report p {
  margin: 0;
}
