html,
body {
	overflow: hidden;
	width: 100%;
	height: 100%;
	margin: 0;
	font-size: clamp(14px, 2vmin, 22px);
	font-family: Arial, sans-serif;
	background: white;
}

* {
	box-sizing: border-box;
}

li {
	list-style: none;
}

/* SweetAlert */
.swal-modal {
	width: min(85vw, 650px);
}
.swal-title {
	text-align: center;
	font-size: clamp(22px, 2.2vmin, 28px);
	background: white;
}

.swal-text {
	text-align: center;
	/*font-size: clamp(20px, 2vmin, 24px);*/
	font-size: clamp(22px, 2.2vmin, 28px);
	line-height: 1.8;
	background: white;
}

.confirmation-swal .swal-text {
	text-align: left;
	font-size: clamp(20px, 2vmin, 24px);
	line-height: 1.5;
}

.swal-footer {
	font-size: clamp(20px, 2vmin, 24px);
	background: white;
}

.swal-button {
	font-size: clamp(18px, 1.7vmin, 22px);
	padding: 5px 20px;
	border: 1px solid gray;
	border-radius: 4px;
}

/* Main page container */
.container {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	text-align: center;
	background: white;
}

/*
    Legacy layout classes.
    Keep these because older pages may still use them.
*/
.ca {
	padding: 20px 20px;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	transform: translate(-50%, -50%);
	text-align: center;
}

.cb {
	position: relative;
	left: 50%;
	width: 100%;
	transform: translate(-50%, 0%);
	text-align: center;
}

.ckbox {
	position: absolute;
	padding: 0 20px;
	text-align: left;
}

.img {
	max-width: 100%;
	height: auto;
}

hr {
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;
}

.hr-dotted {
	border: 0;
	border-top: 1px dotted black;
}

.hr-dashed {
	border: 0;
	border-top: 1px dashed black;
}

/* Buttons */
button,
input[type="submit"],
input[type="button"] {
	font-size: clamp(14px, 2vmin, 20px);
	background-color: rgb(91, 151, 203);
	color: white;
	margin: 5px;
	padding: 4px 20px;
	border: 3px solid rgb(91, 151, 203);
	border-radius: 4px;
	cursor: pointer;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
	background-color: rgb(91, 151, 203);
	color: white;
	border-color: rgb(10, 99, 233);
}

/* Forms */
form {
	display: inline;
	text-align: center;
}

input[type="text"],
select {
	width: min(50vmin, 100%);
	font-size: clamp(12px, 2vmin, 18px);
	text-align: center;
	margin: 0;
	padding: 5px 8px;
	display: inline-block;
	border: 3px solid #ccc;
	border-radius: 4px;
}

input[type="checkbox"],
input[type="radio"] {
	width: clamp(14px, 2vmin, 20px);
	height: clamp(14px, 2vmin, 20px);
}

/* -------------------------------------------------
   Shared responsive layout for experiment pages
   ------------------------------------------------- */

.page {
	width: min(94vw, 1200px);
	height: min(94vh, 850px);
	margin: 3vh auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: clamp(8px, 1.5vh, 18px);
	background: white;
}

.instructions {
	width: 100%;
	text-align: left;
	line-height: 1.35;
	font-size: clamp(18px, 2.5vmin, 28px);
	/*font-size: clamp(13px, 1.9vmin, 21px);*/
	background: white;
}

.info-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(12px, 2vw, 30px);
	min-height: 0;
	background: white;
}

.person-card {
	border: 1px solid #bbb;
	border-radius: 8px;
	padding: clamp(10px, 1.6vmin, 20px);
	min-width: 0;
	background: white;
}

.person-title {
	font-weight: bold;
	text-align: center;
	margin-bottom: clamp(8px, 1.4vh, 16px);
	font-size: clamp(14px, 2vmin, 22px);
	background: white;
}

.field-row {
	display: grid;
	grid-template-columns: minmax(90px, 30%) minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	margin-bottom: clamp(7px, 1.2vh, 14px);
	background: white;
}

.field-label,
.field-row label {
	text-align: right;
	white-space: nowrap;
	background: white;
}

.field-row input[type="text"],
.field-row select {
	width: 100%;
	min-width: 0;
	height: clamp(28px, 4.3vh, 42px);
	font-size: clamp(12px, 1.7vmin, 18px);
	text-align: left;
	border: 1px solid black;
	padding: 4px 7px;
}

.gender-row {
	display: grid;
	grid-template-columns: minmax(90px, 30%) minmax(0, 1fr);
	gap: 10px;
	align-items: start;
	background: white;
}

.gender-options {
	text-align: left;
	background: white;
}

.gender-options label {
	display: block;
	margin-bottom: clamp(2px, 0.5vh, 6px);
	line-height: 1.2;
	white-space: nowrap;
	background: white;
}

.other-line {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 5px;
	align-items: center;
	background: white;
}

.other-line input[type="text"] {
	width: 100%;
	height: clamp(25px, 3.8vh, 38px);
}

.button-row {
	text-align: center;
	background: white;
}

.next-button {
	font-size: clamp(15px, 2.2vmin, 24px);
	padding: 5px 22px;
}

/* Narrow screens */
@media (max-width: 800px) {
	.page {
		width: 97vw;
		height: 97vh;
		margin: 1.5vh auto;
		gap: 7px;
		font-size: clamp(10px, 1.55vmin, 15px);
	}

	.instructions {
		font-size: clamp(11px, 1.65vmin, 16px);
	}

	.info-grid {
		gap: 8px;
	}

	.person-card {
		padding: 8px;
	}

	.field-row,
	.gender-row {
		grid-template-columns: minmax(70px, 32%) minmax(0, 1fr);
		gap: 5px;
	}

	.field-row input[type="text"],
	.field-row select {
		height: clamp(24px, 4vh, 34px);
		font-size: clamp(10px, 1.5vmin, 14px);
	}

	.gender-options label {
		white-space: normal;
	}
}

/* Short browser windows */
@media (max-height: 650px) {
	.page {
		gap: 5px;
		font-size: clamp(10px, 1.45vmin, 14px);
	}

	.instructions {
		line-height: 1.2;
		font-size: clamp(10px, 1.55vmin, 15px);
	}

	.person-title {
		margin-bottom: 5px;
	}

	.field-row {
		margin-bottom: 5px;
	}

	.person-card {
		padding: 7px;
	}

	.field-row input[type="text"],
	.field-row select {
		height: 26px;
	}

	.next-button {
		padding: 3px 18px;
	}
}
