.ca-automations{max-width:1400px;margin:auto;padding:24px;color:#344054;font-size:14px}.ca-automations h1{font-size:26px;font-weight:600;margin:0}.ca-automations h2{font-size:20px;font-weight:600}.ca-automations h3{font-size:16px;font-weight:600}.ca-automations p:not([data-assignment-picker-root] *),.ca-automations small:not([data-assignment-picker-root] *){color:#667085}.ca-heading,.ca-toolbar,.ca-tabs,.ca-actions,.ca-automations dialog header,.ca-automations dialog footer{display:flex;align-items:center;gap:12px}.ca-heading{justify-content:space-between;margin-bottom:24px}.ca-tabs{border-bottom:1px solid #e4e7ec;margin-bottom:20px}.ca-automations button:not([data-assignment-picker-root] *),.ca-automations .ca-button{border:1px solid #d0d5dd;border-radius:6px;background:white;padding:8px 12px;font-size:13px;line-height:20px;cursor:pointer;color:#344054}.ca-automations button:not([data-assignment-picker-root] *):hover{background:#f9fafb}.ca-automations button:not([data-assignment-picker-root] *):disabled{opacity:.5;cursor:not-allowed}.ca-automations .ca-primary{background:#6554ae;color:white;border-color:#6554ae}.ca-tabs button{border:0;border-radius:0;border-bottom:3px solid transparent;background:transparent;padding:12px}.ca-tabs button[aria-current=page]{color:#6554ae;border-bottom-color:#6554ae;background:#f5f2fb}.ca-automations label:not([data-assignment-picker-root] *){display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500}.ca-automations input:not([data-assignment-picker-root] *),.ca-automations select:not([data-assignment-picker-root] *),.ca-automations textarea:not([data-assignment-picker-root] *){border:1px solid #d0d5dd;border-radius:6px;padding:9px 11px;background:white;color:#344054;font:inherit;min-width:0;width:100%}.ca-automations textarea:not([data-assignment-picker-root] *){min-height:110px}.ca-toolbar{margin-bottom:20px;align-items:end}.ca-toolbar label{min-width:220px}.ca-toolbar .ca-search{max-width:420px;flex:1}.ca-automations table{width:100%;border-collapse:collapse;background:white}.ca-automations th{text-align:left;font-size:12px;font-weight:600;color:#667085;background:#f9fafb}.ca-automations td,.ca-automations th{padding:14px 16px;border-bottom:1px solid #eaecf0}.ca-automations td small{display:block;margin-top:4px}.ca-table-wrap{overflow:auto;border:1px solid #eaecf0;border-radius:8px}.ca-automations .ca-link{border:0;background:transparent;color:#6554ae;padding:0;text-align:left}.ca-editor{max-width:980px;margin:0 auto}.ca-editor-top{display:flex;justify-content:space-between;gap:20px;margin:20px 0}.ca-editor-top input{font-size:20px;font-weight:600}.ca-flow{border:1px solid #e4e7ec;background:white;border-radius:8px;padding:0 24px;margin:20px 0}.ca-flow section{display:flex;align-items:start;justify-content:space-between;gap:24px;padding:24px 0;border-bottom:1px solid #eaecf0}.ca-flow section:last-child{border-bottom:0}.ca-eyebrow{font-size:11px;font-weight:600;letter-spacing:.08em;color:#667085}.ca-flow ol{padding-left:20px;line-height:1.8}.ca-badge{display:inline-block;border-radius:12px;padding:3px 9px;font-size:12px;background:#f2f4f7;color:#475467}.ca-badge.active{background:#ecfdf3;color:#027a48}.ca-automations dialog{width:min(620px,calc(100vw - 32px));max-height:85vh;padding:0;border:1px solid #d0d5dd;border-radius:12px;box-shadow:0 20px 60px #10182833;color:#344054}.ca-automations dialog::backdrop{background:#10182866}.ca-automations dialog header,.ca-automations dialog footer{padding:18px 22px;justify-content:space-between;border-bottom:1px solid #eaecf0}.ca-automations dialog footer{border-bottom:0;border-top:1px solid #eaecf0;justify-content:flex-end}.ca-automations #ca-dialog-content{padding:22px;display:grid;gap:16px;overflow:auto;max-height:55vh}.ca-note,#ca-notice{padding:12px 16px;border-radius:6px;background:#f5f3fa;margin:12px 0;line-height:1.6}.ca-error{background:#fef3f2!important;color:#b42318!important}.ca-actions{flex-wrap:wrap;margin:16px 0}.ca-automations pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;padding:16px;background:#f9fafb}.ca-automations :focus-visible{outline:2px solid #6554ae;outline-offset:2px}@media(max-width:700px){.ca-automations{padding:16px}.ca-heading,.ca-toolbar,.ca-editor-top{align-items:stretch;flex-direction:column}.ca-tabs{overflow:auto}.ca-tabs button{white-space:nowrap}.ca-flow{padding:0 16px}.ca-flow section{gap:12px}.ca-toolbar label{min-width:0}}
.ca-automations [hidden]{display:none!important}

/* Detail layout adapted from the current studio's simple-workspace / simple-flow. */
.ca-detail-page>.ca-heading,.ca-detail-page>.ca-toolbar{display:none}
.ca-editor{max-width:980px;margin:0 auto}
.ca-back{display:inline-block;color:#6554ae;font-size:13px;margin:0 0 16px;text-decoration:none}
.ca-back:hover{text-decoration:underline}
.ca-editor-top{align-items:flex-start;margin:0 0 22px;gap:20px}
.ca-editor-top .ca-title{flex:1;min-width:0}
.ca-editor-top input{font-size:24px;font-weight:650;line-height:1.6;border-color:transparent;padding:0;background:transparent;color:#344054}
.ca-editor-top input:disabled{opacity:1;color:#344054;-webkit-text-fill-color:#344054}
.ca-editor-top input:not(:disabled):hover{border-color:#dce1e9}
.ca-editor-top p{font-size:12px;line-height:1.7;margin-top:7px}
.ca-flow{padding:0 22px;background:#fff;border:1px solid #e4e7ec;border-radius:8px;margin:18px 0 16px}
.ca-flow>section{padding:24px 4px;gap:24px;border-bottom:1px solid #eceef2}
.ca-flow>section>div{min-width:0;flex:1}
.ca-flow>section>button{flex-shrink:0}
.ca-flow h3{font-size:17px;font-weight:600;line-height:1.6;margin:5px 0}
.ca-flow p{font-size:14px;line-height:1.8;margin:7px 0;color:#667085}
.ca-flow ol{margin:10px 0;padding-left:24px;list-style:decimal}
.ca-flow li{padding:10px 0;font-size:15px;line-height:1.8;overflow-wrap:anywhere}
.ca-flow li small{display:block;font-size:13px;line-height:1.8;white-space:pre-wrap;max-width:75ch;margin-top:4px}
.ca-flow li small span{display:block;font-size:12px;margin-top:6px;color:#7b8697}
.ca-flow li button{font-size:12px;padding:4px 8px;margin-left:8px}
.ca-actions{gap:8px;padding:8px 0}
.ca-automations a.ca-link{display:inline-block;font-weight:600;line-height:1.7;text-decoration:none}
.ca-automations a.ca-link:hover{text-decoration:underline}
.ca-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:750px){.ca-flow>section{gap:12px}.ca-flow h3{font-size:15px}.ca-editor-top{flex-direction:column}.ca-flow{padding:0 16px}}

/* The organization tab owns page spacing; scoped controls stay hidden. */
.ca-automations [hidden]{display:none!important}
.ca-automations[data-organization-id]:not([data-organization-id=""]){padding:0}

/* Organization programs share the existing automation controls and page typography. */
.ca-tabs{overflow-x:auto;gap:4px}.ca-tabs button{white-space:nowrap;font-size:13px}
.ca-section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 20px}
.ca-section-heading h2{margin:0 0 6px}.ca-section-heading p{margin:0;line-height:1.6}
.ca-program-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:18px}
.ca-program-card{border:1px solid #e4e7ec;background:white;border-radius:8px;padding:22px;display:flex;flex-direction:column;gap:12px;min-width:0}
.ca-program-card h3,.ca-program-card p{margin:0;line-height:1.7}.ca-program-card h3{color:#344054;font-size:17px}
.ca-card-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.ca-program-card>.ca-actions{margin:auto 0 0;padding-top:12px}
.ca-program-links{display:grid;gap:0;margin:4px 0;border-top:1px solid #eaecf0}
.ca-program-links a{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #eaecf0;color:#6554ae;font-weight:500}
.ca-program-links a:hover{text-decoration:underline}.ca-program-links span{font-weight:400;color:#667085;font-size:12px}
.ca-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.ca-form-grid>label{min-width:0}
.ca-policy-layout{display:grid;grid-template-columns:3fr 2fr;gap:20px}
.ca-automations .ca-bullets,.ca-sources{padding-left:22px;list-style:disc;line-height:1.8}
.ca-automations ol.ca-bullets{list-style:decimal}.ca-bullets li{margin:8px 0}
.ca-sources a{color:#6554ae;text-decoration:underline}.ca-sources p{font-size:13px;line-height:1.7}
.ca-footnote{font-size:13px;line-height:1.7;margin-top:20px;max-width:100ch}
.ca-change-history{margin:24px 0;padding:18px;border-top:1px solid #e4e7ec}
.ca-automations summary{cursor:pointer;font-weight:500;color:#475467}.ca-change-history li{padding:10px 0;border-bottom:1px solid #eaecf0;line-height:1.7}.ca-change-history time{display:block;color:#667085;font-size:12px}
@media(max-width:850px){.ca-policy-layout{grid-template-columns:1fr}.ca-section-heading{align-items:flex-start}}
@media(max-width:550px){.ca-form-grid{grid-template-columns:1fr}.ca-card-heading{flex-wrap:wrap}.ca-section-heading{flex-direction:column}.ca-program-card{padding:16px}}

/* Applied programs expose the saved actions before opening the editor. */
.ca-program-links a{align-items:flex-start;padding:14px 0;text-decoration:none}
.ca-program-links a:hover{text-decoration:none}
.ca-program-link-body{min-width:0;flex:1;color:#344054}
.ca-program-link-kind{font-size:12px;color:#667085;margin-bottom:4px}
.ca-program-link-body strong{display:block;font-size:14px;color:#344054;line-height:1.4}
.ca-program-link-body ul{margin:8px 0;padding-left:17px;font-size:13px;line-height:1.55;font-weight:400;color:#475467}
.ca-program-link-body li{margin:4px 0;overflow-wrap:anywhere}
.ca-program-link-body small{display:block;font-size:12px;font-weight:400;color:#667085}
.ca-program-link-body .ca-program-open{color:#6554ae;margin-top:8px}
.ca-program-links a:hover .ca-program-open{text-decoration:underline}
.ca-program-link-status{flex-shrink:0;max-width:100px;text-align:right;line-height:1.4}

/* Program detail uses the organization content width, with a separate context rail. */
.ca-program-detail{width:100%;max-width:1200px;margin:0 auto;min-width:0}
.ca-program-detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px}
.ca-program-detail-header>div{min-width:0;max-width:75ch}
.ca-program-detail-header h2{margin:4px 0 8px;font-size:24px;line-height:1.35}
.ca-program-detail-header p{margin:0;line-height:1.65}
.ca-program-detail-header>button{flex-shrink:0;white-space:nowrap}
.ca-program-settings{margin-bottom:24px}
.ca-program-settings dl{display:grid;grid-template-columns:1fr 1.3fr 1fr;gap:24px;margin:0}
.ca-program-settings dl>div{min-width:0}
.ca-program-settings dt{font-size:12px;color:#667085;margin-bottom:6px}
.ca-program-settings dd{margin:0;line-height:1.6;overflow-wrap:anywhere;font-weight:500}
.ca-program-settings dd small{display:block;font-weight:400}
.ca-program-settings>small{padding-top:12px;border-top:1px solid #eaecf0;font-size:12px}
.ca-program-detail-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:24px;align-items:start}
.ca-program-guidance{background:#fafbfc;font-size:13px}
.ca-program-detail .ca-program-links{margin:0}
.ca-program-detail .ca-program-links a:last-child{border-bottom:0}
.ca-program-detail .ca-program-link-body ul{list-style:disc}
@media(max-width:900px){.ca-program-detail-grid{grid-template-columns:1fr}.ca-program-settings dl{grid-template-columns:1fr 1fr}}
@media(max-width:550px){.ca-program-detail-header{flex-direction:column;gap:16px}.ca-program-settings dl{grid-template-columns:1fr;gap:16px}.ca-program-settings{margin-bottom:16px}.ca-program-detail-grid{gap:16px}}

.ca-link-choices{display:grid;gap:8px;max-height:320px;overflow:auto}
.ca-automations label.ca-link-choice{display:flex;flex-direction:row;align-items:flex-start;gap:12px;padding:12px;border:1px solid #e4e7ec;border-radius:6px;cursor:pointer}
.ca-automations label.ca-link-choice:has(input:checked){border-color:#b9add9;background:#f8f6fc}
.ca-automations input.ca-link-check{width:16px;height:16px;flex:0 0 16px;margin-top:3px;accent-color:#6554ae}
.ca-link-choice span{min-width:0}.ca-link-choice strong{display:block;overflow-wrap:anywhere;font-weight:500}
.ca-link-choice small{display:block;margin-top:4px;font-size:12px}

#ca-decision-fields{display:grid;gap:16px}
#ca-decision-branches{display:grid;gap:16px}
.ca-decision-branch{border:1px solid #e4e7ec;border-radius:8px;padding:16px;display:grid;gap:12px;min-width:0}
.ca-decision-branch legend{padding:0 6px;color:#667085;font-size:12px}
.ca-decision-branch>button{justify-self:start}

/* Read classification as paths, not a concatenated instruction sentence. */
.ca-branch-summary{margin:12px 0 16px;font-size:14px;line-height:1.6}
.ca-flow .ca-branch-summary .ca-branch-intro{margin:0 0 8px;color:#475467}
.ca-branch-mode{font-size:12px;color:#667085;margin-bottom:14px}
.ca-branch-mode strong{font-weight:500;color:#475467}
.ca-branch-paths{display:grid;gap:12px}
.ca-branch-path{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1.2fr);gap:16px;padding:18px;border:1px solid #e4e7ec;border-radius:8px;background:#fff}
.ca-branch-condition,.ca-branch-outcome{min-width:0;overflow-wrap:anywhere}
.ca-branch-label{display:block;font-size:11px;font-weight:600;color:#667085;margin-bottom:5px}
.ca-branch-path strong{display:block;font-size:14px;font-weight:600;color:#344054}
.ca-flow .ca-branch-path p{font-size:13px;line-height:1.65;margin:6px 0 0}
.ca-branch-arrow{align-self:start;padding-top:22px;color:#98a2b3}
.ca-branch-outcome blockquote{margin:10px 0;padding:10px 12px;border-left:3px solid #c8bfe4;border-radius:0 4px 4px 0;background:#f8f6fc;color:#344054;font-size:14px;line-height:1.65;white-space:pre-wrap}
.ca-branch-next{font-size:12px;color:#6554ae;margin-top:8px;font-weight:500}
.ca-branch-fallback{margin-top:12px;padding:12px 16px;background:#f9fafb;border:1px solid #e4e7ec;border-radius:8px;font-size:13px}
.ca-flow .ca-branch-fallback p{font-size:13px;margin:4px 0 0;line-height:1.6}
.ca-branch-rules{margin-top:12px;font-size:12px}
.ca-flow .ca-branch-rules p{font-size:13px;max-width:75ch;line-height:1.65}
@media(max-width:650px){.ca-branch-path{grid-template-columns:1fr;gap:12px;padding:14px}.ca-branch-arrow{display:none}.ca-branch-outcome{border-top:1px solid #eaecf0;padding-top:12px}}

/* Keep patient-facing message content distinct from editor controls. */
.ca-message-preview{margin:12px 0 0;padding:16px 18px;border:1px solid #ddd5ed;border-left:3px solid #b4a3d6;border-radius:8px;background:#faf8fd;max-width:72ch}
.ca-message-preview-label{display:block;margin-bottom:9px;font-size:11px;font-weight:600;color:#667085;line-height:1.4}
.ca-message-preview-text{font-size:16px;line-height:1.7;color:#344054;white-space:pre-wrap;overflow-wrap:anywhere}
.ca-flow .ca-step-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}
.ca-flow li .ca-step-controls button{margin:0}
@media(max-width:550px){.ca-message-preview{padding:14px}}

/* Task-template previews reuse the authoring dialog without executing work. */
.ca-automations dialog.ca-task-template-preview{width:min(960px,calc(100vw - 32px));max-height:90dvh}
.ca-automations .ca-task-template-preview #ca-dialog-content{max-height:68dvh}
.ca-task-preview-metadata{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0 0 20px}
.ca-task-preview-metadata dt{font-size:12px;color:#667085;margin-bottom:4px}.ca-task-preview-metadata dd{margin:0;overflow-wrap:anywhere}
.ca-task-preview-body{padding:20px 24px;border:1px solid #e4e7ec;border-radius:8px;background:#fafafa;font-size:15px;line-height:1.65}
.ca-task-preview-body p{white-space:pre-wrap;max-width:75ch}.ca-task-preview-body textarea{margin-top:6px}
.ca-task-preview-context{border-top:1px solid #e4e7ec;padding-top:16px;margin-top:20px;font-size:13px;line-height:1.6}
.ca-task-preview-steps{display:flex;flex-wrap:wrap;gap:6px;margin:16px 0}
.ca-task-preview-steps button[aria-current=step]{background:#f2effa;color:#554599;border-color:#bfb2e0}
@media(max-width:650px){.ca-task-preview-metadata{grid-template-columns:repeat(2,minmax(0,1fr))}.ca-task-preview-body{padding:16px}}

.ca-task-template-group{margin-top:28px;padding-top:20px;border-top:1px solid #e5e7eb}.ca-task-template-group-heading{display:flex;align-items:center;gap:10px;margin-bottom:14px}.ca-task-template-group-heading h3{margin:0;font-size:16px;font-weight:600;color:#374151}

.ca-event-uses{margin-top:16px;padding-top:12px;border-top:1px solid #e5e7eb;font-size:13px}.ca-event-uses ul{padding-left:18px}.ca-event-uses li{margin-top:8px}.ca-event-uses .ca-badge{margin-left:4px}
