/*
 * /verificar/ — the mobile web app (templates/verificar.php).
 *
 * The only stylesheet on the page (inc/pwa.php prints nothing else), so it is
 * self-contained: its own tokens, system fonts (no font download, no swap
 * shift), mobile first from 320px. Tap targets are at least 48px, text meets
 * WCAG AA contrast on its background, and every panel that appears after load
 * does so in response to a tap.
 */

:root {
	color-scheme: only light;
	--vf-ink: #0a2540;
	--vf-muted: #3c4f63;
	--vf-line: #d5dde8;
	/* Form field borders: 3.6:1 against the page (WCAG 1.4.11 non-text contrast). */
	--vf-field-border: #7b8794;
	--vf-bg: #f6f9fc;
	--vf-card: #ffffff;
	--vf-brand: #635bff;
	--vf-brand-ink: #4b42e6;
	--vf-green: #00805f;
	--vf-amber: #8a5a00;
	--vf-red: #c4221a;
	--vf-gray: #4d5b6c;
	--vf-radius: 16px;
	--vf-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body.vf-body {
	margin: 0;
	background: var(--vf-bg);
	color: var(--vf-ink);
	font: 400 1.0625rem/1.55 var(--vf-font);
}

[hidden] {
	display: none !important;
}

.vf {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	max-width: 40rem;
	margin: 0 auto;
	padding: 0 max(1rem, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(1rem, env(safe-area-inset-left));
}

/* ---------------------------------------------------------------- bar ---- */

.vf-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	height: 4rem;
	padding-top: env(safe-area-inset-top);
	box-sizing: content-box;
}

.vf-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 48px;
	color: var(--vf-ink);
	font-weight: 800;
	font-size: 1.05rem;
	text-decoration: none;
}

.vf-brand__logo {
	width: 36px;
	height: 36px;
	flex: none;
}

.vf-install {
	min-height: 44px;
	padding: 0 1rem;
	border: 2px solid var(--vf-brand);
	border-radius: 999px;
	background: #fff;
	color: var(--vf-brand-ink);
	font: 700 0.95rem var(--vf-font);
	cursor: pointer;
}

/* -------------------------------------------------------------- panels ---- */

.vf-main {
	flex: 1;
	padding-bottom: 1.5rem;
}

.vf-panel:focus {
	outline: none;
}

