<!-- RUBY-BACKUP · part 223 -->
continuum-alert','guilty-order','news-ticker'].forEach(function(id){
    var d = document.getElementById(id);
    if(d) d.remove();
  });
  if(LIVE_CASE.newsTimer) clearInterval(LIVE_CASE.newsTimer);
  LIVE_CASE.active = false;
}
function militantCourt(){
  /* officers on the spot — not a courtroom */
  var div = document.createElement('div');
  var existing = document.getElementById('quest-hud');
  if(existing) existing.remove();
  div.id = 'quest-hud';
  div.style.cssText = 'position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:16000;background:rgba(20,5,5,0.98);border:4px solid #ff0000;border-radius:0;padding:25px 35px;color:#fff;font-family:Arial;max-width:90%;text-align:center;';
  div.innerHTML = '<div style="color:#ff0000;font-weight:bold;font-size:24px;letter-spacing:2px;margin-bottom:15px;">MILITANT COURT — ON THE SPOT</div>'
    + '<div style="font-size:14px;color:#aaa;margin-bottom:15px;">No courtroom. No delay. Here. Now.</div>'
    + '<div style="margin:15px 0;">'
    + '<div style="display:inline-block;margin:0 15px;text-align:center;">'
    + '<div style="width:60px;height:80px;background:#1a2a1a;border-radius:5px;margin:0 auto;"></div>'
    + '<div style="font-size:11px;margin-top:5px;">OFFICER KANE</div></div>'
    + '<div style="display:inline-block;margin:0 15px;text-align:center;">'
    + '<div style="width:60px;height:80px;background:#2a1a1a;border-radius:5px;margin:0 auto;"></div>'
    + '<div style="font-size:11px;margin-top:5px;">OFFICER NALU</div></div>'
    + '</div>'
    + '<div style="font-style:italic;font-size:16px;margin:15px 0;line-height:1.6;">'
    + '"We are the court. We are the law, here, now.<br>'
    + 'The Continuum watches. The news watches.<br>'
    + 'Everyone watches."'
    + '</div>'
    + '<button onclick="document.getElementById(\'quest-hud\').remove(); startFlareCase();" style="padding:12px 30px;background:#880000;color:#fff;border:2px solid #ff0000;font-size:16px;cursor:pointer;">FACE THEM</button>';
  document.body.appendChild(div);
}
/* override startFlareCase to include live elements */
var _origStartFlare = startFlareCase;
startFlareCase = function(){
  LIVE_CASE.active = true;
  activateContinuumAllSystems();
  showGuiltyOrder();
  startNewsBroadcast();
  setTimeout(function(){ militantCourt(); }, 2000);
};
/* override endFlareCase for the triumph */
var _origEndFlare = endFlareCase;
endFlareCase = function(){
  /* THEIR TIME TO SHINE — not guilty feels real */
  stopLiveCase();
  var div = document.createElement('div');
  div.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;background:radial-gradient(ellipse at center, rgba(255,215,0,0.15) 0%, rgba(5,10,5,0.97) 100%);display:flex;flex-direction:column;justify-content:center;align-items:center;color:#fff;font-family:Georgia,serif;text-align:center;';
  /* news breaks */
  var newsFlash = document.createElement('div');
  newsFlash.style.cssText = 'position:fixed;top:35px;left:0;width:100%;z-index:20001;background:#00aa00;color:#fff;font-family:monospace;font-weight:bold;text-align:center;padding:10px;font-size:16px;';
  newsFlash.innerHTML = '🔴 BREAKING: VERDICT — NOT GUILTY';
  document.body.appendChild(newsFlash);
  setTimeout(function(){ if(newsFlash.parentElement) newsFlash.remove(); }, 8000);
  div.innerHTML = '<div style="font-size:60px;margin-bottom:20px;">☀️</div>'
    + '<div style="font-size:32px;color:#ffd700;font-weight:bold;margin-bottom:15px;letter-spacing:2px;">NOT GUILTY</div>'
    + '<div style="font-size:18px;font-style:italic;line-height:1.8;max-width:600px;">'
    + 'The militant court steps back.<br>'
    + 'The news goes silent, then erupts.<br>'
    + 'The Continuum stands down.<br><br>'
    + 'You were never guilty.<br>'
    + 'This is your time to shine.'
    + '</div>'
    + '<button onclick="this.parentElement.remove()" style="margin-top:30px;padding:15px 40px;background:transparent;border:3px solid #ffd700;color:#ffd700;font-size:18px;border-radius:8px;cursor:pointer;">Shine</button>';
  document.body.appendChild(div);
  unlockAchievement('Survived the Server Flare');
  earnPay(200, 'flare case cleared');
  grantFlareEndorsements();
  codeStatus('NOT GUILTY — your time to shine');
  setTimeout(function(){ courtStranger(); }, 6000);
};
function startFlareCase(){
  FLARE_CASE.active = true;
  FLARE_CASE.stage = 0;
  showFlareStage();
}
function showFlareStage(){
  var stages = [
    {
      text: 'You walk to the spaceport that night to pick up your Apex Runner. Two officers step from the shadows.',
      officer: 'HALT. Where were you on the night of the continuum server flare?'
    },
    {
      text: 'You answer. They shake their heads.',
      officer: 'No matter what you say — that is a lie. You are wrong. Nothing you say can convince us otherwise.'
    },
    {
      text: 'One officer holds up a picture. It is you. Your hands are on the server core. You DID have it at that time.',
      o