/* ============================================================
   ACESSABER PROVA ON-LINE — Elite Blue
   Tudo dentro do namespace #acessaber-prova para isolar do tema.
   Regras com #id triplo onde precisa derrotar !important do tema.
   ============================================================ */

#acessaber-prova {
	--b-900: #001230;
	--b-800: #00224d;
	--b-700: #003a82;
	--b-600: #0048a8;
	--b-500: #0057c2;
	--b-400: #0070e8;
	--b-300: #2e87ff;
	--b-200: #8cb8ff;
	--b-100: #d0e4ff;
	--b-50:  #eaf2ff;

	--teal: #00b89b;
	--teal-dark: #007a6e;
	--teal-bg: #e1f5ee;

	--amber: #ffb547;
	--amber-dark: #c47a00;
	--amber-bg: #fcf2e0;

	--coral: #ff5f6d;
	--coral-dark: #c73151;

	--t-900: #06112a;
	--t-700: #1e2d4a;
	--t-500: #4a5d7a;
	--t-300: #8095b0;
	--t-200: #b8c4d6;

	--s-0: #ffffff;
	--s-1: #f6f9ff;
	--s-2: #ecf2fc;
	--s-3: #dde7f7;

	--sh-xs: 0 1px 2px rgba(0,30,90,0.06);
	--sh-sm: 0 2px 8px rgba(0,30,90,0.08);
	--sh-md: 0 8px 24px rgba(0,30,90,0.10);
	--sh-lg: 0 16px 48px rgba(0,30,90,0.14);
	--sh-brand: 0 12px 32px rgba(0,87,194,0.25);

	--r-sm: 10px;
	--r-md: 14px;
	--r-lg: 20px;
	--r-xl: 28px;

	--g-brand: linear-gradient(135deg, #001a4d 0%, #0057c2 55%, #2e87ff 100%);
	--g-deep:  linear-gradient(160deg, #00163d 0%, #003680 100%);

	font-family: 'Raleway', sans-serif;
	color: var(--t-700);
	max-width: 760px;
	margin: 24px auto;
	padding: 0;
	line-height: 1.55;
}

#acessaber-prova *,
#acessaber-prova *::before,
#acessaber-prova *::after {
	box-sizing: border-box;
}

#acessaber-prova h1,
#acessaber-prova h2,
#acessaber-prova h3 {
	color: var(--t-900);
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0;
}

/* Card principal compartilhado pelas 3 fases */
.ap-card {
	background: var(--s-0);
	border-radius: var(--r-xl);
	box-shadow: var(--sh-sm);
	overflow: hidden;
}

/* ----------------------------------------------------------
   HEADER COMUM — usado nas 3 fases
   Triple-id para garantir que o tema não consiga sobrescrever
   ---------------------------------------------------------- */
#acessaber-prova .ap-header {
	background: var(--g-brand);
	color: #fff;
	padding: 28px 32px 24px;
	position: relative;
}
#acessaber-prova .ap-header::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 90% 0%, rgba(255,255,255,0.12) 0%, transparent 40%);
	pointer-events: none;
}
#acessaber-prova .ap-header,
#acessaber-prova .ap-header h2,
#acessaber-prova .ap-header p,
#acessaber-prova .ap-header .ap-eyebrow {
	color: #fff;
}
#acessaber-prova .ap-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.9;
	margin-bottom: 8px;
}
#acessaber-prova .ap-eyebrow::before {
	content: '';
	width: 6px;
	height: 6px;
	background: var(--teal);
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(0,184,155,0.25);
	flex-shrink: 0;
}
#acessaber-prova .ap-header h2 {
	color: #fff;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0;
}
#acessaber-prova .ap-header p {
	margin: 6px 0 0;
	opacity: 0.85;
	font-size: 14.5px;
	line-height: 1.5;
}

/* Aviso opcional acima do form de seleção */
.ap-alert {
	background: var(--amber-bg);
	color: var(--amber-dark);
	padding: 12px 32px;
	font-size: 13.5px;
	font-weight: 600;
	border-bottom: 1px solid var(--s-3);
}

