.maq-sunscreen-calculator {
	--maq-bg: #ffffff;
	--maq-soft: #f7f6f5;
	--maq-border: #dedbd8;
	--maq-text: #1d1d1d;
	--maq-muted: #5e5b58;
	--maq-accent: #1d1d1d;
	--maq-accent-contrast: #ffffff;
	--maq-focus: #d84d83;
	--maq-radius: 18px;
	--maq-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);

	box-sizing: border-box;
	max-width: 980px;
	margin: 2rem auto;
	padding: clamp(1.25rem, 3vw, 2.5rem);
	color: var(--maq-text);
	background: var(--maq-bg);
	border: 1px solid var(--maq-border);
	border-radius: var(--maq-radius);
	box-shadow: var(--maq-shadow);
}

.maq-sunscreen-calculator *,
.maq-sunscreen-calculator *::before,
.maq-sunscreen-calculator *::after {
	box-sizing: border-box;
}

.maq-calculator__intro {
	max-width: 760px;
	margin-bottom: 2rem;
}

.maq-calculator__eyebrow,
.maq-result__eyebrow {
	margin: 0 0 0.45rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--maq-muted);
}

.maq-calculator__title,
.maq-result__title {
	margin: 0 0 0.75rem;
	line-height: 1.15;
}

.maq-calculator__form {
	display: grid;
	gap: 1rem;
}

.maq-fieldset {
	margin: 0;
	padding: clamp(1rem, 2vw, 1.4rem);
	border: 1px solid var(--maq-border);
	border-radius: 14px;
	background: var(--maq-bg);
}

.maq-fieldset legend {
	padding: 0 0.45rem;
	font-weight: 700;
	font-size: 1.02rem;
}

.maq-person-grid,
.maq-bottle-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.maq-field {
	display: grid;
	gap: 0.45rem;
}

.maq-field--compact {
	max-width: 420px;
}

.maq-field label {
	font-weight: 650;
}

.maq-field input,
.maq-field select {
	width: 100%;
	min-height: 46px;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--maq-border);
	border-radius: 10px;
	background: #fff;
	color: var(--maq-text);
	font: inherit;
}

.maq-field input:focus,
.maq-field select:focus {
	position: relative;
	z-index: 1;
	outline: none !important;
	border-color: var(--maq-focus) !important;
	box-shadow: inset 0 0 0 1px var(--maq-focus) !important;
}

.maq-choice input:focus-visible + span,
.maq-button:focus-visible,
.maq-stepper__button:focus-visible,
.maq-methodology summary:focus-visible {
	outline: 2px solid var(--maq-focus) !important;
	outline-offset: 2px;
}

.maq-stepper {
	display: grid;
	grid-template-columns: 44px minmax(64px, 1fr) 44px;
	align-items: stretch;
}

.maq-stepper input {
	border-radius: 0;
	text-align: center;
	-moz-appearance: textfield;
}

.maq-stepper input::-webkit-outer-spin-button,
.maq-stepper input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.maq-stepper__button {
	border: 1px solid var(--maq-border);
	background: var(--maq-soft);
	color: var(--maq-text);
	font: inherit;
	font-size: 1.25rem;
	font-weight: 700;
	cursor: pointer;
}

.maq-stepper__button:first-child {
	border-radius: 10px 0 0 10px;
	border-right: 0;
}

.maq-stepper__button:last-child {
	border-radius: 0 10px 10px 0;
	border-left: 0;
}

.maq-choice-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

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

.maq-choice {
	position: relative;
	cursor: pointer;
}

.maq-choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.maq-choice span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	padding: 0.8rem 1rem;
	text-align: center;
	border: 1px solid var(--maq-border);
	border-radius: 12px;
	background: #fff;
	transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.maq-choice input:checked + span {
	border-color: var(--maq-accent);
	background: var(--maq-soft);
	box-shadow: inset 0 0 0 1px var(--maq-accent);
}

