/* Playful Personality Quiz */
.phq {
	--phq-btn: #00b2e3;
	--phq-select: #ffb600;
	--phq-progress: #38d430;
	--phq-ink: #2b2b2b;
	--phq-muted: #6b6b6b;
	--phq-line: #e7e7e7;
	--phq-soft: #f4f5f7;
	--phq-radius: 14px;
	max-width: 820px;
	margin: 0 auto;
	color: var(--phq-ink);
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 17px;
	line-height: 1.55;
	scroll-margin-top: 90px;
}
.phq *, .phq *::before, .phq *::after { box-sizing: border-box; }
.phq img { max-width: 100%; height: auto; display: block; }

.phq-card {
	background: #fff;
	border-radius: var(--phq-radius);
	padding: clamp(20px, 4vw, 40px);
	text-align: center;
}
.phq-enter { animation: phq-in .35s ease both; }
@keyframes phq-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.phq .phq-h1 { font-size: clamp(28px, 4.5vw, 40px); line-height: 1.15; font-weight: 700; margin: 0 0 18px; color: var(--phq-ink); }
.phq .phq-h2 { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.2; font-weight: 400; margin: 0 0 16px; color: var(--phq-ink); }
.phq .phq-h3 { font-size: 20px; font-weight: 700; margin: 36px 0 12px; text-align: left; }
.phq h1:focus, .phq h2:focus { outline: none; }
.phq-lede { font-size: 18px; color: var(--phq-muted); margin: 0 auto 22px; max-width: 620px; }
.phq-meta, .phq-count, .phq-hint { font-size: 14px; color: var(--phq-muted); margin: 12px 0 0; }
.phq-count { margin: 12px 0 8px; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; }
.phq-hint { margin: 4px 0 14px; }
.phq-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: var(--phq-btn); margin: 0 0 6px; }
.phq-hero-img { width: 100%; border-radius: 10px; margin: 0 0 20px; object-fit: cover; aspect-ratio: 9 / 4; }
.phq-results .phq-hero-img, .phq-result-page .phq-hero-img { aspect-ratio: 7 / 4; }

/* Buttons: reset theme styles, then style */
.phq button { font: inherit; letter-spacing: normal; text-transform: none; box-shadow: none; }
.phq .phq-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 12px 30px;
	border: 2px solid var(--phq-btn); border-radius: 10px;
	background: var(--phq-btn); color: #fff;
	font-size: 17px; font-weight: 700; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}
