.site-header,
.site-header * {
  box-sizing: border-box;
}

.calculator-hub-main a[style-hover]:hover {
  background: #1c1d26 !important;
}

.calculator-hub-main .calculator-card-grid > a:hover {
  background: #16161d !important;
}

.calculator-faq-toggle:hover {
  background: #1c1d26 !important;
}

.calculator-chain-grid {
  max-width: none !important;
}

.calculator-chain-grid > :last-child {
  width: min(100%, 455px);
  justify-self: end;
}

.calculator-card-grid > a > span:last-child > span:first-child {
  min-width: 0;
}

.calculator-card-grid > a > span:last-child > span:last-child {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  white-space: nowrap;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 80px;
  background: #000;
}

.site-header a {
  text-decoration: none;
}

.header-inner {
  width: min(1472px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand img {
  display: block;
  width: 184px;
  height: auto;
}

.main-nav {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-item {
  position: relative;
  height: 100%;
}

.nav-link,
.main-nav > .search-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  color: #808080;
  font-family: "Red Hat Display", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.nav-link {
  padding: 0 14px;
}

.nav-item:hover > .nav-link,
.nav-item:focus-within > .nav-link,
.nav-link.active {
  color: #fff;
}

.nav-chevron {
  width: 6px;
  height: 6px;
  margin: -4px 0 0 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.nav-menu {
  position: absolute;
  z-index: 110;
  top: 100%;
  left: -15px;
  min-width: 260px;
  display: none;
  margin: 0;
  padding: 15px 0;
  background: #fff;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.15);
  list-style: none;
}

.nav-item:hover > .nav-menu,
.nav-item:focus-within > .nav-menu,
.nav-item.open > .nav-menu,
.nav-submenu:hover > .nested-menu,
.nav-submenu:focus-within > .nested-menu {
  display: block;
}

.nav-menu li {
  position: relative;
  margin: 0;
}

.nav-menu a {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 30px;
  color: #000;
  font-family: "Red Hat Display", Roboto, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: #000;
}

.nested-menu {
  top: -15px;
  right: 100%;
  left: auto;
}

.side-chevron {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.main-nav .search-link {
  width: 49px;
  justify-content: center;
  color: #514bf2;
}

.search-link svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
}

@media (max-width: 900px) {
  .calculator-hub-header {
    height: auto !important;
    min-height: 72px;
    padding: 12px 16px !important;
  }

  .calculator-hub-header-inner {
    flex-wrap: wrap;
    gap: 12px !important;
  }

  .calculator-hub-header-inner nav {
    order: 3;
    width: 100%;
    min-width: 0;
    gap: 18px !important;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
  }

  .calculator-hub-header-inner > div[style="flex: 1"] {
    display: none !important;
  }

  .calculator-hub-header-inner > div:last-child {
    margin-left: auto;
    gap: 10px !important;
  }

  .header-inner {
    width: min(100% - 32px, 720px);
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 80px;
    right: 0;
    left: 0;
    height: auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #09090c;
    padding: 10px 20px 18px;
  }

  .main-nav.open {
    display: flex;
  }

  .nav-item {
    width: 100%;
    height: auto;
  }

  .nav-link,
  .main-nav > .search-link {
    width: 100%;
    min-height: 46px;
    justify-content: space-between;
  }

  .nav-menu,
  .nested-menu {
    position: static;
    min-width: 0;
    display: none;
    background: #111116;
    box-shadow: none;
    padding: 4px 0 8px 14px;
  }

  .nav-menu a {
    color: #b8b8bd;
  }

  .nav-item.open > .nav-menu,
  .nav-item.open .nested-menu {
    display: block;
  }

  .calculator-hub-main {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  .calculator-hub-layout,
  .calculator-chain-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .calculator-chain-grid > :last-child {
    width: 100%;
    justify-self: stretch;
  }

  .calculator-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  .site-header {
    height: 68px;
  }

  .brand img {
    width: 150px;
  }

  .main-nav {
    top: 68px;
  }

  .calculator-hub-main > section,
  .calculator-hub-main .calculator-hub-layout section {
    padding-right: 18px !important;
    padding-left: 18px !important;
  }

  .calculator-card-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    margin-right: -18px !important;
    margin-left: -18px !important;
  }

  .calculator-footer-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header *,
  .site-header *::before,
  .site-header *::after {
    transition-duration: 0.01ms !important;
  }
}
