/* Eastern Bridge 0.3.7: UI review pass (audience router, section rhythm, balanced grids, Insights cards). */

/* 1. Insights cards: core makes the image link inline-block, so the photo stopped short of the card edge. */
.entry-content ul.wp-block-latest-posts.eb-latest .wp-block-latest-posts__featured-image a{display:block;width:100%}
.entry-content ul.wp-block-latest-posts.eb-latest .wp-block-latest-posts__featured-image img{width:100%!important;height:210px!important;object-fit:cover}

/* 2. Section rhythm: grey-on-grey disappears, so cards, notices and boxes inside a grey section turn white. */
.sec.mist .card.mist,.sec.mist .notice.mist,.sec.mist .card:not(.dark),.sec.mist .pillar,.sec.mist .step{background:#fff}
.sec.mist + .sec.mist.tight{padding-top:0}            /* a callout band joins the grey section above it */
.sec:not(.mist) + .sec.tight:not(.mist){padding-top:0} /* ...or the white section above it */

/* 3. Balanced grids: five cards in a three-column grid become 3 + 2 centred, never a lone card. */
@media (min-width:701px){
  .grid.g3:has(> :nth-child(5):last-child){grid-template-columns:repeat(6,1fr)}
  .grid.g3:has(> :nth-child(5):last-child) > *{grid-column:span 2}
  .grid.g3:has(> :nth-child(5):last-child) > :nth-child(4){grid-column:2 / span 2}
  .grid.g3:has(> :nth-child(4):last-child){grid-template-columns:repeat(2,1fr)}
  .grid.g4:has(> :nth-child(3):last-child){grid-template-columns:repeat(3,1fr)}
  .stats:has(> :nth-child(5):last-child){grid-template-columns:repeat(5,1fr)}
  .grid > .card,.grid > .pillar,.grid > .story{height:100%}
}
@media (max-width:700px){
  .stats:has(> :nth-child(5):last-child) > :last-child{grid-column:1 / -1;border-left:0;padding-left:0;border-top:1px solid var(--cloud)}
}

/* 4. "Who we help" router on Home. */
.router-sec .router{margin-top:36px}
.router-card{gap:10px}
.router-card .label{margin:0}
.router-card h3{margin:0}
.router-card .muted{margin:0;flex:1 1 auto}
.router-card .linkp{margin-top:auto;padding-top:6px;display:flex;flex-wrap:wrap;gap:6px 18px}
.router-card .link.sub{color:var(--slate);font-weight:500}
.router-card:hover{border-color:var(--red)}
.router-note{margin-top:22px}
@media (min-width:701px) and (max-width:1024px){.router-sec .router{grid-template-columns:repeat(2,1fr)}}

/* 5. About timeline: 7+ milestones in six columns left a stranded second row with no line. Use even rows of four. */
@media (min-width:701px){
  .tline:has(> :nth-child(7)){grid-template-columns:repeat(4,1fr);row-gap:30px}
  .tline:has(> :nth-child(7))::before{display:none}
  .tline:has(> :nth-child(7)) > :is(li,.li)::after{content:'';position:absolute;left:0;right:0;top:9px;border-top:2px solid var(--cloud)}
  .tline:has(> :nth-child(7)) > :is(li,.li)::before{z-index:1}
}
