/* Phone polish (Ajay, 26 Nov 2026: "fix mobile formatting everywhere - even spacing, corner rounding"). Loaded last on every page
   (BaseLayout, after palette.css) so it wins over the section styles and their light/dark twins. Phones only (639 and under).
   One system for every section:
   - 16px side margin: section headings, panels and the hero all start 16px in from the screen edge.
   - Section heading: label pill, 12px, heading, 12px, intro (and 12px between intro paragraphs); 48px above, 24px below.
   - Panels: 16px corners, 20px inside, 12px apart, 16px under the heading line; pictures and media inside them 12px corners.
   All values on the 4px grid. */
@media (max-width: 639.98px) {
  :root:is(.lt, :not(.lt)) { --gutter: 16px; }

  /* the heading block */
  :root:is(.lt, :not(.lt)) main.wrap .sec-h { padding-top: 48px; padding-bottom: 24px; margin-bottom: 16px; display: block; }
  :root:is(.lt, :not(.lt)) main.wrap .sec-h .sec-k { margin: 0 0 12px; }
  :root:is(.lt, :not(.lt)) main.wrap .sec-h :is(h1, h2) { margin: 0; }
  :root:is(.lt, :not(.lt)) main.wrap .sec-h .sec-r { margin: 12px 0 0; padding: 0; }
  :root:is(.lt, :not(.lt)) main.wrap .sec-h .sec-sub { margin: 0; }
  :root:is(.lt, :not(.lt)) main.wrap .sec-h .sec-sub + .sec-sub { margin-top: 12px; }

  /* panels sit on the 16px margin, 16px under the heading line, 12px apart */
  :root:is(.lt, :not(.lt)) main.wrap > section > .gc, :root:is(.lt, :not(.lt)) main.wrap > section > .pp-grid, :root:is(.lt, :not(.lt)) main.wrap > section > .cz,
  :root:is(.lt, :not(.lt)) main.wrap > section .ts-track, :root:is(.lt, :not(.lt)) main.wrap > section > .bl, :root:is(.lt, :not(.lt)) main.wrap > section > .pt,
  :root:is(.lt, :not(.lt)) main.wrap > section > .sk-cell {
    padding-left: 16px; padding-right: 16px; scroll-padding-left: 16px; scroll-padding-right: 16px; }
  :root:is(.lt, :not(.lt)) main.wrap > section > .pp-grid, :root:is(.lt, :not(.lt)) main.wrap > section > .pt, :root:is(.lt, :not(.lt)) main.wrap > section > .sk-cell { padding-top: 0; gap: 12px; }
  :root:is(.lt, :not(.lt)) main.wrap > section.fc-sec, :root:is(.lt, :not(.lt)) main.wrap > section.hero { padding-left: 16px; padding-right: 16px; }
  :root:is(.lt, :not(.lt)) main.wrap > section.gs-sec, :root:is(.lt, :not(.lt)) main.wrap > section.cmp-sec, :root:is(.lt, :not(.lt)) main.wrap > section.pc-sec { padding-bottom: 16px; }
  :root:is(.lt, :not(.lt)) .gs-cv, :root:is(.lt, :not(.lt)) .gs-pts, :root:is(.lt, :not(.lt)) .gs-rt, :root:is(.lt, :not(.lt)) .gs-sc,
  :root:is(.lt, :not(.lt)) #calculator .pc, :root:is(.lt, :not(.lt)) #calculator .pc-in { gap: 12px; }
  :root:is(.lt, :not(.lt)) main.wrap .sec-h + * { margin-top: 0; }
  :root:is(.lt, :not(.lt)) main.wrap .sec-h + .gc { padding-top: 0; }

  /* one corner size: panels 16px, pictures and media inside them 12px */
  :root:is(.lt, :not(.lt)) .gp, :root:is(.lt, :not(.lt)) .pp-grid > .cd, :root:is(.lt, :not(.lt)) .pt-l, :root:is(.lt, :not(.lt)) .pt-r,
  :root:is(.lt, :not(.lt)) .sk-pan, :root:is(.lt, :not(.lt)) .pn, :root:is(.lt, :not(.lt)) .ts-card, :root:is(.lt, :not(.lt)) .ts-c { border-radius: 16px; }
  :root:is(.lt, :not(.lt)) .ts-v, :root:is(.lt, :not(.lt)) .fc-cal, :root:is(.lt, :not(.lt)) .hv-v video, :root:is(.lt, :not(.lt)) .gs-ui { border-radius: 12px; }

  /* panel insides: 20px */
  :root:is(.lt, :not(.lt)) .pp-grid > .cd, :root:is(.lt, :not(.lt)) .gs-pts li, :root:is(.lt, :not(.lt)) .gs-step,
  :root:is(.lt, :not(.lt)) #calculator .pc-card:not(.pc-ret), :root:is(.lt, :not(.lt)) #calculator .pc-cta, :root:is(.lt, :not(.lt)) #compare .cmp-gp { padding: 20px; }
  :root:is(.lt, :not(.lt)) #contact .pn.fc { padding: 32px 20px; border-radius: 16px; }
  :root:is(.lt, :not(.lt)) #contact .fc-cal { border-radius: 12px; }
  :root:is(.lt, :not(.lt)) #results .pt-l { padding: 20px; }

  /* the hero: buttons, stats and video on the same 16px margin as everything else */
  :root:is(.lt, :not(.lt)) .hv .hv-c, :root:is(.lt, :not(.lt)) .hv .hv-v { padding-left: 0; padding-right: 0; }
  /* the footer logo had a page-coloured box behind it that showed against the footer */
  :root:is(.lt, :not(.lt)) footer .brand { background: transparent; }

  /* the other pages: every panel on 16px corners (they were 6px), nested panels 12px, page-top panels 20px in from their sides */
  :root:is(.lt, :not(.lt)) main .panel, :root:is(.lt, :not(.lt)) main .cz-p, :root:is(.lt, :not(.lt)) main .ps-c, :root:is(.lt, :not(.lt)) main .ps-hd,
  :root:is(.lt, :not(.lt)) main .ps-tile, :root:is(.lt, :not(.lt)) main .te-v, :root:is(.lt, :not(.lt)) main .te-t, :root:is(.lt, :not(.lt)) main .jm-v,
  :root:is(.lt, :not(.lt)) main .jm-t, :root:is(.lt, :not(.lt)) main .cs-v, :root:is(.lt, :not(.lt)) main .rt-v, :root:is(.lt, :not(.lt)) main .rt-l,
  :root:is(.lt, :not(.lt)) main .ln-v, :root:is(.lt, :not(.lt)) main .zn-z, :root:is(.lt, :not(.lt)) main .or-l, :root:is(.lt, :not(.lt)) main .or-v,
  :root:is(.lt, :not(.lt)) main .bl-art, :root:is(.lt, :not(.lt)) main .cl-v, :root:is(.lt, :not(.lt)) main .cr-hp, :root:is(.lt, :not(.lt)) main .bh-p { border-radius: 16px; }
  :root:is(.lt, :not(.lt)) main :is(.panel, .cz-p, .gp, .cs-c, .ab-l) :is(.cz-p, .ab-p), :root:is(.lt, :not(.lt)) main .ab-p { border-radius: 12px; }
  :root:is(.lt, :not(.lt)) main .panel.hx { padding-left: 20px; padding-right: 20px; }
  :root:is(.lt, :not(.lt)) main.wrap > section .ps-bd { padding-left: 16px; padding-right: 16px; }
  :root:is(.lt, :not(.lt)) main.wrap > section .ps-bd .ps-hd, :root:is(.lt, :not(.lt)) main .rv-v { border-radius: 16px; }
}