/* ----------------------------------------------------------
   HEADER CLARO — usado APENAS na Fase 1 (Seleção)
   Estilo alinhado à homepage Elite Blue v3:
   fundo branco, título em Raleway 800, acento teal sutil,
   linha divisória entre header e formulário.
   Triple-id para garantir prioridade sobre o tema do WP.
   ---------------------------------------------------------- */
#acessaber-prova .ap-header-light {
	background: var(--s-0);
	padding: 36px 40px 28px;
	border-bottom: 1px solid var(--s-2);
	position: relative;
}
#acessaber-prova .ap-eyebrow-light {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--b-700);
	margin-bottom: 14px;
}
#acessaber-prova .ap-eyebrow-light::before {
	content: '';
	width: 6px;
	height: 6px;
	background: var(--teal);
	border-radius: 50%;
	box-shadow: 0 0 0 3px rgba(0,184,155,0.18);
	flex-shrink: 0;
}
#acessaber-prova .ap-header-light h2 {
	color: var(--t-900);
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.15;
	margin: 0 0 10px;
}
#acessaber-prova .ap-header-light p {
	color: var(--t-500);
	font-size: 15.5px;
	font-weight: 500;
	line-height: 1.5;
	margin: 0;
	max-width: 560px;
}

/* ----------------------------------------------------------
   FASE 1 — SELEÇÃO
   ---------------------------------------------------------- */
.ap-form { padding: 32px; }
.ap-field { margin-bottom: 22px; }
.ap-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--t-500);
	margin-bottom: 8px;
	letter-spacing: 0.02em;
}
.ap-select-wrap { position: relative; }
.ap-select-wrap::after {
	content: '';
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-65%) rotate(45deg);
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--b-500);
	border-bottom: 2px solid var(--b-500);
	pointer-events: none;
}
.ap-select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	padding: 14px 44px 14px 16px;
	font-family: inherit;
	font-size: 15.5px;
	font-weight: 500;
	color: var(--t-900);
	background: var(--s-1);
	border: 1.5px solid var(--s-3);
	border-radius: var(--r-md);
	cursor: pointer;
	transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.ap-select:hover {
	border-color: var(--b-300);
	background: var(--s-0);
}
.ap-select:focus {
	outline: none;
	border-color: var(--b-500);
	background: var(--s-0);
	box-shadow: 0 0 0 4px var(--b-50);
}
.ap-select:disabled {
	color: var(--t-300);
	cursor: not-allowed;
	background: var(--s-2);
}
.ap-select optgroup {
	font-weight: 700;
	color: var(--b-700);
	font-style: normal;
}
.ap-select option {
	font-weight: 500;
	padding: 8px;
}

.ap-mode-switch {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	background: var(--s-1);
	border: 1.5px solid var(--s-3);
	border-radius: var(--r-md);
	padding: 4px;
}
.ap-mode-switch input { display: none; }
.ap-mode-option {
	text-align: center;
	padding: 10px 12px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--t-500);
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.18s;
}
.ap-mode-option small {
	display: block;
	font-size: 11px;
	font-weight: 500;
	color: var(--t-300);
	margin-top: 2px;
	letter-spacing: 0;
}
.ap-mode-switch input:checked + .ap-mode-option {
	background: var(--b-500);
	color: #fff;
	box-shadow: var(--sh-brand);
}
.ap-mode-switch input:checked + .ap-mode-option small { color: rgba(255,255,255,0.85); }

