/* Site-level additions on top of the design's own CSS. The design draws some screens as fixed
   1440x900 / 390x844 artboards; on the live site they fill the window instead. */
.ac[style*="width: 1440px"][style*="height: 900px"]{width:100%!important;height:auto!important;min-height:100vh}
.ac[style*="width: 390px"][style*="height: 844px"]{width:100%!important;height:auto!important;min-height:100vh;min-height:100dvh}
.ac.m[style*="width: 390px"]{width:100%!important}
html,body{overflow-x:clip}
@media (max-width:640px){
  /* Desktop pages on a phone: the header keeps logo + menu button; the CTA lives in the menu. */
  .ac-header .ac-btn--primary{display:none}
}
@media (max-width:900px){
  .cs-roles{grid-template-columns:minmax(0,1fr)!important}
  .head--row > *{max-width:100%!important;min-width:0}
}
@media (max-width:640px){
  /* Display headings carry desktop sizes inline (56-76px); scale them to the phone width. */
  .ac-display[style*="font-size: 5"],.ac-display[style*="font-size: 6"],.ac-display[style*="font-size: 7"]{font-size:clamp(34px,10.5vw,48px)!important}
}
@media (max-width:900px){
  /* The RWA case study is a hand-built page; give it the same phone rules as the case-study template. */
  .meta-row,.cs-org{grid-template-columns:minmax(0,1fr)!important}
  .cs-block{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  .gal{grid-template-columns:minmax(0,1fr)!important}
  .gal>*:first-child{grid-row:auto!important}
  .gal>button:last-child:nth-child(7){grid-column:auto!important}
  div[style*="display: flex"]:has(> div > .ac-stat__num){flex-wrap:wrap;gap:24px 40px!important}
}
@media (max-width:640px){
  .ac-h2{font-size:clamp(28px,8.6vw,40px)!important}
}
@media (max-width:640px){
  .ac-stat__num{font-size:clamp(30px,9vw,40px)!important}
  .ac-tiles{grid-template-columns:minmax(0,1fr)!important}
}
@media (max-width:900px){
  [style*="grid-template-columns: 320px"]{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
}
@media (max-width:640px){
  .about-title{font-size:clamp(40px,12vw,56px)!important}
}
@media (max-width:900px){
  .pj-head{row-gap:12px!important}
  .pj-num{display:none!important} /* decorative outline index overlaps the heading in one column */
}
