/* The controls live in their own fixed band, outside the moving story. */
.sequence-footer {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  height: 64px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  gap: 24px;
  background: #06111b;
  border-top: 1px solid #365064;
  box-shadow: 0 -12px 32px #030810a8;
}
.sequence-footer::before { display: none; }
body.portal-close .sequence-footer { z-index: 30; background: #06111b; }
.sequence-utilities {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 22px;
}
.sequence-footer .sequence-utilities button {
  position: static;
  width: auto;
  max-width: none;
  min-height: 44px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #b4d2df;
  font: 10px/1.4 Arial, Helvetica, sans-serif;
  text-align: left;
  white-space: nowrap;
}
.sequence-footer .sequence-utilities button:hover,
.sequence-footer .sequence-utilities button:focus-visible { color: #e9f0f4; }
.sequence-footer .sequence-utilities button:focus-visible,
body.ios-menu-controls .site-header #main-navigation .sequence-utilities button:focus-visible {
  outline: 2px solid #9dd4e9;
  outline-offset: 3px;
}
.sequence-utilities #ambient-toggle[aria-pressed="true"] { color: #c8f0ff; }
.sequence-footer nav { margin-left: auto; }
.sequence-footer .progress-track {
  position: absolute;
  top: 0;
  bottom: auto;
  left: 0;
  right: 0;
  z-index: 1;
}
.network-bottom { bottom: 90px; }
.applications-bottom, .infra-bottom { bottom: 90px; }
.inspection { bottom: 95px; }

@media (max-width: 800px) {
  .sequence-footer {
    height: 96px;
    padding: 4px 25px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 44px 44px;
    gap: 0;
  }
  .sequence-utilities {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .sequence-footer .sequence-utilities button {
    min-height: 44px;
    padding: 8px 0;
    font-size: 10px;
  }
  .sequence-footer nav {
    width: 100%;
    margin: 0;
    justify-content: space-between;
    gap: 4px;
  }
  .sequence-footer nav a {
    min-width: 32px;
    min-height: 44px;
    padding: 15px 0;
  }
  .inspection { bottom: 122px; }
  .network-bottom, .applications-bottom, .infra-bottom { bottom: 120px; }
}

@media (max-width: 360px) {
  .sequence-footer { padding-left: 18px; padding-right: 18px; }
  .sequence-footer nav { gap: 2px; }
  .sequence-footer nav a { min-width: 26px; }
}

/* iOS browsers may display controls above and below the page. Keep the
   settings in Explore, and only hide the footer after JS moves them there. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 800px) {
    .sequence-footer {
      height: 52px;
      padding-top: 0;
      padding-bottom: 0;
      display: flex;
    }
    .sequence-footer nav { display: none; }
    .inspection { bottom: 78px; }
    .network-bottom, .applications-bottom, .infra-bottom { bottom: 76px; }
    body.ios-menu-controls .sequence-footer { display: none; }
    body.ios-menu-controls .inspection { bottom: 26px; }
    body.ios-menu-controls .network-bottom,
    body.ios-menu-controls .applications-bottom,
    body.ios-menu-controls .infra-bottom { bottom: 24px; }
    body.ios-menu-controls .site-header #main-navigation {
      max-height: calc(100svh - 88px);
      overflow-y: auto;
      overscroll-behavior: contain;
    }
    body.ios-menu-controls .site-header #main-navigation .sequence-utilities {
      display: grid;
      width: 100%;
      gap: 0;
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid #365064;
    }
    body.ios-menu-controls .site-header #main-navigation .sequence-utilities button {
      min-height: 44px;
      padding: 10px 0;
      border: 0;
      background: transparent;
      color: #b4d2df;
      font: 13px/1.4 Arial, Helvetica, sans-serif;
      text-align: left;
    }
  }
}

@media (max-width: 800px) and (max-height: 700px) {
  .final-message { top: 37%; }
  .final-return { top: 60%; gap: 0 20px; padding-top: 8px; }
  .final-return a { min-height: 38px; padding: 5px 0; }
  .final-signature { bottom: 108px; }
}

@media (min-width: 801px) and (max-height: 550px) {
  .sequence-footer { height: 56px; }
  .inspection { bottom: 74px; }
  .network-bottom, .applications-bottom, .infra-bottom { bottom: 74px; }
}
