/* LIC v7.4.1 — MOBILE ONLY. Keep desktop, calculator logic, and existing links untouched. */
@media (max-width: 767px) {
  /* Avoid an artificial white frame above/below the mobile theme. */
  html { padding:0!important; min-height:100%; }
  html:not(:has(#wpadminbar)) { margin-top:0!important; }
  body.pa-atlas { margin:0!important; padding:0!important; min-height:100svh; background:#0b1628; }
  body.pa-atlas > .utility:first-of-type { margin-top:0!important; }
  body.pa-atlas .site-header, body.pa-atlas .utility { margin-block:0!important; }
  body.pa-atlas .atlas-footer { margin-bottom:0!important; padding-bottom:0!important; }

  /* Footer brand, 2-up link groups and smaller information rows: all centered. */
  body.pa-atlas .atlas-footer .footer-core {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    column-gap:clamp(14px,4vw,24px)!important;
    row-gap:26px!important;
    padding-top:35px!important;
    padding-bottom:27px!important;
    text-align:center;
    align-items:start;
  }
  body.pa-atlas .atlas-footer .footer-brand-v4 {
    grid-column:1/-1!important;
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .footer-brand-v4 .brand {
    display:inline-flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    max-width:100%;
    margin-inline:auto;
    text-align:left;
  }
  body.pa-atlas .atlas-footer .footer-brand-v4 > p {
    width:100%;
    max-width:38ch;
    margin:18px auto 12px!important;
    text-align:center;
    line-height:1.7;
  }
  body.pa-atlas .atlas-footer .foot-badges {
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:7px;
  }
  body.pa-atlas .atlas-footer .footer-link-group {
    display:flex;
    flex-direction:column;
    align-items:center;
    min-width:0;
    width:100%;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .footer-link-group h3 {
    width:100%;
    margin:0 0 12px;
    text-align:center;
    overflow-wrap:break-word;
    line-height:1.5;
  }
  body.pa-atlas .atlas-footer .footer-link-group a {
    display:block;
    width:100%;
    padding:8px 2px;
    margin:0;
    text-align:center;
    white-space:normal;
    overflow-wrap:break-word;
    line-height:1.45;
  }

  /* Social panel: center title and buttons; odd last button centered. */
  body.pa-atlas .atlas-footer .lpc72-footer-social-row {
    margin-inline:auto;
    padding:23px 0 25px!important;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .lpc72-footer-social-row .lpc67-social {
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    gap:12px!important;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .lpc72-footer-social-row .lpc67-social-title {
    width:100%;
    margin:0!important;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .lpc72-footer-social-row .lpc67-social-links {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    width:100%;
    max-width:440px;
    margin:0 auto;
  }
  body.pa-atlas .atlas-footer .lpc72-footer-social-row .lpc67-social-links a {
    display:inline-flex!important;
    justify-content:center!important;
    align-items:center;
    min-width:0;
    width:100%;
    min-height:44px;
    padding:10px 7px;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .lpc72-footer-social-row .lpc67-social-links a:last-child:nth-child(odd) {
    grid-column:1/-1;
    width:min(100%, 205px);
    justify-self:center;
  }

  body.pa-atlas .atlas-footer .footer-feature-row { grid-template-columns:minmax(0,1fr)!important; }
  body.pa-atlas .atlas-footer .footer-feature-row > div {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:19px 12px;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .footer-feature-row > div span {
    align-items:center;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .footer-feature-row small { max-width:32ch; line-height:1.6; }
  body.pa-atlas .atlas-footer .foot-disclaimer {
    padding:22px 10px!important;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .foot-disclaimer p {
    margin:9px auto 0;
    max-width:44ch;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .foot-bottom {
    display:flex!important;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px!important;
    padding:20px 8px max(20px,env(safe-area-inset-bottom))!important;
    margin-bottom:0!important;
    text-align:center;
  }
  body.pa-atlas .atlas-footer .foot-bottom > * {
    max-width:100%;
    text-align:center;
    overflow-wrap:break-word;
    line-height:1.6;
  }

  /* Existing post's research notice: old 210px minimum squeezed text into a thin column. */
  body.pa-atlas .pa5-factnote {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
    padding:15px 16px!important;
    width:100%;
    min-width:0;
    border-radius:12px;
    box-sizing:border-box;
  }
  body.pa-atlas .pa5-factnote > strong {
    display:block;
    width:100%;
    min-width:0!important;
    max-width:100%;
    flex:none!important;
    font-size:13px;
    line-height:1.55;
  }
  body.pa-atlas .pa5-factnote > span {
    display:block;
    min-width:0;
    width:100%;
    font-size:13px;
    line-height:1.7;
    overflow-wrap:break-word;
  }
}

@media(max-width:340px) {
  body.pa-atlas .atlas-footer .footer-core{column-gap:10px!important;}
  body.pa-atlas .atlas-footer .footer-link-group h3{font-size:10px;letter-spacing:.02em;}
  body.pa-atlas .atlas-footer .footer-link-group a{font-size:12px;}
}
