.ans {
    --ans-accent: #745cf9;
    --ans-accent-dark: #533acb;
    --ans-text: #252331;
    --ans-muted: #635f73;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ans-text);
    line-height: 1.5;
}
.ans *, .ans *::before, .ans *::after { box-sizing: border-box; }
.ans button, .ans textarea, .ans a { font-family: inherit; }
.ans button { cursor: pointer; text-transform: none; letter-spacing: normal; margin: 0; }
.ans button:disabled { cursor: default; opacity: .58; }
.ans button:focus-visible, .ans a:focus-visible, .ans textarea:focus-visible { outline: 3px solid #ad9dff; outline-offset: 3px; }
.ans a { text-decoration: none; }
.ans a:hover { text-decoration: underline; }
.ans [hidden] { display: none !important; }
.ans__launcher {
    /* Leave room for the existing contact rail, including its 180px hover state. */
    position: fixed; z-index: 99998; right: 212px; bottom: 24px;
    display: flex; align-items: center; gap: 10px;
    min-height: 54px; padding: 10px 18px 10px 10px;
    border: 1px solid #a696ff; border-radius: 999px;
    background: #35265e; color: #fff; box-shadow: 0 8px 28px #2110442b;
    font-size: 14px; font-weight: 600; line-height: 1.25;
}
.ans__launcher:hover { background: #48327c; }
.ans__launcher-mark {
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    background: #f3eeff; color: #533acb; font-size: 12px; font-weight: 700;
}
.ans__dialog {
    position: fixed; inset: auto 24px 94px auto; margin: 0;
    width: min(440px, calc(100vw - 32px)); max-width: none;
    height: min(720px, calc(100dvh - 118px)); max-height: calc(100dvh - 118px);
    border: 1px solid #e0dbea; border-radius: 20px; padding: 0;
    background: #fff; color: var(--ans-text); box-shadow: 0 24px 80px #241b403d;
    overflow: hidden; font-size: 14px;
}
.ans__dialog[open] { display: flex; flex-direction: column; }
.ans__dialog:not([open]) { display: none; }
.ans__dialog::backdrop { background: #1d153324; }
.ans__header {
    display: flex; justify-content: space-between; gap: 12px; flex-shrink: 0;
    padding: 20px 20px 17px; border-bottom: 1px solid #eae6f0;
    background: linear-gradient(110deg, #f7f4ff, #fff);
}
.ans__title { margin: 0; font-family: inherit; font-size: 17px; font-weight: 650; line-height: 1.35; color: var(--ans-text); }
.ans__disclosure { margin: 5px 0 0; font-size: 12px; line-height: 1.4; color: var(--ans-muted); }
.ans__close { flex-shrink: 0; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #eee8f8; color: #514966; font-size: 25px; font-weight: 400; line-height: 1; }
.ans__close:hover { background: #e2d9f3; }
.ans__log { flex: 1 1 auto; min-height: 80px; overflow-y: auto; overscroll-behavior: contain; padding: 20px; scroll-behavior: smooth; }
.ans__message { position: relative; max-width: 92%; width: fit-content; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ans__message--assistant { background: #f4f1f8; border-bottom-left-radius: 4px; }
.ans__message--user { margin-left: auto; background: #ece7ff; border-bottom-right-radius: 4px; }
.ans__message-text { margin: 0; white-space: pre-wrap; }
.ans__sources { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; }
.ans__source { font-size: 12px; color: var(--ans-accent-dark); text-decoration: underline !important; }
.ans__failed-label { display: block; padding-top: 5px; color: #725347; font-size: 11px; }
.ans__suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 20px 10px; flex-shrink: 0; }
.ans__suggestion { border: 1px solid #dcd4ef; border-radius: 999px; padding: 7px 10px; color: #584779; background: #fff; font-size: 12px; line-height: 1.35; }
.ans__suggestion:hover:not(:disabled) { background: #f7f4ff; border-color: #a696df; }
.ans__status-row { display: flex; align-items: center; gap: 9px; min-height: 20px; padding: 0 20px 6px; flex-shrink: 0; }
.ans__status { margin: 0; color: var(--ans-muted); font-size: 12px; line-height: 1.45; }
.ans__status:empty { display: none; }
.ans__retry { border: 0; padding: 4px 0; background: none; color: var(--ans-accent-dark); font-size: 12px; text-decoration: underline; flex-shrink: 0; }
.ans__form { display: flex; align-items: flex-end; gap: 8px; flex-shrink: 0; padding: 0 20px 14px; margin: 0; }
.ans__input { min-width: 0; flex: 1 1 auto; resize: none; height: 64px; min-height: 64px; max-height: 120px; padding: 10px 12px; border: 1px solid #dcd7e6; border-radius: 12px; background: #fff; color: var(--ans-text); font-size: 16px; line-height: 1.35; }
.ans__input::placeholder { color: #817a90; opacity: 1; }
.ans__input:focus { border-color: #8f76eb; }
.ans__send { flex-shrink: 0; min-height: 44px; padding: 10px 13px; border: 1px solid var(--ans-accent); border-radius: 11px; background: var(--ans-accent); color: #fff; font-size: 13px; font-weight: 600; }
.ans__send:hover:not(:disabled) { background: var(--ans-accent-dark); }
.ans__actions { display: flex; flex-wrap: wrap; gap: 9px 15px; padding: 13px 20px; border-top: 1px solid #eae6f0; background: #fbfaff; flex-shrink: 0; }
.ans__action { color: #5d487e; font-size: 12px; font-weight: 600; line-height: 1.5; }
.ans__action--whatsapp { color: #28724a; }
.ans__privacy { flex-shrink: 0; padding: 0 20px 15px; margin: 0; background: #fbfaff; color: #716a7e; font-size: 11px; line-height: 1.5; }
.ans__privacy a { color: #5b4a7b; text-decoration: underline; }
.ans__sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 960px) {
    /* The site's three contact buttons form a row here; place the chat above it. */
    .ans__launcher { right: 14px; bottom: calc(132px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 28px); }
}
@media (max-width: 520px) {
    .ans__launcher { min-height: 50px; font-size: 13px; }
    .ans__dialog { inset: auto 0 0; width: 100%; height: min(740px, calc(100dvh - 12px)); max-height: calc(100dvh - 12px); border-radius: 18px 18px 0 0; border-bottom: 0; }
    .ans__header { padding: 17px 16px 14px; }
    .ans__title { font-size: 16px; }
    .ans__log { padding: 16px; }
    .ans__suggestions, .ans__status-row { padding-left: 16px; padding-right: 16px; }
    .ans__form { padding: 0 16px 12px; }
    .ans__actions { padding: 12px 16px; }
    .ans__privacy { padding: 0 16px max(16px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .ans__log { scroll-behavior: auto; } }
