(CNN) What Russia cannot win on the battlefield, it is seeking to win by casting Ukrainian cities into the dark and cold as a long winter sets in.
The result is a grinding battle of attrition: Barrages of Russian missiles fly across Ukraine, and Ukrainian power engineers work for days in freezing temperatures to restore power.
Monday saw the largest wave of missile attacks since November 23. Ukraine's state power generator, Ukrenergo, says that about 40% of normal electrical supply was offline at one point in October.
It's become known as the electricity deficit, and it swings one way and another depending on missile impacts.
Kyrylo Tymoshenko, the deputy chief of staff to Ukrainian President Volodymyr Zelensky, told CNN that "what the Ukrainian energy system has been experiencing since October, no energy system in the world has ever experienced."
The CEO of state power generator Ukrenergo, Volodymyr Kudrytskyi, says the issue is not in generating power but in getting it to the people.
"The enemy is hitting the most important facilities and key elements of substations that ensure the output... and transmission of electricity." Kudrytskyi told CNN.
The Russians go after the most vulnerable parts of the system. "By the nature of the attacks we see that Russian missiles are directed by Russian power engineers," says Tymoshenko.
That's in part because until this year Ukraine was in the same energy network as Russia and Belarus. Russian engineers knew the Ukrainian network inside out.
The main targets are high-voltage power lines, substations and distribution grids.
Joseph Majkut, director of the Energy Security and Climate Change Program at the Center for Strategic and International Studies, says that "Russia's attacks have focused on key elements of Ukraine's transmission network, preventing generated electricity from moving through the grid and to consumers... and forcing blackouts to balance the grid.
"Attacks on high-voltage substations have been particularly damaging as they are critical for grid operation and difficult to repair."
Ukraine is now scouring the world to find compatible parts and carry out repairs -- as the morale of ordinary people is tested by power cuts that often last more than 12 hours a day. Prolonged blackouts threaten to send another wave of Ukrainian civilians fleeing westwards to Poland and other neighboring countries.
There is a glimpse of hope: Ukraine's air defenses are getting better at taking out Russian cruise missiles, often with newly arrived Western equipment. Ukraine said it had taken out about 60 of 70 missiles fired on Monday; video emerged of one being intercepted by a German-made Gepard anti-air missile.
But as few as a dozen Russian missiles hitting critical targets wreak havoc. 15 gigawatts of Ukraine's power capacity have been taken out, compared to the pre-war capacity of 56 gigawatts (GW) of power, according to Ukrenergo.
Gradually power engineers are patching up the system -- by this week the electricity deficit had been cut to 19 per cent. But the recovery is tenuous.
Sergey Kovalenko, CEO of power supplier YASNO, says that "Ukrainians will most likely have to live with blackouts until at least the end of March."
Some people in Kyiv have told CNN they are ready to retreat to rural dachas, where at least wood-burning stoves provide warmth.
Conscious of the impact on Ukrainian morale, Western governments have stepped up aid in the form of transformers, thousands of generators and other equipment.
The US has mobilized allies in the G7 group to focus on a multi-layered approach to keeping the lights, heat and water on. Washington has already provided more than $100 million for everything from circuit breakers to surge arresters and generators that are now reaching Ukraine.
The European Union is shipping emergency equipment, including welding electrodes and circuit breakers. The Ukraine Energy Support Fund has sent 37 shipments from 20 countries; 47 more deliveries are scheduled.
Kudrytskyi, the Ukrenergo CEO, reels off the list of countries that have sent equipment, Poland, Germany, Italy, Finland and Lithuania among them.
But Ukraine's grid also requires specialist equipment that's made to order, according to Joseph Majkut at CSIS. One example is the high voltage (750kV) system that moves electricity from nuclear plants to other parts of the grid.
"There is not enough equipment available to enable full and lasting repairs to the power grid. For example, high voltage auto-transformers are hard to come by and have long lead times for fabrication from companies like Hitachi or Siemens," Majkut told CNN. They also weigh up to 250 tonnes.
Most of Europe runs at lower voltages, and many critical items would need to be manufactured specifically to meet Ukraine's needs. Tymoshenko told CNN that some would take six to nine months to make, though he hoped that South Korea might be a promising source of compatible equipment.
Meantime, Ukrainian engineers are carrying out patchwork repairs, according to Kudrytskyi, installing "used equipment that often does not meet the full technical specifications of the grid but can be temporarily implemented by grid engineers."
But he warned the company is running out of equipment.
"Although Ukrenergo had a significant stock of other equipment for emergency restoration works, it is being exhausted due to the scale of damage."
There are some short-term options. As of the beginning of December, USAID had provided 2,200 generators to communities across the country. Hundreds more have been imported from Europe -- and mobile boiler houses could provide heating for 7 million civilians later this winter, the US State Department says.
Generators help keep critical services running: hospitals, sewage plants, housing for the vulnerable. But Kudrytskyi says they are "a temporary alternative. They cannot replace power generation at any type of power plant."
They also require a lot of fuel, of which there has been a shortage at times during the conflict.
In the longer-term, Ukraine looks to its integration into the European grid. Tymoshenko told CNN that Ukraine's power system has been part of the continental network since March after synchronization of the systems. This enables an easier trade in electricity.
"And this, of course, will encourage us to further technological development of the power system after victory," he says.
That synchronization is already paying dividends. To stabilize the grid in Ukraine, some electricity destined for Kyiv or Odesa passes through Europe and back into Ukraine.
The other half of the equation is better anti-missile defenses. With their S-300 long-range surface-to-air missile systems and more recently Germany's highly capable IRIS-T and the US NASAMS, Ukraine's air defenses have intercepted a growing proportion of Russian cruise missiles and Iranian attack drones.
In October, Ukrainian air defenses were taking out just over half of the cruise missiles being fired, according to the Ukrainian military's figures. That proportion is now above two-thirds - and the Ukrainians believe the Russians are running out of their more accurate systems.
Last month the Pentagon also cleared the dispatch of HAWK missiles (the launchers are coming from Spain) and four Avenger air-defense systems. The Ukrainians want more -- and ask Germany and the US almost every day for Patriot missile batteries. US officials have been coy about the prospect, saying it is not currently under discussion.
As engineers work around the clock, Kudrytskyi said, "the percentage of the electricity deficit is gradually decreasing. But then Russian missiles and drones again fly to Ukrainian energy facilities and destroy everything that has been restored."
Some Ukrenergo facilities have been targeted eight times, he said, and eight times they've been patched up.
Tymoshenko told CNN: "The enemy aims to plunge Ukraine into cold and darkness. And we are aware that it requires courage and endurance from each of us this winter. We know that it will be the most difficult in the history of Ukraine.'
But he said he was confident Ukraine would prevail, and that the ultimate goal was to "build back better" -- and faster.