Light logo on Homepage and Dark on rest

To make light logo on homepage and dark on rest on Squarespace, you can do these.
#1. First, add a light logo on the homepage

#2. Next, use this code to Custom CSS box to change to dark logo on other pages

body:not(.homepage) header#header img {
filter: brightness(0) invert(0);
}