.scuw {
	--scuw-bg: #05070a;
	--scuw-card: rgba(10, 14, 19, .97);
	--scuw-red: #e0201f;
	--scuw-red-hot: #ff3b3b;
	--scuw-cyan: #65d7df;
	--scuw-text: #f5f5f5;
	--scuw-muted: #9ba3ad;
	--scuw-line: rgba(255, 255, 255, .12);
	--scuw-line-soft: rgba(255, 255, 255, .06);
	--scuw-title: "Oswald", "Arial Narrow", sans-serif;
	--scuw-body: "Montserrat", "Avenir Next", system-ui, sans-serif;
	position: fixed;
	right: max(18px, env(safe-area-inset-right));
	bottom: max(18px, env(safe-area-inset-bottom));
	z-index: 99999;
	color: var(--scuw-text);
	font-family: var(--scuw-body);
	font-size: 13px;
	line-height: 1.55;
}

.scuw *,
.scuw *::before,
.scuw *::after { box-sizing: border-box; }
.scuw button,
.scuw input,
.scuw textarea { font: inherit; }
.scuw p { margin: 0; }
.scuw [hidden] { display: none !important; }

.scuw-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.scuw__launcher {
	display: grid;
	width: 56px;
	height: 56px;
	place-items: center;
	margin-left: auto;
	border: 1px solid rgba(255, 105, 105, .75);
	border-radius: 50%;
	color: #fff;
	background: linear-gradient(145deg, rgba(224, 32, 31, .95), rgba(118, 21, 26, .95));
	box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 24px rgba(255, 59, 59, .3);
	cursor: pointer;
	transition: transform .18s, box-shadow .18s;
}
.scuw__launcher:hover,
.scuw__launcher:focus-visible { outline: 0; transform: translateY(-1px) scale(1.04); box-shadow: 0 12px 34px rgba(0, 0, 0, .46), 0 0 30px rgba(255, 59, 59, .42); }
.scuw__launcher-icon { font-size: 22px; text-shadow: 0 0 12px rgba(255, 255, 255, .5); }
.scuw--open .scuw__launcher { display: none; }

.scuw__panel {
	position: fixed;
	right: max(18px, env(safe-area-inset-right));
	bottom: max(18px, env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	width: min(378px, calc(100vw - 24px));
	max-height: min(600px, calc(100vh - 40px));
	overflow: hidden;
	border: 1px solid var(--scuw-line);
	border-radius: 18px;
	background: linear-gradient(160deg, rgba(13, 18, 25, .97), rgba(6, 10, 15, .98));
	box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
	backdrop-filter: blur(18px);
	animation: scuw-pop .18s ease-out both;
}

@keyframes scuw-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.scuw__head {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	padding: 14px 12px 14px 16px;
	border-bottom: 1px solid var(--scuw-line-soft);
	color: #d9dde2;
	font-family: var(--scuw-title);
	font-size: 11px;
	letter-spacing: .12em;
}
.scuw__head-mark { color: var(--scuw-red-hot); font-size: 15px; }
.scuw__head strong { flex: 1; font-weight: 500; }
.scuw__close {
	display: grid;
	width: 44px;
	height: 44px;
	place-items: center;
	padding: 6px;
	border: 0;
	border-radius: 50%;
	color: #aab1b9;
	background: transparent;
	cursor: pointer;
}
.scuw__close svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; }
.scuw__close:hover,
.scuw__close:focus-visible { outline: 0; color: #fff; background: rgba(255, 255, 255, .08); }
.scuw__new {
	display: grid;
	width: 44px;
	height: 44px;
	place-items: center;
	padding: 6px;
	border: 0;
	border-radius: 50%;
	color: #aab1b9;
	background: transparent;
	cursor: pointer;
}
.scuw__new svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; }
.scuw__new:hover,
.scuw__new:focus-visible { outline: 0; color: var(--scuw-red-hot); background: rgba(255, 255, 255, .08); }

