Small caveat though, since @supports tests whether the condition is supported, it also resolves to false if the browser doesn’t support the condition type. So if -moz-bool-pref() function is not supported (as is with Firefox 120 and above) then the condition is false. And thus, if you use negation then whole expression resolves to true.
That means that the above expression will always apply red background to nav-bar in Firefox 120 but in older Firefox version only apply it if that pref doesn’t exist or exists but is set to false
You can read all about @supportsat MDN although it doesn’t list the Firefox internal-only -moz-bool-pref condition.