.vf-title {
	margin: 0.5rem 0 0.5rem;
	font-size: clamp(1.55rem, 6.5vw, 2rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.vf-lead {
	margin: 0 0 1.25rem;
	color: var(--vf-muted);
}

.vf-h2 {
	margin: 1.5rem 0 0.6rem;
	font-size: 1.05rem;
}

.vf-note {
	margin: 0.75rem 0 0;
	color: var(--vf-muted);
	font-size: 0.95rem;
}

.vf-note--strong {
	color: var(--vf-ink);
	font-weight: 600;
}

.vf-note:empty {
	display: none;
}

.vf-nojs {
	margin: 1rem 0;
	padding: 1rem;
	border: 2px solid var(--vf-red);
	border-radius: var(--vf-radius);
	background: #fff;
	font-weight: 700;
}

/* ------------------------------------------------------------- compose ---- */

.vf-form {
	display: grid;
	gap: 0.75rem;
}

.vf-label {
	font-weight: 700;
}

.vf-textarea,
.vf-input {
	width: 100%;
	border: 2px solid var(--vf-field-border);
	border-radius: var(--vf-radius);
	background: var(--vf-card);
	color: var(--vf-ink);
	font: 400 1.0625rem/1.5 var(--vf-font);
}

.vf-textarea {
	min-height: 11rem;
	padding: 0.9rem 1rem;
	resize: vertical;
}

.vf-input {
	min-height: 48px;
	padding: 0 1rem;
}

.vf-textarea:focus,
.vf-input:focus {
	outline: none;
	border-color: var(--vf-brand);
	box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.25);
}

/* Reserved line: a hint appearing never pushes the buttons down. */
.vf-hint {
	min-height: 1.5em;
	margin: 0;
	color: var(--vf-ink);
	font-weight: 600;
	font-size: 0.95rem;
}

.vf-ocr {
	padding: 0.85rem 1rem;
	border-radius: var(--vf-radius);
	background: #eef0ff;
}

.vf-ocr__text {
	margin: 0 0 0.5rem;
	font-weight: 700;
}

.vf-ocr__bar {
	width: 100%;
	height: 0.6rem;
	accent-color: var(--vf-brand);
}

/* ------------------------------------------------------------- buttons ---- */

.vf-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0.75rem 1.25rem;
	border: 2px solid transparent;
	border-radius: 999px;
	font: 700 1.05rem/1.2 var(--vf-font);
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.vf-btn + .vf-btn {
	margin-top: 0.75rem;
}

.vf-btn--big {
	min-height: 60px;
	font-size: 1.2rem;
}

.vf-btn--primary {
	background: var(--vf-brand);
	color: #fff;
}

.vf-btn--primary:active {
	background: var(--vf-brand-ink);
}

.vf-btn--secondary {
	background: #fff;
	border-color: var(--vf-line);
	color: var(--vf-ink);
}

.vf-btn--ghost {
	background: transparent;
	border-color: var(--vf-line);
	color: var(--vf-muted);
}

.vf-btn--whatsapp {
	background: #0b7a43;
	color: #fff;
}

.vf-btn:disabled {
	opacity: 0.55;
	cursor: default;
}

.vf-btn:focus-visible,
.vf-install:focus-visible,
.vf-link:focus-visible,
.vf-keybox summary:focus-visible,
.vf-foot a:focus-visible,
.vf-brand:focus-visible,
.vf-source__link:focus-visible {
	outline: 3px solid var(--vf-brand);
	outline-offset: 3px;
}

.vf-link {
	display: block;
	width: 100%;
	min-height: 48px;
	margin-top: 0.5rem;
	border: 0;
	background: none;
	color: var(--vf-brand-ink);
	font: 700 1rem var(--vf-font);
	text-decoration: underline;
	cursor: pointer;
}

/* ------------------------------------------------------------ progress ---- */

.vf-progress {
	padding-top: 1.5rem;
	text-align: center;
}

.vf-spinner {
	width: 56px;
	height: 56px;
	margin: 0 auto 1rem;
	border: 5px solid #e3e1ff;
	border-top-color: var(--vf-brand);
	border-radius: 50%;
	animation: vf-spin 0.9s linear infinite;
}

@keyframes vf-spin {
	to {
		transform: rotate(360deg);
	}
}

.vf-stage {
	margin: 0 0 1rem;
	font-size: 1.2rem;
	font-weight: 800;
}

/* The heading is focused from script when the panel opens (screen readers
   announce it). Mouse users must not see an outline there; keyboard users do. */
.vf-stage:focus:not(:focus-visible) {
	outline: none;
}

.vf-stage:focus-visible {
	outline: 3px solid var(--vf-brand);
	outline-offset: 3px;
}

.vf-steps {
	display: grid;
	gap: 0.4rem;
	margin: 0 auto 1rem;
	padding: 0;
	max-width: 24rem;
	list-style: none;
	text-align: left;
}

.vf-steps li {
	position: relative;
	padding: 0.5rem 0.75rem 0.5rem 2.25rem;
	border-radius: 12px;
	color: var(--vf-muted);
}

.vf-steps li::before {
	content: "";
	position: absolute;
	left: 0.8rem;
	top: 50%;
	width: 0.7rem;
	height: 0.7rem;
	margin-top: -0.35rem;
	border: 2px solid var(--vf-line);
	border-radius: 50%;
}

.vf-steps li[data-state="active"] {
	background: #eef0ff;
	color: var(--vf-ink);
	font-weight: 700;
}

.vf-steps li[data-state="active"]::before {
	border-color: var(--vf-brand);
	background: var(--vf-brand);
}

.vf-steps li[data-state="done"] {
	color: var(--vf-ink);
}

.vf-steps li[data-state="done"]::before {
	border-color: var(--vf-green);
	background: var(--vf-green);
}

.vf-evidence {
	text-align: left;
}

/* ------------------------------------------------------------- sources ---- */

.vf-sources {
	display: grid;
	gap: 0.5rem;
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
}

.vf-source {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
}

/* A thin rule between consecutive sources so each one reads as its own item. */
.vf-source + .vf-source {
	padding-top: 0.5rem;
	border-top: 1px solid var(--vf-line);
}

/* "Verificador" tag and its rating share one row, above the link. */
.vf-source__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
}

