/* Shared homepage header. Keep the existing menu toggle below the wide layout. */
header.sticky > .mx-auto > a[href="#top"] {
  width: 138px;
  min-width: 138px;
  height: 40px;
}

header.sticky > .mx-auto > a[href="#top"]:not(:has(.ae-header-logo)) {
  background: url("/assets/athenseconomy-logo.png") no-repeat left center / contain;
}

header.sticky > .mx-auto > a[href="#top"] > .ae-header-logo {
  width: 100%;
  max-width: none;
  height: 100%;
}

header.sticky > .mx-auto > a[href="#top"] > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

@media (max-width: 389px) {
  header.sticky > .mx-auto > a[href="#top"] {
    width: min(138px, 100%);
    min-width: 0;
  }
}

@media (min-width: 640px) {
  header.sticky > .mx-auto > a[href="#top"] {
    width: 168px;
    min-width: 168px;
    height: 44px;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  header.sticky > .mx-auto nav {
    display: none;
  }

  header.sticky > .mx-auto button[aria-expanded] {
    display: grid;
  }

  header.sticky > nav {
    display: block;
  }
}

@media (min-width: 1200px) {
  header.sticky > .mx-auto {
    position: relative;
    padding-bottom: 3.35rem;
  }

  header.sticky > .mx-auto nav {
    position: absolute;
    inset: auto 1.5rem 0.55rem;
    justify-content: center;
    gap: clamp(0.75rem, 1.4vw, 1.25rem);
  }

  header.sticky > .mx-auto nav a {
    white-space: nowrap;
  }

  header.sticky > .mx-auto nav a[href="#contact"] {
    padding: 0.3rem 0.75rem;
    border: 1px solid currentColor;
    border-radius: 999px;
  }
}


/* The existing five-column grid can overflow the viewport on long words. */
@media (min-width: 1024px) {
  #market-areas .grid > div {
    overflow-wrap: anywhere;
  }
}

/* Let long words fit the existing two-column funding cards on narrow screens. */
@media (max-width: 639px) {
  #ae-espa-step-home .ae-funding-hub-card {
    overflow-wrap: anywhere;
  }
}
