@-moz-document url-prefix('about:preferences') {
  /* Hide the home and startup category */
  /* It configures the home and new tab page, which are inaccessible here */
  #category-home {
    display: none !important;
  }

  /* Hide the search category */
  /* It configures the search options, which do not make sense here */
  #category-search {
    display: none !important
  }

  /* Hide the default browser group */
  /* Our browser installation is not supposed to be made default */
  #defaultBrowserBox,
  setting-group[groupid=defaultBrowserHome],
  setting-group[groupid=defaultBrowserSync],
  setting-control:has(> #alwaysCheckDefault),
  setting-control:has(> #isDefaultPane),
  setting-control:has(> #isNotDefaultPane) {
    display: none !important
  }

  /* Hide the layout (vertical tabs) group */
  /* Hidden until we figure out how to properly support them (#667) */
  setting-group[groupid=browserLayout] {
    display: none !important
  }

  /* Hide the related settings link to the home category */
  #setting-control-related-settings-home-link {
    display: none !important
  }

  /* Hide native window controls preference when CSD is not available */
  /* It does not have an effect when CSD is not available */
  @media not (-moz-gtk-csd-available) {
    #setting-control-native-window-controls {
      display: none;
    }
  }
}
