.am-page{display:grid;gap:20px;color:var(--ws-text);min-width:0}.am-head h1{font-size:26px;font-weight:700;letter-spacing:-.025em}.am-head p{max-width:1020px;margin-top:8px;color:var(--ws-muted);font-size:14px;line-height:1.6}.am-summary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:15px 18px;border:1px solid var(--ws-border);border-radius:12px;background:var(--ws-card)}.am-summary>div{display:flex;gap:7px;flex-wrap:wrap}.am-status{display:inline-flex;align-items:center;align-self:flex-start;border-radius:6px;padding:4px 7px;font-size:11px;font-weight:600;line-height:1.4;white-space:normal;background:var(--ws-soft);color:var(--ws-muted)}.am-status.done{color:var(--ws-green);background:var(--ws-green-bg)}.am-status.working{color:var(--ws-text);background:var(--ws-accent-soft)}.am-status.blocked{color:var(--ws-red);background:var(--ws-red-bg)}.am-status.todo{color:var(--ws-yellow);background:var(--ws-yellow-bg)}
.am-stage-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.am-page .am-stage-nav button{display:flex;align-items:center;gap:9px;text-align:left;padding:12px 10px;min-width:0;background:var(--ws-bg);border:0}.am-stage-nav button>span:first-child{flex:none;display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--ws-border);border-radius:50%;font-size:11px;color:var(--ws-muted)}.am-stage-nav strong{font-size:11px;line-height:1.5;font-weight:600}.am-stage-nav .am-step-arrow{margin-left:auto;color:var(--ws-muted)}.am-diagram{border:1px solid var(--ws-border);border-radius:14px;overflow:hidden;min-width:0;background:var(--ws-bg)}.am-diagram-tools{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding:13px 16px;border-bottom:1px solid var(--ws-border)}.am-diagram-tools>p{font-size:12px;color:var(--ws-muted);line-height:1.5}.am-zoom{display:flex;align-items:center;gap:5px}.am-zoom output{min-width:45px;text-align:center;font-size:11px;font-variant-numeric:tabular-nums}.am-page .am-zoom button{padding:6px 10px;font-size:13px}.am-canvas-viewport{width:100%;max-height:76vh;min-height:320px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background-color:var(--ws-bg);background-image:radial-gradient(var(--ws-grid) .8px,transparent .8px);background-size:18px 18px}.am-canvas-size{position:relative}.am-canvas{position:absolute;left:0;top:0;transform-origin:0 0}.am-stage-column{position:absolute;top:16px;height:980px;border:1px solid var(--ws-border);border-radius:14px;background:var(--ws-bg);opacity:.94}.am-stage-column>header{padding:17px 15px}.am-stage-number{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.05em;color:var(--ws-muted);margin-bottom:8px}.am-stage-column h2{font-size:15px;font-weight:650;line-height:1.45;min-height:43px}.am-stage-column header p{font-size:11px;color:var(--ws-muted);margin-top:7px}.am-connections{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;z-index:1}.am-edge{fill:none;stroke:var(--ws-muted);stroke-width:1.4;opacity:.35;stroke-linecap:round;stroke-linejoin:round}.am-edge.active{stroke:var(--ws-primary-border);stroke-width:2.4;opacity:1}.am-edge.feedback{stroke-dasharray:6 5}.am-marker{fill:var(--ws-muted)}.am-marker-active{fill:var(--ws-primary-border)}.am-node{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:7px;text-align:left;border:1px solid var(--ws-border);border-radius:10px;background:var(--ws-card);color:var(--ws-text);cursor:pointer}.am-flow-node{position:absolute;z-index:2;padding:12px 13px;box-shadow:0 2px 5px #00000004;transition:border-color .15s,box-shadow .15s}.am-flow-node>strong{font-size:16px;line-height:1.35;font-weight:600;overflow-wrap:anywhere}.am-node-top{display:flex;align-items:center;gap:7px;width:100%;min-height:12px}.am-node-dot{display:block;width:6px;height:6px;border-radius:50%;background:var(--ws-muted);opacity:.6}.am-node.working .am-node-dot{background:var(--ws-primary-border);opacity:1}.am-node.done{border-color:var(--ws-green-border)}.am-node.done .am-node-dot{background:var(--ws-green);opacity:1}.am-node.blocked .am-node-dot{background:var(--ws-red);opacity:1}.am-node.todo .am-node-dot{background:var(--ws-yellow);opacity:1}.am-source{font-size:10px;font-weight:650;line-height:1.2;color:var(--ws-muted);margin-left:auto}.am-node-top small{font-size:9px;color:var(--ws-yellow);margin-left:auto}.am-node:hover{border-color:var(--ws-primary-border);box-shadow:0 3px 12px #0000000b}.am-node.active{border-color:var(--ws-primary-border);background:var(--ws-accent-soft);box-shadow:0 0 0 1px var(--ws-primary-border)}.am-node .am-status{font-size:10px;padding:3px 6px}.am-feedback-label{position:absolute;left:460px;top:1015px;z-index:2;margin:0;font-size:11px;color:var(--ws-muted);background:var(--ws-bg);padding:0 10px}.am-diagram-caption{font-size:11px;line-height:1.6;color:var(--ws-muted);padding:10px 16px;border-top:1px solid var(--ws-border)}.am-node:focus-visible,.am-page button:focus-visible,.am-canvas-viewport:focus-visible{outline:2px solid var(--ws-primary-border);outline-offset:3px}
.am-dialog{position:fixed;inset:16px 16px 16px auto;margin:0;width:min(480px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 32px);height:auto;overflow:auto;border:1px solid var(--ws-border);border-radius:14px;background:var(--ws-card);padding:22px;color:var(--ws-text);box-shadow:0 12px 80px #0000002b}.am-dialog::backdrop{background:#0b101b66}.am-editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.am-editor-toolbar>span{font-size:12px;font-weight:600;color:var(--ws-muted)}.am-editor h2{font-size:20px;font-weight:650;line-height:1.4}.am-purpose{font-size:14px;line-height:1.65;margin:10px 0 18px}.am-editor dl{font-size:13px;line-height:1.65;margin-bottom:18px}.am-editor dt{font-weight:650;margin-top:12px}.am-editor dd{margin:4px 0 0;color:var(--ws-muted)}.am-reference,.am-foot{font-size:12px;line-height:1.65;color:var(--ws-muted);margin:14px 0}.am-editor form{display:grid;gap:9px;margin-top:20px}.am-editor label{font-size:13px;font-weight:600}.am-editor select,.am-editor textarea{width:100%;border:1px solid var(--ws-border);border-radius:8px;background:var(--ws-bg);color:var(--ws-text);font:inherit;font-size:13px;padding:10px;min-width:0}.am-editor textarea{resize:vertical;white-space:pre-wrap}.am-actions{display:flex;gap:8px;flex-wrap:wrap}.am-page button:not(.am-node){padding:9px 12px;border-radius:8px;border:1px solid var(--ws-border);background:var(--ws-card);color:var(--ws-text);font-size:12px;cursor:pointer}.am-page button.am-primary{background:var(--ws-primary);color:var(--ws-primary-text);border-color:var(--ws-primary-border);font-weight:650}.am-page button:disabled{opacity:.55;cursor:default}.am-error{color:var(--ws-red);font-size:13px;overflow-wrap:anywhere}.am-notice{color:var(--ws-green);font-size:13px}.am-history{font-size:12px;margin-top:18px;border-top:1px solid var(--ws-border);padding-top:14px}.am-history summary{cursor:pointer;font-weight:650}.am-history ol{padding-left:18px}.am-history li{margin-top:12px;overflow-wrap:anywhere}.am-history p{white-space:pre-wrap;margin-top:4px;line-height:1.6}.am-foot{margin-top:0}.am-page textarea[readonly]{opacity:.8}
@media(max-width:900px){.am-stage-nav{display:flex;overflow:auto;padding-bottom:4px}.am-page .am-stage-nav button{flex:0 0 175px}.am-stage-nav strong{font-size:11px}.am-canvas-viewport{max-height:68vh}.am-diagram-tools>p{flex-basis:100%}}@media(max-width:550px){.am-head h1{font-size:23px}.am-head p{font-size:13px}.am-summary{padding:13px}.am-dialog{inset:8px 8px 8px auto;width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:17px}.am-stage-nav{gap:4px}.am-diagram-tools{padding:12px}.am-diagram-caption{padding:10px 12px}}

.am-dialog{width:min(600px,calc(100vw - 24px))}
.am-node-top small{color:var(--ws-muted);white-space:nowrap}
.am-findings{display:grid;grid-template-columns:1fr;gap:3px}
.am-findings dt:first-child{color:var(--ws-green)}
.am-findings dt:nth-of-type(2){color:var(--ws-yellow)}
.am-findings dd{color:var(--ws-text)}
.am-sources{display:flex;flex-wrap:wrap;gap:7px;list-style:none;padding:0;margin:0}
.am-sources a{display:inline-block;padding:4px 8px;border:1px solid var(--ws-border);border-radius:6px;color:var(--ws-text);font-size:12px;text-decoration:underline;text-underline-offset:2px}
.am-checklist{min-width:0;border:1px solid var(--ws-border);border-radius:10px;padding:5px 12px 6px;margin:0}
.am-checklist legend{padding:0 5px;font-size:14px;font-weight:650}
.am-check-step{display:flex;gap:10px;align-items:flex-start;padding:10px 0;cursor:pointer}
.am-check-step+.am-check-step{border-top:1px solid var(--ws-border)}
.am-check-step input{flex:none;inline-size:17px;block-size:17px;margin:2px 0 0;accent-color:var(--ws-green)}
.am-check-step input:disabled{cursor:default}
.am-check-step strong,.am-check-step small{display:block}
.am-check-step small{font-size:12px;font-weight:400;color:var(--ws-muted);margin-top:3px;line-height:1.55}
.am-acceptance{font-size:13px;line-height:1.6;padding:10px 12px;margin:4px 0 12px;border-radius:8px;background:var(--ws-soft)}
@media(max-width:650px){.am-dialog{width:calc(100vw - 16px)}}

.am-run-guide{padding:11px 16px;border:1px solid var(--ws-border);border-radius:10px;background:var(--ws-card)}
.am-run-guide summary{cursor:pointer;font-size:13px;font-weight:650}
.am-run-guide[open] summary{margin-bottom:8px}
.am-run-guide ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px 25px;margin:0;padding-left:18px;font-size:13px;line-height:1.5}
.am-run-guide li{padding-left:2px}
.am-run-guide li::marker{color:var(--ws-muted);font-weight:650}
.am-run-guide li span{display:block;color:var(--ws-muted)}
.am-findings dt:nth-of-type(2){color:var(--ws-text)}
.am-source-details summary,.am-step-details summary{cursor:pointer;font-size:13px;font-weight:650;padding:7px 0}
.am-source-details .am-sources{margin:5px 0 0}
.am-step-details .am-checklist{margin-bottom:8px}
.am-editor form{margin-top:11px}
@media(max-width:700px){.am-run-guide ol{grid-template-columns:1fr;gap:8px}}

.am-editor-bar{position:sticky;top:0;z-index:1;padding:0 0 8px;background:var(--ws-card)}
.am-editor-bar .am-editor-toolbar{margin-bottom:0}
.am-editor-bar .am-notice,.am-editor-bar .am-error{margin:6px 0 0}
.am-toolbar-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}
.am-instructions{padding:0 12px 4px}
.am-check-hint{font-size:12px;line-height:1.45;color:var(--ws-muted);margin:4px 0 8px}
.am-step-card{padding:12px 0}
.am-step-card+.am-step-card{border-top:1px solid var(--ws-border)}
.am-step-card .am-check-step{padding:0;flex-wrap:wrap;gap:8px}
.am-step-card .am-check-step strong{flex:1;min-width:140px;font-size:14px}
.am-step-info{display:grid;gap:7px;margin:7px 0 0 25px;font-size:13px;line-height:1.55}
.am-step-info p{margin:0}
.am-step-sources{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px}
.am-step-sources .am-sources{gap:4px}
.am-step-sources a{padding:1px 5px}
.am-next-step{align-self:flex-start;padding:1px 6px;border-radius:5px;background:var(--ws-accent-soft);color:var(--ws-text);font-size:11px;font-weight:600;white-space:nowrap}

