.post-body img {
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
  height: auto;
  background: #fff;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Tall flowchart figures (the co-simulation loop) read better at a smaller
   width than the full column. */
.post-body img[src*="cosim_loop_flowchart.svg"] {
  width: 440px;
  max-width: 100%;
}

/* Keep wide display equations tidy: scroll within their box instead of
   overflowing the page on narrow screens. */
.post-body .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0.25rem;
  margin: 1.25rem 0;
}
.post-body .katex-display > .katex {
  white-space: nowrap;
}
