/* Shared navigation, link state and anchor behavior. The original logo and
   its short adjacent divider remain in their source stylesheets. */
.header .nav-sub-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: -.375rem 0 -.375rem .125rem;
  border: 0;
  padding: 0;
  vertical-align: middle;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.header.has-nav-disclosures .nav-sub-toggle {
  display: inline-flex;
}

.header .nav-sub-toggle > span {
  display: block;
  font-family: var(--font-family-b);
  font-size: 1.125rem;
  line-height: 1;
  transition: transform .15s ease;
}

.header .nav-sub-toggle[aria-expanded="true"] > span {
  transform: rotate(180deg);
}

.header.has-nav-disclosures .nav-list-item > .nav-sub,
.header.has-nav-disclosures .nav-list-item:hover > .nav-sub,
.header.has-nav-disclosures .nav-list-item:focus-within > .nav-sub {
  display: none;
}

.header.has-nav-disclosures .nav-list-item.is-expanded > .nav-sub {
  display: block;
}

.header .nav-sub {
  width: 18.5rem;
  max-width: calc(100vw - 2rem);
  max-height: min(34rem, calc(100dvh - 5rem));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.header .nav-list-item:last-child .nav-sub {
  right: 0;
  left: auto;
}

.header .nav-sub li {
  float: none;
  clear: none;
  padding: 0;
}

.header .nav-sub a,
.herb-nav-quick-list a {
  display: block;
  padding: .625rem 0;
  overflow-wrap: anywhere;
}

.header .nav-sub a[aria-current="page"],
.fullscreen-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
}

.herb-nav-quick-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.header a:focus-visible,
.header button:focus-visible,
.footer a:focus-visible,
.herb-breadcrumb-nav a:focus-visible {
  outline: 3px solid #3F7050;
  outline-offset: 3px;
}

.herb-breadcrumb-nav {
  min-width: 0;
}

.herb-breadcrumb-nav .herb-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .375rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.herb-breadcrumb-nav .mntl-breadcrumbs__item {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

main [id],
.stats-bar [id] {
  scroll-margin-top: 6rem;
}

a.herb-source-link::after {
  content: " ↗";
  display: inline;
  font-family: var(--font-family-b);
  font-size: .875em;
  white-space: nowrap;
}

a.herb-source-card .card__title-text::after,
a.herb-source-card .block__title span::after,
a.di-story.herb-source-link > .di-story__title::after,
a.home-tool.herb-source-link > .home-tool__text::after,
a.grid-nav-link.herb-source-link > .grid-nav-title::after,
a.midcirc-card.herb-source-link > .midcirc-card__title::after,
a.mntl-section-title.herb-source-link > .mntl-section-title__heading::after {
  content: " ↗";
  font-family: var(--font-family-b);
  font-size: .75em;
  white-space: nowrap;
}

/* Keep the source marker inside the label, out of the card's flex/grid. */
a.di-story.herb-source-link::after,
a.home-tool.herb-source-link::after,
a.grid-nav-link.herb-source-link::after,
a.midcirc-card.herb-source-link::after,
a.mntl-section-title.herb-source-link::after {
  content: none;
}

.herb-unavailable-link {
  cursor: text;
}

span.credit[data-link-kind="unavailable"] {
  cursor: default;
  text-decoration: none;
}

.herb-unavailable-link .icon {
  display: none;
}

.herb-source-link .link-list-icon__deprecated,
.herb-source-link .icon-circle-arrow {
  display: none;
}

.herb-unavailable-note {
  display: block;
  font-family: var(--font-family-b);
  font-size: .875rem;
  color: #646464;
}

.herb-source-scope {
  display: block;
  margin-top: .25rem;
  font-family: var(--font-family-b);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.5;
  color: #646464;
}

.alphabetical-nav-list .herb-letter-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  color: #646464;
  cursor: default;
}

.herb-index-note {
  font-family: var(--font-family-b);
  font-size: .875rem;
  line-height: 1.5;
  margin: .75rem 0 1.5rem;
}

@media (min-width: 61em) {
  .header .nav-list {
    flex-wrap: nowrap;
    align-items: center;
  }
  .header .nav-title {
    white-space: nowrap;
  }
  .header .nav-list-item {
    padding-right: .5rem;
    padding-left: .5rem;
  }
  .header.header-condensed .nav-list-item:not(:first-child) {
    padding-right: .375rem !important;
    padding-left: .375rem !important;
  }
}


@media (prefers-reduced-motion: reduce) {
  .header .nav-sub-toggle > span {
    transition: none;
  }
}
