/* Menstrual Portal — Hygiene Evaluator. Everything scoped under .mp-eval. */

.mp-eval {
	--mpe-brand: #8E2C4E;
	--mpe-brand-dark: #7A2542;
	--mpe-ink: #1A1A1A;
	--mpe-muted: #6E646A;
	--mpe-border: #F1E0E6;
	--mpe-pink: #FBE1E8;
	max-width: 800px;
	margin: 0 auto;
	color: var(--mpe-ink);
	line-height: 1.6;
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}
.mp-eval *, .mp-eval *::before, .mp-eval *::after { box-sizing: border-box; }
.mp-eval a { color: var(--mpe-brand); text-decoration: none; }
.mp-eval a:hover { color: var(--mpe-brand-dark); text-decoration: underline; }
.mp-eval a.mpe-btn, .mp-eval a.mpe-btn:hover { text-decoration: none !important; }
.mp-eval button { font-family: inherit; }
.mp-eval button:focus-visible, .mp-eval a:focus-visible { outline: 3px solid var(--mpe-brand); outline-offset: 3px; }

.mpe-sr {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Type ---------- */
.mpe-h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; color: #000; margin: 14px 0 10px; }
.mpe-h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.28; color: #000; margin: 0 0 24px; }
.mpe-h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: #000; margin: 0 0 6px; }
.mpe-hl { position: relative; white-space: nowrap; color: var(--mpe-brand); }
.mpe-hl::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 12px;
	background: #F8D5DF; z-index: -1; border-radius: 8px;
}
.mpe-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mpe-brand); }
.mpe-sub { color: var(--mpe-muted); font-size: .92rem; margin: 0 0 24px; }
.mpe-lede { font-size: 1.1rem; color: var(--mpe-muted); max-width: 540px; margin: 0 auto 30px; text-wrap: pretty; }
.mpe-byline { font-size: .88rem; color: var(--mpe-muted); margin: 0 0 12px; }
.mpe-byline a { font-weight: 700; }
.mpe-privacy { font-size: .8rem; color: var(--mpe-muted); margin-top: 16px; }
.mpe-center { text-align: center; }

/* ---------- Badge & chips ---------- */
.mpe-badge-row { margin: 0 0 20px; }
.mpe-badge {
	display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700;
	color: #3F5A4E; background: #E7F0EB; border: 1px solid #CDE0D6; padding: 5px 11px; border-radius: 8px;
}
.mpe-chip {
	display: inline-flex; align-items: center; gap: 7px; font-size: .68rem; font-weight: 800;
	letter-spacing: .08em; text-transform: uppercase; color: var(--mpe-brand); background: var(--mpe-pink);
	padding: 5px 13px; border-radius: 100px; margin-bottom: 16px;
}
.mpe-chip-dot { width: 7px; height: 7px; border-radius: 50%; animation: mpe-pulse 1.8s ease-in-out infinite; }

