/**
 * Hindi Online Exam Pro — front-end styles.
 * Clean, professional "government exam portal" look. Mobile-first, minimal
 * animation during the examination.
 */

:root {
	--hoep-primary: #1e3a8a;
	--hoep-accent: #0e7490;
	--hoep-ink: #0f172a;
	--hoep-muted: #475569;
	--hoep-line: #e2e8f0;
	--hoep-bg: #eef2f7;
	--hoep-card: #ffffff;
	--hoep-green: #16a34a;
	--hoep-amber: #d97706;
	--hoep-red: #dc2626;
	--hoep-radius: 14px;
	--hoep-radius-sm: 10px;
	--hoep-font: "Hind", "Noto Sans Devanagari", "Nirmala UI", "Mangal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ------------------------------------------------------------------ *
 * Standalone page shell
 * ------------------------------------------------------------------ */
.hoep-standalone {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--hoep-bg);
	color: var(--hoep-ink);
	font-family: var(--hoep-font);
	-webkit-font-smoothing: antialiased;
}

.hoep-standalone__main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.hoep-page-footer {
	flex: none;
	text-align: center;
	padding: 10px 16px;
	font-size: 13px;
	letter-spacing: 0.02em;
	color: var(--hoep-muted);
	background: #fff;
	border-top: 1px solid var(--hoep-line);
}

/* ------------------------------------------------------------------ *
 * App + screens
 * ------------------------------------------------------------------ */
.hoep-app, .hoep-app * { box-sizing: border-box; }

.hoep-app {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	font-family: var(--hoep-font);
	color: var(--hoep-ink);
	line-height: 1.6;
}

.hoep-screen { display: none; }
.hoep-screen.is-active { display: flex; flex-direction: column; flex: 1 1 auto; animation: hoep-fade 0.25s ease both; }

@keyframes hoep-fade { from { opacity: 0; } to { opacity: 1; } }

.hoep-notice {
	max-width: 640px;
	margin: 24px auto;
	padding: 20px 24px;
	border-radius: var(--hoep-radius-sm);
	background: #fff7ed;
	color: #9a3412;
	border: 1px solid #fed7aa;
	font-family: var(--hoep-font);
	text-align: center;
}

/* ------------------------------------------------------------------ *
 * Intro screen
 * ------------------------------------------------------------------ */
.hoep-screen--intro { align-items: center; padding: 24px 16px; overflow-y: auto; }

.hoep-card { width: 100%; }

.hoep-intro {
	max-width: 960px;
	margin: 0 auto;
	background: var(--hoep-card);
	border: 1px solid var(--hoep-line);
	border-radius: var(--hoep-radius);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
	overflow: hidden;
}

.hoep-intro__head {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	padding: 22px 26px;
	background: linear-gradient(135deg, var(--hoep-primary), var(--hoep-accent));
	color: #fff;
}

.hoep-logo {
	width: 66px; height: 66px; flex: none;
	object-fit: contain; border-radius: 12px;
	background: #fff; padding: 6px;
}
.hoep-logo--placeholder { display: grid; place-items: center; font-size: 32px; background: rgba(255,255,255,0.15); }

