@font-face{font-family:'Source Sans 3';src:url('../fonts/source-sans-3.woff2') format('woff2');font-weight:200 900;font-display:swap}
*{box-sizing:border-box}
body{margin:0;background:#0b1424;color:#f3f6fc;font:16px/1.45 'Source Sans 3',sans-serif}
button,select,input{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button,a,select{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #62b5ff;outline-offset:4px}
.skip-link{position:absolute;left:14px;top:-100px;background:white;color:#14213a;padding:8px;z-index:100}.skip-link:focus{top:10px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}[hidden]{display:none!important}
.demo-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 3vw;border-bottom:1px solid #31425c}
.demo-brand{font-size:22px;font-weight:750;letter-spacing:-.03em}.demo-brand span{font-size:11px;letter-spacing:.13em;font-weight:600;margin-left:22px;color:#bac9e0}
.demo-header nav{display:flex;flex-wrap:wrap;align-items:center;gap:24px;font-size:14px;color:#d0dbee}main{max-width:1720px;margin:auto;padding:20px 3vw}
.demo-intro{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:18px}.eyebrow{font-size:11px;font-weight:700;letter-spacing:.12em;color:#b6c9e7;margin:0}
.demo-intro h1{font-size:clamp(28px,3.1vw,44px);line-height:1.08;letter-spacing:-.035em;margin:7px 0 0;font-weight:650}.demo-intro>p{font-size:16px;color:#c6d5eb;margin:0}
.scenario-tabs{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #3d506f;border-radius:8px 8px 0 0;overflow:hidden}
.scenario-tabs button{border:0;border-right:1px solid #3d506f;background:#17243a;color:#aabddc;padding:12px 16px;display:flex;gap:12px;align-items:center;text-align:left;font-size:12px;font-weight:650}
.scenario-tabs button:last-child{border:0}.scenario-tabs button span{color:#d5e1f5;font-size:15px}.scenario-tabs button[aria-pressed=true]{background:#edf3ff;color:#294b7a}.scenario-tabs button[aria-pressed=true] span{color:#102444}
.reading-key{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;padding:12px 16px;border:1px solid #3d506f;border-top:0;background:#101d32}
.role-legend{display:flex;gap:18px;flex-wrap:wrap}.role-legend>span{display:flex;align-items:center;gap:7px;font-size:13px;color:#edf3ff;white-space:nowrap}.role-legend b,.node-role{display:inline-flex;align-items:center;justify-content:center;background:var(--role-color);color:#091427;font-weight:800;border-radius:3px;min-width:26px;padding:2px 4px;font-size:11px;line-height:1.4}
.reading-key p{font-size:12px;color:#bfcde1;margin:0}.reading-key strong{color:white;font-weight:650}
.demo-workspace{display:grid;grid-template-columns:minmax(0,1fr) 340px;border:1px solid #3d506f;border-top:0;height:max(340px,calc(100svh - 400px))}
.scene-panel{min-width:0;min-height:0;display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% 55%,#263853 0,#16253d 65%,#101c31 100%)}
.scene-view{position:relative;min-height:0;flex:1;overflow:hidden}.scene-view canvas{width:100%;height:100%;display:block;touch-action:none}
.scene-labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.label-leader{position:absolute;height:1px;background:var(--role-color);transform-origin:left center;opacity:.8;pointer-events:none}.scene-label{display:flex;align-items:center;gap:6px;color:#f5f8ff;font-size:14px;font-weight:650;line-height:1.15;background:#091427;padding:5px 7px 5px 5px;border:1px solid var(--role-color);border-radius:5px;white-space:nowrap;transform:translate(-50%,-50%);position:absolute;pointer-events:none;box-shadow:0 2px 8px #0008}
.scene-label[data-active=true]{outline:2px solid white;outline-offset:2px;z-index:3}.scene-label[data-inspected=true]{outline:2px dashed white;outline-offset:3px;z-index:4}.node-step:empty{display:none}.node-step{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;border-radius:50%;background:white;color:#0b1424;font-size:14px;font-weight:800;margin-left:2px}.scene-label[data-alert=true]{outline-color:#ff746d}.scene-label[data-alert=true] .node-step{background:#ff746d;color:#180a0b}
[data-overview=true] .scene-label{font-size:12px;gap:4px;padding:4px}.scene-corner{position:absolute;top:16px;left:18px;display:flex;align-items:center;gap:7px;color:#d6e4f8;font-size:10px;font-weight:650;letter-spacing:.10em;pointer-events:none}.status-dot{width:6px;height:6px;border-radius:50%;background:white}
.scene-legend{position:absolute;bottom:14px;left:18px;display:flex;gap:18px;font-size:12px;color:#e1e9f8;pointer-events:none}.scene-legend span{display:flex;gap:7px;align-items:center}.scene-legend i{display:inline-block;width:22px;height:2px;background:#8090a6}.scene-legend .legend-active{height:3px;background:white}.scene-legend .legend-denied{height:3px;background:#ff746d}.context-key{display:none!important}[data-overview=true] .context-key{display:flex!important}
.scene-loading{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;flex-direction:column;background:#14223a;gap:14px;color:#c2d3ee;font-size:14px}.scene-loading strong{font-size:21px;color:white;font-weight:600}.load-orbit{height:46px;width:46px;border:1px solid #6a84ac;border-top-color:white;border-radius:50%;animation:load-spin 1.5s linear infinite}@keyframes load-spin{to{transform:rotate(360deg)}}
.scene-fallback{position:absolute;inset:0;background:#14223a}.scene-fallback img{width:100%;height:80%;object-fit:contain}.scene-fallback p{padding:0 20px;font-size:14px}
.view-controls{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:9px 14px;border-top:1px solid #3d506f;color:#c3d2eb;flex-shrink:0}.view-controls p{font-size:12px;margin:0}.view-controls>div{display:flex;gap:7px}.view-controls button{color:#e4edfc;border:1px solid #657b9f;border-radius:4px;padding:6px 9px;background:#152944;font-size:12px}.view-controls button[aria-pressed=true]{background:#e1edff;color:#132944;border-color:white}
.story-panel{padding:22px 24px;background:#f2f5fa;color:#18253b;border-left:1px solid #3d506f;display:flex;flex-direction:column;min-height:0;overflow:auto;scrollbar-width:thin}.story-panel>*{flex-shrink:0}.story-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.story-top .eyebrow{font-size:11px;letter-spacing:.07em;color:#425574}.state-badge{font-size:10px;font-weight:800;letter-spacing:.07em;background:#dbe8f8;color:#173963;border:1px solid #9ab3d5;padding:4px 6px;border-radius:3px;white-space:nowrap}.state-badge[data-state=denied],.state-badge[data-state=failed]{background:#a82b27;color:white;border-color:#a82b27}.state-badge[data-state=hold],.state-badge[data-state=review]{background:#fff0c6;color:#694606;border-color:#b68a26}
.step-number{font-size:34px;letter-spacing:-.03em;line-height:1;margin:22px 0 12px;color:#263b5b;font-weight:550}.step-number span{font-size:15px;letter-spacing:0;color:#526581}.story-panel h2{font-size:28px;letter-spacing:-.025em;line-height:1.10;margin:0 0 14px;font-weight:700}
.flow-summary{background:#182b48;color:white;border-radius:4px;padding:10px 12px;font-size:14px;font-weight:650;line-height:1.4;margin:0 0 14px}.step-body{font-size:17px;color:#34465f;line-height:1.5;margin:0 0 20px}
.artifact{border-left:3px solid #315f9f;padding:3px 0 3px 12px;margin-bottom:24px}.artifact span{display:block;color:#4e607a;font-size:10px;font-weight:750;letter-spacing:.07em;margin-bottom:6px}.artifact strong{color:#172e4c;font-weight:650;font-size:15px}
.component-inspector{border-top:1px solid #c5d0df;padding-top:14px;margin-top:auto}.component-inspector label{font-size:13px;color:#374e6d}.component-inspector select{display:block;width:100%;margin:6px 0 8px;background:white;color:#1b3558;border:1px solid #8298b8;border-radius:4px;padding:8px;font-size:14px}.component-inspector p{font-size:13px;color:#405575;margin:0 0 8px}.component-inspector a{font-size:13px;color:#245591;text-decoration:underline;text-underline-offset:3px}
.playback{display:flex;gap:16px;align-items:center;border:1px solid #3d506f;border-top:0;padding:13px 16px;border-radius:0 0 8px 8px;background:#13243c}.playback-buttons{display:flex;gap:6px}.playback button{font-size:14px;padding:9px 12px;color:#edf3ff;background:#203956;border:1px solid #6b83a3;border-radius:5px;white-space:nowrap}.playback [data-play]{min-width:130px;background:#f5f8ff;color:#142944;border-color:white;font-weight:750}.playback button:disabled{opacity:.45;cursor:default}.scrubber{flex:1;min-width:0}.scrubber label{display:flex;justify-content:space-between;color:#d1def3;font-size:12px;margin-bottom:7px}.scrubber input{display:block;width:100%;accent-color:#89beff;height:8px;cursor:pointer}.pace-control{display:flex;align-items:center;gap:6px;font-size:12px;color:#d1def3}.pace-control select{background:#203956;color:white;border:1px solid #6b83a3;border-radius:4px;padding:6px;font-size:13px}
.demo-foot{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-top:16px}.demo-foot p{font-size:12px;line-height:1.55;color:#b4c5e0;margin:0}.demo-foot>div{display:flex;gap:17px;align-items:center;font-size:13px;color:#e4ecfb}.demo-foot button{font:inherit;border:1px solid #718baa;background:transparent;color:#edf3ff;border-radius:4px;padding:8px 11px}
.film-dialog{width:min(1120px,94vw);padding:18px;border:1px solid #93aaca;background:#152641;color:white;border-radius:8px}.film-dialog::backdrop{background:#030c1bdd}.film-dialog>div{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.film-dialog button{background:#eaf1fc;color:#142944;border:0;padding:7px 12px;border-radius:4px}.film-dialog video{width:100%;display:block}.film-dialog p{font-size:13px;color:#c2d3ed}.no-script{padding:20px;background:#233c5f}.film-edition{display:none}
@media(max-width:1180px){.reading-key{gap:8px}.reading-key p{flex-basis:100%}.demo-workspace{grid-template-columns:minmax(0,1fr) 310px}.story-panel{padding:20px}.view-controls{flex-wrap:wrap}.view-controls p{display:none}.scene-label{font-size:13px}}
@media(min-width:761px) and (max-height:850px){.demo-header{padding:10px 3vw}.demo-intro h1{font-size:32px}.demo-intro{margin-bottom:12px}.demo-intro>p{font-size:14px}main{padding-top:14px}.reading-key{padding:8px 14px}.demo-workspace{height:max(300px,calc(100svh - 335px))}.story-panel{padding:16px 20px}.step-number{font-size:27px;margin:16px 0 10px}.story-panel h2{font-size:25px}.step-body{font-size:16px}}
@media(max-width:760px){main{padding:20px 14px}.demo-header{padding:14px}.demo-brand span{display:none}.demo-header nav{gap:10px;font-size:12px}.demo-intro{margin-bottom:18px}.demo-intro>p{display:none}.demo-intro h1{font-size:33px}.scenario-tabs{grid-template-columns:1fr 1fr}.scenario-tabs button{padding:12px;gap:9px;border-bottom:1px solid #3d506f}.scenario-tabs button span{font-size:14px}.reading-key{padding:12px}.role-legend{display:grid;grid-template-columns:1fr 1fr;gap:9px 14px}.role-legend>span{font-size:12px}.reading-key p{font-size:12px}.demo-workspace{display:block;height:auto}.scene-view{height:390px;flex:none}.scene-label{font-size:12px;gap:4px}.node-role{font-size:9px;min-width:22px}.node-step{font-size:12px;min-width:19px;height:19px}[data-overview=true] .scene-label{font-size:10px}.story-panel{border-left:0;border-top:1px solid #3d506f;padding:22px}.story-top{justify-content:start;gap:16px}.step-number{font-size:30px;margin:20px 0 10px}.story-panel h2{font-size:28px}.step-body{font-size:18px}.flow-summary{font-size:15px}.artifact strong{font-size:16px}.component-inspector p{font-size:14px}.view-controls{justify-content:center}.view-controls button{padding:7px 10px}.playback{flex-wrap:wrap;gap:12px;padding:14px}.scrubber{order:4;flex-basis:100%}.pace-control{order:3}.playback>[data-replay]{margin-left:auto}.demo-foot{align-items:start;flex-direction:column;gap:16px}.demo-foot>div{flex-wrap:wrap}.scene-legend{gap:12px;font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* Deterministic 16:9 film: steady camera, larger labels and no transition lag. */
body.capture .demo-header,body.capture .scenario-tabs,body.capture .view-controls,body.capture .component-inspector,body.capture .playback,body.capture .demo-foot{display:none}
body.capture main{padding:26px 30px}body.capture .demo-intro{margin-bottom:20px}body.capture .demo-intro h1{font-size:48px}body.capture .demo-intro>p{font-size:21px}body.capture .eyebrow{font-size:14px}
body.capture .reading-key{border:1px solid #3d506f;border-radius:8px 8px 0 0;padding:16px 22px}body.capture .role-legend{gap:26px}body.capture .role-legend>span{font-size:18px}body.capture .role-legend b{font-size:14px;min-width:32px}body.capture .reading-key p{font-size:16px;flex-basis:auto}
body.capture .demo-workspace{height:calc(100svh - 234px);grid-template-columns:minmax(0,1fr) 460px;border-radius:0 0 8px 8px;overflow:hidden}body.capture .scene-view{height:100%;min-height:0}body.capture .story-panel{padding:32px;overflow:hidden}body.capture .story-panel h2{font-size:42px;line-height:1.13;margin-bottom:22px}body.capture .step-body{font-size:26px;line-height:1.5}body.capture .flow-summary{font-size:22px;padding:16px;margin-bottom:24px}body.capture .artifact{margin-top:auto;margin-bottom:12px}body.capture .artifact strong{font-size:23px}body.capture .artifact span{font-size:14px}body.capture .step-number{font-size:58px;margin:32px 0 24px}body.capture .step-number span{font-size:22px}body.capture .story-top .eyebrow,body.capture .state-badge{font-size:14px}
body.capture .scene-label{font-size:20px;padding:7px 9px 7px 7px;gap:9px}body.capture .node-role{font-size:14px;min-width:32px}body.capture .node-step{font-size:18px;min-width:29px;height:29px}body.capture .scene-corner{font-size:12px;top:22px;left:22px}body.capture .scene-legend{font-size:16px;bottom:20px;left:22px}
body.capture .film-edition{position:absolute;display:flex;justify-content:space-between;left:30px;right:30px;bottom:12px;color:#c1d0e6;font-size:12px;letter-spacing:.03em}

.component-inspector [data-component-definition]{display:block;margin-top:8px}
@media(max-width:400px){.demo-header{gap:12px}.demo-brand{font-size:20px}.demo-header nav{gap:8px}}

/* Both transports share the audio clock; retain room for the readable timeline. */
[data-clock="audio"] .playback{flex-wrap:wrap}
[data-clock="audio"] .scrubber{min-width:220px}

@media(max-width:760px){
 .playback-buttons,.view-controls>div{flex-wrap:wrap;max-width:100%}
 .view-controls>div{justify-content:center}
 .role-legend{width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
 .role-legend>span{min-width:0;white-space:normal}
 .role-legend b{flex-shrink:0}
}
@media(max-width:400px){.demo-header{flex-wrap:wrap}}
