#wit-chat {
	--wit-accent: #ff5f1f;
	--wit-accent-ink: #ffffff;
	--wit-ink: #141414;
	--wit-muted: #6b6b6b;
	--wit-glass: rgba(255, 255, 255, 0.78);
	--wit-line: rgba(20, 20, 20, 0.08);
	--wit-bot: rgba(20, 20, 20, 0.05);
	--wit-display: "Neue Regrade", "Montserrat", system-ui, sans-serif;
	--wit-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
	position: fixed;
	right: 20px;
	bottom: 80px;
	z-index: 99990;
	font-family: var(--wit-body);
	color: var(--wit-ink);
	-webkit-font-smoothing: antialiased;
}
#wit-chat *, #wit-chat *::before, #wit-chat *::after { box-sizing: border-box; }
#wit-chat button { font-family: inherit; cursor: pointer; }
#wit-chat svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Launcher */
#wit-chat .wit-launch {
	display: flex; align-items: center; gap: 10px;
	height: 54px; padding: 0 22px 0 18px;
	border: 0; border-radius: 999px;
	background: var(--wit-accent); color: var(--wit-accent-ink);
	font-size: 15px; font-weight: 600; letter-spacing: .01em;
	box-shadow: 0 10px 30px rgba(255, 95, 31, .35), 0 2px 6px rgba(0, 0, 0, .12);
	transition: transform .2s ease, box-shadow .2s ease;
}
#wit-chat .wit-launch svg { fill: currentColor; stroke: none; width: 22px; height: 22px; }
#wit-chat .wit-launch:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(255, 95, 31, .42), 0 2px 6px rgba(0, 0, 0, .12); }
#wit-chat .wit-launch:focus-visible { outline: 3px solid var(--wit-ink); outline-offset: 3px; }
#wit-chat.is-open .wit-launch { display: none; }

/* Panel */
#wit-chat .wit-panel {
	position: absolute; right: 0; bottom: 0;
	width: 380px; height: min(620px, calc(100vh - 100px));
	display: flex; flex-direction: column;
	background: var(--wit-glass);
	-webkit-backdrop-filter: blur(22px) saturate(160%);
	backdrop-filter: blur(22px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 24px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .06);
	overflow: hidden;
	animation: wit-in .22s ease-out;
}
#wit-chat .wit-panel[hidden] { display: none; }
@keyframes wit-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

#wit-chat .wit-head { display: flex !important; align-items: center; gap: 12px; padding: 16px 16px 14px 18px; border-bottom: 1px solid var(--wit-line); }
#wit-chat .wit-avatar {
	width: 40px; height: 40px; border-radius: 50%; flex: none;
	display: grid; place-items: center;
	background: var(--wit-ink); color: #fff;
	font-family: var(--wit-display); font-size: 18px; font-weight: 700;
}
#wit-chat .wit-head-txt { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
#wit-chat .wit-head-txt strong { font-family: var(--wit-display); font-size: 16px; font-weight: 700; }
#wit-chat .wit-head-txt span { font-size: 12px; color: var(--wit-muted); display: flex; align-items: center; gap: 6px; }
#wit-chat .wit-head-txt i { width: 7px; height: 7px; border-radius: 50%; background: #2fbf71; display: inline-block; }
#wit-chat .wit-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--wit-ink); display: grid; place-items: center; }
#wit-chat .wit-close:hover { background: var(--wit-bot); }

/* Messages */
#wit-chat .wit-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
#wit-chat .wit-msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
#wit-chat .wit-msg p { margin: 0 0 6px; }
#wit-chat .wit-msg p:last-child { margin-bottom: 0; }
#wit-chat .wit-msg ul { margin: 4px 0 6px; padding-left: 18px; }
#wit-chat .wit-msg li { margin: 2px 0; }
#wit-chat .wit-assistant { align-self: flex-start; background: var(--wit-bot); border-bottom-left-radius: 6px; }
#wit-chat .wit-assistant a { color: var(--wit-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
#wit-chat .wit-user { align-self: flex-end; background: var(--wit-ink); color: #fff; border-bottom-right-radius: 6px; }

#wit-chat .wit-typing { display: flex; gap: 4px; padding: 14px 16px; }
#wit-chat .wit-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--wit-muted); animation: wit-dot 1.2s infinite ease-in-out; }
#wit-chat .wit-typing span:nth-child(2) { animation-delay: .15s; }
#wit-chat .wit-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes wit-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Quick questions */
#wit-chat .wit-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
#wit-chat .wit-chips:empty { display: none; }
#wit-chat .wit-chips button {
	border: 1px solid var(--wit-line); background: rgba(255, 255, 255, .7);
	border-radius: 999px; padding: 7px 12px; font-size: 12.5px; color: var(--wit-ink);
	transition: border-color .15s, background .15s;
}
#wit-chat .wit-chips button:hover { border-color: var(--wit-accent); background: #fff; }

/* Composer */
#wit-chat .wit-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 6px 6px 6px 16px; background: #fff; border: 1px solid var(--wit-line); border-radius: 26px; }
#wit-chat .wit-form:focus-within { border-color: var(--wit-accent); }
#wit-chat .wit-form textarea {
	flex: 1; border: 0; outline: 0; resize: none; background: transparent;
	font: inherit; font-size: 14px; line-height: 1.4; padding: 9px 0; max-height: 120px; color: var(--wit-ink);
	min-height: 0; box-shadow: none;
}
#wit-chat .wit-form button[type="submit"] {
	width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%;
	background: var(--wit-accent); color: var(--wit-accent-ink);
	display: grid; place-items: center; padding: 0;
}
#wit-chat .wit-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

#wit-chat .wit-foot { display: block !important; padding: 10px 14px 14px; text-align: center; }
#wit-chat .wit-cta {
	display: inline-block; margin-bottom: 8px; padding: 9px 18px; border-radius: 999px;
	background: var(--wit-ink); color: #fff !important; font-size: 13px; font-weight: 600; text-decoration: none;
}
#wit-chat .wit-cta:hover { background: var(--wit-accent); }
#wit-chat .wit-foot small { display: block; font-size: 10.5px; line-height: 1.4; color: var(--wit-muted); }
#wit-chat .wit-foot small a { color: inherit; }

/* Mobile: full screen sheet */
@media (max-width: 520px) {
	#wit-chat { right: 14px; bottom: 72px; }
	#wit-chat .wit-launch { height: 52px; padding: 0 18px 0 16px; }
	#wit-chat.is-open { inset: 0; right: 0; bottom: 0; }
	#wit-chat .wit-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
	#wit-chat .wit-form textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	#wit-chat .wit-panel, #wit-chat .wit-typing span { animation: none; }
}
