A 3 pt Typst bar and a 4 px CSS bar looked different. Body text was 10.5 pt in print and 18 px on the web, so the same absolute width is a different ratio to the text.
Fix: define one token in em (bar-width: 0.45em). Generate CSS and Typst from it. The bar then keeps the same proportion in both media.