* {
	box-sizing: border-box;
}

body {
	display: grid;
	place-items: center;
	min-height: 100vh;
	margin: 0;
	padding: 1.5rem;
	background: #f4f4f6;
	font-family: system-ui, sans-serif;
	color: #1c1c22;
}

.faq {
	width: min(32rem, 100%);
}

.faq-title {
	margin: 0 0 1.5rem;
	font-size: 1.75rem;
}

.accordion {
	border-radius: 1.5rem;
	background: #ffffff;
	box-shadow: 0 10px 30px -15px rgb(0 0 0 / 0.25);
	overflow: hidden;
}

/* A line between questions, but not above the first one. */
.accordion-item + .accordion-item {
	border-top: 1px solid #e4e4e8;
}

.accordion-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	font-weight: 600;
	cursor: pointer;
	/* Hide the browser's own arrow; the + icon replaces it. */
	list-style: none;
}

/* Safari draws its arrow differently, so it needs its own rule. */
.accordion-trigger::-webkit-details-marker {
	display: none;
}

.accordion-trigger:hover {
	background: #f4f4f6;
}

.accordion-trigger:focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: -3px;
}

.accordion-icon {
	font-size: 1.5rem;
	line-height: 1;
	transition: transform 0.2s ease;
}

/* The browser adds [open] to <details> while it's showing: + turns into ×. */
.accordion-item[open] .accordion-icon {
	transform: rotate(45deg);
}

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

.accordion-panel {
	padding: 0 1.5rem 1.25rem;
	line-height: 1.6;
	color: #4b4b55;
}

.accordion-panel p {
	margin: 0;
}
