/* Reusable article-end related-page cards. Keep this file page-agnostic so the
   section can be copied to another article without changing the component. */
.rp-related {
  --rp-ink: var(--pd-ink, #172033);
  --rp-muted: var(--pd-muted, #5f6878);
  --rp-line: var(--pd-line, #ded8cd);
  --rp-accent: var(--pd-accent-dark, #65213a);
  --rp-green: var(--pd-green, #225b48);
  background: #fff;
}
.rp-related__header { width: min(100%, 760px); margin: 0 auto 24px; }
.rp-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.rp-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--rp-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 32, 51, .08);
  color: var(--rp-ink);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.rp-card:hover {
  border-color: #b99447;
  box-shadow: 0 16px 34px rgba(23, 32, 51, .13);
  color: var(--rp-ink);
  transform: translateY(-3px);
}
.rp-card:focus-visible { outline: 3px solid #2b72d6; outline-offset: 4px; }
.rp-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #e9e5dc;
  object-fit: cover;
}
.rp-card__body {
  display: flex;
  min-height: 206px;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 17px;
}
.rp-card__label {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f4e3ea;
  color: var(--rp-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}
.rp-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--rp-ink);
  font-size: 18px;
  line-height: 1.45;
}
.rp-card__description {
  display: block;
  color: var(--rp-muted);
  font-size: 14px;
  line-height: 1.7;
}
.rp-card__action {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  color: var(--rp-accent);
  font-size: 13px;
  font-weight: 900;
}
.rp-card--signup { border-color: #d7c390; background: #fffaf0; }
.rp-card--signup .rp-card__label { background: #e9dfc8; color: #5d4314; }
.rp-card--signup .rp-card__action { color: var(--rp-green); }

@media (max-width: 700px) {
  .rp-related__grid { grid-template-columns: 1fr; gap: 14px; }
  .rp-card__body { min-height: 0; padding: 16px; }
  .rp-card__action { margin-top: 4px; }
}

@media (min-width: 701px) and (max-width: 1040px) {
  .rp-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .rp-card { transition: none; }
}
