/* Shared responsive rules for rich content in the admin editor and public themes. */
.rich-editor,
.rich-surface,
.article-body {
  min-width: 0;
  max-width: 100%;
}

.article-page {
  min-width: 0;
}

.rich-editor {
  overflow: hidden;
}

.rich-surface,
.article-body {
  overflow-wrap: anywhere;
}

/* A wide table scrolls inside its own area instead of widening the page. */
.rich-surface table,
.article-body table {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin: 1.5em 0;
  overflow-x: auto;
  border-collapse: collapse;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.rich-surface th,
.rich-surface td,
.article-body th,
.article-body td {
  min-width: 130px;
  padding: 9px 11px;
  border: 1px solid #bac5cb;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.article-body th {
  background: #f2f5f6;
  text-align: left;
}

.rich-surface img,
.article-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

.article-cover {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.principal-detail-photo,
.signature {
  max-width: 100%;
  height: auto;
}

.rich-surface img,
.article-body img {
  margin-right: auto;
  margin-left: auto;
}

.article-body blockquote {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.article-body iframe,
.article-body video,
.article-body embed,
.article-body object {
  display: block;
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.article-body pre {
  max-width: 100%;
  overflow-x: auto;
}

.article-body a,
.article-page > header h1,
.content-card h2 {
  overflow-wrap: anywhere;
}

.people article {
  min-width: 0;
}

.people .portrait {
  display: grid;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  place-items: center;
  background: #dfe5e8;
  color: #9ba8ae;
  text-decoration: none;
}

.people .portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.people .portrait span {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
}

.people h3 a {
  text-decoration: none;
  overflow-wrap: anywhere;
}

.people article > p small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  opacity: .72;
  overflow-wrap: anywhere;
}

.people .person-role {
  margin: 13px 0 0;
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.people .principal-person {
  border-color: var(--accent);
}

.theme-heritage .people .principal-person {
  text-align: center;
}

.theme-horizon .people .principal-person .portrait {
  outline: 5px solid var(--accent);
  outline-offset: -5px;
}

.theme-journal .people .principal-person {
  border-top-width: 7px;
}

.theme-natura .people .portrait {
  border-radius: 90px 90px 0 0;
}

.people > .people-marquee {
  display: block;
  width: calc(100% + max(24px, 8vw));
  overflow: hidden;
  outline-offset: 5px;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.people .people-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: people-scroll-left-to-right 46s linear infinite;
}

.people .people-group {
  display: flex;
  flex: none;
  gap: 18px;
  padding-right: 18px;
}

.people .people-group article {
  flex: 0 0 clamp(175px, 18vw, 235px);
  width: clamp(175px, 18vw, 235px);
}

.people .people-marquee:hover .people-track,
.people .people-marquee:focus-within .people-track {
  animation-play-state: paused;
}

@keyframes people-scroll-left-to-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .people > .people-marquee {
    overflow-x: auto;
    mask-image: none;
  }

  .people .people-track {
    animation: none;
  }

  .people .people-group[aria-hidden="true"] {
    display: none;
  }
}

@media (max-width: 800px) {
  .article-page {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }

  .article-body {
    font-size: 16px;
    line-height: 1.75;
  }

  .rich-surface th,
  .rich-surface td,
  .article-body th,
  .article-body td {
    min-width: 120px;
    padding: 8px 10px;
  }

  .people > .people-marquee {
    width: calc(100% + 22px);
  }

  .people .people-group article {
    flex-basis: 170px;
    width: 170px;
  }
}