.am-order-legend{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:0 0 12px;font-size:12px}
.am-order-legend>strong{margin-right:2px;color:var(--ws-muted)}
.am-step-order-row,.am-task-actions,.am-work-guide{display:flex;align-items:center;flex-wrap:wrap;gap:7px 10px}
.am-work-guide{justify-content:space-between;font-size:13px;line-height:1.55}
.am-work-guide p{margin:0;color:var(--ws-muted)}
.am-work-guide button,.am-task-actions button{font-size:12px;padding:5px 9px}
.am-step-actor,.am-task-actions span{font-size:12px;color:var(--ws-muted)}
.am-block-result{border-radius:9px;padding:10px 12px;background:var(--ws-bg);font-size:13px;line-height:1.5}
.am-block-result p{margin:3px 0 0}
.am-legacy-list{padding-inline-start:20px;font-size:13px;line-height:1.5}
.am-kb-download{display:grid;gap:8px;padding:16px 18px;border:1px solid var(--ws-border);border-inline-start:3px solid var(--ws-primary-border);border-radius:12px;background:var(--ws-card);font-size:13px;line-height:1.5}
.am-kb-download h2,.am-kb-download p{margin:0}
.am-kb-download h2{font-size:18px;font-weight:700}
.am-kb-download>p{color:var(--ws-muted)}
.am-kb-controls{display:flex;align-items:end;gap:8px 10px;flex-wrap:wrap}
.am-kb-controls button{min-height:36px}
.am-kb-controls label{display:grid;gap:3px;font-weight:600}
.am-kb-controls input{font:inherit;min-width:136px;padding:6px;border:1px solid var(--ws-border);border-radius:6px;background:var(--ws-bg);color:var(--ws-text);color-scheme:inherit}
.am-kb-totals{display:flex;flex-wrap:wrap;gap:8px 24px;margin:2px 0 7px}
.am-kb-totals dd{margin:0;font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
.am-kb-note,.am-kb-sources small{color:var(--ws-muted)}
.am-kb-sources{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:7px;margin:8px 0 0;padding:0;list-style:none}
.am-kb-sources li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:start;gap:2px 9px;padding:7px 9px;border:1px solid var(--ws-border);border-radius:7px}
.am-kb-sources small{display:block}
.am-kb-source-note{grid-column:1/-1}
.am-kb-source-ready{color:var(--ws-green)}
.am-kb-error,.am-kb-source-error,.am-kb-sources .am-kb-error{color:var(--ws-red)}
.am-kb-recon{display:grid;gap:9px;margin-top:6px;padding-top:13px;border-top:1px solid var(--ws-border);min-width:0}
.am-kb-recon h3{margin:0;font-size:16px;font-weight:700}
.am-kb-match strong{color:var(--ws-green);font-size:16px}
.am-kb-recon-groups,.am-kb-pages{display:flex;align-items:center;flex-wrap:wrap;gap:6px 9px}
.am-kb-recon-groups button[aria-pressed=true]{background:var(--ws-accent-soft);border-color:var(--ws-primary-border);font-weight:650}
.am-kb-table-scroll{overflow:auto;max-height:450px;border:1px solid var(--ws-border);border-radius:8px}
.am-kb-table{width:100%;min-width:690px;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}
.am-kb-table th,.am-kb-table td{padding:7px 9px;border-bottom:1px solid var(--ws-border);vertical-align:top}
.am-kb-table th{position:sticky;top:0;background:var(--ws-bg);font-weight:650}
.am-kb-table tbody tr:last-child td{border-bottom:0}
.am-kb-table small{display:block;color:var(--ws-muted)}
.am-kb-table a{color:var(--ws-text);text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.am-bank-register .am-kb-table tbody th{position:static;text-align:left}
.am-bank-register .am-kb-table a{white-space:normal}
.am-bank-register .am-step-details textarea{display:block;width:100%;max-width:100%}
.am-kb-history-content,.am-kb-history-group{display:grid;gap:8px;min-width:0}
.am-kb-order-card{display:grid;gap:8px;min-width:0}
.am-kb-order-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 10px;border:1px solid var(--ws-border);border-radius:8px;background:var(--ws-bg)}
.am-kb-order-bar a{text-decoration:underline;text-underline-offset:2px}
.am-kb-order-close{justify-self:start}
.am-kb-history-content[hidden]{display:none}
.am-kb-history-group h4{margin:0;font-size:14px}
.am-kb-history-table{min-width:0}
.am-kb-history-table a{white-space:normal}
.am-kb-costs,.am-kb-cost-details[open]{display:grid;gap:9px;min-width:0}
.am-kb-costs{padding:12px;border:1px solid var(--ws-border);border-radius:8px}
.am-kb-costs h4{margin:0;font-size:15px}
.am-kb-cost-details summary{cursor:pointer;font-weight:650}
.am-kb-cost-warning{padding:7px 9px;color:var(--ws-yellow);background:var(--ws-yellow-bg);border:1px solid var(--ws-yellow-border);border-radius:6px}
.am-kb-parts{display:grid;gap:3px;margin:0;padding:0;list-style:none}
.am-kb-parts li{display:flex;flex-wrap:wrap;gap:3px 7px}
.am-step-order{display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:2px 7px;border:1px solid;border-radius:5px;font-size:11px;font-weight:650;line-height:1.45}
.am-order-independent{color:#164ca3;background:#e7f1ff;border-color:#b9d3f7}
.am-order-dependent{color:#a7192a;background:#fdebed;border-color:#efbfc7}
[data-theme=dark] .am-order-independent{color:#b8d6ff;background:#192e4e;border-color:#456086}
[data-theme=dark] .am-order-dependent{color:#ffbac2;background:#492731;border-color:#80505b}
.am-step-info .am-step-prerequisites{font-size:12px;color:var(--ws-muted)}

.am-head-with-outcome{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:10px}
.am-page button.am-outcome-jump{font-weight:650;white-space:nowrap}
.am-outcome{scroll-margin-top:14px;border:1px solid var(--ws-border);border-top:3px solid var(--ws-primary-border);border-radius:14px;padding:clamp(15px,2.4vw,26px);background:var(--ws-card);min-width:0}
.am-outcome:focus-visible{outline:2px solid var(--ws-primary-border);outline-offset:3px}
.am-outcome-head{max-width:880px}
.am-outcome-tag{display:inline-block;background:var(--ws-accent-soft);border-radius:6px;padding:3px 8px;font-size:11px;font-weight:650}
.am-outcome h2{font-size:clamp(21px,2.2vw,27px);line-height:1.3;margin:8px 0}
.am-outcome h3{font-size:16px;line-height:1.4;margin:0 0 12px;font-weight:650}
.am-outcome p,.am-outcome dd{font-size:13px;line-height:1.6}
.am-outcome-views{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}
.am-outcome-view{min-width:0;padding:15px;border:1px solid var(--ws-border);border-radius:9px;background:var(--ws-bg)}
.am-outcome-view dl{margin:0}
.am-outcome-view dl>div+div{margin-top:11px;padding-top:11px;border-top:1px solid var(--ws-border)}
.am-outcome-view dt{font-size:14px;line-height:1.45;font-weight:650}
.am-outcome-view dd{margin:4px 0 0}
.am-outcome-decision{color:var(--ws-muted)}
.am-outcome-decision strong{color:var(--ws-text)}
.am-outcome-example{margin-top:14px;padding:12px 15px;border-radius:9px;background:var(--ws-accent-soft)}
.am-outcome-example h3{margin-bottom:4px}
.am-outcome-note{margin-top:8px;color:var(--ws-muted)}
@media(max-width:730px){.am-outcome-views{grid-template-columns:1fr}}


.am-close-sources{margin:12px 0;padding:12px;border:1px solid var(--ws-border);border-radius:9px;background:var(--ws-bg)}
.am-close-source-list,.am-close-source-issues{list-style:none;padding:0;margin:0}
.am-close-source-list>li{display:grid;gap:7px;padding:10px 0;border-top:1px solid var(--ws-border)}
.am-close-source-heading{display:flex;justify-content:space-between;gap:6px 16px;flex-wrap:wrap;font-weight:650}
.am-close-source-heading small{color:var(--ws-muted);font-weight:400}
.am-close-source-list select{width:100%;min-width:0}
.am-close-source-list p{margin:0}
.am-close-source-issues{font-size:13px;line-height:1.5;color:var(--ws-text);border-left:3px solid #dc6868;padding-left:9px}
.am-close-source-issues li+li{margin-top:3px}
