/* Pixel Pals: tablet and phone polish
   Loaded last on every page. Tidies spacing, keeps decorations behind content,
   right-sizes the mascots and fixes the few layouts that got awkward on smaller screens. */

/* ---------- every size ---------- */
.ph .container{position:relative;z-index:2}
.ph-cloud{z-index:0}
.row2 .field{margin-bottom:0}
.row2{margin-bottom:16px}
.slot{grid-template-columns:minmax(0,1fr)}
.slot small,.slot span{overflow-wrap:anywhere}
.prose a,.legal-body a,.legal a,.legal-meta a,.contact-mail a{overflow-wrap:anywhere}
.foot-bottom>span:last-child{display:inline-flex;flex-wrap:wrap;gap:6px 16px}
.foot-bottom>span:last-child a{white-space:nowrap}

/* ---------- small laptops and tablets ---------- */
@media (max-width:1080px){
  .section{padding:clamp(72px,9vw,112px) 0}
}

/* ---------- tablets: keep two columns where there is room ---------- */
@media (min-width:701px) and (max-width:980px){
  .mani-grid{grid-template-columns:minmax(0,1fr) minmax(0,.5fr);align-items:center}
  .mani-grid .m-tall{height:330px}
  .sc-card{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px}
  .sc-num{font-size:52px}
  .tst-grid{grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:40px}
  .tst-side .m-sq{height:220px}
  .posts{grid-template-columns:1fr 1fr}
  .mv{grid-template-columns:1fr 1fr}
  .unsure{grid-template-columns:minmax(0,1fr) 200px;gap:24px}
  .unsure .m-side{height:240px}
  .lost{grid-template-columns:minmax(0,1fr) 240px}
  .lost .m-lost{height:300px}
  .story{grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:36px;align-items:center}
  .certs-copy{max-width:640px}
  .promo-masc{height:170px}
}

/* ---------- phones ---------- */
@media (max-width:700px){
  .section{padding:60px 0}
  .sec-head{margin-bottom:30px}

  /* mascots: a supporting role, not the whole screen */
  .mani-grid .m-tall{height:230px;justify-content:flex-end;margin-top:-10px}
  .mani-foot{margin-top:30px;gap:24px}
  .badge{width:124px;height:124px}
  .tst-side{display:grid;grid-template-columns:minmax(0,1fr) 116px;align-items:end;gap:10px}
  .tst-side .m-sq{height:132px;margin-top:0;justify-content:flex-end}
  .sec-head.blog-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px}
  .blog-head .m-sm{height:104px;width:auto;justify-self:end}
  .posts .m-card{display:none}
  .unsure .m-side{height:190px}
  .lost .m-lost{height:230px}

  /* process: number sits inside each card instead of floating above it */
  .process-track{gap:14px}
  .pnum{left:auto;right:16px;top:16px;width:36px;height:36px;font-size:14px}
  .pcard{padding:22px 64px 24px 22px}

  /* call-to-action band: keep the sun out of the text */
  .cta-band{padding:34px 24px 30px;border-radius:30px}
  .cta-band::after{width:140px;height:140px;right:-56px;top:-56px;opacity:.7}
  .cta-band h2{padding-right:34px}

  /* big agencies vs Pixel Pals */
  .drow{grid-template-columns:minmax(0,1fr) 70px;gap:6px 14px}
  .roll{font-size:14.5px}

  /* orbit header visuals (about, contact) */
  .orbit{max-width:270px;margin-top:40px}
  .orbit-ring{inset:-16px}
  .chip-f{font-size:12.5px;padding:8px 12px 8px 9px;gap:7px}
  .chip-f .bi{width:18px;height:18px}
  .chip-f.o1{left:-12%;top:0}
  .chip-f.o2{right:-12%;top:auto;bottom:30%}
  .chip-f.o3{left:-4%;bottom:-6%}

  /* decorative clouds stay small and out of the way */
  .ph-cloud.c1{width:120px;left:-12%;bottom:0}
  .ph-cloud.c2{width:150px;right:-16%;bottom:0;opacity:.55}
  .cb-cloud.c2{display:none}
  .cb-cloud.c1{width:180px;left:-10%}

  /* winter promo banner */
  .promo-masc{height:100px;right:6px;bottom:10px}
  .promo-side{gap:20px}

  /* footer: two tidy columns instead of one long list */
  .foot-grid{grid-template-columns:1fr 1fr;gap:34px 18px;padding-top:36px}
  .foot-grid>div:first-child,.foot-grid>div:nth-child(2){grid-column:1/-1}
  .foot-grid>div:nth-child(2) ul{grid-template-columns:1fr 1fr;gap:10px 18px}
  .foot-bottom{flex-direction:column;gap:10px}
  .foot-bottom>span:last-child{gap:8px 18px}

  /* contact block */
  .contact{padding-top:90px}
  .contact-grid{gap:40px}
}

@media (max-width:400px){
  .tst-side{grid-template-columns:minmax(0,1fr) 96px}
  .tst-side .m-sq{height:110px}
  .chip-f.o1{left:-6%}
  .chip-f.o2{right:-6%}
  .cd-boxes span{min-width:0}
}

/* header pixels: keep the ones that would sit on the headline off smaller screens */
@media (max-width:980px){
  .ph-deco .ph-px:nth-of-type(1),.ph-deco .ph-px:nth-of-type(2),.ph-deco .ph-px:nth-of-type(3),.ph-deco .ph-px:nth-of-type(4),.ph-deco .ph-px:nth-of-type(8){display:none}
}
.article{min-width:0}
.article>*{min-width:0;max-width:100%}
.slot{max-width:100%;min-width:0}
.slot small{white-space:normal}

/* tablets: article cards sit side by side with their image, the mascot sits beside the heading */
@media (min-width:701px) and (max-width:980px){
  .posts{grid-template-columns:1fr;gap:20px}
  .post{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}
  .post-img{aspect-ratio:auto;min-height:220px}
  .post-body{align-content:center}
  .posts .m-card{display:none}
  .sec-head.blog-head{grid-template-columns:minmax(0,1fr) auto;align-items:end}
  .blog-head .m-sm{height:140px}
}
/* phones: compact article cards */
@media (max-width:700px){
  .post-img{aspect-ratio:16/9}
}

@media (max-width:980px){
  .duel{min-height:0}
  .ph-svc{padding-bottom:72px}
  .ph-svc .ph-visual{margin-bottom:10px}
}
.tav{color:#172B5C!important}
