  A Latin square of order $n$ is an $n \times n$ array filled with $n$ symbols
such that each symbol appears only once in every row or column and a
transversal is a collection of cells which do not share the same row, column or
symbol. The study of Latin squares goes back more than 200 years to the work of
Euler. One of the most famous open problems in this area is a conjecture of
Ryser-Brualdi-Stein from 60s which says that every Latin square of order
$n\times n$ contains a transversal of order $n-1$. In this paper we prove the
existence of a transversal of order $n-O(\log{n}/\log{\log{n}})$, improving the
celebrated bound of $n-O(\log^2n)$ by Hatami and Shor. Our approach (different
from that of Hatami-Shor) is quite general and gives several other applications
as well. We obtain a new lower bound on a 40 year old conjecture of Brouwer on
the maximum matching in Steiner triple systems, showing that every such system
of order $n$ is guaranteed to have a matching of size
$n/3-O(\log{n}/\log{\log{n}})$. This substantially improves the current best
result of Alon, Kim and Spencer which has the error term of order
$n^{1/2+o(1)}$. Finally, we also show that $O(n\log{n}/\log{\log{n}})$ many
symbols in Latin arrays suffice to guarantee a full transversal, improving on
previously known bound of $n^{2-\varepsilon}$. The proofs combine in a novel
way the semirandom method together with the robust expansion properties of edge
coloured pseudorandom graphs to show the existence of a rainbow matching
covering all but $O(\log n/\log{\log{n}})$ vertices. All previous results,
based on the semi-random method, left uncovered at least $\Omega(n^{\alpha})$
(for some constant $\alpha$) vertices.