.phq .phq-btn:hover { filter: brightness(.93); color: #fff; }
.phq .phq-btn:active { transform: scale(.98); }
.phq .phq-btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.phq .phq-btn-lg { min-width: min(100%, 320px); font-size: 20px; min-height: 56px; }
.phq .phq-btn-ghost { background: transparent; color: var(--phq-btn); }
.phq .phq-btn-ghost:hover { background: var(--phq-btn); color: #fff; filter: none; }
.phq .phq-btn:focus-visible, .phq .phq-option:focus-visible, .phq .phq-skip:focus-visible, .phq .phq-mix-toggle:focus-visible, .phq .phq-share-btn:focus-visible {
	outline: 3px solid var(--phq-select); outline-offset: 2px;
}
.phq .phq-skip {
	background: none; border: 0; padding: 8px 12px; margin-top: 16px;
	color: var(--phq-muted); font-size: 15px; text-decoration: underline; cursor: pointer;
}
.phq .phq-skip:hover { color: var(--phq-ink); background: none; }

/* Progress */
.phq-progress { height: 8px; background: var(--phq-soft); border-radius: 99px; overflow: hidden; }
.phq-progress span { display: block; height: 100%; background: var(--phq-progress); border-radius: 99px; transition: width .4s ease; }

/* Options */
.phq-options { display: grid; gap: 10px; text-align: left; }
.phq .phq-option {
	position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
	padding: 14px 16px; min-height: 56px;
	background: var(--phq-soft); color: var(--phq-ink);
	border: 2px solid transparent; border-radius: 12px;
	font-size: 17px; font-weight: 400; text-align: left; line-height: 1.35;
	cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.phq .phq-option:hover { border-color: #cfd6de; background: #eef1f4; color: var(--phq-ink); }
.phq .phq-option.is-selected { border-color: var(--phq-select); background: #fff8e6; }
.phq .phq-option.is-maxed { opacity: .55; }
.phq-check {
	flex: 0 0 26px; width: 26px; height: 26px; border-radius: 7px;
	background: #fff; border: 2px solid #cfd6de; position: relative;
	transition: background .15s ease, border-color .15s ease;
}
.is-selected .phq-check { background: var(--phq-select); border-color: var(--phq-select); animation: phq-pop .25s ease; }
.is-selected .phq-check::after {
	content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px;
	border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
@keyframes phq-pop { 50% { transform: scale(1.25); } }
.phq-nope { animation: phq-nope .35s ease; }
@keyframes phq-nope { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.phq-options-img { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.phq .phq-options-img .phq-option { padding: 6px; min-height: 0; display: block; }
.phq-options-img img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 8px; }
.phq-options-img .phq-check { position: absolute; top: 12px; left: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }

.phq-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.phq-nav .phq-btn { flex: 0 1 auto; min-width: 120px; }
.phq-nav .phq-btn:last-child { flex-grow: 1; max-width: 320px; }

/* Gate */
.phq-gate { max-width: 600px; margin: 0 auto; border: 1px solid var(--phq-line); box-shadow: 0 10px 40px rgba(0,0,0,.06); }
.phq-form { text-align: left; display: grid; gap: 14px; }
.phq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.phq-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--phq-ink); }
.phq-form input[type="text"], .phq-form input[type="email"] {
	width: 100%; min-height: 48px; padding: 10px 14px; margin: 0;
	border: 1.5px solid #cfd6de; border-radius: 10px; background: #fff;
	font: inherit; font-weight: 400; color: var(--phq-ink);
}
.phq-form input:focus { outline: none; border-color: var(--phq-btn); box-shadow: 0 0 0 3px rgba(0, 178, 227, .18); }
.phq .phq-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--phq-muted); }
.phq-consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 20px; accent-color: var(--phq-btn); }
.phq-form .phq-btn { justify-self: center; margin-top: 6px; }
.phq-error { color: #c0392b; font-size: 15px; margin: 0; min-height: 0; }
.phq-error:empty { display: none; }
.phq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Results */
.phq-desc { text-align: left; max-width: 640px; margin: 0 auto; }
.phq-desc p { margin: 0 0 14px; }
.phq-share { margin: 28px 0 8px; padding: 20px; background: var(--phq-soft); border-radius: 12px; }
.phq-share-label { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.phq-share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.phq .phq-share-btn {
	display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px;
	border: 0; border-radius: 10px; color: #fff; font-size: 15px; font-weight: 700;
	text-decoration: none; cursor: pointer;
}
.phq .phq-share-btn:hover { filter: brightness(.92); color: #fff; }
.phq .phq-fb { background: #1877f2; }
.phq .phq-x { background: #000; }
.phq .phq-li { background: #0a66c2; }
.phq .phq-copy, .phq .phq-native { background: #fff; color: var(--phq-ink); border: 1.5px solid #cfd6de; }
.phq .phq-copy:hover, .phq .phq-native:hover { color: var(--phq-ink); }

.phq-mix { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.phq-mix li { border: 1px solid var(--phq-line); border-radius: 12px; overflow: hidden; }
.phq-mix li.is-top { border-color: var(--phq-select); }
.phq .phq-mix-toggle {
	display: flex; align-items: center; gap: 14px; width: 100%;
	padding: 10px 14px; background: #fff; border: 0; color: var(--phq-ink);
	cursor: pointer; text-align: left;
}
.phq .phq-mix-toggle:hover { background: var(--phq-soft); color: var(--phq-ink); }
.phq-mix-toggle img { width: 70px; height: 40px; object-fit: cover; border-radius: 6px; flex: 0 0 70px; }
.phq-mix-main { flex: 1; display: grid; gap: 6px; }
.phq-mix-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.phq-mix-pct { color: var(--phq-muted); font-variant-numeric: tabular-nums; }
.phq-bar { height: 8px; background: var(--phq-soft); border-radius: 99px; overflow: hidden; }
.phq-bar span { display: block; height: 100%; background: var(--phq-btn); border-radius: 99px; animation: phq-grow .8s ease both; transform-origin: left; }
.is-top .phq-bar span { background: var(--phq-select); }
@keyframes phq-grow { from { transform: scaleX(0); } }
.phq-chev { width: 10px; height: 10px; border: solid var(--phq-muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s ease; margin: 0 4px 4px; }
[aria-expanded="true"] .phq-chev { transform: rotate(-135deg); margin-bottom: -4px; }
.phq-mix-details { padding: 6px 16px 16px; font-size: 16px; }
.phq-link { color: var(--phq-btn); font-weight: 700; text-decoration: none; }
.phq-link:hover { text-decoration: underline; }

.phq-cta { margin: 32px auto 0; padding: 22px; border: 2px dashed var(--phq-line); border-radius: 12px; text-align: center; max-width: 640px; }
.phq-cta p { margin: 0 0 12px; }

/* Standalone result pages */
.phq-result-page { padding: 32px 16px 60px; }
.phq-invite { margin: 34px auto 0; padding: 26px 20px; background: var(--phq-soft); border-radius: 12px; }
.phq-invite p { margin: 0 0 16px; color: var(--phq-muted); }
.phq-all-types { margin: 40px 0 0; text-align: center; }
.phq-all-types ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.phq-all-types a { display: grid; gap: 6px; text-decoration: none; color: var(--phq-ink); font-weight: 700; font-size: 15px; padding: 6px; border-radius: 10px; border: 2px solid transparent; }
.phq-all-types a:hover { border-color: var(--phq-line); }
.phq-all-types img { width: 100%; aspect-ratio: 7 / 4; object-fit: cover; border-radius: 8px; }
.phq-all-types .is-current a { border-color: var(--phq-select); }

@media (max-width: 560px) {
	.phq { font-size: 16px; }
	.phq-card { padding: 18px 4px; }
	.phq-row { grid-template-columns: 1fr; }
	.phq-options-img { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.phq .phq-option { font-size: 16px; padding: 12px 14px; }
	.phq-nav .phq-btn:first-child { min-width: 0; padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.phq *, .phq *::before, .phq *::after { animation: none !important; transition: none !important; }
}

/* Theme-proofing: many themes style bare <button> with high-specificity selectors
   (e.g. button:not(:hover):not(:active)). These keep the quiz looking like itself. */
.phq .phq-option { background: var(--phq-soft) !important; color: var(--phq-ink) !important; border-color: transparent !important; text-decoration: none !important; font-size: 17px !important; font-weight: 400 !important; }
.phq .phq-option:hover { background: #eef1f4 !important; border-color: #cfd6de !important; }
.phq .phq-option.is-selected { background: #fff8e6 !important; border-color: var(--phq-select) !important; }
.phq .phq-btn { background: var(--phq-btn) !important; color: #fff !important; border-color: var(--phq-btn) !important; text-decoration: none !important; }
.phq .phq-btn-ghost { background: transparent !important; color: var(--phq-btn) !important; }
.phq .phq-btn-ghost:hover { background: var(--phq-btn) !important; color: #fff !important; }
.phq .phq-skip { background: none !important; color: var(--phq-muted) !important; border: 0 !important; text-decoration: underline !important; font-size: 15px !important; font-weight: 400 !important; }
.phq .phq-mix-toggle { background: #fff !important; color: var(--phq-ink) !important; border: 0 !important; font-size: 17px !important; font-weight: 400 !important; }
.phq .phq-mix-toggle:hover { background: var(--phq-soft) !important; }
.phq .phq-share-btn { color: #fff !important; text-decoration: none !important; font-size: 15px !important; }
.phq .phq-fb { background: #1877f2 !important; }
.phq .phq-x { background: #000 !important; }
.phq .phq-li { background: #0a66c2 !important; }
.phq .phq-copy, .phq .phq-native { background: #fff !important; color: var(--phq-ink) !important; border: 1.5px solid #cfd6de !important; }
.phq .phq-form input[type="text"], .phq .phq-form input[type="email"] { background: #fff !important; color: var(--phq-ink) !important; border: 1.5px solid #cfd6de !important; font-size: 17px !important; }
.phq .phq-form input:focus { border-color: var(--phq-btn) !important; }
@media (max-width: 560px) { .phq .phq-option { font-size: 16px !important; } }

/* Score quizzes (burnout) */
.phq-meter { max-width: 520px; margin: 0 auto 22px; }
.phq-meter-label { font-weight: 700; margin: 0 0 8px; }
.phq .phq-bar-heat { display: block; height: 14px; background: var(--phq-soft); }
.phq .phq-bar-heat span { background: linear-gradient(90deg, #38d430, #ffb600 55%, #e4572e); }
