/* WLP Menopause Readiness Scorecard. Fonts inherit from the theme. */
.wlprs {
	--wlprs-primary: #006a6a;
	--wlprs-border: #bbc9c9;
	--wlprs-text: #1b2525;
	--wlprs-muted: #4a5858;
	--wlprs-surface: #ffffff;
	--wlprs-tint: #eef4f4;
	--wlprs-error: #b3261e;
	--wlprs-radius: 8px;
	--wlprs-btn-radius: 4px;
	max-width: 760px;
	margin: 0 auto;
	color: var(--wlprs-text);
	font-family: inherit;
	line-height: 1.5;
	scroll-margin-top: 96px;
}

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

.wlprs [hidden] {
	display: none !important;
}

.wlprs-screen {
	background: var(--wlprs-surface);
	border: 1px solid var(--wlprs-border);
	border-radius: var(--wlprs-radius);
	padding: 32px;
}

.wlprs-output,
.wlprs-loading {
	border: 0;
	padding: 0;
	background: transparent;
}

.wlprs-loading p { color: var(--wlprs-muted); margin: 0; }

.wlprs-title {
	margin: 0 0 12px;
	font-size: 1.6em;
	line-height: 1.25;
}

.wlprs-title:focus,
.wlprs-question__text:focus,
.wlprs-result__heading:focus {
	outline: none;
}

.wlprs-rich > :first-child { margin-top: 0; }
.wlprs-rich > :last-child { margin-bottom: 0; }
.wlprs-rich a { color: var(--wlprs-primary); }

/* Progress */
.wlprs-progress { margin-bottom: 24px; }
.wlprs-progress__text {
	margin: 0 0 8px;
	font-size: 0.875em;
	color: var(--wlprs-muted);
}

.wlprs-bar {
	display: block;
	height: 8px;
	background: var(--wlprs-tint);
	border-radius: 4px;
	overflow: hidden;
}

.wlprs-bar > span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--wlprs-primary);
	border-radius: 4px;
	transition: width 0.25s ease;
}

/* Question */
.wlprs-fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.wlprs-legend {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0 0 8px;
}

.wlprs-section {
	display: block;
	margin-bottom: 8px;
	font-size: 0.8125em;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wlprs-primary);
}

.wlprs-question__text {
	display: block;
	font-size: 1.35em;
	font-weight: 600;
	line-height: 1.3;
}

.wlprs-help {
	margin: 0 0 16px;
	color: var(--wlprs-muted);
	font-size: 0.9375em;
}

.wlprs-answers {
	display: grid;
	gap: 12px;
	margin-top: 16px;
}

.wlprs-answer { position: relative; }

.wlprs-answer input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.wlprs-answer label {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 12px 16px;
	border: 1px solid var(--wlprs-border);
	border-radius: var(--wlprs-radius);
	background: var(--wlprs-surface);
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.wlprs-answer label::before {
	content: "";
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border: 2px solid var(--wlprs-border);
	border-radius: 50%;
	background: var(--wlprs-surface);
}

.wlprs-answer label:hover { border-color: var(--wlprs-primary); }

.wlprs-answer input:checked + label {
	border-color: var(--wlprs-primary);
	background: var(--wlprs-tint);
}

.wlprs-answer input:checked + label::before {
	border-color: var(--wlprs-primary);
	background: radial-gradient(circle, var(--wlprs-primary) 0 5px, var(--wlprs-surface) 6px);
}

.wlprs-answer input:focus-visible + label {
	outline: 3px solid var(--wlprs-primary);
	outline-offset: 2px;
}

/* Buttons */
.wlprs-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 24px 0 0;
}

.wlprs-actions--split { justify-content: space-between; }
.wlprs-actions--split [type="submit"] { margin-left: auto; }

.wlprs .wlprs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 24px;
	border: 1px solid var(--wlprs-primary);
	border-radius: var(--wlprs-btn-radius);
	background: var(--wlprs-primary);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: none;
	text-decoration: none;
}

.wlprs .wlprs-btn:hover { filter: brightness(0.92); }

.wlprs .wlprs-btn:focus-visible {
	outline: 3px solid var(--wlprs-primary);
	outline-offset: 2px;
}

.wlprs .wlprs-btn--secondary {
	background: var(--wlprs-surface);
	color: var(--wlprs-primary);
}

/* Errors */
.wlprs-error,
.wlprs-field__error {
	margin: 12px 0 0;
	color: var(--wlprs-error);
	font-size: 0.9375em;
	font-weight: 600;
}

