html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

#quarto-content,
main.content,
.page-columns,
.page-columns > * {
  min-width: 0;
  max-width: 100%;
}

/* Keep wide tables and equations scrollable without widening the page. */
@media (max-width: 760px) {
  main table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  main table th,
  main table td {
    white-space: nowrap;
  }
}

.math.display {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.math.display mjx-container {
  min-width: max-content;
}

.mermaid,
.mermaid svg {
  max-width: 100%;
}

.mermaid {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
  .diagnostics-panel .quarto-layout-row {
    align-items: stretch;
  }

  .diagnostics-panel .quarto-layout-cell {
    width: 100%;
    margin-right: 0;
  }
}
