/* Agent primitives share the lab's monochrome surfaces and motion settings. */
.agency-lane{min-width:0;padding:32px 18px!important;align-items:center}
.agency-demo{width:100%;max-width:420px;min-width:0}
.agency-card{width:100%;box-sizing:border-box;padding:24px;border:1px solid var(--line);border-radius:22px;background:var(--surface);text-align:left;position:relative;isolation:isolate}
.agency-card h3{font-size:22px;line-height:1.22;font-weight:500;letter-spacing:-.65px;margin:24px 0 20px;overflow-wrap:anywhere}
.agency-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.agency-eyebrow,.scope-label{font:10px ui-monospace,monospace;letter-spacing:1px;color:var(--muted)}
.agency-badge{font:10px ui-monospace,monospace;padding:6px 9px;border:1px solid var(--line);border-radius:20px}
.agency-detail,.agency-status{font-size:12px;line-height:1.55;color:var(--muted);margin:12px 0 0;overflow-wrap:anywhere}
.agency-status{min-height:38px}
.agency-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:22px}
.agency-card button{min-height:44px;padding:10px 14px;border-radius:24px;font-size:12px;line-height:1.4;white-space:normal;touch-action:manipulation}
.agency-card .agency-primary{position:relative;overflow:hidden;background:var(--ink);color:var(--canvas);border:1px solid var(--ink);font-weight:600}
.agency-card .agency-primary:hover{background:var(--ink);color:var(--canvas);filter:brightness(.85)}
.agency-primary:before{content:'';position:absolute;inset:0;background:currentColor;opacity:.18;transform:scaleX(0);transform-origin:left;pointer-events:none}
.agency-primary.holding:before{animation:permission-hold var(--hold-duration) linear forwards}
@keyframes permission-hold{to{transform:scaleX(1)}}
.permission-preview{padding:16px;background:var(--field);border-radius:12px;border:1px solid transparent;font-size:14px;line-height:1.5}
.permission-preview p{margin:0}.permission-preview .agency-detail{margin-top:8px}
.permission-preview[data-expanded=false] .agency-detail{display:none}
.agency-card[data-consequence=high] .permission-preview{border-color:var(--line);border-left:3px solid var(--ink)}
.agency-card[data-granted=true] .permission-preview{background:var(--selected);border-color:var(--ink)}
.agency-controls{margin-bottom:26px}.agency-controls>div{display:grid;gap:18px}
.agency-select{display:grid;gap:9px;font-size:12px;color:var(--muted)}
.agency-select select{width:100%;min-width:0;min-height:40px;font-size:12px;color:var(--ink);background:var(--field)}
.agency-range{display:grid;gap:10px;font-size:12px}.agency-range-head{display:flex;justify-content:space-between;gap:12px}.agency-range output{font:11px ui-monospace,monospace;color:var(--muted);text-align:right}
.agency-range input{width:100%;margin:0;accent-color:var(--ink)}
.blast-chart{position:relative;aspect-ratio:1;max-width:280px;width:100%;margin:0 auto;isolation:isolate}
.blast-ring,.blast-boundary{position:absolute;inset:4%;border-radius:26%;border:1px solid var(--line);pointer-events:none;transform:scale(calc(.24 + var(--ring)*.14));opacity:.35}
.blast-ring[data-active=true]{opacity:.8}.blast-boundary{border-color:var(--ink);opacity:1;z-index:2}
.blast-center{position:absolute;inset:40%;display:grid;place-items:center;background:var(--ink);color:var(--canvas);font:10px ui-monospace,monospace;border-radius:12px;z-index:3}
.blast-nodes{position:absolute;inset:14%;display:grid;grid-template-columns:repeat(5,1fr);gap:20px;align-items:center;justify-items:center}
.blast-nodes i{width:5px;height:5px;background:var(--line);border-radius:50%}.blast-nodes i[data-active=true]{background:var(--ink);width:7px;height:7px}
.blast-summary{display:grid;gap:8px;text-align:center}.blast-summary strong{font-size:19px;font-weight:500}.blast-summary span{font:11px ui-monospace,monospace;color:var(--muted)}
.scope-envelope{padding:16px;border:1.5px solid var(--ink);border-radius:20px;background:var(--field)}
.scope-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.scope-agent{color:var(--canvas);background:var(--ink);padding:7px 10px;border-radius:15px;letter-spacing:0;text-transform:none}
.scope-chips{display:flex;flex-wrap:wrap;gap:7px;min-height:44px}
.scope-outside{padding:18px 0 0}.scope-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--surface);cursor:grab}
.scope-chip small{font-size:9px;color:var(--muted)}.scope-chip:active{cursor:grabbing}
.scope-request{padding:16px;margin-top:12px;border:1px dashed var(--ink);border-radius:14px;background:var(--field)}.scope-request strong{font-size:14px;font-weight:500}.scope-request .agency-actions{margin-top:12px}
.scope-envelope[data-requesting=true]{border-style:dashed}.scope-envelope.drag-over,.scope-outside.drag-over{outline:2px dashed var(--ink);outline-offset:3px}
.agency-card [hidden]{display:none!important}
.stage.compare:has(.agency-card){grid-template-columns:repeat(2,minmax(0,1fr))}.stage.compare .agency-card{padding:18px}.stage.compare .agency-lane{padding:26px 10px!important}
.stage.compare .agency-lane .lane-label{display:block!important;position:static;align-self:flex-start;font:11px ui-monospace,monospace;margin-bottom:14px;color:var(--muted)}
.stage.compare .agency-lane{flex-direction:column;justify-content:center}
.duo-stage .agency-card{padding:18px}.duo-stage .agency-card h3{font-size:19px;margin:16px 0}.duo-stage .agency-card .blast-chart{max-width:190px}.duo-stage .agency-lane{padding:0!important}.duo-page:has(.agency-card) .duo-context>p{display:none}
@media(max-width:700px){.stage.compare:has(.agency-card){grid-template-columns:1fr}.agency-card{padding:20px}.agency-lane{padding:24px 8px!important}.agency-demo{max-width:420px}}
@media(prefers-reduced-motion:reduce){.agency-primary.holding:before{animation:none}}
.stage:has(.agency-card):not(.duo-stage){height:auto;max-height:none;min-height:420px}
.agency-demo,.agency-card{max-height:none}.agency-card{overflow:visible}
.agency-lane .lane-hint{display:none}
.agency-controls.control-group{display:block;border-top:0;padding-top:0}.agency-controls.control-group h2{margin-bottom:18px}
.stage.compare:has(.agency-card){display:grid}
@media(max-width:1100px){.stage.compare:has(.agency-card){grid-template-columns:1fr}.stage.compare .agency-lane+.agency-lane{border-left:0;border-top:1px solid var(--line)}}
.agency-steps{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 22px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.agency-steps button{min-height:32px;padding:6px 9px;font:10px ui-monospace,monospace;border:0;background:transparent;color:var(--muted)}
.agency-steps button[aria-current=step]{background:var(--ink);color:var(--canvas)}
.proposal-diff{margin:16px 0;font-size:12px}.proposal-diff summary{cursor:pointer;min-height:32px;padding:8px 0}.proposal-diff pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--field);padding:14px;border-radius:10px;font:11px/1.7 ui-monospace,monospace}
.agency-card>.agency-select{margin-top:18px}
.impact-network{position:relative;display:grid;gap:12px;padding:16px;isolation:isolate}
.impact-network>button{display:grid;gap:5px;width:80%;justify-self:center;border:1px solid var(--ink);background:var(--surface);z-index:1;border-radius:12px;position:relative}
.impact-network>button:nth-child(-n+2){background:var(--selected)}.impact-network small{font:10px ui-monospace,monospace;color:var(--muted)}
.impact-network>button:not(:nth-child(4)):after{content:'';position:absolute;height:13px;width:1px;background:var(--ink);left:50%;top:100%}
.impact-network>button[data-inactive=true]{opacity:.45;border-style:dashed}
.impact-boundary{position:absolute;inset:0;border:2px solid var(--line);border-radius:24px;z-index:0;pointer-events:none;background:rgb(var(--shadow-rgb) / .02)}
.impact-boundary[data-unknown=true]{border-style:dashed;border-color:var(--ink)}
.impact-warning,.impact-detail{font-size:12px;line-height:1.6}.impact-detail{min-height:48px;padding:12px;background:var(--field);border-radius:10px}
.scope-chip{display:grid;text-align:left;gap:4px}.scope-chip[data-blocked=true]{border-style:dashed;cursor:not-allowed}.scope-chip small{font:10px ui-monospace,monospace}
.execution-log{font:11px/1.7 ui-monospace,monospace;padding-left:18px;color:var(--muted)}

