(CNN) A raw and aggrieved Hillary Clinton takes ownership -- to a degree -- for her stunning 2016 loss to Donald Trump in her upcoming book, which offers a revealing look at the campaign through the eyes of the contest's loser.

CNN purchased the book -- "What Happened" (Simon & Schuster, 494 pages) -- from a Jacksonville, Florida, bookstore a week before its widespread release.

The defeated presidential contender offers a patchwork of explanations for what, exactly, did happen last year -- some of which she insists were outside her control and some she concedes were her own fault.

"I go back over my own shortcomings and the mistakes we made. I take responsibility for all of them. You can blame the data, blame the message, blame anything you want -- but I was the candidate," she writes. "It was my campaign. Those were my decisions."

In a voice that swings from defiant to conciliatory to -- at rare moments -- deeply vulnerable, Clinton does assume ownership where the fault lines are obvious. And in overarching terms, she admits she badly misjudged the environment in which she was running and the candidate she was running against.

But Clinton still finds ample blame to go around. She writes bluntly that sexism hampered her ability to reach voters effectively. She offers unvarnished assessments of those who have cast doubts on her campaign, including Vice President Joe Biden and Sen. Bernie Sanders, her former rival . And she singles out James Comey -- a "rash FBI director" -- for direct and lashing criticism.

The book also oozes with contempt for Trump, the campaign he ran and the President he has become.

Opening up

Clinton, who admits in "What Happened" that she suffered an inability to say what she really felt on the campaign trail, seems to drop many of those tendencies here.

Clinton also opens up about her personal life with lengthy passages dedicated to her daughter, her mother and, most notably, her husband. She describes her marriage to former President Bill Clinton as one with "many, many more happy days than sad or angry ones" and confronts all the worst public assumptions about the relationship.

"I heard it again on the 2016 campaign ... it's just a marriage on paper now," she writes, adding "(he is reading this over my shoulder in our kitchen with our dogs underfoot and in a minute he will reorganize our bookshelves for the millionth time ... but I don't mind because he really loves to organize those bookshelves)."

In addition to bemoaning the fascination with her relationship, she lambasts media coverage of her emails, singling out The New York Times as a repeat and high-profile offender. And she wonders aloud why, after terms as first lady, US senator, secretary of state and two-time presidential candidate, the public still just doesn't seem to like her.

"What makes me such a lightning rod for fury? I'm really asking. I'm at a loss," she asks her readers, before concluding: "I think it's partly because I'm a woman."

Analyzing the loss

Clinton's memoir, her third, provides a narrative of a campaign that, in retrospect, was mismatched with the moment.

She tells readers she has spent the months since her defeat reading studies, reports and news articles (all cited in her book) that offer suggestions at how her style of campaigning was lost on an angry and disillusioned electorate. In places, "What Happened" reads like the term paper of a student studying the most unpredictable loss in modern American politics.

"I think it's fair to say that I didn't realize how quickly the ground was shifting under all our feet," she writes. "I was running a traditional presidential campaign with carefully thought-out policies and painstakingly built coalitions, while Trump was running a reality TV show that expertly and relentlessly stoked Americans' anger and resentment."

Clinton makes frank admissions about the places she fell short. She acknowledges it was bad "optics" to deliver paid speeches to Wall Street banks after the financial meltdown last decade. She says her comment during a CNN town hall about putting coal miners out of business was the misstep "I regret the most." And, as she has before, Clinton calls her decision to use a private email server during her time at the State Department as "dumb."

But while she claims that a host of factors -- including her own shortcomings -- led to headwinds against her, Clinton identifies the final week of the campaign, highlighted by Comey's revival of the email issue, as the moment that led to the bottom dropping out.

"Comey's letter turned that picture upside down," Clinton writes about her tarnished image, which she said had gone from a picture of a steady leader to one compromised by scandal.

In a lengthy middle section, Clinton unpacks Russia's meddling in the election, openly wondering whether a more forceful public response from then-President Barack Obama could have changed matters.

And she describes her regret at not facing Russian leader Vladimir Putin as a US president -- a form of vengeance she can now only imagine.

"There's nothing I was looking forward to more than showing Putin that his efforts to influence our election and install a friendly puppet had failed," she writes. "I know he must be enjoying everything that's happened instead. But he hasn't had the last laugh yet."

