/* Life5X Life Audit
 * Colours sampled from the Life5X logo. Everything is scoped under .l5x
 * so it sits inside any theme without leaking styles.
 */
.l5x {
	--l5x-navy: #080e23;
	--l5x-orange: #fa4b05;
	--l5x-orange-dark: #d93f02;
	--l5x-peach: #feefe7;
	--l5x-slate: #9ea2ab;
	--l5x-ink: #3c4252;
	--l5x-line: #e3e5ea;
	--l5x-track: #eceef2;
	--l5x-bg: #ffffff;
	--l5x-ok: #137a48;
	--l5x-warn: #b3261e;
	--l5x-radius: 10px;

	box-sizing: border-box;
	max-width: 680px;
	margin: 0 auto;
	padding: 24px 20px 28px;
	background: var(--l5x-bg);
	color: var(--l5x-navy);
	border: 1px solid var(--l5x-line);
	border-top: 4px solid var(--l5x-orange);
	border-radius: 4px 4px var(--l5x-radius) var(--l5x-radius);
	font-family: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	text-align: left;
}
.l5x *,
.l5x *::before,
.l5x *::after { box-sizing: inherit; }
.l5x [hidden] { display: none !important; }

.l5x-head { margin-bottom: 20px; }
.l5x-logo { display: block; width: 190px; max-width: 60%; height: auto; }

.l5x-title {
	margin: 0 0 8px;
	font-size: 1.6rem;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--l5x-navy);
}
.l5x-title:focus { outline: none; }
.l5x-lede { margin: 0 0 24px; color: var(--l5x-ink); max-width: 60ch; }

/* ---------- Form ---------- */
.l5x-form { display: grid; gap: 14px; }
.l5x-row { display: grid; gap: 14px; }
.l5x-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--l5x-navy);
}
.l5x input[type="text"],
.l5x input[type="email"],
.l5x input[type="tel"] {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 14px;
	font: inherit;
	color: var(--l5x-navy);
	background: #fff;
	border: 1.5px solid var(--l5x-line);
	border-radius: 8px;
	box-shadow: none;
	appearance: none;
}
.l5x input:focus { border-color: var(--l5x-navy); outline: none; }
.l5x input[aria-invalid="true"] { border-color: var(--l5x-warn); }

.l5x-prefix { display: flex; align-items: stretch; }
.l5x-prefix span {
	display: flex;
	align-items: center;
	padding: 0 12px;
	font-weight: 600;
	color: var(--l5x-ink);
	background: var(--l5x-track);
	border: 1.5px solid var(--l5x-line);
	border-right: 0;
	border-radius: 8px 0 0 8px;
}
.l5x .l5x-prefix input { border-radius: 0 8px 8px 0; }

.l5x-hint { min-height: 0; margin: 4px 0 0; font-size: 0.85rem; }
.l5x-hint.is-error { color: var(--l5x-warn); }

.l5x-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 0.88rem;
	color: var(--l5x-ink);
	cursor: pointer;
}
.l5x-consent input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--l5x-orange); }

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