.wlprs-field__error {
	display: block;
	margin-top: 6px;
}

/* Email and consent screen */
.wlprs-gate { padding: 36px 40px; }

.wlprs-gate__head {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding-bottom: 24px;
	margin-bottom: 28px;
	border-bottom: 1px solid var(--wlprs-border);
}

.wlprs-gate__icon {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--wlprs-tint);
	color: var(--wlprs-primary);
}

.wlprs-gate__headtext { min-width: 0; padding-top: 2px; }
.wlprs-gate .wlprs-title { margin: 0 0 4px; }
.wlprs-gate__intro { color: var(--wlprs-muted); }

.wlprs-gate__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 20px;
}

.wlprs-field { margin: 0; }
.wlprs-field--full { grid-column: 1 / -1; }

/* A lone name or organisation field spans the row. */
.wlprs-gate__fields > .wlprs-field:first-child:nth-last-child(2) { grid-column: 1 / -1; }

.wlprs-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 0.9375em;
}

.wlprs-req {
	font-weight: 400;
	color: var(--wlprs-muted);
	font-size: 0.875em;
}

.wlprs .wlprs-field input[type="text"],
.wlprs .wlprs-field input[type="email"] {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--wlprs-border);
	border-radius: var(--wlprs-btn-radius);
	background: var(--wlprs-surface);
	color: var(--wlprs-text);
	font: inherit;
	box-shadow: none;
	transition: border-color 0.15s ease, outline-color 0.15s ease;
}

.wlprs .wlprs-field input::placeholder { color: #8a9797; opacity: 1; }
.wlprs .wlprs-field input[type="text"]:hover,
.wlprs .wlprs-field input[type="email"]:hover { border-color: #8fa5a5; }

.wlprs .wlprs-field input:focus {
	outline: 3px solid rgba(0, 106, 106, 0.25);
	outline: 3px solid color-mix(in srgb, var(--wlprs-primary) 25%, transparent);
	outline-offset: 0;
	border-color: var(--wlprs-primary);
}

.wlprs .wlprs-field input[aria-invalid="true"] { border-color: var(--wlprs-error); }

/* Consent panel */
.wlprs-consent {
	display: grid;
	gap: 14px;
	margin-top: 28px;
	padding: 20px;
	border-radius: var(--wlprs-radius);
	background: var(--wlprs-tint);
}

.wlprs-field--check {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 4px 12px;
	align-items: start;
}

.wlprs .wlprs-field--check input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	width: 22px;
	height: 22px;
	margin: 1px 0 0;
	border: 1.5px solid #8fa5a5;
	border-radius: 4px;
	background: var(--wlprs-surface);
	cursor: pointer;
	display: grid;
	place-content: center;
}

.wlprs .wlprs-field--check input[type="checkbox"]::after {
	content: "";
	width: 11px;
	height: 6px;
	border: solid #fff;
	border-width: 0 0 2.5px 2.5px;
	transform: translateY(-1px) rotate(-45deg) scale(0);
	transition: transform 0.12s ease;
}

.wlprs .wlprs-field--check input[type="checkbox"]:checked {
	background: var(--wlprs-primary);
	border-color: var(--wlprs-primary);
}

.wlprs .wlprs-field--check input[type="checkbox"]:checked::after {
	transform: translateY(-1px) rotate(-45deg) scale(1);
}

.wlprs .wlprs-field--check input[type="checkbox"]:focus-visible {
	outline: 3px solid rgba(0, 106, 106, 0.35);
	outline: 3px solid color-mix(in srgb, var(--wlprs-primary) 35%, transparent);
	outline-offset: 2px;
}

.wlprs .wlprs-field--check input[aria-invalid="true"] { border-color: var(--wlprs-error); }

.wlprs-field--check label {
	margin: 0;
	font-weight: 400;
	font-size: 0.9375em;
	line-height: 1.5;
	cursor: pointer;
}

.wlprs-field--check .wlprs-field__error { grid-column: 2; margin-top: 2px; }
.wlprs-field--check label a { color: var(--wlprs-primary); text-decoration: underline; }

.wlprs-gate .wlprs-actions { margin-top: 28px; }

/* Buttons with icons */
.wlprs .wlprs-btn--icon { gap: 8px; }
.wlprs .wlprs-btn--icon svg { flex: 0 0 auto; }
.wlprs .wlprs-btn--trailing svg { transition: transform 0.15s ease; }
.wlprs .wlprs-btn--trailing:hover svg { transform: translateX(3px); }
.wlprs .wlprs-btn--small { min-height: 38px; padding: 6px 14px; font-size: 0.9375em; }

/* Loading */
.wlprs-loading { text-align: center; padding: 56px 0; }
.wlprs-loading p { padding: 12px 0 0; }

.wlprs-spinner {
	display: inline-block;
	width: 36px;
	height: 36px;
	border: 3px solid var(--wlprs-tint);
	border-top-color: var(--wlprs-primary);
	border-radius: 50%;
	animation: wlprs-spin 0.8s linear infinite;
}

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

/* Result heading row with the PDF button */
.wlprs-result__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.wlprs-result__top .wlprs-result__heading { margin: 0; }

.wlprs-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Result */
.wlprs-result__heading {
	margin: 0 0 16px;
	font-size: 1.6em;
}

.wlprs-card {
	background: var(--wlprs-surface);
	border: 1px solid var(--wlprs-border);
	border-radius: var(--wlprs-radius);
	padding: 24px 28px;
	margin: 0 0 16px;
}

.wlprs-card__heading {
	margin: 0 0 8px;
	font-size: 1.15em;
}

.wlprs-scope__label {
	display: inline-block;
	margin: 0 0 12px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--wlprs-tint);
	color: var(--wlprs-primary);
	font-weight: 600;
	font-size: 0.875em;
}

