/* =========================================================================
   BUSINESS CHECKUP
   Page-scoped component styles for template-business-checkup.php.

   Everything is namespaced .checkup-* so nothing here can reach the rest of the
   site, and every value comes from the existing design tokens in main.css.
   No animation, no GSAP, no new visual language (HO-063 §15, §17).
   ========================================================================= */

.checkup-page {
	padding: calc(6rem + 68px) 0 5rem;
}

.checkup-head {
	max-width: 46rem;
	margin-bottom: 2rem;
}

.checkup-title {
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 5vw, 2.75rem);
	line-height: 1.15;
	color: var(--foreground);
	margin: 0.35rem 0 0.75rem;
}

.checkup-lede {
	color: var(--ink-soft);
	font-size: 1.0625rem;
	line-height: 1.6;
	margin: 0;
}

/* --- progress ---------------------------------------------------------- */

.checkup-progress-wrap {
	max-width: 46rem;
	margin-bottom: 1.5rem;
}

.checkup-progress-wrap[hidden] {
	display: none;
}

.checkup-progress-label {
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin: 0 0 0.5rem;
}

.checkup-progress {
	height: 6px;
	border-radius: 999px;
	background-color: var(--secondary);
	overflow: hidden;
}

.checkup-progress-bar {
	display: block;
	height: 100%;
	width: 0;
	background-color: var(--primary);
	border-radius: 999px;
}

/* --- live region ------------------------------------------------------- */

/* Announced by screen readers, kept out of the visual layout. Never display:none. */
.checkup-live {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- stage / question -------------------------------------------------- */

.checkup-stage {
	max-width: 46rem;
}

.checkup-fallback {
	color: var(--ink-soft);
}

.checkup-question {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.checkup-question:focus {
	outline: none;
}

.checkup-question:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 4px;
	border-radius: var(--radius);
}

.checkup-legend {
	display: block;
	font-family: var(--font-display);
	font-size: clamp(1.25rem, 3.5vw, 1.75rem);
	line-height: 1.25;
	color: var(--foreground);
	padding: 0;
	margin: 0 0 0.5rem;
}

.checkup-context {
	color: var(--ink-soft);
	font-size: 0.9375rem;
	margin: 0 0 0.75rem;
}

.checkup-required-note {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin: 0 0 1rem;
}

.checkup-options {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.checkup-option {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 44px;
	padding: 0.75rem 1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background-color: var(--card);
	color: var(--card-foreground);
	cursor: pointer;
}

.checkup-option:hover {
	border-color: var(--ring);
}

.checkup-option-input {
	flex: 0 0 auto;
	width: 1.125rem;
	height: 1.125rem;
	margin: 0;
	accent-color: var(--primary);
}

.checkup-option-input:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 2px;
}

.checkup-option-label {
	font-size: 1rem;
	line-height: 1.45;
}

.checkup-option:has(.checkup-option-input:checked) {
	border-color: var(--primary);
}

.checkup-error {
	color: var(--destructive);
	font-size: 0.9375rem;
	margin: 0.875rem 0 0;
}

.checkup-error[hidden] {
	display: none;
}

/* --- actions ----------------------------------------------------------- */

.checkup-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.checkup-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 0.7rem 1.35rem;
	border-radius: var(--radius);
	border: 1px solid transparent;
	font-size: 1rem;
	font-family: var(--font-sans);
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

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

.checkup-btn-primary {
	background-color: var(--primary);
	color: var(--primary-foreground);
	border-color: var(--primary);
}

.checkup-btn-secondary {
	background-color: var(--secondary);
	color: var(--secondary-foreground);
	border-color: var(--border);
}

/* There is no .btn-secondary component in this theme — see HO-062 §19 / HO-063 §15. */
.checkup-btn-ghost {
	background-color: transparent;
	color: var(--foreground);
	border-color: var(--border);
}

.checkup-btn-link {
	background-color: transparent;
	color: var(--ink-soft);
	border-color: transparent;
	text-decoration: underline;
	padding-left: 0.25rem;
	padding-right: 0.25rem;
}

/* --- result ------------------------------------------------------------ */

.checkup-result-kicker {
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin: 0 0 0.5rem;
}

.checkup-result-title {
	font-family: var(--font-display);
	font-size: clamp(1.625rem, 5vw, 2.5rem);
	line-height: 1.15;
	color: var(--foreground);
	margin: 0 0 1.25rem;
}

.checkup-scores {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	padding: 1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background-color: var(--card);
	margin-bottom: 1rem;
}

.checkup-result-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.checkup-result-row-label {
	color: var(--ink-soft);
	font-size: 0.9375rem;
}

.checkup-result-row-value {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	color: var(--foreground);
}

.checkup-bands {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-bottom: 1.25rem;
}

.checkup-band-label {
	color: var(--ink-faint);
	font-size: 0.875rem;
}

.checkup-band {
	display: inline-block;
	padding: 0.15rem 0.6rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background-color: var(--secondary);
	color: var(--secondary-foreground);
	font-size: 0.875rem;
}

.checkup-explanation {
	color: var(--ink-soft);
	line-height: 1.65;
	margin: 0 0 1.5rem;
}

.checkup-subheading {
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin: 0 0 0.5rem;
}

.checkup-findings {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.checkup-finding {
	position: relative;
	padding: 0.75rem 1rem 0.75rem 2.25rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background-color: var(--card);
	color: var(--card-foreground);
	line-height: 1.55;
}

.checkup-finding::before {
	position: absolute;
	left: 0.9rem;
	top: 0.72rem;
	font-size: 0.9rem;
	line-height: 1.6;
}

.checkup-finding-gap::before {
	content: "!";
	color: var(--destructive);
	font-weight: 700;
}

.checkup-finding-strength::before {
	content: "\2713";
	color: var(--ink-soft);
}

.checkup-priority,
.checkup-stated-priority,
.checkup-next-action {
	padding: 1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background-color: var(--accent);
	color: var(--accent-foreground);
	margin-bottom: 1rem;
}

.checkup-priority-label,
.checkup-stated-priority-label,
.checkup-next-action-copy {
	margin: 0;
	line-height: 1.55;
}

.checkup-offer {
	margin: 0.75rem 0 0;
	font-size: 0.9375rem;
	color: var(--ink-soft);
}

.checkup-actions-result {
	margin-top: 0.5rem;
	margin-bottom: 1.5rem;
}

.checkup-scoring {
	max-width: 46rem;
	border-top: 1px solid var(--border);
	padding-top: 1rem;
}

.checkup-scoring-summary {
	cursor: pointer;
	color: var(--ink-soft);
	font-size: 0.9375rem;
}

.checkup-scoring-list {
	margin: 0.75rem 0 0;
	padding-left: 1.25rem;
	color: var(--ink-soft);
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
}

.checkup-disclaimer {
	max-width: 46rem;
	margin: 1.25rem 0 0;
	font-size: 0.875rem;
	color: var(--ink-faint);
}

/* --- small screens ----------------------------------------------------- */

@media (max-width: 767px) {
	.checkup-page {
		padding-top: calc(5rem + 68px);
		/* Clear the site-wide fixed WhatsApp/chat launcher (bottom-right, z-index 9999) so it
		   can never sit on top of the checkup's own actions. */
		padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
	}

	.checkup-options {
		gap: 0.5rem;
	}

	/* No sticky action bar on phones: the fixed chat launcher occupies the bottom-right, so a
	   sticky bar would put the primary action underneath another component's hit area. The
	   actions stay in normal flow directly beneath the answers instead. */
	.checkup-actions {
		margin-top: 1.25rem;
	}
}