/* Agent studies share a device-sized IDE, with one scrolling agent pane. */
.duo-stage .duo-ide .duo-workspace{grid-template-columns:minmax(0,38%) minmax(0,1fr)}
.duo-stage .duo-ide .duo-projects{padding:16px 12px;gap:16px;background:#f5f5f4;color:#242424;font-size:12px}
.ide-brand{display:flex;justify-content:space-between;align-items:center;font-weight:650;font-size:16px}
.ide-brand span,.ide-agent-header span{font-size:11px;font-weight:400;color:#666}
.ide-branch{font:11px/1.6 ui-monospace,monospace;overflow-wrap:anywhere}
.ide-file-list{display:grid;gap:12px;font:11px/1.5 ui-monospace,monospace}
.ide-file-list strong{font-size:10px;letter-spacing:1px;color:#666}
.ide-file-list .ide-file-selected{background:#e5e5e3;padding:8px;border-radius:6px;color:#222}
.ide-editor{border:1px solid #ddd;border-radius:8px;background:#fff;overflow:hidden}
.ide-editor>div{font:11px ui-monospace,monospace;padding:12px 8px;border-bottom:1px solid #ddd}
.ide-editor>div span{float:right;font-size:10px}
.ide-editor pre{font:10px/2 ui-monospace,monospace;margin:0;padding:12px 6px;overflow:auto}
.ide-editor .ide-code-add{color:#256235;background:#edf6ed}.ide-editor .ide-code-remove{color:#93403a;background:#fbedeb}
.duo-stage .duo-ide .duo-projects .ide-preview-note{font:11px/1.6 system-ui;margin-top:auto;letter-spacing:0;color:#666}
.duo-stage .duo-ide .duo-page{overflow:auto;overscroll-behavior:contain;justify-content:flex-start;gap:12px;padding:14px;scroll-padding:14px}
.duo-stage .duo-ide .duo-context,.duo-stage .duo-ide .duo-page:has(.refinement) .duo-context{display:block;flex:none;overflow:visible;padding:0}
.ide-agent-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--line);font-size:14px}
.duo-stage .duo-ide .duo-context h2{font-size:18px;letter-spacing:-.4px;margin:12px 0}
.ide-project-context{font-size:12px;border-bottom:1px solid var(--line)}
.ide-project-context summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:6px}
.ide-project-context summary:before{content:'›';font-size:20px}.ide-project-context[open] summary:before{transform:rotate(90deg)}
.duo-stage .duo-ide .ide-project-context p{margin:0 0 10px;font-size:12px;overflow-wrap:anywhere}
.duo-stage .duo-ide .ide-conversation p{font-size:13px;line-height:1.5;margin:0 0 8px;padding:10px 12px;border-radius:10px;background:var(--field)}
.duo-stage .duo-ide .duo-mount{max-height:none;flex:none;width:100%}
.duo-stage .duo-ide .demo{width:100%;justify-content:flex-start}
.duo-stage .duo-ide .agency-card{width:100%;padding:14px;box-sizing:border-box}
.duo-stage .duo-ide .surface.refinement{max-height:none!important;overflow:visible!important;width:100%}
.duo-stage .duo-ide .refinement-actions{position:static}
.duo-stage .duo-ide button,.duo-stage .duo-ide select{min-height:44px}
.duo-stage.duo-closed .duo-ide .duo-workspace,.duo-stage.duo-rotated .duo-ide .duo-workspace{grid-template-columns:1fr}
.duo-stage.duo-closed .duo-ide .duo-projects,.duo-stage.duo-rotated .duo-ide .duo-projects{display:none}
@media(max-width:560px){.duo-use-app .duo-ide .duo-page{padding:12px}.duo-use-app .duo-ide .agency-card{padding:12px}.duo-use-app .duo-ide .ide-agent-header{flex-wrap:wrap}}

/* Embedded controls use IDE density rather than the standalone specimen scale. */
.duo-stage .duo-ide .duo-page{gap:8px;padding:12px}
.duo-stage .duo-ide .ide-agent-header{padding-bottom:6px;font-size:12px}
.duo-stage .duo-ide .ide-project-context summary{min-height:32px;font-size:11px}
.duo-stage .duo-ide .duo-context h2{font-size:14px;margin:8px 0}
.duo-stage .duo-ide .ide-conversation p{font-size:12px;padding:7px 10px;margin-bottom:0}
.duo-stage .duo-ide .surface{padding:12px;border-radius:12px}
.duo-stage .duo-ide .surface h3{font-size:15px;line-height:1.3;margin:0 0 6px}
.duo-stage .duo-ide .surface button{font-size:12px;min-height:32px;padding:6px 10px}
.duo-stage .duo-ide .surface p,.duo-stage .duo-ide .status-text{font-size:12px;line-height:1.4}
.duo-stage .duo-ide .composer textarea{height:40px;min-height:40px;padding:4px;font-size:13px}
.duo-stage .duo-ide .composer .toolbar{margin-top:4px;gap:6px}
.duo-stage .duo-ide .composer .toolbar>button{min-height:32px;font-size:12px;padding:5px 9px}
.duo-stage .duo-ide .composer .toolbar .send{height:32px;width:32px}
.duo-stage .duo-ide .status-head{gap:10px;margin-bottom:10px}
.duo-stage .duo-ide .action-state-icon{width:32px;height:32px;min-width:32px;font-size:16px}
.duo-stage .duo-ide .action-orb{width:28px;height:28px}
.duo-stage .duo-ide .action-controls{gap:6px;margin-top:8px}
.duo-stage .duo-ide .refinement-kicker,.duo-stage .duo-ide .refinement-form>p{display:none}
.duo-stage .duo-ide .refinement-options{margin:10px 0;gap:5px}
.duo-stage .duo-ide .refinement-options legend{font-size:11px;margin-bottom:5px}
.duo-stage .duo-ide .refinement-option{padding:6px 8px;gap:8px;min-height:36px}
.duo-stage .duo-ide .refinement-option strong{font-size:12px}
.duo-stage .duo-ide .refinement-option small{font-size:10px;margin-top:2px}
.duo-stage .duo-ide .refinement-options:last-of-type{grid-template-columns:1fr 1fr}
.duo-stage .duo-ide .refinement-actions{padding:0;margin-top:8px;gap:6px}
.duo-stage .duo-ide .agency-card{padding:12px}
.duo-stage .duo-ide .agency-steps{gap:4px;padding-bottom:8px;margin-bottom:10px}
.duo-stage .duo-ide .agency-steps button{font-size:10px;padding:5px 7px}
/* Full-size touch targets in the unscaled mobile app and on touch devices. */
@media(pointer:coarse),(max-width:560px){
 .duo-stage .duo-ide .surface button,.duo-stage .duo-ide .composer .toolbar>button,.duo-stage .duo-ide .ide-project-context summary{min-height:44px}
 .duo-stage .duo-ide .composer .toolbar .send{width:44px;height:44px}
 .duo-stage .duo-ide .refinement-option{min-height:44px}
 .duo-stage .duo-ide .composer textarea{font-size:16px}
}

/* Dense embedded agency cards; standalone studies retain their original scale. */
.duo-stage .duo-ide .agency-top{gap:5px;margin-bottom:7px}
.duo-stage .duo-ide .agency-eyebrow,.duo-stage .duo-ide .scope-label{font-size:9px;letter-spacing:.5px}
.duo-stage .duo-ide .agency-badge{font-size:9px;padding:3px 6px}
.duo-stage .duo-ide .agency-card .agency-detail,.duo-stage .duo-ide .agency-card .agency-status,.duo-stage .duo-ide .agency-card .impact-warning{font-size:11px;line-height:1.4;margin:6px 0 0}
.duo-stage .duo-ide .agency-status{min-height:0}
.duo-stage .duo-ide .agency-actions{margin-top:10px;gap:5px}
.duo-stage .duo-ide .permission-preview{padding:9px 10px;border-radius:8px;font-size:12px;line-height:1.4}
.duo-stage .duo-ide .proposal-diff{margin:5px 0;font-size:11px}
.duo-stage .duo-ide .proposal-diff summary{padding:6px 0;min-height:28px}
.duo-stage .duo-ide .proposal-diff pre{padding:8px;font-size:10px;line-height:1.5}
.duo-stage .duo-ide .agency-card>.agency-select{margin-top:7px;gap:4px;font-size:11px}
.duo-stage .duo-ide .agency-select select{min-height:32px;font-size:12px;padding:5px 24px 5px 8px}
.duo-stage .duo-ide .impact-network{gap:7px;padding:8px;margin-top:8px}
.duo-stage .duo-ide .impact-network>button{width:90%;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:5px 9px;min-height:30px;border-radius:7px;font-size:11px}
.duo-stage .duo-ide .impact-network small{font-size:9px}
.duo-stage .duo-ide .impact-network>button:not(:nth-child(4)):after{height:8px}
.duo-stage .duo-ide .impact-boundary{border-radius:12px}
.duo-stage .duo-ide .agency-card .impact-detail{min-height:0;font-size:11px;padding:7px 9px;margin:7px 0 0;line-height:1.4;border-radius:7px}
.duo-stage .duo-ide .scope-envelope{padding:9px;border-radius:10px}
.duo-stage .duo-ide .scope-label{margin-bottom:6px}
.duo-stage .duo-ide .scope-chips{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:5px;min-height:0}
.duo-stage .duo-ide .agency-card .scope-chip{border-radius:7px;min-height:36px;padding:5px 7px;font-size:10px;gap:2px;overflow-wrap:anywhere}
.duo-stage .duo-ide .scope-chip small{font-size:9px}
.duo-stage .duo-ide .scope-outside{padding-top:9px}
.duo-stage .duo-ide .scope-request{padding:9px;margin-top:8px;border-radius:8px}
.duo-stage .duo-ide .scope-request strong{font-size:12px}
@media(pointer:coarse),(max-width:560px){
 .duo-stage .duo-ide .agency-card .scope-chip,.duo-stage .duo-ide .impact-network>button,.duo-stage .duo-ide .agency-select select,.duo-stage .duo-ide .proposal-diff summary{min-height:44px}
}
/* Follow the dependency path across the pane instead of consuming its height. */
.duo-stage .duo-ide .impact-network{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:7px 4px}
.duo-stage .duo-ide .impact-network>button{display:grid;justify-content:center;text-align:center;width:100%;gap:4px;padding:7px 2px;min-height:48px;font-size:10px}
.duo-stage .duo-ide .impact-network small{font-size:8px}
.duo-stage .duo-ide .impact-network>button:not(:nth-child(4)):after{height:1px;width:7px;left:100%;top:50%}
.duo-stage .duo-ide .impact-boundary{height:100%!important;width:74%}
.duo-stage .duo-ide .impact-network[data-production=true] .impact-boundary{width:100%}
.duo-stage .duo-ide .duo-page:has(.agency-card) .duo-context h2{display:none}
.duo-stage .duo-ide .duo-page:has(.agency-card) .ide-conversation{margin-top:7px}
.duo-stage:not(.duo-closed):not(.duo-rotated):not(.duo-use-app) .duo-ide .duo-page:has(.agency-card) .ide-project-context{display:none}
.duo-stage .duo-ide .agency-card .agency-steps{padding-bottom:5px;margin-bottom:6px}

.project-credit{display:block;padding:24px 20px;text-align:center;font:11px/1.6 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--muted);letter-spacing:0;text-transform:none}
.project-credit a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.project-credit a:hover{color:var(--ink)}
.project-credit a:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
.intro-pending .project-credit{visibility:hidden}