.vf-source__link {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	color: var(--vf-brand-ink);
	font-weight: 600;
	overflow-wrap: anywhere;
}

.vf-source__badge,
.vf-source__rating {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 800;
}

.vf-source__badge {
	background: #e7f6ef;
	color: #006b50;
}

.vf-source__rating {
	background: #fdecea;
	color: var(--vf-red);
}

/* -------------------------------------------------------------- result ---- */

.vf-verdict {
	margin: 1rem 0 0.5rem;
	padding: 1rem 1.25rem;
	border-radius: var(--vf-radius);
	color: #fff;
	font-size: clamp(1.45rem, 6vw, 1.85rem);
	line-height: 1.2;
	text-align: center;
}

.vf-verdict[data-tone="green"],
.vf-chip[data-tone="green"] { background: var(--vf-green); }
.vf-verdict[data-tone="amber"],
.vf-chip[data-tone="amber"] { background: var(--vf-amber); }
.vf-verdict[data-tone="red"],
.vf-chip[data-tone="red"] { background: var(--vf-red); }
.vf-verdict[data-tone="gray"],
.vf-chip[data-tone="gray"] { background: var(--vf-gray); }

.vf-meta {
	margin: 0;
	color: var(--vf-muted);
	font-weight: 600;
	text-align: center;
}

.vf-scam {
	margin: 1rem 0 0;
	padding: 0.9rem 1rem;
	border: 2px solid var(--vf-red);
	border-radius: var(--vf-radius);
	background: #fff5f4;
}

/* Low risk is a subtle one-line note, never louder than the verdict above it. */
.vf-scam[data-risk="low"] {
	margin-top: 0.6rem;
	padding: 0.4rem 0.75rem;
	border: 0;
	border-left: 3px solid var(--vf-amber);
	border-radius: 0;
	background: transparent;
}

.vf-scam[data-risk="low"] .vf-scam__text {
	color: var(--vf-muted);
	font-size: 0.92rem;
	font-weight: 600;
}

.vf-scam__signals[hidden] {
	display: none;
}

.vf-scam__text {
	margin: 0;
	font-weight: 800;
}

.vf-scam__signals {
	margin: 0.4rem 0 0;
	padding-left: 1.2rem;
}

.vf-claims {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vf-claim {
	padding: 1rem;
	border: 1px solid var(--vf-line);
	border-radius: var(--vf-radius);
	background: var(--vf-card);
}

.vf-chip {
	display: inline-block;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 800;
}

.vf-claim__text {
	margin: 0.6rem 0 0.35rem;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.vf-claim__reason {
	margin: 0;
	color: var(--vf-muted);
}

.vf-claim__consulted {
	margin: 0.75rem 0 0;
	color: var(--vf-muted);
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.vf-share {
	margin: 1.5rem 0 0.75rem;
}

.vf-share__fallback {
	margin-top: 0.75rem;
}

/* ------------------------------------------------------------- problem ---- */

.vf-problem {
	padding-top: 1rem;
}

.vf-upsell {
	margin-bottom: 0.75rem;
}

.vf-referral {
	margin-top: 1rem;
	padding: 1rem;
	border-radius: var(--vf-radius);
	background: #eef0ff;
}

.vf-referral__link {
	display: block;
	margin: 0.5rem 0 0.75rem;
	color: var(--vf-brand-ink);
	font-weight: 700;
	overflow-wrap: anywhere;
}

/* --------------------------------------------------------------- extras --- */

.vf-quota {
	margin: 1.25rem 0 0;
	color: var(--vf-muted);
	font-weight: 600;
	text-align: center;
}

.vf-keybox {
	margin-top: 1.5rem;
	border-top: 1px solid var(--vf-line);
}

.vf-keybox summary {
	display: flex;
	align-items: center;
	min-height: 52px;
	color: var(--vf-brand-ink);
	font-weight: 700;
	cursor: pointer;
}

.vf-keyform {
	display: grid;
	gap: 0.6rem;
	padding-bottom: 0.5rem;
}

.vf-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem 1.25rem;
	padding: 1rem 0 1.5rem;
	border-top: 1px solid var(--vf-line);
}

.vf-foot a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--vf-muted);
	font-weight: 600;
}

@media (min-width: 40rem) {
	.vf-btn {
		width: auto;
		min-width: 16rem;
		margin-inline: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vf-spinner {
		animation-duration: 3s;
	}
}
