/* Public assessment form — standalone centered card. */

body {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: var(--space-5) var(--space-4);
	min-height: 100vh;
	background:
		radial-gradient(circle at 50% 25%, color-mix(in oklch, var(--gold) 8%, transparent), transparent 55%),
		var(--bg-base);
}

.form-wrap {
	width: 100%;
	display: flex;
	justify-content: center;
}

.card.form-card {
	background: var(--surface-1);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: var(--space-7) var(--space-6);
	width: 100%;
	max-width: 480px;
	box-shadow: var(--shadow-md);
}

.form-card .login-brand-logo {
	display: block;
	height: 44px;
	width: auto;
	object-fit: contain;
	margin: 0 auto var(--space-4);
}

.form-card h1 {
	font-size: 1.6rem;
	text-align: center;
	margin-bottom: var(--space-2);
}

.form-intro {
	color: var(--text-secondary);
	text-align: center;
	font-size: 0.92rem;
	margin-bottom: var(--space-5);
}

.form-card label {
	display: block;
	font-size: 0.82rem;
	color: var(--text-secondary);
	margin-bottom: var(--space-1);
	margin-top: var(--space-4);
	font-weight: 500;
}

.form-card .req {
	color: var(--gold);
}

.form-card input {
	width: 100%;
	background: var(--surface-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: var(--space-3);
	color: var(--text-primary);
	font-size: 0.92rem;
	font-family: inherit;
	min-height: 44px;
	transition: border-color var(--transition-fast);
}

.form-card input:focus {
	border-color: var(--gold);
}

/* Honeypot — visually hidden but reachable by bots. */
.hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

.error {
	color: var(--pill-fail-fg);
	font-size: 0.85rem;
	margin-bottom: var(--space-4);
	background: var(--pill-fail-bg);
	padding: var(--space-3);
	border-radius: var(--radius-sm);
	border: 1px solid color-mix(in oklch, var(--danger) 30%, transparent);
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 0.95rem;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	min-height: 44px;
	letter-spacing: 0.01em;
	transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn:active {
	transform: translateY(1px);
}

.btn-primary {
	width: 100%;
	background: var(--gold);
	color: var(--bg-base);
	padding: var(--space-3);
	margin-top: var(--space-5);
}

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

.btn-primary[disabled] {
	opacity: 0.6;
	cursor: default;
}

.thank-you {
	text-align: center;
	padding: var(--space-5) 0;
	color: var(--text-secondary);
}

.thank-you iconify-icon {
	color: var(--gold);
	margin-bottom: var(--space-3);
}

.thank-you h2 {
	font-size: 1.5rem;
	margin-bottom: var(--space-3);
}

.thank-you p {
	font-size: 0.95rem;
}

/* ── Searchable select (country / nationality) ───────────────────────── */
.ss { position: relative; }

.ss-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	background: var(--surface-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: var(--space-3);
	min-height: 44px;
	color: var(--text-primary);
	font-family: inherit;
	font-size: 0.92rem;
	text-align: left;
	cursor: pointer;
	transition: border-color var(--transition-fast);
}

.ss-trigger:hover { border-color: var(--border-subtle); }
.ss-trigger:focus-visible,
.ss-trigger[aria-expanded="true"] { outline: none; border-color: var(--gold); }

.ss-value {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ss-value.ss-ph { color: var(--text-muted); }

.ss-arrow {
	flex-shrink: 0;
	color: var(--text-muted);
	font-size: 1.1rem;
	transition: transform var(--transition-fast);
}
.ss-trigger[aria-expanded="true"] .ss-arrow { transform: rotate(180deg); }

/* Click-anywhere-outside backdrop. */
.ss-backdrop { position: fixed; inset: 0; z-index: 40; }

.ss-panel {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 50;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}

.ss-panel .ss-filter {
	width: 100%;
	min-height: 0;
	background: var(--surface-3);
	border: none;
	border-bottom: 1px solid var(--border);
	border-radius: 0;
	padding: var(--space-3);
	color: var(--text-primary);
	font-family: inherit;
	font-size: 0.9rem;
	outline: none;
}
.ss-panel .ss-filter::placeholder { color: var(--text-muted); }

.ss-options {
	list-style: none;
	margin: 0;
	padding: var(--space-1) 0;
	max-height: 260px;
	overflow-y: auto;
}

.ss-option {
	padding: var(--space-2) var(--space-3);
	color: var(--text-secondary);
	font-size: 0.9rem;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ss-option:hover { background: var(--gold-bg); color: var(--text-primary); }
.ss-option.selected { background: var(--gold-bg); color: var(--gold); }

/* "(optional)" label marker. */
.form-card .opt-note {
	color: var(--text-muted);
	font-weight: 400;
}

/* ── Tagline + closing copy ───────────────────────────────────────────── */
.tagline {
	text-align: center;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: var(--space-4);
}

.confidence {
	text-align: center;
	font-size: 0.82rem;
	color: var(--text-secondary);
	margin-top: var(--space-3);
}

.closing {
	text-align: center;
	font-size: 0.82rem;
	color: var(--text-muted);
	margin-top: var(--space-2);
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.section {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: var(--space-5);
	margin-top: var(--space-5);
}

.section-head {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-bottom: var(--space-2);
}

.section-num {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--gold);
	color: var(--bg-base);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.95rem;
}

.section-title {
	font-family: var(--font-display);
	font-size: 1.15rem;
	margin: 0;
}

/* The first label inside a section shouldn't double-space against the head. */
.section > label:first-of-type {
	margin-top: var(--space-3);
}

/* ── Native selects + textarea (match .form-card input) ──────────────── */
.form-card select,
.form-card textarea {
	width: 100%;
	background: var(--surface-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: var(--space-3);
	color: var(--text-primary);
	font-size: 0.92rem;
	font-family: inherit;
	transition: border-color var(--transition-fast);
}

.form-card select {
	min-height: 44px;
	cursor: pointer;
}

.form-card select:focus,
.form-card textarea:focus {
	border-color: var(--gold);
}

.form-card textarea {
	min-height: 96px;
	resize: vertical;
	line-height: 1.5;
}

/* ── Option rows (radio + checkbox) ──────────────────────────────────── */
.opts {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.opt {
	background: var(--surface-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: var(--space-3);
	color: var(--text-secondary);
	font-size: 0.92rem;
	cursor: pointer;
	transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.opt:hover {
	border-color: var(--gold);
}

.opt.checked {
	border-color: var(--gold);
	background: var(--gold-bg);
	color: var(--text-primary);
}

/* "Other" reveal + field hints. */
.other-text {
	margin-top: var(--space-3);
}

.hint {
	color: var(--text-muted);
	font-size: 0.8rem;
	margin-top: calc(-1 * var(--space-1));
	margin-bottom: var(--space-2);
}

/* ── Multi-select option check (used by SearchableMultiSelect) ───────── */
.ss-option-multi {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.ss-check {
	flex-shrink: 0;
	font-size: 1rem;
	color: var(--gold);
}

/* ── Field grid — one column on mobile, two per row on desktop ────────── */
.fields {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-4);
	margin-top: var(--space-3);
}

.field {
	min-width: 0; /* allow grid cells to shrink instead of overflowing */
}

.field label {
	margin-top: 0; /* the grid row gap handles vertical rhythm */
}

/* ── Desktop (≥768px): full-width card, two fields / option-rows per row ─ */
@media (min-width: 768px) {
	body {
		padding: var(--space-6);
	}
	.card.form-card {
		max-width: 1100px;
		padding: var(--space-7) var(--space-8);
	}
	.fields {
		grid-template-columns: 1fr 1fr;
	}
	.opts {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}
}
