/* Message-only result view. Colors and typography come from the existing shared CSS. */
.aim-page { min-height:0; background:#f8f9fb; color:var(--ink); }
.aim-page [hidden] { display:none!important; }
.aim-shell { padding:0 0 140px; }
.aim-shell button { cursor:pointer; }
.aim-shell button:disabled { opacity:.5; cursor:wait; }
.aim-shell .top-flow { margin-bottom:16px; flex-wrap:wrap; gap:12px; }
.aim-main-grid { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:16px; align-items:start; }
.aim-composer { min-width:0; padding:24px 28px; }
.aim-composer .composer-head { padding:0 0 22px; }
.aim-composer .composer-title { font-size:26px; line-height:1.4; }
.aim-composer .composer-channel-badge { vertical-align:middle; }
.aim-context { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:18px; margin-bottom:16px; border:1px solid #dbe3ee; border-radius:14px; background:#f7f9fc; }
.aim-context>div { min-width:0; }
.aim-context>div:last-child { grid-column:1/-1; border-top:1px solid var(--line-soft); padding-top:12px; }
.aim-context-label { display:block; color:#667891; font-size:13px; font-weight:700; margin-bottom:6px; }
.aim-context strong { display:block; font-size:15px; font-weight:800; }
.aim-context em { color:var(--primary); font-style:normal; white-space:nowrap; }
.aim-context small { display:block; margin-top:5px; color:var(--muted); font-size:13px; }
.aim-sender { display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:12px 14px; margin-bottom:18px; }
.aim-sender strong { font-size:14px; }
.aim-sender strong span { margin-left:8px; }
.aim-artifact-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.aim-artifact-meta strong { font-size:16px; }
.aim-artifact-meta .ai-tag { margin-left:6px; }
#version-label { color:var(--muted); font-size:13px; }
.aim-empty { min-height:300px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; border:1px solid var(--line-soft); border-radius:14px; padding:30px 18px; }
.aim-empty h2 { font-size:20px; margin:12px 0 0; }
.aim-empty p { color:var(--muted); line-height:1.8; font-size:14px; margin:10px 0 22px; }
.aim-empty-icon { display:grid; place-items:center; width:46px; height:46px; color:var(--primary); background:var(--primary-soft); border-radius:12px; font-size:26px; }
.aim-change-note { padding:12px 14px; background:#edf7f1; border:1px solid #d9ecdf; color:var(--primary); font-size:14px; border-radius:10px; line-height:1.6; }
.aim-field-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:16px 0 8px; font-size:14px; }
.aim-field-heading>span { font-size:13px; color:var(--muted); }
#draft-editor { width:100%; display:block; min-height:300px; padding:18px; border:1px solid var(--line-soft); border-radius:12px 12px 0 0; resize:vertical; line-height:1.85; font-size:15px; color:var(--ink); background:#fff; }
#draft-editor:focus-visible { outline:2px solid #9bc9ab; outline-offset:1px; }
.aim-editor-toolbar { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:10px 12px; border:1px solid var(--line-soft); border-top:0; border-radius:0 0 12px 12px; background:#f8f9fb; }
.aim-token-list { display:flex; gap:6px; }
.aim-token-list code { color:#2458c6; background:#edf3ff; border-radius:4px; padding:2px 5px; font-size:12px; }
#draft-save-state,.aim-editor-help { color:var(--muted); font-size:12px; }
.aim-section-title { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:12px; }
.aim-section-title h2 { font-size:16px; margin:0; }
.aim-section-title>span { font-size:12px; color:var(--muted); }
.aim-checks { padding:16px; margin-top:18px; border:1px solid var(--line-soft); border-radius:12px; }
.aim-checks ul { list-style:none; padding:0; margin:0; }
.aim-checks li { display:flex; justify-content:space-between; gap:10px; padding:7px 0; font-size:13px; }
.aim-checks li span:before { content:'✓'; color:var(--success); margin-right:8px; font-weight:800; }
.aim-checks li strong { color:var(--primary); font-size:12px; font-weight:600; text-align:right; }
.aim-checks li.is-error span:before { content:'!'; color:var(--danger); }
.aim-checks li.is-error strong { color:var(--danger); }
.aim-checks>p { font-size:12px; color:var(--muted); margin:10px 0 0; }
.aim-revisions { margin:16px 0; font-size:13px; color:var(--muted); }
.aim-revisions summary,.aim-tools summary { cursor:pointer; }
.aim-revisions summary span { color:var(--primary); margin-left:6px; }
.aim-revision { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line-soft); }
.aim-process { border-top:1px solid var(--line-soft); margin-top:24px; padding-top:20px; }
.aim-process ol { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; list-style:none; padding:0; margin:0; }
.aim-process li { display:flex; align-items:center; gap:8px; padding:10px; border:1px solid var(--line-soft); border-radius:10px; }
.aim-process li>div { flex:1; }
.aim-step-number { display:grid; place-items:center; width:25px; height:25px; flex:none; border-radius:50%; background:#f0f1f4; color:#888; font-size:12px; font-weight:700; }
.aim-process strong { display:block; font-size:13px; }
.aim-process small,.aim-step-state { display:block; font-size:11px; color:var(--muted); }
.aim-process .is-done .aim-step-number { color:white; background:var(--success); }
.aim-process .is-running { border-color:var(--primary); background:var(--primary-soft); }
.aim-tools { margin-top:14px; font-size:13px; color:var(--muted); }
.aim-tools summary span { font-size:11px; margin-left:8px; }
.aim-tool { border-top:1px solid var(--line-soft); padding:12px 0; }
.aim-tool code { color:var(--primary); }
.aim-tool pre { font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
.aim-preview-panel { min-width:0; }
.aim-preview-panel .right-card { padding:18px; }
.aim-preview-panel h2 { font-size:20px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.aim-preview-label { display:block; font-size:13px; font-weight:700; margin:16px 0 8px; }
#recipient-select { width:100%; border:1px solid var(--line); border-radius:8px; padding:10px; font-size:14px; color:var(--ink); background:white; }
.aim-customer-context { font-size:12px; line-height:1.7; color:var(--muted); padding:12px 0; }
.aim-customer-context b { margin-right:6px; color:#596774; }
.aim-phone { border:8px solid #171717; border-radius:42px; background:white; max-width:290px; min-height:465px; margin:0 auto; overflow:hidden; }
.aim-phone-camera { width:70px; height:20px; background:#080808; border-radius:0 0 12px 12px; margin:0 auto; }
.aim-phone-time { display:flex; justify-content:space-between; padding:0 18px; font-size:12px; font-weight:800; }
.aim-phone-header { display:flex; flex-direction:column; align-items:center; gap:3px; padding:18px 0 10px; }
.aim-brand-icon { width:34px; height:34px; border-radius:50%; background:var(--primary); color:white; text-align:center; line-height:34px; font-weight:800; font-size:22px; }
.aim-phone-header strong { font-size:14px; }.aim-phone-header small { font-size:12px; color:#9ca0ab; }
.aim-phone-screen { padding:0 14px 26px; }
.aim-bubble { font-size:14px; line-height:1.65; background:#e7e7ed; color:#111; padding:14px 12px; border-radius:20px; white-space:pre-wrap; overflow-wrap:anywhere; min-height:80px; }
.aim-preview-count { text-align:center; color:var(--muted); font-size:12px; margin-top:12px; }
.aim-preview-note,.aim-demo-note { color:var(--muted); font-size:12px; line-height:1.7; }
.aim-demo-note { margin:18px 8px 0; }
.aim-notice { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); padding:12px 20px; border-radius:10px; background:var(--primary); color:white; font-size:14px; opacity:0; pointer-events:none; z-index:80; max-width:90vw; }
.aim-notice.is-visible { opacity:1; }
@media(min-width:1300px) { .aim-context { grid-template-columns:repeat(3,minmax(0,1fr)); }.aim-context>div:last-child { grid-column:auto; border:0; padding:0; }.aim-process ol { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:740px) { .aim-main-grid { grid-template-columns:minmax(0,1fr); }.aim-preview-panel { grid-column:auto; grid-row:auto; }.aim-composer { padding:20px; }.aim-preview-panel .right-card { max-width:none; }.aim-shell .top-actions { flex-wrap:wrap; } }
@media(max-width:520px) { .aim-context { grid-template-columns:1fr; }.aim-context>div:last-child { grid-column:auto; }.aim-process ol { grid-template-columns:1fr; }.aim-composer { padding:16px; }.aim-composer .composer-title { font-size:23px; }.aim-artifact-meta .ai-tag { display:none; } }
.aim-main-grid > .composer-card { grid-column:1; grid-row:1; }
.aim-main-grid > .right-panel { grid-column:2; grid-row:1; }
.aim-shell > .top-flow { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border:1px solid var(--line-soft); border-radius:14px; background:#f8f9fb; }
.aim-shell .breadcrumb { display:block; }
.aim-shell .composer-title { white-space:normal; }
@media(max-width:740px) { .aim-main-grid > .right-panel { grid-column:1; grid-row:2; } }
/* MMS generation presentation, scoped to the message result frame. */
.aim-live-status { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:12px 14px; margin:0 0 16px; border:1px solid #c6e1d0; border-radius:10px; background:#f0f8f3; color:var(--primary); }
.aim-live-status>div { display:flex; align-items:center; gap:10px; min-width:0; font-size:14px; }
#skip-animation, #pause-animation { font-size:12px; border:1px solid #c8dcd0; border-radius:7px; background:#fff; color:var(--primary); padding:6px 9px; white-space:nowrap; }
.aim-spinner { display:block; width:16px; height:16px; border:2px solid #bdd9c7; border-top-color:var(--primary); border-radius:50%; animation:aim-spin .8s linear infinite; flex:none; }
[data-focus] { transition:box-shadow .3s,background-color .3s; }
.aim-context>[data-focus] { border-radius:8px; padding:10px 12px; margin:0; }
.aim-context>[data-focus]:last-child { margin:0; padding:10px 12px; }
.aim-is-working { position:relative; z-index:1; outline:2px solid #159555; outline-offset:-2px; box-shadow:inset 0 0 0 5px #0d6b380e; animation:aim-focus-glow 1.4s ease-in-out infinite alternate; }
.aim-image-attachment { display:flex; gap:20px; padding:16px; border:1px solid var(--line-soft); border-radius:12px; background:#f8faf9; margin:16px 0; align-items:center; }
.aim-image-stage { position:relative; width:180px; aspect-ratio:1; flex:none; overflow:hidden; border-radius:10px; background:#e8eeea; }
.aim-image-stage img { width:100%; height:100%; object-fit:contain; display:block; }
.aim-image-skeleton { position:absolute; inset:0; background:linear-gradient(110deg,#e8eeea 30%,#f6faf7 45%,#e8eeea 60%); background-size:240% 100%; }
.aim-image-stage.is-loading .aim-image-skeleton { animation:aim-shimmer 1.2s linear infinite; }
.aim-image-stage.is-ready .aim-image-skeleton { display:none; }
.aim-image-info { display:flex; flex-direction:column; gap:9px; min-width:0; }
.aim-image-info strong { font-size:15px; }.aim-image-info span { font-size:13px; color:var(--primary); }
.aim-image-info small { color:var(--muted); font-size:12px; line-height:1.7; }
.aim-image-info a { font-size:12px; color:var(--primary); text-decoration:underline; text-underline-offset:3px; }
.aim-image-reveal { animation:aim-image-reveal .6s ease-out both; }
.aim-phone-image { display:block; width:100%; height:auto; border-radius:14px; margin:0 0 8px; }
.aim-editor-surface { position:relative; border-radius:12px 12px 0 0; }
.aim-stream { width:100%; min-height:300px; max-height:420px; overflow:auto; padding:18px; border:1px solid var(--line-soft); border-radius:12px 12px 0 0; font-size:15px; line-height:1.85; background:#fff; white-space:pre-wrap; overflow-wrap:anywhere; }
.aim-stream.is-typing:after { content:''; display:inline-block; width:2px; height:1.1em; background:var(--primary); margin-left:2px; vertical-align:-2px; animation:aim-caret .85s step-end infinite; }
.aim-stream-variable { color:var(--primary); background:#e7f5ec; border-radius:3px; }
.aim-edit-reveal { animation:aim-edit-reveal 1s ease-out; }
.aim-personalized { background:#cff0db; border-radius:3px; animation:aim-personalize .8s ease-out; }
.aim-checks li { transition:color .2s,background .2s; }
.aim-checks li.is-pending span:before { content:'○'; color:#929a95; }
.aim-checks li.is-pending strong { color:var(--muted); }
.aim-process ol { grid-template-columns:repeat(3,minmax(0,1fr)); }
@keyframes aim-spin { to { transform:rotate(360deg); } }
@keyframes aim-shimmer { to { background-position:-240% 0; } }
@keyframes aim-focus-glow { from { box-shadow:inset 0 0 0 4px #0d6b3808; } to { box-shadow:inset 0 0 0 6px #0d6b3815; } }
@keyframes aim-image-reveal { from { opacity:0; transform:translateY(8px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes aim-caret { 50% { opacity:0; } }
@keyframes aim-edit-reveal { from { background:#def3e6; } to { background:#fff; } }
@keyframes aim-personalize { from { background:#73d89a; } to { background:#cff0db; } }
@media(max-width:1100px) { .aim-image-stage { width:140px; }.aim-image-attachment { gap:14px; } }
@media(max-width:520px) { .aim-image-attachment { align-items:start; flex-direction:column; }.aim-image-stage { width:100%; max-width:240px; }.aim-process ol { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(prefers-reduced-motion:reduce) { .aim-page *, .aim-page *:before, .aim-page *:after { animation:none!important; transition:none!important; } }
.aim-phone { height:620px; display:flex; flex-direction:column; }
.aim-phone-camera,.aim-phone-time,.aim-phone-header { flex-shrink:0; }
.aim-phone-screen { min-height:0; flex:1; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.aim-edited-line { background:#d7f2e1; color:#095c30; border-radius:3px; box-shadow:0 0 0 2px #d7f2e1; }

.aim-live-actions { margin-left:auto; }
.aim-demo-paused *, .aim-demo-paused *::before, .aim-demo-paused *::after { animation-play-state:paused!important; }
#pause-animation[aria-pressed="true"] { background:#dff0e5; }

/* Same fluid 65:35 workspace ratio as channel sending. */
.aim-main-grid{grid-template-columns:minmax(0,13fr) minmax(0,7fr)}
.aim-preview-panel,.aim-preview-panel .right-card{width:100%;max-width:none}
.aim-phone{width:90%;max-width:420px;height:680px;box-sizing:border-box}
@media(max-width:740px){.aim-main-grid{grid-template-columns:minmax(0,1fr)}}

/* Scenario 1: make the task, starting point and review decision explicit. */
.aim-state-chip { padding:5px 10px; border-radius:6px; background:#eef3f8; color:#536477; font-size:13px; font-weight:700; }
.aim-journey { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; list-style:none; padding:0; margin:0 0 14px; }
.aim-journey li { display:flex; align-items:center; gap:8px; padding:11px 14px; border:1px solid var(--line-soft); border-radius:10px; background:#fff; color:#68717d; font-size:14px; }
.aim-journey li>span { display:grid; place-items:center; width:23px; height:23px; border-radius:50%; background:#f0f2f5; font-size:12px; font-weight:700; flex:none; }
.aim-journey small { margin-left:auto; color:#68717d; font-size:12px; }
.aim-journey li[aria-current] { border-color:#b8dac6; color:#096c3a; background:#edf7f1; }
.aim-journey li[aria-current]>span { background:#117b46; color:#fff; }
.aim-journey .is-complete>span { color:#096c3a; background:#e3f2e9; }
.aim-composer { padding:22px 24px; }
.aim-composer .composer-head { padding-bottom:16px; }
.aim-composer .composer-title { font-size:25px; }
.aim-composer .composer-sub { color:#64707b; line-height:1.6; }
.aim-empty { min-height:0; align-items:flex-start; justify-content:flex-start; text-align:left; padding:20px; background:#f3f9f5; border-color:#d2e8dc; margin:0 0 18px; }
.aim-eyebrow { color:#3d7151; font-size:12px; font-weight:700; }
.aim-empty h2 { margin:8px 0 0; font-size:23px; line-height:1.45; letter-spacing:-.025em; }
.aim-empty p { margin:8px 0 16px; color:#53685b; line-height:1.65; }
.aim-empty>small { margin-top:12px; color:#63716a; font-size:12px; line-height:1.6; }
.aim-start-actions,.aim-review-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.aim-start-actions button { min-height:38px; }
.aim-context-details>summary,.aim-process>summary,.aim-evidence>summary { cursor:pointer; font-size:14px; font-weight:700; color:#3c5145; padding:10px 0; }
.aim-context-details>summary>span { font-size:12px; font-weight:400; color:#6d7783; margin-left:6px; }
.aim-context { display:block; padding:2px 0; background:transparent; border:0; border-radius:0; margin:0; }
.aim-context>[data-focus],.aim-context>[data-focus]:last-child { display:grid; grid-template-columns:116px minmax(0,1fr); gap:3px 12px; margin:0; padding:10px 12px; border-top:1px solid var(--line-soft); border-radius:8px; }
.aim-context-label { grid-column:1; grid-row:1/3; margin:0; align-self:start; font-size:12px; line-height:1.6; color:#627487; }
.aim-context strong { grid-column:2; font-size:14px; line-height:1.5; }
.aim-context small { grid-column:2; margin:0; font-size:12px; line-height:1.6; color:#66727e; }
.aim-context-details { margin-bottom:4px; }
.aim-has-draft .aim-context-details { border-bottom:1px solid var(--line-soft); padding-bottom:6px; margin-bottom:18px; }
.aim-review-summary { border:1px solid #cee5d6; background:#eff8f3; border-radius:12px; padding:16px; margin:0 0 14px; }
.aim-review-summary strong { font-size:16px; color:#126a3b; }
.aim-review-summary p { font-size:13px; color:#52695c; line-height:1.7; margin:6px 0 12px; }
.aim-review-summary.needs-review { border-color:#ecd8ac; background:#fffbf1; }
.aim-review-summary.needs-review strong { color:#805913; }
.aim-review-actions button { font-size:13px; }
.aim-refine-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0 0 14px; }
.aim-refine-actions>span { color:#687580; font-size:12px; margin-right:4px; }
.aim-refine-actions button { font-size:12px; }
.aim-image-attachment { padding:12px; gap:14px; margin:12px 0; }
.aim-image-stage { width:106px; }
.aim-image-info { gap:5px; }
.aim-image-info small { line-height:1.5; }
#draft-editor,.aim-stream { min-height:260px; font-size:15px; line-height:1.75; }
.aim-change-note { padding:10px 12px; margin:0 0 12px; }
.aim-process { margin-top:18px; padding-top:6px; }
.aim-process>summary { display:list-item; }
.aim-process>summary span { margin-left:8px; font-size:12px; font-weight:400; color:#687580; }
.aim-process ol { margin-top:10px; }
.aim-preview-panel .right-card { padding:18px; }
.aim-preview-panel h2 { margin:0; font-size:19px; }
.aim-preview-panel .right-card>p { color:#63707b; line-height:1.65; font-size:13px; margin:8px 0 16px; }
.aim-preview-welcome { text-align:center; padding:0; }
.aim-preview-welcome>img { display:block; width:100%; max-width:180px; aspect-ratio:1; object-fit:contain; border-radius:12px; margin:0 auto 9px; }
.aim-preview-welcome>span { font-size:12px; color:#6b7781; }
.aim-preview-welcome h3 { margin:18px 0 12px; font-size:16px; line-height:1.5; }
.aim-preview-welcome dl { margin:0; text-align:left; border:1px solid var(--line-soft); border-radius:10px; overflow:hidden; }
.aim-preview-welcome dl>div { padding:12px; background:#f8faf9; }
.aim-preview-welcome dl>div+div { border-top:1px solid var(--line-soft); }
.aim-preview-welcome dt { font-size:12px; color:#66736c; margin-bottom:5px; }
.aim-preview-welcome dd { margin:0; font-size:14px; font-weight:600; }
.aim-preview-welcome>p { color:#65716b; font-size:13px; line-height:1.65; margin:14px 0 0; }
.aim-preview-label { margin-top:0; }
.aim-recipient-shortcuts { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.aim-recipient-shortcuts button { border:1px solid #dce4e0; border-radius:7px; background:#fff; color:#465c50; font-size:12px; padding:7px 9px; }
.aim-recipient-shortcuts button[aria-pressed="true"] { border-color:#189355; background:#e9f5ee; color:#076634; font-weight:700; }
.aim-personalization-note { font-size:13px; line-height:1.65; padding:10px 12px; border-radius:8px; background:#edf7f1; color:#1b683d; }
.aim-evidence { margin:6px 0 12px; }
.aim-evidence>summary { font-size:12px; padding:6px 0; }
.aim-customer-context { padding:4px 0 8px; color:#63717a; }
.aim-phone { height:510px; min-height:0; width:94%; }
.aim-phone-header { padding:12px 0 8px; }
.aim-phone-image { max-height:180px; object-fit:contain; }
.aim-personalized { color:#07582e; }
.aim-checks li { padding:9px 0; border-bottom:1px solid #edf0ef; }
.aim-checks li:last-child { border-bottom:0; }
.aim-shell :is(button,summary,select):focus-visible { outline:2px solid #12824c; outline-offset:3px; }
.aim-busy .aim-review-summary { display:none; }
@media(min-width:1500px) {
  .aim-main-grid { grid-template-columns:minmax(0,13fr) minmax(0,7fr); }
  .aim-empty h2 br { display:none; }
  .aim-preview-welcome>img { max-width:220px; }
  .aim-phone { height:570px; }
}
@media(max-width:1000px) {
  .aim-journey li { padding:10px; gap:6px; }
  .aim-journey small { display:none; }
  .aim-composer { padding:20px; }
  .aim-empty { padding:16px; }
}
@media(max-width:740px) {
  .aim-journey li { font-size:12px; }
  .aim-journey li>span { width:20px; height:20px; }
  .aim-context>[data-focus],.aim-context>[data-focus]:last-child { grid-template-columns:110px minmax(0,1fr); }
  .aim-preview-welcome>img { max-width:200px; }
  .aim-main-grid > .right-panel { grid-column:1; grid-row:2; }
}
@media(max-width:520px) {
  .aim-empty h2 { font-size:21px; }
  .aim-context>[data-focus],.aim-context>[data-focus]:last-child { display:block; }
  .aim-context-label { margin-bottom:4px; }
  .aim-image-attachment { flex-direction:row; }
  .aim-image-stage { width:88px; }
}

.aim-personalization-note strong { display:block; font-size:12px; color:#426d54; }
.aim-personalization-note p { margin:5px 0 0; font-size:14px; line-height:1.7; color:#175b34; }

/* Campaign choices stay within the messaging workspace. */
.aim-recommendations { margin-bottom:14px; }
.aim-recommend-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.aim-recommend-head>strong { font-size:13px; color:#465c50; }
.aim-recommend-head .top-button { font-size:12px; padding:5px 8px; }
.aim-campaign-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.aim-campaign-option { display:flex; flex-direction:column; align-items:flex-start; gap:4px; text-align:left; border:1px solid #dbe4df; border-radius:9px; padding:10px; background:#fff; color:#354e40; cursor:pointer; min-width:0; font:inherit; }
.aim-campaign-option strong { font-size:13px; line-height:1.4; }
.aim-campaign-option small { font-size:11px; color:#728078; }
.aim-campaign-option:hover { background:#f5faf7; border-color:#78ac8b; }
.aim-campaign-option[aria-pressed="true"] { background:#eaf6ee; border-color:#16874a; box-shadow:inset 0 0 0 1px #16874a; }
.aim-recommendations>p { font-size:11px; line-height:1.5; color:#707d75; margin:7px 0 0; }
.aim-recommendations #restore-connected-audience { margin-top:8px; }
.aim-campaign-option[hidden],.aim-recommendations[hidden] { display:none; }
.aim-empty h2 { font-size:21px; }
.aim-empty { padding:16px; }
.aim-empty p { margin-bottom:12px; }
@media(max-width:520px) { .aim-campaign-options { grid-template-columns:1fr; } }

.aim-empty h2 { word-break:keep-all; overflow-wrap:break-word; }
/* All-channel AI composer: messaging-only styles. */
.aim-channel-bar { margin:0 0 14px; padding:12px 16px; background:white; border:1px solid var(--line-soft); border-radius:14px; }
.aim-channel-tabs { display:flex; gap:8px; flex-wrap:wrap; }
.aim-channel-button { display:flex; align-items:center; gap:7px; padding:9px 18px; border:1px solid #dce4df; border-radius:8px; background:white; font:inherit; font-size:14px; cursor:pointer; color:#45554b; }
.aim-channel-button img { width:19px; height:19px; }
.aim-channel-button[aria-pressed="true"] { background:#e9f5ee; border-color:#138148; color:#096c39; font-weight:700; }
.aim-channel-sub { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:12px; margin-top:10px; color:#627168; }
.aim-channel-sub label { display:flex; align-items:center; gap:8px; font-weight:600; }
.aim-channel-sub select { padding:5px 9px; border:1px solid #dce4df; border-radius:6px; font:inherit; background:white; }
.aim-channel-sub label[hidden] { display:none; }
#ai-channel-state { font-size:11px; color:#6a796f; }
.aim-channel-guidance { padding:14px; border:1px solid #e7d294; border-radius:10px; background:#fffbef; margin-bottom:14px; font-size:13px; }
.aim-channel-guidance p { line-height:1.65; }
.aim-channel-guidance>div { display:flex; gap:8px; flex-wrap:wrap; }
.aim-subject-field { display:flex; flex-direction:column; gap:7px; margin:14px 0; font-size:13px; }
.aim-subject-field input { width:100%; box-sizing:border-box; border:1px solid var(--line-soft); border-radius:8px; padding:11px; font:inherit; }
.aim-channel-preview { min-width:0; margin-top:12px; overflow:hidden; }
.aim-channel-preview .tpl-email-frame { width:100%; min-height:560px; border:0; }
.aim-channel-preview .tpl-email-stage { width:100%; max-width:100%; }
.aim-channel-preview :is(.tpl-kakao,.tpl-sms-device,.tpl-push-device) { width:100%; max-width:420px; box-sizing:border-box; margin-inline:auto; }
.aim-channel-preview .tpl-fax-sheet { width:100%; box-sizing:border-box; min-width:0; }
.aim-channel-preview button { pointer-events:none; }
.aim-channel-preview .tpl-sms-thread { max-height:540px; overflow:auto; }
.aim-page [hidden] { display:none!important; }
.aim-page .aim-journey { margin-bottom:12px; }
.aim-recommend-head { margin-bottom:6px; }
.aim-campaign-option { padding:8px; }
.aim-composer .composer-head { padding-bottom:10px; }
.aim-empty { padding:14px; }
.aim-empty h2 { font-size:20px; margin-top:6px; }
.aim-empty>small { display:none; }
@media(min-width:1000px){.aim-channel-sub #ai-channel-state { margin-left:auto; }}
.aim-journey li { padding:7px 10px; }
.aim-channel-bar { padding:9px 14px; margin-bottom:12px; }
.aim-channel-button { padding:7px 16px; }
.aim-channel-sub { margin-top:7px; }
.aim-journey { margin-top:10px; }
.aim-main-grid .aim-composer { padding:18px 20px; }
.aim-recommendations { margin-bottom:10px; }

/* Simple AI workflow: one primary action, optional detail, readable results. */
.aim-task-summary { margin:0 0 12px; font-size:14px; line-height:1.65; color:#395e49; padding:0 4px; }
.aim-page .aim-journey { display:none; }
.aim-main-grid { grid-template-columns:minmax(0,3fr) minmax(0,2fr); }
.aim-composer .composer-title { font-size:24px; }
.aim-channel-sub #ai-channel-state { display:none; }
.aim-content-options { margin:16px 0; border-block:1px solid #e6ebe8; padding:12px 0; }
.aim-content-options summary,.aim-checks>summary { cursor:pointer; font-size:13px; font-weight:650; color:#52685b; }
.aim-content-options .aim-image-attachment { margin-top:12px; }
.aim-content-options .aim-subject-field { margin-bottom:0; }
.aim-artifact-meta,.aim-editor-toolbar .aim-token-list { display:none; }
.aim-change-note:empty { display:none; }
.aim-checks { border:0; border-top:1px solid #e6ebe8; border-radius:0; padding:14px 0; }
.aim-checks[open]>.aim-section-title { margin-top:14px; }
.aim-review-summary { background:#f4f9f6; border-color:#e0ece4; }
.aim-review-summary .aim-review-actions { gap:8px; }
.aim-review-actions .top-button { border:0; padding:4px 0; background:none; text-decoration:underline; text-underline-offset:3px; margin-right:12px; }
.aim-empty { min-height:0; }
.aim-empty .aim-eyebrow { color:#5b7063; font-size:12px; }
.aim-empty p { line-height:1.6; }
.aim-preview-welcome img { max-height:200px; object-fit:contain; }
.aim-campaign-option small,.aim-recommendations>p { font-size:12px; color:#65766b; }
.aim-page #draft-editor { min-height:190px; font-size:14px; }
.aim-change-focus { animation:aim-change-confirm 2s ease-out; }
@keyframes aim-change-confirm { 0%,35% {outline:2px solid #108249;outline-offset:3px;background-color:#eaf7ef} 100% {outline:2px solid transparent;outline-offset:3px} }
/* In chat, show the artifact rather than squeezing a second full workspace. */
.aim-page.aim-chat-result .aim-shell { padding-bottom:16px; }
.aim-page.aim-chat-result :is(.top-flow,.aim-channel-bar,.aim-task-summary,.aim-composer) { display:none!important; }
.aim-page.aim-chat-result .aim-main-grid { display:block; }
.aim-page.aim-chat-result .aim-preview-panel { display:block;width:100%; }
.aim-page.aim-chat-result .right-card { border:0; padding:4px 8px; background:transparent; }
.aim-page.aim-chat-result .aim-channel-preview .tpl-email-frame { min-height:720px; }
@media(max-width:700px){.aim-main-grid{grid-template-columns:1fr}.aim-main-grid>.right-panel{grid-column:1;grid-row:2}.aim-composer .composer-title{font-size:21px}}
@media(prefers-reduced-motion:reduce){.aim-change-focus{animation:none;outline:2px solid #108249;outline-offset:2px}}
.aim-shell .top-flow { min-height:0; padding:8px 12px; margin-bottom:8px; }
.aim-task-summary { margin-bottom:8px; }
.aim-channel-bar { margin-bottom:10px; }
.aim-composer .composer-sub { margin:4px 0 0; }
.aim-recommendations #campaign-selection-note { display:none; }
.aim-empty h2 { font-size:18px; line-height:1.5; }
.aim-empty p { margin:6px 0 12px; font-size:13px; }
.aim-preview-welcome dl { margin:10px 0; }
.aim-shell .top-actions .top-button { padding:6px 10px; }
/* Stable six-step AI workbench, scoped to AI messaging only. */
.aim-workflow-bar { position:sticky;top:0;z-index:15;background:#f7f9fa;border:1px solid #e5e9ed;border-radius:14px;padding:12px 16px;margin-bottom:12px; }
.aim-workflow-bar>label {display:flex;align-items:center;gap:14px;font-size:12px;color:#607166;}
.aim-workflow-bar input {flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:18px;font-weight:700;color:#25362c;padding:6px;}
#workflow-steps {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin-top:10px;}
#workflow-steps button {display:flex;align-items:center;justify-content:center;gap:6px;border:0;border-bottom:2px solid transparent;border-radius:6px;background:transparent;padding:10px 4px;font:inherit;font-size:13px;color:#627169;cursor:pointer;}
#workflow-steps button[aria-current="step"] {color:#0a733e;border-bottom-color:#0a733e;background:#eaf5ee;}
#workflow-steps button:disabled {opacity:.45;cursor:default;}
.aim-workflow-active .aim-composer>.composer-head,.aim-workflow-active :is(#campaign-recommendations,#empty-state,#review-summary,#context-details,#process-details,#generation-status),.aim-workflow-active .aim-task-summary {display:none!important;}
.aim-workflow-active .aim-channel-bar {margin-bottom:12px;}
.aim-workflow-active .aim-composer {min-height:580px;}
.workflow-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;color:#12683d;font-size:13px;}
.workflow-heading small {color:#77827c;font-size:12px;}
#workflow-title {font-size:22px;margin:14px 0 6px;line-height:1.4;}
#workflow-help,.workflow-note {font-size:13px;color:#68766e;line-height:1.65;}
#workflow-completed {display:flex;flex-wrap:wrap;gap:6px;margin:16px 0;}
#workflow-completed button {border:1px solid #dfe7e2;border-radius:7px;background:#f8faf9;padding:7px 10px;font:inherit;font-size:12px;color:#53695b;cursor:pointer;text-align:left;}
.workflow-stage-body {min-height:310px;padding:10px 0;}
.workflow-facts {margin:12px 0;display:grid;gap:0;}
.workflow-facts>div {display:grid;grid-template-columns:110px minmax(0,1fr);gap:16px;padding:17px 0;border-bottom:1px solid #edf0ee;}
.workflow-facts dt {font-size:13px;color:#68766e;}.workflow-facts dd {margin:0;font-size:14px;font-weight:600;line-height:1.6;}
.workflow-footer {border-top:1px solid #e5ebe7;padding-top:16px;margin-top:16px;display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
#workflow-next {margin-left:auto;}
.workflow-audience-card {background:#f0f8f3;border:1px solid #d1e7da;border-radius:12px;padding:20px;}
.workflow-audience-card span {display:block;color:#536e60;font-size:13px;}.workflow-audience-card strong {display:block;font-size:30px;margin:8px 0;}.workflow-audience-card p {margin:0;font-size:13px;color:#536e60;}
#workflow-people {padding:0;list-style:none;}#workflow-people li {display:flex;gap:20px;padding:12px 4px;border-bottom:1px solid #edf0ee;font-size:13px;}#workflow-people span {color:#68766e;}
.workflow-sender {display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:16px 0;}.workflow-sender span {font-size:13px;color:#68766e;}.workflow-sender strong {flex:1;}.workflow-fields {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0;}.workflow-fields label {display:grid;gap:8px;font-size:13px;}.workflow-fields input,.workflow-fields select {width:100%;min-width:0;border:1px solid #d5ddd8;border-radius:8px;background:white;padding:11px;font:inherit;}
#workflow-checks,#workflow-issues {padding-left:20px;font-size:13px;line-height:1.8;}#workflow-checks li {margin:10px 0;}#workflow-issues,.needs-attention {color:#8a6128;}
#workflow-editor-slot .aim-checks,#workflow-editor-slot .aim-revisions {display:none;}
.aim-workflow-active .aim-is-working {outline:none!important;box-shadow:none!important;animation:none!important;}
.workflow-empty-preview {margin:12px auto;max-width:360px;min-height:420px;border:7px solid #252928;border-radius:38px;background:white;padding:26px 18px;display:flex;flex-direction:column;text-align:center;}
.workflow-empty-preview>strong {font-size:14px;color:#54655b;}.workflow-empty-surface {margin:auto 0;padding:24px 12px;border:1px dashed #d7e2da;border-radius:12px;color:#77867d;font-size:13px;line-height:1.7;}
.workflow-empty-preview[data-channel="email"],.workflow-empty-preview[data-channel="fax"] {max-width:100%;border:1px solid #dce3df;border-radius:10px;min-height:420px;box-shadow:0 3px 12px #23332908;}
.aim-workflow-active #channel-guidance {margin-top:12px;}
#workflow-feedback:empty {display:none;}#workflow-feedback {margin:12px 0;}
@media(min-width:1000px){.aim-workflow-active .aim-preview-panel {position:sticky;top:104px;align-self:start;}}
@media(max-width:800px){#workflow-steps{grid-template-columns:repeat(3,minmax(0,1fr));}.workflow-heading{align-items:flex-start;flex-direction:column;}.workflow-fields{grid-template-columns:1fr}.workflow-facts>div{grid-template-columns:85px 1fr;gap:8px}.aim-workflow-bar input{font-size:15px;}}
.aim-workflow-active .workflow-stage-body {max-height:clamp(300px,calc(var(--workflow-viewport,100vh) - 510px),600px);overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain;}
.aim-workflow-active .aim-preview-panel .right-card {max-height:clamp(420px,calc(var(--workflow-viewport,100vh) - 280px),850px);overflow:auto;overscroll-behavior:contain;}
#workflow-completed {max-height:66px;overflow:auto;}
.workflow-footer button:disabled {opacity:.5;cursor:default;}
@media(max-width:800px){.aim-workflow-active .workflow-stage-body{max-height:460px}.aim-workflow-active .aim-preview-panel .right-card{max-height:700px}}
@media(min-width:741px){
 .aim-workflow-active .aim-composer {height:max(380px,calc(var(--workflow-viewport,100vh) - 530px));min-height:0;display:flex;flex-direction:column;}
 .aim-workflow-active #ai-workflow {display:flex;flex-direction:column;min-height:0;flex:1;}
 .aim-workflow-active .workflow-stage-body {min-height:0;max-height:none;flex:1;}
 .aim-workflow-active #workflow-completed {max-height:36px;flex-shrink:0;margin:10px 0;}
 .aim-workflow-active .workflow-footer {flex-shrink:0;margin-top:10px;padding-top:12px;}
 .aim-workflow-active .aim-preview-panel .right-card {max-height:max(380px,calc(var(--workflow-viewport,100vh) - 530px));}
}

/* Auto preparation: existing workbench, calm local feedback. */
#workflow-feedback{min-height:44px;padding:12px 14px;border:1px solid #d6e6df;border-radius:10px;background:#f2f8f5;color:#246044;font-size:13px;line-height:1.5;margin:14px 0}
#ai-workflow[data-status="running"] #workflow-feedback::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:#138751;margin-right:8px;animation:workflow-pulse 1.6s ease-in-out infinite}
#ai-workflow[data-status="error"] #workflow-feedback,#ai-workflow[data-status="input-needed"] #workflow-feedback{background:#fff8ed;border-color:#eed9b6;color:#82531c}
#workflow-ab,#workflow-fallback{padding:12px 0;border-top:1px solid var(--border,#e4e9ee);font-size:13px;line-height:1.6}
#workflow-ab summary,#workflow-fallback summary{font-weight:700;cursor:pointer;display:list-item}
#workflow-ab summary span,#workflow-fallback summary span{font-weight:500;color:#13774b;margin-left:10px}
#workflow-ab-content p,#workflow-fallback-content p{white-space:pre-wrap;background:#f6f8fa;border:1px solid #e5e9ef;border-radius:8px;padding:12px;margin:6px 0 12px}
.workflow-image-progress{margin:14px 0;border:1px solid #d9e7df;border-radius:12px;overflow:hidden;background:#f8faf9}
.workflow-image-progress[hidden]{display:none}.workflow-image-slot{height:184px;position:relative;display:grid;place-items:center;background:#eef4f0;overflow:hidden}
.workflow-image-slot img{height:100%;width:100%;object-fit:contain;position:absolute;inset:0}.workflow-image-slot img[hidden]{display:none}
.workflow-image-message{position:relative;display:grid;gap:8px;padding:16px;text-align:center;z-index:1}.workflow-image-message strong{font-size:14px}.workflow-image-message small{color:#62756b;font-size:12px}
.workflow-image-shimmer{display:none;position:absolute;inset:0;background:linear-gradient(110deg,transparent 25%,#ffffff95 50%,transparent 75%);transform:translateX(-100%)}
.workflow-image-progress[data-status="running"] .workflow-image-shimmer{display:block;animation:workflow-shimmer 2s ease-in-out infinite}
.workflow-image-progress:is([data-status="running"],[data-status="paused"],[data-status="error"]) img{opacity:.18}
.workflow-image-progress[data-status="ready"] .workflow-image-message{align-self:end;width:100%;box-sizing:border-box;background:#ffffffeb;padding:8px}.workflow-image-progress[data-status="ready"] .workflow-image-message small{display:none}
.workflow-image-progress[data-status="ready"] img{animation:workflow-image-reveal 220ms ease-out}
.workflow-image-progress[data-status="error"] .workflow-image-message{color:#86551f}
.workflow-image-progress>p{font-size:12px;line-height:1.6;color:#65776e;margin:10px 14px}.workflow-image-actions{display:flex;gap:8px;padding:0 14px 12px}
.aim-workflow-active #image-attachment{display:none}
@keyframes workflow-image-reveal{from{opacity:.3}to{opacity:1}}
#workflow-confirm{position:fixed;inset:0;margin:auto;width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:0;border:1px solid #e0e7e2;border-radius:16px;box-shadow:0 24px 80px #17332730;color:inherit;font:inherit;overflow:hidden}
#workflow-confirm::backdrop{background:#12251c66}#workflow-confirm form{display:flex;flex-direction:column;max-height:calc(100dvh - 48px)}#workflow-confirm header,#workflow-confirm footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px;flex-shrink:0;background:white}#workflow-confirm h2{font-size:20px;margin:0}#workflow-confirm footer{justify-content:flex-end;border-top:1px solid #e5e9ef}.workflow-confirm-body{overflow:auto;overscroll-behavior:contain;padding:8px 24px 24px;line-height:1.7}#workflow-confirm-issues{color:#986120;padding-left:20px}
@keyframes workflow-pulse{50%{opacity:.3}}@keyframes workflow-shimmer{to{transform:translateX(100%)}}
@media(prefers-reduced-motion:reduce){#ai-workflow *{animation:none!important;transition:none!important}}
#ai-workflow[data-decision="executed"] [data-workflow-pane="5"]>.workflow-note{display:none}
[data-workflow-pane="5"] .workflow-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}
[data-workflow-pane="5"] .workflow-facts>div{grid-template-columns:76px minmax(0,1fr);padding:12px 0;gap:8px}
@media(max-width:700px){[data-workflow-pane="5"] .workflow-facts{grid-template-columns:1fr}}
#workflow-preview-label{display:grid;gap:8px;margin:12px 0}#workflow-preview-label[hidden]{display:none}#workflow-preview-version{width:100%;padding:9px 12px;border:1px solid #dce4df;border-radius:8px;background:#fff;font:inherit;color:inherit}
#ai-workflow[data-image-busy="true"] #workflow-feedback::before{animation:none}
/* Reclaim space for results without changing the work / preview split. */
.aim-workflow-active .aim-workflow-bar{padding:8px 14px}
.aim-workflow-active .aim-workflow-bar input{font-size:16px;padding:4px 6px}
.aim-workflow-active #workflow-steps{margin-top:5px}
.aim-workflow-active #workflow-steps button{padding:7px 4px}
.aim-workflow-active #workflow-title{font-size:20px;margin:8px 0 4px}
.aim-workflow-active #workflow-help{margin:4px 0 6px}
.aim-workflow-active #workflow-feedback{margin:8px 0;min-height:38px;padding:9px 12px;flex-shrink:0}
.aim-workflow-active #personalization-note{display:none}
.aim-workflow-active .aim-preview-panel #preview-description{margin-bottom:8px}
.aim-workflow-active #workflow-preview-label{margin:8px 0}
@media(min-width:741px){
 .aim-workflow-active .aim-channel-bar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px}
 .aim-workflow-active .aim-channel-sub{margin:0}
 .aim-workflow-active #ai-channel-help{display:none}
 .aim-workflow-active .aim-composer{height:clamp(440px,calc(var(--workflow-viewport,100vh) - 445px),760px)}
 .aim-workflow-active .aim-preview-panel .right-card{max-height:clamp(440px,calc(var(--workflow-viewport,100vh) - 445px),760px)}
}
#ai-workflow[data-phase="5"] #workflow-help{display:none}

.workflow-input-needed{padding:14px 16px;margin:10px 0 16px;border:1px solid #ecd9b0;border-radius:10px;background:#fffbf2;color:#785921}
.workflow-input-needed[hidden]{display:none}.workflow-input-needed ul{padding-left:18px;margin:8px 0}.workflow-input-needed p{font-size:12px;color:#766b56}
.workflow-edit-label{display:grid;gap:7px;margin:12px 0;font-size:13px;color:#425c4e}
.workflow-edit-label input,.workflow-edit-label select,.workflow-edit-label textarea{width:100%;min-width:0;box-sizing:border-box;padding:10px 12px;border:1px solid #d5ddd8;border-radius:8px;background:white;color:#253c30;font:inherit;line-height:1.6}
.workflow-edit-label textarea{resize:vertical}.workflow-edit-actions{display:flex;flex-wrap:wrap;gap:8px}.workflow-check-label{display:flex;gap:8px;align-items:center;font-size:13px;margin:14px 0}
.workflow-edit-label[hidden]{display:none}

.aim-request-notice{flex-shrink:0;padding:12px 14px;margin:0 0 12px;border:1px solid #ecd9b0;border-radius:10px;background:#fffbf2;color:#785921;font-size:13px;line-height:1.6}.aim-request-notice[hidden]{display:none}

/* One stationary preparation surface; editor/preview are never re-rendered per character. */
#workflow-live-work{border:1px solid #cfe4d9;border-radius:12px;background:linear-gradient(135deg,#f2f9f5,#fff 70%);padding:18px 20px;min-height:210px;box-sizing:border-box}
#workflow-live-work[hidden]{display:none}
.workflow-live-head{display:flex;align-items:center;gap:10px;color:#174d34;font-size:14px}
.workflow-live-head>span{background:#deeee5;border-radius:6px;padding:4px 7px;font-size:11px;font-weight:700;flex-shrink:0}
#workflow-live-intent{font-size:13px;line-height:1.6;color:#5e7268;margin:12px 0}
#workflow-live-output{min-height:108px;padding:16px;border:1px solid #e0e9e4;border-radius:8px;background:white;font-size:14px;line-height:1.75;display:flow-root;overflow-wrap:anywhere}
#workflow-live-output:empty{background:linear-gradient(90deg,#f3f6f4,#fafcfb,#f3f6f4);background-size:200% 100%;animation:workflow-work-wait 2s ease-in-out infinite}
#workflow-live-output strong{display:block;color:#233a2d;min-height:25px}
#workflow-live-output p{margin:9px 0 0;color:#40574a;white-space:pre-wrap}
#workflow-live-output [hidden]{display:none}
.workflow-live-image{float:right;width:96px;height:112px;object-fit:cover;border-radius:8px;margin:0 0 8px 16px}
#workflow-live-note{font-size:12px;line-height:1.5;color:#6a7d72;margin:12px 0 0}
#ai-workflow[data-live-work="true"] .workflow-stage-body>[data-workflow-pane],#ai-workflow[data-live-work="true"] #workflow-editor-slot{display:none}
#ai-workflow[data-live-work="true"] #workflow-feedback::before{animation:none}
#ai-workflow[data-live-work="true"] #workflow-help{display:none}
@keyframes workflow-work-wait{50%{background-position:100% 0}}
@media(max-height:850px){#workflow-live-work{padding:12px 14px;min-height:180px}#workflow-live-output{padding:12px}#workflow-live-note{margin:8px 0 0}}
@media(prefers-reduced-motion:reduce){#workflow-live-output{animation:none!important}}
/* The live card owns the work heading; keep duplicate announcements accessible only. */
#ai-workflow[data-live-work="true"] #workflow-title{display:none}
#ai-workflow[data-live-work="true"] #workflow-feedback{position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);border:0}
#ai-workflow[data-live-work="true"] .workflow-stage-body{display:flex;flex-direction:column}
#ai-workflow[data-live-work="true"] #workflow-live-work{min-height:0;flex:1;display:flex;flex-direction:column}
#ai-workflow[data-live-work="true"] #workflow-live-output{min-height:65px;flex:1;overflow:auto;overscroll-behavior:contain}
#ai-workflow[data-live-work="true"] #workflow-live-note{display:none}
#ai-workflow[data-live-work="true"] #workflow-live-intent{margin:8px 0}
#ai-workflow[data-live-work="true"] #workflow-live-work{max-height:370px}

#ai-workflow[data-live-work="true"] #workflow-completed{display:flex;min-height:36px;flex-shrink:0}

/* Shared top edge: preparation belongs to the left column; preview owns the right. */
.aim-editor-column{min-width:0;grid-column:1;grid-row:1}
.aim-editor-column>.aim-channel-bar{margin-bottom:12px}
.aim-editor-column .aim-workflow-bar{background:#fff;border-color:#e0e8e3;box-shadow:0 2px 5px rgb(25 59 40 / 2%);padding:12px 16px;margin-bottom:12px}
.aim-editor-column .aim-workflow-bar>label{padding-bottom:10px;border-bottom:1px solid #edf1ee;gap:10px}
.aim-editor-column .aim-workflow-bar input{font-size:16px;line-height:1.5}
.aim-editor-column #workflow-steps{grid-template-columns:repeat(6,minmax(0,1fr));gap:0;margin-top:12px;position:relative}
.aim-editor-column #workflow-steps button{position:relative;display:flex;flex-direction:column;justify-content:flex-start;gap:5px;padding:6px 2px 7px;min-width:0;border:0;border-radius:10px;background:transparent;color:#607267;opacity:1;transition:background-color 180ms ease,color 180ms ease}
.aim-editor-column #workflow-steps button::before{content:"";position:absolute;top:19px;left:calc(-50% + 20px);right:calc(50% + 20px);height:1px;background:#dce5df;pointer-events:none}
.aim-editor-column #workflow-steps button:first-child::before{display:none}
.aim-editor-column #workflow-steps .workflow-step-number{display:grid;place-items:center;width:26px;height:26px;border:1px solid #d3ddd7;border-radius:50%;background:#fff;color:#66786d;font-size:12px;font-weight:700;box-sizing:border-box;position:relative}
.aim-editor-column #workflow-steps strong{font-size:12px;line-height:1.4;white-space:nowrap;font-weight:600}
.aim-editor-column #workflow-steps small{font-size:10px;line-height:1.3;color:#708077}
.aim-editor-column #workflow-steps button[data-state="complete"] .workflow-step-number{border-color:#d7eadd;background:#eaf4ee;color:#147545}
.aim-editor-column #workflow-steps button[data-state="complete"]::before,.aim-editor-column #workflow-steps button[data-state="current"]::before{background:#9fcbb0}
.aim-editor-column #workflow-steps button[data-state="current"]{background:#eff7f2;color:#126f40}
.aim-editor-column #workflow-steps button[data-state="current"] .workflow-step-number{background:#137c47;border-color:#137c47;color:white;box-shadow:0 0 0 3px #e0eee5}
.aim-editor-column #workflow-steps button[data-state="current"] small{color:#147545;font-weight:600}
.aim-editor-column #workflow-steps button[data-state="attention"]{background:#fff8ed;color:#8a5b1d}
.aim-editor-column #workflow-steps button[data-state="attention"] .workflow-step-number{border-color:#bd893d;color:#8a5b1d}
.aim-editor-column #workflow-steps button:not(:disabled):hover{background:#e9f2ed}
.aim-editor-column #workflow-steps button:focus-visible{outline:2px solid #137c47;outline-offset:2px}
.aim-editor-column #workflow-steps button:disabled{cursor:default}
@media(min-width:741px){
 .aim-page .aim-main-grid>.aim-preview-panel{position:sticky;top:calc(var(--message-viewport-offset,0px) + var(--message-toolbar-height,56px));align-self:start;grid-column:2;grid-row:1}
 .message-anchored.aim-page .aim-preview-panel .right-card{height:var(--workflow-preview-height,calc(100vh - 190px));max-height:var(--workflow-preview-height,calc(100vh - 190px));overflow:auto;overscroll-behavior:contain;box-sizing:border-box}
}
@media(max-width:740px){
 .aim-editor-column{grid-column:1;grid-row:1}
 .aim-page .aim-main-grid>.aim-preview-panel{grid-column:1;grid-row:2;position:static}
 .aim-editor-column #workflow-steps strong{font-size:11px}
 .aim-editor-column .aim-workflow-bar{padding:10px 8px}
}

.aim-editor-column .aim-workflow-bar{padding:10px 14px}
.aim-editor-column .aim-workflow-bar>label{padding-bottom:6px}
.aim-editor-column #workflow-steps{margin-top:8px}
.aim-editor-column #workflow-steps button{gap:3px;padding:4px 2px}
.aim-editor-column #workflow-steps button::before{top:17px}
.aim-editor-column .aim-channel-tabs{gap:5px}
.aim-editor-column .aim-channel-tabs button{padding:7px 10px;min-width:0}

@media(min-width:741px){
 .message-anchored.aim-page .aim-preview-panel .right-card{display:flex;flex-direction:column;overflow:hidden}
 .aim-preview-panel .right-card>h2,.aim-preview-panel .right-card>p{flex-shrink:0}
 .aim-preview-panel #preview-live{display:flex;flex-direction:column;min-height:0;flex:1}
 .aim-preview-panel #preview-live>label,.aim-preview-panel #preview-live>select,.aim-preview-panel #recipient-shortcuts,.aim-preview-panel #preview-evidence{flex-shrink:0}
 .aim-preview-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-top:8px}
 .aim-preview-scroll:focus-visible{outline:2px solid #137c47;outline-offset:-2px;border-radius:8px}
 .aim-preview-panel #workflow-empty-preview{min-height:0;flex:1;overflow:auto}
}

/* Image-only reveal: bounded blur/light, then a still result. No page movement. */
.workflow-image-build{float:right;width:clamp(136px,34%,220px);margin:0 0 12px 18px}
.workflow-image-build-canvas{position:relative;overflow:hidden;isolation:isolate;border-radius:12px;aspect-ratio:4/3;background:#eaf0ed;border:1px solid #dce7e0}
.workflow-image-build-canvas img{display:block;width:100%;height:100%;object-fit:contain;animation:workflow-image-materialize 4.8s cubic-bezier(.22,.65,.3,1) both}
.workflow-image-build-light{position:absolute;inset:-30%;pointer-events:none;background:radial-gradient(ellipse at 30% 35%,#fff9 0%,#e5f2ea55 35%,transparent 65%),linear-gradient(115deg,transparent 25%,#ffffff99 48%,transparent 72%);animation:workflow-image-light 4.8s ease-in-out both;mix-blend-mode:screen}
.workflow-image-build figcaption{font-size:12px;line-height:1.6;color:#245a3c;font-weight:700;margin-top:7px}
.workflow-image-build small{display:block;font-size:11px;line-height:1.5;color:#718076;margin-top:3px}
#workflow-live-output[data-image-motion="paused"] .workflow-image-build-canvas *{animation-play-state:paused}
#workflow-live-output[data-image-motion="instant"] .workflow-image-build-canvas *, .workflow-image-build[data-phase="ready"] .workflow-image-build-canvas *{animation:none}
#workflow-live-output[data-image-motion="instant"] .workflow-image-build-light,.workflow-image-build[data-phase="ready"] .workflow-image-build-light{display:none}
@keyframes workflow-image-materialize{0%{filter:blur(20px) saturate(.5);opacity:.25;transform:scale(1.06)}35%{filter:blur(12px) saturate(.7);opacity:.65}70%{filter:blur(4px);opacity:.9}100%{filter:blur(0);opacity:1;transform:scale(1)}}
@keyframes workflow-image-light{0%{opacity:.9;transform:translateX(-22%)}55%{opacity:.5;transform:translateX(15%)}100%{opacity:0;transform:translateX(35%)}}
@media(prefers-reduced-motion:reduce){.workflow-image-build-canvas *{animation:none!important}.workflow-image-build-light{display:none}}

/* Keep the animated image fully visible in the existing bounded work area. */
#workflow-live-work:has(.workflow-image-build) #workflow-live-intent{display:none}
#workflow-live-output:has(.workflow-image-build){display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,35%);gap:14px;padding:10px;margin-top:10px;overflow:hidden}
.workflow-image-build{float:none;grid-column:2;grid-row:1;width:auto;margin:0;display:flex;flex-direction:column;min-height:0}
.workflow-image-build-canvas{flex:1;min-height:0;aspect-ratio:auto}
.workflow-image-build-canvas img{position:absolute;inset:0}
.workflow-image-build figcaption{font-size:11px;line-height:1.4;margin-top:5px}
.workflow-image-build small{display:none}
.workflow-image-copy{grid-column:1;grid-row:1;min-height:0;overflow:auto;overscroll-behavior:contain;font-size:12px}

/* A readable opening beat, progressive facts, then a quiet review hold. */
#workflow-live-work[data-deliberate="true"] .workflow-live-head>span{min-width:74px;text-align:center}
#workflow-live-work[data-deliberate="true"][data-reveal-phase="settling"] .workflow-live-head>span{animation:workflow-understand 1.6s ease-in-out infinite}
#workflow-live-work[data-deliberate="true"] #workflow-live-output>p{padding:7px 10px;border-left:2px solid #b3d8c2;background:#f4f9f6;border-radius:0 6px 6px 0;animation:workflow-fact-in 240ms ease-out both}
#workflow-live-work[data-deliberate="true"][data-reveal-phase="ready"] .workflow-live-head>span{background:#dcefe3;color:#126c3d}
@keyframes workflow-understand{50%{background:#c8e7d5;box-shadow:0 0 0 4px #e7f3ec}}
@keyframes workflow-fact-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){#workflow-live-work[data-deliberate="true"] *{animation:none!important}}

/* Final review and bounded send replay share one stable dialog. */
#workflow-confirm{width:min(760px,calc(100vw - 32px));border-radius:20px}
#workflow-confirm header{padding:24px 28px 18px;border-bottom:1px solid #edf1ee}
#workflow-confirm .workflow-confirm-body{padding:24px 28px;min-height:230px}
#workflow-confirm footer{padding:18px 28px;min-height:70px;box-sizing:border-box}
.send-confirm-eyebrow{display:block;font-size:11px;letter-spacing:.08em;color:#167849;font-weight:700;margin-bottom:7px}
#workflow-confirm-summary{font-size:21px;font-weight:700;line-height:1.5;margin:0 0 22px;overflow-wrap:anywhere}
.send-confirm-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 28px;margin:0}
.send-confirm-grid>div{padding-bottom:14px;border-bottom:1px solid #e6ece8;min-width:0}
.send-confirm-grid dt,.send-sim-metrics dt{font-size:12px;color:#64776c;margin-bottom:6px}
.send-confirm-grid dd{font-size:16px;font-weight:650;margin:0;overflow-wrap:anywhere}
#workflow-confirm-issues:empty{display:none}
#workflow-confirm [hidden]{display:none!important}
.send-sim-scene{display:flex;align-items:center;justify-content:center;gap:0;min-height:168px;padding:22px;background:radial-gradient(ellipse at center,#174d3d,#0d2721);border-radius:16px;color:#fff;overflow:hidden}
.send-sim-source,.send-sim-channel,.send-sim-target{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0;z-index:1;position:relative;width:90px;height:90px;border:1px solid #82bc9b66;border-radius:50%;background:#163e31;font-weight:700;font-size:15px;box-shadow:0 0 0 8px #6cd49b09}
.send-sim-channel{background:#e3f6e9;color:#11683d;box-shadow:0 0 0 9px #89ecb314,0 0 44px #81ffb326}
.send-sim-target span{font-size:11px;font-weight:400;color:#bad6c6;margin-top:4px}
.send-sim-track{position:relative;flex:1;max-width:110px;height:2px;background:#416c57}
.send-sim-track i{position:absolute;top:-2px;left:0;width:6px;height:6px;border-radius:50%;background:#a6fac2;box-shadow:0 0 10px #a6fac2;opacity:0}
#workflow-confirm[data-send-state="running"] .send-sim-track i{animation:send-sim-flow 1.6s ease-in-out infinite}
#workflow-confirm[data-send-state="running"] .send-sim-track i:nth-child(2){animation-delay:.5s}
#workflow-confirm[data-send-state="running"] .send-sim-track i:nth-child(3){animation-delay:1s}
#workflow-confirm[data-send-state="complete"] .send-sim-channel{animation:send-sim-done .65s ease-out both}
#send-sim-status{text-align:center;font-size:18px;font-weight:700;color:#163f2a;margin:22px 0 18px}
.send-sim-steps{display:flex;gap:8px;list-style:none;padding:0;margin:0;counter-reset:send-step}
.send-sim-steps li{flex:1;border-top:3px solid #e2e9e5;padding:12px 0 4px;font-size:12px;color:#7d8a82;counter-increment:send-step}
.send-sim-steps li::before{content:counter(send-step) '  ';font-weight:700}
.send-sim-steps li[data-state="active"]{border-color:#17a564;color:#147345;font-weight:700}
.send-sim-steps li[data-state="done"]{border-color:#80bc98;color:#3e6950}
.send-sim-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:24px 0 0;padding:20px;background:#f2f8f4;border:1px solid #dfebe3;border-radius:12px}
.send-sim-metrics dd{font-size:24px;font-weight:750;margin:0;color:#185e39}
@keyframes send-sim-flow{0%{left:0;opacity:0}15%{opacity:1}85%{opacity:1}100%{left:100%;opacity:0}}
@keyframes send-sim-done{50%{box-shadow:0 0 0 18px #89ecb325,0 0 60px #81ffb345}100%{box-shadow:0 0 0 9px #89ecb314}}
@media(max-width:520px){.send-sim-source,.send-sim-channel,.send-sim-target{width:64px;height:64px;font-size:12px}.send-sim-scene{padding:12px}.send-confirm-grid{gap:12px}.send-sim-metrics{grid-template-columns:1fr 1fr}.send-sim-metrics dd{font-size:20px}}
@media(prefers-reduced-motion:reduce){#workflow-confirm *{animation:none!important;transition:none!important}}

.send-sim-metrics dd{font-variant-numeric:tabular-nums;white-space:nowrap}.send-sim-metrics>div:first-child{border-right:1px solid #cfdfd4;padding-right:10px}.send-sim-metrics>div:first-child dd{color:#304e3e}

/* Sandbox entrance only. The recorded delivery scene, totals and results stay intact. */
#workflow-confirm .send-verification-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#send-sandbox-badge{font-size:11px;font-weight:500;line-height:20px;padding:0 7px;border:1px solid #e3e9e5;border-radius:5px;background:#f5f8f6;color:#63756b}
#send-verification-subtitle{font-size:13px;font-weight:400;line-height:1.6;color:#677a6f;margin:8px 0 0}
#send-simulation{position:relative;isolation:isolate}
#send-simulation-content{transition:opacity 180ms ease-out}
#workflow-confirm[data-verification="checking"] #send-simulation-content{opacity:.12;pointer-events:none}
#workflow-confirm[data-verification] .send-sim-track i{animation:none;opacity:0}
#send-verification{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:rgba(248,251,249,.82);border-radius:16px;opacity:1;transition:opacity 180ms ease-out;pointer-events:none}
#send-verification-status{font-size:16px;font-weight:600;line-height:1.5;color:#254b37;margin:0}
.send-verification-steps{list-style:none;display:flex;flex-direction:column;gap:12px;margin:0;padding:0;min-width:230px}
.send-verification-steps li{display:flex;align-items:center;gap:10px;font-size:13px;line-height:22px;color:#7b8981;transition:color 160ms ease-out}
.send-verification-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;font-size:13px;flex-shrink:0;background:#eff3f0;color:#7b8981}
.send-verification-state{margin-left:auto;font-size:11px;font-weight:400;color:#718279}
.send-verification-steps li[data-state="done"]{color:#427257}
.send-verification-steps li[data-state="done"] .send-verification-icon{background:#e8f4ec;color:#31845a}
.send-verification-steps li[data-state="active"]{font-weight:600;color:#176b42}
.send-verification-steps li[data-state="active"] .send-verification-icon{background:#e8f4ec;color:#187346;animation:send-verification-pulse 700ms ease-in-out infinite}
#workflow-confirm[data-verification="revealing"] #send-verification{opacity:0}
@keyframes send-verification-pulse{50%{opacity:.5}}
@media(prefers-reduced-motion:reduce){#send-verification,#send-simulation-content{transition:none}.send-verification-icon{animation:none!important}}

/* Pre-send review results only; entrance replay and delivery outcomes keep their styling. */
#workflow-confirm-details .send-validation-summary{display:flex;align-items:flex-start;gap:12px;margin:0 0 18px}
#workflow-confirm-details .send-validation-mark{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;border-radius:50%;background:#edf6f0;color:#187146;font-size:15px;margin-top:1px}
#workflow-confirm-details .send-validation-summary strong{display:block;font-size:18px;line-height:26px;font-weight:650;color:#254a37}
#workflow-confirm-details .send-validation-summary p{font-size:13px;line-height:20px;color:#64766c;margin:4px 0 0}
#workflow-confirm-details .send-validation-summary .send-validation-ready{color:#27714b;font-weight:500;font-size:12px;margin-top:5px}
#workflow-confirm-details .send-validation-summary[data-state="warning"] .send-validation-mark{background:#fbf4e7;color:#936718}
#workflow-confirm-details .send-validation-summary[data-state="needs"] .send-validation-mark{background:#f1f3f2;color:#43574b}
#workflow-confirm-details .send-validation-summary[data-state="needs"] strong{color:#354b3e}
#workflow-confirm-details .send-validation-results{display:flex;flex-direction:column;gap:8px}
#workflow-confirm-details .send-validation-result{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:62px;padding:10px 14px;box-sizing:border-box;background:#fbfcfb;border:1px solid #e4eae6;border-radius:10px}
#workflow-confirm-details .send-validation-result>div{min-width:0}
#workflow-confirm-details .send-validation-result strong{display:block;font-size:13px;line-height:20px;font-weight:600;color:#354b3e}
#workflow-confirm-details .send-validation-result p{font-size:12px;line-height:19px;color:#68796f;margin:2px 0 0;overflow-wrap:anywhere}
#workflow-confirm-details .send-validation-badge{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;white-space:nowrap;background:#edf6f0;color:#26764b;border-radius:5px;padding:3px 7px;font-size:11px;line-height:18px;font-weight:500}
#workflow-confirm-details .send-validation-badge>span:first-child{font-size:12px;font-weight:600}
#workflow-confirm-details .send-validation-result[data-state="warning"] .send-validation-badge{background:#fbf4e7;color:#906319}
#workflow-confirm-details .send-validation-result[data-state="needs"]{border-color:#8f9e95;background:#fafbfa}
#workflow-confirm-details .send-validation-result[data-state="needs"] .send-validation-badge{background:#edf0ee;color:#354b3e}
#workflow-confirm-details .send-validation-details{border-top:1px solid #e6ece8;margin:18px 0 0;padding-top:12px}
#workflow-confirm-details .send-validation-details>summary{font-size:12px;line-height:22px;font-weight:500;color:#64766c;cursor:pointer;outline-offset:4px}
#workflow-confirm-details .send-validation-details[open]>summary{margin-bottom:16px}
#workflow-confirm-details .send-validation-details #workflow-confirm-summary{font-size:15px;line-height:23px;margin-bottom:14px}
#workflow-confirm-details .send-validation-details h3{font-size:13px;font-weight:600;margin:18px 0 8px}
#send-validation-evidence{padding-left:18px;margin:0;font-size:12px;line-height:21px;color:#64766c}
#workflow-confirm-details .send-validation-scope{font-size:11px;line-height:18px;color:#738278;border-top:1px solid #e9eeeb;margin:14px 0 0;padding-top:10px}
#workflow-confirm-details .send-validation-results[data-animate="true"] .send-validation-badge{animation:send-validation-check 160ms ease-out both}
#workflow-confirm-details .send-validation-results[data-animate="true"] .send-validation-result:nth-child(2) .send-validation-badge{animation-delay:180ms}
#workflow-confirm-details .send-validation-results[data-animate="true"] .send-validation-result:nth-child(3) .send-validation-badge{animation-delay:360ms}
#workflow-confirm-details .send-validation-results[data-animate="true"] .send-validation-result:nth-child(4) .send-validation-badge{animation-delay:540ms}
@keyframes send-validation-check{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@media(max-height:760px){#workflow-confirm-details .send-validation-summary{margin-bottom:10px}#workflow-confirm-details .send-validation-summary strong{font-size:16px;line-height:23px}#workflow-confirm-details .send-validation-summary p{line-height:18px}#workflow-confirm-details .send-validation-results{gap:4px}#workflow-confirm-details .send-validation-result{min-height:52px;padding:6px 12px}#workflow-confirm-details .send-validation-details{margin-top:12px;padding-top:8px}}
@media(prefers-reduced-motion:reduce){#workflow-confirm-details .send-validation-badge{animation:none!important}}

/* Final approval footer only. Sending and result footers keep their existing layout. */
/* Stored delivery results only; pre-send review, approval and replay retain their layout. */
#send-result-overview[hidden],#send-result-details-toggle[hidden]{display:none}
.send-result-summary{display:flex;align-items:flex-start;gap:12px;margin:2px 0 0}
.send-result-summary h3{font-size:22px;line-height:30px;font-weight:650;color:#254533;margin:0}
.send-result-summary p{font-size:14px;line-height:22px;color:#68786e;margin:6px 0 0}
.send-result-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;border-radius:50%;background:#eef6f0;color:#22764a;font-size:16px;margin-top:2px}
#workflow-confirm[data-result-state="success"] .send-result-icon{animation:send-result-check 240ms ease-out both}
#workflow-confirm[data-result-state="partial"] .send-result-icon{background:#f8eeeb;color:#a26055}
#workflow-confirm[data-result-state="pending"] .send-result-icon{background:#f4f1e9;color:#8a7752;animation:send-result-wait 1.8s ease-in-out infinite}
#workflow-confirm[data-result-state="empty"] .send-result-icon{background:#f0f2f1;color:#718078}
.send-result-total{font-size:13px;line-height:21px;color:#65776b;margin:22px 0 12px}
.send-result-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:18px 0 20px;margin:0;border-top:1px solid #e8eeea;border-bottom:1px solid #e8eeea}
.send-result-metrics>div+div{border-left:1px solid #edf1ee;padding-left:20px}
.send-result-metrics dt{font-size:13px;line-height:20px;color:#64746a;margin-bottom:4px}
.send-result-metrics dd{margin:0;display:flex;align-items:baseline;gap:5px;color:#27744c}
.send-result-metrics strong{font-size:36px;line-height:46px;font-weight:650;font-variant-numeric:tabular-nums}
.send-result-metrics dd>span{font-size:12px;line-height:20px;color:#7a867e}
.send-result-metrics [data-kind="failed"] dd{color:#a5655b}
.send-result-metrics [data-kind="pending"] dd{color:#758179}
#workflow-confirm[data-result-state] .send-result-details{margin-top:18px}
#workflow-confirm[data-result-state] .send-result-details>summary{cursor:pointer;font-size:12px;line-height:22px;color:#6a7b70;outline-offset:4px}
#workflow-confirm[data-result-state] .send-result-detail-body{padding-top:16px}
#workflow-confirm[data-result-state] .send-sim-channel{animation:none}
@keyframes send-result-check{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
@keyframes send-result-wait{50%{opacity:.5}}
@media(max-height:760px){.send-result-summary h3{font-size:20px;line-height:28px}.send-result-total{margin-top:16px}.send-result-metrics{padding:12px 0 16px}.send-result-metrics strong{font-size:32px;line-height:42px}}
@media(max-width:520px){.send-result-metrics{gap:8px}.send-result-metrics>div+div{padding-left:12px}.send-result-metrics strong{font-size:30px}}
@media(prefers-reduced-motion:reduce){.send-result-icon{animation:none!important}}
#workflow-confirm .send-approval-area{width:100%;min-width:0}
#workflow-confirm[data-send-state="confirm"] footer{display:block;padding:16px 28px 18px}
#workflow-confirm .send-approval-summary strong{display:block;font-size:14px;font-weight:600;line-height:22px;color:#294c38}
#workflow-confirm .send-approval-summary p{margin:3px 0 0;font-size:12px;line-height:19px;color:#6c7b72}
#workflow-confirm .send-approval-checks{display:flex;flex-wrap:wrap;gap:6px 16px;list-style:none;margin:10px 0 12px;padding:0}
#workflow-confirm .send-approval-checks li{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:18px;color:#7a877f}
#workflow-confirm .send-approval-checks li[data-state="done"]{color:#33704c}
#workflow-confirm .send-approval-checks li>span:first-child{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#f0f3f1;font-size:10px}
#workflow-confirm .send-approval-checks li[data-state="done"]>span:first-child{color:#2f7850;background:#edf6ef}
#workflow-confirm .send-approval-actions{display:flex;align-items:center;gap:10px}
#workflow-confirm .send-approval-note{margin:0 auto 0 0;max-width:240px;font-size:11px;line-height:17px;color:#7a877f}
#workflow-confirm #workflow-confirm-back{font-size:12px;padding:7px 12px;white-space:nowrap}
#workflow-confirm #workflow-confirm-run{min-width:100px;font-size:13px;min-height:36px;transition:opacity 250ms ease-out,background-color 250ms ease-out,color 250ms ease-out;white-space:nowrap}
#workflow-confirm #workflow-confirm-run:disabled{background:#edf0ee;border-color:#e3e8e5;color:#8b978f;opacity:.7;box-shadow:none;cursor:not-allowed}
#workflow-confirm #workflow-confirm-run[data-approval="ready"]:not(:disabled){animation:send-approval-ready 250ms ease-out 1}
@keyframes send-approval-ready{0%{opacity:.78;box-shadow:0 0 0 0 rgba(39,128,78,.08)}55%{box-shadow:0 0 0 3px rgba(39,128,78,.07)}100%{opacity:1;box-shadow:0 0 0 0 rgba(39,128,78,0)}}
@media(max-height:760px){#workflow-confirm[data-send-state="confirm"] footer{padding:8px 28px}#workflow-confirm .send-approval-summary strong{font-size:13px;line-height:19px}#workflow-confirm .send-approval-summary p{margin-top:2px;font-size:11px;line-height:16px}#workflow-confirm .send-approval-checks{margin:4px 0 6px;gap:4px 12px}#workflow-confirm .send-approval-checks li{line-height:16px}#workflow-confirm .send-approval-note{max-width:180px;line-height:16px}#workflow-confirm #workflow-confirm-run{min-height:34px}}
@media(max-width:520px){#workflow-confirm .send-approval-actions{flex-wrap:wrap;justify-content:flex-end}#workflow-confirm .send-approval-note{flex-basis:100%;max-width:none}}
@media(prefers-reduced-motion:reduce){#workflow-confirm #workflow-confirm-run{animation:none!important;transition:none}}

/* Original request stays still while the interpreted direction is revealed. */
.workflow-goal{flex-shrink:0;margin:0 0 12px;padding:12px 16px;border:1px solid #d8e7df;border-radius:10px;background:#f5f9f7}
.workflow-goal summary{cursor:pointer;color:#315b45;font-size:13px;font-weight:700}
.workflow-goal blockquote{margin:10px 0 0;padding-left:12px;border-left:3px solid #99bda8;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.7;color:#253e30;max-height:128px;overflow:auto}
.workflow-direction-title{font-size:15px;margin:14px 0}
@media(min-width:741px){.aim-workflow-active .aim-composer:has(#ai-workflow[data-phase="0"]){height:max(620px,calc(var(--workflow-viewport,100vh) - 530px))}}

.aim-new-message-dialog{width:min(440px,calc(100vw - 32px));padding:24px;border:1px solid #dce5df;border-radius:16px;color:#24392d}.aim-new-message-dialog::backdrop{background:#17312666}.aim-new-message-dialog h2{font-size:20px;margin:0 0 12px}.aim-new-message-dialog p{font-size:14px;line-height:1.7}.aim-new-message-dialog>div{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.aim-new-message-dialog button{font:inherit;font-size:13px;padding:10px 12px;border:1px solid #d5dfd8;border-radius:8px;background:white;cursor:pointer}.aim-new-message-dialog [data-new]{background:#127b45;color:white}

/* Evidence stays in the current step; details expand only on demand. */
#workflow-trust-pause{align-self:flex-start;margin:6px 0 10px;color:#12643c}#workflow-trust-pause[hidden]{display:none}
.workflow-review-summary{padding:14px;background:#edf7f1;border:1px solid #cfe5d8;border-radius:10px;color:#1f5539;font-size:14px}
#workflow-review-customers{display:grid;gap:10px;margin:12px 0}
.workflow-customer-check{display:flex;flex-direction:column;gap:6px;text-align:left;padding:14px;background:#fff;border:1px solid #dce7df;border-radius:10px;font:inherit;color:#293d31;cursor:pointer}.workflow-customer-check:hover{border-color:#17864d;background:#f7fbf8}.workflow-customer-check strong{font-size:14px}.workflow-customer-check small{font-size:12px;color:#65766b}.workflow-customer-check p{margin:0;font-size:13px;line-height:1.7;white-space:pre-wrap}.workflow-customer-check span{color:#127343;font-size:12px}
#workflow-review-details{font-size:13px;line-height:1.9;padding-left:20px}#workflow-review-details .needs-attention{color:#9b5c14}
#workflow-condition-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}#workflow-condition-facts>div{display:flex;flex-direction:column;gap:7px;border:1px solid #dce7df;border-radius:10px;padding:14px;background:#f8fbf9}#workflow-condition-facts small{color:#63776a;font-size:12px}#workflow-condition-facts strong{font-size:14px;overflow-wrap:anywhere}#workflow-condition-facts p{font-size:12px;line-height:1.6;margin:0;color:#64766a}
@media(min-width:741px){.aim-workflow-active .aim-composer:has(#ai-workflow[data-phase="3"]),.aim-workflow-active .aim-composer:has(#ai-workflow[data-phase="4"]){height:max(620px,calc(var(--workflow-viewport,100vh) - 530px))}}
@media(max-width:740px){#workflow-condition-facts{grid-template-columns:1fr}}
