/* Keep navigation in view and let content, rather than the document, scroll. */
.email-viewport {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.email-shell { height: 100%; min-height: 0; }
.email-page { min-height: 0; }
.email-page-scroll, .email-scan-list, .email-auth-content {
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
  scroll-padding-block: 1rem;
}
.email-main > [x-show] { flex-shrink: 0; }
.email-page > header { min-height: 4rem; height: auto; flex-wrap: wrap; padding-block: .75rem; }
.email-page > header > div:first-child { flex-shrink: 1; }
.email-page > header p { white-space: normal; overflow-wrap: anywhere; }
.email-page-scroll { padding-bottom: env(safe-area-inset-bottom); }
.email-scan-list:focus-visible { outline: 2px solid #1b365d; outline-offset: -2px; }
.email-scan-panel > div { flex-shrink: 0; }

/* Desktop operators keep the summary, filters and pagination visible while
   the result list uses the remaining height. On short or narrow screens, a
   single content scroller avoids squeezing the results into a tiny window. */
@media (min-width: 1024px) and (min-height: 700px) {
  .email-page .email-home-content { padding-block: 1rem; }
  .email-home-content .email-demo-card { padding: 1.5rem; }
  .email-threats-content { height: 100%; display: flex; flex-direction: column; }
  .email-threats-content > div { flex-shrink: 0; }
  .email-threats-content > .email-scan-panel { flex: 1; min-height: 12rem; display: flex; flex-direction: column; }
  .email-scan-panel > .email-scan-results { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .email-scan-list { flex: 1; min-height: 0; overflow-y: auto; }
}

@media (min-width: 1280px) and (min-height: 700px) {
  .email-page .email-connect-content { max-width: 75rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
  .email-connect-content > :first-child { grid-column: 1 / -1; }
  .email-page .email-connect-content > :not([hidden]) ~ :not([hidden]) { margin-top: 0; }
}

@media (max-width: 1023px) {
  /* Off-canvas links must also leave the keyboard and accessibility order. */
  .email-shell > aside.-translate-x-full { visibility: hidden; }
}

.email-auth > nav, .email-auth > footer, .email-auth > div { flex-shrink: 0; }
.email-auth-content {
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  flex-direction: column;
  justify-content: flex-start;
  padding-block: 1.5rem;
}
.email-auth-content > div { flex-shrink: 0; margin-block: auto; }
.email-auth footer > div { flex-wrap: wrap; gap: .5rem 1rem; }
.email-auth footer p { overflow-wrap: anywhere; }

@media (max-width: 639px) {
  .email-auth > nav > div { height: 4rem; }
  .email-auth > footer { padding-block: .75rem; }
  .email-auth-content { padding-inline: 1rem; }
  .email-auth-content [x-data="signupApp()"] { padding: 1.25rem; }
  .email-page > header > div:last-child { flex-wrap: wrap; }
  .sidecar-node { min-width: 3.5rem; }
  .sidecar-connector { min-width: 1rem; }
}