.scuw-inline-link { color: #9edfe3; text-decoration: underline; text-underline-offset: 2px; }
.scuw-inline-link:hover,
.scuw-inline-link:focus-visible { outline: 0; color: #fff; }
.scuw-fallback-link { display: inline-flex; align-items: center; min-height: 40px; margin-top: 8px; padding: 7px 10px; border: 1px solid rgba(101, 215, 223, .32); border-radius: 9px; }
.scuw :where(a, button, input, textarea, summary, [tabindex]):focus-visible { outline: 2px solid #ff5555 !important; outline-offset: 3px !important; }

.scuw__messages {
	display: grid;
	flex: 1 1 auto;
	min-height: 0;
	gap: 9px;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 14px;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	scroll-behavior: smooth;
}

.scuw-message {
	width: fit-content;
	max-width: 92%;
	padding: 9px 12px;
	border: 1px solid var(--scuw-line-soft);
	border-radius: 12px;
	color: #cdd2d8;
	background: rgba(255, 255, 255, .03);
	font-size: 12px;
	line-height: 1.55;
}
.scuw-message--assistant { justify-self: start; border-bottom-left-radius: 3px; }
.scuw-message--user { justify-self: end; border-color: rgba(255, 59, 59, .28); border-bottom-right-radius: 3px; background: rgba(255, 59, 59, .1); color: #f0f1f3; }
.scuw-message--error { border-color: rgba(255, 135, 110, .35); color: #ffc4b8; }
.scuw-message__head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--scuw-red-hot); font-family: var(--scuw-title); font-size: 9px; letter-spacing: .1em; }
.scuw-message__typing { display: inline-flex; gap: 4px; align-items: center; min-height: 16px; }
.scuw-message__typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--scuw-muted); animation: scuw-bounce 1s ease-in-out infinite; }
.scuw-message__typing i:nth-child(2) { animation-delay: .14s; }
.scuw-message__typing i:nth-child(3) { animation-delay: .28s; }
@keyframes scuw-bounce { 0%, 100% { opacity: .32; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.scuw-badge {
	display: inline-flex;
	align-items: center;
	margin-left: auto;
	padding: 3px 7px;
	border: 1px solid var(--scuw-line);
	border-radius: 999px;
	font-family: var(--scuw-body);
	font-size: 8px;
	font-weight: 600;
	white-space: nowrap;
}
.scuw-badge--fact { border-color: rgba(101, 215, 223, .4); color: #9edfe3; background: rgba(101, 215, 223, .08); }
.scuw-badge--recommendation { border-color: rgba(255, 59, 59, .38); color: #ffb4ac; background: rgba(255, 59, 59, .08); }
.scuw-badge--missing { border-color: var(--scuw-line); color: var(--scuw-muted); background: rgba(255, 255, 255, .03); }

.scuw-message__sources { display: grid; gap: 6px; margin: 8px -2px -1px; padding-top: 7px; border-top: 1px solid var(--scuw-line-soft); }
.scuw-message__sources > strong { color: #78838e; font-family: var(--scuw-title); font-size: 7.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.scuw-source-cards { display: flex; flex-wrap: wrap; gap: 7px; }
.scuw-message__followups { display: grid; gap: 7px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--scuw-line-soft); }
.scuw-message__filters { color: #7f8a95; font-size: 8px; line-height: 1.45; }
.scuw-message__suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.scuw-message__suggestions button { min-height: 30px; padding: 6px 9px; border: 1px solid rgba(101, 215, 223, .25); border-radius: 999px; color: #a8e2e5; background: rgba(101, 215, 223, .055); font: inherit; font-size: 8.5px; line-height: 1.2; cursor: pointer; }
.scuw-message__suggestions button:hover,
.scuw-message__suggestions button:focus-visible { outline: 0; border-color: rgba(101, 215, 223, .62); color: #fff; background: rgba(101, 215, 223, .12); }
.scuw-message__events-link { display: inline-block; margin-top: 8px; color: #a8e2e5; font-size: 8.5px; text-decoration: underline; text-underline-offset: 2px; }
.scuw-message__events-link:hover,
.scuw-message__events-link:focus-visible { color: #fff; }
.scuw-source-card { display: flex; flex-direction: column; width: 132px; overflow: hidden; border: 1px solid rgba(101, 215, 223, .18); border-radius: 9px; background: rgba(255, 255, 255, .02); }
.scuw-source-card__link { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.scuw-source-card:hover,
.scuw-source-card:focus-within { border-color: rgba(101, 215, 223, .5); background: rgba(101, 215, 223, .05); }
.scuw-source-card__media { display: block; width: 100%; height: 64px; overflow: hidden; background: #10151b; }
.scuw-source-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scuw-source-card__fallback { display: grid; width: 100%; height: 100%; place-items: center; color: var(--scuw-red-hot); font-family: var(--scuw-title); font-size: 15px; }
.scuw-source-card__body { display: grid; gap: 2px; padding: 7px 8px 8px; }
.scuw-source-card__kind { color: #78838e; font-family: var(--scuw-title); font-size: 7px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.scuw-source-card__title { overflow: hidden; color: #e7e9ec; font-family: var(--scuw-title); font-size: 9.5px; font-weight: 500; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.scuw-source-card__date { color: #9edfe3; font-size: 8px; }
.scuw-source-card__meta { overflow: hidden; color: #929ca7; font-size: 7.8px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.scuw-source-card__badges { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.scuw-source-card__badges > span { padding: 2px 4px; border: 1px solid rgba(101, 215, 223, .25); border-radius: 999px; color: #9edfe3; background: rgba(101, 215, 223, .055); font-size: 6.8px; line-height: 1.2; }
.scuw-source-card__participants { display: -webkit-box; overflow: hidden; color: #aab2ba; font-size: 7.4px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.scuw-source-card__action { margin-top: 4px; color: var(--scuw-red-hot); font-family: var(--scuw-title); font-size: 7.2px; letter-spacing: .04em; }
.scuw-source-card__action::after { content: "  ›"; }
.scuw-source-card--evenement { border-color: rgba(255, 76, 76, .25); }
.scuw-source-card--evenement .scuw-source-card__badges > span { border-color: rgba(255, 76, 76, .3); color: #ffb4ac; background: rgba(255, 59, 59, .06); }
.scuw-source-card__excerpt { border-top: 1px solid var(--scuw-line-soft); }
.scuw-source-card__excerpt summary { padding: 5px 8px; color: #8a94a0; font-size: 7.5px; cursor: pointer; list-style: none; }
.scuw-source-card__excerpt summary::-webkit-details-marker { display: none; }
.scuw-source-card__excerpt summary::before { content: "▸ "; color: var(--scuw-red-hot); }
.scuw-source-card__excerpt[open] summary::before { content: "▾ "; }
.scuw-source-card__excerpt p { margin: 0; padding: 0 8px 8px; color: #b7bdc4; font-size: 8.5px; line-height: 1.5; }

.scuw__composer {
	display: grid;
	flex: 0 0 auto;
	grid-template-columns: minmax(0, 1fr) 40px;
	align-items: end;
	gap: 7px;
	padding: 10px 12px;
	border-top: 1px solid var(--scuw-line-soft);
}
.scuw__composer textarea {
	max-height: 90px;
	padding: 9px 12px;
	resize: none;
	overflow-y: auto;
	border: 1px solid var(--scuw-line);
	border-radius: 14px;
	color: #e5e7ea;
	background: rgba(5, 9, 14, .6);
	font-size: 13px;
	line-height: 1.4;
	transition: border-color .18s;
}
.scuw__composer textarea:focus { outline: 0; border-color: rgba(255, 59, 59, .55); }
.scuw__composer textarea::placeholder { color: #89919b; }
.scuw__composer textarea:disabled { cursor: not-allowed; opacity: .55; }
.scuw__send {
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	padding: 11px;
	border: 1px solid rgba(255, 105, 105, .75);
	border-radius: 50%;
	color: #fff;
	background: linear-gradient(145deg, rgba(224, 32, 31, .92), rgba(118, 21, 26, .92));
	cursor: pointer;
	transition: transform .18s, opacity .18s;
}
.scuw__send svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; }
.scuw__send:hover:not(:disabled),
.scuw__send:focus-visible:not(:disabled) { outline: 0; transform: translateY(-1px) scale(1.03); }
.scuw__send:disabled { cursor: not-allowed; opacity: .34; }

.scuw__examples { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 5px 10px; padding: 0 14px 8px; color: var(--scuw-muted); font-size: 9px; }
.scuw-example { padding: 0; border: 0; color: #9edfe3; background: transparent; text-decoration: underline; cursor: pointer; }
.scuw-example:hover,
.scuw-example:focus-visible { outline: 0; color: #fff; }

.scuw__full-link {
	display: block;
	flex: 0 0 auto;
	padding: 9px 14px;
	border-top: 1px solid var(--scuw-line-soft);
	color: #9edfe3;
	font-size: 10.5px;
	text-align: center;
	text-decoration: none;
}
.scuw__full-link:hover,
.scuw__full-link:focus-visible { outline: 0; color: #fff; }
.scuw__disclaimer { flex: 0 0 auto; padding: 0 14px 12px; color: #626b76; font-size: 8px; text-align: center; }

@media (max-width: 480px) {
	.scuw {
		right: max(8px, env(safe-area-inset-right));
		bottom: max(8px, env(safe-area-inset-bottom));
	}
	.scuw__panel {
		top: max(8px, env(safe-area-inset-top));
		right: max(8px, env(safe-area-inset-right));
		bottom: max(8px, env(safe-area-inset-bottom));
		left: max(8px, env(safe-area-inset-left));
		width: auto;
		height: auto;
		max-height: none;
		border-radius: 15px;
	}
	.scuw__head {
		position: relative;
		z-index: 2;
		min-height: 56px;
		padding: 6px 8px 6px 12px;
		background: rgba(10, 14, 19, .98);
	}
	.scuw__messages {
		min-height: 0;
		padding: 12px;
	}
	.scuw__composer { padding: 8px 10px; }
	.scuw__full-link { padding: 7px 12px; }
	.scuw__disclaimer { padding: 0 10px 6px; font-size: 7px; }
	.scuw__launcher { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
	.scuw *,
	.scuw *::before,
	.scuw *::after {
		scroll-behavior: auto !important;
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}
