/* Release 40: footer-logo protection retained from Release 34. */
html body .footer .brand .site-logo,
html body .site-footer .brand .site-logo {
  filter: brightness(0) invert(1) !important;
  -webkit-filter: brightness(0) invert(1) !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}

html body .footer .brand,
html body .site-footer .brand,
html body .footer .brand .site-logo-link,
html body .site-footer .brand .site-logo-link {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  html body .footer .brand .site-logo,
  html body .site-footer .brand .site-logo {
    width: 158px !important;
    max-height: 56px !important;
  }
}

/* Compact, keyboard-accessible research navigation. */
html body .header .navlinks .nav-research,
html body .site-header .navlinks .nav-research {
  position: relative;
  flex: 0 0 auto;
}

html body .header .navlinks .nav-research > summary,
html body .site-header .navlinks .nav-research > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}

html body .header .navlinks .nav-research > summary::-webkit-details-marker,
html body .site-header .navlinks .nav-research > summary::-webkit-details-marker {
  display: none;
}

html body .header .navlinks .nav-research > summary::after,
html body .site-header .navlinks .nav-research > summary::after {
  content: "▾";
  color: #52647d;
  -webkit-text-fill-color: #52647d;
  font-size: 12px;
}

html body .header .navlinks .nav-research[open] > summary,
html body .header .navlinks .nav-research > summary:hover,
html body .site-header .navlinks .nav-research[open] > summary,
html body .site-header .navlinks .nav-research > summary:hover {
  background: #f3f7fd !important;
  color: #174ea6 !important;
  -webkit-text-fill-color: #174ea6 !important;
}

html body .header .navlinks .nav-research-panel,
html body .site-header .navlinks .nav-research-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 2000;
  display: grid;
  width: 260px;
  padding: 10px;
  border: 1px solid #dbe4f0 !important;
  border-radius: 16px;
  background: #ffffff !important;
  box-shadow: 0 20px 50px rgba(15, 35, 65, .18) !important;
  transform: translateX(-50%);
}

html body .header .navlinks .nav-research-panel a,
html body .header .navlinks .nav-research-panel a:last-child,
html body .site-header .navlinks .nav-research-panel a,
html body .site-header .navlinks .nav-research-panel a:last-child {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px !important;
  border: 0 !important;
  border-radius: 10px;
  background: #ffffff !important;
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  box-shadow: none !important;
}

html body .header .navlinks .nav-research-panel a:hover,
html body .site-header .navlinks .nav-research-panel a:hover {
  background: #eef5ff !important;
  color: #174ea6 !important;
  -webkit-text-fill-color: #174ea6 !important;
}

html body .header .navlinks > .nav-cta,
html body .site-header .navlinks > .nav-cta {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Provider directory: one clear research action, secondary lead and claim controls. */
html body #provider-filter-grid .provider-bottom {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px !important;
  align-items: center;
}

html body #provider-filter-grid .primary-card-action,
html body #provider-filter-grid .primary-card-action:visited {
  order: 1;
  min-height: 48px;
  background: #2563eb !important;
  border: 1px solid #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html body #provider-filter-grid .request-introduction-action {
  order: 2;
  min-height: 48px;
  background: #ffffff !important;
  border: 1px solid #b9c9df !important;
  color: #174ea6 !important;
  -webkit-text-fill-color: #174ea6 !important;
}

html body #provider-filter-grid .compare-toggle {
  order: 3;
  min-height: 44px;
}

html body #provider-filter-grid .claim-profile-link,
html body #provider-filter-grid .claim-profile-link:visited {
  order: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  color: #334e73 !important;
  -webkit-text-fill-color: #334e73 !important;
  font-size: 14px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filter-load-more {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #dbe4f0;
}

.filter-load-more[hidden] {
  display: none !important;
}

.filter-load-more .btn {
  min-width: min(320px, 100%);
  min-height: 50px;
  background: #ffffff !important;
  border-color: #9eb4d0 !important;
  color: #174ea6 !important;
  -webkit-text-fill-color: #174ea6 !important;
}

.filter-load-more-status {
  color: #52647d !important;
  -webkit-text-fill-color: #52647d !important;
  font-size: 14px;
  font-weight: 650;
}

@media (max-width: 760px) {
  html body #provider-filter-grid .provider-bottom {
    grid-template-columns: 1fr;
  }

  html body #provider-filter-grid .primary-card-action,
  html body #provider-filter-grid .request-introduction-action,
  html body #provider-filter-grid .compare-toggle,
  html body #provider-filter-grid .claim-profile-link {
    width: 100%;
  }
}
