The San Francisco 49ers are in it for the long haul. After spending the last couple years flapping around in the wind, the 49ers finally found a long-term plan this offseason. And it doesn’t seem that bad.

New general manager John Lynch was an unorthodox hire, but so far he seems to know what he’s doing. Lynch fleeced the Chicago Bears on draft night, getting a treasure trove of picks at the cost of one spot (San Francisco was able to pick Solomon Thomas, the No. 1 player on their draft board anyway). It was the first of many steps toward making the 49ers respectable again.

The 49ers also won big with their head-coaching search, landing Kyle Shanahan — on paper the best candidate available this offseason.

All of this may not do much for 2017 beyond making them more interesting. But that was doomed to be the case no matter what. San Francisco was simply too starved for talent last season. However, the team now has a plan, and the plan is off to a rousing start.

The defense, where Lynch focused most of his energy in the draft, is young and raw. Though, the pieces are mostly in place.

There’s a bit of a positional clog on the defensive line, but the four-man group features three first round picks from the last three seasons: Solomon Thomas, DeForest Buckner and Arik Armstead. The 49ers could have done more with the third pick this year than taking Thomas — trading down again or taking Alabama’s Jonathan Allen if they were committed to an edge rusher — but it’s easy to see what they liked. Thomas has the talent and already features a grab bag of pass rushing moves. He can get off blocks in the run game and ranked third in run stop percentage, per PFF. However, the Stanford product also struggled as a pass rusher against tackles and was inconsistent. It’s rare to see a player drafted that high get pancake blocked as much as he did. There were effort issues as well, which could magnify on a team that doesn’t figure to contend, such as San Francisco.

49ers defensive lineman Solomon Thomas

Buckner looked solid off the edge in his first season. The 23-year old had 6.0 sacks, 14 hits and 23 hurries, per Football Outsiders’ Almanac, solid numbers for a rookie. His run defense needs improving, but Buckner had 49 stops and 12 defeats, per FOA — a solid foundation upon which to build.

Armstead is a different story. Injury likely played a role, as he only played eight games, but Armstead had a paltry 67 percent run stop rate, per FOA. He also didn’t stand out as a pass rusher. He could easily return to form, but it’s worth keeping an eye on the Oregon product.

The rest of the defensive line rotation is a collective shoulder shrug, as its unlikely any of the players will still be in San Francisco when the team is good. Elvis Dumervil adds another capable pass rusher, but the 33-year old played just eight games last season. Ahmad Brooks could be a disruptor as well and probably qualifies as the best run defender the Niners have on the edge. Brooks had an 80 percent stop rate last season, per FOA, ranking 24th among edge rushers.

On the inside, there isn’t much to talk about other than the snaps Armstead or Buckner will get at 3-technique. As far as run defense goes, newly acquired Earl Mitchell is expected to carry the load. Mitchell played just nine games last season and is 30 years old, but he had great numbers last season. His 88 percent stop rate ranked 18th among defensive tackles, and his 0.7 average rushing yards per tackle ranked fifth, according to FOA.

At linebacker, things are largely dependent upon the health of NaVorro Bowman. The 29-year old played just four games last season and missed the entire 2014 season after a horrific injury in the 2013 NFC Championship Game against Seattle. However, Bowman has been an All-Pro in every season in which he was healthy since 2011. Even in just four games last year, he had a 75 percent run stop rate and allowed just 5.3 adjusted yards per target, according to FOA. In other words, Bowman will probably add to that All-Pro streak if healthy.

Weakside linebacker Reuben Foster will be fun to watch as well. The first round pick — 31st overall — and Alabama product was one of the best defensive players in the draft. For this writer’s money, he was better than Solomon Thomas. Off-field issues and a shoulder injury caused him to fall to 31, but on the field, Foster was great. He can play well in man or zone coverage — a huge plus with tight ends and running backs becoming major receiving threats league-wide — and has the speed to keep up with anyone. He ranked first in run stop rate last season, per PFF, and can shoot the gaps as well as anybody. Foster did suffer a mild AC joint sprain in the same shoulder that was an issue during the draft. However, he is not expected to miss any time in the regular season.

As for the third linebacker spot, Brooks and Eli Harold both figure to take snaps there. Given that Harold is 23 and Brooks is 33, it makes sense that the younger will get more playing time. It doesn’t hurt that Harold posted solid numbers last season, posting an 82 percent stop rate last season, per FOA.

The secondary is the worst aspect of this defense and — without coincidence — the one Lynch has left largely untouched this offseason.

