/* Primary nav dropdowns — shared by landing (.nav-links) and content_page (.ed-nav-links). */

.nav-sticky,
.ed-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 520;
  background: var(--ed-nav-bg, var(--nav-bg));
  border-bottom: 1px solid var(--ed-line, var(--line));
  overflow: visible;
  --ed-nav-main-h: 66px;
  --ed-nav-auth-h: 0px;
  --ed-nav-chrome-h: calc(var(--ed-nav-main-h) + var(--ed-nav-auth-h));
}

.nav-sticky .nav,
.ed-nav-sticky .ed-nav {
  position: static;
  z-index: auto;
  background: transparent;
  border-bottom: none;
}

.nav-auth-sub,
.ed-nav-auth-sub {
  display: none;
}

.nav-cta-auth,
.ed-nav-cta-auth {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.nav,
.ed-nav,
.nav-in,
.ed-nav-in,
.ed-nav-item {
  overflow: visible;
}

@media (min-width: 1121px) {
  .nav-links,
  .ed-nav-links,
  .nav-links > ul,
  .ed-nav-links > ul {
    overflow: visible;
  }
}

.ed-nav-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ed-nav-links > ul {
  display: flex;
  gap: clamp(.85rem, 1.8vw, 1.3rem);
}

.ed-nav-item {
  position: relative;
  flex-shrink: 0;
}

.ed-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: .28rem;
  padding: .66rem 0;
  font-size: .775rem;
  font-weight: 660;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: var(--ed-tx-2, var(--tx-2));
  white-space: nowrap;
  transition: color .17s;
  text-decoration: none;
}

.ed-nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: .28rem;
  height: 1.5px;
  background: var(--ed-acc, var(--acc));
  transition: right .24s cubic-bezier(.22, .9, .3, 1);
}

.ed-nav-link:hover,
.ed-nav-item.is-open > .ed-nav-link,
.ed-nav-item--menu:hover > .ed-nav-link,
.ed-nav-item--menu:focus-within > .ed-nav-link {
  color: var(--ed-tx, var(--tx));
}

.ed-nav-link:hover::after,
.ed-nav-item.is-open > .ed-nav-link::after,
.ed-nav-item--menu:hover > .ed-nav-link::after,
.ed-nav-item--menu:focus-within > .ed-nav-link::after {
  right: 0;
}

.ed-nav-link--menu {
  cursor: pointer;
}

.ed-nav-caret {
  width: .62rem;
  height: .62rem;
  margin-top: .06rem;
  opacity: .72;
  transition: transform .2s ease;
}

.ed-nav-item.is-open .ed-nav-caret,
.ed-nav-item--menu:hover .ed-nav-caret,
.ed-nav-item--menu:focus-within .ed-nav-caret {
  transform: rotate(180deg);
}

.ed-nav-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 300;
  min-width: min(18.5rem, calc(100vw - 2rem));
  padding: .85rem .95rem .75rem;
  margin-top: .15rem;
  border-radius: 10px;
  border: 1px solid var(--ed-line, var(--line));
  background: var(--ed-ink-3, var(--ink-3));
  box-shadow:
    0 18px 48px -16px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(255, 255, 255, .03) inset;
  transform: translateX(-50%);
}

.ed-nav-item--menu.is-open > .ed-nav-panel,
.ed-nav-item--menu:hover > .ed-nav-panel,
.ed-nav-item--menu:focus-within > .ed-nav-panel {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .ed-nav-item--menu.is-open > .ed-nav-panel,
  .ed-nav-item--menu:hover > .ed-nav-panel,
  .ed-nav-item--menu:focus-within > .ed-nav-panel {
    animation: ed-nav-in .18s ease forwards;
  }
}

.ed-nav-blurb {
  margin: 0 0 .7rem;
  padding: 0 .15rem .65rem;
  border-bottom: 1px solid var(--ed-line-2, var(--line-2));
  font-size: .82rem;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ed-tx-2, var(--tx-2));
}

.ed-nav-panel ul {
  display: grid;
  gap: .15rem;
}

.ed-nav-panel-link {
  display: block;
  padding: .48rem .55rem;
  border-radius: 6px;
  font-size: .84rem;
  font-weight: 620;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--ed-tx, var(--tx));
  text-decoration: none;
  transition: background .15s, color .15s;
}

.ed-nav-panel-link::after {
  display: none;
}

