/* The Raisina Post | homepage section rhythm.
   Loaded LAST on the homepage only. Page templates, article typography,
   shared header/footer and rail/carousel geometry are deliberately unchanged.

   Major sections: Market pulse, Latest reporting, The Power Brief, Explore.
   Nested sections: Bulletins, More reporting.
   All sizes and vertical distances derive from one compact scale. */

body:has(.editorial-cover) main#main{
  --rp-home-section-gap:clamp(48px,4.3vw,64px);
  --rp-home-inside-gap:clamp(32px,3vw,42px);
  --rp-home-heading-size:clamp(21px,1.65vw,24px);
  --rp-home-subheading-size:clamp(17px,1.28vw,19px);
  --rp-home-heading-gap:20px;
}

/* The market ribbon is compact, but uses the same headline scale and grid. */
body:has(.editorial-cover) main#main #market-pulse .market-ribbon-inner{
  padding-block:16px 13px;
}
body:has(.editorial-cover) main#main #market-pulse .market-ribbon-heading{
  align-items:baseline;
  padding:0 0 var(--rp-home-heading-gap);
}

/* Keep independent section headers typographically identical. */
body:has(.editorial-cover) main#main #market-pulse .market-ribbon-heading h2,
body:has(.editorial-cover) main#main #latest > .section-bar h2,
body:has(.editorial-cover) main#main #archive > .section-bar h2,
body:has(.editorial-cover) main#main #research-desk > .section-bar h2{
  margin:0;
  color:#202020;
  font-size:var(--rp-home-heading-size);
  font-weight:650;
  line-height:1.3;
  letter-spacing:-.035em;
  text-wrap:balance;
}

/* One equal vertical interval between major publishing sections. */
body:has(.editorial-cover) main#main #latest.frontpage{
  padding-top:var(--rp-home-section-gap);
  padding-bottom:0;
}
body:has(.editorial-cover) main#main #latest > .section-bar,
body:has(.editorial-cover) main#main #archive > .section-bar,
body:has(.editorial-cover) main#main #research-desk > .section-bar{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px 20px;
  border:0;
  margin:0;
  padding:0 0 var(--rp-home-heading-gap);
}
body:has(.editorial-cover) main#main #latest .frontpage-grid{
  margin-top:0;
}
body:has(.editorial-cover) main#main > .home-desk-links.wrap{
  margin-block:var(--rp-home-section-gap) 0;
}
body:has(.editorial-cover) main#main #archive.power-brief-slider{
  padding-top:var(--rp-home-section-gap);
}
body:has(.editorial-cover) main#main #research-desk.research-teaser{
  padding-top:var(--rp-home-section-gap);
}

/* Nested groups are subordinate, but their headings match one another. */
body:has(.editorial-cover) main#main #latest .home-secondary-heading{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px 20px;
  margin:var(--rp-home-inside-gap) 0 var(--rp-home-heading-gap);
  padding:0;
  border:0;
}
body:has(.editorial-cover) main#main #latest .home-bulletins--hero .home-bulletins-heading{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px 20px;
  padding:0 0 var(--rp-home-heading-gap);
  margin:0;
}
body:has(.editorial-cover) main#main #latest .home-secondary-heading h3,
body:has(.editorial-cover) main#main #latest .home-bulletins--hero .home-bulletins-heading h2{
  margin:0;
  font-size:var(--rp-home-subheading-size);
  font-weight:650;
  line-height:1.35;
  letter-spacing:-.03em;
  color:#242424;
  text-wrap:balance;
}
body:has(.editorial-cover) main#main #latest .home-secondary-heading span,
body:has(.editorial-cover) main#main #latest .home-bulletins--hero .home-bulletins-heading a,
body:has(.editorial-cover) main#main #research-desk .home-tools-heading a{
  font-size:12px;
  font-weight:500;
  line-height:1.5;
  color:#656565;
}
body:has(.editorial-cover) main#main #latest .home-secondary-heading span{
  white-space:nowrap;
}
body:has(.editorial-cover) main#main #research-desk .home-tools-heading{
  align-items:baseline;
}
body:has(.editorial-cover) main#main .home-desk-kicker{
  font-size:12px;
}

/* Maintain readable whitespace without changing carousel sizes or their gutters. */
@media(max-width:760px){
  body:has(.editorial-cover) main#main{
    --rp-home-section-gap:36px;
    --rp-home-inside-gap:30px;
    --rp-home-heading-size:20px;
    --rp-home-subheading-size:17px;
    --rp-home-heading-gap:16px;
  }
  body:has(.editorial-cover) main#main #market-pulse .market-ribbon-inner{
    padding-block:12px;
  }
  body:has(.editorial-cover) main#main #latest .home-secondary-heading span{
    font-size:11px;
  }
}
