Stage 1 — Start Your Journey
Watch closely. Listen carefully. Answers are lowercase, no spaces.
VIDEO
Submit
That’s not it. Watch & listen again 👀
🎉 Correct!
Stage 1 complete. Your journey has officially begun.
CONTINUE TO STAGE 2
Your Journey
0 / 15 solved
Submit
🎉 Correct!
Open Next Stage
/* =================== UTILITIES =================== */
function $(id){ return document.getElementById(id); }
async function sha256Hex(str){
if (!window.crypto?.subtle) return null;
const enc = new TextEncoder().encode(str);
const buf = await crypto.subtle.digest("SHA-256", enc);
return [...new Uint8Array(buf)].map(b=>b.toString(16).padStart(2,"0")).join("");
}
function getSolved(){ try{ return JSON.parse(localStorage.getItem("accRet_solvedStages")||"[]"); }catch(e){ return []; } }
function setSolved(arr){ const unique = [...new Set(arr)].sort((a,b)=>a-b); localStorage.setItem("accRet_solvedStages", JSON.stringify(unique)); }
function isSolved(n){ return getSolved().includes(n); }
function fireConfetti(){
try{
confetti({ particleCount: 180, spread: 75, origin:{ y: .6 } });
confetti({ particleCount: 120, angle: 60, spread: 55, origin:{ x: 0 } });
confetti({ particleCount: 120, angle: 120, spread: 55, origin:{ x: 1 } });
}catch(e){}
}
/* =================== GRID =================== */
function renderGrid(){
const grid = $("j-grid");
const solved = getSolved();
grid.innerHTML = "";
for (let i=1;i<=J_CONFIG.total;i++){
const solvedHere = solved.includes(i);
const unlocked = (i === 1) || solved.includes(i-1);
const tile = document.createElement("button");
tile.type = "button";
tile.dataset.stage = i;
tile.disabled = !unlocked;
tile.style.cssText = `
border:1px solid ${solvedHere ? '#cde7cf' : (unlocked ? '#ddd' : '#eee')};
background:${solvedHere ? '#f1fbf3' : (unlocked ? '#fafafa' : '#f8f8f8')};
border-radius:16px; padding:16px; display:flex; flex-direction:column;
align-items:center; gap:8px; cursor:${unlocked?'pointer':'not-allowed'};
box-shadow:${solvedHere ? '0 10px 16px rgba(18,140,27,0.08)' : '0 8px 14px rgba(0,0,0,0.04)'};
transition: transform .12s ease; width:100%;
`;
tile.addEventListener('mouseenter', ()=>{ if(unlocked) tile.style.transform='translateY(-2px)'; });
tile.addEventListener('mouseleave', ()=>{ tile.style.transform='none'; });
tile.innerHTML = `
${solvedHere ? "✓" : (unlocked ? i : "🔒")}
Stage ${i}
${solvedHere ? "Unlocked" : (unlocked ? "Open" : "Locked")}
`;
if (unlocked) {
tile.addEventListener("click", ()=>{
renderInlineStage(i);
$("s1-app")?.scrollIntoView({ behavior: "smooth" });
});
}
grid.appendChild(tile);
}
const solvedCount = solved.length;
$("j-count").textContent = `${solvedCount} / ${J_CONFIG.total} solved`;
}
/* =================== STAGE 5 TWO-STEP (auto-injected) =================== */
(function(){
// Helpers to find existing input + submit generically
const AnswerUI = {
inputEl(){ return document.querySelector('#answer') || document.querySelector('input[placeholder*="answer" i]'); },
submitEl(){
const byId = document.querySelector('#submit'); if (byId) return byId;
return Array.from(document.querySelectorAll('button, input[type="submit"]'))
.find(b => /submit/i.test(b.textContent || b.value || ''));
}
};
// Create modal once
function ensureModal(){
if (document.getElementById('s5-modal')) return;
const wrap = document.createElement('div');
wrap.id = 's5-modal';
wrap.style.cssText = `position:fixed; inset:0; display:none; z-index:99999; align-items:center; justify-content:center; background:rgba(0,0,0,.5);`;
wrap.innerHTML = `
🎉 Congratulations! You’ve almost solved Clue #5
(One more key to go.)
This stage has one final key. It isn’t a clue to hear—but one to see.
You’re here now: watch closely and tell me… what could that key be?
The truth is hiding in plain sight. Ask a bot and you’ll get night—
this one needs human eyes and light. Walk the halls, find the door and pause the scene;
what you need is on the screen..
Enter the final key for Stage 5
Cancel
Submit Key
`;
document.body.appendChild(wrap);
// Wire modal actions
wrap.querySelector('#s5-cancel').addEventListener('click', closeModal);
wrap.querySelector('#s5-submit').addEventListener('click', submitSecondKey);
wrap.addEventListener('keydown', (e)=>{
if(e.key === 'Escape') closeModal();
if(e.key === 'Enter' && document.activeElement && document.activeElement.id === 's5-key'){ submitSecondKey(); }
});
}
function openModal(){
ensureModal();
const m = document.getElementById('s5-modal');
m.style.display = 'flex';
const i = document.getElementById('s5-key');
i.value = ''; i.focus();
if (window.fireConfetti) fireConfetti();
}
function closeModal(){ const m = document.getElementById('s5-modal'); if (m) m.style.display = 'none'; }
function normalize(s){ return (s||'').toString().trim().toLowerCase().replace(/\s+/g,''); }
async function sha256Local(str){
const enc = new TextEncoder().encode(str);
const buf = await crypto.subtle.digest('SHA-256', enc);
return Array.from(new Uint8Array(buf)).map(b => b.toString(16).padStart(2,'0')).join('');
}
async function submitSecondKey(){
const key = normalize(document.getElementById('s5-key').value);
const salted = "Ardea-7b8c2e9b" + key;
const hash = await sha256Local(salted);
if(hash === CORRECT_HASH_S5_KEY){
localStorage.setItem('s5_final_done', '1');
if (window.fireConfetti) fireConfetti();
try {
if (typeof logSolve === 'function') {
const fn = (window.FIRST_NAME || '').toString();
const li = (window.LAST_INITIAL || '').toString();
logSolve('Stage 5 (Key)', fn, li);
}
} catch(e){}
const input = AnswerUI.inputEl();
const submitBtn = AnswerUI.submitEl();
if (input && submitBtn){
input.value = 'thebookofthedead'; // triggers main flow bypass once
localStorage.setItem('s5_bypass_once','1');
submitBtn.click();
}
closeModal();
} else {
const box = document.getElementById('s5-key');
box.style.animation = 's5shake .25s'; setTimeout(()=>{ box.style.animation=''; }, 250);
}
}
const css = document.createElement('style');
css.textContent = `@keyframes s5shake{0%{transform:translateX(0)}25%{transform:translateX(-6px)}50%{transform:translateX(6px)}75%{transform:translateX(-3px)}100%{transform:translateX(0)}}`;
document.head.appendChild(css);
// Public interceptor: call from modal/inline handlers
window.Stage5TwoStep = {
intercept(openStageName, computedHash){
if (openStageName !== 'Stage 5') return false;
if (localStorage.getItem('s5_bypass_once') === '1'){ localStorage.removeItem('s5_bypass_once'); return false; }
if (localStorage.getItem('s5_final_done') === '1') return false;
if (computedHash === CORRECT_HASH_S5_MAIN){
try {
if (typeof logSolve === 'function') {
const fn = (window.FIRST_NAME || '').toString();
const li = (window.LAST_INITIAL || '').toString();
logSolve('Stage 5 (Part 1)', fn, li);
}
} catch(e){}
openModal();
return true; // stop normal advance until key entered
}
return false;
}
};
})();