.aiec-chat{position:relative;max-width:900px;margin:0 auto;border:1px solid #d7dce2;border-radius:14px;background:#fff;overflow:hidden;font-family:Arial,sans-serif;color:#172033}.aiec-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #e5e8ec}.aiec-title{font-weight:700;font-size:18px}.aiec-status{font-size:12px;color:#667085}.aiec-stream{min-height:320px;max-height:560px;overflow:auto;padding:20px;background:#f7f8fa}.aiec-empty{text-align:center;color:#808897;padding:90px 20px}.aiec-msg{max-width:78%;padding:12px 14px;border-radius:12px;margin:10px 0;line-height:1.45}.aiec-user{margin-left:auto;background:#172033;color:#fff}.aiec-assistant{background:#fff;border:1px solid #dde2e8}.aiec-error{background:#fff;border:1px solid #b42318;color:#b42318}.aiec-answer-title{font-weight:600;margin-bottom:10px}.aiec-expert{padding:5px 0;font-weight:700}.aiec-user-input{display:inline-block;margin-top:4px;opacity:.9}.aiec-form{display:flex;gap:10px;padding:14px;border-top:1px solid #e5e8ec;align-items:flex-end}.aiec-compose{flex:1;border:1px solid #cfd5dd;border-radius:12px;background:#fff;overflow:hidden}.aiec-compose textarea{display:block;width:100%;box-sizing:border-box;resize:vertical;min-height:62px;border:0;outline:0;padding:11px 12px 6px;font:inherit}.aiec-toolbar{display:flex;gap:4px;padding:4px 7px 8px}.aiec-tool{display:flex;align-items:center;gap:4px;border:0;background:transparent;border-radius:8px;padding:6px 8px;color:#475467;cursor:pointer}.aiec-tool:hover{background:#f1f3f5}.aiec-tool span{font-size:22px;line-height:1}.aiec-tool small{font-size:16px;line-height:1.25}.aiec-tool.recording{background:#fee4e2;color:#b42318}.aiec-tool.has-input{background:#ecfdf3;color:#067647}.aiec-tool:disabled{opacity:.45;cursor:default}.aiec-send{border:0;border-radius:9px;background:#172033;color:#fff;padding:11px 18px;cursor:pointer;min-height:42px}.aiec-send:disabled{opacity:.5;cursor:default}.aiec-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:0 9px}.aiec-attachments:empty{display:none}.aiec-chip{display:flex;align-items:center;gap:7px;background:#f2f4f7;border-radius:8px;padding:5px 7px;font-size:12px}.aiec-chip button{border:0;background:transparent;padding:0 2px;font-size:16px;line-height:1;cursor:pointer;color:#667085}.aiec-camera-panel{position:absolute;left:14px;right:14px;bottom:88px;z-index:10;background:#111827;border-radius:12px;padding:10px;box-shadow:0 14px 32px rgba(0,0,0,.24)}.aiec-camera-panel[hidden]{display:none}.aiec-camera-preview-wrap{position:relative;min-height:240px;display:flex;align-items:center;justify-content:center;background:#000;border-radius:8px;overflow:hidden}.aiec-camera-panel video{display:block;width:100%;max-height:480px;object-fit:contain;background:#000}.aiec-camera-loading{position:absolute;color:#fff;font-size:16px}.aiec-camera-actions{display:flex;justify-content:center;gap:10px;padding-top:10px}.aiec-camera-actions button{border:0;border-radius:8px;padding:9px 16px;cursor:pointer;font:inherit}.aiec-camera-actions button:disabled{opacity:.5;cursor:default}.aiec-camera-actions button:first-child{background:#fff;color:#172033}.aiec-camera-actions button:last-child{background:#374151;color:#fff}.aiec-tool.is-selected{background:#eef4ff;color:#175cd3}@media(max-width:600px){.aiec-msg{max-width:92%}.aiec-form{align-items:stretch}.aiec-send{padding:10px 14px}.aiec-tool small{display:inline}.aiec-camera-panel{bottom:92px}}
.aiec-tool.api-ready{position:relative}.aiec-tool.api-ready:after{content:"";width:7px;height:7px;border-radius:50%;background:#12b76a;position:absolute;right:4px;top:4px}.aiec-tool.recording:after{background:#fff}

.aiec-translation{margin:0 0 14px;padding:10px 12px;background:#f7f8fa;border:1px solid #e4e7ec;border-radius:9px}.aiec-translation-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#667085;margin-bottom:5px}.aiec-translation-text{font-size:14px;line-height:1.45;color:#172033;white-space:pre-wrap;word-break:break-word}

.aiec-review-label{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#667085;margin-bottom:8px}.aiec-review-question{font-size:16px;line-height:1.55;font-weight:600;color:#172033;white-space:pre-wrap}.aiec-review-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.aiec-review-actions button{min-height:42px;border-radius:9px;padding:10px 18px;font-size:15px;font-weight:600;cursor:pointer}.aiec-accept{border:1px solid #16a34a;background:#16a34a;color:#fff}.aiec-refresh{border:1px solid #cfd5dd;background:#fff;color:#172033}.aiec-review-actions button:disabled{opacity:.5;cursor:default}.aiec-compose textarea:disabled{background:#f8f9fb;color:#667085}.aiec-toolbar{gap:10px}.aiec-tool{padding:7px 10px}.aiec-tool small{font-family:inherit}

.aiec-expert-card{padding:10px 0 12px;border-bottom:1px solid #eaecf0}.aiec-expert-card:last-child{border-bottom:0}.aiec-expert-card .aiec-expert{padding:0;font-weight:700;font-size:16px}.aiec-skills-label{margin-top:7px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#667085}.aiec-skills{margin:6px 0 0 20px;padding:0}.aiec-skills li{margin:4px 0;line-height:1.4;font-size:15px}

.aiec-progress{padding:14px 18px 16px;border-bottom:1px solid #d7eadf;background:#f7fff9;position:relative;z-index:2}.aiec-progress[hidden]{display:none}.aiec-progress-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;color:#344054;margin-bottom:7px}.aiec-progress-top strong{color:#067647;font-size:14px}.aiec-progress-track{height:14px;background:#e8f5ee;border-radius:999px;overflow:hidden}.aiec-progress-fill,.aiec-mini-track i{position:relative;overflow:hidden;will-change:width}.aiec-progress-fill{height:100%;width:0;background:#12b76a;border-radius:999px;transition:width 1.6s cubic-bezier(.22,.61,.36,1)}.aiec-progress-fill:after,.aiec-mini-track i:after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.12) 42%,rgba(255,255,255,.42) 50%,rgba(255,255,255,.12) 58%,transparent 100%);animation:aiec-progress-sheen 2.8s ease-in-out infinite}.aiec-progress-tasks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:10px}.aiec-progress-task{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:4px 8px;align-items:center;font-size:11px;color:#475467}.aiec-progress-task>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.aiec-progress-task>b{text-align:right;color:#067647;font-size:11px}.aiec-mini-track{grid-column:1/3;height:5px;background:#e8f5ee;border-radius:999px;overflow:hidden}.aiec-mini-track i{display:block;height:100%;width:0;background:#12b76a;border-radius:999px;transition:width 1.35s cubic-bezier(.22,.61,.36,1)}@keyframes aiec-progress-sheen{to{transform:translateX(100%)}}@media(prefers-reduced-motion:reduce){.aiec-progress-fill,.aiec-mini-track i{transition:none}.aiec-progress-fill:after,.aiec-mini-track i:after{animation:none}}@media(max-width:700px){.aiec-progress-tasks{grid-template-columns:1fr 1fr}}@media(max-width:420px){.aiec-progress-tasks{grid-template-columns:1fr}}

.aiec-missing-label{font-size:.9em;font-weight:600;margin-top:6px}.aiec-missing{margin:4px 0 8px 18px}.aiec-missing li{font-weight:400;margin:2px 0}.aiec-missing-none{font-size:.9em;font-weight:400;opacity:.72;margin:5px 0 8px}

/* v1.32 health/safety human review warning */
.aiec-human{border:1px solid #b42318;background:#d92d20;color:#fff}.aiec-human:hover{background:#b42318}.aiec-human-modal[hidden]{display:none}.aiec-human-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:20px}.aiec-human-backdrop{position:absolute;inset:0;background:rgba(16,24,40,.58)}.aiec-human-dialog{position:relative;z-index:1;width:min(620px,calc(100vw - 40px));max-height:calc(100vh - 80px);overflow:auto;background:#fff;border:1px solid #f1b4ae;border-radius:14px;padding:22px;box-shadow:0 24px 60px rgba(16,24,40,.28)}.aiec-human-title{font-size:19px;line-height:1.3;font-weight:700;color:#b42318;margin-bottom:12px}.aiec-human-text{font-size:15px;line-height:1.6;color:#344054;white-space:pre-wrap}.aiec-human-dialog-actions{display:flex;justify-content:flex-end;margin-top:18px}.aiec-human-close{min-height:42px;border:1px solid #b42318;border-radius:9px;background:#fff;color:#b42318;padding:9px 18px;font-size:15px;font-weight:600;cursor:pointer}.aiec-human-close:hover{background:#fff1f0}

/* v1.35 blocking health/safety alert */
.aiec-safety-blocked .aiec-review-actions .aiec-accept:disabled,.aiec-safety-blocked .aiec-review-actions .aiec-refresh:disabled{opacity:.35;filter:grayscale(.35);cursor:not-allowed}.aiec-safety-blocked .aiec-human{border-color:#b42318;background:#d92d20;color:#fff;box-shadow:0 0 0 2px rgba(217,45,32,.08)}.aiec-safety-blocked .aiec-human:hover{background:#b42318}.aiec-human-close{background:#b42318;color:#fff}.aiec-human-close:hover{background:#912018;color:#fff}

/* v1.36 full bidirectional chat layout */
.aiec-chat[dir="rtl"]{direction:rtl;text-align:right}
.aiec-chat[dir="ltr"]{direction:ltr;text-align:left}
.aiec-chat .aiec-head,.aiec-chat .aiec-form,.aiec-chat .aiec-toolbar,.aiec-chat .aiec-review-actions,.aiec-chat .aiec-camera-actions{direction:inherit}
.aiec-user{margin-inline-start:auto;margin-inline-end:0}
.aiec-assistant,.aiec-error{margin-inline-start:0;margin-inline-end:auto}
.aiec-skills,.aiec-missing{margin-inline-start:20px;margin-inline-end:0}
.aiec-chat[dir="rtl"] .aiec-skills,.aiec-chat[dir="rtl"] .aiec-missing{margin-inline-start:0;margin-inline-end:20px}
.aiec-chat[dir="rtl"] .aiec-progress-task>b{text-align:left}
.aiec-chat[dir="rtl"] .aiec-progress-task>span{text-align:right}
.aiec-chat[dir="rtl"] .aiec-human-dialog,.aiec-chat[dir="rtl"] .aiec-review-question,.aiec-chat[dir="rtl"] .aiec-human-text{text-align:right}
.aiec-chat[dir="ltr"] .aiec-human-dialog,.aiec-chat[dir="ltr"] .aiec-review-question,.aiec-chat[dir="ltr"] .aiec-human-text{text-align:left}
.aiec-chat textarea[dir="rtl"]{direction:rtl;text-align:right}
.aiec-chat textarea[dir="ltr"]{direction:ltr;text-align:left}

/* v1.37 safety lock */
.aiec-safety-blocked .aiec-accept:disabled,.aiec-safety-blocked .aiec-refresh:disabled{opacity:.38!important;cursor:not-allowed!important;pointer-events:none!important;filter:grayscale(.35)}
.aiec-safety-blocked [data-aiec-human]{pointer-events:auto!important}

/* v1.39 non-engineering pre-structure gate */
.aiec-engineering-only{border:1px solid #067647;background:#12b76a;color:#fff;box-shadow:0 0 0 2px rgba(18,183,106,.08)}
.aiec-engineering-only:hover{background:#099250}
.aiec-engineering-modal[hidden]{display:none}
.aiec-engineering-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:20px}
.aiec-engineering-backdrop{position:absolute;inset:0;background:rgba(16,24,40,.52)}
.aiec-engineering-dialog{position:relative;z-index:1;width:min(620px,calc(100vw - 40px));max-height:calc(100vh - 80px);overflow:auto;background:#fff;border:1px solid #abefc6;border-radius:14px;padding:22px;box-shadow:0 24px 60px rgba(16,24,40,.24)}
.aiec-engineering-title{font-size:19px;line-height:1.3;font-weight:700;color:#067647;margin-bottom:12px}
.aiec-engineering-text{font-size:15px;line-height:1.6;color:#344054;white-space:pre-wrap}
.aiec-engineering-dialog-actions{display:flex;justify-content:flex-end;margin-top:18px}
.aiec-engineering-reset{min-height:42px;border:1px solid #067647;border-radius:9px;background:#067647;color:#fff;padding:9px 18px;font-size:15px;font-weight:600;cursor:pointer}
.aiec-engineering-reset:hover{background:#05603a}
.aiec-chat[dir="rtl"] .aiec-engineering-dialog,.aiec-chat[dir="rtl"] .aiec-engineering-text{text-align:right}
.aiec-chat[dir="ltr"] .aiec-engineering-dialog,.aiec-chat[dir="ltr"] .aiec-engineering-text{text-align:left}


/* v1.46 simplified two-bar progress, theme toggle, and mobile-first controls */
.aiec-head-right{display:flex;align-items:center;gap:12px}
.aiec-theme-toggle{display:flex;align-items:center;gap:6px;background:#f2f4f7;border:1px solid #d0d5dd;border-radius:999px;padding:4px}
.aiec-theme-btn{border:0;background:transparent;color:#475467;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:700;cursor:pointer}
.aiec-theme-btn.is-active{background:#fff;color:#172033;box-shadow:0 1px 2px rgba(16,24,40,.08)}
.aiec-progress-current{margin-top:10px}
.aiec-progress-top--secondary{margin-bottom:6px;font-size:12px}
.aiec-progress-track--secondary{height:10px}
.aiec-form{display:block;padding:14px;border-top:1px solid #e5e8ec;align-items:initial}
.aiec-compose{border:1px solid #cfd5dd;border-radius:12px;background:#fff;overflow:hidden}
.aiec-compose textarea{min-height:74px;padding:13px 14px 8px}
.aiec-actionrow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;flex-wrap:wrap}
.aiec-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:0}
.aiec-send{min-width:118px;padding:12px 18px}
.aiec-camera-panel{bottom:118px}
@media(max-width:700px){.aiec-head{flex-wrap:wrap;gap:10px}.aiec-head-right{width:100%;justify-content:space-between}.aiec-actionrow{align-items:stretch}.aiec-toolbar{order:2;width:100%;justify-content:flex-start}.aiec-send{order:1;width:100%}.aiec-camera-panel{left:10px;right:10px;bottom:152px}}

/* dark theme */
.aiec-chat.aiec-theme-dark{background:#0f172a;border-color:#334155;color:#e5e7eb}
.aiec-chat.aiec-theme-dark .aiec-head,.aiec-chat.aiec-theme-dark .aiec-form{border-color:#334155}
.aiec-chat.aiec-theme-dark .aiec-title,.aiec-chat.aiec-theme-dark .aiec-status{color:#e5e7eb}
.aiec-chat.aiec-theme-dark .aiec-stream{background:#111827}
.aiec-chat.aiec-theme-dark .aiec-empty{color:#94a3b8}
.aiec-chat.aiec-theme-dark .aiec-assistant{background:#0f172a;border-color:#334155;color:#e5e7eb}
.aiec-chat.aiec-theme-dark .aiec-error{background:#1f1720;border-color:#ef4444;color:#fca5a5}
.aiec-chat.aiec-theme-dark .aiec-user{background:#1d4ed8;color:#fff}
.aiec-chat.aiec-theme-dark .aiec-compose{background:#0f172a;border-color:#334155}
.aiec-chat.aiec-theme-dark .aiec-compose textarea{background:#0f172a;color:#e5e7eb}
.aiec-chat.aiec-theme-dark .aiec-toolbar,.aiec-chat.aiec-theme-dark .aiec-tool,.aiec-chat.aiec-theme-dark .aiec-tool small{color:#cbd5e1}
.aiec-chat.aiec-theme-dark .aiec-tool:hover{background:#1e293b}
.aiec-chat.aiec-theme-dark .aiec-send{background:#2563eb}
.aiec-chat.aiec-theme-dark .aiec-chip{background:#1e293b;color:#e5e7eb}
.aiec-chat.aiec-theme-dark .aiec-progress{background:#0f2a1d;border-bottom-color:#1f5134}
.aiec-chat.aiec-theme-dark .aiec-progress-top,.aiec-chat.aiec-theme-dark .aiec-progress-top strong{color:#bbf7d0}
.aiec-chat.aiec-theme-dark .aiec-progress-track{background:#16412b}
.aiec-chat.aiec-theme-dark .aiec-progress-fill{background:#22c55e}
.aiec-chat.aiec-theme-dark .aiec-theme-toggle{background:#0f172a;border-color:#334155}
.aiec-chat.aiec-theme-dark .aiec-theme-btn{color:#cbd5e1}
.aiec-chat.aiec-theme-dark .aiec-theme-btn.is-active{background:#1e293b;color:#fff;box-shadow:none}
.aiec-chat.aiec-theme-dark .aiec-translation{background:#111827;border-color:#334155}
.aiec-chat.aiec-theme-dark .aiec-translation-label,.aiec-chat.aiec-theme-dark .aiec-review-label,.aiec-chat.aiec-theme-dark .aiec-skills-label,.aiec-chat.aiec-theme-dark .aiec-missing-label{color:#94a3b8}
.aiec-chat.aiec-theme-dark .aiec-review-question,.aiec-chat.aiec-theme-dark .aiec-translation-text,.aiec-chat.aiec-theme-dark .aiec-skills li,.aiec-chat.aiec-theme-dark .aiec-missing li,.aiec-chat.aiec-theme-dark .aiec-human-text,.aiec-chat.aiec-theme-dark .aiec-engineering-text{color:#e5e7eb}


/* v1.48 modal theming follows the active chat theme */
.aiec-chat.aiec-theme-light .aiec-human-dialog,
.aiec-chat.aiec-theme-light .aiec-engineering-dialog{
  background:#fff;
  color:#172033;
}
.aiec-chat.aiec-theme-light .aiec-human-text,
.aiec-chat.aiec-theme-light .aiec-engineering-text{color:#344054}
.aiec-chat.aiec-theme-light .aiec-human-backdrop,
.aiec-chat.aiec-theme-light .aiec-engineering-backdrop{background:rgba(16,24,40,.56)}

.aiec-chat.aiec-theme-dark .aiec-human-backdrop,
.aiec-chat.aiec-theme-dark .aiec-engineering-backdrop{background:rgba(2,6,23,.78)}
.aiec-chat.aiec-theme-dark .aiec-human-dialog{
  background:#111827;
  border-color:#7f1d1d;
  color:#f8fafc;
  box-shadow:0 24px 60px rgba(0,0,0,.55);
}
.aiec-chat.aiec-theme-dark .aiec-human-title{color:#fca5a5}
.aiec-chat.aiec-theme-dark .aiec-human-text{color:#e5e7eb}
.aiec-chat.aiec-theme-dark .aiec-human-close{
  background:#b91c1c;
  border-color:#ef4444;
  color:#fff;
}
.aiec-chat.aiec-theme-dark .aiec-human-close:hover{background:#991b1b;color:#fff}

.aiec-chat.aiec-theme-dark .aiec-engineering-dialog{
  background:#111827;
  border-color:#166534;
  color:#f8fafc;
  box-shadow:0 24px 60px rgba(0,0,0,.55);
}
.aiec-chat.aiec-theme-dark .aiec-engineering-title{color:#86efac}
.aiec-chat.aiec-theme-dark .aiec-engineering-text{color:#e5e7eb}
.aiec-chat.aiec-theme-dark .aiec-engineering-reset{
  background:#15803d;
  border-color:#22c55e;
  color:#fff;
}
.aiec-chat.aiec-theme-dark .aiec-engineering-reset:hover{background:#166534;color:#fff}

.aiec-accept:hover{background:#15803d;border-color:#15803d}.aiec-chat.aiec-theme-dark .aiec-accept{background:#16a34a;border-color:#16a34a;color:#fff}.aiec-chat.aiec-theme-dark .aiec-accept:hover{background:#15803d;border-color:#15803d}

/* v1.56 header status removed; progress bars are the sole pipeline status display */
.aiec-head-right{margin-inline-start:auto}

/* Company branding can use a dedicated asset for each chat theme. */
.aiec-title.aiec-brand{--aiec-brand-logo-height:57px;display:flex;align-items:center;flex:1 1 auto;min-width:0;height:var(--aiec-brand-logo-height)}
.aiec-brand-button{border:0;background:transparent;padding:0;cursor:pointer;text-align:inherit;color:inherit}.aiec-brand-button:hover{opacity:.82}.aiec-brand-button:focus-visible{outline:2px solid #2563eb;outline-offset:4px;border-radius:6px}
.aiec-brand-logo{display:block;width:auto;height:var(--aiec-brand-logo-height);max-width:min(300px,82vw);max-height:var(--aiec-brand-logo-height);object-fit:contain;object-position:left center}
.aiec-brand-logo[hidden]{display:none!important}
.aiec-brand-logo-dark{display:none}
.aiec-chat.aiec-theme-dark .aiec-brand-logo-light{display:none}
.aiec-chat.aiec-theme-dark .aiec-brand-logo-dark{display:block}
@media(max-width:520px){.aiec-brand-logo{max-width:min(300px,82vw)}}

/* v1.57 auto-hide completed progress after 5 seconds */
.aiec-progress{transition:opacity .28s ease}.aiec-progress.aiec-progress-fade{opacity:0}

/* v1.58 standalone image-analysis progress */
.aiec-image-progress{padding:14px 18px 16px;border-bottom:1px solid #d7eadf;background:#f7fff9;position:relative;z-index:2;transition:opacity .28s ease}
.aiec-image-progress[hidden]{display:none}
.aiec-chat.aiec-theme-dark .aiec-image-progress{background:#0f2a1d;border-bottom-color:#1f5134}
.aiec-chat.aiec-theme-dark .aiec-image-progress .aiec-progress-top,.aiec-chat.aiec-theme-dark .aiec-image-progress .aiec-progress-top strong{color:#bbf7d0}
.aiec-chat.aiec-theme-dark .aiec-image-progress .aiec-progress-track{background:#16412b}
.aiec-chat.aiec-theme-dark .aiec-image-progress .aiec-progress-fill{background:#22c55e}

/* v1.59 immediate sequential attachment OCR */
.aiec-ocr-progress{padding:14px 18px 16px;border-bottom:1px solid #d7eadf;background:#f7fff9;position:relative;z-index:2;transition:opacity .28s ease}
.aiec-ocr-progress[hidden]{display:none}
.aiec-file-state{font-size:11px;font-weight:700;color:#067647}
.aiec-chat.aiec-theme-dark .aiec-ocr-progress{background:#0f2a1d;border-bottom-color:#1f5134}
.aiec-chat.aiec-theme-dark .aiec-ocr-progress .aiec-progress-top,.aiec-chat.aiec-theme-dark .aiec-ocr-progress .aiec-progress-top strong{color:#bbf7d0}
.aiec-chat.aiec-theme-dark .aiec-ocr-progress .aiec-progress-track{background:#16412b}
.aiec-chat.aiec-theme-dark .aiec-ocr-progress .aiec-progress-fill{background:#22c55e}

/* v1.60 PDF graphics descriptions */
.aiec-pdf-graphics{margin-top:12px;padding-top:10px;border-top:1px solid #e4e7ec}.aiec-pdf-graphic{margin-top:9px;padding:9px 10px;border:1px solid #e4e7ec;border-radius:8px;background:#f8fafc;font-size:14px;line-height:1.45}.aiec-pdf-graphic>div{margin-top:4px}.aiec-chat.aiec-theme-dark .aiec-pdf-graphics{border-color:#334155}.aiec-chat.aiec-theme-dark .aiec-pdf-graphic{background:#111827;border-color:#334155;color:#e5e7eb}

/* v1.62 progress bars are fixed between answer stream and composer */
.aiec-progress-slot{display:block;width:100%;position:relative;z-index:2}
.aiec-progress-slot:empty{display:none}
.aiec-stream + .aiec-progress-slot{order:initial}
.aiec-progress-slot + .aiec-form{order:initial}
.aiec-progress-slot .aiec-progress,.aiec-progress-slot .aiec-image-progress,.aiec-progress-slot .aiec-ocr-progress{position:relative;top:auto;bottom:auto;left:auto;right:auto;margin:0}

.aiec-final-experts,.aiec-final-missing{margin:10px 0 18px 24px;padding:0}.aiec-final-experts li,.aiec-final-missing li{margin:7px 0;line-height:1.45}.aiec-final-experts li{font-weight:600}.aiec-final-missing-heading{margin-top:20px;font-weight:700;font-size:14px;text-transform:uppercase;letter-spacing:.04em}.aiec-chat[dir="rtl"] .aiec-final-experts,.aiec-chat[dir="rtl"] .aiec-final-missing{margin-left:0;margin-right:24px}

.aiec-submit-actions{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin:0;flex-wrap:wrap;min-width:0}
.aiec-source-mode,.aiec-answer-level{display:flex;align-items:center;justify-content:center;gap:10px;flex:0 0 100%;box-sizing:border-box;min-width:0;padding:8px 10px;border:1px solid #d0d5dd;border-radius:9px;background:#f8fafc}
.aiec-source-mode-label,.aiec-answer-level-label{font-size:12px;font-weight:700;color:#475467;white-space:nowrap;margin-right:auto}
.aiec-source-mode label,.aiec-answer-level label{display:flex;align-items:center;gap:5px;color:#344054;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:color .16s ease}
.aiec-source-mode label:hover,.aiec-source-mode label:has(input:checked),.aiec-answer-level label:hover,.aiec-answer-level label:has(input:checked){color:#b54708}
.aiec-source-mode input,.aiec-answer-level input{margin:0;accent-color:#e06822}
.aiec-submit-button-row{display:flex;align-items:center;gap:8px;flex:0 0 100%;width:100%;min-width:0}
.aiec-clear-chat{flex:0 0 auto;min-height:38px;height:38px;box-sizing:border-box;border:1px solid #cfd5dd;border-radius:9px;background:#fff;color:#344054;padding:0 12px;font:700 11px/1.2 Arial,sans-serif;cursor:pointer;white-space:nowrap;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}
.aiec-clear-chat:hover,.aiec-clear-chat:focus-visible{background:#e06822;border-color:#e06822;color:#fff;outline:none}.aiec-clear-chat:active{background:#b54708;border-color:#b54708;transform:translateY(1px)}
.aiec-submit-actions .aiec-send{flex:1 1 auto;width:auto;margin:0;min-width:0;min-height:38px;height:38px;box-sizing:border-box;padding:0 18px;line-height:1.2}
.aiec-chat.aiec-theme-dark .aiec-answer-level,.aiec-chat.aiec-theme-dark .aiec-source-mode{background:#111827;border-color:#475569}.aiec-chat.aiec-theme-dark .aiec-answer-level-label,.aiec-chat.aiec-theme-dark .aiec-answer-level label,.aiec-chat.aiec-theme-dark .aiec-source-mode-label,.aiec-chat.aiec-theme-dark .aiec-source-mode label{color:#e2e8f0}.aiec-chat.aiec-theme-dark .aiec-answer-level label:hover,.aiec-chat.aiec-theme-dark .aiec-answer-level label:has(input:checked),.aiec-chat.aiec-theme-dark .aiec-source-mode label:hover,.aiec-chat.aiec-theme-dark .aiec-source-mode label:has(input:checked){color:#fdbb8a}.aiec-chat.aiec-theme-dark .aiec-source-mode input,.aiec-chat.aiec-theme-dark .aiec-answer-level input{accent-color:#e06822}.aiec-chat.aiec-theme-dark .aiec-clear-chat{background:#0f172a;border-color:#475569;color:#e2e8f0}.aiec-chat.aiec-theme-dark .aiec-clear-chat:hover,.aiec-chat.aiec-theme-dark .aiec-clear-chat:focus-visible{background:#e06822;border-color:#e06822;color:#fff}
@media(max-width:420px){.aiec-submit-actions{gap:7px}.aiec-source-mode,.aiec-answer-level{gap:7px;padding:8px}.aiec-source-mode-label,.aiec-answer-level-label{font-size:11px}.aiec-source-mode label,.aiec-answer-level label{font-size:12px}.aiec-submit-button-row{gap:7px}.aiec-clear-chat{padding:0 10px}.aiec-submit-actions .aiec-send{width:auto}}

/* Standalone PWA layout: fit the app to the visible phone viewport. */
@media(max-width:700px){.aiec-chat{width:100%;max-width:none;height:100vh;height:100dvh;min-height:0;margin:0;border-radius:0;display:flex;flex-direction:column}.aiec-head,.aiec-progress,.aiec-form{flex:0 0 auto}.aiec-stream{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain}.aiec-form{padding-bottom:max(14px,env(safe-area-inset-bottom))}}

.aiec-answer-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid #eaecf0}.aiec-pdf-button{appearance:none;border:1px solid #172033;background:#fff;color:#172033;border-radius:8px;padding:7px 14px;font:600 13px/1.2 Arial,sans-serif;cursor:pointer}.aiec-pdf-button:hover{background:#f2f4f7}.aiec-related-downloads{margin-top:14px;padding:10px 12px;border:1px solid #d0d5dd;border-radius:8px;background:#f8fafc}.aiec-related-downloads-title{font:700 12px/1.25 Arial,sans-serif;color:#344054;margin:0 0 8px}.aiec-download-button{display:inline-block;max-width:100%;margin:3px 6px 3px 0;padding:6px 10px;border:1px solid #2d5e9e;border-radius:6px;color:#173b70;background:#fff;text-decoration:none;font:600 12px/1.2 Arial,sans-serif;overflow-wrap:anywhere}.aiec-download-button:hover{background:#e8f0fb;color:#102a56}.aiec-theme-dark .aiec-answer-actions{border-top-color:#344054}.aiec-theme-dark .aiec-pdf-button,.aiec-theme-dark .aiec-download-button{background:#101828;color:#fff;border-color:#98a2b3}.aiec-theme-dark .aiec-pdf-button:hover,.aiec-theme-dark .aiec-download-button:hover{background:#1d2939}.aiec-theme-dark .aiec-related-downloads{background:#101b2d;border-color:#344054}.aiec-theme-dark .aiec-related-downloads-title{color:#d0d5dd}

/* v1.97.2: failed workflow is a terminal red state, never a green percentage that looks active. */
.aiec-progress.aiec-progress-failed{background:#fff7f7;border-bottom-color:#f0b7b7}
.aiec-progress.aiec-progress-failed .aiec-progress-top,.aiec-progress.aiec-progress-failed .aiec-progress-top strong{color:#b42318}
.aiec-progress.aiec-progress-failed .aiec-progress-fill{background:#d92d20!important;transition:none}
.aiec-chat.aiec-theme-dark .aiec-progress.aiec-progress-failed{background:#321616;border-bottom-color:#7a271a}
.aiec-chat.aiec-theme-dark .aiec-progress.aiec-progress-failed .aiec-progress-top,.aiec-chat.aiec-theme-dark .aiec-progress.aiec-progress-failed .aiec-progress-top strong{color:#fda29b}

/* v1.102.0 verified-user token counter */
.aiec-transcription-value{margin-top:20px}
.aiec-tool[data-aiec-mic]{touch-action:none;user-select:none;-webkit-user-select:none}.aiec-tool[data-aiec-mic].is-pressed,.aiec-tool[data-aiec-mic].recording{transform:translateY(1px);box-shadow:inset 0 0 0 2px currentColor}
.aiec-tool[data-aiec-mic].connecting{background:#ecfdf3;color:#b54708;animation:aiec-mic-connecting .8s ease-in-out infinite;box-shadow:inset 0 0 0 2px #e06822}.aiec-tool[data-aiec-mic].connecting:after{content:"";width:7px;height:7px;border-radius:50%;background:#e06822;position:absolute;right:4px;top:4px}.aiec-tool[data-aiec-mic].recording{background:#e06822;color:#fff;animation:none;box-shadow:inset 0 0 0 2px #b54708}@keyframes aiec-mic-connecting{0%,100%{box-shadow:inset 0 0 0 2px #e06822,0 0 0 0 rgba(224,104,34,.05)}50%{box-shadow:inset 0 0 0 2px #e06822,0 0 0 5px rgba(224,104,34,.28)}}
.aiec-head-right{display:flex;align-items:center;gap:10px}.aiec-token-button,.aiec-install-app{min-height:36px;border:1px solid #cfd5dd;border-radius:8px;background:#fff;color:#172033;padding:7px 13px;font:600 13px/1.2 Arial,sans-serif;cursor:pointer}.aiec-token-button:hover,.aiec-install-app:hover{background:#f2f4f7}.aiec-install-app{border-color:#2563eb;background:#2563eb;color:#fff}.aiec-install-app:hover{background:#1d4ed8}.aiec-token-modal[hidden]{display:none}.aiec-token-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(16,24,40,.58)}.aiec-token-dialog{position:relative;width:min(420px,calc(100vw - 40px));box-sizing:border-box;background:#fff;color:#172033;border:1px solid #d7dce2;border-radius:14px;padding:24px;text-align:center;box-shadow:0 24px 60px rgba(16,24,40,.28)}.aiec-token-dialog h2{margin:0 0 18px;font-size:20px}.aiec-install-dialog p{margin:0;line-height:1.55;color:#475467}.aiec-token-close{position:absolute;top:8px;right:10px;border:0;background:transparent;color:#667085;font-size:28px;line-height:1;cursor:pointer}.aiec-token-total{font-size:36px;line-height:1.15;font-weight:750;color:#175cd3;font-variant-numeric:tabular-nums}.aiec-token-caption{margin-top:5px;color:#667085;font-size:13px}.aiec-token-time{margin-top:22px;padding-top:16px;border-top:1px solid #eaecf0;font-size:15px}.aiec-token-time strong{font-variant-numeric:tabular-nums}.aiec-total-cost{margin-top:8px;font-size:15px}.aiec-total-cost strong{font-variant-numeric:tabular-nums}.aiec-token-error{margin-top:14px;color:#b42318;font-size:13px}.aiec-theme-dark .aiec-token-button{background:#0f172a;border-color:#475569;color:#e2e8f0}.aiec-theme-dark .aiec-token-button:hover{background:#1e293b}.aiec-theme-dark .aiec-install-app{background:#2563eb;border-color:#2563eb;color:#fff}.aiec-theme-dark .aiec-install-app:hover{background:#1d4ed8}.aiec-theme-dark .aiec-token-dialog{background:#101828;color:#f8fafc;border-color:#475569}.aiec-theme-dark .aiec-install-dialog p{color:#cbd5e1}.aiec-theme-dark .aiec-token-caption,.aiec-theme-dark .aiec-token-close{color:#98a2b3}.aiec-theme-dark .aiec-token-time{border-top-color:#344054}.aiec-theme-dark .aiec-token-total{color:#60a5fa}@media(max-width:520px){.aiec-head{align-items:flex-start;gap:10px}.aiec-head-right{flex-wrap:wrap;justify-content:flex-end}.aiec-token-button,.aiec-install-app{min-height:34px;padding:6px 10px}}

/* App action controls: green on hover, orange when a choice is active. */
.aiec-toolbar .aiec-tool{min-height:38px;box-sizing:border-box;border:1px solid #cfd5dd}
.aiec-chat.aiec-theme-dark .aiec-toolbar .aiec-tool{border-color:#475569}
.aiec-tool:hover:not(:disabled),.aiec-tool:focus-visible:not(:disabled){background:#ecfdf3;color:#067647;outline:none}
.aiec-tool.is-selected,.aiec-tool.has-input{background:#e06822;color:#fff}
.aiec-source-mode label:hover,.aiec-answer-level label:hover{color:#067647}
.aiec-source-mode label:has(input:checked),.aiec-answer-level label:has(input:checked){color:#b54708}
.aiec-clear-chat:hover,.aiec-clear-chat:focus-visible{background:#ecfdf3;border-color:#067647;color:#067647}
.aiec-chat.aiec-theme-dark .aiec-tool:hover:not(:disabled),.aiec-chat.aiec-theme-dark .aiec-tool:focus-visible:not(:disabled){background:#123d28;color:#86efac}
.aiec-chat.aiec-theme-dark .aiec-tool.is-selected,.aiec-chat.aiec-theme-dark .aiec-tool.has-input{background:#e06822;color:#fff}
.aiec-chat.aiec-theme-dark .aiec-source-mode label:hover,.aiec-chat.aiec-theme-dark .aiec-answer-level label:hover{color:#86efac}
.aiec-chat.aiec-theme-dark .aiec-source-mode label:has(input:checked),.aiec-chat.aiec-theme-dark .aiec-answer-level label:has(input:checked){color:#fdbb8a}
.aiec-chat.aiec-theme-dark .aiec-clear-chat:hover,.aiec-chat.aiec-theme-dark .aiec-clear-chat:focus-visible{background:#123d28;border-color:#22c55e;color:#86efac}
.aiec-tool[data-aiec-mic].connecting,.aiec-tool[data-aiec-mic].connecting:hover:not(:disabled),.aiec-tool[data-aiec-mic].connecting:focus-visible:not(:disabled){border-color:#e06822;background:#ecfdf3;color:#b54708;box-shadow:inset 0 0 0 2px #e06822;outline:none}
.aiec-tool[data-aiec-mic].recording,.aiec-tool[data-aiec-mic].recording:hover:not(:disabled),.aiec-tool[data-aiec-mic].recording:focus-visible:not(:disabled){border-color:#e06822;background:#e06822;color:#fff;box-shadow:inset 0 0 0 2px #b54708;outline:none}
.aiec-chat.aiec-theme-dark .aiec-tool[data-aiec-mic].connecting:hover:not(:disabled),.aiec-chat.aiec-theme-dark .aiec-tool[data-aiec-mic].connecting:focus-visible:not(:disabled){background:#123d28;color:#fdbb8a;box-shadow:inset 0 0 0 2px #e06822}

/* The access form is plugin-owned and remains independent of the active theme. */
.aiec-access-gate{padding:clamp(1rem,3vw,1.5rem);color:#f8fafc;background:#101820;border:1px solid #315060;border-radius:12px;font-family:inherit}.aiec-access-gate h2{margin:0 0 .5rem;color:inherit;font-size:clamp(1.25rem,3vw,1.6rem)}.aiec-access-gate p{margin:0 0 1rem}.aiec-access-form{display:grid;gap:.65rem}.aiec-access-form label{display:grid;gap:.35rem;font-weight:700}.aiec-access-form input[type="text"],.aiec-access-form input[type="email"]{width:100%;min-height:44px;padding:.7rem .8rem;border:1px solid #4b6473;border-radius:6px;background:#071016;color:#fff}.aiec-access-form input:focus{border-color:#18a3ad;outline:2px solid #18a3ad;outline-offset:2px}.aiec-access-form .button,.aiec-access-actions .button{min-height:44px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:.7rem 1rem;line-height:1.2}.aiec-access-form .button{justify-self:center}.aiec-access-actions{display:flex;justify-content:center;margin-top:.25rem!important}.aiec-access-actions .button{margin:0}.aiec-access-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.aiec-access-success,.aiec-access-error{padding:.7rem .8rem;border-left:3px solid #18a3ad;background:rgba(24,163,173,.16)}.aiec-access-error{border-left-color:#e06822;background:rgba(224,104,34,.12)}

/* Free visitor trial */
.aiec-trial-badge{display:inline-flex;align-items:center;gap:4px;padding:6px 10px;border:1px solid currentColor;border-radius:999px;font-size:12px;line-height:1;white-space:nowrap;opacity:.9}
.aiec-trial-badge strong{font-variant-numeric:tabular-nums;font-size:13px}
.aiec-trial-badge.aiec-trial-expired{opacity:.65}
.aiec-trial-modal[hidden]{display:none!important}
.aiec-trial-modal{display:flex!important}
.aiec-trial-modal .aiec-token-dialog{max-width:440px;text-align:center}
.aiec-trial-modal .aiec-btn{display:inline-flex;text-decoration:none;justify-content:center;align-items:center;min-height:42px;padding:8px 18px}
@media (max-width:600px){.aiec-trial-badge{font-size:11px;padding:5px 8px}.aiec-head{gap:8px;flex-wrap:wrap}.aiec-head-right{gap:6px}}

/* v1.06 structured engineering answer formatting */
.aiec-engineering-answer p{margin:0 0 10px;line-height:1.55}
.aiec-engineering-answer h3{margin:14px 0 7px;font-size:1.02em;line-height:1.35}
.aiec-engineering-answer h4{margin:12px 0 6px;font-size:.98em;line-height:1.35}
.aiec-engineering-answer ul,.aiec-engineering-answer ol{margin:6px 0 12px;padding-inline-start:22px}
.aiec-engineering-answer li{margin:0 0 6px;line-height:1.5}
.aiec-engineering-answer strong{font-weight:700}
.aiec-engineering-answer code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.94em}
.aiec-answer-table-wrap{width:100%;overflow-x:auto;margin:8px 0 14px}
.aiec-answer-table{width:100%;border-collapse:collapse;font-size:.94em;min-width:520px}
.aiec-answer-table th,.aiec-answer-table td{border:1px solid rgba(127,127,127,.28);padding:8px 9px;text-align:left;vertical-align:top;line-height:1.4}
.aiec-answer-table th{font-weight:700;background:rgba(127,127,127,.08)}
