/* ==========================================================================
   section-shell - page-level fixes for the master twig's section wrappers on
   key-theme (key_themes_v2) pages. Not a component: no twig, CSS only.
   Loaded via gff/t2030_section_shell (dependency of gff/keytheme_inner_new).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Inner wrapper (new key-theme pages only - the master twig adds
   .page-main-chapter__inner when the page has Transform 2030 content).
   The section box with its background stays as it is; its content is held
   to the design's 1240px column, centred.
   -------------------------------------------------------------------------- */
.page-main-chapter__inner {
  position: relative; /* above .chapter-gradient */
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Section header (title.html.twig) on new key-theme pages - Finals design:
   a wrapping flex row, eyebrow + H2 left (max 540px), intro right (max
   560px), spaced apart. Replaces the site's 2 x 1fr grid and the 400px H2
   cap (normal-content-module.css) for .page-main-chapter--t2030 only.
   -------------------------------------------------------------------------- */
.page-main-chapter--t2030 .normal-content-module .content-title-wrap.keytheme-content-title-wrap {
  display: flex;
  /* row + wrap: the columns stack by wrapping on narrow screens. (The site's
     <=767px column direction would turn the flex-basis below into heights.) */
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 48px;
  padding-bottom: 28px;
}

.page-main-chapter--t2030 .keytheme-content-title-wrap > .page-title-wrapper {
  flex: 1 1 360px;
  max-width: 540px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.page-main-chapter--t2030 .keytheme-content-title-wrap > .page-title-wrapper > .short-title {
  margin: 0; /* the column's 14px gap spaces it */
}

.page-main-chapter--t2030 .content-title-wrap.hr-align .page-title-wrapper .page-title {
  max-width: none;
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  /* no colour here: the site sets it per section (--section-title-clr,
     white on the blue sections) */
}

.page-main-chapter--t2030 .keytheme-content-title-wrap > .keytheme-content-section {
  flex: 1 1 400px;
  max-width: 560px;
  min-width: 0;
}

.page-main-chapter--t2030 .keytheme-content-section .body-text-field {
  --text-lh: 1.75;
  font-size: 16px;
  line-height: 1.75;
  /* colour from the site (--section-body-clr), so blue sections stay white */
}

/* --------------------------------------------------------------------------
   Section eyebrow (master twig: <span class="short-title"> = the section's
   field_data_tab_title, above the H2). Finals design: yellow tag with the
   brand's 0/10/0/10 corner, 14px above the title.
   -------------------------------------------------------------------------- */
.page-title-wrapper > .short-title {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-radius: 0 10px 0 10px;
  background: #F8B323;
  color: #000;
  font-size: 12px;
  line-height: 1;
  font-weight: var(--fw-bold, 700);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title-wrapper > .short-title:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   Sticky side notes. The theme's base.css gives every [class*=" radius-"]
   element overflow:hidden (to clip its rounded corners/pattern), and the
   section wrapper .page-main-chapter has radius-sm - overflow:hidden makes
   it a scroll container, so position:sticky inside it never sticks.
   overflow:clip clips identically but is NOT a scroll container, so the
   asides stick again. Scoped to sections that contain a sticky aside;
   overflow:hidden stays as the fallback for browsers without clip.
   -------------------------------------------------------------------------- */
.page-main-chapter[class*=" radius-"]:has(
  .mortality__aside,
  .continuum__note--emoc,
  .t2030-survival__aside,
  .t2030-trend-panel__aside,
  .t2030-family-planning__aside,
  .t2030-indicators__aside
) {
  overflow: hidden;
  overflow: clip;
}
