/* HFMIndonesia custom sub landing page mobile text/layout cleanup.
   Scope: injected only on custom sub LP pages. */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }
  body.body-hfm { -webkit-text-size-adjust: 100%; }

  body.body-hfm .container {
    padding-left: 18px !important;
    padding-right: 18px !important;
    max-width: 100% !important;
  }

  body.body-hfm main,
  body.body-hfm section {
    overflow-wrap: break-word;
  }

  /* Reduce oversized desktop headline rhythm on mobile. */
  body.body-hfm h1 {
    font-size: clamp(34px, 10vw, 46px) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.035em !important;
    margin-bottom: 14px !important;
  }

  body.body-hfm h2,
  body.body-hfm .cdhm-section h2 {
    font-size: clamp(26px, 8vw, 36px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.025em !important;
    margin-bottom: 14px !important;
  }

  body.body-hfm h3,
  body.body-hfm .cdhm-tutorial-card h3 {
    font-size: 21px !important;
    line-height: 1.18 !important;
    letter-spacing: -0.01em !important;
    margin-bottom: 10px !important;
  }

  body.body-hfm p,
  body.body-hfm li,
  body.body-hfm .cdhm-lead,
  body.body-hfm .cdhm-muted {
    font-size: 15.5px !important;
    line-height: 1.64 !important;
  }

  body.body-hfm section p,
  body.body-hfm article p,
  body.body-hfm .cdhm-lead,
  body.body-hfm .cdhm-hero-note {
    max-width: 62ch;
  }

  /* Less vertical bloat in article-like sections. */
  body.body-hfm .cdhm-section,
  body.body-hfm section.py-5,
  body.body-hfm .py-5 {
    padding-top: 38px !important;
    padding-bottom: 38px !important;
  }

  body.body-hfm .cdhm-mini-flow {
    padding-top: 24px !important;
    padding-bottom: 2px !important;
  }

  body.body-hfm .cdhm-mini-flow .pill {
    display: flex !important;
    width: 100% !important;
    justify-content: flex-start !important;
    margin: 6px 0 !important;
    padding: 10px 14px !important;
    font-size: 14.5px !important;
    line-height: 1.35 !important;
  }

  body.body-hfm .cdhm-tutorial-card,
  body.body-hfm .cdhm-platform-card,
  body.body-hfm .cdhm-faq-card,
  body.body-hfm .card,
  body.body-hfm article {
    border-radius: 18px !important;
    padding: 20px !important;
    margin-bottom: 14px !important;
  }

  body.body-hfm .cdhm-tutorial-card ul,
  body.body-hfm ul {
    padding-left: 0;
  }

  body.body-hfm .cdhm-tutorial-card li {
    gap: 8px !important;
    margin: 9px 0 !important;
  }

  body.body-hfm .btn,
  body.body-hfm a.btn,
  body.body-hfm .cdhm-red-btn {
    width: 100%;
    max-width: 100%;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.25 !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
  }

  body.body-hfm .btn + .btn,
  body.body-hfm a.btn + a.btn {
    margin-top: 8px !important;
  }

  body.body-hfm img {
    max-width: 100%;
    height: auto;
  }

  body.body-hfm table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.body-hfm .hfm-bottom-disclosure,
  body.body-hfm #hfmindonesia-bottom-disclosure {
    font-size: 11.5px !important;
    line-height: 1.55 !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  /* Keep Arsenal footer intentional; only prevent text overflow. */
  body.body-hfm .sponsorship-footer p,
  body.body-hfm .sponsorship-footer a {
    overflow-wrap: anywhere;
  }
}
