/* Minimal Pairs Main Layout & Spacing */
.minimal-pairs-page,
.minimal-pairs-hub {
	padding: 42px 0 80px;
}

/* Hero Stats Bar */
.hub-hero-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-top: 28px;
}

.stat-card {
	display: flex;
	flex-direction: column;
	padding: 16px 18px;
	background: #fffaf1;
	border: 1px solid #ead6b3;
	border-radius: 16px;
	box-shadow: 0 4px 14px rgba(76, 56, 29, 0.04);
}

.stat-card strong {
	color: #7048d8;
	font: 800 1.45rem/1.2 Georgia, serif;
}

.stat-card span {
	margin-top: 4px;
	color: #695d52;
	font-size: 0.84rem;
	font-weight: 700;
}

/* Visual Explanation Section */
.visual-explanation-section {
	margin-top: 36px;
}

.contrast-diagram-box {
	margin-top: 20px;
	padding: 24px;
	background: #fffdf8;
	border: 1px solid #e7d4b1;
	border-radius: 20px;
	box-shadow: 0 6px 18px rgba(64, 49, 26, 0.05);
}

.pair-demo-card {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 28px;
	padding: 20px;
	background: #fff9ed;
	border: 1px solid #ebd8b6;
	border-radius: 16px;
}

.demo-word {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.demo-word .word-text {
	color: var(--dark, #2e2924);
	font: 800 2.1rem Georgia, serif;
	letter-spacing: 0.02em;
}

.sound-highlight {
	color: #8054e8;
	border-bottom: 3px solid #8054e8;
	padding-bottom: 2px;
}

.sound-highlight.alt {
	color: #0b8064;
	border-bottom-color: #0b8064;
}

.ipa-label {
	color: #6d6258;
	font-size: 0.82rem;
	font-weight: 700;
}

.demo-vs {
	color: #8054e8;
	font: 800 1.6rem Georgia, serif;
}

.diagram-note {
	margin-top: 16px;
	text-align: center;
	color: #695e53;
	font-size: 0.92rem;
}

/* Teaching Steps Grid */
.teaching-steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-top: 22px;
}

.step-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px 16px;
	background: #fffdf8;
	border: 1px solid #e6d3af;
	border-radius: 16px;
	box-shadow: 0 4px 12px rgba(64, 49, 26, 0.04);
}

.step-card b {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #8054e8;
	color: #fff;
	font: 800 0.95rem inherit;
}

.step-card strong {
	color: #2e2924;
	font-size: 1.02rem;
}

.step-card span {
	color: #695e53;
	font-size: 0.85rem;
	line-height: 1.45;
}

.accuracy-note {
	margin-top: 22px;
	padding: 18px 20px;
	border-left: 5px solid #8054e8;
	background: #f4edff;
	border-radius: 8px;
	color: #3b322a;
	font-size: 0.95rem;
}

/* Contrast Lessons Filter & Header */
.contrast-lessons-section {
	margin-top: 40px;
}

.lessons-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid #ebd9b9;
}

.contrast-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.filter-btn {
	padding: 8px 14px;
	border: 1px solid #dfccad;
	border-radius: 10px;
	background: #fffdf8;
	color: #494037;
	font: 700 0.85rem inherit;
	cursor: pointer;
	transition: all 0.18s ease;
}

.filter-btn:hover {
	border-color: #8054e8;
	color: #8054e8;
	background: #f8f3ff;
}

.filter-btn.is-active {
	border-color: #8054e8;
	background: #8054e8;
	color: #fff;
	box-shadow: 0 4px 12px rgba(128, 84, 232, 0.25);
}

/* Category Group Section */
.category-group-block {
	margin-top: 32px;
}

.category-group-header {
	margin-bottom: 18px;
}

