/* Presentation rules shared by conversation, approval and the per-send report.
   Deliberate workflow timing, counters and stored snapshots remain unchanged. */
:root{
 --ai-green:#23764b;--ai-tint:#f3f8f5;--ai-border:#e2e9e5;
 --ai-ink:#293f32;--ai-muted:#6c7b72;
 --ai-space-title:8px;--ai-space-content:16px;--ai-space-section:24px;
 --ai-motion-ui:250ms;--ai-motion-result:350ms;--ai-motion-count:500ms;
 --ai-ease:cubic-bezier(.2,.65,.3,1);
 --ai-modal-radius:20px;--ai-modal-padding:24px;
 --ai-modal-shadow:0 16px 48px rgba(25,48,36,.14);
 --ai-sparkle:url('assets/ai-sparkle.svg');
}
/* One icon, accent and tint for AI attribution, without decorating ordinary data. */
.conversation-mode :is(.conversation-preference[data-preference="auto"] .conversation-preference-icon,.conversation-input-spark,.conversation-response-spark),
.conversation-mode #conversation-tasks .is-current .conversation-agent-icon::before,
.conversation-mode .conversation-draft-ai::before,
.dr-highlight-eyebrow::before{
 content:'';display:inline-block;width:14px;height:14px;flex:none;
 background:var(--ai-green);mask:var(--ai-sparkle) center/contain no-repeat;
 -webkit-mask:var(--ai-sparkle) center/contain no-repeat;font-size:0;vertical-align:-2px;
}
.conversation-mode #conversation-tasks .is-current .conversation-agent-icon svg{display:none}
.conversation-mode .conversation-draft-ai,.dr-highlight-eyebrow{display:inline-flex;align-items:center;gap:5px;font-size:12px;line-height:20px;font-weight:500;color:var(--ai-green);background:var(--ai-tint)}
.conversation-mode .conversation-draft-ai{padding:1px 6px;border-radius:5px}
.dr-highlight-eyebrow{padding:2px 6px;border-radius:5px}
.dr-highlight-insight{background:var(--ai-tint);border-color:#bdd6c7;border-radius:0 8px 8px 0;padding:12px 16px}
.dr-highlight-insight h4{font-size:16px;line-height:25px;font-weight:600;color:var(--ai-ink);margin:var(--ai-space-title) 0}
/* Only the current stage breathes. Closed progress uses its summary as the owner. */
.conversation-mode #conversation-tasks .is-running>.conversation-agent-icon::before{animation:ai-stage-breathe 2.4s ease-in-out infinite}
.conversation-mode #conversation-tasks .is-running>.conversation-agent-icon svg,
.conversation-mode .conversation-response-pending,
.conversation-mode .aim-spinner,
.conversation-mode .aim-is-working,
.conversation-mode .aim-image-skeleton,
.conversation-mode .workflow-image-shimmer,
.conversation-mode #workflow-feedback::before,
.conversation-mode #workflow-live-output,
.conversation-mode .workflow-live-head>span,
.conversation-mode .aim-stream.is-typing::after{animation:none!important}
.conversation-mode .aim-spinner{border:0;border-radius:0;background:var(--ai-green);mask:var(--ai-sparkle) center/contain no-repeat;-webkit-mask:var(--ai-sparkle) center/contain no-repeat}
.conversation-mode .conversation-agent-summary[data-state="running"]>strong::before{content:'';display:inline-block;width:14px;height:14px;margin-right:6px;vertical-align:-2px;background:var(--ai-green);mask:var(--ai-sparkle) center/contain no-repeat;-webkit-mask:var(--ai-sparkle) center/contain no-repeat}
.conversation-mode .conversation-rail:has(#conversation-process:not([open])) .conversation-agent-summary[data-state="running"]>strong::before{animation:ai-stage-breathe 2.4s ease-in-out infinite}
.conversation-mode:has(#workflow-confirm[open]) #conversation-tasks .is-running>.conversation-agent-icon::before,
.conversation-mode:has(#workflow-confirm[open]) .conversation-agent-summary>strong::before{animation:none!important}
.conversation-mode #conversation-tasks .is-done strong{color:#718178;font-weight:400}
.conversation-mode #conversation-tasks .is-done :is(p,small){color:#7a8980}
.conversation-mode #conversation-tasks .is-done>.conversation-agent-icon{color:#71947e;background:#f5f8f6;border-color:#e7ede9}
.conversation-mode #conversation-tasks .is-current strong{color:var(--ai-green);font-weight:600}
/* Consistent fade + 6px reveal; preserve animation names used for cleanup. */
@keyframes conversation-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes conversation-intake-item{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes conversation-response-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes conversation-audience-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes conversation-draft-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes ai-result-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes ai-fade{from{opacity:0}to{opacity:1}}
@keyframes ai-stage-breathe{0%,100%{opacity:.6}50%{opacity:1}}
.conversation-mode #conversation-form.is-ai-activating::before{animation:ai-fade var(--ai-motion-ui) var(--ai-ease) both}
.conversation-mode .conversation-entry-progress li,
#conversation-timeline .conversation-response.is-response-arriving,
.conversation-mode .conversation-shell.is-work-entering :is(.conversation-inline-work,.conversation-rail){animation-duration:var(--ai-motion-ui);animation-timing-function:var(--ai-ease)}
#conversation-timeline .conversation-audience-result.is-audience-arriving,
#conversation-timeline .conversation-message-draft.is-draft-arriving{animation-duration:var(--ai-motion-result);animation-timing-function:var(--ai-ease)}
.conversation-mode .workflow-image-build-canvas img,.conversation-mode .aim-image-reveal{animation:ai-result-enter var(--ai-motion-result) var(--ai-ease) both;filter:none;transform:none}
.conversation-mode .workflow-image-build-light{display:none}
.conversation-mode .aim-edit-reveal,.conversation-mode .aim-personalized{animation:ai-fade var(--ai-motion-ui) var(--ai-ease) both}
.conversation-mode #workflow-live-output>p{animation:ai-result-enter var(--ai-motion-ui) var(--ai-ease) both}
.conversation-mode .aim-change-focus{animation:ai-fade var(--ai-motion-ui) var(--ai-ease) both}
.dr-highlights[data-animate="true"] .dr-highlight-kpi{animation-duration:var(--ai-motion-result);animation-timing-function:var(--ai-ease)}
.dr-highlights[data-animate="true"] .dr-highlight-insight{animation:dr-highlight-appear var(--ai-motion-result) var(--ai-ease) calc((var(--kpi-count,4) - 1) * 120ms + 350ms) both}
/* Same modal shell and stable user approval in every send state. */
#workflow-confirm{border:1px solid var(--ai-border);border-radius:var(--ai-modal-radius);box-shadow:var(--ai-modal-shadow)}
#workflow-confirm::backdrop{background:rgba(26,43,34,.28);backdrop-filter:none}
#workflow-confirm header{padding:var(--ai-modal-padding);border-bottom:1px solid #edf1ee}
#workflow-confirm .workflow-confirm-body{padding:var(--ai-modal-padding)}
#workflow-confirm footer,#workflow-confirm[data-send-state="confirm"] footer{padding:16px var(--ai-modal-padding);justify-content:flex-end}
#workflow-confirm header h2{margin:0;font-size:22px;line-height:30px;font-weight:650;color:var(--ai-ink)}
#workflow-confirm #workflow-confirm-run[data-approval="ready"]:not(:disabled){animation:none;box-shadow:none}
#workflow-confirm .send-sim-channel{box-shadow:0 0 0 8px #89bba514}
#workflow-confirm .send-sim-track i{animation:none!important;box-shadow:none;opacity:0}
#workflow-confirm .send-sim-channel,#workflow-confirm .send-result-icon{animation:none!important}
#workflow-confirm[data-result-state="success"] .send-result-icon{animation:ai-fade var(--ai-motion-ui) var(--ai-ease) both!important}
#workflow-confirm .send-verification-steps li[data-state="active"] .send-verification-icon{animation:ai-stage-breathe 2.4s ease-in-out infinite}
#workflow-confirm[data-send-state="running"]:not([data-verification]) [data-send-step][data-state="active"]::before{content:'✦ ';animation:ai-stage-breathe 2.4s ease-in-out infinite;display:inline-block}
#workflow-confirm-details .send-validation-results[data-animate="true"] .send-validation-badge{animation:ai-fade var(--ai-motion-ui) var(--ai-ease) both}
#workflow-confirm[data-result-state] #send-result-overview{animation:ai-result-enter var(--ai-motion-result) var(--ai-ease) both}
/* A single spacing rhythm, with data and control positions kept intact. */
#conversation-timeline .conversation-response{margin:var(--ai-space-content) 0 var(--ai-space-section)}
#conversation-timeline .conversation-response-next{margin-top:var(--ai-space-title)}
#conversation-timeline :is(.conversation-audience-result,.conversation-message-draft,.conversation-artifact:not(.is-compact)){margin-block:var(--ai-space-content)}
.dr-highlights{margin-bottom:var(--ai-space-section)}
.dr-highlight-kpis{margin-block:var(--ai-space-section);padding-block:var(--ai-space-content)}
.dr-highlight-insight .dr-highlight-reading{margin-top:var(--ai-space-title)}
#workflow-confirm .send-result-total{margin:var(--ai-space-content) 0 var(--ai-space-title)}
#workflow-confirm .send-result-summary p{margin-top:var(--ai-space-title)}
#workflow-confirm .send-result-metrics{padding-block:var(--ai-space-content)}
#workflow-confirm[data-result-state] .send-result-details{margin-top:var(--ai-space-section)}
#workflow-confirm .send-result-summary p{font-size:13px;line-height:21px;color:var(--ai-muted)}
@media(max-height:760px){#workflow-confirm{--ai-modal-padding:18px}#workflow-confirm footer,#workflow-confirm[data-send-state="confirm"] footer{padding:12px var(--ai-modal-padding)}}
@media(prefers-reduced-motion:reduce){
 .conversation-mode *, .conversation-mode *::before, .conversation-mode *::after,
 #workflow-confirm *, #workflow-confirm *::before,
 .dr-highlights *, .dr-highlights *::before{animation:none!important;transition:none!important}
}

/* Programmatic heading focus keeps its scroll anchor without a decorative frame. */
.dr-highlights #dr-highlights-title:focus{outline:none}

.conversation-mode .conversation-welcome.is-entry-leaving{animation-duration:var(--ai-motion-ui)}
.conversation-mode .conversation-preference-panel{transform:translateY(6px);transition:opacity var(--ai-motion-ui) var(--ai-ease),transform var(--ai-motion-ui) var(--ai-ease)}
.conversation-mode .conversation-preference-panel.is-open{transform:translateY(0)}

/* Information roles: detail in result cards, status in the agent rail. */
.conversation-mode .conversation-agent-step:not(.is-current) .conversation-agent-step-body>p,
.conversation-mode .conversation-agent-summary>p[hidden],
.conversation-mode #conversation-live-motion,
.conversation-mode .conversation-rail .conversation-artifact-copy>small,
.conversation-mode .conversation-audience-meta[hidden]{display:none!important}
.conversation-mode #conversation-tasks .conversation-agent-step{padding-block:6px 8px}
.conversation-mode #conversation-tasks .conversation-agent-step:not(:last-child)::after{top:30px;bottom:-2px}
.conversation-mode #conversation-tasks .is-done strong{color:#78857d;font-weight:400}
.conversation-mode #conversation-tasks .is-current strong{font-weight:600;color:var(--ai-green)}
.conversation-mode #conversation-process:not([open]) .is-running>.conversation-agent-icon::before{animation:none}
.conversation-mode #workflow-confirm-details .send-validation-result[data-state="pass"] p,
.conversation-mode #workflow-confirm-details .send-validation-ready{display:none}
.conversation-mode #workflow-confirm-details .send-validation-result[data-state="pass"]{min-height:48px}
/* Completed preparation remains accessible in its original history/details. */
.conversation-mode .conversation-shell[data-state="executed"] .conversation-rail #conversation-process{color:var(--ai-muted)}

/* After sending, the existing result index opens preparation snapshots on demand. */
.conversation-mode .conversation-shell[data-phase="result"] #conversation-timeline :is(.conversation-audience-result,.conversation-message-draft,.artifact-final),
.conversation-mode .conversation-shell[data-phase="result"] #conversation-timeline .conversation-response[data-preparation="true"]{display:none}

/* Large desktop content: a 10% wider reading measure and one numeric hierarchy.
   Breakpoint uses the messaging iframe width, leaving compact/mobile layouts intact. */
@media(min-width:1024px){
 .conversation-mode,.dr-report{--ai-content-max:880px;--ai-number-size:40px;--ai-number-line:48px}
 .conversation-mode .conversation-shell:not(.has-detail) .conversation-scroll{padding-inline:max(24px,calc((100% - var(--ai-content-max))/2))}
 .conversation-mode .conversation-shell:not(.has-detail) .conversation-turn,
 .conversation-mode .conversation-shell:not(.has-work) .conversation-welcome,
 .conversation-mode .conversation-shell:not(.has-detail) #conversation-form{max-width:var(--ai-content-max)}
 .conversation-mode #conversation-timeline .conversation-response-decision{font-size:18px;line-height:28px}
 .conversation-mode #conversation-timeline :is(.conversation-audience-heading h3,.conversation-message-draft h3){font-size:16px;line-height:24px}
 .conversation-mode #conversation-timeline .conversation-artifact-copy>strong{font-size:18px;line-height:26px}
 .conversation-mode #conversation-timeline .conversation-audience-name{font-size:18px;line-height:28px}
 .conversation-mode #conversation-timeline .conversation-audience-number{font-size:var(--ai-number-size);line-height:var(--ai-number-line)}
 .conversation-mode #conversation-timeline .conversation-draft-subject{font-size:16px;line-height:26px}
 .conversation-mode #conversation-timeline .conversation-draft-body p{font-size:15px;line-height:26px}
 .conversation-mode #conversation-timeline .conversation-draft-body{max-height:130px}
 .conversation-mode #conversation-timeline .conversation-result-stats b{font-size:32px;line-height:40px;font-variant-numeric:tabular-nums}
 .conversation-mode #workflow-confirm header h2{font-size:24px;line-height:32px}
 .conversation-mode #workflow-confirm-details .send-validation-summary strong{font-size:20px;line-height:28px}
 .conversation-mode #workflow-confirm .send-approval-summary strong{font-size:18px;line-height:26px}
 .conversation-mode #workflow-confirm .send-result-summary h3{font-size:24px;line-height:32px}
 .conversation-mode #workflow-confirm .send-result-metrics strong,
 .dr-report .dr-highlight-kpi:not(.is-unknown)>strong{font-size:var(--ai-number-size);line-height:var(--ai-number-line);font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.8px}
 .dr-report .dr-highlights header h3{font-size:24px;line-height:32px}
 .dr-report .dr-highlight-summary{font-size:17px;line-height:28px}
 .dr-report .dr-highlight-insight h4{font-size:18px;line-height:28px}
}

/* Final focus hierarchy. Presentation only: no new motion, timers or hidden data.
   Existing running/decision states restore equal result contrast on completion. */
.conversation-mode .conversation-shell[data-state="running"] #conversation-timeline>.conversation-artifact:not(.is-compact){filter:opacity(.82)}
.conversation-mode .conversation-shell[data-state="running"] #conversation-timeline>.conversation-artifact:not(.is-compact):not(:has(~.conversation-artifact)),
.conversation-mode .conversation-shell[data-state="running"] #conversation-timeline>.conversation-artifact:is(:hover,:focus-within){filter:none}
.conversation-mode .conversation-shell[data-state="running"] #conversation-form:is(:not(:focus-within),:has(#conversation-input:placeholder-shown)){border-color:#e6ebe8;box-shadow:none}
.conversation-mode .conversation-shell[data-state="running"] #conversation-form:is(:not(:focus-within),:has(#conversation-input:placeholder-shown)):not(.is-ai-activating)::before{opacity:0}
.conversation-mode .conversation-shell[data-state="running"] #conversation-form:is(:not(:focus-within),:has(#conversation-input:placeholder-shown)) :is(.conversation-example,.conversation-input-spark){opacity:.8}
.conversation-mode .conversation-shell[data-state="running"] #conversation-form:is(:not(:focus-within),:has(#conversation-input:placeholder-shown)) #conversation-input{color:#65756b;font-weight:500}
.conversation-mode .conversation-shell.has-work #conversation-timeline .conversation-speaker{font-weight:500;color:#68796e}
.conversation-mode .conversation-rail h2{font-weight:600;color:#52665a}
.conversation-mode .conversation-agent-summary>strong{font-weight:500;color:#52665a}
.conversation-mode .conversation-agent-summary[data-state="running"]>strong{font-weight:600;color:var(--ai-green)}
.conversation-mode #conversation-tasks .is-done{opacity:.82}
.conversation-mode #conversation-tasks .is-done strong{color:#64776a;font-weight:400}
.conversation-mode #conversation-tasks .is-done :is(p,small){color:#7c8981}
.conversation-mode #conversation-tasks .is-done>.conversation-agent-icon{background:#f7f9f8;border-color:#edf1ee;color:#6b8e77}
.conversation-mode #conversation-tasks .is-waiting strong{color:#7b887f;font-weight:400}
.conversation-mode .conversation-rail .conversation-artifact-copy>strong{font-weight:500;color:#5a6c60}
.conversation-mode .conversation-rail .conversation-artifact.is-active{background:#f7faf8}
.conversation-mode .conversation-rail .conversation-artifact.is-active .conversation-artifact-copy>strong{color:#355b44}
.conversation-mode .conversation-shell.is-finished #conversation-live-open{background:#fafcfb;border-color:#e5ebe7;color:#536b5c}
/* The existing next action owns primary emphasis; typing activates the composer. */
.conversation-mode .conversation-shell:has(#conversation-next .next-button) #conversation-form:is(:not(:focus-within),:has(#conversation-input:placeholder-shown)) #conversation-submit{background:#f1f4f2;color:#577062;box-shadow:none}
.conversation-mode #conversation-pause.is-stop{background:#f4f6f5;border-color:#dfe6e2;color:#496254;box-shadow:none}
.conversation-mode #conversation-next .top-button{background:#fff;border-color:#dfe6e2;color:#5b6d61;box-shadow:none}
/* A stable approval surface: title/status first, details and decoration second. */
#workflow-confirm .send-sim-scene{filter:opacity(.82)}
#workflow-confirm .send-verification-heading p{color:#6c7b72}
#workflow-confirm .send-validation-summary strong{color:var(--ai-ink)}
#workflow-confirm .send-validation-result{border-color:#e8edea;background:#fbfcfb}
#workflow-confirm .send-validation-result h3{color:#506356;font-weight:500}
#workflow-confirm .send-validation-result p{color:#718078}
#workflow-confirm .send-approval-checks li[data-state="done"]{color:#5a7062}
#workflow-confirm #workflow-confirm-back{background:#fff;border-color:#dfe6e2;color:#5b6d61;box-shadow:none}
#workflow-confirm #workflow-confirm-run:disabled{background:#edf0ee;border-color:#e3e8e5;color:#79877e;box-shadow:none}
#workflow-confirm #workflow-confirm-run:not(:disabled){background:#127b45;border-color:#127b45;color:#fff}
#workflow-confirm .send-result-summary h3{color:var(--ai-ink)}
#workflow-confirm[data-result-state="success"] .send-result-icon{background:transparent;color:var(--ai-green)}
#workflow-confirm .send-result-metrics{border-color:#edf1ee}
#workflow-confirm[data-result-state] .send-result-detail-body{color:#6c7b72}
#workflow-confirm[data-result-state] .send-result-detail-body :is(.send-sim-steps,.send-sim-caption){filter:opacity(.8)}
/* KPI emphasis continues into the report, without giving the campaign/logs
   another competing hero or a second primary action. */
.dr-report .dr-highlights{border-color:#e5ebe7}
.dr-report .dr-highlight-insight{background:#f7faf8;border-color:#d0dfd6}
.dr-report .dr-highlight-insight h4{font-weight:500}
.dr-report :is(.dr-header,.dr-panel,.dr-basis,.dr-next){border-color:#edf0ee}
.dr-report .dr-title h2{color:#52665a;font-weight:600}
.dr-report .dr-panel h3{color:#53675b;font-weight:500}
.dr-report :is(.dr-note,.dr-scope,.dr-foot){color:#718078}
.dr-report .dr-tabs button[aria-selected="true"]{color:#496b56;border-color:#a9c3b2}
body:has(.dr-report) .ops-top [data-action="new"]{background:#fff;border:1px solid #dfe6e2;color:#5b6d61;box-shadow:none}
@media(min-width:1024px){.dr-report .dr-title h2{font-size:22px}}

/* Timing polish only: four existing checks complete in 800ms, then approval
   waits for a one-second reading hold managed by the existing reveal timer. */
#workflow-confirm-details .send-validation-results[data-animate="true"] .send-validation-badge{animation-duration:200ms}
#workflow-confirm-details .send-validation-results[data-animate="true"] .send-validation-result:nth-child(2) .send-validation-badge{animation-delay:200ms}
#workflow-confirm-details .send-validation-results[data-animate="true"] .send-validation-result:nth-child(3) .send-validation-badge{animation-delay:400ms}
#workflow-confirm-details .send-validation-results[data-animate="true"] .send-validation-result:nth-child(4) .send-validation-badge{animation-delay:600ms}

#send-verification,#send-simulation-content{transition-duration:200ms}

/* Step view only: current work owns the emphasis; channels are secondary. */
.messaging-surface.aim-page:not(.conversation-mode) .aim-editor-column>.aim-workflow-bar{background:#fff}
.messaging-surface.message-anchored.aim-page:not(.conversation-mode)>main>.top-flow{background:#fff}
.aim-page:not(.conversation-mode) #workflow-steps button{
 color:#8a948e;background:transparent;box-shadow:none;
 transition:background-color 250ms ease,color 250ms ease;
}
.aim-page:not(.conversation-mode) #workflow-steps button::before{
 background:#e3e8e5;transition:background-color 250ms ease;
}
.aim-page:not(.conversation-mode) #workflow-steps button[data-connector="complete"]::before{background:#a5c7b3}
.aim-page:not(.conversation-mode) #workflow-steps strong{font-weight:500}
.aim-page:not(.conversation-mode) #workflow-steps small{color:#939d96;font-weight:400}
.aim-page:not(.conversation-mode) #workflow-steps .workflow-step-number{
 color:#89958e;border-color:#e0e6e2;background:#fff;box-shadow:none;
 transition:background-color 250ms ease,border-color 250ms ease,color 250ms ease;
}
.aim-page:not(.conversation-mode) #workflow-steps button[data-state="complete"]{color:#71887a}
.aim-page:not(.conversation-mode) #workflow-steps button[data-state="complete"] .workflow-step-number{
 background:#f0f6f2;border-color:#dce9e0;color:#6f987f;
 animation:ai-fade 220ms ease both;
}
.aim-page:not(.conversation-mode) #workflow-steps button:is([data-state="current"],[data-state="attention"]){background:#edf6f0;color:#107441}
.aim-page:not(.conversation-mode) #workflow-steps button:is([data-state="current"],[data-state="attention"]) strong{font-weight:600}
.aim-page:not(.conversation-mode) #workflow-steps button:is([data-state="current"],[data-state="attention"]) .workflow-step-number{
 background:#137c47;border-color:#137c47;color:#fff;box-shadow:none;
}
.aim-page:not(.conversation-mode) #workflow-steps button:is([data-state="current"],[data-state="attention"]) small{color:#137447;font-weight:600}
.aim-page:not(.conversation-mode) #workflow-steps button:not(:disabled):hover{background:#f4f7f5}
.aim-page:not(.conversation-mode) #workflow-steps button[aria-current="step"]:hover{background:#e6f2eb}
.aim-page:not(.conversation-mode) .aim-channel-bar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
.aim-page:not(.conversation-mode) .aim-channel-tabs{gap:6px}
.aim-page:not(.conversation-mode) .aim-channel-tabs .aim-channel-button{
 min-height:34px;padding:5px 10px;gap:6px;border-radius:8px;
 background:#fff;border:1px solid #dfe6e1;color:#65736a;font-size:13px;font-weight:500;box-shadow:none;
 transition:background-color 200ms ease,border-color 200ms ease,color 200ms ease;
}
.aim-page:not(.conversation-mode) .aim-channel-button img{width:17px;height:17px}
.aim-page:not(.conversation-mode) .aim-channel-button[aria-pressed="true"]{background:#f0f7f3;border-color:#92bca4;color:#236a44;font-weight:600}
.aim-page:not(.conversation-mode) .aim-channel-button:not(:disabled):hover{border-color:#a6b8ad}
.aim-page:not(.conversation-mode) .aim-channel-button:focus-visible,
.aim-page:not(.conversation-mode) .aim-channel-sub select:focus-visible{outline:2px solid #137c47;outline-offset:2px}
.aim-page:not(.conversation-mode) .aim-channel-sub{display:contents}
.aim-page:not(.conversation-mode) .aim-channel-sub label{gap:7px;color:#76847b;font-size:12px;font-weight:400}
.aim-page:not(.conversation-mode) .aim-channel-sub select{
 box-sizing:border-box;min-height:34px;padding:5px 28px 5px 10px;
 border:1px solid #dfe6e1;border-radius:8px;background-color:#fff;
 color:#344e3e;font-size:13px;font-weight:500;box-shadow:none;
}
.aim-page:not(.conversation-mode) #ai-channel-help{flex-basis:100%;color:#7d8981;font-size:12px;line-height:1.5}
@media(prefers-reduced-motion:reduce){
 .aim-page:not(.conversation-mode) #workflow-steps button,
 .aim-page:not(.conversation-mode) #workflow-steps button::before,
 .aim-page:not(.conversation-mode) #workflow-steps .workflow-step-number,
 .aim-page:not(.conversation-mode) .aim-channel-button{transition:none;animation:none}
}

/* Central step workspace only. Shared progress, preview and composer are untouched. */
.aim-page:not(.conversation-mode) #ai-workflow{
 --step-space-heading:10px;--step-space-description:8px;--step-space-section:18px;--step-space-support:14px;
 --step-border:#dfe6e1;--step-border-soft:#edf1ee;--step-ink:#283c30;--step-muted:#6b786f;
 color:var(--step-ink);
}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-heading{font-size:12px;line-height:1.5;color:#137448}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-heading small{font-size:12px;color:var(--step-muted);font-weight:400}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-title{display:block;margin:var(--step-space-heading) 0 var(--step-space-description);font-size:24px;font-weight:600;line-height:1.4;letter-spacing:-.4px}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-help{display:block;margin:0 0 var(--step-space-section);font-size:13px;line-height:1.6;color:#6b786f}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-completed{gap:6px;margin:0 0 var(--step-space-support)}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-completed button{padding:5px 9px;border:1px solid transparent;border-radius:6px;background:#f4f7f5;color:#6b786f;font-size:12px;line-height:1.4;font-weight:400;transition:border-color 180ms ease,color 180ms ease}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-completed button:hover{border-color:#c7d8cd;color:#426b52}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-feedback{min-height:0;margin:0 0 var(--step-space-support);padding:0;border:0;border-radius:0;background:transparent;color:#687b6e;font-size:12px;line-height:1.6}
.aim-page:not(.conversation-mode) #ai-workflow:is([data-status="error"],[data-status="input-needed"]) #workflow-feedback{padding:10px 12px;border:1px solid #ecd9b0;border-radius:8px;background:#fffbf2;color:#785921}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-stage-body{padding:0;min-height:0}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-stage-body>section,
.aim-page:not(.conversation-mode) #ai-workflow #workflow-editor-slot{margin-bottom:var(--step-space-support)}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-goal{padding:0 0 12px;margin:0 0 var(--step-space-support);background:transparent;border:0;border-bottom:1px solid var(--step-border-soft);border-radius:0}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-goal summary{font-size:12px;font-weight:500;color:#6b786f}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-goal blockquote{margin:8px 0 0;padding-left:10px;border-left:2px solid #e0e8e2;font-size:13px;line-height:1.65;color:#64756a}
.aim-page:not(.conversation-mode) #ai-workflow :is(.workflow-facts,.workflow-audience-card,.workflow-review-summary,.workflow-fields,#workflow-live-work,#draft-result){box-sizing:border-box;background:#fff;border:1px solid var(--step-border);border-radius:14px;padding:16px 18px;box-shadow:none}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-facts{margin:0}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-facts>div{padding:12px 0;border-color:var(--step-border-soft)}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-facts>div:last-child{border-bottom:0}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-facts dt{font-size:12px;color:var(--step-muted)}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-facts dd{font-size:14px;font-weight:500;line-height:1.65;color:var(--step-ink)}
.aim-page:not(.conversation-mode) #ai-workflow h3{font-size:14px;font-weight:600;margin:0 0 12px;line-height:1.5}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-direction-title{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-ai-source{display:inline-flex;align-items:center;gap:4px;padding:3px 6px;border-radius:5px;background:#f0f7f3;color:#638571;font-size:11px;font-weight:500;line-height:1.3}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-note{font-size:12px;line-height:1.65;color:#6b786f;margin:12px 0}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-audience-card>span{display:inline-block;padding:3px 7px;border-radius:5px;background:#f4f7f5;color:#748279;font-size:11px;margin-bottom:10px}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-audience-card strong{color:var(--step-ink);font-size:32px;font-weight:600;line-height:1.3}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-audience-card p{font-size:13px;color:#6b786f;margin:10px 0 0;line-height:1.6}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-people{margin:var(--step-space-support) 0;padding:0}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-people li{border-color:var(--step-border-soft);color:#738078;font-size:12px}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-people strong{font-weight:500;color:#5a6c60}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-live-work{max-height:370px}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-live-head{color:#607267}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-live-head>span{background:#f0f7f3;color:#638571;font-weight:500}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-live-head strong{font-size:13px;font-weight:500}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-live-intent{color:#6b786f;font-size:12px;margin:8px 0 12px}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-live-output{border:0;border-radius:0;padding:0;background:transparent;font-size:14px}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-live-output:empty{background:#f8faf9;border-radius:8px}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-live-output>p{padding:0;border:0;border-radius:0;background:transparent;color:#67796d}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-live-head>span::before{content:"✦";margin-right:4px}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-review-customers{gap:0;margin:var(--step-space-support) 0}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-review-summary{color:var(--step-ink);font-size:15px}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-customer-check{padding:12px 2px;border:0;border-bottom:1px solid var(--step-border-soft);border-radius:0;background:transparent;gap:6px;transition:background-color 180ms ease}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-customer-check:hover{background:#f8faf9}
.aim-page:not(.conversation-mode) #ai-workflow button:focus-visible{outline:2px solid #137c47;outline-offset:2px}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-customer-check p{color:#67786c;font-size:13px}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-customer-check span{color:#73867a}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-condition-facts{gap:12px 16px;margin:0 0 var(--step-space-section)}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-condition-facts>div{padding:0 0 12px;border:0;border-bottom:1px solid var(--step-border-soft);border-radius:0;background:transparent;gap:6px}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-condition-facts strong{font-size:13px;font-weight:500;color:#526858}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-condition-facts small,
.aim-page:not(.conversation-mode) #ai-workflow #workflow-condition-facts p{color:#6b786f}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-sender{padding:0;gap:8px;margin:0 0 var(--step-space-support);font-size:13px}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-sender strong{font-size:13px;font-weight:500}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-fields{margin:0 0 var(--step-space-support)}
.aim-page:not(.conversation-mode) #ai-workflow :is(input:not([type="checkbox"]),select,textarea){box-sizing:border-box;min-height:38px;padding:8px 11px;border:1px solid #dfe6e1;border-radius:8px;background:#fff;color:#334b3b;font:inherit;font-size:13px;line-height:1.6;box-shadow:none;transition:border-color 180ms ease,background-color 180ms ease,box-shadow 180ms ease}
.aim-page:not(.conversation-mode) #ai-workflow :is(input:not([type="checkbox"]),select,textarea):hover:not(:disabled){border-color:#b9c9be}
.aim-page:not(.conversation-mode) #ai-workflow :is(input:not([type="checkbox"]),select,textarea):focus{outline:2px solid #dbece2;outline-offset:1px;border-color:#6ba282;box-shadow:none}
.aim-page:not(.conversation-mode) #ai-workflow input[type="checkbox"]{accent-color:#137c47}
.aim-page:not(.conversation-mode) #ai-workflow :is(#workflow-ab,#workflow-fallback){border-color:var(--step-border-soft);padding:12px 0}
.aim-page:not(.conversation-mode) #ai-workflow :is(#workflow-ab,#workflow-fallback) summary{font-weight:500;color:#5a6f60}
.aim-page:not(.conversation-mode) #ai-workflow :is(#workflow-ab-content,#workflow-fallback-content) p{border:0;background:#f7f9f8;color:#66776b}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-cost{font-size:14px;font-weight:500;margin:var(--step-space-support) 0 8px}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final-state{display:block;font-size:14px;font-weight:500;color:#5a7464;margin:0 0 var(--step-space-support)}
.aim-page:not(.conversation-mode) #ai-workflow[data-checked="true"] #workflow-final-state::before{content:"✓";color:#448361;margin-right:7px;animation:ai-fade 180ms ease both}
.aim-page:not(.conversation-mode) #ai-workflow[data-checked="true"] #workflow-final{animation:step-surface-confirm 180ms ease-out both}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-template-actions{align-items:center;gap:10px;margin:0 0 12px}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-content-status{font-size:12px;color:#6b786f}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-image-progress{border:0;border-radius:0;background:transparent;padding:0;margin:0 0 var(--step-space-support)}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-image-slot{height:128px;background:#f7f9f8;border-radius:8px}
.aim-page:not(.conversation-mode) #ai-workflow .aim-editor-surface{border:0;box-shadow:none;background:transparent}
.aim-page:not(.conversation-mode) #ai-workflow #draft-editor{font-size:14px;line-height:1.75}
.aim-page:not(.conversation-mode) #ai-workflow .aim-editor-help{font-size:12px;color:#6b786f}
.aim-page:not(.conversation-mode) #ai-workflow :is(.top-button,.next-button){min-height:34px;padding:7px 11px;border-radius:8px;font-size:12px;line-height:1.5;box-shadow:none;transition:background-color 180ms ease,border-color 180ms ease}
.aim-page:not(.conversation-mode) #ai-workflow .top-button{background:#fff;border:1px solid #dfe6e1;color:#617267;font-weight:500}
.aim-page:not(.conversation-mode) #ai-workflow .top-button:hover:not(:disabled){background:#f7f9f8;border-color:#bbcec2}
.aim-page:not(.conversation-mode) #ai-workflow .next-button{background:#137c47;border:1px solid #137c47;color:#fff;font-weight:600}
.aim-page:not(.conversation-mode) #ai-workflow .next-button:disabled{background:#f0f3f1;border-color:#e4e9e6;color:#99a49c}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-footer{margin-top:var(--step-space-support);padding:var(--step-space-support) 0 32px;gap:8px;border-color:var(--step-border-soft)}
.aim-page:not(.conversation-mode) #ai-workflow .aim-change-focus{outline:0;animation:step-surface-confirm 180ms ease-out both}
@keyframes step-surface-confirm{from{border-color:#71a688}to{border-color:#dfe6e1}}
@media(max-width:800px){
 .aim-page:not(.conversation-mode) #ai-workflow #workflow-title{font-size:21px}
 .aim-page:not(.conversation-mode) #ai-workflow :is(.workflow-facts,.workflow-audience-card,.workflow-review-summary,.workflow-fields,#workflow-live-work,#draft-result){padding:14px}
}
@media(prefers-reduced-motion:reduce){
 .aim-page:not(.conversation-mode) #ai-workflow :is(input,select,textarea,button){transition:none}
 .aim-page:not(.conversation-mode) #ai-workflow[data-checked="true"] #workflow-final,
 .aim-page:not(.conversation-mode) #ai-workflow[data-checked="true"] #workflow-final-state::before,
 .aim-page:not(.conversation-mode) #ai-workflow .aim-change-focus{animation:none}
}

/* The step preview is one result surface; channel content stays inside it. */
.messaging-surface.aim-page:not(.conversation-mode) .aim-preview-panel .right-card{
 padding:18px 16px;border:1px solid #e0e6e2;border-radius:14px;background:#fff;box-shadow:none;
}
.aim-page:not(.conversation-mode) .aim-preview-panel #preview-title{font-size:20px;line-height:1.4;font-weight:650;gap:8px}
.aim-page:not(.conversation-mode) .aim-preview-panel #preview-description{margin:6px 0 14px;font-size:12px;line-height:1.6;color:#738077}
.aim-page:not(.conversation-mode) .aim-preview-panel .composer-channel-badge{font-size:11px;font-weight:600;border-color:#dce8e0;background:#f1f7f3;padding:3px 8px}
.aim-page:not(.conversation-mode) .aim-preview-panel .aim-preview-label{font-size:12px;font-weight:500;color:#738077;margin:0 0 8px}
.aim-page:not(.conversation-mode) .aim-preview-panel #recipient-shortcuts{gap:6px;margin:0 0 8px}
.aim-page:not(.conversation-mode) .aim-preview-panel #recipient-shortcuts button{min-height:32px;padding:6px 10px;font-size:12px;font-weight:500;border:1px solid #e0e6e2;border-radius:8px;box-shadow:none}
.aim-page:not(.conversation-mode) .aim-preview-panel #recipient-shortcuts button[aria-pressed="true"]{background:#edf6f0;border-color:#80ad91;color:#186f43;font-weight:600}
.aim-page:not(.conversation-mode) .aim-preview-panel #preview-evidence{margin:4px 0 8px;font-size:11px;color:#748078;border-color:#edf0ee}
.aim-page:not(.conversation-mode) .aim-preview-panel #channel-preview{margin:0;overflow:visible}
.aim-page:not(.conversation-mode) .aim-preview-panel .aim-preview-scroll{padding-top:10px}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-mail-inbox{border:0;border-radius:10px;background:#f6f8f7;padding:12px 14px;margin:0 0 12px;box-shadow:none}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-mail-inbox strong{font-size:16px;line-height:1.55;font-weight:650;overflow-wrap:anywhere}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-mail-inbox :is(span,small){font-size:11px;line-height:1.6;color:#78827c}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-email-stage{padding:0;border:0;border-radius:10px;background:#f6f8f7;box-shadow:none;overflow:hidden}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-sms-phone{border-width:3px;border-color:#43554b;box-shadow:none}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-sms-summary{font-size:11px;margin:0 auto 12px;gap:8px}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-sms-summary strong{background:#f0f6f2;border-radius:6px;font-size:11px}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-sms-bubble{background:#f1f4f2;font-size:14px;line-height:1.75;padding:12px;box-shadow:none}
.aim-page:not(.conversation-mode) .aim-preview-panel :is(.tpl-sms-bubble h3,.tpl-sms-bubble>strong,.kc-title,.tpl-rich-push>strong){font-size:16px;line-height:1.5;font-weight:650}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-sms-bubble>strong{display:block;margin-bottom:10px}
.aim-page:not(.conversation-mode) .aim-preview-panel :is(.tpl-sms-bubble img,.kc-image,.tpl-push-big-image){object-fit:contain;border-radius:10px}
.aim-page:not(.conversation-mode) .aim-preview-panel .tpl-sms-bubble img{width:100%;height:auto;max-height:none;margin-bottom:10px}
.aim-page:not(.conversation-mode) .aim-preview-panel :is(.kc-bubble,.tpl-rich-push){box-shadow:none}
.aim-page:not(.conversation-mode) .aim-preview-panel .aim-preview-count{text-align:left;font-size:11px;line-height:1.5;color:#7e8982;margin-top:12px}
.aim-page:not(.conversation-mode) .aim-preview-panel .aim-preview-note{font-size:11px;line-height:1.6;color:#89938c;margin:6px 0 0}
.aim-page:not(.conversation-mode) .aim-preview-panel .workflow-empty-preview{border:0;border-radius:10px;background:#f7f9f8;min-height:280px;margin:8px 0;max-width:none;padding:24px 16px;box-shadow:none}
.aim-page:not(.conversation-mode) .aim-preview-panel .workflow-empty-surface{border:0;background:transparent}
.step-preview-chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:12px}
.step-preview-chips span{padding:4px 7px;border-radius:5px;background:#f0f5f2;color:#6b7c71;font-size:10px;line-height:1.4;white-space:nowrap}
.step-preview-chips[hidden],.conversation-mode .step-preview-chips{display:none}
@media(max-width:740px){.messaging-surface.aim-page:not(.conversation-mode) .aim-preview-panel .right-card{padding:16px}}

/* Step preparation CTA roles. Keep navigation, channel controls, preview and Copilot untouched. */
.aim-page:not(.conversation-mode){
 --step-cta-height:36px;--step-cta-radius:8px;--step-cta-padding:12px;
 --step-cta-green:#137c47;--step-cta-border:#dfe6e1;
}
.aim-page:not(.conversation-mode) :is(#ai-workflow,#empty-state,#channel-guidance,.aim-review-actions,#workflow-confirm,.top-actions) :is(.top-button,.next-button){
 box-sizing:border-box;min-height:var(--step-cta-height);padding:7px var(--step-cta-padding);
 border:1px solid var(--step-cta-border);border-radius:var(--step-cta-radius);
 font-size:12px;font-weight:500;line-height:20px;box-shadow:none;transform:none;animation:none;
 transition:background-color 180ms ease,border-color 180ms ease,color 180ms ease,opacity 180ms ease;
}
.aim-page:not(.conversation-mode) :is(#ai-workflow,#empty-state,#channel-guidance,.aim-review-actions,#workflow-confirm,.top-actions) .top-button{
 background:#fff;color:#596960;
}
.aim-page:not(.conversation-mode) :is(#ai-workflow,#empty-state,#channel-guidance,.aim-review-actions,#workflow-confirm,.top-actions) .top-button:hover:not(:disabled){
 background:#f6f8f7;border-color:#bdcbc2;box-shadow:none;transform:none;
}
.aim-page:not(.conversation-mode) :is(#ai-workflow,#empty-state,#channel-guidance,.aim-review-actions,#workflow-confirm,.top-actions) .next-button{
 background:var(--step-cta-green);border-color:var(--step-cta-green);color:#fff;font-weight:600;
}
.aim-page:not(.conversation-mode) :is(#ai-workflow,#empty-state,#channel-guidance,.aim-review-actions,#workflow-confirm,.top-actions) .next-button:hover:not(:disabled){
 background:#106d3e;border-color:#106d3e;box-shadow:none;transform:none;
}
.aim-page:not(.conversation-mode) #ai-workflow :is(#workflow-auto,#workflow-auto-stop,#workflow-direct,#workflow-save,#workflow-image-simulate,#workflow-sender-open),
.aim-page:not(.conversation-mode) #workflow-confirm header .top-button{
 background:transparent;border-color:transparent;color:#748079;font-weight:500;
}
.aim-page:not(.conversation-mode) #ai-workflow :is(#workflow-auto,#workflow-auto-stop,#workflow-direct,#workflow-save,#workflow-image-simulate,#workflow-sender-open):hover:not(:disabled),
.aim-page:not(.conversation-mode) #workflow-confirm header .top-button:hover:not(:disabled){
 background:#f3f6f4;border-color:transparent;color:#475e50;
}
.aim-page:not(.conversation-mode) :is(#ai-workflow,#empty-state,#channel-guidance,.aim-review-actions,#workflow-confirm,.top-actions) :is(.top-button,.next-button):disabled{
 background:#f0f3f1;border-color:#e4e9e6;color:#929e96;opacity:1;cursor:not-allowed;box-shadow:none;animation:none;
}
.aim-page:not(.conversation-mode) :is(#ai-workflow,#empty-state,#channel-guidance,.aim-review-actions,#workflow-confirm,.top-actions) :is(.top-button,.next-button):focus-visible{
 outline:2px solid var(--step-cta-green);outline-offset:3px;
}
.aim-page:not(.conversation-mode) #workflow-confirm #workflow-confirm-run[data-approval="ready"]:not(:disabled){animation:none;box-shadow:none}
@media(prefers-reduced-motion:reduce){
 .aim-page:not(.conversation-mode) :is(#ai-workflow,#empty-state,#channel-guidance,.aim-review-actions,#workflow-confirm,.top-actions) :is(.top-button,.next-button){transition:none}
}

/* Modal IDs have legacy rules; use the same role tokens here too. */
.aim-page:not(.conversation-mode) #workflow-confirm #workflow-confirm-run:not(:disabled){background:var(--step-cta-green);border-color:var(--step-cta-green);color:#fff}
.aim-page:not(.conversation-mode) #workflow-confirm #workflow-confirm-run:hover:not(:disabled){background:#106d3e;border-color:#106d3e}
.aim-page:not(.conversation-mode) #workflow-confirm #workflow-confirm-run:disabled{background:#f0f3f1;border-color:#e4e9e6;color:#929e96;opacity:1;cursor:not-allowed}
.aim-page:not(.conversation-mode) #workflow-confirm #workflow-confirm-back{border-color:var(--step-cta-border);color:#596960}
.aim-page:not(.conversation-mode) .aim-new-message-dialog button{min-height:var(--step-cta-height);padding:7px var(--step-cta-padding);border-radius:var(--step-cta-radius);font-size:12px;line-height:20px;font-weight:500;box-shadow:none}
.aim-page:not(.conversation-mode) .aim-new-message-dialog [data-new]{background:#fff;border-color:#e2cfca;color:#996358}
.aim-page:not(.conversation-mode) .aim-new-message-dialog button:focus-visible{outline:2px solid var(--step-cta-green);outline-offset:3px}

/* Final review only: one settings summary, with the message itself in the preview. */
.aim-page:not(.conversation-mode) .aim-composer:has(#ai-workflow[data-phase="5"]){height:auto}
.aim-page:not(.conversation-mode) #ai-workflow[data-phase="5"] .workflow-stage-body{flex:none;max-height:none;overflow:visible}
.aim-page:not(.conversation-mode) #ai-workflow[data-phase="5"] #workflow-completed{display:none}
.aim-page:not(.conversation-mode) #ai-workflow[data-phase="5"][data-status="decision"] #workflow-feedback{display:none}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px;padding:8px 18px;background:#fff;border:1px solid #dfe6e1;border-radius:14px;box-shadow:none}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary>div{grid-template-columns:68px minmax(0,1fr);align-items:start;gap:10px;padding:15px 0;border-bottom:1px solid #edf1ee}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary>div:last-child{grid-column:1/-1;border-bottom:0}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary dt{display:flex;flex-direction:column;align-items:flex-start;gap:5px;font-size:12px;line-height:1.6;color:#748078}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary dd{display:flex;align-items:baseline;gap:8px;margin:0;font-size:15px;line-height:1.6;font-weight:500;color:#2e4335;min-width:0}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-final-value{flex:1;min-width:0;overflow-wrap:anywhere}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-final-source{font-size:10px;line-height:1.5;font-weight:400;background:#f2f5f3;border-radius:4px;padding:1px 5px;color:#7b8980}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-final-edit{flex:none;min-height:28px;padding:3px 4px;border:0;border-radius:4px;background:transparent;color:#7c8981;font:inherit;font-size:11px;font-weight:400;line-height:1.5;cursor:pointer;box-shadow:none;transition:background-color 180ms ease,color 180ms ease}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-final-edit:hover:not(:disabled){background:#f4f7f5;color:#486352}
.aim-page:not(.conversation-mode) #ai-workflow .workflow-final-edit:disabled{color:#a4aea7;cursor:not-allowed}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary #workflow-final-state{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:13px;font-weight:500;line-height:1.6;color:#63816d}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary #workflow-final-state::before{content:"✓";margin:0;color:#63816d;animation:none}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary #workflow-final-state[data-state="needs"]{color:#826b3d}
.aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary #workflow-final-state[data-state="needs"]::before{content:"⚠";color:#a18a56}
.aim-page:not(.conversation-mode) #ai-workflow[data-phase="5"] #workflow-issues:empty{display:none}
.aim-page:not(.conversation-mode) #ai-workflow[data-phase="5"] .workflow-note{margin:12px 0 0;font-size:11px;color:#7c8980}
@media(max-width:800px){
 .aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary{grid-template-columns:1fr;padding:4px 14px;gap:0}
 .aim-page:not(.conversation-mode) #ai-workflow #workflow-final.workflow-final-summary>div{grid-template-columns:76px minmax(0,1fr);padding:12px 0}
}

/* Step-mode verification only; the send/result modal states retain their styles. */
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"]{border-radius:var(--ai-modal-radius);box-shadow:0 14px 40px rgba(25,48,36,.12)}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"]::backdrop{background:rgba(26,43,34,.24)}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] header{padding:20px 24px;align-items:flex-start}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-confirm-eyebrow{font-weight:500;color:#839087;letter-spacing:.03em;margin-bottom:6px}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] #send-verification-subtitle{font-size:12px;line-height:1.6;color:#738077;margin:6px 0 0}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] #send-sandbox-badge{background:#f4f6f5;color:#7d8981;border-color:#e6ebe8;font-size:10px;font-weight:400}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .workflow-confirm-body{padding:20px 24px;min-height:0}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-summary{gap:10px;margin:0 0 16px;background:transparent}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-mark{width:24px;height:24px;font-size:15px;background:transparent;color:#478064}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-summary strong{font-size:20px;line-height:1.4;font-weight:600;color:#2b4435}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-summary p{font-size:12px;line-height:1.6;color:#748078;margin:5px 0 0}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-summary[data-phase="checking"] :is(strong,.send-validation-mark){color:#6e8175}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-summary[data-phase="complete"] strong{animation:ai-fade 180ms ease-out both}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-results{gap:0;border:1px solid #e3e9e5;border-radius:12px;overflow:hidden}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result{position:relative;gap:12px;min-height:60px;padding:11px 14px;border:0;border-bottom:1px solid #edf1ee;border-radius:0;background:#fff}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result:last-child{border-bottom:0}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result>div{flex:1}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result strong{font-size:13px;font-weight:600;color:#405548}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result p{font-size:12px;line-height:1.6;margin:2px 0 0;color:#78847b}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-badge{font-size:11px;line-height:18px;padding:2px 6px;background:#f0f6f2;color:#568268;font-weight:500}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result[data-state="warning"] .send-validation-badge{background:#fbf5e9;color:#947946}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result[data-state="needs"]{background:#fcfcfb;box-shadow:inset 2px 0 #a5aba6}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result[data-state="needs"] .send-validation-badge{background:#f0f2f1;color:#536258}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-edit{min-height:28px;border:0;border-radius:4px;background:transparent;padding:3px 4px;font:inherit;font-size:11px;color:#697b70;cursor:pointer}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-edit:hover{background:#f0f4f1;color:#3e5b48}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-edit:focus-visible{outline:2px solid var(--step-cta-green);outline-offset:2px}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-details{margin-top:14px;padding-top:10px;border-color:#edf1ee}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-details>summary{font-size:11px;color:#7d8981}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] footer{padding:16px 24px}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-approval-summary strong{font-size:11px;font-weight:400;color:#7b8980;line-height:1.5}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-approval-summary p{font-size:14px;line-height:1.6;color:#354e3f;font-weight:500;margin:4px 0 14px;overflow-wrap:anywhere}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-approval-checks{display:none}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-approval-note{font-size:11px;color:#7d8981}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] #workflow-confirm-run[data-approval="ready"]:not(:disabled){animation:ai-fade 220ms ease-out both}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-results[data-animate="true"] .send-validation-badge{animation:ai-fade 150ms ease-out both;animation-delay:160ms}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-results[data-animate="true"] .send-validation-result:nth-child(2) .send-validation-badge{animation-delay:320ms}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-results[data-animate="true"] .send-validation-result:nth-child(3) .send-validation-badge{animation-delay:480ms}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-results[data-animate="true"] .send-validation-result:nth-child(4) .send-validation-badge{animation-delay:640ms}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-results[data-animate="true"][data-phase="checking"] .send-validation-result::after{content:"✦";position:absolute;right:28px;top:22px;color:#68967a;font-size:12px;pointer-events:none;animation:step-verification-current 160ms linear both}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-results[data-phase="checking"] .send-validation-result:nth-child(2)::after{animation-delay:160ms}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-results[data-phase="checking"] .send-validation-result:nth-child(3)::after{animation-delay:320ms}
.aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-results[data-phase="checking"] .send-validation-result:nth-child(4)::after{animation-delay:480ms}
@keyframes step-verification-current{0%,100%{opacity:0}25%,75%{opacity:.7}}
@media(max-height:760px){
 .aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] header,
 .aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .workflow-confirm-body{padding:16px 20px}
 .aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] footer{padding:12px 20px}
 .aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result{min-height:54px;padding:8px 12px}
}
@media(prefers-reduced-motion:reduce){
 .aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] .send-validation-result::after{display:none}
 .aim-page:not(.conversation-mode) #workflow-confirm[data-send-state="confirm"] :is(.send-validation-badge,.send-validation-summary strong,#workflow-confirm-run){animation:none!important}
}

/* Step completion: outcome first, then one clear route to the existing history. */
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .workflow-confirm-body{min-height:0}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-summary h3{font-size:22px;line-height:30px;font-weight:600;animation:ai-fade 200ms ease-out both}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-icon{width:24px;height:24px;background:transparent;font-size:15px}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state="pending"] .send-result-icon{animation:ai-stage-breathe 2.4s ease-in-out infinite!important}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-total{margin:16px 0 10px;color:var(--ai-muted)}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-metrics{gap:12px;padding:14px 0 16px;border-color:var(--ai-border)}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-metrics>div{animation:ai-fade 250ms ease-out both}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-metrics>div:nth-child(2){animation-delay:100ms}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-metrics>div:nth-child(3){animation-delay:200ms}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-metrics strong{font-size:var(--ai-number-size,36px);line-height:var(--ai-number-line,46px);font-weight:650}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-metrics [data-kind="success"] dd{color:var(--ai-green)}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-metrics [data-kind="failed"] dd{color:#a5655b}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] .send-result-metrics [data-kind="pending"] dd{color:#758179}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] footer{gap:10px;flex-wrap:wrap}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] footer :is(#send-result-new,#send-sim-history){min-height:36px;padding:7px 14px;border-radius:8px;font-size:13px;line-height:20px;font-weight:500;white-space:nowrap;box-shadow:none;animation:ai-fade 200ms ease-out both}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] #send-result-new{background:#fff;border-color:var(--ai-border);color:#637269}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] #send-result-new:hover{background:#f7f9f8}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] #send-sim-history{background:#127b45;border-color:#127b45;color:#fff}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] #send-sim-history:hover{background:#106d3e}
.aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] footer button:focus-visible{outline:2px solid var(--ai-green);outline-offset:3px}
/* History continuity is scoped to the list; detailed reports and logs retain their styling. */
.ops-page[data-view="history"] #ops-list{border-color:var(--ai-border)}
.ops-page[data-view="history"] #ops-list .ops-table :is(th,td){border-color:#e9eeeb}
.ops-page[data-view="history"] #ops-list .ops-status.completed{background:var(--ai-tint);color:#568268;border-color:var(--ai-border)}
.ops-page[data-view="history"] #ops-list .ops-recent-badge{display:inline-flex;align-items:center;margin-left:8px;padding:1px 6px;border-radius:5px;background:var(--ai-tint);color:#59816a;font-size:10px;line-height:18px;font-weight:500;vertical-align:middle}
.ops-page[data-view="history"] #ops-list tr[data-recent-flash="true"]>td{animation:step-recent-result 1800ms ease-out both}
@keyframes step-recent-result{0%,45%{background:#f0f7f3}100%{background:transparent}}
@media(prefers-reduced-motion:reduce){
 .aim-page:not(.conversation-mode) #workflow-confirm[data-result-state] :is(.send-result-summary h3,.send-result-icon,.send-result-metrics>div,#send-result-new,#send-sim-history){animation:none!important}
 .ops-page[data-view="history"] #ops-list tr[data-recent-flash="true"]>td{animation:none;background:#f4f8f5}
}