.wlprs-addon { margin-top: 12px; }

.wlprs-band {
	border-color: var(--wlprs-primary);
	border-width: 2px;
}

.wlprs-band__eyebrow {
	margin: 0;
	font-size: 0.8125em;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wlprs-muted);
}

.wlprs-band__label {
	margin: 4px 0 0;
	font-size: 2em;
	font-weight: 700;
	line-height: 1.15;
	color: var(--wlprs-primary);
}

.wlprs-band__score { margin: 4px 0 12px; }
.wlprs-bar--total { height: 12px; margin-bottom: 24px; }

.wlprs-categories__list {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: grid;
	gap: 16px;
}

.wlprs-categories__item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 6px 12px;
	margin: 0;
}

.wlprs-categories__label { font-weight: 600; }
.wlprs-categories__score { color: var(--wlprs-muted); }
.wlprs-categories__item .wlprs-bar { grid-column: 1 / -1; }

.wlprs-priority__list {
	margin: 12px 0 0;
	padding-left: 20px;
}

.wlprs-priority__list li { margin-bottom: 12px; }
.wlprs-priority__list li:last-child { margin-bottom: 0; }

.wlprs-result__footer { margin: 16px 0; }

@media (max-width: 600px) {
	.wlprs-screen { padding: 20px; }
	.wlprs-gate { padding: 24px 20px; }
	.wlprs-gate__fields { grid-template-columns: 1fr; }
	.wlprs-gate__icon { flex-basis: 40px; width: 40px; height: 40px; }
	.wlprs-consent { padding: 16px; }
	.wlprs-title { font-size: 1.35em; }
	.wlprs-actions--split { flex-direction: column-reverse; }
	.wlprs .wlprs-actions--split .wlprs-btn { width: 100%; margin-left: 0; }
	.wlprs-result > .wlprs-actions { flex-direction: column; }
	.wlprs-result > .wlprs-actions .wlprs-btn { width: 100%; }
	.wlprs-output, .wlprs-loading { padding: 0; }
	.wlprs-card { padding: 20px; }
	.wlprs-question__text { font-size: 1.2em; }
	.wlprs-band__label { font-size: 1.6em; }
}

@media (prefers-reduced-motion: reduce) {
	.wlprs-bar > span,
	.wlprs-answer label,
	.wlprs-btn--trailing svg { transition: none; }
	.wlprs-spinner { animation-duration: 2s; }
}

/* Call-to-action button inside rich text (e.g. next steps) */
.wlprs-rich .wlprs-cta { margin-top: 16px; }
.wlprs .wlprs-rich a.wlprs-btn,
.wlprs .wlprs-rich a.wlprs-btn:hover,
.wlprs .wlprs-rich a.wlprs-btn:visited { color: #fff; text-decoration: none; }
.wlprs .wlprs-rich a.wlprs-btn {
	display: inline-block;
	max-width: 100%;
	text-align: center;
	line-height: 1.3;
	padding-top: 12px;
	padding-bottom: 12px;
}

/* "Your result" heading colour (Settings tab). */
.wlprs .wlprs-result__heading { color: var(--wlprs-result-heading, inherit); }
