Outpatient Service Line Seat Selector
Complete the seat selector in a clinic service-flow scenario: includes realistic content, actionable controls, clear state feedback, and responsive layouts across sizes.
With JavaScript enabled, you can edit, run, and save this example. The fixed source is as follows:
<!doctype html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Outpatient Service Line Seat Selector</title>
<style>
:root { --ink:#102c44; --paper:#eef6f8; --accent:#e05263; --secondary:#79b7c7; --line:color-mix(in srgb, var(--ink) 18%, transparent); --shadow:0 24px 60px color-mix(in srgb, var(--ink) 16%, transparent); color-scheme:light; }
* { box-sizing:border-box; }
html { min-width:320px; background:var(--paper); }
body { min-height:100vh; margin:0; overflow-x:hidden; color:var(--ink); font-family:"DIN Alternate","Arial Narrow",sans-serif; background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--ink) 5%,transparent) 0 1px,transparent 1px 18px),var(--paper); }
button,input,select,textarea { color:inherit; font:inherit; }
button,[role="button"],input,select,textarea { accent-color:var(--accent); }
button { cursor:pointer; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
[hidden] { display:none !important; }
@media (max-width:700px) { .mast h1 { line-height:1.08 !important; letter-spacing:-.035em !important; overflow-wrap:anywhere; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }
.mast{display:flex;justify-content:space-between;border-bottom:6px solid var(--ink);padding-bottom:18px;gap:20px;align-items:flex-end;margin:0 0 22px}.page{width:min(1240px,calc(100% - 28px));margin:auto;padding:34px 0 70px}.scenario{padding:8px 12px;border:2px solid var(--ink);font:900 12px/1 ui-monospace,monospace}.mast h1{font-family:"DIN Condensed","Arial Narrow",sans-serif;font-weight:900;text-transform:uppercase;font-size:clamp(44px,10vw,104px);letter-spacing:-.02em;max-width:1000px;margin:0;line-height:.82}.intro{max-width:720px;font-family:"Arial Narrow",sans-serif;line-height:1.5}.eyebrow{display:inline-block;padding:6px 9px;color:var(--paper);background:var(--accent);font:900 10px/1 ui-monospace,monospace;letter-spacing:.12em}.demo{border-radius:3px;box-shadow:10px 10px 0 var(--accent);position:relative;min-height:400px;overflow:hidden;padding:32px;background:var(--paper)}@media(max-width:700px){.mast{display:grid;grid-template-columns:1fr}.page{width:calc(100% - 16px);padding-top:16px}.demo{padding:14px}}
.panel{padding:26px;border:1px solid var(--line);border-radius:2px;background:var(--paper)}.stack{display:grid;gap:28px}.row{display:flex;gap:20px;flex-wrap:wrap}.action{padding:9px 2px;border:0;border-bottom:2px solid var(--line);background:transparent}.action.primary,.action.is-active{border-color:var(--accent);color:var(--accent)}.muted{font-size:14px;line-height:1.9}.status{min-height:20px;margin-top:28px;font-size:13px}.metric{font-size:clamp(40px,9vw,88px);font-weight:500;letter-spacing:-.06em}.meter{height:2px;background:var(--line)}.meter>i{display:block;height:100%;background:var(--accent)}.chip{font-size:11px;letter-spacing:.12em;text-transform:uppercase}
.composition-split{display:grid;grid-template-columns:150px minmax(0,1fr);gap:18px;align-items:start}.split-note{position:sticky;top:20px;display:grid;gap:14px;padding:18px 12px;border-block:3px double var(--accent);font-size:13px;line-height:1.65}.split-note b{font:900 12px/1 ui-monospace,monospace;letter-spacing:.12em}.split-note span{writing-mode:vertical-rl;min-height:120px;color:color-mix(in srgb,var(--ink) 60%,transparent)}.composition-split .demo{min-width:0}@media(max-width:900px){.composition-split{grid-template-columns:1fr}.split-note{position:static;grid-template-columns:auto 1fr}.split-note span{writing-mode:horizontal-tb;min-height:0}}
.seat-selection-studio{display:grid;grid-template-columns:1fr minmax(240px,.58fr);gap:18px}.seat-selection-studio>section{display:grid;gap:14px}.seat-selection-studio h2{margin:.3em 0}.seat-screen{padding:10px;border-radius:50% 50% 10px 10px;text-align:center;background:var(--ink);color:var(--paper)}.seat-map{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}.seat-map button{aspect-ratio:1;border:1px solid var(--line);border-radius:10px;background:var(--paper)}.seat-map button[aria-pressed="true"]{color:var(--paper);background:var(--accent)}.seat-map button:disabled{opacity:.3;background:var(--line)}.seat-legend{display:flex;gap:14px;justify-content:center}.seat-legend i{display:inline-block;width:12px;height:12px;margin-right:5px;border:1px solid var(--line);background:var(--paper)}.seat-legend span:nth-child(2) i{background:var(--accent)}.seat-legend span:nth-child(3) i{background:var(--line)}.seat-selection-studio aside{display:grid;align-content:center;gap:14px}.seat-selection-studio aside output{font-size:26px;font-weight:900}.seat-selection-studio aside ol{display:grid;gap:8px;padding-left:18px;margin:0}@media(max-width:700px){.seat-selection-studio{grid-template-columns:1fr}}.workflow-guide{display:grid;grid-template-columns:190px minmax(0,1fr);grid-template-areas:"rail core" "rail evidence";gap:14px 18px}.guide-rail{grid-area:rail;display:grid;align-content:start;gap:15px;padding:18px;border-right:1px solid var(--line)}.guide-rail ol{display:grid;gap:8px;padding:0;margin:0;list-style:none}.guide-rail li{display:grid;grid-template-columns:30px 1fr;gap:8px;align-items:center;padding:9px;opacity:.5}.guide-rail li[aria-current="step"]{opacity:1;color:var(--paper);background:var(--ink)}.guide-rail li.is-complete{opacity:1;color:var(--accent)}.guide-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.guide-actions .action{padding-inline:8px}#workflowGuideProgress{height:6px;background:var(--line)}#workflowGuideProgress i{display:block;width:0;height:100%;background:var(--accent)}.guide-core{grid-area:core;min-width:0;padding:16px;border:1px solid var(--line)}.guide-core>p{margin:0 0 14px;padding:10px;border-left:4px solid var(--accent);background:color-mix(in srgb,var(--secondary) 12%,transparent)}.guide-core[data-guide-step="1"]{border-radius:28px}.guide-core[data-guide-step="2"]{box-shadow:inset 0 0 0 4px color-mix(in srgb,var(--accent) 35%,transparent)}.guide-evidence{grid-area:evidence;display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:start}.guide-evidence details,.guide-evidence form{padding:12px;border:1px solid var(--line)}.guide-evidence label{display:grid;gap:7px}.guide-evidence textarea{width:100%;padding:9px;border:1px solid var(--line);background:var(--paper)}@media(max-width:900px){.workflow-guide{grid-template-columns:1fr;grid-template-areas:"core" "rail" "evidence"}.guide-rail{border-right:0;border-bottom:1px solid var(--line)}.guide-rail ol{grid-template-columns:repeat(3,1fr)}.guide-evidence{grid-template-columns:1fr}}.atlas-shell{--atlas-zoom:100;display:grid;gap:18px;padding:clamp(18px,4vw,30px);border:1px solid var(--line);border-radius:34px;background:linear-gradient(165deg,color-mix(in srgb,var(--secondary) 10%,transparent),color-mix(in srgb,var(--paper) 96%,transparent));box-shadow:var(--shadow)}.atlas-head{display:flex;justify-content:space-between;gap:20px;align-items:end}.atlas-head h2{margin:.18em 0}.atlas-controls{display:grid;gap:10px;justify-items:end}.atlas-modes{display:flex;flex-wrap:wrap;gap:8px;justify-content:end}.atlas-controls output{padding:10px 14px;border:1px solid var(--line);border-radius:999px;background:var(--paper);font-weight:900}.atlas-body{display:grid;grid-template-columns:minmax(240px,.56fr) minmax(0,1.44fr);gap:16px}.atlas-index{display:grid;align-content:start;gap:14px;padding:18px;border-radius:26px;color:var(--paper);background:linear-gradient(180deg,color-mix(in srgb,var(--ink) 88%,#071310),color-mix(in srgb,var(--ink) 72%,#21110f))}.atlas-index label{display:grid;gap:8px}.atlas-index input,.atlas-index select{width:100%;padding:10px;border:1px solid #ffffff2e;border-radius:10px;color:inherit;background:#ffffff12}.atlas-chapters{display:grid;gap:10px;margin:0;padding:0;list-style:none}.atlas-chapters button{display:grid;gap:6px;width:100%;padding:14px;border:1px solid #ffffff24;border-radius:18px;color:inherit;background:#ffffff0e;text-align:left}.atlas-chapters button[aria-pressed="true"]{border-color:var(--secondary);background:#ffffff18;box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--secondary) 28%,transparent)}.atlas-chapters span{font:800 11px/1 ui-monospace,monospace;letter-spacing:.16em}.atlas-chapters small{line-height:1.5;opacity:.76}.atlas-meta{display:grid;gap:10px;margin:0}.atlas-meta div{display:grid;gap:4px;padding:12px;border:1px solid #ffffff1f;border-radius:14px;background:#ffffff10}.atlas-meta dt{font:700 11px/1 ui-monospace,monospace;letter-spacing:.14em;text-transform:uppercase;opacity:.72}.atlas-meta dd{margin:0;font-weight:900}.atlas-stage{display:grid;gap:14px;min-width:0}.atlas-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.atlas-summary article{display:grid;gap:6px;padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--paper)}.atlas-summary article[data-active="true"]{background:color-mix(in srgb,var(--secondary) 14%,var(--paper));box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent)}.atlas-summary span{font:800 11px/1 ui-monospace,monospace;letter-spacing:.16em}.atlas-core-shell{min-width:0;padding:clamp(14px,3vw,22px);overflow:auto;border:1px solid var(--line);border-radius:26px;background:radial-gradient(circle at top right,color-mix(in srgb,var(--accent) 8%,transparent),transparent 35%),color-mix(in srgb,var(--paper) 94%,transparent)}.atlas-core-shell>*{display:block;width:calc(10000%/var(--atlas-zoom));max-width:none;transform:scale(calc(var(--atlas-zoom)/100));transform-origin:top left}.atlas-log{display:grid;gap:8px;margin:0;padding-left:18px}.atlas-log li{line-height:1.55}.atlas-shell[data-atlas-mode="trace"] .atlas-core-shell{outline:4px solid color-mix(in srgb,var(--accent) 24%,transparent);outline-offset:3px}.atlas-shell[data-atlas-mode="handoff"] .atlas-index{background:linear-gradient(180deg,color-mix(in srgb,var(--ink) 82%,#28120f),color-mix(in srgb,var(--ink) 68%,#11201d))}@media(max-width:960px){.atlas-body{grid-template-columns:1fr}.atlas-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.atlas-head{align-items:stretch;flex-direction:column}.atlas-controls{justify-items:start}.atlas-modes{justify-content:start}.atlas-summary{grid-template-columns:1fr}.atlas-core-shell>*{width:100%;transform:none}}
</style>
</head>
<body data-aesthetic="industrial" data-composition="split-note">
<main class="page">
<header class="mast"><div><span class="eyebrow">industrial / Seat Selector / BEGINNER</span><h1>Outpatient Service Line Seat Selector</h1><p class="intro">Complete the seat selector in a clinic service-flow scenario: includes realistic content, actionable controls, clear state feedback, and responsive layouts across sizes.</p></div><span class="scenario">Clinic Service Line</span></header>
<div class="composition-split"><aside class="split-note"><b>CASE 02</b><span>Master the semantic structure, responsive layout, keyboard operation, and state synchronization of the seat selector.</span></aside><section class="demo" aria-label="Clinic service line seat selector interactive area"><section id="atlasShell" class="atlas-shell" data-atlas-mode="brief"><header class="atlas-head"><div><span class="eyebrow">Outpatient service line / ATLAS DOSSIER</span><h2>Seat Selector Sample Atlas</h2><p>Rewrap the main case with a graph-style sample page, separating sample index, tracking view, handoff notes, and field records.</p></div><div class="atlas-controls"><div class="atlas-modes"><button class="action primary" type="button" data-atlas-mode="brief">Briefing</button><button class="action" type="button" data-atlas-mode="trace">Track</button><button class="action" type="button" data-atlas-mode="handoff">Handoff</button></div><output id="atlasState">Waiting to create sample</output></div></header><div class="atlas-body"><aside class="atlas-index"><ol class="atlas-chapters"><li><button type="button" data-atlas-card="0" aria-pressed="true"><span>01</span><strong>Inspiration for outpatient service flow</strong><small>Check whether the status change is visible</small></button></li><li><button type="button" data-atlas-card="1" aria-pressed="false"><span>02</span><strong>Outpatient Service Route Record</strong><small>Confirm keyboard and click entry points are consistent</small></button></li><li><button type="button" data-atlas-card="2" aria-pressed="false"><span>03</span><strong>Outpatient service line collaboration</strong><small>Check whether the layout falls back on narrow screens</small></button></li><li><button type="button" data-atlas-card="3" aria-pressed="false"><span>04</span><strong>Outpatient Service Line Progress</strong><small>Record current review conclusion</small></button></li></ol><label>Layout scale<input id="atlasZoom" type="range" min="82" max="132" value="100"><output id="atlasZoomValue">100%</output></label><label>Sampling focus<select id="atlasFocus"><option value="0">Inspiration for outpatient service flow</option><option value="1">Outpatient Service Route Record</option><option value="2">Outpatient service line collaboration</option><option value="3">Outpatient Service Line Progress</option></select></label><button id="atlasCapture" class="action primary" type="button">Featured sample</button><dl class="atlas-meta"><div><dt>Number of Entries</dt><dd id="atlasCount">0</dd></div><div><dt>Current focus</dt><dd id="atlasCurrent">Inspiration for outpatient service flow</dd></div><div><dt>Review Mode</dt><dd id="atlasModeLabel">Briefing</dd></div></dl></aside><section class="atlas-stage"><div class="atlas-summary"><article data-active="true"><span>Sample</span><strong>Inspiration for outpatient service flow</strong><p>Check whether the status change is visible</p></article><article><span>Trace</span><strong>Outpatient Service Route Record</strong><p>Confirm keyboard and click entry points are consistent</p></article><article><span>Signal</span><strong>Outpatient service line collaboration</strong><p>Check whether the layout falls back on narrow screens</p></article><article><span>Handoff</span><strong>Outpatient Service Line Progress</strong><p>Record current review conclusion</p></article></div><div id="atlasCoreShell" class="atlas-core-shell"><div class="workflow-guide"><nav class="guide-rail" aria-label="Outpatient service line guidance"><span class="eyebrow">Outpatient Service Line GUIDE</span><ol><li data-workflow-guide-step="0" aria-current="step"><b>1</b><span>Outpatient service line requirements confirmation</span></li><li data-workflow-guide-step="1"><b>2</b><span>Outpatient service line plan selection</span></li><li data-workflow-guide-step="2"><b>3</b><span>outpatient service line final submission</span></li></ol><div class="guide-actions"><button id="workflowGuideBack" class="action" type="button" disabled>Previous</button><button id="workflowGuideNext" class="action primary" type="button">Complete this step</button></div><div id="workflowGuideProgress" role="progressbar" aria-label="Clinic service line completion" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><i></i></div></nav><section id="workflowCore" class="workflow-core guide-core" data-guide-step="0" aria-describedby="workflowGuideInstruction"><p id="workflowGuideInstruction">Please complete the operations related to “outpatient service line requirement confirmation” in the main case.</p><!-- 11DZ_CORE_START:commerce-service-flows-seat-selection --><div class="seat-selection-studio"><section><span class="eyebrow">SEAT MAP</span><h2>Clinic service line seat-selection scheduling desk</h2><div class="seat-screen">Front / Service Desk</div><div id="seatMap" class="seat-map" role="grid" aria-label="Seating chart"><button type="button" role="gridcell" data-seat="1" aria-pressed="false" aria-label="Seat 1 available" data-core-bridge="commerce-service-flows-seat-selection">1</button><button type="button" role="gridcell" data-seat="2" aria-pressed="false" aria-label="Seat 2, optional">2</button><button type="button" role="gridcell" data-seat="3" aria-pressed="false" disabled aria-label="Seat 3, occupied">3</button><button type="button" role="gridcell" data-seat="4" aria-pressed="false" aria-label="Seat 4, optional">4</button><button type="button" role="gridcell" data-seat="5" aria-pressed="false" aria-label="Seat 5, optional">5</button><button type="button" role="gridcell" data-seat="6" aria-pressed="false" aria-label="Seat 6, optional">6</button><button type="button" role="gridcell" data-seat="7" aria-pressed="false" aria-label="Seat 7, optional">7</button><button type="button" role="gridcell" data-seat="8" aria-pressed="false" disabled aria-label="Seat 8, occupied">8</button><button type="button" role="gridcell" data-seat="9" aria-pressed="false" aria-label="Seat 9, optional">9</button><button type="button" role="gridcell" data-seat="10" aria-pressed="false" aria-label="Seat 10 available">10</button><button type="button" role="gridcell" data-seat="11" aria-pressed="false" aria-label="Seat 11, selectable">11</button><button type="button" role="gridcell" data-seat="12" aria-pressed="false" aria-label="Seat 12, optional">12</button><button type="button" role="gridcell" data-seat="13" aria-pressed="false" disabled aria-label="Seat 13, occupied">13</button><button type="button" role="gridcell" data-seat="14" aria-pressed="false" aria-label="Seats 14 optional">14</button><button type="button" role="gridcell" data-seat="15" aria-pressed="false" aria-label="Seat 15, optional">15</button><button type="button" role="gridcell" data-seat="16" aria-pressed="false" aria-label="Seat 16, optional">16</button><button type="button" role="gridcell" data-seat="17" aria-pressed="false" aria-label="Seat 17, available">17</button><button type="button" role="gridcell" data-seat="18" aria-pressed="false" disabled aria-label="Seat 18, occupied">18</button><button type="button" role="gridcell" data-seat="19" aria-pressed="false" aria-label="Seat 19, optional">19</button><button type="button" role="gridcell" data-seat="20" aria-pressed="false" aria-label="Seat 20, optional">20</button></div><div class="seat-legend"><span><i></i>Optional</span><span><i></i>Selected</span><span><i></i>Occupied</span></div></section><aside class="panel"><span>Selected Seat</span><strong id="seatCount" class="metric">0</strong><p id="seatNames">Not selected yet</p><output id="seatTotal">¥0</output><strong id="seatZone">Current section: idle</strong><ol id="seatChosenList"><li>No seat added yet</li></ol><button id="confirmSeats" class="action primary" type="button">Confirm seat</button></aside></div><!-- 11DZ_CORE_END --></section><aside class="guide-evidence"><details id="workflowGuideDetails"><summary>View acceptance requirements</summary><ul><li>The clinic service route requirement confirmation needs one visible state change</li><li>Clinic service line plan selection requires an immediately visible state change</li><li>Final submission of the outpatient service flow requires one visible state change</li></ul></details><form id="workflowGuideEvidenceForm"><label>This step evidence<textarea id="workflowGuideEvidence" rows="3" placeholder="Record the observed state"></textarea></label><input class="action" type="submit" value="Save evidence"></form><output id="workflowGuideSummary">0 / 3 Steps Complete</output></aside></div></div><ol id="atlasLog" class="atlas-log"><li>Waiting for the first graph sample</li></ol></section></div></section><p id="status" class="status" role="status" aria-live="polite"></p></section></div>
</main>
<script>
'use strict';
const statusOutput = document.querySelector('#status');
const announce = message => { statusOutput.textContent = message; };
/* 11DZ_CORE_SCRIPT_START:commerce-service-flows-seat-selection */
const seatButtons=[...document.querySelectorAll('.seat-map button:not(:disabled)')];function renderSeatStudio(){const selected=seatButtons.filter(button=>button.getAttribute('aria-pressed')==='true');document.querySelector('#seatCount').textContent=selected.length;document.querySelector('#seatNames').textContent=selected.length?'Seat '+selected.map(button=>button.dataset.seat).join('、'):'Not selected yet';document.querySelector('#seatTotal').textContent='¥'+selected.length*38;document.querySelector('#seatZone').textContent='Current section:'+(selected.length?selected.some(button=>Number(button.dataset.seat)>15)?'Back row':'Front-center':'Available');document.querySelector('#seatChosenList').replaceChildren(...(selected.length?selected.map(button=>{const item=document.createElement('li');item.textContent='Seat '+button.dataset.seat;return item;}):[Object.assign(document.createElement('li'),{textContent:'No seat added yet'})]));announce('Selected '+selected.length+' seats');}seatButtons.forEach(button=>button.addEventListener('click',()=>{button.setAttribute('aria-pressed',String(button.getAttribute('aria-pressed')!=='true'));renderSeatStudio();}));document.querySelector('#confirmSeats').addEventListener('click',()=>announce(seatButtons.some(button=>button.getAttribute('aria-pressed')==='true')?'Seat confirmed locally':'Please select a seat first'));renderSeatStudio();
/* 11DZ_CORE_SCRIPT_END */
const workflowBridgeSpec={"name":"commerce-service-flows-seat-selection","selector":"[data-core-bridge=\"commerce-service-flows-seat-selection\"]","mode":"click","key":"Enter"};const workflowBridgeCore=document.querySelector('#workflowCore');const workflowBridgeControl=workflowBridgeCore.querySelector(workflowBridgeSpec.selector);if(!workflowBridgeControl)throw new Error('Missing core bridge: '+workflowBridgeSpec.name);const workflowBridgeControlledId=workflowBridgeControl.getAttribute('aria-controls');const workflowBridgeControlled=workflowBridgeControlledId?document.getElementById(workflowBridgeControlledId):null;workflowBridgeCore.dataset.workflowBridge=workflowBridgeSpec.name;workflowBridgeCore.dataset.workflowVersion='0';function workflowBridgeSerialize(){const visualNode=workflowBridgeCore.firstElementChild||workflowBridgeCore;const visual=getComputedStyle(visualNode);const outputs=[...workflowBridgeCore.querySelectorAll('output,[role="status"],[aria-live],meter,progress')].map(node=>node.textContent.trim()+'|'+node.getAttribute('aria-valuenow')+'|'+node.getAttribute('value'));const canvas=[...workflowBridgeCore.querySelectorAll('canvas')].map(node=>{try{return node.toDataURL().slice(-160);}catch{return 'canvas-unavailable';}});return JSON.stringify({html:workflowBridgeCore.innerHTML,status:statusOutput.textContent,outputs,canvas,visual:[visual.display,visual.visibility,visual.opacity,visual.transform,visual.filter,visual.backgroundColor,visual.width,visual.height],scroll:workflowBridgeSpec.mode==='scroll'?workflowBridgeControl.scrollTop:null});}let workflowBridgeLastEffect=workflowBridgeSerialize();function workflowBridgeSummary(){const label=(workflowBridgeControl.getAttribute('aria-label')||workflowBridgeControl.textContent||workflowBridgeControl.value||workflowBridgeSpec.name).trim().replace(/\s+/g,' ').slice(0,72);return label+' · Core Version '+workflowBridgeCore.dataset.workflowVersion;}function workflowBridgeCommit(){const effect=workflowBridgeSerialize();if(effect===workflowBridgeLastEffect)return {changed:false,summary:workflowBridgeSummary()};workflowBridgeLastEffect=effect;workflowBridgeCore.dataset.workflowVersion=String(Number(workflowBridgeCore.dataset.workflowVersion||0)+1);return {changed:true,summary:workflowBridgeSummary()};}function workflowBridgeScheduleCommit(){queueMicrotask(workflowBridgeCommit);setTimeout(workflowBridgeCommit,0);}workflowBridgeControl.addEventListener("click",workflowBridgeScheduleCommit);const workflowBridgeStateTargets=new Set(workflowBridgeCore.querySelectorAll('dialog'));if(workflowBridgeControlled&&workflowBridgeCore.contains(workflowBridgeControlled))workflowBridgeStateTargets.add(workflowBridgeControlled);workflowBridgeStateTargets.forEach(target=>['close','cancel','toggle'].forEach(eventName=>target.addEventListener(eventName,workflowBridgeScheduleCommit)));function workflowBridgeActivate(){workflowBridgeControl.focus();workflowBridgeControl.click();const result=workflowBridgeCommit();setTimeout(workflowBridgeCommit,0);return result;}function workflowBridgeReset(){workflowBridgeCore.dataset.workflowVersion='0';workflowBridgeLastEffect=workflowBridgeSerialize();}
const workflowGuideCore=document.querySelector('#workflowCore');const workflowGuideStages=["Outpatient service line requirements confirmation","Outpatient service line plan selection","outpatient service line final submission"];const workflowGuideState={step:0,completed:new Set(),evidence:new Map(),consumedVersion:0};function workflowGuideDrive(){const step=workflowGuideState.step;workflowGuideCore.dataset.guideStep=String(step);document.querySelector('#workflowGuideInstruction').textContent='Please complete the main example ‘'+workflowGuideStages[step]+'Related actions.”';document.querySelectorAll('[data-workflow-guide-step]').forEach((item,index)=>{item.classList.toggle('is-complete',workflowGuideState.completed.has(index));if(index===step)item.setAttribute('aria-current','step');else item.removeAttribute('aria-current');});document.querySelector('#workflowGuideBack').disabled=step===0;document.querySelector('#workflowGuideNext').textContent=step===workflowGuideStages.length-1?'Confirmation Flow':'Complete this step';const percent=Math.round(workflowGuideState.completed.size/workflowGuideStages.length*100);const progress=document.querySelector('#workflowGuideProgress');progress.setAttribute('aria-valuenow',String(percent));progress.querySelector('i').style.width=percent+'%';document.querySelector('#workflowGuideSummary').textContent=workflowGuideState.completed.size+' / '+workflowGuideStages.length+' Step complete · '+workflowBridgeSummary();announce('Current step in the outpatient service flow:'+workflowGuideStages[step]);}function workflowGuideAdvance(direction){if(direction>0){const bridge=workflowBridgeActivate();const version=Number(workflowGuideCore.dataset.workflowVersion||0);if(version<=workflowGuideState.consumedVersion){announce('Please complete the visible state change in the main example first');return;}workflowGuideState.consumedVersion=version;workflowGuideState.completed.add(workflowGuideState.step);announce('Main case changes recorded · '+bridge.summary);}workflowGuideState.step=Math.max(0,Math.min(workflowGuideStages.length-1,workflowGuideState.step+direction));workflowGuideDrive();}document.querySelector('#workflowGuideBack').addEventListener('click',()=>workflowGuideAdvance(-1));document.querySelector('#workflowGuideNext').addEventListener('click',()=>workflowGuideAdvance(1));document.querySelector('#workflowGuideEvidenceForm').addEventListener('submit',event=>{event.preventDefault();const version=Number(workflowGuideCore.dataset.workflowVersion||0);if(version<=workflowGuideState.consumedVersion){announce('Evidence not saved: the main example has no new changes yet');return;}const text=document.querySelector('#workflowGuideEvidence').value.trim();workflowGuideState.evidence.set(workflowGuideState.step,text||'Visible status check completed');workflowGuideState.completed.add(workflowGuideState.step);workflowGuideState.consumedVersion=version;workflowGuideDrive();announce('Evidence for this step has been saved · '+workflowBridgeSummary());});document.querySelector('#workflowGuideDetails').addEventListener('toggle',event=>announce(event.currentTarget.open?'Acceptance requirements expanded':'Acceptance requirements collapsed'));workflowGuideDrive();
workflowBridgeReset();
const atlasShell=document.querySelector('#atlasShell');const atlasState=document.querySelector('#atlasState');const atlasZoom=document.querySelector('#atlasZoom');const atlasZoomValue=document.querySelector('#atlasZoomValue');const atlasFocus=document.querySelector('#atlasFocus');const atlasCurrent=document.querySelector('#atlasCurrent');const atlasCount=document.querySelector('#atlasCount');const atlasModeLabel=document.querySelector('#atlasModeLabel');const atlasCards=[...document.querySelectorAll('[data-atlas-card]')];const atlasSummary=[...document.querySelectorAll('.atlas-summary article')];const atlasLog=document.querySelector('#atlasLog');const atlasModeButtons=[...atlasShell.querySelectorAll('[data-atlas-mode]')];const atlasNotes=["Inspiration for outpatient service flow","Outpatient Service Route Record","Outpatient service line collaboration","Outpatient Service Line Progress"];const atlasCore=document.querySelector('#workflowCore');let atlasCaptures=0;function atlasSetActive(index){atlasCards.forEach((button,buttonIndex)=>button.setAttribute('aria-pressed',String(buttonIndex===index)));atlasSummary.forEach((card,cardIndex)=>{if(cardIndex===index)card.setAttribute('data-active','true');else card.removeAttribute('data-active');});atlasCurrent.textContent=atlasNotes[index]||atlasNotes[0]||'Unnamed Focus';}function atlasRender(reason){const version=atlasCore?.dataset.workflowVersion||'0';const zoom=Number(atlasZoom.value);const active=Math.min(atlasNotes.length-1,Number(atlasFocus.value)||0);atlasShell.style.setProperty('--atlas-zoom',String(zoom));atlasZoomValue.textContent=zoom+'%';atlasCount.textContent=String(atlasCaptures);atlasSetActive(active);atlasModeLabel.textContent={brief:'Briefing',trace:'Track',handoff:'Handoff'}[atlasShell.dataset.atlasMode]||'Briefing';atlasState.textContent=reason+' · Core Version '+version;}atlasModeButtons.forEach(button=>button.addEventListener('click',()=>{atlasModeButtons.forEach(item=>item.classList.toggle('primary',item===button));atlasShell.dataset.atlasMode=button.dataset.atlasMode;atlasRender('Switched to'+button.textContent);announce('Chart Mode:'+button.textContent);}));atlasCards.forEach((button,index)=>button.addEventListener('click',()=>{atlasFocus.value=String(index);atlasRender('Sample focus switched');announce('Chart focus:'+atlasNotes[index]);}));atlasZoom.addEventListener('input',()=>{atlasRender('Layout scale updated');announce('Graph Magnification '+atlasZoom.value+'%');});atlasFocus.addEventListener('change',()=>{atlasRender('Sampling Focus Switched');announce('Sampling Focus:'+atlasNotes[Number(atlasFocus.value)||0]);});document.querySelector('#atlasCapture').addEventListener('click',()=>{const index=Math.min(atlasNotes.length-1,Number(atlasFocus.value)||0);const note=atlasNotes[index]||atlasNotes[0]||'Unnamed Focus';const version=atlasCore?.dataset.workflowVersion||'0';atlasCaptures+=1;const item=document.createElement('li');item.textContent='Sample '+atlasCaptures+' · '+note+' · Core Version '+version;const empty=atlasLog.querySelector('li')?.textContent==='Waiting for the first graph sample';if(empty)atlasLog.replaceChildren(item);else atlasLog.prepend(item);while(atlasLog.children.length>6)atlasLog.lastElementChild.remove();atlasRender('Included in sample '+atlasCaptures);announce('Included in sample '+atlasCaptures+' · '+note);});atlasCore?.addEventListener('focusin',()=>atlasRender('Main Case Gets Focus'));atlasCore?.addEventListener('click',()=>atlasRender('Primary example interaction'));atlasRender('Waiting to create sample');
</script>
</body>
</html>