/* Finishing styles for the main V1 report. Each adjoining section supplies half
   the space between content blocks, including at changes of background. */
:root {
  --report-soft-mint: #E0EFE9;
  --report-yellow: #F4CB54;
  --rp-pad-y: clamp(44px, 3.9vw, 56px);
}
@media (max-width: 1023px) {
  :root { --rp-pad-y: clamp(32px, 4vw, 40px); }
}
@media (max-width: 639px) {
  :root { --rp-pad-y: 28px; }
}

:is(.nd, .ed, .dp, .qm, .qa, .mp, .ec, .pf, .ev) {
  padding-block: var(--rp-pad-y);
}
.ixs__wrap, .v1-platforms-wrap {
  box-sizing: border-box;
  max-width: calc(var(--rp-max) + 2 * var(--rp-pad-x));
  margin-inline: auto;
  padding-inline: var(--rp-pad-x);
}
.ixs__wrap { padding-block: var(--rp-pad-y); }
.ixs { height: auto; }
@media (min-width: 1024px) and (min-height: 640px) {
  .ixs__wrap { height: auto; }
  .ix-grid { min-height: clamp(360px, 33vw, 480px); }
}
.dp { min-height: auto; }
.qa-intro, .qa-downloads { padding-inline-start: 0; }

/* ===== «توزيع المسلمين الجدد» (V1) =====
   Background is switchable through --nd-bg:
     neutral gray (current) #F0F1F2 · white #FFFFFF · original mint var(--report-soft-mint) */
.nd {
  --nd-bg-gray: #F0F1F2;
  --nd-bg-white: #FFFFFF;
  --nd-bg-mint: var(--report-soft-mint);
  --nd-bg: var(--nd-bg-gray);
  background: var(--nd-bg);
  border-radius: var(--rp-radius);
  padding-block: calc(var(--rp-pad-y) * 1.3);          /* more breathing room inside */
}
.nd::before { content: none; }
.nd-lang { margin-top: clamp(40px, 4.4vh, 56px); }
.nd-lang__head { margin-bottom: 16px; }
/* gender donut keeps its dark-teal / medium-teal pair */
.nd-chart, .nd-row[data-k="w"] { --mint: #398f83; }
.nd-chart.is-in .nd-tick--w { stroke: var(--mint); }
.nd-track { stroke: rgb(11 32 44 / 7%); }               /* neutral ring on the gray surface */

/* language accents reuse the shared tokens (--rp-lang-es / --rp-lang-pt) */
.nd-card--es { --nd-accent: var(--rp-lang-es); }
.nd-card--pt { --nd-accent: var(--rp-lang-pt); }
.nd-card--es .nd-card__native { color: var(--nd-accent); opacity: 1; }
.nd-card--pt {
  background: #fff;
  color: var(--navy);
  box-shadow: inset 0 0 0 1px rgb(11 32 44 / 12%);
}
/* coral text is too light on white for small type → shown as a chip with navy text */
.nd-card--pt .nd-card__native { align-self: start; display: inline-block; padding: 2px 9px; border-radius: 6px; background: var(--nd-accent); color: var(--navy); opacity: 1; font-weight: 600; }
.nd-card .nd-card__pct { background: var(--nd-accent); color: var(--navy); }
.nd-card--pt .nd-card__code { opacity: .07; }
.nd.lang-active .nd-card:not(.is-hot) { opacity: 1; }    /* no faded / inactive look — both cards stay equal */
.nd-bar__seg--es { background: var(--rp-lang-es); }
.nd-bar__seg--pt { background: var(--rp-lang-pt); }
.nd-note, .nd-bar__scale { color: var(--muted); }

/* Size the country stage around its portrait cards. Credits already provide
   the first part of its bottom inset. */
.cs {
  margin-block-end: 0;
  padding-block-end: calc(var(--rp-pad-y) - 12px);
}
.cs-stage {
  height: calc(var(--cs-w) / .74 + 240px + var(--rp-pad-y));
  min-height: 0;
}
.cs-head { top: var(--rp-pad-y); }

/* one clear gap between every section heading block and its content (V1) */
:root { --rp-head-gap: clamp(28px, 2.6vw, 40px); }
.rp-head, .mp-head, .ec-head, .pf-head, .qm .qm-head, .ed .ed-head { margin-block-end: var(--rp-head-gap); }
/* title → description never touch */
:is(.mp-head, .ec-head, .pf-head) .rp-desc, .qm-desc { margin-top: 10px; }
.ec {
  background: color-mix(in srgb, var(--report-soft-mint) 52%, var(--offwhite));
  border-block-start: 0;
}

/* Highlight the featured platform. Language colors come only from --rp-lang-* in report-tokens.css. */
.pf-feature .pf-track span { background: var(--report-yellow); }
.ix-status__bar i { background: var(--tealink); }
.ed-gauge__fill { background: var(--mint); }
.ed-gauge__mark { color: var(--mint); }

/* More breathing room around «معاني القرآن الكريم» (V1 only) */
.qm { padding-block: calc(var(--rp-pad-y) * 1.5); }

/* Studio photograph beneath the Portuguese audio visualization. */
.qm-audio__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background:
    linear-gradient(rgb(18 59 64 / 14%), rgb(18 59 64 / 14%)),
    url("quran/portuguese-audio-studio-microphone.webp") left 20% / cover no-repeat;
  mask-image: linear-gradient(to right, black 30%, transparent 98%);
}
@media (max-width: 760px) {
  .qm-audio__visual::after {
    background-size: auto, auto 135%;
    mask-image: linear-gradient(to right, black 30%, transparent 98%),
                linear-gradient(to bottom, black 62%, transparent);
    mask-composite: intersect;
  }
}
/* «الأداء الرقمي»: top space matches the visible space below it (own bottom pad + «معاني القرآن» top pad) */
.dp { padding-top: calc(var(--rp-pad-y) * 2.5); }

/* «معاني القرآن»: clear separation between the video cards and the audio banner */
.qm-audio { margin-top: clamp(48px, 5vw, 72px); }
/* «الإنتاج الرقمي»: more room above and below */
.mp { padding-block: calc(var(--rp-pad-y) * 1.5); }
/* «شواهد الأثر»: reels use the full content width so they line up with every other section
   (the shared carousel otherwise shrinks with viewport height) */
@media (min-width: 1051px) {
  .ev[data-evidence-view="carousel"] .ev-wrap { max-width: var(--rp-max); }
}
