/*
Theme Name: Trac Nghiem Vui
Theme URI: https://tracnghiemvui.com
Template: generatepress
Author: Trac Nghiem Vui
Description: Child theme for tracnghiemvui.com, optimized for English quiz archives and quiz detail pages.
Version: 1.0.0
Text Domain: tracnghiemvui
*/

:root {
	--tnv-blue: #2563eb;
	--tnv-blue-700: #1d4ed8;
	--tnv-blue-50: #eff6ff;
	--tnv-ink: #0f172a;
	--tnv-muted: #64748b;
	--tnv-soft: #f8fafc;
	--tnv-panel: #ffffff;
	--tnv-border: #dbe3ef;
	--tnv-green: #16a34a;
	--tnv-green-50: #ecfdf3;
	--tnv-red: #dc2626;
	--tnv-red-50: #fef2f2;
	--tnv-amber: #f59e0b;
	--tnv-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
	--tnv-radius: 8px;
}

body {
	background: var(--tnv-soft);
	color: var(--tnv-ink);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.65;
}

a {
	color: var(--tnv-blue);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.site-header,
.main-navigation,
.main-navigation ul ul {
	background: var(--tnv-panel) !important;
}

.site-header {
	border-bottom: 1px solid var(--tnv-border);
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.tnv-stat-panel{
	display: none !important;
}
p.tnv-card-excerpt {
    display: none !important;
}

.inside-header {
	padding: 16px 28px;
}

.site-title a,
.main-title a {
	color: var(--tnv-blue) !important;
	font-weight: 800;
	letter-spacing: 0;
}
.tnv-stat-panel {
    display: none;
}
.site-description {
	color: var(--tnv-muted);
}

.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items a {
	color: var(--tnv-ink) !important;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 44px;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	background: var(--tnv-blue-50) !important;
	color: var(--tnv-blue) !important;
}

.main-navigation ul ul {
	border: 1px solid var(--tnv-border);
	border-radius: var(--tnv-radius);
	box-shadow: var(--tnv-shadow);
	overflow: hidden;
}

.site-content,
#content,
.inside-article {
	background: transparent;
}

.tnv-container {
	width: min(1180px, calc(100% - 32px));
	margin: 0 auto;
}

.tnv-page {
	padding: 34px 0 70px;
}

.tnv-archive-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 28px;
	align-items: end;
	margin-bottom: 24px;
}

.tnv-eyebrow {
	display: inline-flex;
	align-items: center;
	border: 1px solid #bfdbfe;
	border-radius: 999px;
	background: var(--tnv-blue-50);
	color: var(--tnv-blue);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1;
	padding: 7px 11px;
	text-transform: uppercase;
}

.tnv-archive-title,
.tnv-single-title {
	color: var(--tnv-ink);
	font-size: clamp(28px, 4vw, 46px);
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1.12;
	margin: 12px 0 10px;
}

.tnv-archive-desc,
.tnv-single-desc {
	color: var(--tnv-muted);
	font-size: 16px;
	margin: 0;
	max-width: 720px;
}

.tnv-filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.tnv-chip {
	align-items: center;
	background: var(--tnv-panel);
	border: 1px solid var(--tnv-border);
	border-radius: 999px;
	color: var(--tnv-muted);
	display: inline-flex;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	min-height: 34px;
	padding: 0 12px;
	text-decoration: none;
}

.tnv-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tnv-card {
	background: var(--tnv-panel);
	border: 1px solid var(--tnv-border);
	border-radius: var(--tnv-radius);
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
	display: flex;
	flex-direction: column;
	min-height: 260px;
	overflow: hidden;
	transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tnv-card:hover {
	border-color: #93c5fd;
	box-shadow: var(--tnv-shadow);
	transform: translateY(-2px);
}

.tnv-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px;
}

.tnv-card-top {
	align-items: center;
	display: flex;
	gap: 8px;
	justify-content: space-between;
	margin-bottom: 12px;
}

.tnv-badge,
.tnv-level {
	border-radius: 999px;
	display: inline-flex;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	max-width: 100%;
	padding: 6px 9px;
}

.tnv-badge {
	background: var(--tnv-blue-50);
	color: var(--tnv-blue);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tnv-level {
	background: #fef3c7;
	color: #92400e;
	flex: 0 0 auto;
}

.tnv-card-title {
	font-size: 18px;
	font-weight: 800;
	line-height: 1.35;
	margin: 0 0 10px;
}

.tnv-card-title a {
	color: var(--tnv-ink);
	text-decoration: none;
}

.tnv-card-title a:hover {
	color: var(--tnv-blue);
}

.tnv-card-excerpt {
	color: var(--tnv-muted);
	font-size: 14px;
	line-height: 1.55;
	margin: 0 0 16px;
}

.tnv-meta-grid {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: auto;
}

.tnv-meta {
	background: var(--tnv-soft);
	border: 1px solid #e8eef7;
	border-radius: var(--tnv-radius);
	color: var(--tnv-muted);
	display: flex;
	flex-direction: column;
	font-size: 12px;
	font-weight: 700;
	gap: 2px;
	min-width: 0;
	padding: 9px;
}

.tnv-meta strong {
	color: var(--tnv-ink);
	font-size: 14px;
	font-weight: 800;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tnv-card-action {
	align-items: center;
	background: var(--tnv-blue);
	color: #fff !important;
	display: flex;
	font-weight: 800;
	justify-content: space-between;
	padding: 13px 18px;
	text-decoration: none;
}

.tnv-card-action:hover {
	background: var(--tnv-blue-700);
	color: #fff !important;
}

.tnv-pager {
	display: flex;
	justify-content: center;
	margin-top: 34px;
}

.tnv-pager .page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tnv-pager .page-numbers a,
.tnv-pager .page-numbers span {
	align-items: center;
	background: var(--tnv-panel);
	border: 1px solid var(--tnv-border);
	border-radius: var(--tnv-radius);
	color: var(--tnv-ink);
	display: inline-flex;
	font-size: 14px;
	font-weight: 800;
	height: 38px;
	justify-content: center;
	min-width: 38px;
	padding: 0 10px;
	text-decoration: none;
}

.tnv-pager .page-numbers .current,
.tnv-pager .page-numbers a:hover {
	background: var(--tnv-blue);
	border-color: var(--tnv-blue);
	color: #fff;
}

.tnv-single-hero {
	background: linear-gradient(135deg, #eef6ff 0%, #ffffff 70%);
	border-bottom: 1px solid var(--tnv-border);
	padding: 34px 0;
}

.tnv-single-hero-inner {
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr) 320px;
}

.tnv-stat-panel {
	background: var(--tnv-panel);
	border: 1px solid var(--tnv-border);
	border-radius: var(--tnv-radius);
	box-shadow: var(--tnv-shadow);
	display: grid;
	gap: 10px;
	padding: 16px;
}

.tnv-stat {
	align-items: center;
	background: var(--tnv-soft);
	border: 1px solid #e8eef7;
	border-radius: var(--tnv-radius);
	display: flex;
	justify-content: space-between;
	padding: 10px 12px;
}

.tnv-stat span {
	color: var(--tnv-muted);
	font-size: 13px;
	font-weight: 700;
}

.tnv-stat strong {
	color: var(--tnv-ink);
	font-size: 15px;
	font-weight: 800;
}

.tnv-quiz-layout {
	display: grid;
	gap: 22px;
	grid-template-columns: minmax(0, 1fr) 300px;
	padding-top: 28px;
}

.tnv-quiz-card {
	background: var(--tnv-panel);
	border: 1px solid var(--tnv-border);
	border-radius: var(--tnv-radius);
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
	padding: 28px;
}

.tnv-quiz-card .entry-content {
	margin-top: 0;
}

.tnv-quiz-card h2,
.tnv-quiz-card h3 {
	color: var(--tnv-ink);
	font-weight: 800;
	letter-spacing: 0;
}

.tnv-quiz-card h2 {
	border-bottom: 1px solid var(--tnv-border);
	font-size: 24px;
	line-height: 1.25;
	margin: 34px 0 16px;
	padding-bottom: 10px;
}

.tnv-quiz-card h3 {
	font-size: 19px;
	margin: 26px 0 12px;
}

.tnv-quiz-card p,
.tnv-quiz-card li {
	color: #334155;
}

.tnv-quiz-card ul,
.tnv-quiz-card ol {
	margin-left: 1.35em;
}

.tnv-quiz-card table {
	border-collapse: collapse;
	font-size: 15px;
	width: 100%;
}

.tnv-quiz-card th,
.tnv-quiz-card td {
	border: 1px solid var(--tnv-border);
	padding: 10px 12px;
}

.tnv-quiz-card th {
	background: var(--tnv-blue-50);
	color: var(--tnv-ink);
	font-weight: 800;
}

.quiz-body .quiz-card,
.quiz-body .quiz-question,
.quiz-question {
	background: var(--tnv-soft);
	border: 1px solid var(--tnv-border);
	border-radius: var(--tnv-radius);
	margin: 18px 0;
	padding: 18px;
}

.quiz-body .quiz-question__number,
.quiz-question__number {
	align-items: center;
	background: var(--tnv-blue);
	border-radius: 999px;
	color: #fff;
	display: inline-flex;
	font-size: 12px;
	font-weight: 800;
	height: 26px;
	justify-content: center;
	margin-right: 8px;
	width: 26px;
}

.quiz-body .quiz-question__text,
.quiz-question__text {
	color: var(--tnv-ink);
	font-weight: 800;
}

.quiz-body .quiz-options,
.quiz-options {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
}

.quiz-body .quiz-options li,
.quiz-options li {
	align-items: center;
	background: #fff;
	border: 1px solid var(--tnv-border);
	border-radius: var(--tnv-radius);
	color: var(--tnv-ink);
	cursor: pointer;
	display: flex;
	font-weight: 700;
	gap: 9px;
	margin: 0;
	min-height: 44px;
	padding: 10px 12px;
	transition: background 0.16s ease, border-color 0.16s ease;
}

.quiz-body .quiz-options li:hover,
.quiz-options li:hover,
.quiz-body .quiz-options li.selected,
.quiz-options li.selected {
	background: var(--tnv-blue-50);
	border-color: #93c5fd;
}

.quiz-body .quiz-options li.correct,
.quiz-options li.correct {
	background: var(--tnv-green-50);
	border-color: #86efac;
	color: #166534;
}

.quiz-body .quiz-options li.wrong,
.quiz-options li.wrong {
	background: var(--tnv-red-50);
	border-color: #fecaca;
	color: #991b1b;
}

.option-letter,
.quiz-body .quiz-options li .option-letter {
	align-items: center;
	background: var(--tnv-soft);
	border: 1px solid var(--tnv-border);
	border-radius: 999px;
	color: var(--tnv-muted);
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 900;
	height: 24px;
	justify-content: center;
	width: 24px;
}

.quiz-options li.correct .option-letter,
.quiz-body .quiz-options li.correct .option-letter {
	background: var(--tnv-green);
	border-color: var(--tnv-green);
	color: #fff;
}

.quiz-options li.wrong .option-letter,
.quiz-body .quiz-options li.wrong .option-letter {
	background: var(--tnv-red);
	border-color: var(--tnv-red);
	color: #fff;
}

.quiz-body .quiz-result,
.quiz-result {
	background: linear-gradient(135deg, var(--tnv-blue-50), #fff);
	border: 1px solid #bfdbfe;
	border-radius: var(--tnv-radius);
	margin: 22px 0;
	padding: 24px;
	text-align: center;
}

.quiz-body .quiz-result__score,
.quiz-result__score {
	color: var(--tnv-blue);
	font-size: 56px;
	font-weight: 900;
	line-height: 1;
}

.tnv-study-panel {
	align-self: start;
	background: var(--tnv-panel);
	border: 1px solid var(--tnv-border);
	border-radius: var(--tnv-radius);
	box-shadow: var(--tnv-shadow);
	padding: 18px;
	position: sticky;
	top: 20px;
}

.tnv-study-panel h2 {
	color: var(--tnv-ink);
	font-size: 16px;
	font-weight: 900;
	letter-spacing: 0;
	margin: 0 0 12px;
}

.tnv-study-list {
	display: grid;
	gap: 10px;
	margin: 0 0 16px;
}

.tnv-study-item {
	align-items: center;
	border-bottom: 1px solid #edf2f7;
	display: flex;
	gap: 10px;
	padding-bottom: 10px;
}

.tnv-study-icon {
	align-items: center;
	background: var(--tnv-blue-50);
	border-radius: var(--tnv-radius);
	color: var(--tnv-blue);
	display: inline-flex;
	flex: 0 0 auto;
	font-weight: 900;
	height: 32px;
	justify-content: center;
	width: 32px;
}

.tnv-study-item span {
	color: var(--tnv-muted);
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

.tnv-study-item strong {
	color: var(--tnv-ink);
	display: block;
	font-size: 14px;
	font-weight: 900;
	line-height: 1.25;
}

.tnv-start-button,
.quiz-body .quiz-start-btn,
.quiz-body .quiz-cta__btn {
	align-items: center;
	background: var(--tnv-blue);
	border: 0;
	border-radius: var(--tnv-radius);
	color: #fff !important;
	cursor: pointer;
	display: inline-flex;
	font-size: 15px;
	font-weight: 900;
	justify-content: center;
	min-height: 44px;
	padding: 0 16px;
	text-decoration: none !important;
	width: 100%;
}

.tnv-start-button:hover,
.quiz-body .quiz-start-btn:hover,
.quiz-body .quiz-cta__btn:hover {
	background: var(--tnv-blue-700);
	color: #fff !important;
}

.tnv-post-nav {
	margin-top: 22px;
}

.tnv-empty {
	background: var(--tnv-panel);
	border: 1px solid var(--tnv-border);
	border-radius: var(--tnv-radius);
	box-shadow: var(--tnv-shadow);
	padding: 42px 24px;
	text-align: center;
}

.site-footer {
	background: #0f172a !important;
	color: #cbd5e1 !important;
}

.site-footer a {
	color: #bfdbfe !important;
}

@media (max-width: 980px) {
	.tnv-grid,
	.tnv-single-hero-inner,
	.tnv-quiz-layout {
		grid-template-columns: 1fr;
	}

	.tnv-study-panel {
		position: static;
	}
}

@media (max-width: 720px) {
	.inside-header {
		padding: 12px 16px;
	}

	.tnv-container {
		width: min(100% - 24px, 1180px);
	}

	.tnv-page {
		padding: 24px 0 52px;
	}

	.tnv-archive-hero {
		grid-template-columns: 1fr;
	}

	.tnv-filter-row {
		justify-content: flex-start;
	}

	.tnv-card {
		min-height: 0;
	}

	.tnv-meta-grid,
	.quiz-body .quiz-options,
	.quiz-options {
		grid-template-columns: 1fr;
	}

	.tnv-single-hero {
		padding: 26px 0;
	}

	.tnv-quiz-card {
		padding: 20px;
	}

	.tnv-archive-title,
	.tnv-single-title {
		font-size: 30px;
	}
}
