/* =====================================================================
   32 · Responsive fixes (whole site)
   ---------------------------------------------------------------------
   ★ --gutter = space between content and the screen edge.
     16px on phones, grows to 32px on wide screens. Change it here.
   Containers grow by 2 x gutter, so on desktop the content is still
   exactly 1200px wide (nothing moves on big screens).
   ===================================================================== */

:root{ --gutter:clamp(16px, 4vw, 32px); }

/* main container used by every page (was padding:0 -> text touched the screen edge) */
.wrap{
  padding-left:var(--gutter);
  padding-right:var(--gutter);
  max-width:calc(1200px + 2 * var(--gutter));
}

/* home sections that use their own container instead of .wrap */
/* (.page[data-route] so this beats the padding:0 rules in css/30-section-fit.css) */
html .page[data-route] #m3 .m3-wrap,
html .page[data-route] #p3 .p3-wrap,
html .page[data-route] #p2s .p2-wrap,
html .page[data-route] #w3 .w3-wrap{
  padding-left:var(--gutter);
  padding-right:var(--gutter);
  max-width:calc(1200px + 2 * var(--gutter));
}

/* never let an image or embedded media push the page wider than the screen */
img, video, canvas, svg{ max-width:100%; }

/* bulk printing: category carousel arrows sat 10px outside the screen */
.cat-nav.prev{left:4px;}
.cat-nav.next{right:4px;}

/* ---------- tablet (≤ 1100px) ---------- */
@media (max-width:1100px){
  /* How it works (stacked layout): keep the cards inside the gutter */
  #how .hsx-stage{padding-left:var(--gutter) !important; padding-right:var(--gutter) !important}
  /* step cards were min-height:262px (css/29-how-steps.css) -> big empty boxes */
  #how .hsx-glass{min-height:0 !important}
}

/* ---------- tablets (601px – 1000px) ---------- */
@media (min-width:601px) and (max-width:1000px){
  /* What we print: 2 cards per row instead of 1 huge card */
  .svc-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:18px}
  /* Three ways: cards stay one per row, but images aren't 420px tall */
  html .page #p3{--mh:300px}
}

/* ---------- phones (≤ 560px) ---------- */
@media (max-width:560px){
  /* long headings shouldn't force sideways scroll */
  h1, h2, h3{overflow-wrap:anywhere;}
}