.maq-choice:hover span {
	transform: translateY(-1px);
}

.maq-help {
	margin: 0.65rem 0 0;
	color: var(--maq-muted);
	font-size: 0.9rem;
	line-height: 1.5;
}

.maq-custom-size {
	margin-top: 0.55rem;
	padding: 0.75rem;
	border-radius: 10px;
	background: var(--maq-soft);
}

.maq-margin-option {
	padding: 1rem 1.1rem;
	border-radius: 14px;
	background: var(--maq-soft);
}

.maq-margin-option label {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	cursor: pointer;
}

.maq-margin-option input {
	width: 20px;
	height: 20px;
	margin-top: 0.15rem;
	flex: 0 0 auto;
	accent-color: var(--maq-focus);
}

.maq-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.78rem 1.15rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.maq-button:hover {
	transform: translateY(-1px);
	opacity: 0.92;
}

.maq-button--primary {
	width: fit-content;
	background: var(--maq-accent);
	color: var(--maq-accent-contrast);
}

.maq-button--secondary {
	border-color: var(--maq-border);
	background: #fff;
	color: var(--maq-text);
}

.maq-button--text {
	background: transparent;
	color: var(--maq-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.maq-calculator__errors {
	padding: 1rem 1.1rem;
	border: 1px solid #b42318;
	border-radius: 12px;
	background: #fff4f2;
	color: #7a271a;
}

.maq-calculator__errors ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}

.maq-result {
	margin-top: 2rem;
	padding: clamp(1.2rem, 3vw, 2rem);
	border-radius: var(--maq-radius);
	background: var(--maq-soft);
	scroll-margin-top: 2rem;
}

.maq-result__cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1.25rem;
}

.maq-result-card {
	padding: 1.1rem;
	border: 1px solid var(--maq-border);
	border-radius: 14px;
	background: #fff;
}

.maq-result-card h4 {
	margin: 0 0 0.35rem;
	font-size: 1rem;
}

.maq-result-card__main {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.25;
}

.maq-result-card dl {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.4rem 1rem;
	margin: 0;
	font-size: 0.88rem;
}

.maq-result-card dt {
	color: var(--maq-muted);
}

.maq-result-card dd {
	margin: 0;
	font-weight: 650;
	text-align: right;
}

.maq-result__note {
	margin: 1rem 0 0;
	font-weight: 650;
}

.maq-result__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 1.25rem;
}

.maq-copy-status {
	min-height: 1.5em;
	margin: 0.65rem 0 0;
	font-size: 0.9rem;
	line-height: 1.4;
	color: var(--maq-muted);
}

.maq-methodology {
	margin-top: 1rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--maq-border);
	border-radius: 12px;
	background: #fff;
}

.maq-methodology summary {
	font-weight: 750;
	cursor: pointer;
}

.maq-methodology div {
	padding-top: 0.75rem;
	color: var(--maq-muted);
	line-height: 1.5;
}

.maq-methodology p {
	margin: 0 0 0.75rem;
}

.maq-methodology__sources a {
	color: inherit;
	font-weight: 700;
}

.maq-disclaimer {
	margin: 1rem 0 0;
	font-size: 0.83rem;
	line-height: 1.45;
	color: var(--maq-muted);
}

[hidden] {
	display: none !important;
}

@media (max-width: 760px) {
	.maq-person-grid,
	.maq-bottle-grid,
	.maq-choice-grid,
	.maq-choice-grid--two,
	.maq-result__cards {
		grid-template-columns: 1fr;
	}

	.maq-button--primary {
		width: 100%;
	}

	.maq-result__actions .maq-button {
		width: 100%;
	}

	.maq-result-card dl {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}

	.maq-result-card dd {
		margin-bottom: 0.55rem;
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	.maq-sunscreen-calculator *,
	.maq-sunscreen-calculator *::before,
	.maq-sunscreen-calculator *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
