The sunroof always worked pretty well and never leaked that I remember.

Before disassembly
This shows a piece of headliner hanging down at the front of the sunroof opening. The headliner was wrapped up underneath and clamped in place with the sunroof pieces.
The headliner was glued in place under the track work.

Sunroof actuator
The sunroof actuator is pretty clever. The hand crank turns a gear that forces these two flexible cables through a track. One cable goes one way while the other cable goes the other.
In this picture, you can see the edge of the headliner that was glued in place.

Actuator cables
The actuator cables run in a track that keeps the cables from bending. The track is built into the bottom of these aluminum pieces.

Actuator arms
At the end of each actuator cable is an arm. These are plastic, and you can see this one is cracked. I broke the other side trying to figure out how to remove it.
Then I ordered replacements: another $400.
This is when I came to realize that my original estimate of $10K for the whole job was way off.

The sunroof
This is the metal side of the sunroof. The actuator lever locks the metal sunroof to the actuator arm.
You can see where there is a shadow of paint.
The arm is normally in the ‘down’ position. It holds the actuator arm (above) in place. The two holes of the actuator arm rest in the two studs that the bottom part of where the arm goes.
Note there is a 1/4in foam, which was very crumbly.
The glued area had a fabric piece that allowed the sunroof to slide.

Inside panel
This is the inside panel of the sunroof.
It has a metal frame to which the headliner is glued.
It snaps to the metal panel, but I don’t remember exactly the sequence of assembly/disassembly.
I seem to remember that one of the panels slides back into the roof, while the other moves forward and out. (I am writing this post about 3 months after I disassembled the sunroof.)
The fabric panel snaps to the metal panel with the clips that are showing through the holes on the left of this picture.

Plastic guide
This is a plastic guide that runs in the track. There is one on either side.
There are witness lines just to the right of my hand where the actuator arm rests.

Foam piece
This small foam piece is held in place with two metal tabs. It provides a sliding surface for the rear of the sunroof.

Sliding element
This is a thin, fiberglass anti-friction piece that goes above the frame and below the actuator cables. It forms the bottom of the actuator cable track.