Midnight's consensus implementation

I want to understand a bit better how consensus works in midnight. We know it uses cardano SPOs but the consensus protocols are different (ourobouros vs AURA) and finality is also different (probabilistic vs provable finality).

The first question would be where can we read more about how consensus is implemented? Is the code accesible someway?

Also, the documentation says midnight is built over the polkadot sdk. We are going over those implementations, but how different are they from the actual node implementation?

Thanks in advance!