/* 窄屏公式修正
   Material 在窄屏给 .arithmatex 的子元素设置 width: min-content，
   MathJax 的 <mjx-container>/<svg> 在 iOS Safari 等浏览器里会算成 0 宽，
   公式看起来就是空白。这里强制按内容宽度显示，并限制最大宽度。 */
@media screen and (max-width: 44.984375em) {
  .md-typeset div.arithmatex {
    margin: 0 !important;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  html .md-typeset div.arithmatex > * {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .md-typeset div.arithmatex mjx-container {
    display: inline-block !important;
  }

  .md-typeset div.arithmatex svg {
    max-width: 100%;
    height: auto;
  }
}

/* 表格容器不要撑宽整页，宽表在容器内横向滑动 */
.md-typeset__table {
  max-width: 100%;
  overflow-x: auto;
}
