/*
 * 360PH Valuation Engine – public experience
 */

.phv-app {
	--phv-primary: #1f3b34;
	--phv-primary-dark: #142923;
	--phv-accent: #bf1e2d;
	--phv-text: #252525;
	--phv-muted: #667085;
	--phv-border: #d9e0ec;
	--phv-bg: #f5f6f8;
	--phv-white: #fff;
	--phv-success: #18794e;
	--phv-warning: #9a6700;
	--phv-danger: #b42318;
	--phv-shadow: 0 22px 60px rgba(16, 24, 40, .09);
	--phv-radius: 14px;

	width: 100%;
	color: var(--phv-text);
	font-family: inherit;
	line-height: 1.5;
	scroll-margin-top: 30px;
}

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

.phv-app button,
.phv-app input,
.phv-app select {
	font: inherit;
}

.phv-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 220px;
	color: var(--phv-muted);
}

.phv-loading__indicator {
	width: 22px;
	height: 22px;
	border: 2px solid var(--phv-border);
	border-top-color: var(--phv-primary);
	border-radius: 999px;
	animation: phv-spin .8s linear infinite;
}

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

.phv-shell {
	max-width: 980px;
	margin: 0 auto;
}

.phv-progress {
	padding: 0 12px 22px;
}

.phv-progress__bar {
	position: relative;
	height: 3px;
	margin: 0 24px -15px;
	overflow: hidden;
	border-radius: 99px;
	background: #e6e9ef;
}

.phv-progress__bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--phv-primary);
	transition: width .3s ease;
}

.phv-progress__steps {
	position: relative;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 8px;
}

.phv-progress__step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	min-width: 0;
	color: #8a94a6;
	font-size: 11px;
	font-weight: 700;
	text-align: center;
}

.phv-progress__number {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 2px solid #e2e6ed;
	border-radius: 999px;
	background: var(--phv-white);
	color: #7b8494;
}

.phv-progress__step.is-active,
.phv-progress__step.is-complete {
	color: var(--phv-primary);
}

.phv-progress__step.is-active .phv-progress__number,
.phv-progress__step.is-complete .phv-progress__number {
	border-color: var(--phv-primary);
	background: var(--phv-primary);
	color: var(--phv-white);
}

.phv-panel,
.phv-result {
	overflow: hidden;
	border: 1px solid var(--phv-border);
	border-radius: var(--phv-radius);
	background: var(--phv-white);
	box-shadow: var(--phv-shadow);
}

.phv-panel {
	padding: clamp(24px, 5vw, 52px);
}

.phv-panel__head {
	max-width: 720px;
	margin-bottom: 34px;
}

.phv-eyebrow {
	margin-bottom: 8px;
	color: var(--phv-primary);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.phv-title,
.phv-result__heading {
	margin: 0;
	color: var(--phv-text);
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 750;
	line-height: 1.12;
	letter-spacing: -.03em;
}

.phv-subtitle {
	max-width: 690px;
	margin: 12px 0 0;
	color: var(--phv-muted);
	font-size: 16px;
}

.phv-form {
	margin: 0;
}

.phv-grid {
	display: grid;
	gap: 22px;
}

.phv-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.phv-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 22px;
}

.phv-field {
	min-width: 0;
}

.phv-field label,
.phv-choice-group legend {
	display: block;
	margin: 0 0 8px;
	color: var(--phv-text);
	font-size: 14px;
	font-weight: 700;
}

.phv-optional {
	color: var(--phv-muted);
	font-size: 12px;
	font-weight: 500;
}

.phv-field input,
.phv-field select,
.phv-save input[type="email"] {
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 11px 14px;
	border: 1px solid #cfd6e2;
	border-radius: 8px;
	outline: none;
	background: #fff;
	color: var(--phv-text);
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.phv-field input:focus,
.phv-field select:focus,
.phv-save input[type="email"]:focus {
	border-color: var(--phv-primary);
	box-shadow: 0 0 0 3px rgba(31, 59, 52, .12);
}

.phv-field input::placeholder,
.phv-save input::placeholder {
	color: #9aa4b2;
}

.phv-money-input {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
}

.phv-money-input > span {
	display: grid;
	place-items: center;
	min-width: 44px;
	border: 1px solid #cfd6e2;
	border-right: 0;
	border-radius: 8px 0 0 8px;
	background: var(--phv-bg);
	color: var(--phv-muted);
	font-weight: 700;
}

.phv-money-input input {
	border-radius: 0 8px 8px 0;
}

.phv-field__help {
	margin: -2px 0 10px;
	color: var(--phv-muted);
	font-size: 13px;
}

.phv-choice-group {
	margin: 0;
	padding: 0;
	border: 0;
}

.phv-choice-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.phv-choice {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 62px;
	padding: 14px;
	border: 1px solid var(--phv-border);
	border-radius: 9px;
	background: #fff;
	cursor: pointer;
	transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.phv-choice:hover {
	border-color: #aab5c3;
	transform: translateY(-1px);
}

.phv-choice.is-selected {
	border-color: var(--phv-primary);
	background: rgba(31, 59, 52, .05);
}

.phv-choice input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.phv-choice__dot {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 2px solid #b6c0cc;
	border-radius: 99px;
	background: #fff;
	box-shadow: inset 0 0 0 4px #fff;
}

.phv-choice.is-selected .phv-choice__dot {
	border-color: var(--phv-primary);
	background: var(--phv-primary);
}

.phv-section-gap {
	margin-top: 26px;
}

.phv-inline-note {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 22px;
	padding: 14px 16px;
	border-radius: 8px;
	background: var(--phv-bg);
	color: var(--phv-muted);
	font-size: 13px;
}

.phv-inline-note strong {
	color: var(--phv-text);
}

.phv-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 38px;
	padding-top: 24px;
	border-top: 1px solid #edf0f4;
}

.phv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 11px 20px;
	border: 1px solid transparent;
	border-radius: 8px;
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 750;
	line-height: 1.2;
	cursor: pointer;
	transition: transform .12s ease, opacity .12s ease, background .12s ease, border-color .12s ease;
}

