/* Navbar: rich green (#0D6238) with solid white text.

   Bootstrap gives navbar links a translucent white by default, which falls
   short of WCAG contrast minimums. Forcing solid white on this green lands at
   7.44:1, which clears AAA for normal text. The [data-bs-theme] selector is
   required — Quarto puts that attribute on the navbar, and Bootstrap's own
   .navbar[data-bs-theme] rule outranks a plain .navbar rule here. */

.navbar,
.navbar.bg-primary,
.navbar[data-bs-theme="dark"] {
  background-color: #0D6238;
  --bs-navbar-color: #ffffff;
  --bs-navbar-hover-color: #ffffff;
  --bs-navbar-active-color: #ffffff;
  --bs-navbar-brand-color: #ffffff;
  --bs-navbar-brand-hover-color: #ffffff;
  --bs-navbar-disabled-color: rgba(255, 255, 255, 0.75);
}

/* Because every link is the same white, hover and current-page states are
   marked with an underline rather than a colour shift, so contrast stays
   7.44:1 in every state and hover isn't signalled by colour alone. */
.navbar .nav-link:hover,
.navbar .nav-link:focus-visible,
.navbar .nav-link.active,
.navbar .navbar-brand:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* The search magnifier and any navbar tool icons go white to match the ink.
   These selectors deliberately mirror the theme's own so they win on load order. */
.navbar #quarto-search.type-overlay .aa-Autocomplete svg.aa-SubmitIcon,
.navbar .aa-DetachedSearchButton .aa-DetachedSearchButtonIcon,
.navbar .quarto-navbar-tools .quarto-navigation-tool,
.navbar .quarto-navbar-tools .quarto-navigation-tool:hover {
  color: #ffffff;
}

/* Bootstrap's default focus ring is blue and vanishes against green. */
.navbar a:focus-visible,
.navbar button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* Mobile menu (hamburger) button: Bootstrap's default icon is 55%-opacity
   white with a 10%-opacity border, which fails contrast against this
   background. Redraw the icon at full opacity in the navbar ink and give the
   button a visible border to match. */
.navbar .navbar-toggler {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}
.navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23FFFFFF' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
