You need to put your CSS in an .html file and then host it where the browser source can load it. I believe this will work even with just a local file if you enter in the URL correctly-- I don't think it's necessary to actually run a webserver.
CSS gets rendered by an HTML engine, and without a browser source in your OBS scene, there's nothing to render the CSS.
In fact, just a basic page with no content might be enough since the properties of a browser source in OBS has its own area for custom CSS.