/* Desktop only: center tabs, keep brand left, keep search right */
@media (min-width: 992px) {
  /* Keep the header row as a single flex row */
  header .navbar > .container-fluid {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
  }

  /* Brand stays on the left, don’t let it wrap weirdly */
  header .navbar-brand {
    white-space: nowrap;
    margin-right: 0.5rem;
  }

  /* Make the collapsible area take the middle space and center the nav list */
  header .navbar-collapse {
    flex: 1 1 auto !important;
    display: flex !important;
    justify-content: center !important;
  }

  /* Remove Bootstrap’s left-push if Quarto adds .me-auto */
  header .navbar-collapse .navbar-nav.me-auto {
    margin-right: 0 !important;
  }

  /* Tidy list margins */
  header .navbar-collapse .navbar-nav {
    margin: 0 !important;
  }

  /* Search/tools lock to the right edge */
  header .quarto-navbar-tools,
  header #quarto-search,
  header .quarto-search {
    margin-left: auto !important;
  }
}
