Amazing how much variance there is in inseam/height. I'm 3 cm shorter than you with almost 5 cm more inseam! How are you measuring your inseam? What is your usual saddle height? Based on your height I would say 56 cm but based on your inseam 54 cm (with a long stem).
I been trying to calculate the most ideal seat tube length. which is the critical factor. So wanting to max out that while trying to compensate for seat post and saddle height. I am lookin at 160 to 165 cranks as another way to give myself some breathing room. I think 520mm is the ideal seat tube length. But an seat post with saddle slammed would be 60 to 80mm. So its 800mm(inseam) - 165mm(cranks) - minus 80mm(seat/saddle) =555mm left over. Which means I can fit into the 168 at the largest size with the seat slammed. but I would probably want the 56cm for breathing room. 54cm with a lot.
I am also looking at the 218. which I think that one would put me in the medium size. just looking at the stack and reach. I think. The 168 is more ideal but the 218 is more fun.
My current ride has a 58cm seat tube. and about a 57cm top. and 170cm cranks. it feels a bit big in the saddle. I have the seat post 3cm from slammed.
Book/wall methoid. with the tape under my foot. and subtracting that. I just remeasured and I am 79cm. I got short legs. I am much more of a swimmer than a cyclist. I love swimming. I can do laps of literal hours.