Private moments made public

Photos: Hillary Clinton's life in the spotlight Hillary Clinton accepts the Democratic Party's nomination for president at the Democratic National Convention in Philadelphia on July 28, 2016. The former first lady, U.S. senator and secretary of state was the first woman to lead the presidential ticket of a major political party. Hide Caption 1 of 43 Photos: Hillary Clinton's life in the spotlight Before marrying Bill Clinton, she was Hillary Rodham. Here she attends Wellesley College in Massachusetts. Her commencement speech at Wellesley's graduation ceremony in 1969 attracted national attention. After graduating, she attended Yale Law School. Hide Caption 2 of 43 Photos: Hillary Clinton's life in the spotlight Rodham was a lawyer on the House Judiciary Committee, whose work led to impeachment charges against President Richard Nixon in 1974. Hide Caption 3 of 43 Photos: Hillary Clinton's life in the spotlight In 1975, Rodham married Bill Clinton, whom she met at Yale Law School. He became the governor of Arkansas in 1978. In 1980, the couple had a daughter, Chelsea. Hide Caption 4 of 43 Photos: Hillary Clinton's life in the spotlight Arkansas' first lady, now using the name Hillary Rodham Clinton, wears her inaugural ball gown in 1985. Hide Caption 5 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons celebrate Bill's inauguration in Little Rock, Arkansas, in 1991. He was governor from 1983 to 1992, when he was elected President. Hide Caption 6 of 43 Photos: Hillary Clinton's life in the spotlight Bill Clinton comforts his wife on the set of "60 Minutes" after a stage light broke loose from the ceiling and knocked her down in January 1992. Hide Caption 7 of 43 Photos: Hillary Clinton's life in the spotlight In June 1992, Clinton uses a sewing machine designed to eliminate back and wrist strain. She had just given a speech at a convention of the International Ladies' Garment Workers Union. Hide Caption 8 of 43 Photos: Hillary Clinton's life in the spotlight During the 1992 presidential campaign, Clinton jokes with her husband's running mate, Al Gore, and Gore's wife, Tipper, aboard a campaign bus. Hide Caption 9 of 43 Photos: Hillary Clinton's life in the spotlight Clinton accompanies her husband as he takes the oath of office in January 1993. Hide Caption 10 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons share a laugh on Capitol Hill in 1993. Hide Caption 11 of 43 Photos: Hillary Clinton's life in the spotlight Clinton unveils the renovated Blue Room of the White House in 1995. Hide Caption 12 of 43 Photos: Hillary Clinton's life in the spotlight Clinton waves to the media in January 1996 as she arrives for an appearance before a grand jury in Washington. The first lady was subpoenaed to testify as a witness in the investigation of the Whitewater land deal in Arkansas. The Clintons' business investment was investigated, but ultimately they were cleared of any wrongdoing. Hide Caption 13 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons hug as Bill is sworn in for a second term as President. Hide Caption 14 of 43 Photos: Hillary Clinton's life in the spotlight The first lady holds up a Grammy Award, which she won for her audiobook "It Takes a Village" in 1997. Hide Caption 15 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons dance on a beach in the U.S. Virgin Islands in January 1998. Later that month, Bill Clinton was accused of having a sexual relationship with former White House intern Monica Lewinsky. Hide Caption 16 of 43 Photos: Hillary Clinton's life in the spotlight Clinton looks on as her husband discusses the Monica Lewinsky scandal in the Roosevelt Room of the White House on January 26, 1998. Clinton declared, "I did not have sexual relations with that woman." In August of that year, Clinton testified before a grand jury and admitted to having "inappropriate intimate contact" with Lewinsky, but he said it did not constitute sexual relations because they had not had intercourse. He was impeached in December on charges of perjury and obstruction of justice. Hide Caption 17 of 43 Photos: Hillary Clinton's life in the spotlight The first family walks with their dog, Buddy, as they leave the White House for a vacation in August 1998. Hide Caption 18 of 43 Photos: Hillary Clinton's life in the spotlight President Clinton makes a statement at the White House in December 1998, thanking members of Congress who voted against his impeachment. The Senate trial ended with an acquittal in February 1999. Hide Caption 19 of 43 Photos: Hillary Clinton's life in the spotlight Clinton announces in February 2000 that she will seek the U.S. Senate seat in New York. She was elected later that year. Hide Caption 20 of 43 Photos: Hillary Clinton's life in the spotlight Clinton makes her first appearance on the Senate Environment and Natural Resources Committee. Hide Caption 21 of 43 Photos: Hillary Clinton's life in the spotlight Sen. Clinton comforts Maren Sarkarat, a woman who lost her husband in the September 11 terrorist attacks, during a ground-zero memorial in October 2001. Hide Caption 22 of 43 Photos: Hillary Clinton's life in the spotlight Clinton holds up her book "Living History" before a signing in Auburn Hills, Michigan, in 2003. Hide Caption 23 of 43 Photos: Hillary Clinton's life in the spotlight Clinton and another presidential hopeful, U.S. Sen. Barack Obama, applaud at the start of a Democratic debate in 2007. Hide Caption 24 of 43 Photos: Hillary Clinton's life in the spotlight Obama and Clinton talk on the plane on their way to a rally in Unity, New Hampshire, in June 2008. She had recently ended her presidential campaign and endorsed Obama. Hide Caption 25 of 43 Photos: Hillary Clinton's life in the spotlight Obama is flanked by Clinton and Vice President-elect Joe Biden at a news conference in Chicago in December 2008. He had designated Clinton to be his secretary of state. Hide Caption 26 of 43 Photos: Hillary Clinton's life in the spotlight Clinton, as secretary of state, greets Russian Prime Minister Vladimir Putin during a meeting just outside Moscow in March 2010. Hide Caption 27 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons pose on the day of Chelsea's wedding to Marc Mezvinsky in July 2010. Hide Caption 28 of 43 Photos: Hillary Clinton's life in the spotlight In this photo provided by the White House, Obama, Clinton, Biden and other members of the national security team receive an update on the mission against Osama bin Laden in May 2011. Hide Caption 29 of 43 Photos: Hillary Clinton's life in the spotlight Clinton checks her Blackberry inside a military plane after leaving Malta in October 2011. In 2015, The New York Times reported that Clinton exclusively used a personal email account during her time as secretary of state. The account, fed through its own server, raises security and preservation concerns. Clinton later said she used a private domain out of "convenience," but admits in retrospect "it would have been better" to use multiple emails. Hide Caption 30 of 43 Photos: Hillary Clinton's life in the spotlight Clinton arrives for a group photo before a forum with the Gulf Cooperation Council in March 2012. The forum was held in Riyadh, Saudi Arabia. Hide Caption 31 of 43 Photos: Hillary Clinton's life in the spotlight Obama and Clinton bow during the transfer-of-remains ceremony marking the return of four Americans, including U.S. Ambassador Christopher Stevens, who were killed in Benghazi, Libya, in September 2012. Hide Caption 32 of 43 Photos: Hillary Clinton's life in the spotlight Clinton ducks after a woman threw a shoe at her while she was delivering remarks at a recycling trade conference in Las Vegas in 2014. Hide Caption 33 of 43 Photos: Hillary Clinton's life in the spotlight Clinton, now running for President again, performs with Jimmy Fallon during a "Tonight Show" skit in September 2015. Hide Caption 34 of 43 Photos: Hillary Clinton's life in the spotlight Clinton testifies about the Benghazi attack during a House committee meeting in October 2015. "I would imagine I have thought more about what happened than all of you put together," she said during the 11-hour hearing. "I have lost more sleep than all of you put together. I have been wracking my brain about what more could have been done or should have been done." Months earlier, Clinton had acknowledged a "systemic breakdown" as cited by an Accountability Review Board, and she said that her department was taking additional steps to increase security at U.S. diplomatic facilities. Hide Caption 35 of 43 Photos: Hillary Clinton's life in the spotlight U.S. Sen. Bernie Sanders shares a lighthearted moment with Clinton during a Democratic presidential debate in October 2015. It came after Sanders gave his take on the Clinton email scandal. "The American people are sick and tired of hearing about the damn emails," Sanders said. "Enough of the emails. Let's talk about the real issues facing the United States of America." Hide Caption 36 of 43 Photos: Hillary Clinton's life in the spotlight Clinton is reflected in a teleprompter during a campaign rally in Alexandria, Virginia, in October 2015. Hide Caption 37 of 43 Photos: Hillary Clinton's life in the spotlight Clinton walks on her stage with her family after winning the New York primary in April. Hide Caption 38 of 43 Photos: Hillary Clinton's life in the spotlight After Clinton became the Democratic Party's presumptive nominee, this photo was posted to her official Twitter account. "To every little girl who dreams big: Yes, you can be anything you want -- even president," Clinton said. "Tonight is for you." Hide Caption 39 of 43 Photos: Hillary Clinton's life in the spotlight Obama hugs Clinton after he gave a speech at the Democratic National Convention in Philadelphia. The president said Clinton was ready to be commander in chief. "For four years, I had a front-row seat to her intelligence, her judgment and her discipline," he said, referring to her stint as his secretary of state. Hide Caption 40 of 43 Photos: Hillary Clinton's life in the spotlight Clinton arrives at a 9/11 commemoration ceremony in New York on September 11. Clinton, who was diagnosed with pneumonia two days before, left early after feeling ill. A video appeared to show her stumble as Secret Service agents helped her into a van. Hide Caption 41 of 43 Photos: Hillary Clinton's life in the spotlight Clinton addresses a campaign rally in Cleveland on November 6, two days before Election Day. She went on to lose Ohio -- and the election -- to her Republican opponent, Donald Trump. Hide Caption 42 of 43 Photos: Hillary Clinton's life in the spotlight After conceding the presidency to Trump in a phone call earlier, Clinton addresses supporters and campaign workers in New York on Wednesday, November 9. Her defeat marked a stunning end to a campaign that appeared poised to make her the first woman elected US president. Hide Caption 43 of 43

