.rich-text figure.image {
  margin: 1.25rem 0;
  max-width: 100%;
}
.rich-text figure.image > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.rich-text figure.image > figcaption {
  margin-top: 0.5rem;
  font-size: 0.875em;
  line-height: 1.4;
  opacity: 0.7;
  text-align: center;
}

/* Placement. Width comes with the figure (style="width: 40%"); "full" ignores it. */
.rich-text figure.image-full {
  width: 100% !important;
}
.rich-text figure.image-center {
  margin-left: auto;
  margin-right: auto;
}
.rich-text figure.image-left {
  float: left;
  margin: 0.25rem 1.5rem 1rem 0;
}
.rich-text figure.image-right {
  float: right;
  margin: 0.25rem 0 1rem 1.5rem;
}
/* Text wraps around left and right images; the content's end still clears them. */
.rich-text::after {
  content: "";
  display: block;
  clear: both;
}
/* On a phone there is no room beside an image: every image takes the full width. */
@media (max-width: 640px) {
  .rich-text figure.image-left,
  .rich-text figure.image-right,
  .rich-text figure.image-center {
    float: none;
    width: 100% !important;
    margin-left: 0;
    margin-right: 0;
  }
}

.rich-text table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: collapse;
  table-layout: fixed;
}
.rich-text th,
.rich-text td {
  border: 1px solid rgba(128, 128, 128, 0.35);
  padding: 0.5rem 0.75rem;
  vertical-align: top;
  text-align: left;
}
.rich-text th {
  font-weight: 600;
  background: rgba(128, 128, 128, 0.08);
}
.rich-text th > p,
.rich-text td > p {
  margin: 0;
}

.rich-text hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid rgba(128, 128, 128, 0.35);
}
