It appears that attempting to apply CSS styles from an HTML file or stylesheet to elements within a separate SVG file can be a bit tricky. The CSS rules may not affect SVG elements if they are included via an image tag.
I initially thought you could use an external style sheet within the SVG file, which is technically possible (https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes). However, my experiments with Chrome and Firefox yielded mixed results. While the external style sheet worked when I directly loaded the .svg file in the browser URL bar, it had no effect when included via an img tag. This discrepancy could be seen as a bug, a feature, or perhaps just an oversight on my part.
Based on my experience, it seems that using CSS reliably outside of the SVG requires embedding the SVG elements. Perhaps considering including the SVG elements as HTML snippets or exploring other similar approaches could yield better results.
EDIT:
Interestingly, it turns out that this behavior is actually intentional - https://bugzilla.mozilla.org/show_bug.cgi?id=628747