/* Mobile footer: a compact reading block, a balanced link grid and a QR panel. */
@media (max-width: 767px) {
  body .footer {
    padding-block: 30px 20px;
  }

  body.has-consult-tool .footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  body .footer .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  body .footer .brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  html body .footer .brand strong {
    font-size: 20px;
    line-height: 1.45;
  }

  html body .footer .brand small {
    font-size: 14px;
    font-weight: 500;
    color: #d4deee;
  }

  html body .footer :is(.footer-statement, .footer-note) {
    max-width: none;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.85;
    color: #ccd7e8;
  }

  body .footer .footer-statement { margin-top: 16px; }
  body .footer .footer-note { margin-top: 10px; }

  body .footer .footer-nav {
    display: grid;
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 8px;
    width: 100%;
    padding-block: 18px 12px;
    border-block: 1px solid #ffffff24;
    justify-self: center;
    text-align: center;
  }

  html body .footer .footer-nav > strong {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 10px;
    color: #e7c66c;
    font-size: 15px;
    line-height: 1.6;
  }

  body .footer .footer-nav > strong::before,
  body .footer .footer-nav > strong::after {
    content: "";
    width: 22px;
    height: 1px;
    background: #e7c66c70;
  }

  html body .footer .footer-nav > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 6px 0;
    box-sizing: border-box;
    justify-self: center;
    color: #eef3fb;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
    border-radius: 4px;
  }

  body .footer .footer-nav > a:last-child:nth-child(even) {
    grid-column: auto;
  }

  body .footer .footer-nav > a:is(:hover, :focus-visible) {
    color: #fff;
    background: #ffffff0d;
  }

  body .footer .qr-area {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    min-width: 0;
    padding: 20px 12px;
    box-sizing: border-box;
    border: 1px solid #ffffff24;
    border-radius: 10px;
    background: #ffffff08;
    justify-self: center;
    text-align: center;
  }

  html body .footer .qr-area > .consult-topic {
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.6;
    text-align: center;
  }

  body .footer .qr-area > .hl-cta-qr-dual {
    width: 100%;
    justify-content: center;
  }

  body .footer .qr-area .hl-cta-qr-panel {
    width: 160px;
    margin: 0;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
  }

  body .footer .qr-area .hl-cta-scan-img {
    display: block;
    width: 160px;
    height: 160px;
    max-width: 160px;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 7px;
    object-fit: contain;
    margin-inline: auto;
  }

  html body .footer .qr-area > .qr-instructions {
    width: 100%;
    max-width: none;
    margin: 12px 0 0;
    color: #ccd7e8;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    text-align: center;
  }

  html body .footer .qr-area > .qr-save {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    margin-top: 14px;
    border: 1px solid #ffffff50;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    text-decoration: none;
  }

  body .footer .qr-area > .qr-save:is(:hover, :focus-visible) {
    background: #ffffff12;
    border-color: #e7c66c;
  }

  body .footer .footer-bottom {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    padding-top: 16px;
    text-align: center;
  }

  /* The visible footer QR replaces duplicate floating controls in this area. */
  body.footer-consult-visible :is(.consult-tool, #ufe-entry, #hl-back-to-top) {
    visibility: hidden;
    pointer-events: none;
  }
}

@media (max-width: 359px) {
  body .footer .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body .footer .footer-nav > a:last-child:nth-child(even) { grid-column: 1 / -1; }
}