.ed-nav-panel-link:hover {
  background: var(--ed-green-wash, var(--green-wash));
  color: var(--ed-acc, var(--acc));
}

html[data-ed-theme="light"] .ed-nav-panel {
  background: #ffffff;
  box-shadow:
    0 16px 40px -14px rgba(17, 19, 24, .18),
    0 0 0 1px rgba(17, 19, 24, .06);
}

@keyframes ed-nav-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.ed-nav-mobile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: var(--ed-r, var(--r, 6px));
  border: 1px solid var(--ed-line, var(--line));
  background: none;
  color: var(--ed-tx, var(--tx));
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

body.ed-nav-mobile-open .ed-nav-mobile-btn,
.ed-nav-mobile-btn.is-open,
.ed-nav-mobile-btn[aria-expanded="true"] {
  border-color: var(--ed-line-2, var(--line-2));
  background: var(--ed-ink-2, var(--ink-2));
}

.ed-nav-mobile-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
}

.ed-nav-mobile-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform .28s cubic-bezier(.22, 1, .36, 1),
    top .28s cubic-bezier(.22, 1, .36, 1),
    opacity .18s ease;
}

.ed-nav-mobile-line:nth-child(1) { top: 0; }
.ed-nav-mobile-line:nth-child(2) { top: 7px; }
.ed-nav-mobile-line:nth-child(3) { top: 14px; }

body.ed-nav-mobile-open .ed-nav-mobile-line:nth-child(1),
.ed-nav-mobile-btn.is-open .ed-nav-mobile-line:nth-child(1),
.ed-nav-mobile-btn[aria-expanded="true"] .ed-nav-mobile-line:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

body.ed-nav-mobile-open .ed-nav-mobile-line:nth-child(2),
.ed-nav-mobile-btn.is-open .ed-nav-mobile-line:nth-child(2),
.ed-nav-mobile-btn[aria-expanded="true"] .ed-nav-mobile-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

body.ed-nav-mobile-open .ed-nav-mobile-line:nth-child(3),
.ed-nav-mobile-btn.is-open .ed-nav-mobile-line:nth-child(3),
.ed-nav-mobile-btn[aria-expanded="true"] .ed-nav-mobile-line:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

.ed-nav-mobile-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6, 8, 15, .58);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s cubic-bezier(.22, 1, .36, 1);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.ed-nav-mobile-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

body.ed-nav-mobile-open .ed-nav-mobile-backdrop.is-visible {
  top: var(--ed-nav-chrome-h, 66px);
}

.ed-nav-mobile-backdrop[hidden] {
  display: none !important;
}

.ed-nav-drawer-footer {
  display: none;
}