.hoep-college { margin: 0 0 2px; font-size: 0.9rem; opacity: 0.9; }
.hoep-exam-title { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
.hoep-exam-meta { margin: 10px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.hoep-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 12px; border-radius: 999px;
	background: rgba(255,255,255,0.18); font-size: 0.85rem; font-weight: 600;
}

.hoep-intro__desc { margin: 0; padding: 18px 26px 0; color: var(--hoep-muted); }

.hoep-intro__grid { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 20px 26px; }

.hoep-panel {
	background: #f8fafc;
	border: 1px solid var(--hoep-line);
	border-radius: var(--hoep-radius-sm);
	padding: 18px;
}
.hoep-panel__title { margin: 0 0 14px; font-size: 1.05rem; font-weight: 700; color: var(--hoep-primary); }

.hoep-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hoep-rules li {
	position: relative; padding: 8px 10px 8px 32px;
	background: #fff; border: 1px solid var(--hoep-line); border-radius: 8px; font-size: 0.95rem;
}
.hoep-rules li::before {
	content: "✔"; position: absolute; left: 10px; top: 8px; color: var(--hoep-green); font-weight: 700;
}

.hoep-camera-note { margin: 0 0 12px; font-size: 0.88rem; color: var(--hoep-muted); }
.hoep-camera-preview {
	position: relative; width: 100%; aspect-ratio: 4 / 3;
	border-radius: 12px; overflow: hidden; background: #0b1220;
	border: 1px solid var(--hoep-line); margin-bottom: 12px;
}
.hoep-cam-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.hoep-camera-placeholder {
	position: absolute; inset: 0; display: grid; place-items: center; color: #94a3b8; font-size: 0.9rem;
	background: repeating-linear-gradient(45deg, #0b1220, #0b1220 12px, #111c30 12px, #111c30 24px);
}
.hoep-camera-preview.is-live .hoep-camera-placeholder { display: none; }
.hoep-cam-status {
	position: absolute; left: 8px; bottom: 8px; font-size: 0.75rem;
	padding: 3px 9px; border-radius: 999px; background: rgba(2,6,23,0.7); color: #fff;
}
.hoep-camera-preview.is-live .hoep-cam-status { background: var(--hoep-green); font-weight: 600; }

.hoep-panel--form { display: grid; gap: 14px; }
.hoep-field { display: grid; gap: 6px; }
.hoep-label { font-size: 0.9rem; font-weight: 600; color: var(--hoep-muted); }
.hoep-input {
	width: 100%; padding: 13px 16px; font-size: 1.05rem; font-family: var(--hoep-font);
	color: var(--hoep-ink); background: #fff; border: 1.5px solid var(--hoep-line);
	border-radius: 10px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.hoep-input:focus { border-color: var(--hoep-accent); box-shadow: 0 0 0 3px rgba(14,116,144,0.15); }

.hoep-declaration {
	display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
	background: #f8fafc; border: 1px dashed var(--hoep-line); border-radius: 10px; cursor: pointer; font-size: 0.95rem;
}
.hoep-declaration input { margin-top: 3px; width: 20px; height: 20px; flex: none; accent-color: var(--hoep-primary); cursor: pointer; }

.hoep-intro__foot { display: grid; gap: 12px; justify-items: center; padding: 0 26px 26px; }
.hoep-error { margin: 0; color: var(--hoep-red); font-size: 0.95rem; min-height: 1.2em; text-align: center; }

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */
.hoep-btn {
	appearance: none; border: 1.5px solid transparent; font-family: var(--hoep-font);
	font-size: 1rem; font-weight: 600; padding: 12px 22px; border-radius: 10px;
	cursor: pointer; color: #fff; background: var(--hoep-primary);
	transition: background 0.15s, opacity 0.15s; user-select: none;
}
.hoep-btn:hover { background: #17307a; }
.hoep-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hoep-btn--lg { padding: 15px 40px; font-size: 1.1rem; }
.hoep-btn--primary { background: var(--hoep-primary); }
.hoep-btn--ghost { background: #fff; color: var(--hoep-primary); border-color: var(--hoep-primary); }
.hoep-btn--ghost:hover { background: #eff3ff; }
.hoep-btn--nav { background: #fff; color: var(--hoep-primary); border-color: #cbd5e1; }
.hoep-btn--nav:hover { background: #f1f5f9; }
.hoep-btn--nav.hoep-btn--primary { background: var(--hoep-primary); color: #fff; border-color: var(--hoep-primary); }
.hoep-btn--nav.hoep-btn--primary:hover { background: #17307a; }
.hoep-btn--submit { background: var(--hoep-green); }
.hoep-btn--submit:hover { background: #15803d; }

/* ------------------------------------------------------------------ *
 * Exam screen
 * ------------------------------------------------------------------ */
.hoep-exam-bar {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; gap: 12px;
	padding: 10px clamp(12px, 3vw, 24px);
	background: var(--hoep-primary); color: #fff;
	box-shadow: 0 2px 10px rgba(15,23,42,0.15);
}
.hoep-exam-bar__brand { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.hoep-bar-logo { height: 34px; width: auto; border-radius: 6px; background: #fff; padding: 3px; flex: none; }
.hoep-exam-bar__title { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hoep-exam-bar__counter {
	flex: none; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums;
	background: rgba(255,255,255,0.16); padding: 6px 16px; border-radius: 999px;
}

.hoep-exam-bar__right { flex: none; display: flex; align-items: center; gap: 12px; }

.hoep-timer {
	display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.15;
	background: rgba(255,255,255,0.16); padding: 6px 14px; border-radius: 10px;
}
.hoep-timer__label { font-size: 0.65rem; opacity: 0.85; }
.hoep-timer__value { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.hoep-timer.is-warning { background: var(--hoep-amber); }
.hoep-timer.is-danger { background: var(--hoep-red); animation: hoep-pulse 1s infinite; }

@keyframes hoep-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.75; } }

/* Camera preview — top-right throughout the exam */
.hoep-cam-mini {
	position: relative; width: 96px; height: 72px; flex: none;
	border-radius: 10px; overflow: hidden; background: #0b1220; border: 2px solid #fff;
}
.hoep-cam-badge {
	position: absolute; top: 4px; left: 4px; display: inline-flex; align-items: center; gap: 4px;
	background: rgba(220,38,38,0.92); color: #fff; font-size: 0.6rem; font-weight: 800;
	letter-spacing: 0.06em; padding: 2px 6px; border-radius: 5px;
}
.hoep-cam-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: hoep-pulse 1.2s infinite; }
.hoep-cam-caption { margin: 0; padding: 4px 24px; text-align: right; font-size: 0.72rem; color: var(--hoep-muted); background: #fff; border-bottom: 1px solid var(--hoep-line); }

.hoep-question-area {
	flex: 1 1 auto; width: 100%; max-width: 900px; margin: 0 auto;
	padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 24px);
	overflow-y: auto;
}

.hoep-question-text {
	font-size: clamp(1.15rem, 2.4vw, 1.45rem); font-weight: 600; line-height: 1.7;
	margin-bottom: 20px; color: var(--hoep-ink);
}
.hoep-question-image { margin-bottom: 18px; }
.hoep-question-image img { max-width: 100%; border-radius: 10px; border: 1px solid var(--hoep-line); }

.hoep-options { display: grid; gap: 12px; }
.hoep-option {
	display: flex; align-items: center; gap: 14px;
	padding: 15px 18px; border-radius: 12px;
	background: #fff; border: 2px solid var(--hoep-line); cursor: pointer;
	font-size: 1.05rem; transition: border-color 0.12s, background 0.12s;
}
.hoep-option:hover { border-color: var(--hoep-accent); background: #f8fafc; }
.hoep-option__key {
	width: 38px; height: 38px; flex: none; border-radius: 9px; display: grid; place-items: center;
	font-weight: 800; background: #eef2f7; color: var(--hoep-primary); border: 1px solid var(--hoep-line);
}
.hoep-option__text { flex: 1; }
.hoep-option__text img { max-width: 100%; border-radius: 8px; margin-top: 6px; }
.hoep-option.is-selected { background: #eef4ff; border-color: var(--hoep-primary); }
.hoep-option.is-selected .hoep-option__key { background: var(--hoep-primary); color: #fff; border-color: var(--hoep-primary); }

/* Bottom navigation (sticky, thumb-friendly) */
.hoep-nav {
	position: sticky; bottom: 0; z-index: 15;
	display: flex; align-items: center; gap: 12px;
	width: 100%; max-width: 900px; margin: 0 auto;
	padding: 14px clamp(14px, 3vw, 24px);
	background: #fff; border-top: 1px solid var(--hoep-line);
}
.hoep-nav .hoep-btn { flex: 1 1 auto; }
#hoep-next-btn, #hoep-submit-btn { flex: 2 1 auto; }

/* ------------------------------------------------------------------ *
 * Thank you
 * ------------------------------------------------------------------ */
.hoep-screen--thanks { align-items: center; justify-content: center; padding: 40px 16px; }
.hoep-thanks {
	max-width: 520px; margin: auto; text-align: center;
	background: var(--hoep-card); border: 1px solid var(--hoep-line);
	border-radius: var(--hoep-radius); box-shadow: 0 10px 30px rgba(15,23,42,0.08); padding: 40px 30px;
}
.hoep-thanks__check {
	width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
	font-size: 44px; color: #fff; background: var(--hoep-green);
}
.hoep-thanks--warn .hoep-thanks__check { background: var(--hoep-red); }
.hoep-thanks__title { font-size: clamp(1.2rem, 3vw, 1.6rem); margin: 0 0 10px; }
.hoep-thanks__note { color: var(--hoep-muted); margin: 0; }

/* ------------------------------------------------------------------ *
 * Overlay / toast / loader
 * ------------------------------------------------------------------ */
.hoep-overlay {
	position: fixed; inset: 0; z-index: 100000; display: none; place-items: center; padding: 20px;
	background: rgba(15,23,42,0.6);
}
.hoep-overlay.is-visible { display: grid; }
.hoep-overlay__box {
	max-width: 440px; width: 100%; border-radius: var(--hoep-radius); padding: 30px 26px; text-align: center;
	background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.hoep-overlay__icon { font-size: 42px; margin-bottom: 10px; }
.hoep-overlay__title { margin: 0 0 8px; font-size: 1.3rem; color: var(--hoep-ink); }
.hoep-overlay__msg { margin: 0 0 20px; color: var(--hoep-muted); }
.hoep-overlay__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.hoep-toast {
	position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%) translateY(120px);
	z-index: 100001; background: #0f172a; color: #fff; padding: 11px 20px; border-radius: 10px;
	font-size: 0.9rem; opacity: 0; transition: transform 0.25s, opacity 0.25s; pointer-events: none; max-width: 90vw;
}
.hoep-toast.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.hoep-toast.is-error { background: var(--hoep-red); }
.hoep-toast.is-success { background: var(--hoep-green); }

.hoep-loader {
	position: fixed; inset: 0; z-index: 100002; display: none; flex-direction: column;
	align-items: center; justify-content: center; gap: 16px; background: rgba(255,255,255,0.85);
}
.hoep-loader.is-visible { display: flex; }
.hoep-loader__spinner {
	width: 48px; height: 48px; border-radius: 50%;
	border: 5px solid #dbe2ec; border-top-color: var(--hoep-primary); animation: hoep-spin 0.8s linear infinite;
}
.hoep-loader__text { margin: 0; color: var(--hoep-ink); }
@keyframes hoep-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ *
 * Security lockdown
 * ------------------------------------------------------------------ */
.hoep-app.is-locked { -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; }
.hoep-app.is-locked .hoep-input { -webkit-user-select: text; user-select: text; }

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (min-width: 760px) {
	.hoep-intro__grid { grid-template-columns: 1.25fr 1fr; }
}

@media (max-width: 560px) {
	.hoep-exam-bar { flex-wrap: wrap; gap: 8px; }
	.hoep-exam-bar__brand { order: 1; flex: 1 1 auto; }
	.hoep-exam-bar__right { order: 2; }
	.hoep-exam-bar__counter { order: 3; flex: 1 1 100%; text-align: center; }
	.hoep-cam-mini { width: 70px; height: 52px; }
	.hoep-cam-caption { text-align: center; }
	.hoep-timer__value { font-size: 1rem; }
	.hoep-exam-bar__title { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ------------------------------------------------------------------ *
 * Officials (Principal / HOD) cards on the intro screen
 * ------------------------------------------------------------------ */
.hoep-officials {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	padding: 4px 26px 0;
}
.hoep-official {
	flex: 1 1 200px;
	max-width: 260px;
	background: #f8fafc;
	border: 1px solid var(--hoep-line);
	border-radius: var(--hoep-radius-sm);
	padding: 16px;
	text-align: center;
}
.hoep-official__photo {
	width: 84px;
	height: 84px;
	margin: 0 auto 10px;
	border-radius: 50%;
	background: #e2e8f0 center/cover no-repeat;
	border: 3px solid var(--hoep-primary);
}
.hoep-official__photo:not(.is-set)::after {
	content: "👤";
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-size: 34px;
	color: #94a3b8;
}
.hoep-official__name { font-weight: 700; font-size: 1rem; color: var(--hoep-ink); }
.hoep-official__role { font-size: 0.85rem; color: var(--hoep-muted); margin-top: 2px; }

/* ------------------------------------------------------------------ *
 * Candidate photo upload (intro)
 * ------------------------------------------------------------------ */
.hoep-photo-upload { display: flex; align-items: center; gap: 14px; }
.hoep-photo-preview {
	width: 74px;
	height: 88px;
	flex: none;
	border-radius: 8px;
	background: #eef2f7 center/cover no-repeat;
	border: 2px dashed var(--hoep-line);
}
.hoep-photo-preview.is-set { border-style: solid; border-color: var(--hoep-primary); }
.hoep-photo-input { flex: 1; display: grid; gap: 6px; }
.hoep-photo-input input[type="file"] { font-size: 0.9rem; color: var(--hoep-ink); }
.hoep-photo-hint { font-size: 0.78rem; color: var(--hoep-muted); }

/* ------------------------------------------------------------------ *
 * Result card
 * ------------------------------------------------------------------ */
.hoep-result {
	max-width: 480px;
	margin: auto;
	text-align: center;
	background: var(--hoep-card);
	border: 1px solid var(--hoep-line);
	border-top: 6px solid var(--hoep-primary);
	border-radius: var(--hoep-radius);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
	padding: 34px 30px;
}
.hoep-result.is-pass { border-top-color: var(--hoep-green); }
.hoep-result.is-fail { border-top-color: var(--hoep-red); }
.hoep-result.is-terminated { border-top-color: var(--hoep-amber); }
.hoep-result__title { font-size: 1.35rem; margin: 0 0 18px; color: var(--hoep-ink); }
.hoep-result__photo {
	width: 110px;
	height: 130px;
	margin: 0 auto 14px;
	border-radius: 8px;
	background: #eef2f7 center/cover no-repeat;
	border: 3px solid var(--hoep-primary);
}
.hoep-result__photo:not(.is-set)::after {
	content: "👤";
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-size: 46px;
	color: #94a3b8;
}
.hoep-result__name { font-size: 1.3rem; font-weight: 800; color: var(--hoep-ink); }
.hoep-result__pct { font-size: 1.05rem; color: var(--hoep-muted); margin-top: 6px; }
.hoep-result__status {
	display: inline-block;
	margin-top: 14px;
	padding: 8px 26px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 1.15rem;
	color: #fff;
	background: var(--hoep-primary);
}
.hoep-result.is-pass .hoep-result__status { background: var(--hoep-green); }
.hoep-result.is-fail .hoep-result__status { background: var(--hoep-red); }
.hoep-result.is-terminated .hoep-result__status { background: var(--hoep-amber); }
.hoep-result__note { color: var(--hoep-muted); margin: 14px 0 0; }
.hoep-result__actions { margin-top: 20px; display: flex; justify-content: center; }

/* ================================================================== *
 * Final revision: photo fit, bigger hero, drag&drop, result, review
 * ================================================================== */

/* ---- Bigger, more premium hero ---- */
.hoep-intro__head { padding: 30px 30px; gap: 20px; }
.hoep-logo { width: 84px; height: 84px; }
/* Three-tier institution hierarchy: university (small) < institution (medium) < college (largest, main heading). */
.hoep-university { margin: 0; font-size: clamp(0.72rem, 1.6vw, 0.86rem); font-weight: 500; opacity: 0.85; line-height: 1.35; }
.hoep-institution { margin: 3px 0 0; font-size: clamp(0.95rem, 2.2vw, 1.15rem); font-weight: 600; opacity: 0.96; line-height: 1.3; }
.hoep-college { margin: 5px 0 0; font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: 0.01em; line-height: 1.15; opacity: 1; }
.hoep-college-sub { margin: 3px 0 0; font-size: 0.9rem; opacity: 0.9; }
.hoep-exam-title { margin: 8px 0 0; font-size: clamp(1.15rem, 2.6vw, 1.55rem); font-weight: 700; opacity: 0.97; }
.hoep-welcome {
	margin: 0; padding: 16px 26px; font-size: 1.05rem; color: var(--hoep-ink);
	background: linear-gradient(90deg, rgba(30,58,138,0.06), transparent);
	border-left: 4px solid var(--hoep-primary);
}

/* ---- Officials: portrait framing, no head crop, fit modes ---- */
.hoep-official__photo {
	width: 108px; height: 128px; margin: 0 auto 10px;
	border-radius: 14px; border: 3px solid var(--hoep-primary);
	background-color: #eef2f7; background-repeat: no-repeat;
	background-position: top center; background-size: cover;
}
.hoep-official__photo.hoep-fit-fit { background-size: contain; background-position: center; background-color: #fff; }
.hoep-official__photo.hoep-fit-fill { background-size: cover; background-position: top center; }
.hoep-official__photo.hoep-fit-square { width: 118px; height: 118px; border-radius: 14px; background-size: cover; background-position: top center; }
.hoep-official__photo.hoep-fit-circle { width: 118px; height: 118px; border-radius: 50%; background-size: cover; background-position: top center; }
.hoep-official { max-width: 240px; }

/* ---- Registration drag & drop ---- */
.hoep-dropzone {
	position: relative; display: flex; align-items: center; gap: 16px;
	padding: 16px 18px; border: 2px dashed #cbd5e1; border-radius: 14px;
	background: #f8fafc; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.hoep-dropzone:hover { border-color: var(--hoep-accent); }
.hoep-dropzone.is-drag { border-color: var(--hoep-accent); background: #eef4ff; }
.hoep-dropzone.is-set { border-style: solid; border-color: var(--hoep-green); background: #f0fdf4; }
.hoep-dropzone__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.hoep-dropzone__text { display: flex; flex-direction: column; gap: 2px; }
.hoep-dropzone__icon { font-size: 26px; }
.hoep-dropzone__main { font-weight: 700; color: var(--hoep-ink); }
.hoep-dropzone .hoep-photo-preview {
	width: 74px; height: 88px; flex: none; border-radius: 8px;
	background: #eef2f7 top center/cover no-repeat; border: 2px solid #cbd5e1;
}
.hoep-dropzone .hoep-photo-preview.is-set { border-color: var(--hoep-green); }
.hoep-photo-tick {
	position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
	background: var(--hoep-green); color: #fff; display: grid; place-items: center; font-weight: 800;
	opacity: 0; transform: scale(0.5); transition: transform 0.2s, opacity 0.2s;
}
.hoep-photo-tick.is-visible { opacity: 1; transform: scale(1); }

/* ---- Result details grid + review ---- */
.hoep-result-wrap { width: 100%; max-width: 1180px; margin: auto; display: grid; gap: 18px; }
.hoep-result__grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px; margin-top: 18px; text-align: left;
}
.hoep-result__cell { background: #f8fafc; border: 1px solid var(--hoep-line); border-radius: 10px; padding: 10px 12px; }
.hoep-result__cell-l { display: block; font-size: 0.75rem; color: var(--hoep-muted); }
.hoep-result__cell-v { display: block; font-weight: 700; font-size: 1rem; margin-top: 2px; color: var(--hoep-ink); }

.hoep-review { text-align: left; }
.hoep-review__title { margin: 0 0 8px; color: var(--hoep-primary); }
.hoep-review__summary { font-weight: 700; margin-bottom: 12px; color: var(--hoep-ink); }
.hoep-review__list { display: grid; gap: 10px; max-height: 62vh; overflow: auto; padding-right: 4px; }
.hoep-rev-item { border: 1px solid var(--hoep-line); border-left: 4px solid #94a3b8; border-radius: 8px; padding: 10px 12px; }
.hoep-rev-item.is-right { border-left-color: var(--hoep-green); background: #f0fdf4; }
.hoep-rev-item.is-wrong { border-left-color: var(--hoep-red); background: #fef2f2; }
.hoep-rev-q { font-weight: 600; margin-bottom: 6px; color: var(--hoep-ink); }
.hoep-rev-a, .hoep-rev-c { font-size: 0.92rem; color: #334155; }

/* ---- Participation result state + certificate status + review meta ---- */
.hoep-result.is-participation { border-top-color: var(--hoep-primary); }
.hoep-result.is-participation .hoep-result__status { background: var(--hoep-primary); }
.hoep-result__certstatus { margin-top: 10px; font-weight: 700; color: var(--hoep-accent); }
.hoep-rev-meta { margin-top: 6px; font-size: 0.82rem; color: var(--hoep-muted); font-weight: 600; }

/* ------------------------------------------------------------------ *
 * Branded footer (configurable: photo + name + designation + link)
 * ------------------------------------------------------------------ */
.hoep-brand-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.hoep-bf-photo {
	flex: none;
	display: inline-block;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background-color: var(--hoep-bg);
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	border: 1px solid var(--hoep-line);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.hoep-bf-text {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	line-height: 1.25;
	text-align: left;
}

.hoep-bf-by {
	font-weight: 600;
	color: var(--hoep-ink);
	font-size: 13px;
}

.hoep-bf-desig {
	font-size: 11px;
	color: var(--hoep-muted);
	letter-spacing: 0.01em;
}

.hoep-bf-link {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--hoep-primary);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	text-decoration: none;
	transition: background 0.2s ease;
}

.hoep-bf-link:hover,
.hoep-bf-link:focus {
	background: var(--hoep-accent);
	color: #fff;
}

/* ------------------------------------------------------------------ *
 * Certificate preview (shown after the result card, before review)
 * ------------------------------------------------------------------ */
.hoep-cert-preview { text-align: center; }

.hoep-cert-preview__title {
	margin: 0 0 6px;
	font-size: clamp(1.3rem, 3vw, 1.8rem);
	font-weight: 800;
	color: var(--hoep-ink);
}

.hoep-cert-preview__note {
	margin: 0 0 14px;
	font-size: 0.92rem;
	color: var(--hoep-muted);
	line-height: 1.5;
}

.hoep-cert-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 10px;
}

.hoep-cert-status {
	min-height: 18px;
	margin-bottom: 10px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hoep-accent);
}

.hoep-cert-frame {
	width: 100%;
	overflow: auto;
	border-radius: var(--hoep-radius-sm);
	-webkit-overflow-scrolling: touch;
}

.hoep-cert-iframe {
	display: block;
	width: 100%;
	height: clamp(520px, 82vh, 920px);
	border: 1px solid var(--hoep-line);
	border-radius: var(--hoep-radius-sm);
	background: #4b4f56;
}

/* Certificate preview fallback (shown if the inline frame is blocked). */
.hoep-cert-fallback {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 220px;
	padding: 28px 20px;
	text-align: center;
	background: #f8fafc;
	border: 1px dashed var(--hoep-line);
	border-radius: var(--hoep-radius-sm);
}

.hoep-cert-fallback p {
	margin: 0;
	color: var(--hoep-muted);
	font-size: 0.95rem;
	line-height: 1.6;
	max-width: 460px;
}

/* Compact marks + percentage line inside the certificate section. */
.hoep-cert-summary {
	margin: 0 0 12px;
	font-size: clamp(1rem, 2.4vw, 1.2rem);
	font-weight: 800;
	color: var(--hoep-primary);
}
.hoep-cert-summary:empty { display: none; }