.ap-counter {
	background: var(--b-50);
	color: var(--b-700);
	border-radius: var(--r-sm);
	padding: 10px 14px;
	font-size: 13.5px;
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.ap-counter strong {
	background: var(--b-500);
	color: #fff;
	font-weight: 700;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12.5px;
	letter-spacing: 0.02em;
}

.ap-cta {
	width: 100%;
	margin-top: 28px;
	padding: 18px 24px;
	border: none;
	border-radius: var(--r-md);
	background: var(--g-brand);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: var(--sh-brand);
	transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-decoration: none;
}
.ap-cta:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 18px 40px rgba(0,87,194,0.32);
}
.ap-cta:active:not(:disabled) { transform: translateY(0); }
.ap-cta svg { transition: transform 0.18s; }
.ap-cta:hover:not(:disabled) svg { transform: translateX(4px); }
.ap-cta:disabled {
	background: var(--s-3);
	color: var(--t-300);
	box-shadow: none;
	cursor: not-allowed;
	opacity: 0.7;
}

/* ----------------------------------------------------------
   FASE 2 — PROVA
   ---------------------------------------------------------- */
.ap-progress-wrap {
	background: var(--s-0);
	border-bottom: 1px solid var(--s-3);
}
.ap-progress-bar {
	height: 4px;
	background: var(--s-2);
	position: relative;
	overflow: hidden;
}
.ap-progress-fill {
	position: absolute;
	inset: 0 auto 0 0;
	background: linear-gradient(90deg, var(--b-500), var(--teal));
	transition: width 0.4s cubic-bezier(.2,.8,.2,1);
}
.ap-progress-meta {
	padding: 12px 32px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12.5px;
	color: var(--t-500);
	letter-spacing: 0.02em;
}
.ap-progress-meta strong { color: var(--t-900); font-weight: 700; }
.ap-progress-meta .pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--b-50);
	color: var(--b-700);
	padding: 4px 10px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 11.5px;
}

.ap-questions {
	padding: 28px 32px 8px;
}
.ap-question {
	margin-bottom: 28px;
	padding: 24px;
	background: var(--s-1);
	border-radius: var(--r-lg);
	border: 1px solid var(--s-2);
	transition: border-color 0.2s;
}
.ap-question:hover { border-color: var(--s-3); }
.ap-q-num {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	color: var(--b-500);
	letter-spacing: 0.06em;
	margin-bottom: 10px;
	padding: 0;
}
.ap-q-num::before {
	content: '';
	width: 24px;
	height: 2px;
	background: var(--b-500);
	border-radius: 2px;
}
.ap-q-text {
	font-size: 17px;
	font-weight: 600;
	color: var(--t-900);
	line-height: 1.5;
	margin-bottom: 18px;
}
.ap-alts {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ap-alt {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background: var(--s-0);
	border: 1.5px solid var(--s-3);
	border-radius: var(--r-md);
	cursor: pointer;
	transition: border-color 0.18s, background 0.18s, transform 0.1s;
	margin: 0;
}
.ap-alt:hover {
	border-color: var(--b-300);
	background: var(--b-50);
}
.ap-alt input { display: none; }
.ap-alt-letter {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--s-2);
	color: var(--b-700);
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.18s;
}
.ap-alt-text {
	flex: 1;
	font-size: 15.5px;
	font-weight: 500;
	color: var(--t-700);
	line-height: 1.45;
}
.ap-alt input:checked + .ap-alt-letter {
	background: var(--b-500);
	color: #fff;
	box-shadow: 0 0 0 4px var(--b-100);
}
.ap-alt:has(input:checked) {
	border-color: var(--b-500);
	background: var(--b-50);
}

/* Modo treino: feedback imediato */
.ap-question.is-locked {
	pointer-events: none;
	opacity: 1;
}
.ap-question.is-locked .ap-alt {
	cursor: default;
	background: var(--s-0);
}
.ap-question.is-locked .ap-alt.is-correct {
	background: var(--teal-bg);
	border-color: var(--teal);
}
.ap-question.is-locked .ap-alt.is-correct .ap-alt-letter {
	background: var(--teal);
	color: #fff;
}
.ap-question.is-locked .ap-alt.is-wrong {
	background: var(--amber-bg);
	border-color: var(--amber);
}
.ap-question.is-locked .ap-alt.is-wrong .ap-alt-letter {
	background: var(--amber-dark);
	color: #fff;
}

