I want to create a table that spans the full width of the page and where one column is half of the size of another column. As suggested here, I use tabularx for that. For some reason, however, my table does not want to span the full page. In the MWE below, I gave the top row a color such that it is visualized that the cell width of the last column is not appropriate.
\documentclass{article}
\usepackage{colortbl}
\usepackage{tabularx}
\newcolumntype{Y}{>{\hsize=0.5\hsize}X} % Half the size of X.
\begin{document}
\begin{tabularx}{\linewidth}{XXY} % E.g., XYY does work...
\hline
% The first row is given a color to clearly show the cell width.
\rowcolor{blue} A & B & Lorem ipsum dolor sit amet\\ \hline
a & b & c \\ \hline
\end{tabularx}
\end{document}
As one can see in the code, I use X for a normal column and Y for a column with half size. When I use columns XYY, it seems to work. Therefore, it seems pretty random to me. Could someone explain what is going wrong? What would be the correct way of creating columns the way I want (i.e., 40%, 40%, 20%)?

