/* ==================== FAQ 目录 (faq-toc) ==================== */

.faq-toc *,
.faq-toc *::before,
.faq-toc *::after {
	box-sizing: border-box;
}

.faq-toc {
	--faq-toc-duration: 0.35s;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #fff;
	overflow: hidden;
}

/* ---- 标题区 ---- */
.faq-toc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 20px 24px;
	background: transparent;
	border: 0;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	color: inherit;
	text-align: left;
}

.faq-toc-header:hover,
.faq-toc-header:focus,
.faq-toc-header:active {
	background: transparent;
	box-shadow: none;
	outline: none;
}

.faq-toc-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #1a2b5f;
	line-height: 1.3;
}

/* ---- 箭头 ---- */
.faq-toc-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: transform var(--faq-toc-duration) ease;
}

.faq-toc-arrow svg {
	width: 20px;
	height: 20px;
	fill: #1a2b5f;
}

/* 收起时箭头向下 */
.faq-toc:not(.is-open) .faq-toc-arrow {
	transform: rotate(180deg);
}

/* ---- 展开面板 ---- */
.faq-toc-panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--faq-toc-duration) ease;
}

.faq-toc.is-open .faq-toc-panel {
	grid-template-rows: 1fr;
}

.faq-toc-panel-inner {
	min-height: 0;
	overflow: hidden;
}

/* ---- 列表 ---- */
.faq-toc-list {
	list-style: none;
	margin: 0;
	padding: 16px 24px 20px;
	border-top: 1px solid #e0e0e0;
}

.faq-toc-item + .faq-toc-item {
	margin-top: 8px;
}

/* ---- 链接 ---- */
.faq-toc-link {
	display: inline-block;
	color: #1a2b5f;
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.6;
	transition: color 0.25s ease;
}

.faq-toc-link:hover {
	color: #b71a33;
	text-decoration: none;
}

.faq-toc-link:focus-visible {
	outline: 2px solid #b71a33;
	outline-offset: 2px;
}

/* ---- Reduced Motion ---- */
@media ( prefers-reduced-motion: reduce ) {
	.faq-toc-panel,
	.faq-toc-arrow {
		transition-duration: 0.01s !important;
	}
}