/* ---------- Intro ---------- */
.mpe-intro { text-align: center; animation: mpe-pop .6s ease both; position: relative; }
.mpe-intro > *:not(.mpe-bubbles) { position: relative; z-index: 1; }
.mpe-cat-grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
	max-width: 680px; margin: 0 auto 34px; text-align: left;
}
.mpe-cat-card {
	background: #fff; border: 1px solid var(--mpe-border); border-radius: 18px; padding: 16px 18px;
	transition: transform .2s ease, box-shadow .2s ease;
}
.mpe-cat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(0, 0, 0, .08); }
.mpe-cat-ic { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.mpe-cat-card b { display: block; font-size: .9rem; color: #000; }
.mpe-cat-card > span:last-child { font-size: .78rem; color: var(--mpe-muted); }

/* ---------- Buttons ---------- */
.mpe-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700;
	font-size: .95rem; padding: 14px 28px; border-radius: 100px; border: none; cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
	text-decoration: none;
}
.mpe-btn-primary { background: var(--mpe-brand); color: #fff; box-shadow: 0 10px 24px rgba(142, 44, 78, .26); }
.mpe-btn-primary:hover { background: var(--mpe-brand-dark); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(142, 44, 78, .32); }
.mpe-btn-light { background: #fff; color: #000; }
.mpe-btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0, 0, 0, .2); color: #000; text-decoration: none; }
.mpe-btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); }
.mpe-btn-outline:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }
.mpe-btn-outline2 { background: #fff; color: #000; border: 1.5px solid #C9BBE8; }
.mpe-btn-outline2:hover { border-color: var(--mpe-brand); transform: translateY(-2px); }
.mpe-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.mpe-btn-ghost {
	font-size: .86rem; font-weight: 700; color: var(--mpe-muted); background: none; border: none;
	cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 10px 0;
}
.mpe-btn-ghost:hover { color: var(--mpe-brand); }

/* ---------- Card shell ---------- */
.mpe-card {
	background: #fff; border: 1px solid var(--mpe-border); border-radius: 28px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .07); overflow: hidden;
}
.mpe-card-bar { height: 7px; background: var(--mpe-brand); }
.mpe-card-bar-multi { background: linear-gradient(90deg, #9C2E50, #6A54A6, #3A6147); }
.mpe-card-body { padding: clamp(20px, 5vw, 32px) clamp(18px, 4.5vw, 36px) clamp(22px, 5vw, 34px); position: relative; }
.mpe-pop { animation: mpe-pop .5s ease both; }

/* ---------- Profile ---------- */
.mpe-profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.mpe-profile-opt {
	display: flex; align-items: center; gap: 14px; text-align: left; background: #fff;
	border: 2px solid var(--mpe-border); border-radius: 16px; padding: 14px 16px; cursor: pointer;
	transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.mpe-profile-opt:hover { transform: translateY(-3px); border-color: var(--mpe-brand); box-shadow: 0 12px 30px rgba(142, 44, 78, .12); }
.mpe-profile-ic { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px; overflow: hidden; }
.mpe-profile-tx { display: flex; flex-direction: column; gap: 2px; }
.mpe-profile-tx b { font-size: .96rem; color: #000; }
.mpe-profile-tx span { font-size: .78rem; color: var(--mpe-muted); }

/* ---------- Quiz ---------- */
.mpe-progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.mpe-progress-label { font-size: .8rem; font-weight: 800; color: #000; white-space: nowrap; }
.mpe-progress-label span { color: var(--mpe-muted); font-weight: 600; }
.mpe-progress-pct { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--mpe-brand); }
.mpe-segments { display: flex; gap: 6px; margin-bottom: 36px; }
.mpe-seg { flex: 1; height: 10px; background: #F7E7EB; border-radius: 100px; overflow: hidden; position: relative; }
.mpe-seg-fill { height: 100%; width: 0; border-radius: 100px; transition: width .45s cubic-bezier(.5, 0, .2, 1); }

.mpe-cat-icon {
	position: absolute; top: 24px; right: 28px; display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 16px; opacity: .9; overflow: hidden;
}
.mpe-opts { display: flex; flex-direction: column; gap: 12px; }
.mpe-opt {
	display: flex; align-items: center; gap: 14px; text-align: left; font-size: .96rem; font-weight: 600;
	color: var(--mpe-ink); background: #fff; border: 2px solid var(--mpe-border); border-radius: 16px;
	padding: 14px 18px; cursor: pointer;
	transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.mpe-opt:hover { transform: translateX(4px); border-color: #C9BBE8; box-shadow: 0 10px 26px rgba(0, 0, 0, .07); }
.mpe-opt.is-picked { background: var(--mpe-pink); border-color: var(--mpe-brand); }
.mpe-opt-chip {
	width: 30px; height: 30px; flex: 0 0 auto; border-radius: 10px; display: inline-flex;
	align-items: center; justify-content: center; font-weight: 800; font-size: .78rem;
	transition: background .16s ease, color .16s ease;
}
.mpe-opt.is-picked .mpe-opt-chip { background: var(--mpe-brand); color: #fff; }
.mpe-nav { display: flex; align-items: center; gap: 16px; margin-top: 26px; min-height: 44px; }
.mpe-slide-a { animation: mpe-slide .4s ease both; }
.mpe-slide-b { animation: mpe-slide2 .4s ease both; }

/* ---------- Results ---------- */
.mpe-results-card { box-shadow: 0 14px 40px rgba(0, 0, 0, .09); }
.mpe-results-head {
	background: linear-gradient(120deg, #FBE1E8 0%, #E6DFF4 100%);
	padding: clamp(26px, 6vw, 38px) clamp(18px, 5vw, 40px) 30px; text-align: center; position: relative; overflow: hidden;
}
.mpe-ring-wrap { position: relative; width: 160px; height: 160px; margin: 20px auto 12px; }
.mpe-ring { transform: rotate(-90deg); }
.mpe-ring circle:last-child { transition: stroke-dashoffset 1.3s cubic-bezier(.4, 0, .2, 1); }
.mpe-ring-num {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; color: #000; line-height: 1;
}
.mpe-ring-num span { font-size: 1.2rem; color: var(--mpe-brand); }
.mpe-level-msg { color: #5c4a52; font-size: 1rem; max-width: 480px; margin: 0 auto; text-wrap: pretty; }
.mpe-cat-rows {
	display: flex; flex-direction: column; gap: 10px;
	padding: clamp(18px, 4vw, 28px) clamp(14px, 4vw, 32px) clamp(20px, 4vw, 32px);
}
.mpe-cat-row {
	background: #FBF1F3; border-radius: 16px;
	padding: 13px clamp(14px, 4vw, 20px);
	display: grid; grid-template-columns: 130px 1fr 48px; align-items: center; gap: 14px;
}
.mpe-cat-row > b { font-size: .86rem; font-weight: 700; color: #000; white-space: nowrap; }
.mpe-cat-row > span { font-size: .95rem; font-weight: 800; text-align: right; }
.mpe-cat-track { height: 9px; background: #fff; border-radius: 100px; overflow: hidden; }
.mpe-cat-fill { height: 100%; width: 0; border-radius: 100px; transition: width 1.1s cubic-bezier(.4, 0, .2, 1); }

.mpe-tips { margin-top: 36px; }
.mpe-tip-list { display: flex; flex-direction: column; gap: 12px; }
.mpe-tip {
	display: flex; gap: 14px; background: #fff; border: 1px solid var(--mpe-border); border-radius: 18px;
	padding: 14px clamp(14px, 4vw, 20px); align-items: flex-start;
}
.mpe-tip-num {
	width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: inline-flex;
	align-items: center; justify-content: center; font-weight: 800; font-size: .8rem;
}
.mpe-tip b { font-size: .88rem; color: #000; display: block; margin-bottom: 2px; }
.mpe-tip-cat {
	font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
	padding: 2px 8px; border-radius: 100px; margin-left: 6px; vertical-align: 1px;
}
.mpe-tip-tx { font-size: .86rem; color: var(--mpe-muted); }
.mpe-perfect {
	margin-top: 30px; text-align: center; background: #E7F0EB; border: 1px solid #CDE0D6;
	border-radius: 18px; padding: 20px 24px; color: #3F5A4E; font-weight: 600; font-size: .94rem;
}

.mpe-cta {
	margin-top: 36px; background: linear-gradient(135deg, #8E2C4E 0%, #6e1f39 120%);
	border-radius: 28px; padding: clamp(26px, 6vw, 38px) clamp(18px, 4.5vw, 32px); text-align: center; color: #fff;
	position: relative; overflow: hidden;
}
.mpe-cta h4 { color: #fff; font-size: clamp(1.3rem, 2.8vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.mpe-cta p { color: rgba(255, 255, 255, .85); font-size: .95rem; max-width: 440px; margin: 0 auto 22px; text-wrap: pretty; }
.mpe-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mpe-cta-note { margin: 16px auto 0 !important; font-size: .76rem !important; color: rgba(255, 255, 255, .78) !important; text-align: center !important; display: block; }

.mpe-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.mpe-retake-row { display: flex; justify-content: center; padding: 4px clamp(14px, 4vw, 32px) clamp(20px, 4vw, 28px); }
.mpe-btn-retake {
	background: #fff; color: var(--mpe-brand);
	border: 1.5px solid var(--mpe-brand);
	font-size: .9rem; padding: 12px 26px;
}
.mpe-btn-retake:hover { background: var(--mpe-pink); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(142, 44, 78, .16); }
.mpe-disclaimer { max-width: 560px; margin: 26px auto 0; font-size: .76rem; color: var(--mpe-muted); text-align: center; line-height: 1.6; }

/* ---------- Floating background bubbles ---------- */
.mpe-bubbles { position: absolute; inset: -30px; overflow: hidden; pointer-events: none; z-index: 0; }
.mpe-bubbles span {
	position: absolute;
	border-radius: 50%;
	animation-name: mpe-float;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
}
.mpe-overlay .mpe-bubbles { position: fixed; inset: 0; }

/* ---------- Overlay ---------- */
.mpe-lock { overflow: hidden !important; }
.mp-eval.mpe-overlay {
	position: fixed; inset: 0; z-index: 99990;
	max-width: none; margin: 0;
	display: none;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background:
		radial-gradient(700px 420px at 10% 0%, rgba(251, 225, 232, .6), transparent 70%),
		radial-gradient(700px 420px at 92% 6%, rgba(230, 223, 244, .55), transparent 70%),
		#FCF8F5;
	animation: mpe-fade .3s ease both;
}
.mpe-overlay-inner {
	position: relative; z-index: 1;
	max-width: 800px; margin: 0 auto;
	padding: clamp(56px, 9vh, 84px) clamp(14px, 4vw, 24px) clamp(48px, 8vh, 80px);
	outline: none;
}
.mpe-overlay-close {
	position: fixed; top: 16px; right: 16px; z-index: 2;
	width: 44px; height: 44px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: #fff; color: var(--mpe-muted);
	border: 1px solid var(--mpe-border);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
	cursor: pointer;
	transition: transform .16s ease, color .16s ease, box-shadow .16s ease;
}
.mpe-overlay-close:hover { color: var(--mpe-brand); transform: scale(1.08); box-shadow: 0 12px 30px rgba(142, 44, 78, .18); }

/* ---------- Confetti (appended to body) ---------- */
.mpe-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.mpe-confetti span { position: absolute; top: -20px; animation-name: mpe-confetti-fall; animation-timing-function: ease-in; animation-fill-mode: both; }

/* ---------- Animations ---------- */
@keyframes mpe-pop { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes mpe-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mpe-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-18px); }
}
@keyframes mpe-slide { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes mpe-slide2 { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes mpe-pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes mpe-confetti-fall { 0% { transform: translateY(-6vh) rotate(0deg); opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(108vh) rotate(540deg); opacity: 0; } }
@keyframes mpe-drop-k { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.06); } }
@keyframes mpe-wave-k { from { transform: translateX(0); } to { transform: translateX(-40px); } }
@keyframes mpe-beat-k { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.14); } 28% { transform: scale(1); } 42% { transform: scale(1.08); } 56% { transform: scale(1); } }
@keyframes mpe-glow-k { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.07); opacity: 1; } }
@keyframes mpe-sway-k { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.mpe-anim-drop { transform-origin: 40px 40px; animation: mpe-drop-k 2.6s ease-in-out infinite; }
.mpe-anim-wave { animation: mpe-wave-k 2.4s linear infinite; }
.mpe-anim-beat { transform-origin: 40px 42px; animation: mpe-beat-k 1.9s ease-in-out infinite; }
.mpe-anim-glow { animation: mpe-glow-k 2.6s ease-in-out infinite; }
.mpe-anim-sway { transform-origin: 40px 60px; animation: mpe-sway-k 3.2s ease-in-out infinite; }

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
	.mpe-cat-icon { display: none; }
	.mpe-cat-row { grid-template-columns: 108px 1fr 44px; gap: 10px; padding: 12px 14px; }
	.mpe-cat-row > b { font-size: .8rem; }
	/* Small screens: Share compact pill first, Download full-width pill below */
	.mpe-actions { flex-direction: column; align-items: center; gap: 10px; }
	.mpe-actions .mpe-btn-primary { width: auto; font-size: .9rem; padding: 12px 26px; }
	.mpe-actions .mpe-btn-outline2 { width: 100%; }
	.mpe-cta-btns { flex-direction: column; align-items: center; }
	.mpe-cta-btns .mpe-btn { flex: 0 0 auto; width: auto; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.mp-eval *, .mp-eval *::before, .mp-eval *::after,
	.mpe-confetti span {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* ---------- Print ---------- */
@media print {
	.mpe-cta, .mpe-actions, .mpe-confetti { display: none !important; }
}
