/* VIS-05 proposal. Scoped Wealth card tokens, no section/H2/header/form changes. */
/* WordPress may add an empty paragraph after the image during shortcode
   formatting. It is not content and must not become an extra grid row. */
:is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card > p:empty {
  display: none;
}
:is(.alteris-related, .alteris-profile-insights) .related-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
:is(.alteris-related, .alteris-profile-insights) .related-list .alteris-editorial-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  font: 300 16px/1.65 Poppins, Arial, sans-serif;
}
:is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0;
  box-shadow: 0 18px 44px rgba(89, 33, 48, .12);
}
:is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card .post-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 24px 2px 0;
}
:is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card .post-cat {
  flex: none;
  margin: 0 0 10px;
  color: #642235;
  font: 500 11px/1.65 Poppins, Arial, sans-serif;
}
:is(.alteris-related, .alteris-profile-insights) .related-list .alteris-editorial-card h3 {
  margin: 0 0 10px;
  padding: 0;
  color: #592130;
  font: 400 21px/1.25 "DM Serif Display", Georgia, serif;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
:is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card h3 a {
  color: #592130;
  text-decoration: none;
}
:is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card .alteris-editorial-card__excerpt {
  flex: 1;
  margin: 0;
  color: #5d686d;
  font: 300 14px/1.65 Poppins, Arial, sans-serif;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
:is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card .post-author {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  margin: auto 0 0;
  border-top: 1px solid var(--line);
  padding: 15px 0 0;
  color: var(--ink);
  font: 500 12.5px/1.65 Poppins, Arial, sans-serif;
}
:is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card .post-author strong { font-weight: 500; }
@media (max-width: 760px) {
  :is(.alteris-related, .alteris-profile-insights) .related-list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  :is(.alteris-related, .alteris-profile-insights) .related-list .alteris-editorial-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); }
  :is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card > img { height: 100%; min-height: 182px; aspect-ratio: auto; }
  :is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card .post-body { padding: 19px; background: #fff; }
  :is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card .alteris-editorial-card__excerpt { display: none; }
  :is(.alteris-related, .alteris-profile-insights) .related-list .alteris-editorial-card h3 { -webkit-line-clamp: 4; }
  :is(.alteris-related, .alteris-profile-insights) .related-list .alteris-editorial-card--no-image { grid-template-columns: minmax(0, 1fr); }
  /* Keep a photo's intrinsic pixel height out of the automatic grid row.
     The existing text column sets card height; the image fills that same crop. */
  :is(.alteris-related, .alteris-profile-insights) .related-list .alteris-editorial-card:not(.alteris-editorial-card--graphic):not(.alteris-editorial-card--no-image) {
    position: relative;
    min-height: 182px;
  }
  :is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card:not(.alteris-editorial-card--graphic) > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 116px;
    height: 100%;
    min-height: 0;
  }
  :is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card:not(.alteris-editorial-card--graphic):not(.alteris-editorial-card--no-image) > .post-body {
    grid-column: 2;
  }
}
@media (max-width: 390px) {
  :is(.alteris-related, .alteris-profile-insights) .related-list .alteris-editorial-card:not(.alteris-editorial-card--no-image) { grid-template-columns: 102px minmax(0, 1fr); }
  :is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card > img { min-height: 170px; }
  :is(.alteris-related, .alteris-profile-insights) .related-list .alteris-editorial-card:not(.alteris-editorial-card--graphic):not(.alteris-editorial-card--no-image) { min-height: 170px; }
  :is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card:not(.alteris-editorial-card--graphic) > img { width: 102px; min-height: 0; }
}
/* Inspected graphics use their natural ratio, retaining ribbons without letterbox bands. */
:is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card > img.alteris-editorial-card__image--graphic {
  object-fit: contain;
  aspect-ratio: auto;
  object-position: center;
  background: #f5e8e0;
}
@media (max-width: 760px) {
  /* After both mobile rules: inspected graphics stack; ordinary photos stay beside text. */
  :is(.alteris-related, .alteris-profile-insights) .related-list .alteris-editorial-card.alteris-editorial-card--graphic {
    grid-template-columns: minmax(0, 1fr);
  }
  :is(.alteris-related, .alteris-profile-insights) .alteris-editorial-card > img.alteris-editorial-card__image--graphic {
    height: auto;
    min-height: 0;
    /* All nine inspected originals are 1000 by 665. Reserve their natural
       space before lazy loading so the card text does not jump. */
    aspect-ratio: 1000 / 665;
  }
}
