{% extends "base.html" %}

{% block title %}Methodology — Proof Engine{% endblock %}

{% block meta_description %}How Proof Engine works: citation verification, executable proofs, and structured verdicts.{% endblock %}

{% block content %}
<div class="static-content">
    <h1>How Proof Engine Works</h1>
    <div class="proof-content">{{ methodology_html | safe }}</div>
</div>
{% endblock %}

{% block scripts %}
<script type="module">
// Render Mermaid diagrams: convert <pre><code class="language-mermaid">...</code></pre>
// into <div class="mermaid">...</div> that Mermaid.js picks up.
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: false, theme: 'neutral' });

document.querySelectorAll('pre > code.language-mermaid').forEach(function (codeEl) {
    var pre = codeEl.parentElement;
    var div = document.createElement('div');
    div.className = 'mermaid';
    div.textContent = codeEl.textContent;
    pre.parentNode.replaceChild(div, pre);
});

mermaid.run();
</script>
{% endblock %}