/* Variante CAIXA ALTA para 1º, 2º e 3º Fundamental */
#acessaber-prova.is-early-grade .ap-q-text,
#acessaber-prova.is-early-grade .ap-alt-text {
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
#acessaber-prova.is-early-grade .ap-q-text { font-size: 18px; }
#acessaber-prova.is-early-grade .ap-alt-text {
	font-size: 16px;
	font-weight: 600;
}

.ap-actions {
	padding: 8px 32px 32px;
	display: flex;
	gap: 12px;
}

/* ----------------------------------------------------------
   FASE 3 — RESULTADO (versão clara, alinhada com fases 1 e 2)
   ---------------------------------------------------------- */
#acessaber-prova .ap-result-header-light {
	background: var(--s-0);
	color: var(--t-700);
	padding: 36px 32px 32px;
	text-align: center;
	position: relative;
	border-bottom: 1px solid var(--s-2);
}
#acessaber-prova .ap-result-header-light h2,
#acessaber-prova .ap-result-header-light p {
	color: var(--t-700);
}

.ap-score {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 8px;
}
.ap-score-ring {
	width: 124px;
	height: 124px;
	margin-bottom: 14px;
}
.ap-score-ring circle {
	fill: none;
	stroke-width: 10;
}
/* Track (fundo do anel) — cinza-azul bem claro para fundo branco */
.ap-score-ring .track {
	stroke: var(--s-3);
}
/* Fill — teal forte se destaca bem em fundo claro */
.ap-score-ring .fill {
	stroke: var(--teal);
	stroke-linecap: round;
	transform: rotate(-90deg);
	transform-origin: center;
	transition: stroke-dasharray 1s cubic-bezier(.2,.8,.2,1);
}
.ap-score-num {
	position: absolute;
	top: 36px;
	left: 0;
	right: 0;
	text-align: center;
	color: var(--t-900);
	font-size: 38px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.025em;
}
.ap-score-num span {
	font-size: 16px;
	font-weight: 600;
	color: var(--t-300);
}
#acessaber-prova .ap-result-header-light h2 {
	color: var(--t-900);
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 6px 0 6px;
	position: relative;
}
#acessaber-prova .ap-result-header-light p {
	color: var(--t-500);
	margin: 0;
	font-size: 14.5px;
	font-weight: 500;
	position: relative;
}

