Enron looked like a well-oiled machine, but a lot of it seems to have been jury-rigged. The company was housed in a spiffy 50-story building in downtown Houston, a structure whose elevators flashed Enron’s latest stock price and delivered upbeat messages to get employees pumped by the time they got to their offices. In the best New Economy tradition, Enron had an on-site health club, casual dress and employees piling up paper wealth by investing in Enron stock.

But when things started going bad, Enron couldn’t cope. It couldn’t even fire people properly. Information-technology specialist Diana Peters says her entire department was told to clear out on half an hour’s notice and to call their office voice mail to see if they should return to work the next day. Very classy. “I was crying, a lot of people were crying,” says Peters, 51. “It reminded me of a mass funeral.”

The company even had trouble going broke. Normally, a company hoards cash in preparation for bankruptcy by accelerating collections from its customers and slowing down payments to vendors. Enron didn’t start doing that until a few days before the filing, far too late. Enron almost became the Flying Dutchman of the bankruptcy world. It wanted to file in Wilmington, Dela., but the bankruptcy court there didn’t want the case. So Enron ended up in New York City. And it was so short of cash that it had to scurry around to line up $1.5 billion of so-called debtor-in-possession financing to keep the place operating. Normally, you make DIP arrangements before you file.

It would be lots of fun to give you Washington’s take on all this, Enron being famous for close ties to the White House and the Republican Party. But we’ll leave that for another day, because the juicy stuff probably won’t show up until the Democrats get in gear. Hearings in the Republican-controlled House are set for this week, and will focus on accounting and stock analysts and the Securities and Exchange Commission rather than on Enron’s political relationships and what, if anything, the White House did during Enron’s final days.

Although some details are still murky, one thing is clear: Arthur Andersen, Enron’s outside accountant, is in big trouble, and it (or its insurers) will have to fork over big bucks. Andersen’s big problem stems from a company called JEDI–as in “Star Wars”–that Enron now says should have been on its books since 1997. Andersen allowed JEDI to remain off the books for years. The other deal, involving a company called Raptor, caused the net-worth disappearance that set Enron on the road to ruin.

JEDI stands for Joint Energy Development Investments. It was a partnership between Enron and the California state-employees’ pension fund, known as Cal-pers. The Force was with Enron, which invested the money–$250 million each from itself and Calpers–in power plants, energy stocks and such, making more than 20 percent a year. Pretty neat. In late 1997, Calpers was willing to invest $500 million in a new partnership, JEDI 2. But it wanted to first cash in its JEDI 1 chips, worth $383 million. Instead of just liquidating JEDI, Enron got cute. (I’m not sure why. Enron declined to comment.) It went looking for an outsider to fork over $383 million and take Calpers’s place. Enter something called Chewco Investments–as in Chewbacca of “Star Wars” fame. Chewco was a partnership of Enron employees and some undisclosed outsiders. (Who they are and how much they made is a mystery, because Chewco is a private entity.) Chewco’s investors didn’t have a spare $383 million. So Enron lent Chewco $132 million and guaranteed a $240 million loan that Chewco took out elsewhere. Enron was thus at risk for its own JEDI stake and essentially all of Chewco’s. That being the case, it’s a mystery why Andersen let Enron keep JEDI off its books. Accounting experts who have looked at this transaction, which Enron disclosed last month, just shake their heads. Andersen has refused to comment, saying it’s too early to reach conclusions. Enron has restated its earnings dating back to 1997 because it says JEDI should have been on its books since then. Guess what? The restated profits are far lower than the original ones.

Now, to the deals that sank Enron. As in JEDI, Enron won’t comment. These transactions involve four companies called Raptor. It looks like the Raptors were set up to let Enron use financial gymnastics to get gains from stocks it owned without actually selling them. The major holdings were Rhythms Net Connections, a now bankrupt start-up telecom company, and NewPower Holdings, which competes with established power companies for customers. At their height, Enron’s stake in these companies totaled about $2 billion. Friday’s value: about $40 million. Enron won’t say why it didn’t just sell the stock and take its profits. The most logical explanation is tax avoidance.

Now, the key to Enron’s undoing. The company committed to put $1.2 billion of Enron stock into the Raptors to make them more creditworthy. It didn’t promise a fixed number of shares–it promised $1.2 billion worth, regardless of the share price. A seriously dumb move for a company that talks about hedging risks. In return for that commitment, the Raptors gave Enron $1.2 billion of promissory notes. Enron put them on its balance sheet as an asset. When a company adds to its assets and nothing else changes, its net worth rises. Hence, Enron marked up its net worth by $1.2 billion.

But as the stock prices of Rhythms, NewPower and Enron all sank, Enron faced having to fork over a ruinous number of new shares. So Enron paid $35 million to the Raptors’ outside investors–yet another mysterious partnership–and liquidated the Raptors. That eliminated the notes, which eliminated the aforementioned $1.2 billion from Enron’s net worth. That set off the now famous October run on Enron’s credit, which ultimately led to bankruptcy. Now, far too late, Enron says it shouldn’t have counted the notes as assets.

The bottom line: numbers matter. So does truth. Enron was too clever by half. And that’s a good way to end up looking stupid.