:root {
	--rp-accent: #1479ff;
	--rp-secondary: #10a66a;
	--rp-bg: #f6f8fb;
	--rp-surface: #ffffff;
	--rp-text: #162033;
	--rp-muted: #637086;
	--rp-border: #dde5f0;
	--rp-danger: #d92d20;
	--rp-radius: 8px;
	--rp-shadow: 0 8px 24px rgba(15, 35, 70, 0.08);
}

body.rp-dark {
	--rp-bg: #0d1117;
	--rp-surface: #151b23;
	--rp-text: #eef4ff;
	--rp-muted: #aab6c8;
	--rp-border: #293241;
	--rp-shadow: none;
	background: var(--rp-bg);
	color: var(--rp-text);
}

.rp-card-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.rp-card {
	background: var(--rp-surface);
	border: 1px solid var(--rp-border);
	border-radius: var(--rp-radius);
	box-shadow: var(--rp-shadow);
	color: var(--rp-text);
	overflow: hidden;
	text-decoration: none;
}

.rp-card a {
	color: inherit;
	display: block;
	height: 100%;
	text-decoration: none;
}

.rp-exam-card {
	align-items: center;
	display: flex;
	gap: 12px;
	min-height: 82px;
	padding: 16px;
}

.rp-card-icon {
	align-items: center;
	background: color-mix(in srgb, var(--rp-accent) 12%, transparent);
	border-radius: 8px;
	color: var(--rp-accent);
	display: inline-flex;
	font-weight: 800;
	height: 42px;
	justify-content: center;
	width: 42px;
}

.rp-exam-card strong,
.rp-content-card h3 {
	display: block;
	font-size: 1rem;
	line-height: 1.35;
	margin: 0 0 4px;
}

.rp-exam-card small,
.rp-content-card small,
.rp-card-badge {
	color: var(--rp-muted);
	font-size: 0.82rem;
}

.rp-content-card {
	padding: 0;
}

.rp-content-card img {
	aspect-ratio: 16 / 9;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.rp-content-card a {
	padding: 14px;
}

.rp-content-card img + .rp-card-badge {
	margin-top: 12px;
}

.rp-card-badge {
	background: color-mix(in srgb, var(--rp-secondary) 12%, transparent);
	border-radius: 999px;
	color: var(--rp-secondary);
	display: inline-block;
	font-weight: 700;
	margin-bottom: 8px;
	padding: 4px 9px;
}

.rp-search-form {
	background: var(--rp-surface);
	border: 1px solid var(--rp-border);
	border-radius: 12px;
	box-shadow: var(--rp-shadow);
	display: flex;
	gap: 8px;
	padding: 8px;
}

.rp-search-form input {
	background: transparent;
	border: 0;
	color: var(--rp-text);
	flex: 1;
	font-size: 1rem;
	min-width: 0;
	outline: 0;
	padding: 12px;
}

.rp-search-form button,
.rp-btn {
	align-items: center;
	background: var(--rp-accent);
	border: 0;
	border-radius: 8px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-weight: 800;
	justify-content: center;
	line-height: 1.2;
	min-height: 44px;
	padding: 12px 16px;
	text-decoration: none;
}

.rp-btn:hover,
.rp-btn:focus {
	color: #fff;
	filter: brightness(0.96);
}

.rp-btn-large {
	font-size: 1rem;
	min-height: 52px;
	width: 100%;
}

.rp-btn-danger {
	background: var(--rp-danger);
}

.rp-test-start-card,
.rp-result-panel,
.rp-quiz-shell,
.rp-aff-banner,
.rp-ad-slot {
	background: var(--rp-surface);
	border: 1px solid var(--rp-border);
	border-radius: var(--rp-radius);
	box-shadow: var(--rp-shadow);
	color: var(--rp-text);
	margin: 18px 0;
	padding: 18px;
}

.rp-test-stats {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 16px 0;
}

.rp-test-stats span {
	background: var(--rp-bg);
	border-radius: 8px;
	color: var(--rp-muted);
	padding: 12px;
}

.rp-test-stats strong {
	color: var(--rp-text);
	display: block;
	font-size: 1.25rem;
}

.rp-quiz-topbar {
	align-items: center;
	border-bottom: 1px solid var(--rp-border);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin: -18px -18px 16px;
	padding: 14px 18px;
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--rp-surface);
}

.rp-quiz-topbar span {
	color: var(--rp-muted);
	display: block;
	font-size: 0.82rem;
}

.rp-timer {
	background: #fff3d6;
	border: 1px solid #ffd27a;
	border-radius: 8px;
	color: #8a4b00;
	font-weight: 900;
	min-width: 78px;
	padding: 9px 10px;
	text-align: center;
}

.rp-quiz-layout {
	display: grid;
	gap: 16px;
}

.rp-question-panel h2 {
	font-size: 1.1rem;
	margin: 0 0 12px;
}

.rp-question-image {
	border-radius: 8px;
	display: block;
	margin: 12px 0;
	max-width: 100%;
}

.rp-options {
	display: grid;
	gap: 10px;
	margin: 14px 0;
}

.rp-option {
	align-items: start;
	background: var(--rp-bg);
	border: 1px solid var(--rp-border);
	border-radius: 8px;
	cursor: pointer;
	display: grid;
	gap: 10px;
	grid-template-columns: 28px 1fr;
	padding: 12px;
}

.rp-option.is-selected {
	border-color: var(--rp-accent);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--rp-accent) 18%, transparent);
}