.phv-btn:hover {
	transform: translateY(-1px);
}

.phv-btn:disabled {
	opacity: .6;
	cursor: wait;
	transform: none;
}

.phv-btn--primary {
	border-color: var(--phv-primary);
	background: var(--phv-primary);
	color: #fff !important;
}

.phv-btn--primary:hover {
	background: var(--phv-primary-dark);
}

.phv-btn--secondary {
	border-color: #cfd6e2;
	background: #fff;
	color: var(--phv-text) !important;
}

.phv-btn--secondary:hover {
	border-color: #aab5c3;
	background: #fafbfc;
}

.phv-btn--large {
	min-height: 54px;
	padding: 14px 24px;
	font-size: 15px;
}

.phv-btn__arrow {
	font-size: 18px;
	line-height: 1;
	transition: transform .12s ease;
}

.phv-btn:hover .phv-btn__arrow {
	transform: translateX(3px);
}

.phv-trust {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 24px;
	padding: 16px 10px 0;
	color: var(--phv-muted);
	font-size: 12px;
}

.phv-trust span::before {
	content: "✓";
	margin-right: 6px;
	color: var(--phv-success);
	font-weight: 800;
}

.phv-alert {
	margin: 0 0 24px;
	padding: 14px 16px;
	border-radius: 8px;
	font-size: 14px;
}

.phv-alert[hidden] {
	display: none !important;
}

.phv-alert--error {
	border: 1px solid #f1b9b4;
	background: #fff3f2;
	color: #8d2420;
}

.phv-alert--notice {
	display: flex;
	flex-direction: column;
	gap: 3px;
	border: 1px solid #ead7a0;
	background: #fff9e8;
	color: #6f5300;
}

.phv-review {
	border: 1px solid var(--phv-border);
	border-radius: 10px;
	overflow: hidden;
}

.phv-review__row {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 20px;
	padding: 13px 16px;
	border-bottom: 1px solid #edf0f4;
}

.phv-review__row:last-child {
	border-bottom: 0;
}

.phv-review__row span {
	color: var(--phv-muted);
	font-size: 13px;
}

.phv-review__row strong {
	text-align: right;
	font-size: 13px;
}

.phv-divider {
	height: 1px;
	margin: 30px 0;
	background: #edf0f4;
}

.phv-field--expected {
	max-width: 460px;
}

/* Result */

.phv-result__top {
	padding: clamp(30px, 6vw, 62px);
	background:
		linear-gradient(135deg, rgba(255,255,255,.98), rgba(245,248,247,.98));
	text-align: center;
}

.phv-result__heading {
	font-size: clamp(25px, 4vw, 38px);
}

