Four months out from the Paris Olympic Games, Sammie Maxwell was told to stop.
The young mountain bike star, who has struggled with an eating disorder since she was a teen, was losing the battle with her brain.
Her weight had become dangerously low, and her bone density levels indicated she had RED-S, or relative energy deficiency in sport - a syndrome that encapsulates a range of physical and psychological issues that come from athletes under-fuelling their body.
Maxwell's doctors advised her to cease training and engage in therapy to overcome her eating issues.
And so, she did something that went against her nature. She stopped.
The 22-year-old withdrew from the opening rounds of the World Cup circuit, stating simply: "I have some things to work on with my brain."
She swapped brutal interval sessions and chasing PBs in the gym for cold plunges, slow bike rides in the sunshine, walks with her mum, baking, French lessons and Wordle. Most importantly, she engaged with an eating disorder clinic and started a treatment programme.
But as autumn turned to winter and the Olympics drew closer, Maxwell found herself unable to push aside her dream of competing at the Paris Games. It was time to get back on the bike.
Maxwell linked back up with her pro team, Decathlon Ford, who put a medical support team around her.
Her management plan also included an agreement with her coach: if her weight dropped below a certain threshold, there would be an intervention that would likely result in her returning to New Zealand.
Back in her happy place, ripping it up around the courses of Europe, Maxwell produced her strongest performances as an elite rider, including her first top 10 result on the World Cup circuit.
Still, Cycling NZ selectors were not convinced Maxwell was healthy enough to compete at the Olympic Games. The national body declined to put the under-23 world champion forward for selection, believing the risk to her wellbeing was too great.
What happened next played out publicly.
Maxwell lodged an appeal over her non-nomination with the Sports Tribunal and became an unwitting case study in a wider sporting discussion about how sports bodies balance their duty of care to athletes without removing their individual autonomy
The 22-year-old, who was represented by prominent Christchurch lawyer Ian Hunt, won her appeal after the tribunal ruled Cycling NZ had relied on inaccurate and out-of-date medical information in arriving at its decision.
The tribunal was also concerned that Cycling NZ had taken a discriminatory position towards athletes with eating disorders.
And so, less than two weeks out from the opening ceremony, Maxwell received the call that she was going to the Olympic Games.
She was the final athlete to be included in the 195-strong NZ Team bound for Paris.
'Every sporting organisation can learn from this'
Last week, Maxwell took to the Olympic mountain bike course, apparently free of all the baggage from the previous month.
If she felt any sense of pressure that her performance on the rough gravel of Elancourt Hill - 40 kilometres outside Paris - would either validate or invalidate her stance taken against Cycling NZ, she did not show it.
On sport's grandest stage, the youngster brought the same off-the-wall energy she has become renowned for on the world tour, charging her way to a remarkable eighth place finish in her first Olympics.
Speaking with RNZ in Paris, Maxwell said she had no regrets about the case and details of her personal health battles playing out in public.
The pro mountain biker stressed the dispute with Cycling NZ's selectors never felt adversarial, and she felt supported by the organisation throughout.
"I guess the worst part about having to go through that process was more the uncertainty of whether I would be here and the amount of time it took.
"I wasn't worried about it [being public]. I've always been super open about my eating disorders in the past and I'm almost glad that it was brought to attention just because I think every sporting organisation can maybe learn something from it."
Maxwell hoped her situation may encourage other young athletes facing similar battles with disordered eating to disclose their issues to their sports bodies and work with medical staff towards a treatment plan.
Right now, the Taupō cyclist felt like she was winning the mental battle, but "your brain's a muscle like everything else, right? You've got to keep working on it".
Maxwell, who will wrap her season at the UCI Mountain Bike World Championships in Andorra next month, said she was in the best place mentally she had ever been in while competing overseas.
She credited the work she did with an eating disorder clinic back home with getting her back in a healthy place.
"I've never come overseas and maintained my weight, and this season I am.
"I'm responding really well to training, but in saying that I know that it's a long process and as soon as I return home I'm going to continue that process [with the clinic].
"You've got these techniques and they're fresh in your mind and you're doing well and then sometimes you forget to use those strategies and techniques and that's when you can relapse, so I just want to engage in that process as much as I can get all the tools and knowledge from it. So that's what I'll be doing when I return home from Worlds in four weeks."
You always want more
Maxwell's eye-catching performance in Paris, where she earned an Olympic diploma for a top eight finish, has made her reassess her goals for the upcoming World Championships.
While it was her best performance yet in an elite race, what the coverage did not show was that Maxwell got a flat tyre midway through the race.
She had willed, with every ounce of her body, for the sealant in the bike's wheels to work its magic - "I was literally yelling at my wheel 'seal, seal, seal'" - but the tell-tale white goo told her that air was escaping.
So, on lap four of the eight lap circuit, she made the decision to stop in the mechanical zone and swap out her tyre.
While she was delighted with her final result, she could not help but wonder what might have been had she not been forced to stop.
"That was probably a minute off my time right there, so without that flat I could have been fighting for a top five, which is just incredible.
"It's quite funny, if you told me before the Olympics I would finish in the top eight I would be absolutely chuffed.
"But that's part of the athlete frame of mind, right? I'm now like, what's next? What can I do? What do I need to work on? I'm so, so happy, but it's always like - unless it's gold, you always want more."
Where to get help:
Need to Talk? Free call or text 1737 any time to speak to a trained counsellor, for any reason.
Lifeline: 0800 543 354 or text HELP to 4357
Suicide Crisis Helpline: 0508 828 865 / 0508 TAUTOKO (24/7). This is a service for people who may be thinking about suicide, or those who are concerned about family or friends.
Depression Helpline: 0800 111 757 (24/7) or text 4202
Samaritans: 0800 726 666 (24/7)
Youthline: 0800 376 633 (24/7) or free text 234 or email talk@youthline.co.nz
What's Up: free counselling for 5 to 19 years old, online chat 11am-10.30pm 7days/week or free phone 0800 WHATSUP / 0800 9428 787 11am-11pm Asian Family Services: 0800 862 342 Monday to Friday 9am to 8pm or text 832 Monday to Friday 9am - 5pm. Languages spoken: Mandarin, Cantonese, Korean, Vietnamese, Thai, Japanese, Hindi, Gujarati, Marathi and English.
Healthline: 0800 611 116
Rainbow Youth: (09) 376 4155
OUTLine: 0800 688 5463 (6pm-9pm)
Eating Disorders Association of NZ: 0800 233 269
If it is an emergency and you feel like you or someone else is at risk, call 111.