/* The compact shell's visibility transition otherwise rejects the first focus(). */
body:is(.home-review, .approved-shell) .n-mega.is-keyboard-open[aria-hidden="false"],
body:is(.home-review, .approved-shell) .n-mega.is-keyboard-open[aria-hidden="false"] * {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: none !important;
}

/* The archived form's light-theme legal text needs contrast inside the dark dialog. */
body.approved-shell #request-dialog .n-form :is(.n-consent, .n-form-policy),
body.approved-shell #request-dialog .n-form :is(.n-consent, .n-form-policy) a {
  color: #dce5dd !important;
}

/* The old 470px fallback minimum clips its link inside the new 360px map. */
body.approved-shell .n-contacts-page .n-contacts-map-fallback {
  min-height: 0;
}

/* Reduced motion / short screens show a static list. The archive's later
   100svh override must not let nine visible offers spill into the next section. */
body.home-review .n-training-snap:not(.is-enhanced) .n-training-snap-sticky {
  height: auto !important;
  min-height: 0 !important;
  align-items: start;
}
body.home-review .n-training-snap:not(.is-enhanced) .n-training-snap-window {
  height: auto !important;
  align-self: start !important;
}

/* The supplied footer's negative margins exceed the viewport below 360px.
   Keep the dock before the floating contact button, with its CTA on a second row. */
@media (max-width: 359px) {
  body.home-review .gs-footer .n-footer-dock-slot {
    margin-inline: 0 !important;
    padding: 14px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 116px !important;
  }
  body.home-review .gs-footer .n-scroll-dock.is-parked {
    display: grid !important;
    height: auto !important;
    overflow: visible !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: calc(100% - 60px) !important;
    max-width: calc(100% - 60px) !important;
    padding: 4px !important;
  }
  body.home-review .gs-footer .n-scroll-dock.is-parked a {
    min-width: 0 !important;
    padding: 8px 2px !important;
    text-align: center !important;
    font-size: 10px !important;
  }
  body.home-review .gs-footer .n-scroll-dock.is-parked .n-scroll-dock-cta {
    grid-column: 1 / -1;
  }
}
