/* Thompson Solutions — mobile overrides.
   The site is inline-styled, so these rules match on style substrings and use !important. */

@media (max-width: 960px) {

  html, body { overflow-x: hidden; }
  img, svg { max-width: 100%; }

  /* --- Section padding --------------------------------------------------- */
  [style*="padding:104px 56px"],
  [style*="padding:96px 56px"],
  [style*="padding:88px 56px"],
  [style*="padding:80px 56px"],
  [style*="padding:72px 56px"],
  [style*="padding:64px 56px"],
  [style*="padding:56px 56px"],
  [style*="padding:54px 56px"],
  [style*="padding:48px 56px"],
  [style*="padding:90px 56px"],
  [style*="padding:84px 56px"],
  [style*="padding:44px 56px"],
  [style*="padding:40px 56px"] { padding: 52px 20px !important; }

  [style*="padding:34px 56px"],
  [style*="padding:28px 56px"],
  [style*="padding:24px 56px"],
  [style*="padding:30px 56px"] { padding: 28px 20px !important; }

  [style*="padding:56px;"] { padding: 28px !important; }

  [style*=" 56px"]:not([style*="grid-template"]):not([style*="height:92px"]) {
    padding-left: 20px !important; padding-right: 20px !important;
  }

  [style*="width:1440px"] { width: 100% !important; }

  /* --- Nav -------------------------------------------------------------- */
  [style*="height:92px"] {
    position: static !important;
    height: auto !important;
    flex-wrap: wrap !important;
    padding: 10px 20px !important;
    gap: 8px !important;
  }
  [style*="height:92px"] img { height: 36px !important; }
  [style*="height:92px"] > div[style*="gap:30px"] {
    order: 3;
    width: 100%;
    margin-left: 0 !important;
    gap: 14px !important;
    font-size: 13.5px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  [style*="height:92px"] > div[style*="gap:30px"]::-webkit-scrollbar { display: none; }
  [style*="height:92px"] > div[style*="margin-left:auto"] { gap: 12px !important; }
  /* phone number is repeated in hero + footer */
  [style*="height:92px"] > div[style*="margin-left:auto"] > a[href^="tel:"] { display: none !important; }

  /* --- Grids ------------------------------------------------------------ */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }

  /* Section headers: center the eyebrow label + heading block */
  div:has(> [style*="letter-spacing:.14em"]):not([style*="border-radius"]):not([style*="grid-template"]):not(:has(h1)) {
    text-align: center !important;
  }
  div:has(> [style*="letter-spacing:.14em"]):not([style*="border-radius"]):not([style*="grid-template"]):not(:has(h1)) > h2,
  div:has(> [style*="letter-spacing:.14em"]):not([style*="border-radius"]):not([style*="grid-template"]):not(:has(h1)) > p {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Stat strip: center the stacked stats */
  [style*="background:#1577C9;padding:"] > div { justify-items: center !important; text-align: center !important; }
  [style*="background:#1577C9;padding:"] > div > div { justify-content: center !important; }

  [style*="flex:0 1 calc((100% - 32px)/3)"] { flex-basis: 100% !important; }

  /* --- Flex rows -------------------------------------------------------- */
  [style*="display:flex"] { flex-wrap: wrap; }
  [style*="justify-content:space-between"]:not([style*="border-radius"]):not([style*="padding:14px"]) {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  /* label/value rows inside product mockups keep their single line */
  [style*="justify-content:space-between"][style*="border-radius"] {
    flex-wrap: nowrap !important;
    gap: 12px !important;
  }
  [style*="justify-content:space-between"][style*="border-radius"] > * { min-width: 0; }
  [style*="justify-content:space-between"][style*="border-radius"] [style*="display:flex"] {
    flex-wrap: nowrap !important;
  }
  [style*="white-space:nowrap"] { white-space: normal !important; }

  /* --- Type scale ------------------------------------------------------- */
  [style*="font-size:64px"] { font-size: 36px !important; }
  [style*="font-size:62px"] { font-size: 35px !important; }
  [style*="font-size:50px"] { font-size: 32px !important; }
  [style*="font-size:35px"] { font-size: 26px !important; }
  [style*="font-size:33px"] { font-size: 25px !important; }
  [style*="font-size:31px"] { font-size: 24px !important; }
  [style*="font-size:29px"] { font-size: 23px !important; }
  [style*="font-size:27px"] { font-size: 22px !important; }
  [style*="font-size:25px"] { font-size: 21px !important; }
  [style*="font-size:60px"] { font-size: 35px !important; }
  [style*="font-size:56px"] { font-size: 34px !important; }
  [style*="font-size:54px"] { font-size: 33px !important; }
  [style*="font-size:52px"] { font-size: 32px !important; }
  [style*="font-size:48px"] { font-size: 31px !important; }
  [style*="font-size:44px"] { font-size: 30px !important; }
  [style*="font-size:42px"] { font-size: 29px !important; }
  [style*="font-size:40px"] { font-size: 28px !important; }
  [style*="font-size:38px"] { font-size: 27px !important; }
  [style*="font-size:36px"] { font-size: 26px !important; }
  [style*="font-size:34px"] { font-size: 26px !important; }
  [style*="font-size:32px"] { font-size: 25px !important; }
  [style*="font-size:30px"] { font-size: 24px !important; }
  [style*="font-size:28px"] { font-size: 23px !important; }
  [style*="font-size:26px"] { font-size: 22px !important; }
  [style*="font-size:24px"] { font-size: 21px !important; }
  [style*="font-size:23px"] { font-size: 20px !important; }
  [style*="font-size:22px"] { font-size: 19px !important; }
  [style*="font-size:20px"] { font-size: 17.5px !important; }
  [style*="font-size:19px"] { font-size: 17px !important; }
  [style*="font-size:18px"] { font-size: 16.5px !important; }

  /* Icons keep their own scale */
  .etl { font-size: inherit; }

  /* --- Buttons ---------------------------------------------------------- */
  a[style*="border-radius:9px"],
  a[style*="border-radius:8px"],
  a[style*="border-radius:10px"] {
    justify-content: center;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    height: auto !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    line-height: 1.2;
  }
}

@media (max-width: 520px) {
  [style*="grid-template-columns:repeat(4"] { grid-template-columns: 1fr !important; }
  a[style*="padding:17px"],
  button[type="submit"] { width: 100%; justify-content: center; }
}
