/* EG Schema — front-end FAQ accordion ([egs_faq]). All classes prefixed egs_.
   Theme-agnostic: text inherits the theme; dividers/hover are derived from
   currentColor so it adapts to light and dark backgrounds automatically. */

.egs_faq {
	--egs_faq_accent: #4f46e5;
	--egs_faq_radius: 12px;
	--egs_faq_border: rgba(128, 128, 128, 0.24);
	--egs_faq_border: color-mix(in oklab, currentColor 17%, transparent);
	--egs_faq_hover: rgba(128, 128, 128, 0.08);
	--egs_faq_hover: color-mix(in oklab, currentColor 6%, transparent);
	--egs_faq_icon: color-mix(in oklab, currentColor 55%, transparent);
	--egs_faq_gap: 12px;

	width: 100%;
	margin: 1.5rem 0;
	display: flex;
	flex-direction: column;
	gap: var(--egs_faq_gap);
	color: inherit;
}

.egs_faq_item {
	border: 1px solid var(--egs_faq_border);
	border-radius: var(--egs_faq_radius);
	overflow: clip;
}

.egs_faq_q {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.05rem 1.25rem;
	margin: 0;
	font-weight: 600;
	font-size: 1.02em;
	line-height: 1.45;
	color: inherit;
	transition: background-color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.egs_faq_q::-webkit-details-marker {
	display: none;
}

.egs_faq_q::marker {
	content: "";
}

.egs_faq_q:hover {
	background: var(--egs_faq_hover);
}

.egs_faq_q:focus-visible {
	outline: 2px solid var(--egs_faq_accent);
	outline-offset: -2px;
}

.egs_faq_icon {
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	margin-right: 3px;
	border-right: 2px solid var(--egs_faq_icon);
	border-bottom: 2px solid var(--egs_faq_icon);
	transform: rotate(45deg);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
}

.egs_faq_item[open] .egs_faq_icon {
	transform: rotate(225deg);
	border-color: var(--egs_faq_accent);
}

.egs_faq_a {
	overflow: hidden;
}

.egs_faq_a_inner {
	padding: 0 1.25rem 1.2rem;
	line-height: 1.7;
	color: inherit;
}

.egs_faq_a_inner > :first-child {
	margin-top: 0;
}

.egs_faq_a_inner > :last-child {
	margin-bottom: 0;
}

.egs_faq_a_inner a {
	color: var(--egs_faq_accent);
}

.egs_faq_a_inner img {
	max-width: 100%;
	height: auto;
}

.egs_faq_a_inner :where(iframe, video, embed, object) {
	display: block;
	max-width: 100%;
	margin: 0.6rem 0;
}

.egs_faq_a_inner iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: 8px;
}

@media (prefers-color-scheme: dark) {
	.egs_faq {
		--egs_faq_accent: #a5b4fc;
	}
}

@media (prefers-reduced-motion: reduce) {
	.egs_faq_icon {
		transition: none;
	}
}