The only major change was drafting Ahkello Witherspoon in the third round. A product of the University of Colorado, Witherspoon flashed strong ability in man coverage last season and has the ability to win all the way through the route. He still needs to build up the necessary strength to deal with physical receivers, and run defense could be a major issue if teams force him into tackling situations. But the foundation is there.

Rashard Robinson and Keith Reaser, a less than inspiring duo, figure to fill out the cornerback position. Neither were full-time starters last season but had PFF grades of 50.4 and 54.8, respectively.

Jimmie Ward could hypothetically get snaps at corner, but he is expected to move to safety full-time. Ward struggled for most of 2016, putting up a 43 percent success rate, per FOA, so this move makes sense. However, he could miss games early in the season with a hamstring injury. Eric Reid will likely start alongside him. The 26-year old had solid numbers last season, ranking 23rd at the position with a 52 percent success rate, per FOA. He could be the steadiest member of the secondary this season, which isn’t saying much.

The defense is intriguing for its young players, but the offense is mostly a pile of blegh. The starter/backup duo of Brian Hoyer and Matt Barkley is a step forward from Colin Kaepernick and Blaine Gabbert, but only the smallest of steps. If snails could walk, they would take bigger steps.

If Hoyer stays healthy, he’ll be largely reflective of the supporting cast around him. He showed improvement in the six games he played with the Chicago Bears last season, notably throwing only four interceptable passes on 200 attempts, per Cian Fahey’s charting. However, Hoyer is 31 years old and that was a small sample size. It’s hard to expect that to carry over. Though, it’s worth noting he’s a veteran of Shanahan’s offensive system and could be better than expected.

49ers quarterback Brian Hoyer

At wideout, Pierre Garcon was the best offensive acquisition Lynch made this offseason. The 31-year old is one of the most underrated players in football. Garcon is coming off a 1,000-yard season in which he caught 69 percent of passes thrown his way and ranked tenth among receivers in DYAR. He will make Hoyer better, but it’s hard to say the same for the rest of the Niners’ receivers.

Garcon may have been tenth in DYAR, but Jeremy Kerley was 93rd out of 94 qualified receivers. Aldrick Robinson knows Shanahan’s offense and had some interesting flashes with the Falcons last season, but his role will exceed his ability. Olympian Marquise Goodwin is drawing rave reviews in camp, but he’s always shown more potential than substance. Tight end Vance McDonald is fine, but nothing more. He caught 24 balls for 391 yards last season.

Expect fullback Kyle Juszczyk to have a role in the passing game as well. A Pro Bowler last season, Juszczyk had 37 receptions for 266 yards with the Ravens. Lynch rewarded him with a four-year, $21 million deal in free agency, enough money that it’s safe to assume Juszczyk will be doing more than blocking.

At running back, Carlos Hyde and rookie Joe Williams will both see time. Hyde quietly had a pretty good 2016, averaging 4.6 yards per carry and ranking sixth among running backs in DYAR. However, the 49ers’ brass reportedly loved Williams, enough to take him despite being off their draft board due to off-field problems. The Utah product has 4.4 speed and can tear defenses apart at the second level, but he could struggle with San Francisco’s weak interior offensive line. He isn’t great rushing after contact and briefly quit football in 2016. It’s a boom or bust pick, but on an upside basis, it made sense.

The offensive line throws a wrench into any optimism there might be about the rest of the offense. Joe Staley is a solid left tackle, though at age 33 he’s an All-Pro level guy, but things go downhill fast after that.

Right guard Brandon Fusco was just terrible in Minnesota last season, blowing 13 pass blocks and 10 run blocks, per FOA, and putting up a 48.2 PFF grade. As well as center Daniel Kilgore may be playing in training camp, cutting Jeremy Zuttah to make way for him didn’t make much sense given their respective pedigrees. Left guard Joshua Garnett allowed five sacks last year, per FOA, and had a 39.5 PFF grade.

Superstar Denver defensive end Von Miller paid right tackle Trent Brown a compliment on Wednesday, so it stands to reason Brown is having a pretty good training camp. However, his numbers from last season tell a different story. Brown blew 24 blocks, per FOA, splitting them evenly between run and pass. He is only 24 years old, though, and advanced stats are far from perfect indicators about how a player performed. Miller’s words should be taken into account here. It’s certainly worth watching to see if the 24-year old is, as he put it, “the best right tackle in the National Football League.” If Brown plays well, the tackle situation will be solid enough to make up for some issues on the interior.

However, the Niners were 32nd in adjusted line yards and 30th in adjusted sack rate last season. With the interior looking the way it does, neither number figures to get much better.

This is a transitional year for the 49ers. While there are some gleaming positive things going on under the surface, nobody has expectations. And rightly so. If the young players develop and the offense is watchable, the season is a step along the right path.