/* ---------- CMS-driven Perspectives additions ---------- */

.perspective-index-card.has-card-image {
  position: relative;
  min-height: 382px;
  padding-right: 365px;
  overflow: hidden;
}

.perspective-index-card.has-card-image > * {
  position: relative;
  z-index: 1;
}

.perspective-index-card.has-card-image::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 24px;
  right: 22px;
  bottom: 24px;
  width: 320px;
  background: #0e0d0c var(--perspective-card-image) center / contain no-repeat;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* The Human-AI Convergence card used to have a hard-coded legacy cover in
   perspectives.css. When the CMS supplies a card image, let that image win. */
#human-ai-convergence.has-card-image::after {
  background: #0e0d0c var(--perspective-card-image) center / contain no-repeat;
}

.perspective-index-empty {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--muted);
}

.perspective-cms-byline {
  margin: 15px 0 0;
  color: var(--muted);
  font: 12px/1.5 var(--font-mono);
  letter-spacing: .04em;
}

.perspective-cms-hero {
  margin: 34px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}

.perspective-cms-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.perspective-cms-body > :first-child {
  margin-top: 0;
}

/* In CMS article bodies, a line beginning with // becomes a branded TGP
   eyebrow label, matching section markers such as // 03 — LATEST SIGNAL. */
.perspective-cms-section-label {
  display: block;
  margin: 52px 0 14px;
}

.perspective-cms-body blockquote {
  margin: 34px 0;
  padding: 22px 24px;
  border-left: 2px solid var(--green);
  background: rgba(118,244,82,.045);
  font-size: 21px;
  line-height: 1.5;
}

.perspective-cms-body blockquote p:last-child {
  margin-bottom: 0;
}

.perspective-cms-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 34px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.perspective-cms-inline-image {
  width: fit-content;
  max-width: min(100%, 900px);
  margin: 34px auto;
}

.perspective-cms-inline-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.perspective-cms-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 52px 0;
}

.perspective-cms-body pre,
.perspective-cms-body code {
  font-family: var(--font-mono);
}

.perspective-cms-body pre {
  overflow-x: auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  font-size: 13px;
}

@media (max-width: 720px) {
  .perspective-index-card.has-card-image {
    min-height: 0;
    padding: 302px 21px 25px;
  }

  .perspective-index-card.has-card-image::after {
    top: 18px;
    left: 18px;
    right: 18px;
    bottom: auto;
    width: auto;
    height: 258px;
  }

  .perspective-cms-hero {
    margin-top: 28px;
  }

  .perspective-cms-section-label {
    margin-top: 42px;
  }

  .perspective-cms-body blockquote {
    padding: 17px 18px;
    font-size: 19px;
  }
}

/* Real images provide intrinsic height on phones; desktop keeps its existing visual. */
.perspective-card-mobile-image { display: none; }
@media (max-width: 720px) {
  #perspective-index .perspective-index-card.has-card-image:has(.perspective-card-mobile-image) {
    min-height: 0;
    padding: 21px 21px 25px;
  }
  #perspective-index .perspective-index-card.has-card-image:has(.perspective-card-mobile-image)::after {
    display: none;
  }
  .perspective-index-card .perspective-card-mobile-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 24px;
    border-radius: var(--radius);
  }
}
