// trust-panel.js — the TRUST TOPOLOGY MAP. For the trust-nobody, non-technical user: a VISUAL diagram of where // their data goes (You → quantum tunnel → self-hosted server → back), what's protecting it, what is NOT collected, // and an honest AI disclaimer. Self-contained inline SVG + styles (light+dark), no CDN. (function () { const PROTO_URL = 'https://datatracker.ietf.org/doc/draft-kwiatkowski-tls-ecdhe-mlkem/' function injectStyles() { if (document.getElementById('trust-panel-styles')) return const s = document.createElement('style'); s.id = 'trust-panel-styles' s.textContent = [ '.tp-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:9999;display:flex;align-items:flex-end;justify-content:center}', '.tp-modal{width:100%;max-width:520px;max-height:90dvh;overflow-y:auto;background:#16181d;color:#eef1f4;border:1px solid #2a2e35}', 'html[data-theme="light"] .tp-modal{background:#fff;color:#141821;border-color:#e2e5ea}', '.tp-head{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-bottom:1px solid #2a2e35;position:sticky;top:0;background:inherit;font-weight:700}', 'html[data-theme="light"] .tp-head{border-color:#e2e5ea}', '.tp-x{background:none;border:0;color:inherit;font-size:1.5rem;line-height:1;cursor:pointer;opacity:.55}', '.tp-sec{padding:14px 16px;border-bottom:1px solid #2a2e35}', 'html[data-theme="light"] .tp-sec{border-color:#eef0f3}', '.tp-sec:last-child{border-bottom:0}', '.tp-h{font-weight:700;font-size:.82rem;margin-bottom:6px}', '.tp-p{font-size:.8rem;opacity:.82;line-height:1.5}', '.tp-map{width:100%;margin:2px 0 6px}', '.tp-node text{font-size:9px;font-weight:700}', '.tp-badge{display:inline-block;font-family:ui-monospace,monospace;font-weight:700;font-size:.76rem;color:#4f9bf0}', 'html[data-theme="light"] .tp-badge{color:#2563eb}', '.tp-link{color:#4f9bf0;font-size:.78rem;text-decoration:none;border-bottom:1px solid currentColor}', 'html[data-theme="light"] .tp-link{color:#2563eb}', '.tp-list{list-style:none;padding:0;margin:6px 0 0}', '.tp-list li{font-size:.8rem;line-height:1.5;padding-left:18px;position:relative;opacity:.85}', '.tp-list li::before{content:"\\2713";position:absolute;left:0;color:#3fb27f;font-weight:700}', '.tp-warn{background:rgba(224,180,60,.12);border:1px solid #d8a83c;color:#e0b43c;padding:9px 11px;font-size:.78rem;line-height:1.5}', ].join('') document.head.appendChild(s) } const esc = (s) => { const d = document.createElement('div'); d.textContent = s; return d.innerHTML } async function pqStatus() { try { const r = await fetch('/pq-attest', { cache: 'no-store' }); if (!r.ok) return { pq: null }; return await r.json() } catch (_) { return { pq: null } } } // the topology SVG: You ── tunnel ── Server ── tunnel ── You (round trip), self-contained, theme-aware via currentColor. function topologySVG() { const acc = '#4f9bf0', ok = '#3fb27f', mut = 'currentColor' return '' } async function openPanel() { injectStyles() const st = await pqStatus() const usesAI = document.body.dataset.usesAi === '1' || true // most sessions here run an AI; show the honest disclaimer const wrap = document.createElement('div'); wrap.className = 'tp-overlay' wrap.innerHTML = '