/* Free AI diagnostic: the page column, the questions and the buttons. */
@layer site {
	.diag [hidden] {
		display: none !important;
	}
	.diag > .diag-form,
	.diag > .diag-result,
	.diag > .diag-noscript {
		max-inline-size: 660px;
		margin-inline: auto;
	}
	.diag > .lead,
	.diag > h1 {
		max-inline-size: 660px;
		margin-inline: auto;
	}
	.diag > h1 {
		font-size: clamp(32px, 4vw, 48px);
		margin-block: 24px 16px;
	}
	.diag.is-done > h1 {
		display: none;
	}
	.diag-steps {
		display: flex;
		gap: 4px;
		list-style: none;
		margin: 0 0 16px;
		padding: 0;
	}
	.diag-steps li {
		flex: 1;
		block-size: 4px;
		background: rgba(23, 53, 85, 0.15);
		transition: background-color 0.2s;
	}
	.diag-steps li.done {
		background: rgb(40, 97, 174);
	}
	.diag-count {
		margin: 0 0 32px;
		font-size: 16px;
		line-height: 1.5;
	}
	fieldset.diag-q {
		margin: 0;
		padding: 0;
		border: 0;
		min-inline-size: 0;
	}
	.diag-q legend {
		padding: 0;
		margin-block-end: 24px;
		font-size: 24px;
		line-height: 1.3;
		font-weight: 600;
		color: rgb(23, 53, 85);
		text-wrap: balance;
	}
	.diag-q legend:focus {
		outline: none;
	}
	.diag-opt {
		display: flex;
		align-items: center;
		gap: 16px;
		min-block-size: 56px;
		margin-block-end: 8px;
		padding: 12px 16px;
		border: 1px solid rgba(23, 53, 85, 0.25);
		border-radius: 4px;
		background: rgb(255, 255, 255);
		font-size: 18px;
		line-height: 1.4;
		color: rgb(23, 53, 85);
		cursor: pointer;
		transition: border-color 0.15s, background-color 0.15s;
	}
	.diag-opt:hover {
		border-color: rgb(40, 97, 174);
	}
	.diag-opt:active {
		background: rgba(40, 97, 174, 0.12);
	}
	.diag-opt:has(input:checked) {
		border-color: rgb(40, 97, 174);
		background: rgba(40, 97, 174, 0.1);
		box-shadow: inset 0 0 0 1px rgb(40, 97, 174);
	}
	.diag-opt:has(input:focus-visible),
	.diag-consent:has(input:focus-visible) {
		outline: 3px solid rgb(40, 97, 174);
		outline-offset: 2px;
	}
	.diag-opt:has(input:disabled) {
		opacity: 0.5;
		cursor: not-allowed;
	}
	.diag-opt input,
	.diag-consent input {
		appearance: none;
		flex: none;
		inline-size: 22px;
		block-size: 22px;
		margin: 0;
		border: 2px solid rgb(83, 103, 124);
		border-radius: 50%;
		background: rgb(255, 255, 255);
	}
	.diag-opt input[type="checkbox"],
	.diag-consent input {
		border-radius: 3px;
	}
	.diag-opt input:checked,
	.diag-consent input:checked {
		border-color: rgb(40, 97, 174);
		background: rgb(40, 97, 174);
		box-shadow: inset 0 0 0 4px rgb(255, 255, 255);
	}
	.diag-opt input[type="checkbox"]:checked,
	.diag-consent input:checked {
		box-shadow: none;
		background: rgb(40, 97, 174) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
	}
	.diag-nav,
	.diag-actions {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
		max-inline-size: none;
		margin-block: 32px 0;
	}
	.diag-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-block-size: 48px;
		padding-block: 0;
		padding-inline: 24px;
		border: 1px solid rgb(40, 97, 174);
		border-radius: 4px;
		font: inherit;
		font-size: 18px;
		font-weight: 500;
		line-height: 1.2;
		cursor: pointer;
		transition: background-color 0.15s, color 0.15s, transform 0.1s;
	}
	.diag-btn-main {
		background: rgb(40, 97, 174);
		color: rgb(255, 255, 255);
	}
	.diag-btn-main:hover {
		background: rgb(31, 80, 148);
	}
	.diag-btn-ghost {
		background: transparent;
		color: rgb(40, 97, 174);
	}
	.diag-btn-ghost:hover {
		background: rgba(40, 97, 174, 0.1);
	}
	.diag-btn:active {
		transform: translateY(1px);
	}
	.diag-btn:focus-visible {
		outline: 3px solid rgb(40, 97, 174);
		outline-offset: 3px;
	}
	.diag-btn:disabled {
		opacity: 0.45;
		cursor: not-allowed;
	}
	.diag-nav {
		justify-content: space-between;
	}
	.diag .diag-actions a.diag-btn,
	.diag .diag-actions a.diag-btn:hover {
		border-block-end: 1px solid rgb(40, 97, 174);
		color: rgb(255, 255, 255);
	}

	/* The chat: the agent's lines on the left with the Colibri, the visitor's on the right, choices as chips. */
	.diag.is-chat > .diag-form,
	.diag.is-done > .diag-chat {
		display: none;
	}
	.diag > .diag-chat {
		max-inline-size: 660px;
		margin-inline: auto;
	}
	.diag-chat-head {
		display: flex;
		align-items: center;
		gap: 10px;
		margin: 0 0 16px;
		padding-block-end: 12px;
		border-block-end: 1px solid rgba(23, 53, 85, 0.15);
		font-size: 16px;
		color: rgb(23, 53, 85);
	}
	.diag-chat-count {
		margin-inline-start: auto;
		color: rgb(83, 103, 124);
	}
	.diag-bird {
		display: inline-grid;
		place-items: center;
		flex: none;
		inline-size: 36px;
		block-size: 36px;
		border-radius: 50%;
		background: rgba(8, 121, 133, 0.1);
		color: rgb(8, 121, 133);
	}
	.diag-bird svg {
		inline-size: 24px;
		block-size: 24px;
	}
	.diag-chat-head .diag-bird,
	.diag-bot.is-live .diag-bird svg {
		animation: diag-hover 1.6s ease-in-out infinite;
	}
	@keyframes diag-hover {
		0%, 100% { transform: translateY(0) rotate(0deg); }
		30% { transform: translateY(-3px) rotate(-6deg); }
		60% { transform: translateY(1px) rotate(3deg); }
	}
	.diag-thread {
		display: flex;
		flex-direction: column;
		gap: 12px;
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.diag-msg {
		display: flex;
		align-items: flex-end;
		gap: 10px;
		margin: 0;
		animation: diag-in 0.25s ease-out;
	}
	@keyframes diag-in {
		from { opacity: 0; transform: translateY(6px); }
	}
	.diag-msg p {
		max-inline-size: 85%;
		margin: 0;
		padding: 12px 16px;
		border-radius: 16px;
		font-size: 18px;
		line-height: 1.45;
	}
	.diag-bot p {
		border-end-start-radius: 4px;
		background: rgb(241, 245, 249);
		color: rgb(23, 53, 85);
	}
	.diag-me {
		justify-content: flex-end;
	}
	.diag-me p {
		border-end-end-radius: 4px;
		background: rgb(40, 97, 174);
		color: rgb(255, 255, 255);
	}
	.diag-me small {
		display: block;
		margin-block-start: 4px;
		font-size: 14px;
		opacity: 0.85;
	}
	.diag-bot.is-typing p {
		display: flex;
		gap: 5px;
		padding-block: 18px;
	}
	.diag-bot.is-typing i {
		inline-size: 7px;
		block-size: 7px;
		border-radius: 50%;
		background: rgb(83, 103, 124);
		animation: diag-dot 1s ease-in-out infinite;
	}
	.diag-bot.is-typing i:nth-child(2) { animation-delay: 0.15s; }
	.diag-bot.is-typing i:nth-child(3) { animation-delay: 0.3s; }
	@keyframes diag-dot {
		0%, 100% { opacity: 0.3; transform: translateY(0); }
		50% { opacity: 1; transform: translateY(-3px); }
	}
	.diag-chips {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin-block: 16px 0;
		padding-inline-start: 46px;
	}
	.diag-chips:empty {
		display: none;
	}
	.diag-chip {
		min-block-size: 44px;
		padding: 10px 16px;
		border: 1px solid rgb(40, 97, 174);
		border-radius: 22px;
		background: rgb(255, 255, 255);
		font: inherit;
		font-size: 16px;
		line-height: 1.3;
		color: rgb(40, 97, 174);
		text-align: start;
		cursor: pointer;
		transition: background-color 0.15s, color 0.15s;
	}
	.diag-chip:hover,
	.diag-chip[aria-pressed="true"] {
		background: rgba(40, 97, 174, 0.12);
	}
	.diag-chip[aria-pressed="true"] {
		box-shadow: inset 0 0 0 1px rgb(40, 97, 174);
		font-weight: 600;
	}
	.diag-chip-go {
		background: rgb(40, 97, 174);
		color: rgb(255, 255, 255);
		font-weight: 600;
	}
	.diag-chip-go:hover {
		background: rgb(31, 80, 148);
	}
	.diag-chip:disabled {
		opacity: 0.45;
		cursor: not-allowed;
	}
	.diag-chip:focus-visible,
	.diag-say input:focus-visible {
		outline: 3px solid rgb(40, 97, 174);
		outline-offset: 2px;
	}
	.diag-say {
		display: flex;
		gap: 8px;
		margin-block: 20px 0;
		padding-block-start: 16px;
		border-block-start: 1px solid rgba(23, 53, 85, 0.15);
	}
	.diag-say input {
		flex: 1;
		min-inline-size: 0;
		min-block-size: 48px;
		padding-inline: 16px;
		border: 1px solid rgba(23, 53, 85, 0.3);
		border-radius: 24px;
		font: inherit;
		font-size: 16px;
		color: rgb(23, 53, 85);
	}
	.diag-say .diag-btn {
		border-radius: 24px;
	}
	@media (max-width: 520px) {
		.diag-chips {
			padding-inline-start: 0;
		}
		.diag-msg p {
			font-size: 16px;
		}
	}
	@media (prefers-reduced-motion: reduce) {
		.diag-chat *,
		.diag-chat {
			animation: none !important;
		}
	}
}
