/* Shared responsive safeguards used by every Acxelin Growth page. */

/* Flexible children must be allowed to shrink inside grids and flex rows. */
#page,
#page :where(div, section, article, aside, form, fieldset) {
  min-width: 0;
}

/* Preserve image proportions while keeping media inside its content column. */
#page :where(img, video, canvas, iframe),
#page svg[width] {
  max-width: 100%;
}

#page :where(a, button, input, select, textarea) {
  max-width: 100%;
}

#page .dd-menu {
  box-sizing: border-box;
  max-width: calc(100vw - 32px);
}

#page :where(p, li, h1, h2, h3, a, button, label) {
  overflow-wrap: break-word;
}

#page form {
  width: 100%;
  max-width: 100%;
}

#page :where(input, select, textarea) {
  box-sizing: border-box;
}

#page textarea {
  resize: vertical;
}

@media (max-width: 860px) {
  /* Fixed-width prose and blocks become fluid. */
  #page p[style*="width:"],
  #page div[style*="width: 480px"] {
    width: auto !important;
    max-width: 100% !important;
  }

  /* Oversized decorative artwork is held inside the viewport. */
  #page svg[width] {
    max-width: 100%;
  }

  /* Let custom flex rows wrap when a tablet or phone cannot fit them. */
  #page [class*="sk-"] {
    flex-wrap: wrap;
  }
}

@media (min-width: 761px) and (max-width: 1024px) {
  #page .wrap {
    padding-right: 24px;
    padding-left: 24px;
  }

  #page .sec {
    padding-top: 88px;
    padding-bottom: 88px;
  }
}

@media (max-width: 760px) {
  #page .wrap {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  #page .h1 {
    font-size: clamp(36px, 9vw, 44px);
    line-height: 1.08;
  }

  #page .h2 {
    font-size: clamp(30px, 7.5vw, 34px);
    line-height: 1.12;
  }

  #page .sec {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  #page .card {
    padding: clamp(18px, 5vw, 24px);
  }

  #page :where(.btn-p, .btn-g) {
    max-width: 100%;
    min-height: 44px;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  #page :where(input, select, textarea) {
    min-width: 0;
    font-size: 16px;
  }

  /* Full justification creates large word gaps in narrow text columns. */
  #page .lead[style*="text-align: justify"],
  #page .lead[style*="text-align:justify"] {
    text-align: left !important;
  }
}

@media (max-width: 560px) {
  /* The four-step selector needs one full-width column on small phones. */
  #page [aria-label="How we work"][role="tablist"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #page [aria-label="How we work"][role="tablist"] .stp {
    padding: 20px !important;
  }
}

/* Belt and braces: clip (not hide) any remaining sideways overflow.
   `clip` is used rather than `hidden` so the sticky header keeps working. */
html,
body {
  overflow-x: clip;
}
