/* Narrow-viewport containment: wrap or scroll inside the content box,
   never push the whole page wider than the viewport. */

/* Wide tables (e.g. danger admonition tables) — horizontal scroll in place */
.md-typeset table:not([class]) {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.md-typeset .tabbed-content,
.md-typeset .admonition,
.md-typeset details {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mermaid diagrams: keep SVG inside content; allow local horizontal scroll */
.md-typeset .mermaid,
.md-typeset pre.mermaid,
.md-typeset .mermaid svg {
  max-width: 100%;
}

.md-typeset .mermaid,
.md-typeset pre.mermaid {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Long inline code / tokens: wrap instead of expanding the page */
.md-typeset code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Fenced code blocks already scroll in Material; cap width defensively */
.md-typeset pre > code {
  max-width: 100%;
}

/* Content column must not force document overflow */
.md-content,
.md-content__inner,
.md-typeset {
  max-width: 100%;
  min-width: 0;
}