.category-tag {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tag-vowel {
	background: #f4edff;
	color: #7048d8;
}

.tag-vowel-glide {
	background: #fff0d8;
	color: #a45800;
}

.tag-consonant {
	background: #e6f6f2;
	color: #0b785d;
}

.category-group-header h3 {
	margin: 6px 0 4px;
	color: #2e2924;
	font: 700 1.55rem Georgia, serif;
}

.category-group-header p {
	margin: 0;
	color: #6d6258;
	font-size: 0.94rem;
}

/* Enhanced Lesson Cards Grid */
.contrast-lesson-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-top: 16px;
}

.contrast-lesson-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px 24px;
	border: 1px solid #e7d4b1;
	border-radius: 20px;
	background: #fffdf8;
	color: inherit;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(64, 49, 26, 0.04);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contrast-lesson-card:hover {
	transform: translateY(-3px);
	border-color: #8054e8;
	box-shadow: 0 12px 26px rgba(128, 84, 232, 0.13);
}

.card-top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.category-badge {
	color: #7048d8;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.quiz-pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 6px;
	background: #eef7ed;
	color: #17683c;
	font-size: 0.7rem;
	font-weight: 800;
}

.card-title {
	color: #2e2924;
	font: 700 1.38rem Georgia, serif;
}

.sound-ipa-display {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 2px 0;
}

.ipa-tag {
	display: inline-grid;
	place-items: center;
	padding: 4px 12px;
	border-radius: 8px;
	background: #f4edff;
	color: #6333d4;
	font: 800 1.05rem Georgia, serif;
}

.card-consonant .ipa-tag {
	background: #e6f6f2;
	color: #0b785d;
}

.ipa-arrow {
	color: #928477;
	font-weight: 800;
}

.sample-pairs-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
}

.pair-chip {
	padding: 3px 9px;
	border: 1px solid #eddcc1;
	border-radius: 8px;
	background: #fff8eb;
	color: #4d443b;
	font-size: 0.82rem;
	font-weight: 700;
}

.card-footer-action {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid #f2e4cb;
}

.card-footer-action em {
	font-style: normal;
	color: #6d6258;
	font-size: 0.82rem;
	font-weight: 700;
}

.card-footer-action .cta-link {
	color: #7048d8;
	font-size: 0.86rem;
	font-weight: 800;
}

.contrast-lesson-card:hover .cta-link {
	text-decoration: underline;
}

/* Scope & Pedagogy Cards */
.scope-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
	margin-top: 20px;
}

.scope-box {
	padding: 22px;
	border-radius: 18px;
	border: 1px solid #e7d4b1;
	background: #fffdf8;
}

.scope-do {
	border-left: 5px solid #218653;
	background: #f4fbf7;
}

.scope-dont {
	border-left: 5px solid #8054e8;
	background: #f8f4ff;
}

.scope-box h4 {
	margin: 0 0 12px;
	font-size: 1.05rem;
	font-weight: 800;
	color: #2e2924;
}

.scope-box ul {
	margin: 0;
	padding-left: 18px;
	color: #51473d;
	font-size: 0.9rem;
	line-height: 1.6;
}

/* Detail Page Specific Styling Compatibility */
.contrast-sound-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin: 24px 0;
}

.contrast-sound-cards > div {
	background: #fffaf1;
	border: 1px solid #ead6b3;
	border-radius: 22px;
	padding: 24px;
}

.contrast-sound-cards span {
	display: inline-grid;
	place-items: center;
	min-width: 72px;
	height: 58px;
	border-radius: 18px;
	background: #8054e8;
	color: #fff;
	font: 700 1.65rem Georgia, serif;
}

.contrast-sound-cards h3 {
	margin: 16px 0 8px;
}

.minimal-pair-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 24px;
}

.minimal-pair-card {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 9px;
	border: 1px solid #e6d3af;
	border-radius: 16px;
	background: #fffdf8;
	padding: 10px;
}

.minimal-pair-card button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	border: 0;
	border-radius: 11px;
	background: #f4edff;
	color: #2e2925;
	padding: 12px 13px;
	font: 700 1.12rem inherit;
	cursor: pointer;
}