@media (max-width: 1120px) {
  :root {
    --ed-nav-main-h: 66px;
    --ed-nav-auth-h: 52px;
    --ed-nav-chrome-h: calc(var(--ed-nav-main-h) + var(--ed-nav-auth-h));
  }

  body.ed-nav-mobile-open {
    --ed-nav-chrome-h: var(--ed-nav-main-h);
  }

  body.ed-nav-mobile-open .nav-auth-sub,
  body.ed-nav-mobile-open .ed-nav-auth-sub {
    display: none !important;
  }

  .nav-links:not(.ed-nav-mobile-portaled),
  .ed-nav-links:not(.ed-nav-mobile-portaled) {
    display: none !important;
    overflow: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .nav-sticky,
  .ed-nav-sticky {
    --ed-nav-auth-h: 52px;
  }

  .nav-auth-sub,
  .ed-nav-auth-sub {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    padding: .55rem var(--pad, var(--ed-pad, 1rem)) .65rem;
    border-top: 1px solid var(--ed-line-2, var(--line-2));
    background: var(--ed-nav-bg, var(--nav-bg));
  }

  .nav-auth-sub .btn,
  .ed-nav-auth-sub .ed-btn,
  .ed-nav-auth-sub-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .nav-cta-auth,
  .ed-nav-cta-auth {
    display: none !important;
  }

  .ed-nav-mobile-btn {
    display: inline-flex;
  }

  body.ed-nav-mobile-open {
    overflow: hidden;
  }

  .ed-nav-links.ed-nav-mobile-portaled,
  .nav-links.ed-nav-mobile-portaled {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: var(--ed-nav-chrome-h, 66px);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--ed-nav-chrome-h, 66px));
    max-height: calc(100dvh - var(--ed-nav-chrome-h, 66px));
    bottom: auto;
    z-index: 510;
    flex: none;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: .35rem var(--pad, var(--ed-pad, 1rem)) 0;
    background: var(--ed-ink-3, var(--ink-3));
    border-top: 1px solid var(--ed-line, var(--line));
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(.985);
    pointer-events: none;
    transition:
      opacity .32s cubic-bezier(.22, 1, .36, 1),
      transform .36s cubic-bezier(.22, 1, .36, 1),
      visibility 0s linear .36s;
  }

  body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled,
  body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition:
      opacity .32s cubic-bezier(.22, 1, .36, 1),
      transform .36s cubic-bezier(.22, 1, .36, 1),
      visibility 0s;
  }

  .ed-nav-links.ed-nav-mobile-portaled > ul,
  .nav-links.ed-nav-mobile-portaled > ul {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: .5rem;
  }

  .ed-nav-drawer-footer {
    display: none;
  }

  .ed-nav-links.ed-nav-mobile-portaled .ed-nav-drawer-footer,
  .nav-links.ed-nav-mobile-portaled .ed-nav-drawer-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    flex-shrink: 0;
    margin-top: auto;
    padding: .85rem 0 1.1rem;
    border-top: 1px solid var(--ed-line, var(--line));
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity .28s cubic-bezier(.22, 1, .36, 1) .12s,
      transform .32s cubic-bezier(.22, 1, .36, 1) .12s;
  }

  body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled .ed-nav-drawer-footer,
  body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled .ed-nav-drawer-footer {
    opacity: 1;
    transform: translateY(0);
  }

  .ed-nav-drawer-footer .btn,
  .ed-nav-drawer-footer .ed-btn,
  .ed-nav-drawer-footer-btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  @media (prefers-reduced-motion: no-preference) {
    .ed-nav-links.ed-nav-mobile-portaled > ul > li,
    .nav-links.ed-nav-mobile-portaled > ul > li {
      opacity: 0;
      transform: translateY(10px);
      transition:
        opacity .28s cubic-bezier(.22, 1, .36, 1),
        transform .32s cubic-bezier(.22, 1, .36, 1);
    }

    body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled > ul > li,
    body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled > ul > li {
      opacity: 1;
      transform: translateY(0);
    }

    body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled > ul > li:nth-child(1),
    body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled > ul > li:nth-child(1) { transition-delay: .05s; }
    body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled > ul > li:nth-child(2),
    body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled > ul > li:nth-child(2) { transition-delay: .08s; }
    body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled > ul > li:nth-child(3),
    body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled > ul > li:nth-child(3) { transition-delay: .11s; }
    body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled > ul > li:nth-child(4),
    body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled > ul > li:nth-child(4) { transition-delay: .14s; }
    body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled > ul > li:nth-child(5),
    body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled > ul > li:nth-child(5) { transition-delay: .17s; }
    body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled > ul > li:nth-child(6),
    body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled > ul > li:nth-child(6) { transition-delay: .2s; }
    body.ed-nav-mobile-open .ed-nav-links.ed-nav-mobile-portaled > ul > li:nth-child(7),
    body.ed-nav-mobile-open .nav-links.ed-nav-mobile-portaled > ul > li:nth-child(7) { transition-delay: .23s; }
  }

  .ed-nav-links > ul,
  .nav-links > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .ed-nav-item--menu:hover > .ed-nav-panel,
  .ed-nav-item--menu.is-open > .ed-nav-panel,
  .ed-nav-item--menu:focus-within > .ed-nav-panel {
    animation: none;
  }

  .ed-nav-panel {
    display: block !important;
    position: static;
    transform: none;
    left: auto;
    min-width: 0;
    margin: -.1rem 0 .35rem;
    padding: 0 0 .55rem .85rem;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-ed-theme="light"] .ed-nav-panel {
    background: transparent;
    box-shadow: none;
  }

  .ed-nav-blurb,
  .ed-nav-caret {
    display: none;
  }

  .ed-nav-link,
  .nav-links > ul > li > .ed-nav-link {
    padding: .82rem 0;
    font-size: .84rem;
  }

  .ed-nav-panel-link {
    padding: .5rem 0;
    font-size: .84rem;
    color: var(--ed-tx-2, var(--tx-2));
  }
}

@media (min-width: 1121px) {
  .ed-nav-mobile-backdrop {
    display: none !important;
  }
}
