/* Desktop navbar collision guard */
@media (min-width: 768px) {
  /* Keep the theme control away from the second navigation row. */
  nav > .max-w-6xl.mx-auto > div:first-child {
    padding-right: 3.5rem;
  }

  nav > .max-w-6xl.mx-auto > div:first-child > button {
    right: 0.5rem !important;
  }

  nav > .max-w-6xl.mx-auto > div:nth-child(3) {
    padding-right: 3.75rem;
  }

  nav > .max-w-6xl.mx-auto > div:nth-child(3) > div:first-child {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
  }

  nav > .max-w-6xl.mx-auto > div:nth-child(3) > div:first-child::-webkit-scrollbar {
    display: none;
  }

  /*
   * The compact search icon must not exist visually in the desktop navbar.
   * The full search field remains available at xl widths; its functionality
   * is preserved even without the decorative search glyph.
   *
   * This intentionally targets every search glyph inside the desktop nav so
   * an old/cached compact variant cannot reappear and overlap the faith tab.
   */
  nav .ri-search-line {
    display: none !important;
  }
}