/* ---------- Buttons ---------- */
.l5x-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 12px 22px;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	border: 2px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.l5x-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.l5x-btn-primary { background: var(--l5x-orange); color: #fff; }
.l5x-btn-primary:hover:not(:disabled) { background: var(--l5x-orange-dark); color: #fff; }
.l5x-btn-dark { background: var(--l5x-orange); color: #fff; white-space: nowrap; }
.l5x-btn-dark:hover { background: #fff; color: var(--l5x-navy); }
.l5x-btn-ghost { background: transparent; color: var(--l5x-navy); border-color: var(--l5x-line); }
.l5x-btn-ghost:hover { border-color: var(--l5x-navy); }
.l5x-btn-block { width: 100%; }
.l5x-form .l5x-btn { width: 100%; margin-top: 4px; }

.l5x a:focus-visible,
.l5x button:focus-visible,
.l5x input:focus-visible + label,
.l5x input[type="checkbox"]:focus-visible {
	outline: 3px solid var(--l5x-orange);
	outline-offset: 2px;
}

/* ---------- Quiz ---------- */
.l5x-progress {
	height: 6px;
	background: var(--l5x-track);
	border-radius: 3px;
	overflow: hidden;
}
.l5x-progress-fill {
	width: 0;
	height: 100%;
	background: var(--l5x-orange);
	transition: width 0.3s ease;
}
.l5x-count { margin: 10px 0 18px; font-size: 0.85rem; font-weight: 600; color: var(--l5x-slate); }

.l5x-question { margin: 0; padding: 0; border: 0; min-width: 0; }
.l5x-qtext {
	display: block;
	margin: 0 0 22px;
	padding: 0;
	font-size: 1.3rem;
	line-height: 1.35;
	font-weight: 700;
	color: var(--l5x-navy);
}
.l5x-qtext:focus { outline: none; }

.l5x-scale { display: grid; gap: 8px; }
.l5x-opt { position: relative; }
.l5x-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.l5x-opt label {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 8px 14px;
	border: 1.5px solid var(--l5x-line);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}
.l5x-opt label:hover { border-color: var(--l5x-navy); }
.l5x-opt-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 30px;
	height: 30px;
	font-weight: 800;
	color: var(--l5x-navy);
	background: var(--l5x-track);
	border-radius: 50%;
}
.l5x-opt-txt { font-weight: 600; }
.l5x-opt input:checked + label { border-color: var(--l5x-orange); background: var(--l5x-peach); }
.l5x-opt input:checked + label .l5x-opt-num { background: var(--l5x-orange); color: #fff; }

.l5x-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.l5x-nav .l5x-btn { flex: 1 1 0; }

.l5x-error { margin: 14px 0 0; color: var(--l5x-warn); font-weight: 600; }

/* ---------- Results ---------- */
.l5x-bars { list-style: none; margin: 18px 0 26px; padding: 0; display: grid; gap: 16px; }
.l5x-bar { margin: 0; padding: 0; }
.l5x-bar-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.l5x-bar-name { font-weight: 600; }
.l5x-bar-score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.l5x-bar-track {
	height: 12px;
	background: var(--l5x-track);
	border-radius: 2px;
	overflow: hidden;
}
/* The one expressive moment: bars end in the logo's slanted cut. */
.l5x-bar-fill {
	width: 0;
	height: 100%;
	background: var(--l5x-navy);
	clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
	transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.l5x-bar-band { margin: 4px 0 0; font-size: 0.8rem; color: var(--l5x-slate); }
.l5x-bar.is-priority .l5x-bar-name,
.l5x-bar.is-priority .l5x-bar-score,
.l5x-bar.is-priority .l5x-bar-band { color: var(--l5x-orange); font-weight: 800; }
.l5x-bar.is-priority .l5x-bar-fill { background: var(--l5x-orange); }

.l5x-priority {
	margin: 0 0 22px;
	padding: 20px 20px 18px 22px;
	background: var(--l5x-peach);
	border-left: 5px solid var(--l5x-orange);
	border-radius: 0 var(--l5x-radius) var(--l5x-radius) 0;
}
.l5x-priority-kicker { margin: 0 0 4px; font-size: 0.85rem; font-weight: 700; color: var(--l5x-orange); }
.l5x-priority-name { margin: 0 0 4px; font-size: 1.4rem; line-height: 1.25; font-weight: 800; color: var(--l5x-navy); }
.l5x-priority-tag { margin: 0 0 12px; font-style: italic; color: var(--l5x-ink); }
.l5x-summary { margin: 0; color: var(--l5x-navy); }

.l5x-status { margin: 10px 0 0; font-size: 0.9rem; min-height: 1.2em; }
.l5x-status.is-ok { color: var(--l5x-ok); font-weight: 600; }
.l5x-status.is-warn { color: var(--l5x-warn); font-weight: 600; }

.l5x-countdown {
	margin: 16px 0 0;
	padding: 14px 16px;
	color: #fff;
	background: var(--l5x-orange);
	border-radius: 8px;
}
.l5x-countdown p { margin: 0 0 8px; font-weight: 700; }
.l5x-countdown-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.l5x .l5x-link-strong { color: #fff; font-weight: 800; text-decoration: underline; }
.l5x .l5x-link {
	padding: 0;
	font: inherit;
	color: #fff;
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

.l5x-cta {
	display: grid;
	gap: 14px;
	align-items: center;
	margin-top: 24px;
	padding: 20px;
	color: #fff;
	background: var(--l5x-navy);
	border-top: 3px solid var(--l5x-orange);
	border-radius: 0 0 var(--l5x-radius) var(--l5x-radius);
}
.l5x-cta-title { margin: 0 0 4px; font-size: 1.1rem; font-weight: 800; color: #fff; }
.l5x-cta-copy { margin: 0; color: #cdd0d8; font-size: 0.92rem; }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
	.l5x { padding: 32px 36px 36px; }
	.l5x-title { font-size: 2rem; }
	.l5x-row { grid-template-columns: 3fr 2fr; }
	.l5x-qtext { font-size: 1.5rem; }
	.l5x-scale { grid-template-columns: repeat(5, 1fr); }
	.l5x-opt label {
		flex-direction: column;
		justify-content: flex-start;
		gap: 8px;
		height: 100%;
		min-height: 104px;
		padding: 14px 8px;
		text-align: center;
	}
	.l5x-opt-txt { font-size: 0.86rem; line-height: 1.25; }
	.l5x-nav .l5x-btn { flex: 0 0 auto; min-width: 150px; }
	.l5x-cta { grid-template-columns: 1fr auto; }
}

@media (prefers-reduced-motion: reduce) {
	.l5x *,
	.l5x *::before,
	.l5x *::after {
		transition: none !important;
		animation: none !important;
	}
}
