/* Ascend Platform – Ascenzo chat widget (brand: red, black, white). */
.ac-root { --ac-red: #e3061b; --ac-red-d: #b3000f; --ac-ink: #0a0a0a; --ac-paper: #f4f4f4; --ac-line: #e5e5e5; --ac-muted: #525252; position: fixed; right: 20px; bottom: 20px; z-index: 60; font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif; }
.ac-root *, .ac-root *::before, .ac-root *::after { box-sizing: border-box; }

.ac-launcher { position: relative; width: 72px; height: 72px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: radial-gradient(circle at 50% 60%, #2a0005 0%, var(--ac-ink) 70%); box-shadow: 0 0 0 3px var(--ac-red), 0 14px 30px -8px rgba(227, 6, 27, .55); display: block; transition: transform .18s; }
.ac-launcher:hover { transform: translateY(-2px); }
.ac-launcher:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 3px var(--ac-red), 0 0 0 7px var(--ac-ink); }
.ac-launcher__img { position: absolute; left: 50%; bottom: 2px; width: 92px; height: 92px; max-width: none; transform: translateX(-50%); object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); pointer-events: none; }
.ac-launcher__label { position: absolute; right: calc(100% + 14px); top: 50%; transform: translateY(-50%) translateX(6px); white-space: nowrap; background: var(--ac-ink); color: #fff; font-weight: 700; font-size: .92rem; padding: 9px 14px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.ac-launcher__label::after { content: ""; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; background: var(--ac-ink); transform: translateY(-50%) rotate(45deg); }
.ac-launcher:hover .ac-launcher__label, .ac-root.is-hinting .ac-launcher__label { opacity: 1; transform: translateY(-50%); }
.ac-root.is-open .ac-launcher__label { display: none; }

.ac-panel { position: absolute; right: 0; bottom: 92px; width: min(390px, calc(100vw - 32px)); height: min(620px, calc(100vh - 140px)); background: #fff; color: var(--ac-ink); border-radius: 22px; box-shadow: 0 24px 60px -12px rgba(10, 10, 10, .45), 0 0 0 1px rgba(10, 10, 10, .06); display: flex; flex-direction: column; overflow: hidden; }
.ac-panel[hidden] { display: none; }
.ac-head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; background: var(--ac-ink); color: #fff; }
.ac-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ac-red); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.ac-avatar img { width: 120%; height: 120%; object-fit: contain; margin-top: 12%; }
.ac-who { flex: 1; min-width: 0; }
.ac-name { margin: 0; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: 1.1rem; line-height: 1.2; }
.ac-sub { margin: 2px 0 0; font-size: .82rem; color: rgba(255, 255, 255, .72); display: flex; align-items: center; gap: 6px; }
.ac-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; }
.ac-icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ac-icon-btn:hover { background: rgba(255, 255, 255, .18); }
.ac-icon-btn:focus-visible, .ac-send:focus-visible, .ac-chip:focus-visible { outline: 3px solid var(--ac-red); outline-offset: 2px; }

.ac-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; background: #fff; overscroll-behavior: contain; }
.ac-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.ac-msg--user { justify-content: flex-end; }
.ac-msg__av { width: 28px; height: 28px; border-radius: 50%; background: var(--ac-red); object-fit: contain; flex-shrink: 0; padding: 1px; }
.ac-bubble { max-width: 82%; padding: 10px 13px; border-radius: 16px; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.ac-msg--assistant .ac-bubble { background: var(--ac-paper); border-bottom-left-radius: 6px; }
.ac-msg--user .ac-bubble { background: var(--ac-red); color: #fff; border-bottom-right-radius: 6px; white-space: pre-wrap; }
.ac-bubble p { margin: 0 0 .5em; }
.ac-bubble p:last-child { margin-bottom: 0; }
.ac-bubble ul { margin: .3em 0 .5em; padding-left: 1.1em; }
.ac-bubble a { color: var(--ac-red-d); font-weight: 700; }
.ac-msg--user .ac-bubble a { color: #fff; }
.ac-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.ac-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ac-muted); animation: ac-bounce 1.2s infinite ease-in-out; }
.ac-dots i:nth-child(2) { animation-delay: .15s; }
.ac-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ac-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

.ac-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; }
.ac-chips[hidden] { display: none; }
.ac-chip { border: 1.5px solid var(--ac-line); background: #fff; color: var(--ac-ink); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; text-align: left; }
.ac-chip:hover { border-color: var(--ac-red); color: var(--ac-red-d); }

.ac-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ac-line); }
.ac-input { flex: 1; resize: none; border: 1.5px solid #cfcfcf; border-radius: 14px; padding: 10px 12px; font: inherit; font-size: 1rem; line-height: 1.4; max-height: 120px; color: var(--ac-ink); background: #fff; }
.ac-input:focus { outline: none; border-color: var(--ac-red); box-shadow: 0 0 0 3px rgba(227, 6, 27, .15); }
.ac-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ac-red); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.ac-send:hover { background: var(--ac-red-d); }
.ac-send:disabled { opacity: .5; cursor: default; }
.ac-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 14px 10px; }
.ac-note { margin: 0; font-size: .74rem; color: var(--ac-muted); }
.ac-link { border: 0; background: none; padding: 0; font: inherit; font-size: .8rem; font-weight: 700; color: var(--ac-red-d); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
.ac-link[hidden] { display: none; }
.ac-link:focus-visible { outline: 3px solid var(--ac-red); outline-offset: 2px; border-radius: 4px; }
.ac-input { overflow-y: hidden; scrollbar-width: thin; min-height: 44px; }
.ac-input::-webkit-inner-spin-button, .ac-input::-webkit-scrollbar-button { display: none; }
.ac-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #fff; color: var(--ac-red-d); box-shadow: 0 0 0 2px var(--ac-red); font: 700 .75rem/22px system-ui, sans-serif; text-align: center; z-index: 2; }
.ac-badge[hidden] { display: none; }
.ac-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 8px 14px; background: #fdecee; color: var(--ac-ink); font-size: .84rem; border-top: 1px solid #f6c9ce; }
.ac-banner[hidden] { display: none; }
.ac-system { align-self: center; margin: 2px 0; padding: 4px 12px; border-radius: 99px; background: var(--ac-paper); color: var(--ac-muted); font-size: .78rem; text-align: center; max-width: 92%; }
.ac-msg__wrap { display: flex; flex-direction: column; gap: 3px; max-width: 82%; min-width: 0; }
.ac-msg__wrap .ac-bubble { max-width: 100%; }
.ac-msg__name { font-size: .74rem; font-weight: 700; color: var(--ac-muted); }
.ac-msg--user .ac-msg__wrap { align-items: flex-end; }
.ac-msg--agent .ac-bubble { background: var(--ac-ink); color: #fff; border-bottom-left-radius: 6px; }
.ac-msg--agent .ac-bubble a { color: #ff8b95; }
.ac-msg__initial { width: 28px; height: 28px; border-radius: 50%; background: var(--ac-ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex-shrink: 0; box-shadow: 0 0 0 2px var(--ac-red); }
.ac-root.is-team .ac-dot { background: var(--ac-red); box-shadow: 0 0 0 3px rgba(227, 6, 27, .3); }
.ac-contact { align-self: stretch; display: grid; gap: 8px; padding: 12px; border: 1.5px dashed var(--ac-red); border-radius: 14px; background: #fff; }
.ac-contact__title { margin: 0; font-size: .86rem; font-weight: 700; }
.ac-contact input { font: inherit; font-size: .95rem; padding: 9px 11px; border: 1.5px solid #cfcfcf; border-radius: 10px; width: 100%; }
.ac-contact input:focus { outline: none; border-color: var(--ac-red); box-shadow: 0 0 0 3px rgba(227, 6, 27, .15); }
.ac-contact__btn { justify-self: start; border: 0; border-radius: 999px; background: var(--ac-red); color: #fff; font: inherit; font-weight: 700; padding: 8px 16px; cursor: pointer; }
.ac-contact__btn:disabled { opacity: .6; }
.ac-namecard { align-self: stretch; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; box-sizing: border-box; margin: 2px 0 0 36px; padding: 14px; border: 1.5px solid var(--ac-line); border-radius: 16px; background: #fff; box-shadow: 0 6px 18px -10px rgba(10, 10, 10, .25); }
.ac-namecard__label { font-size: .86rem; font-weight: 700; color: var(--ac-ink); }
.ac-namecard__row { display: flex; gap: 8px; min-width: 0; }
.ac-namecard__input { flex: 1 1 0; width: 100%; min-width: 0; box-sizing: border-box; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1.5px solid #cfcfcf; border-radius: 12px; background: #fff; color: var(--ac-ink); }
.ac-namecard__input:focus { outline: none; border-color: var(--ac-red); box-shadow: 0 0 0 3px rgba(227, 6, 27, .15); }
.ac-namecard__input[aria-invalid="true"] { border-color: var(--ac-red); }
.ac-namecard__go { flex: 0 0 auto; white-space: nowrap; border: 0; border-radius: 12px; background: var(--ac-red); color: #fff; font: inherit; font-weight: 700; padding: 10px 14px; cursor: pointer; transition: background .15s; }
.ac-namecard__go:hover { background: var(--ac-red-d); }
.ac-namecard__go:focus-visible { outline: 3px solid var(--ac-ink); outline-offset: 2px; }
.ac-namecard__go:disabled { opacity: .6; cursor: default; }
.ac-namecard__err { margin: 0; font-size: .84rem; color: var(--ac-red-d); font-weight: 600; }
.ac-form[hidden], .ac-link[hidden] { display: none !important; }

@media (max-width: 640px) {
	.ac-root { right: 14px; bottom: 14px; }
	.ac-launcher { width: 62px; height: 62px; }
	.ac-launcher__img { width: 80px; height: 80px; }
	.ac-launcher__label { display: none; }
	.ac-root.is-open .ac-launcher { display: none; }
	.ac-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; bottom: 0; }
	html.ac-lock, html.ac-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
	.ac-launcher, .ac-launcher__label, .ac-dots i { transition: none; animation: none; }
}
@media print { .ac-root { display: none; } }

.ac-log { overflow-x: hidden; }

/* Talk mode */
.ac-mic { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ac-line); background: #fff; color: var(--ac-ink); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: border-color .15s, color .15s; }
.ac-mic:hover { border-color: var(--ac-red); color: var(--ac-red); }
.ac-mic:focus-visible { outline: 3px solid var(--ac-red); outline-offset: 2px; }
.ac-mic[hidden] { display: none !important; }
.ac-talk { border-top: 1px solid var(--ac-line); padding: 12px 14px 10px; display: grid; gap: 10px; background: linear-gradient(180deg, #fff 0%, #fff5f6 100%); }
.ac-talk[hidden] { display: none !important; }
.ac-talk__main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ac-talk__orb { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 0; flex-shrink: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: var(--ac-red); box-shadow: 0 8px 22px -8px rgba(227, 6, 27, .6); transition: transform .15s, background .2s; }
.ac-talk__orb svg { width: 28px; height: 28px; }
.ac-talk__orb:hover { transform: scale(1.04); }
.ac-talk__orb:focus-visible { outline: 3px solid var(--ac-ink); outline-offset: 3px; }
.ac-talk__orb::before, .ac-talk__orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ac-red); opacity: 0; pointer-events: none; }
.ac-talk[data-state="listening"] .ac-talk__orb::before { animation: ac-ring 1.6s ease-out infinite; }
.ac-talk[data-state="listening"] .ac-talk__orb::after { animation: ac-ring 1.6s ease-out .8s infinite; }
.ac-talk[data-state="thinking"] .ac-talk__orb { background: var(--ac-ink); animation: ac-breathe 1.2s ease-in-out infinite; }
.ac-talk[data-state="speaking"] .ac-talk__orb { background: var(--ac-red-d); animation: ac-breathe .9s ease-in-out infinite; }
.ac-talk[data-state="idle"] .ac-talk__orb { background: #fff; color: var(--ac-red); box-shadow: 0 0 0 2px var(--ac-red) inset; }
@keyframes ac-ring { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes ac-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.ac-talk__text { min-width: 0; flex: 1 1 auto; }
.ac-talk__status { margin: 0; font-weight: 700; font-size: .98rem; color: var(--ac-ink); }
.ac-talk__heard { margin: 2px 0 0; font-size: .9rem; color: var(--ac-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 1.2em; }
.ac-talk__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ac-talk__lang { border: 1.5px solid var(--ac-line); background: #fff; color: var(--ac-ink); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.ac-talk__lang[aria-pressed="true"] { background: var(--ac-ink); border-color: var(--ac-ink); color: #fff; }
.ac-talk__stop { margin-left: auto; border: 0; background: transparent; color: var(--ac-red-d); font: inherit; font-size: .88rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 5px 2px; }
.ac-talk__lang:focus-visible, .ac-talk__stop:focus-visible { outline: 3px solid var(--ac-red); outline-offset: 2px; }
.ac-talk__note { margin: 0; font-size: .74rem; color: var(--ac-muted); }
@media (prefers-reduced-motion: reduce) { .ac-talk__orb, .ac-talk__orb::before, .ac-talk__orb::after { animation: none !important; } }

/* On-device AI offer */
.ac-offer { align-self: stretch; display: grid; gap: 10px; margin-left: 36px; padding: 12px 14px; border: 1.5px dashed var(--ac-red); border-radius: 14px; background: #fff; }
.ac-offer__text { margin: 0; font-size: .9rem; line-height: 1.45; }
.ac-offer__row { display: flex; align-items: center; gap: 12px; }
