The @media CSS at-rule can be used to apply part of a style sheet based on the result of one or more media queries. With it, you specify a media query and a block of CSS to apply to the document if and only if the media query matches the device on which the content is being used. W3C level 5: https://drafts.csswg.org/mediaqueries-5/#at-media5
The prefers-color-scheme CSS media feature is used to detect if the user has requested the system use a light or dark color theme.
The prefers-contrast CSS media feature is used to detect if the user has requested that the web content is presented with a higher (or lower) contrast.
The prefers-reduced-motion CSS media feature is used to detect if the user has requested that the system minimize the amount of animation or motion it uses.
The prefers-reduced-transparency CSS media feature is used to detect if the user has requested that the system minimize the amount of transparency used across elements.
The inverted-colors CSS media feature can be used to test whether the user agent or underlying OS is inverting colors.
The light-level CSS media feature can be used to test the ambient light level
The forced-colors CSS media feature is used to detect if the user agent has enabled a forced colors mode where it enforces a user-chosen limited color palette on the page.