/* A whole expression; no microscopic scaling on a narrow phone. */
.problem-math-display { display: block; min-width: 0; max-width: 100%; }
.problem-math-inline {
  display: inline-block;
  max-width: 100%;
  vertical-align: baseline;
}
.problem-math-inline--scroll { display: block; }
/* Generic responsive-image rules must not shrink an inline equation before
   its natural width is measured. Overflow is handled by the formula region. */
.problem-math-inline > mjx-container > svg { max-width: none; }
/* MathJax's clipped accessibility copy must not extend WebKit's scroll area.
   Keep MathML available to screen readers without affecting visual layout. */
mjx-assistive-mml {
  max-width: 1px !important;
  max-height: 1px !important;
  overflow: hidden !important;
}
.problem-math-inline--scroll,
.problem-math-scroll {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding: .15em 0;
}
.problem-math-scroll > mjx-container[jax="SVG"][display="true"] {
  width: max-content;
  min-width: 100%;
  margin: .65em 0 !important;
}
.problem-math-inline--scroll:focus-visible,
.problem-math-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.problem-math-scroll-hint {
  display: block;
  margin: -.2em 0 .6em;
  color: var(--muted);
  font-size: .75rem;
}
.problem-math-scroll-hint[hidden] { display: none; }
