It turns out Gov. Andrew Cuomo’s headline-grabbing “free tuition” turns retroactively into a loan for grads who take jobs out of state — and that’s not the only ugly surprise.

The provision got tossed in at the last minute at the behest of Senate Republicans — whose upstate members worry about the “brain drain” of smart kids moving away.

Yet Cuomo went along, even defending the rule Monday: “Why should New Yorkers pay for your college education and then you pick up and you move to California?”

Well, that rule never applied to other Empire State support for higher ed, such as for cheap, quality SUNY and CUNY degrees.

Indeed, at under 7 grand a year, these schools leave little reason for undergrads to go deep in debt — but it was ballooning student debt that prompted Sen. Bernie Sanders to start pushing “free tuition.”

Bizarrely, in all the months since the gov announced the plan, his minions never drew up a program with rhyme or reason. For example, while the cutoff to qualify ($125,000 in adjusted gross family income) sort of targets actual need, there’s no allowance for family size, expenses and other key factors.

So some taxpaying families who don’t qualify, though they’re actually higher-need, will be subsidizing better-off folks who do.

The cutoff is also an all-or-nothing deal — which will leave families near it actually passing up income to stay qualified. (Junior, quit that summer job!)

Nor is moving away the only deal-changer: Students must also keep their grades up, or their “grants” mutate into loans.

Hmm: A big part of the student debt problem is that kids take out loans unwisely — 18-year-olds don’t know what they’re getting into. Cuomo’s “free until it isn’t” program only adds fresh risk there: Lots of freshmen won’t realize how hard it is to keep a B average, or how tempting out-of-state offers may be after graduation.

If the numbers break wrong, the gov’s scheme could wind up adding to student debt.

Details matter, if you want to actually help people. But it seems Cuomo only cares about the headlines.