Simply scaling a letterform up or down makes thin strokes blur into mush at small sizes, and look needlessly heavy at large ones. Metal type foundries once cut separate sizes to solve this — optical size revives that practice digitally.
Variable fonts implement it as an `opsz` axis. Where a font supports it, changing `font-size` lets the browser automatically adjust weight, spacing, and x-height alongside it: text sizes get lower stroke contrast and more room to breathe, display sizes get higher contrast and tighter spacing.
This site can't load an external font, so instead of a real `opsz` axis, the demo hand-tunes weight and letter-spacing differently at text vs. display size to mimic the same principle.
When to use
If a variable font supports the opsz axis, changing font-size alone triggers the correction automatically. Without that support, manually nudge large headlines slightly lighter and small body text slightly heavier.