/* Diagram windows. 1-bit: white boxes, black outlines, hard shadows, crawling live lines. */
.file-window.guide{background:#fff}
@media(min-width:641px){.file-window.guide{width:min(820px,94%);height:min(540px,96%)}}
.guide-body{flex:1;overflow:auto;overscroll-behavior:contain;padding:12px 20px 14px;background:#fff}
.diagram{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"head head" "stage stage" "text controls" "action controls";gap:8px 18px;align-items:start}
.diagram-head{grid-area:head}.diagram-stage{grid-area:stage}.diagram-caption{grid-area:text}.diagram-controls{grid-area:controls}
.diagram-action{grid-area:action;justify-self:start}
.diagram-head h3{margin:3px 0 0;font-size:20px;line-height:1.15;letter-spacing:-.4px}
.diagram-stage{margin:0;border:1px solid #000;background:#fff radial-gradient(#b4b4b4 .8px,transparent 1.1px) 0 0/12px 12px;padding:6px}
.diagram-stage svg{display:block;width:100%;height:auto;max-height:50svh}
.diagram-caption{min-height:4.6em}
.diagram-count{display:block;font-size:10px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase}
.diagram-caption strong{display:block;font-size:15px;margin-top:3px}
.diagram-caption p{margin:3px 0 0;font-size:14px;line-height:1.45;max-width:62ch}
.diagram-controls{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.step-keys,.guide-keys{display:flex;gap:6px;flex-wrap:wrap}
.step-key,.guide-key{min-width:30px;height:30px;padding:0 9px;border:1px solid #000;border-radius:6px;background:#fff;color:#000;font:700 12px Vera,Verdana,sans-serif;cursor:pointer}
.step-key{border-radius:0}
.step-key{border-style:dotted}.step-key.seen{border-style:solid}
.step-key[aria-current=step],.step-key:active,.guide-key:active{background:#000;color:#fff}
.step-key:focus-visible,.guide-key:focus-visible{outline:1px dotted #000;outline-offset:2px}
.preview-actions{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center}
/* the drawing */
.dg text{font-family:Vera,Verdana,sans-serif}
.dg-zone rect{fill:#fff;stroke:#000;stroke-dasharray:2 2}
.dg-zone text{font-size:10px;font-weight:700;letter-spacing:1.2px;fill:#000}
.dg-node{visibility:hidden}
.dg-node.shown{visibility:visible}
.dg-shadow{fill:#000}
.dg-box{fill:#fff;stroke:#000;stroke-width:1}
.dg-icon *{fill:#fff;stroke:#000;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.dg-icon .ink{fill:#000;stroke:#000}
.dg-label{font-size:11px;font-weight:700;fill:#000}
.dg-node.current .dg-box{fill:#000}
.dg-node.current .dg-icon *{stroke:#fff;fill:#000}
.dg-node.current .dg-icon .ink{fill:#fff;stroke:#fff}
.dg-node.current .dg-label{fill:#fff}
.dg-edge{fill:none;stroke:#000;stroke-width:1.5;visibility:hidden}
.dg-edge.shown{visibility:visible}
.dg-edge.live{stroke-dasharray:4 3;animation:dg-march .7s steps(7,end) infinite}
.dg-head{fill:#000}
.dg-packet{fill:#000;stroke:#fff;stroke-width:1}
.dg-enter{animation:dg-pop .27s steps(3,end) both;transform-box:fill-box;transform-origin:center}
@keyframes dg-march{to{stroke-dashoffset:-7}}
@keyframes dg-pop{from{transform:scale(.4)}to{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.dg-edge.live{animation:none}.dg-enter{animation:none}}
@media(max-width:640px){
  .guide-body{padding:10px 12px 16px}
  .diagram{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "text" "stage" "controls" "action";gap:8px}
  .diagram-head h3{display:none}
  .diagram-caption{min-height:6.2em}
  .diagram-stage svg{max-height:none}
  .diagram-controls{align-items:stretch}
  .step-keys{justify-content:space-between}
  .step-key{min-width:44px;height:44px;font-size:14px}
  .guide-keys .guide-key{flex:1;height:44px;font-size:14px}
}
