/* QA FIX: extract categories index styling and improve discovery hierarchy */
.categories-header {
	text-align: center;
	margin: 0 auto 3rem;
	max-width: 56rem;
}

.categories-header .subtitle {
	max-width: 44rem;
	margin-left: auto;
	margin-right: auto;
}

.categories-header-note {
	max-width: 40rem;
	margin: 1rem auto 0;
	color: var(--muted);
	line-height: 1.7;
	font-size: 0.98rem;
}

.categories-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	max-width: 960px;
	margin: 0 auto;
}

.category-item {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 0;
	transition: all 0.3s ease;
	overflow: hidden;
	animation: fadeIn 0.4s ease-out;
}

.category-item:hover {
	border-color: var(--accent);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.category-header-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.6rem 1.9rem;
	text-decoration: none;
	color: inherit;
	transition: all 0.3s ease;
}

.category-header-link:hover {
	background: var(--accent-light);
}

.category-title-section {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 1;
}

.category-info {
	flex: 1;
}

.category-eyebrow,
.category-preview-label {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--accent);
}

.category-preview-label {
	margin-bottom: 0.85rem;
}

.category-title {
	font-size: 1.55rem;
	font-weight: 700;
	color: var(--text);
	margin: 0.35rem 0 0.3rem 0;
	transition: color 0.3s ease;
}

.category-header-link:hover .category-title {
	color: var(--accent);
}

.category-meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: 0.875rem;
	color: var(--muted);
}

.category-description {
	margin: 0.75rem 0 0;
	color: var(--muted);
	font-size: 0.98rem;
	line-height: 1.65;
	max-width: 58ch;
}

.category-count {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-weight: 600;
	padding: 0.35rem 0.7rem;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 999px;
}

.category-arrow {
	font-size: 1.25rem;
	color: var(--muted);
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.category-header-link:hover .category-arrow {
	color: var(--accent);
	transform: translateX(4px);
}

.category-articles {
	padding: 0 1.9rem 1.5rem;
	display: none;
	border-top: 1px solid var(--border);
	background: linear-gradient(180deg, rgba(0,0,0,0.015), transparent 30%);
}

.category-item.expanded .category-articles {
	display: block;
}

.category-item.expanded .category-arrow {
	transform: rotate(90deg);
}

.article-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding-top: 0.25rem;
}

.article-item {
	position: relative;
}

.article-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-radius: 10px;
	text-decoration: none;
	color: var(--text);
	font-weight: 500;
	font-size: 0.95rem;
	transition: all 0.2s ease;
}

.article-link:hover {
	background: var(--background);
	color: var(--accent);
	padding-left: 1.25rem;
}

.article-link::before {
	content: '•';
	color: var(--accent);
	font-size: 1.2rem;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.article-link:hover::before {
	opacity: 1;
}

.no-articles,
.loading-small {
	padding: 1.5rem 0.25rem 0.25rem;
	text-align: left;
	color: var(--muted);
	font-size: 0.92rem;
}

.no-articles {
	font-style: italic;
}

.loading-small::after {
	content: '...';
	animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
	0%, 20% { content: '.'; }
	40% { content: '..'; }
	60%, 100% { content: '...'; }
}

.error {
	padding: 1rem;
	background: #fee2e2;
	border: 1px solid #fca5a5;
	border-radius: 8px;
	color: #991b1b;
	font-size: 0.9rem;
	text-align: center;
}

.empty-state {
	text-align: center;
	padding: 4rem 2rem;
}

.empty-icon {
	font-size: 4rem;
	margin-bottom: 1rem;
	opacity: 0.5;
}

.empty-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--text);
	margin-bottom: 0.5rem;
}

.empty-description {
	color: var(--muted);
	font-size: 1rem;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 768px) {
	.categories-list {
		gap: 1rem;
	}

	.category-header-link {
		padding: 1.25rem 1.35rem;
	}

	.category-title {
		font-size: 1.25rem;
	}

	.category-articles {
		padding: 0 1.35rem 1.2rem;
	}
}
