diff --git a/public/index.html b/public/index.html
index e714a97..7fb0703 100644
--- a/public/index.html
+++ b/public/index.html
@@ -95,6 +95,11 @@
.map(([l, v]) => '
').join('');
const cfg = await (await fetch('/api/config')).json();
// arrived on a member's share link: sign-ups go to that member's InstantAdPay join page
+ // the share link's ?r= is the truth even when the cookie was refused (blocked cookies, a framed view, a
+ // different browser later): read it from the URL, keep a copy in this browser, and build the join link here
+ // (2026-09-29: referrals were landing under the company with the cookie missing)
+ try { const rq = String(new URLSearchParams(location.search).get('r') || '').trim().slice(0, 40); if (/^[A-Za-z0-9_.-]{1,40}$/.test(rq)) localStorage.setItem('ph.ref', rq); } catch (e) {}
+ if (!cfg.ref) { let alt = ''; try { alt = String(new URLSearchParams(location.search).get('r') || localStorage.getItem('ph.ref') || '').trim().slice(0, 40); } catch (e) {} if (/^[A-Za-z0-9_.-]{1,40}$/.test(alt)) { cfg.ref = alt; cfg.joinUrl = 'https://instantadpay.com/join/' + encodeURIComponent(alt) + '?from=polhunter'; } }
if (cfg.ref) { document.querySelectorAll('a[href="https://instantadpay.com/?from=polhunter"]').forEach(a => { a.href = cfg.joinUrl; }); const inv = document.createElement('span'); inv.className = 'pill'; inv.style.marginLeft = '10px'; inv.innerHTML = ' Invited by @' + cfg.ref.replace(/[<>&"]/g, ''); document.querySelector('.hero-copy .pill').after(inv); }
document.getElementById('recent').innerHTML = (r.recent || []).length ? r.recent.map(x => '' + x.who + '' + x.site + '+' + x.pol + ' POLverify ↗ ').join('')
: 'No drips yet. The first hunter gets the first line.
';