.ap-legend {
	display: flex;
	justify-content: center;
	gap: 18px;
	padding: 16px;
	background: var(--s-1);
	border-bottom: 1px solid var(--s-3);
	font-size: 12.5px;
	color: var(--t-500);
	flex-wrap: wrap;
}
.ap-legend > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
}
.ap-legend .dot {
	width: 14px;
	height: 14px;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ap-legend .dot.ok { background: var(--teal-bg); color: var(--teal-dark); }
.ap-legend .dot.bad { background: var(--amber-bg); color: var(--amber-dark); }
.ap-legend .dot svg { width: 8px; height: 8px; }

.ap-result-questions { padding: 28px 32px 8px; }
.ap-r-question {
	margin-bottom: 22px;
	padding: 22px;
	background: var(--s-1);
	border-radius: var(--r-lg);
	border: 1px solid var(--s-2);
	opacity: 0;
	transform: translateY(8px);
	animation: ap-reveal 0.5s cubic-bezier(.2,.8,.2,1) forwards;
}
.ap-r-question .ap-q-num { color: var(--t-500); }
.ap-r-question .ap-q-num::before { background: var(--t-300); }
.ap-r-question.is-correct .ap-q-num::before { background: var(--teal); }
.ap-r-question.is-correct .ap-q-num { color: var(--teal-dark); }
.ap-r-question.is-wrong .ap-q-num::before { background: var(--amber-dark); }
.ap-r-question.is-wrong .ap-q-num { color: var(--amber-dark); }

.ap-r-alt {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	background: var(--s-0);
	border: 1.5px solid var(--s-3);
	border-radius: var(--r-md);
	margin-bottom: 8px;
}
.ap-r-alt .ap-alt-letter {
	width: 28px;
	height: 28px;
	font-size: 13px;
}
.ap-r-alt .ap-alt-text { font-size: 14.5px; }
.ap-r-alt.is-correct {
	background: var(--teal-bg);
	border-color: var(--teal);
}
.ap-r-alt.is-correct .ap-alt-letter {
	background: var(--teal);
	color: #fff;
}
.ap-r-alt.is-correct .ap-alt-text {
	color: var(--teal-dark);
	font-weight: 600;
}
.ap-r-alt.is-wrong {
	background: var(--amber-bg);
	border-color: var(--amber);
}
.ap-r-alt.is-wrong .ap-alt-letter {
	background: var(--amber-dark);
	color: #fff;
}
.ap-r-alt.is-wrong .ap-alt-text {
	color: var(--amber-dark);
	font-weight: 600;
	text-decoration: line-through;
	text-decoration-thickness: 1.5px;
	text-decoration-color: rgba(196,122,0,0.5);
}
.ap-r-badge {
	margin-left: auto;
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}
.ap-r-alt.is-correct .ap-r-badge { background: var(--teal); }
.ap-r-alt.is-wrong .ap-r-badge { background: var(--amber-dark); }
.ap-r-badge svg { width: 11px; height: 11px; }

@keyframes ap-reveal {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* CTAs contextuais — geram pageviews extras */
.ap-result-ctas {
	padding: 12px 32px 32px;
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr;
}
@media (min-width: 540px) {
	.ap-result-ctas {
		grid-template-columns: 1fr 1fr 1fr;
	}
}
.ap-cta-primary {
	width: 100%;
	padding: 16px;
	background: var(--g-brand);
	color: #fff;
	border: none;
	border-radius: var(--r-md);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: var(--sh-brand);
	transition: transform 0.18s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}
.ap-cta-primary:hover { transform: translateY(-2px); }
.ap-cta-tertiary {
	width: 100%;
	padding: 14px 12px;
	background: var(--s-0);
	color: var(--b-700);
	border: 1.5px solid var(--s-3);
	border-radius: var(--r-md);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.18s;
	text-align: center;
	line-height: 1.3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.ap-cta-tertiary:hover {
	border-color: var(--b-300);
	background: var(--b-50);
}
.ap-cta-tertiary small {
	display: block;
	font-size: 11px;
	font-weight: 500;
	color: var(--t-300);
	margin-top: 2px;
}

/* Acessibilidade — foco visível no teclado */
#acessaber-prova *:focus-visible {
	outline: 3px solid var(--b-300);
	outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	#acessaber-prova *,
	#acessaber-prova *::before,
	#acessaber-prova *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* Mobile */
@media (max-width: 540px) {
	#acessaber-prova {
		margin: 16px 12px;
	}
	#acessaber-prova .ap-header {
		padding: 22px 20px 20px;
	}
	#acessaber-prova .ap-header h2 { font-size: 21px; }
	#acessaber-prova .ap-header-light {
		padding: 28px 22px 22px;
	}
	#acessaber-prova .ap-header-light h2 { font-size: 24px; }
	#acessaber-prova .ap-header-light p { font-size: 14.5px; }
	.ap-form,
	.ap-questions,
	.ap-actions,
	.ap-result-questions,
	.ap-result-ctas {
		padding-left: 16px;
		padding-right: 16px;
	}
	.ap-progress-meta {
		padding-left: 16px;
		padding-right: 16px;
	}
	.ap-question,
	.ap-r-question { padding: 18px 16px; }
	.ap-q-text { font-size: 16px; }
	.ap-alt-text,
	.ap-r-alt .ap-alt-text { font-size: 14.5px; }
	#acessaber-prova .ap-result-header-light { padding: 28px 22px 26px; }
	#acessaber-prova .ap-result-header-light h2 { font-size: 20px; }
	.ap-score-ring {
		width: 108px;
		height: 108px;
	}
	.ap-score-num {
		top: 30px;
		font-size: 32px;
	}
}