.phv-result__value {
	margin: 22px 0 10px;
	color: var(--phv-primary);
	font-size: clamp(48px, 9vw, 82px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.05em;
}

.phv-result__range {
	display: flex;
	flex-direction: column;
	gap: 3px;
	color: var(--phv-muted);
	font-size: 13px;
}

.phv-result__range strong {
	color: var(--phv-text);
	font-size: clamp(18px, 3vw, 24px);
}

.phv-result__metrics {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-top: 1px solid var(--phv-border);
	border-bottom: 1px solid var(--phv-border);
	background: #fff;
}

.phv-metric {
	padding: 22px;
	border-right: 1px solid var(--phv-border);
	text-align: center;
}

.phv-metric:last-child {
	border-right: 0;
}

.phv-metric span {
	display: block;
	margin-bottom: 5px;
	color: var(--phv-muted);
	font-size: 12px;
}

.phv-metric strong {
	font-size: 16px;
}

.phv-confidence {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 4px 9px;
	border-radius: 99px;
	font-size: 13px !important;
}

.phv-confidence--high {
	background: #eaf7ef;
	color: var(--phv-success);
}

.phv-confidence--medium {
	background: #eef3f8;
	color: #36566d;
}

.phv-confidence--low,
.phv-confidence--very_low {
	background: #fff5d9;
	color: var(--phv-warning);
}

.phv-result__explanation,
.phv-result__cta,
.phv-save,
.phv-disclaimer,
.phv-expected,
.phv-shell--result .phv-alert {
	margin-left: clamp(22px, 6vw, 58px);
	margin-right: clamp(22px, 6vw, 58px);
}

.phv-result__explanation {
	padding: 32px 0 0;
}

.phv-result__explanation h3,
.phv-save h3 {
	margin: 0 0 8px;
	font-size: 18px;
}

.phv-result__explanation p,
.phv-save p {
	margin: 0;
	color: var(--phv-muted);
	font-size: 14px;
	line-height: 1.7;
}

.phv-expected {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 20px;
	margin-top: 24px;
	padding: 15px 18px;
	border: 1px solid var(--phv-border);
	border-radius: 9px;
	background: var(--phv-bg);
}

.phv-expected span,
.phv-expected small {
	color: var(--phv-muted);
	font-size: 12px;
}

.phv-expected strong {
	grid-row: span 2;
	align-self: center;
	font-size: 19px;
}

.phv-result__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 30px 0;
}

.phv-save {
	display: grid;
	grid-template-columns: .85fr 1.4fr;
	gap: 28px;
	padding: 28px 0;
	border-top: 1px solid var(--phv-border);
}

.phv-save__row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
}

.phv-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 10px;
	color: var(--phv-muted);
	font-size: 11px;
	cursor: pointer;
}

.phv-consent input {
	margin-top: 2px;
}

.phv-consent strong {
	font-weight: 600;
}

.phv-save__message {
	margin-top: 10px;
	font-size: 12px;
	font-weight: 700;
}

.phv-save__message.is-success {
	color: var(--phv-success);
}

.phv-save__message.is-error {
	color: var(--phv-danger);
}

.phv-disclaimer {
	padding: 20px 0 30px;
	border-top: 1px solid var(--phv-border);
	color: #7e8796;
	font-size: 11px;
	line-height: 1.6;
}

.phv-app.is-busy {
	cursor: progress;
}

/* Responsive */

@media (max-width: 760px) {
	.phv-progress {
		padding-bottom: 16px;
	}

	.phv-progress__bar {
		margin-left: 14px;
		margin-right: 14px;
	}

	.phv-progress__label {
		display: none;
	}

	.phv-grid--2,
	.phv-grid--3 {
		grid-template-columns: 1fr;
	}

	.phv-choice-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.phv-result__metrics {
		grid-template-columns: 1fr;
	}

	.phv-metric {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 14px 20px;
		border-right: 0;
		border-bottom: 1px solid var(--phv-border);
		text-align: left;
	}

	.phv-metric:last-child {
		border-bottom: 0;
	}

	.phv-metric span {
		margin: 0;
	}

	.phv-save {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.phv-save__row {
		grid-template-columns: 1fr;
	}

	.phv-result__cta .phv-btn {
		width: 100%;
	}
}

@media (max-width: 520px) {
	.phv-panel {
		padding: 24px 18px;
		border-radius: 10px;
	}

	.phv-progress__number {
		width: 26px;
		height: 26px;
		font-size: 11px;
	}

	.phv-choice-grid {
		grid-template-columns: 1fr;
	}

	.phv-actions {
		position: sticky;
		z-index: 5;
		bottom: 0;
		margin: 30px -18px -24px;
		padding: 14px 18px;
		background: rgba(255,255,255,.96);
		box-shadow: 0 -8px 18px rgba(16,24,40,.05);
		backdrop-filter: blur(8px);
	}

	.phv-actions .phv-btn--primary {
		flex: 1 1 auto;
	}

	.phv-review__row {
		grid-template-columns: 1fr;
		gap: 3px;
	}

	.phv-review__row strong {
		text-align: left;
	}

	.phv-inline-note {
		align-items: flex-start;
		flex-direction: column;
		gap: 3px;
	}

	.phv-result__value {
		font-size: 52px;
	}

	.phv-result__explanation,
	.phv-result__cta,
	.phv-save,
	.phv-disclaimer,
	.phv-expected,
	.phv-shell--result .phv-alert {
		margin-left: 18px;
		margin-right: 18px;
	}

	.phv-expected {
		grid-template-columns: 1fr;
	}

	.phv-expected strong {
		grid-row: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.phv-app *,
	.phv-app *::before,
	.phv-app *::after {
		scroll-behavior: auto !important;
		transition: none !important;
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
	}
}