.rp-option-key {
	align-items: center;
	background: var(--rp-surface);
	border: 1px solid var(--rp-border);
	border-radius: 999px;
	display: inline-flex;
	font-weight: 900;
	height: 28px;
	justify-content: center;
	width: 28px;
}

.rp-question-map {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(5, 1fr);
}

.rp-map-btn {
	background: var(--rp-bg);
	border: 1px solid var(--rp-border);
	border-radius: 8px;
	color: var(--rp-text);
	cursor: pointer;
	font-weight: 800;
	min-height: 42px;
}

.rp-map-btn.is-current {
	border-color: var(--rp-accent);
	color: var(--rp-accent);
}

.rp-map-btn.is-answered {
	background: color-mix(in srgb, var(--rp-secondary) 15%, var(--rp-bg));
}

.rp-map-btn.is-review {
	background: #fff1d6;
	color: #8a4b00;
}

.rp-quiz-actions {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 16px;
}

.rp-result-stats {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 16px 0;
}

.rp-result-stats span {
	background: var(--rp-bg);
	border-radius: 8px;
	padding: 12px;
}

.rp-solution-item {
	border-top: 1px solid var(--rp-border);
	padding: 14px 0;
}

.rp-solution-item.correct {
	border-left: 4px solid var(--rp-secondary);
	padding-left: 12px;
}

.rp-solution-item.wrong {
	border-left: 4px solid var(--rp-danger);
	padding-left: 12px;
}

.rp-floating-actions {
	bottom: 78px;
	display: grid;
	gap: 9px;
	position: fixed;
	right: 14px;
	z-index: 999;
}

.rp-float-btn {
	align-items: center;
	background: var(--rp-surface);
	border: 1px solid var(--rp-border);
	border-radius: 999px;
	box-shadow: var(--rp-shadow);
	color: var(--rp-text);
	cursor: pointer;
	display: inline-flex;
	font-size: 0.82rem;
	font-weight: 900;
	height: 44px;
	justify-content: center;
	text-decoration: none;
	width: 44px;
}

.rp-wa-float {
	background: #20b15a;
	color: #fff;
}

.rp-back-top {
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	transition: 180ms ease;
}

.rp-back-top.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.rp-aff-popup {
	background: rgba(10, 20, 35, 0.36);
	bottom: 0;
	display: grid;
	left: 0;
	padding: 18px;
	place-items: end center;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 9999;
}

.rp-aff-popup[hidden] {
	display: none;
}

.rp-aff-popup-card {
	background: var(--rp-surface);
	border-radius: 8px;
	box-shadow: 0 20px 70px rgba(0, 0, 0, 0.24);
	color: var(--rp-text);
	max-width: 420px;
	padding: 18px;
	position: relative;
	width: min(100%, 420px);
}

.rp-aff-popup-card img,
.rp-aff-banner img {
	border-radius: 8px;
	display: block;
	height: auto;
	max-width: 100%;
}

.rp-aff-close {
	background: var(--rp-text);
	border: 0;
	border-radius: 999px;
	color: var(--rp-surface);
	cursor: pointer;
	font-size: 20px;
	height: 34px;
	position: absolute;
	right: 10px;
	top: 10px;
	width: 34px;
}

.rp-aff-banner {
	align-items: center;
	display: grid;
	gap: 14px;
}

.rp-push-prompt {
	align-items: center;
	background: var(--rp-surface);
	border: 1px solid var(--rp-border);
	border-radius: 8px;
	bottom: 78px;
	box-shadow: var(--rp-shadow);
	color: var(--rp-text);
	display: grid;
	gap: 10px;
	grid-template-columns: minmax(0, 1fr) auto auto;
	left: 14px;
	max-width: 520px;
	padding: 12px;
	position: fixed;
	right: 14px;
	z-index: 998;
}

.rp-push-prompt[hidden] {
	display: none;
}

.rp-push-prompt span {
	color: var(--rp-muted);
	display: block;
	font-size: 0.86rem;
}

.rp-push-allow,
.rp-push-close {
	background: var(--rp-accent);
	border: 0;
	border-radius: 8px;
	color: #fff;
	cursor: pointer;
	font-weight: 800;
	min-height: 38px;
	padding: 8px 12px;
}

.rp-push-close {
	background: var(--rp-bg);
	color: var(--rp-text);
	width: 38px;
}

.rp-ad-slot {
	align-items: center;
	box-shadow: none;
	display: flex;
	justify-content: center;
	min-height: 90px;
	overflow: hidden;
	text-align: center;
}

.rp-ad-empty {
	background: repeating-linear-gradient(45deg, var(--rp-bg), var(--rp-bg) 10px, var(--rp-surface) 10px, var(--rp-surface) 20px);
	color: var(--rp-muted);
	font-size: 0.82rem;
	font-weight: 800;
	text-transform: uppercase;
}

.rp-notice,
.rp-empty {
	background: var(--rp-bg);
	border: 1px solid var(--rp-border);
	border-radius: 8px;
	color: var(--rp-muted);
	padding: 14px;
}

@media (min-width: 700px) {
	.rp-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rp-quiz-layout {
		grid-template-columns: minmax(0, 1fr) 230px;
	}

	.rp-question-map {
		align-self: start;
		grid-template-columns: repeat(5, 1fr);
		position: sticky;
		top: 84px;
	}

	.rp-quiz-actions {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rp-test-stats,
	.rp-result-stats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rp-aff-banner {
		grid-template-columns: 180px 1fr auto;
	}
}

@media (min-width: 1024px) {
	.rp-card-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
