<!-- SOLID CITY · part 3771 -->
 aria-label="Named source"><button class="btn" data-action="info">Record information request + sourced answer</button></div><div class="history"><h3>Full event history</h3>'+hist+'</div>';
    document.getElementById('drawerBackdrop').classList.add('open');renderTasks();setTimeout(function(){document.getElementById('closeDrawer').focus()},0)
  }
  function closeDrawer(){document.getElementById('drawerBackdrop').classList.remove('open');selectedTask=null;renderTasks()}
  function toast(msg){var el=document.getElementById('toast');el.textContent=msg;el.classList.add('show');setTimeout(function(){el.classList.remove('show')},1800)}
  function askConfirm(text,fn){document.getElementById('confirmText').textContent=text;confirmAction=fn;document.getElementById('confirmLayer').classList.add('open')}
  function closeConfirm(){document.getElementById('confirmLayer').classList.remove('open');confirmAction=null}
  function handleAction(action){var t=taskById(selectedTask);if(!t)return;
    if(action==='takeover'){var from=t.owner;t.previousOwner=from;t.owner='king';t.state='in-progress';addEvent(t,'handoff','The King','Took ownership from '+ownerName(from)+'. Existing work was preserved.','king',null,from,'king');taskDrawer(t);toast('Ownership transferred; work preserved.')}
    if(action==='save'){var value=document.getElementById('workEditor').value;t.work=value;addEvent(t,'edit','The King','Saved a human edit. Simulated collaborators may resume only from this version.','king');taskDrawer(t);toast('Human edit recorded.')}
    if(action==='return'){var to=t.previousOwner;t.owner=to;t.previousOwner=null;t.state='in-progress';addEvent(t,'handoff','The King','Returned the edited task to '+ownerName(to)+' without resetting its work.','king',null,'king',to);taskDrawer(t);toast('Returned with your edits intact.')}
    if(action==='approve'){askConfirm('This records an explicit human approval event and marks this reviewed result complete. Continue?',function(){t.state='done';t.owner='king';addEvent(t,'approval','The King','Explicitly approved the reviewed result and marked it complete.','king');closeConfirm();taskDrawer(t);toast('Approval recorded.')})}
    if(action==='changes'){t.state='in-progress';var to=t.owner==='king'?(t.previousOwner||'surveyor'):t.owner;t.owner=to;addEvent(t,'review','The King','Requested changes; existing work and history remain attached.','king');taskDrawer(t);toast('Change request recorded.')}
    if(action==='publish'){askConfirm('Approve the board as a PLANNED inaugural service only? This does not claim operating transportation.',function(){t.state='done';t.owner='king';addEvent(t,'approval','The King','Explicitly approved the planned-service board for completion. No operational service was claimed.','king');closeConfirm();taskDrawer(t);toast('Planned board approval recorded.')})}
    if(action==='info'){var need=document.getElementById('infoNeed').value.trim(),source=document.getElementById('infoSource').value.trim();if(!need||!source){toast('Name both the need and its source.');return}addEvent(t,'info-request',ownerName(t.owner), 'Requested: '+need+'.',t.owner);addEvent(t,'info-answer','Surveyor','Answered the request using named source: '+source+'.','surveyor',source);taskDrawer(t);toast('Request and sourced answer recorded.')}
  }
  function runCollab(){var t;
    if(collabStep===0){t=taskById('t2');if(t.state!=='done'&&t.owner!=='king'){t.state='review';t.owner='surveyor';addEvent(t,'handoff','Route Planner','Transferred the completed route draft to Surveyor for review.','planner',null,'planner','surveyor');collabStep++;toast('AI-to-AI handoff recorded.');return}}
    if(collabStep<=1){t=taskById('t4');if(t.owner!=='king'&&t.state!=='done'){t.work+='\n\nResult: Wording meets the planned-service safety rule. Human confirmation still required.';t.state='review';addEvent(t,'result','Safety Checker','Verified the board uses planned-service language and makes no live transit claim.','safety','Rendered Harbor Shuttle Board copy');addEvent(t,'review','Safety Checker','Submitted the safety result for explicit human approval.','safety');collabStep=2;toast('Safety result recorded for human review.');return}}
    t=tasks.find(function(x){return x.owner!=='king'&&x.state==='in-progress'});if(t){addEvent(t,'result',ownerName(t.owner),'Recorded a collaborator checkpoint from the current work version.',t.owner,'Current task work version');toast('Collaborator checkpoint recorded.')}else toast('No autonomous step available. A human review gate is waiting.')
  }
  function switchView(name,push){document.querySelectorAll('.view').forEach(function(v){v.classList.remove('active')});document.querySelectorAll('.nav button').forEach(function(b){b.classList.toggle('active',b.dataset.view===name)});var el=document.getElementById(name+'View');if(el)el.classList.add('active');if(push!==false){var q=name==='workshop'?'':('?view='+encodeURIComponent(name));history.replaceState(null,'',