.minimal-pair-card button:hover,
.minimal-pair-card button:focus-visible {
	background: #e7d9ff;
	outline: 2px solid #8054e8;
}

.minimal-pair-card i {
	font-style: normal;
	font-size: 0.9rem;
}

.minimal-pair-card .audio-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1em;
	height: 1em;
	line-height: 1;
}

.minimal-pair-card .audio-icon svg {
	display: block;
	width: 1em;
	height: 1em;
}

.listening-lab {
	background: linear-gradient(135deg, #2f2926 0%, #43385d 100%);
	color: #fff;
	border-radius: 28px;
	padding: 32px !important;
}

.listening-lab .eyebrow {
	color: #c9adff;
}

.listening-lab h2 {
	color: #fff;
}

.listening-lab > p:not(.eyebrow) {
	color: #eee7dc;
}

.listen-choose {
	max-width: 640px;
	margin-top: 22px;
	padding: 22px;
	background: #fffaf1;
	color: #2d2824;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 20px;
	box-shadow: 0 18px 42px rgba(16, 11, 24, 0.22);
}

.quiz-status {
	display: flex;
	justify-content: space-between;
	color: #6f655c;
	font-size: 0.9rem;
}

.quiz-play {
	display: block;
	width: 100%;
	margin: 18px 0;
	padding: 16px;
	border: 0;
	border-radius: 14px;
	background: #7c4de4;
	color: #fff;
	font-weight: 800;
	font-size: 1.05rem;
	cursor: pointer;
	box-shadow: 0 7px 16px rgba(91, 55, 174, 0.2);
}

.quiz-play:hover,
.quiz-play:focus-visible {
	background: #6939d3;
	outline: 3px solid #d8c5ff;
	outline-offset: 2px;
}

.quiz-choices {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.quiz-choices button {
	padding: 14px;
	border: 2px solid #d9c6a4;
	border-radius: 14px;
	background: #fff;
	color: #2d2824;
	font: 800 1.2rem inherit;
	cursor: pointer;
}

.quiz-choices button:hover,
.quiz-choices button:focus-visible {
	border-color: #7c4de4;
	background: #f7f1ff;
	outline: none;
}

.quiz-choices button.is-correct {
	border-color: #218653;
	background: #e7f7ed;
	color: #155d3a;
}

.quiz-choices button.is-wrong {
	border-color: #bf4646;
	background: #fff0f0;
	color: #8d2929;
}

.quiz-feedback {
	min-height: 26px;
	color: #51483f;
	font-weight: 700;
}

.quiz-next {
	background: #2f2926;
	color: #fff;
}

.quiz-next:hover,
.quiz-next:focus-visible {
	background: #473d37;
}

.quiz-next[hidden] {
	display: none !important;
}

.minimal-pairs-hub .content-section {
	margin: 34px 0;
}

/* Responsive Styles */
@media (max-width: 820px) {
	.hub-hero-stats {
		grid-template-columns: repeat(2, 1fr);
	}
	.teaching-steps {
		grid-template-columns: repeat(2, 1fr);
	}
	.lessons-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 700px) {
	.hub-hero-stats {
		grid-template-columns: 1fr 1fr;
	}
	.teaching-steps {
		grid-template-columns: 1fr;
	}
	.contrast-sound-cards,
	.minimal-pair-grid,
	.contrast-lesson-grid,
	.scope-grid {
		grid-template-columns: 1fr;
	}
	.minimal-pairs-page,
	.minimal-pairs-hub {
		padding-top: 24px;
	}
	.listening-lab {
		padding: 22px !important;
	}
	.quiz-choices {
		grid-template-columns: 1fr;
	}
	.pair-demo-card {
		flex-direction: column;
		gap: 12px;
	}
}

@media print {
	.listening-lab,
	.desktop-toc,
	.site-header,
	.site-footer,
	.contrast-filter-bar {
		display: none !important;
	}
	.minimal-pair-grid,
	.contrast-lesson-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