In vivid color, Clinton also recalls the whiplash of the last 24 hours of the campaign, from the euphoria of her last full day of campaigning to the pain and uncertainty on election night.

During their final event together, Clinton recalls Obama hugging her and whispering, "You've got this. I'm so proud of you."

Her campaign, Clinton writes, was perilously vulnerable at the time, though, and Election Day was downhill after voting. She writes that as her husband was nervously "chomping on an unlit cigar," she took a nap as the results were coming in. When she awoke, the "mood in the hotel had darkened considerably."

Obama, hours after extolling her campaign, urged Clinton to concede to Trump on election night, not drawing out the 2016 campaign any longer than necessary. Clinton writes that her call with Trump was "without a doubt one of the strangest moments of my life."

"I congratulated Trump and offered to do anything I could to make sure the transition was smooth," she writes. "It was all perfectly nice and weirdly ordinary, like calling a neighbor to say you can't make it to his barbecue. It was mercifully brief ... I was numb. It was all so shocking."

While Clinton's book is full of praise for her Democratic colleagues, she also offers as blunt an assessment of their weaknesses as they offered of hers.

"Joe Biden said the Democratic Party in 2016 "did not talk about what it always stood for -- and that was how to maintain a burgeoning middle class,'" Clinton writes. "I find this fairly remarkable, considering that Joe himself campaigned for me all over the Midwest and talked plenty about the middle class."

Holding on to 'love and kindness'

In describing her scrutinized marriage to the 42nd president, Clinton reveals deep resentments at the rumors and innuendo that have colored public speculation about the partnership since the late 1990s.

Writing with pique, Clinton is unapologetic for wanting to keep the personal aspects of her marriage private, even in a world where the details of her husband's affairs have been widely aired.

"There were times that I was deeply unsure about whether our marriage could or should survive," she wrote. "But on those days, I asked myself the questions that mattered to me: Do I still love him? And can I still be in this marriage without becoming unrecognizable to myself -- twisted by anger, resentment, or remoteness? The answers were always yes."

Clinton also appears to be wrestling with other demons throughout "What Happened" as she comes to terms with the aftermath of her devastating loss. Searching for answers, Clinton steadfastly insists that the woman who has spent decades persevering in a harsh spotlight won't be embittered by a final humiliating blow.

In the same manner she has remained by her husband's side, Clinton writes she is intent on remaining in public life -- despite its dark moments and uncertain payout -- instead of seething in solitude.

"There were plenty of people hoping that I, too, would just disappear," she writes. "But here I am."