:root {
	--primary-color: #5d8b6f; /* Nodus green */
	--primary-hover: #4a7360;
	--text-color: #1a1a1a;
	--text-muted: #666666;
	--bg-color: #fbf8f3;
	--card-bg: #f8f9fa;
	--card-border: #eeeeee;
	--progress-bg: #e9ecef;
	--transition-speed: 0.3s;
	--shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.highlight {
	color: var(--primary-color);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

body {
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	/* overflow-x: hidden on body breaks position:fixed on iOS Safari — moved to #app */
}

#app {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	max-width: 600px;
	margin: 0 auto;
	position: relative;
	padding-bottom: 2rem;
	overflow-x: hidden;
}

.app-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem;
	height: 60px;
	background: white;
	position: sticky;
	top: 0;
	z-index: 100;
}

.logo {
	display: flex;
	align-items: center;
}

.logo-icon {
	width: 28px;
	height: 28px;
	object-fit: contain;
	margin-right: 4px;
}

.back-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-muted);
	padding: 0.5rem;
	display: flex;
	align-items: center;
	border-radius: 50%;
	transition: background 0.2s;
}

.back-btn:hover {
	background: #f0f0f0;
}

.logo-text {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.5px;
	background: linear-gradient(135deg, #5d8b6f, #a8c9b8);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.step-counter {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-muted);
}

.progress-container {
	width: 100%;
	height: 4px;
	background: var(--progress-bg);
	overflow: hidden;
	position: sticky;
	top: 60px; /* Height of the app-header */
	z-index: 99;
}

.progress-bar {
	height: 100%;
	background: var(--primary-color);
	width: 0%;
	transition: width 0.5s ease;
}

.funnel-container {
	flex: 1;
	padding: 2rem 1.5rem;
	display: flex;
	flex-direction: column;
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.step-content {
	animation: fadeIn var(--transition-speed) ease-out forwards;
	width: 100%;
}

h1 {
	font-size: 1.75rem;
	font-weight: 700;
	margin-bottom: 1rem;
	text-align: center;
	line-height: 1.2;
}

.subheadline {
	font-size: 1.1rem;
	color: var(--text-muted);
	text-align: center;
	margin-bottom: 1.5rem;
	font-weight: 400;
}

.info-step h1 {
	margin-bottom: 0.5rem;
}

.info-step .subheadline {
	margin-bottom: 1rem;
}

/* Options */
.options-grid {
	display: grid;
	gap: 1rem;
	width: 100%;
}

.option-card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: left;
	font-weight: 500;
	font-size: 1.05rem;
	box-shadow: var(--shadow);
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
	.option-card:hover {
		border-color: var(--primary-color);
		background: white;
		transform: translateY(-2px);
	}
}

.option-card:active {
	background: #eaf2ee;
	transform: scale(0.98);
}

.option-card.active {
	border-color: var(--primary-color);
	background: #eaf2ee;
}

.image-options-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.option-card.image-card {
	flex-direction: column;
	padding: 0;
	overflow: hidden;
	height: auto;
	aspect-ratio: 0.82;
}

.option-card.image-card img {
	width: 100%;
	height: 80%;
	object-fit: cover;
	object-position: center top;
}

.option-card-label {
	padding: 0.75rem;
	text-align: center;
	width: 100%;
	background: white;
}

.check-icon {
	color: var(--text-muted);
	opacity: 0.5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.multi-choice-container .option-card {
	justify-content: flex-start;
	gap: 1rem;
}

.checkbox {
	width: 24px;
	height: 24px;
	border: 2px solid #ddd;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	flex-shrink: 0;
}

.option-card.selected .checkbox {
	background: var(--primary-color);
	border-color: var(--primary-color);
}

.option-card.selected .checkbox::after {
	content: "✓";
	color: white;
	font-size: 14px;
}

/* Info Steps */
.info-step-visual {
	width: 100%;
	border-radius: 16px;
	margin-bottom: 1rem;
	max-height: 320px;
	object-fit: cover;
	object-position: center 10%;
}

.step-content[data-step-id="19"] .info-step-visual {
	object-position: center 30%;
}

.cta-button {
	background: var(--primary-color);
	color: white;
	border: none;
	padding: 1.25rem;
	border-radius: 12px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	margin-top: 1.5rem;
	transition: background 0.2s;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.cta-button:hover {
	background: var(--primary-hover);
}

/* Testimonials */
.testimonial-card {
	background: #fdfdfd;
	border: 1px solid #f0f0f0;
	border-radius: 16px;
	padding: 1rem;
	margin-top: 0.75rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.testimonial-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.testimonial-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #eee;
}

.testimonial-meta h4 {
	font-size: 1rem;
	font-weight: 600;
}

.testimonial-meta span {
	font-size: 0.8rem;
	color: var(--text-muted);
}

/* Result Screens */
.result-gauge {
	width: 240px;
	height: 120px;
	margin: 2rem auto;
	position: relative;
	background: linear-gradient(
		to right,
		#5d8b6f 0%,
		#f9d423 50%,
		#ff4e50 100%
	);
	border-radius: 120px 120px 0 0;
	overflow: visible; /* Changed from hidden to show the center pin */
}

.gauge-needle {
	width: 4px;
	height: 100px;
	background: #1a1a1a;
	position: absolute;
	bottom: 0;
	left: calc(50% - 2px);
	transform-origin: bottom center;
	transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 2;
	border-radius: 4px 4px 0 0;
}

.gauge-center {
	width: 16px;
	height: 16px;
	background: #1a1a1a;
	border: 3px solid white;
	border-radius: 50%;
	position: absolute;
	bottom: -8px;
	left: calc(50% - 8px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	z-index: 3;
}

/* Footer */
.app-footer {
	padding: 2rem 1.5rem;
	text-align: center;
	border-top: 1px solid #f0f0f0;
	margin-top: auto;
}

.footer-links {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	margin-bottom: 1rem;
}

.footer-links a {
	color: var(--text-muted);
	text-decoration: none;
	font-size: 0.85rem;
}

.footer-disclaimer {
	font-size: 0.75rem;
	color: #999;
}

.hidden {
	display: none !important;
}

/* Sticky CTA */
.sticky-cta {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 600px;
	padding: 0.75rem 1.5rem 1.5rem;
	/* iOS Safari safe area (home indicator / bottom bar) */
	padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
	background: linear-gradient(to top, var(--bg-color) 70%, transparent);
	z-index: 9999;
	-webkit-transform: translateX(-50%);
}

#app.has-sticky-cta {
	padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
}

.cta-button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 480px) {
	h1 {
		font-size: 1.35rem;
	}
	.subheadline {
		font-size: 0.95rem;
		margin-bottom: 1rem;
	}
	.funnel-container {
		padding: 1.25rem 1rem;
	}
	.option-card {
		padding: 1rem 1.25rem;
		font-size: 1rem;
	}
	.cta-button {
		padding: 1.1rem;
		font-size: 1rem;
	}
	.image-options-grid {
		gap: 0.75rem;
	}
}

/* Legal Pages Styling */
.legal-container {
	padding: 1.5rem;
	background: white;
	min-height: 100vh;
}

.legal-content {
	max-width: 800px;
	margin: 0 auto;
	color: var(--text-color);
	line-height: 1.6;
}

.legal-content h1 {
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
	font-weight: 700;
}

.legal-content h2 {
	font-size: 1.25rem;
	margin: 2rem 0 1rem;
	font-weight: 600;
}

.legal-content p {
	margin-bottom: 1rem;
	font-size: 0.95rem;
}

.legal-content ul {
	margin-bottom: 1.5rem;
	padding-left: 1.5rem;
}

.legal-content li {
	margin-bottom: 0.5rem;
}

.legal-placeholder {
	background-color: rgba(93, 139, 111, 0.1);
	color: var(--primary-color);
	padding: 2px 4px;
	border-radius: 4px;
	font-weight: 600;
	border: 1px dashed var(--primary-color);
}

.legal-back-header {
	display: flex;
	align-items: center;
	padding: 1rem 0;
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--card-border);
}

@media (max-width: 600px) {
	.legal-content h1 {
		font-size: 1.5rem;
	}
}

.legal-back-header .back-btn {
	text-decoration: none;
}

.legal-back-header .back-btn:hover {
	background: none;
}
