The human immune system is one of the most sophisticated and remarkable features of the natural world.
There's not a single pathogen it doesn't know how to deal with.
But sometimes, it needs time to figure out how to meet alien threats it's never yet encountered.
Like the deadly coronavirus behind Covid-19.
"That's what makes this virus such a big deal, as it's come completely out of the blue," said Professor Graham Le Gros, a world-renowned New Zealand immunologist.
"There's just no immunity to it, of any kind."
Our natural fortress
Our immune system is a complex and beautifully cohesive network of tissues, cells and organs that we rely on each day to keep nasties like viruses, bacteria, fungi and parasites out of our bodies.
At its tiniest level, we can picture it as a collection of unique adapted cells.
"And when I say uniquely adapted, I'm talking about cells adapted to totally different kinds of bugs," said Le Gros, the director of the Wellington-based Malaghan Institute for Medical Research.
"There are some bugs that infect us and hide inside our cells. Some other bugs try to spread throughout our fluids. And other bugs are so big and horny that they can't be killed by anything."
It keeps a record of every microbe it's ever killed, in types of white blood cells – namely B- and T- lymphocytes – also known as memory cells.
Its built-in library means it can recognise and destroy a microbe quickly if it enters the body again - well before it can multiply and make us feel sick.
Infections like the flu are a life-long nuisance as its many different strains means it must be fought many times as a new adversary.
"But, generally, the immune system has a set of uniquely adapted cells which have specific chemical responses to all of the things it encounters," Le Gros said.
"Inside those cells are the T-cells, which can tear down into viral DNA and look at everything."
B-cells, on the other hand, make antibodies that help the body to fight microbes or the toxins and poisons they produce.
They do this by recognising substances called antigens on the surface of the microbe, which mark the microbes or toxins as being foreign invaders in need of swift destruction.
When a bug is too big for such a response – like a burrowing parasite, for instance – our immune system creates a unique set of cells that simply wall off the infection.
Been stung by a bee lately?
The swelling and redness that comes with it is the immune system responding to histamines put into the blood stream, by sending a surge of fluids to the sting site, causing inflammation.
A foreign enemy
The freshly-identified coronavirus causing the Covid-19 disease - SARS-CoV-2 – isn't just an alien to our defence system, but a rather clever one.
It belongs to a family of coronaviruses – its cousin is the better-known common cold – which are singled-stranded RNA viruses, or those which have ribonucleic acid as their genetic material.
"This is a big RNA virus - the biggest actually - and it has features that can do all sorts of things," Le Gros said.
"But what's really special about this virus is that it chooses certain receptors that are found throughout our bodies."
Specifically, the virus attaches itself to cells by binding its outer "spike" proteins, something which play a big part in how quickly it spreads within us and to other people..
Just as threatening, the receptor that it targets, called ACE2, happens to be highly expressed in our respiratory cells.
"So it quickly finds its way deep into your lungs, and starts causing big problems there."
ACE2 has hosted this havoc before, acting as the receptor in the Sars coronavirus which infected more than 8000 people and killed 800 in the early 2000s.
"This virus also has a recombinant ability where it can mutate its spike protein quite quickly, allowing it to flick from one receptor to another," Le Gros said.
"It has a relatively clever way of mutating and recombining."
Some people were left doubly exposed as they didn't have immune systems with specific receptors for, or responses to, RNA viruses, and fared much more poorly when infected.
Le Gros suspected that rare trait might explain some cases of young people being killed or left critically ill after catching the virus.
For the rest of us, the main problem was that our immune system doesn't have any existing memory, or playbook, to beat the virus.
"When it infects us, it doesn't happen in any sort of subtle way. It's just that we haven't built any herd immunity to it."
In every case, it was crucial for our immune system to balance the threat it faced with the response it deployed against that threat.
"Simply because of the sheer number of bugs that are out there, and the fact we have to respond to them all, we can never have the total package," he said.
"So our immune system is reactive, and will always respond appropriately to the type of pathogen we get infected with.
"That means there is always a foot race between the bug growing inside us and our immune system, which might say, 'okay, this type of bug is bug number 5672, let's start putting together this package of immune responses to deal with it'.
"So the immune cells have to start replicating to catch up. If you have 10 bugs in your system, it's easier to get on top of. People like healthcare workers, unfortunately, are dealing with massively higher levels of bugs, and thus the virus can stay far ahead of their immune system."
On the flipside, things can go awry when our immune systems push back too hard and inadvertently made us sicker.
One of the most lethal examples of this is what's called a cytokine storm.
When our immune system detects a virus, it can over-react by sending a surge of immune cells and their activating compounds - cytokines - straight into our lungs.
This doesn't just inflame the lungs and build up fluid, causing respiratory distress characterised in Covid-19 by violent bouts of coughing, but also opens the door for contamination by a secondary bacterial pneumonia, boosting the risk of death.
"In essence, the more lung function you ordinarily have, the far better off you'll be against this virus," Le Gros said.
"So many of the people dying from it already have compromised lung function, so the virus just comes along and takes the last 10 per cent of it they've got left."
Vaccines and anti-virals
If we visualise the millions of components of our immune system as an army, we might see a division overseen by generals, with a tier of colonels below them.
Using this analogy, figuring out how to create these virus-fighting senior commanders is much harder than simply expanding the number of soldiers below them and then marching them into battle.
"That's what we call broad-spectrum stimulation of the immune system, or non-specific immune stimulation."
It's just that effect which scientists hope to create by repurposing the century-old BCG (Bacillus Calmette-Guérin) vaccine, typically used as a kind of blanket protection for children against severe forms of tuberculosis.
Other scientists have been racing to engineer vaccines that induce more specific responses – and promising clues have been popping up around the world.
From one of Australia's first Covid-19 patients – an otherwise healthy woman who turned up at hospital with mild to moderate symptoms – scientists drew blood samples at different points of the infection that shone a light on how her immune system responded and fought the virus.
Three days after she was admitted, the researchers observed large populations of several specific immune cells – often a tell-tale sign of recovery from a flu infection – and correctly predicted her recovery.
Hidden inside that specific response, they hope, is the secret to a vaccine for Covid-19.
Scientists at California's Scripps Research Institute may have also found some exciting new leads by using an antibody – remarkably, extracted from a survivor of the Sars epidemic 20 years before – to pin-point an Achilles' heel potentially shared with the new coronavirus.
Le Gros, part of a burgeoning effort in New Zealand to create a vaccine here, said the key would be to find a solution that the entire population could safely use.
It's the inherent risks that come with vaccines – such as the potential to dangerously trigger allergies, or prove ineffective in certain groups – that largely explain why they take years to produce and roll out.
"We also need to be aware that there is a lot of hype about out there, with biotech companies saying we've found something amazing that can do this or that. Really, we just need a good old-fashioned simple vaccine to deal with this virus."
In the short term, researchers here and around the world are turning to anti-viral drugs as possible treatments for sick Covid-19 patients.
"Anti-virals may offer some help for those people who are seriously infected, or perhaps give immuno-suppressed people a better chance against the virus until a vaccine comes along."
These drugs fall into three main groups: polymerase inhibitors, protease inhibitors and others.
Polymerase inhibitors work by blocking the enzyme that allow the virus to replicate its nucleic acid coding strand, while protease inhibitors - commonly used against HIV – acted by blocking an enzyme that processed proteins that the virus needed for growth.
Chloroquine – best known for its use by travellers for protection against malaria, and dangerously touted by US President Donald Trump - is among the other possibilities, but scientists have stressed there's not yet any clinical evidence to show it's effective.
How can we help ourselves?
The most obvious way to protect ourselves against Covid-19 is to avoid catching it in the first place, by practising good hygiene and social distancing.
As for helping our immune system, Le Gros said the basic tenets of good health apply: a well-balanced, nutritious diet and plenty of exercise.
"If you think back to Captain Cook and the Endeavour, his sailors were getting scurvy and dying with horrible, black boils everywhere, simply because their immune systems were giving out because they weren't getting enough vitamins," he said.
"Thankfully, we don't live in that environment here in New Zealand. People in impoverished communities in the developing world are all the more susceptible because they might only be living on carbohydrate-based meals with little protein and no vitamins."
Young, healthy Kiwis can generally be assured they were getting what they needed.
But for elderly people, an extra boost may help their immune systems.
"Your grandmother, for example, might just have a cup of tea and a cookie to see them through most of the day, and otherwise live on a very minimal diet.
"That's where supplements can be important. As we get older, our gut also becomes less absorbent, so we need higher concentrations of certain things to get the same amount as a younger person."