/* Shared editorial finishing for the native CEDS reader.
   Keep each chapter's color, photography, and magazine layout intact. */

/* Chapter openings: the title and deck should read as one unit even when a
   long place name or priority wraps onto several lines. */
.editorial-reader.web-edition #article-content > .article-opening h1 {
  text-wrap: balance;
  overflow-wrap: break-word;
}
.editorial-reader.web-edition #article-content > .article-opening :is(
  .people-umbrella-dek,
  .infra-umbrella-dek,
  .land-umbrella-dek,
  .executive-dek,
  .swot-hero-dek,
  .strategy-magazine-hero-dek,
  .standalone-hero__deck
) {
  max-width: 67ch;
  text-wrap: pretty;
}

/* Key insight panels retain their own palettes. Align their reading rhythm
   and prevent a short card from ending with a stray paragraph margin. */
.editorial-reader.web-edition #article-content :is(
  .people-umbrella-insights-head,
  .swot-key-insights > header,
  .perf-mega-insights > header
) {
  max-width: 80ch;
}
.editorial-reader.web-edition #article-content :is(
  .people-umbrella-insights,
  .relations-insights,
  .swot-key-insights,
  .perf-mega-insights,
  .strategy-insights
) h2 {
  text-wrap: balance;
}
.editorial-reader.web-edition #article-content :is(
  .people-umbrella-insight,
  .relations-insight-card,
  .swot-insights-grid > article,
  .perf-mega-insight,
  .magazine-insight-grid > article,
  .strategy-insights > div > :is(article, section)
) {
  min-width: 0;
  overflow-wrap: break-word;
}
.editorial-reader.web-edition #article-content :is(
  .people-umbrella-insight,
  .relations-insight-card,
  .swot-insights-grid > article,
  .perf-mega-insight,
  .magazine-insight-grid > article,
  .strategy-insights > div > :is(article, section)
) :is(h3, h4) {
  text-wrap: balance;
}
.editorial-reader.web-edition #article-content :is(
  .people-umbrella-insight,
  .relations-insight-card,
  .swot-insights-grid > article,
  .perf-mega-insight,
  .magazine-insight-grid > article,
  .strategy-insights > div > :is(article, section)
) p:last-child {
  margin-bottom: 0;
  line-height: 1.68;
  text-wrap: pretty;
}

/* Regional Relationships is the quietest Key Insights variant. Give its
   heading a chapter-colored rule so it reads as a section, not another card. */
.editorial-reader.web-edition #article-content .relations-insights {
  border-top: 4px solid #765985;
}
.editorial-reader.web-edition #article-content .relations-insights > h2 {
  max-width: 24ch;
  line-height: 1.16;
}
.editorial-reader.web-edition #article-content .relations-insight-card p,
.editorial-reader.web-edition #article-content .perf-mega-insight p {
  font-size: max(.9rem, 14px);
}
.editorial-reader.web-edition #article-content .magazine-insight-grid article p {
  font-size: .9rem !important;
  line-height: 1.68 !important;
}

/* The Industry Clusters close carries the same practical meaning as the
   strategy callouts. Make its label legible and give the thought a surface. */
.editorial-reader.web-edition #article-content .closing-thought {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border-left: 5px solid var(--page-accent, #775574);
  border-radius: 0 16px 16px 0;
  background: #f7f3f8;
}
.editorial-reader.web-edition #article-content .closing-thought h2 {
  margin: 0 0 .7rem;
  color: #624975;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.editorial-reader.web-edition #article-content .closing-thought p {
  max-width: 66ch;
  margin: 0;
  color: #293550;
  text-wrap: pretty;
}

/* Give compact metric labels the same readability as the newer stat cards.
   Tabular figures stay aligned when the three-column strip is scanned. */
.editorial-reader.web-edition #article-content .metrics-strip .metric {
  min-width: 0;
}
.editorial-reader.web-edition #article-content .metrics-strip .metric .period {
  margin-bottom: .6rem;
  color: #566176;
  font-size: .7rem;
  line-height: 1.5;
}
.editorial-reader.web-edition #article-content .metrics-strip .metric strong,
.editorial-reader.web-edition #article-content .data-highlights strong,
.editorial-reader.web-edition #article-content .relations-stat-card strong {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.editorial-reader.web-edition #article-content .metrics-strip .metric strong {
  color: #293550;
  font-weight: 700;
  line-height: 1.12;
  white-space: normal;
}
.editorial-reader.web-edition #article-content .metrics-strip .metric .metric-label {
  color: #39465b;
  font-size: .78rem;
  line-height: 1.5;
}
.editorial-reader.web-edition #article-content .metrics-strip .metric small {
  color: #566176;
  font-size: .7rem;
  line-height: 1.5;
}
.editorial-reader.web-edition #article-content .data-highlights > div,
.editorial-reader.web-edition #article-content .relations-stat-card {
  min-width: 0;
}
.editorial-reader.web-edition #article-content .data-highlights span,
.editorial-reader.web-edition #article-content .relations-stat-card p {
  text-wrap: pretty;
}

/* Keep both the place description and its attribution readable. SWOT finding
   credits have a separate, intentionally compact treatment. */
.editorial-reader.web-edition #article-content .article-opening figure figcaption,
.editorial-reader.web-edition #article-content :is(
  .people-topic-photo,
  .land-umbrella-topic-photo,
  .perf-topic-photo,
  .eval-mag-story-figure,
  .strategy-support-photo,
  .magazine-picture
) figcaption {
  line-height: 1.55;
  overflow-wrap: break-word;
}
.editorial-reader.web-edition #article-content .article-opening figure figcaption a,
.editorial-reader.web-edition #article-content :is(
  .people-topic-photo,
  .land-umbrella-topic-photo,
  .perf-topic-photo,
  .eval-mag-story-figure,
  .strategy-support-photo,
  .magazine-picture
) figcaption a {
  text-underline-offset: 3px;
}

/* Footer: a calmer final line and links that can wrap without collision. */
body.editorial-reading .footer-main > div:first-child > p:last-child {
  max-width: 66ch;
  font-size: .88rem;
  line-height: 1.7;
}
body.editorial-reading .footer-nav {
  flex-wrap: wrap;
  gap: .3rem 1.25rem;
}
body.editorial-reading .footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.4;
}
body.editorial-reading .footer-bottom {
  font-size: .82rem;
  line-height: 1.6;
}

@media (max-width: 700px) {
  .editorial-reader.web-edition #article-content .data-highlights {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 430px) {
  .editorial-reader.web-edition #article-content .metrics-strip .metric {
    grid-template-columns: minmax(0, 1fr);
  }
  .editorial-reader.web-edition #article-content .metrics-strip .metric > :is(.period, strong, .metric-label, small) {
    grid-column: 1;
    grid-row: auto;
    align-self: auto;
    margin-top: 0;
  }
  .editorial-reader.web-edition #article-content .metrics-strip .metric .metric-label {
    margin-top: .4rem;
  }
  .editorial-reader.web-edition #article-content .metrics-strip .metric small {
    margin-top: .3rem;
  }
}
