:root {
	--primary: #2563eb;
	--primary-strong: #1d4ed8;
	--primary-glow: rgba(37, 99, 235, 0.28);
	--text: #0f172a;
	--text-inv: #f8fafc;
	--muted: #64748b;
	--bg-start: #0f172a;
	--bg-mid: #1e293b;
	--surface: #ffffff;
	--surface-tinted: #f1f5f9;
	--line: #e2e8f0;
	--line-strong: #cbd5e1;
	--danger: #dc2626;
	--success: #16a34a;
	--shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	--shadow-card: 0 4px 24px rgba(15, 23, 42, 0.12);
	--shadow-btn: 0 8px 24px rgba(37, 99, 235, 0.38);
}

* {
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
	font-style: normal;
	text-decoration: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body,
html {
	min-height: 100%;
}

.body {
	min-height: 100vh;
	background: #f1f5f9;
	color: var(--text);
}

.app {
	width: 100%;
	min-height: 100vh;
	padding: 28px;
	display: grid;
	gap: 22px;
	align-content: start;
}

/* ── Header ── */

.portal-header {
	width: min(1280px, 100%);
	margin: 0 auto;
	background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #4f46e5 100%);
	border-radius: 24px;
	padding: 28px 34px;
	box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
	position: relative;
	overflow: hidden;
}

.portal-header::before {
	content: "";
	position: absolute;
	top: -60%;
	right: -10%;
	width: 480px;
	height: 480px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
	pointer-events: none;
}

.portal-header::after {
	content: "";
	position: absolute;
	bottom: -40%;
	left: 20%;
	width: 320px;
	height: 320px;
	background: radial-gradient(circle, rgba(79, 70, 229, 0.3) 0%, transparent 70%);
	pointer-events: none;
}

.portal-header__brand {
	display: flex;
	align-items: center;
	gap: 20px;
	position: relative;
	z-index: 1;
}

.portal-header__logo {
	width: 300px;
	max-width: min(42vw, 300px);
	height: auto;
	flex: 0 0 auto;
	object-fit: contain;
	filter: brightness(0) invert(1);
	opacity: 0.95;
}

.portal-header__title {
	color: #fff;
	font-size: clamp(24px, 2.6vw, 36px);
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.03em;
	word-break: break-word;
}

/* ── Form wrapper ── */

.form-wrapper {
	width: min(1280px, 100%);
	margin: 0 auto;
	background: var(--surface);
	padding: 36px;
	border-radius: 24px;
	box-shadow: var(--shadow);
}

.form-wrapper-cover-image {
	width: calc(100% + 72px);
	margin-left: -36px;
	margin-top: -36px;
	max-height: 320px;
	object-fit: cover;
	border-radius: 24px 24px 0 0;
	display: block;
	margin-bottom: 28px;
}

.form-wrapper-form__description {
	margin-top: 0;
	font-size: clamp(17px, 1.6vw, 21px);
	line-height: 1.55;
	color: var(--muted);
	max-width: 900px;
}

.form-wrapper-form__questions__wrapper {
	margin-top: 32px;
	width: 100%;
	display: grid;
	gap: 30px;
}

.form__page {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 44px;
}

.form__page-hide {
	display: none;
}

.form-page__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.form-page__actions--top {
	margin-bottom: 16px;
}

.form-page__actions--bottom {
	margin-top: 20px;
	justify-content: flex-end;
}

/* ── Question card ── */

.form-wrapper-form__questions__wrapper-question {
	padding: 26px 28px;
	border-radius: 20px;
	background: var(--surface);
	border: 2px solid #dbe5f1;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.11);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.form-wrapper-form__questions__wrapper-question:hover {
	border-color: #bfdbfe;
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.15);
}

.form-wrapper-form__questions__wrapper-question + .form-wrapper-form__questions__wrapper-question {
	margin-top: 0;
}

.form-wrapper-form__questions__wrapper-question__meta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	background: #eff6ff;
	color: var(--primary);
	border: 1px solid #bfdbfe;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.form-wrapper-form__questions__wrapper-question__title {
	margin-top: 14px;
	font-size: clamp(22px, 2vw, 30px);
	line-height: 1.15;
	letter-spacing: -0.025em;
	font-weight: 800;
	word-break: break-word;
	color: var(--text);
}

.form-wrapper-form__questions__wrapper-question__description {
	margin-top: 10px;
	font-size: 17px;
	line-height: 1.55;
	color: var(--muted);
}

.form-wrapper-form__questions__wrapper-question__image {
	display: block;
	width: 100%;
	max-height: 500px;
	margin-top: 16px;
	border-radius: 16px;
	object-fit: cover;
	border: 1px solid var(--line);
	box-shadow: var(--shadow-card);
}

.form-wrapper-form__questions__wrapper-question__input,
.form-wrapper-form__questions__wrapper-question__textarea,
.form-wrapper-form__questions__wrapper-question__listbox,
.form-wrapper-form__questions__wrapper-question__radio,
.form-wrapper-form__questions__wrapper-question__checkbox {
	margin-top: 16px;
}

/* ── Inputs ── */

.ui__input,
.ui__textarea,
.ui__listbox-selected,
.personal-data-modal__input {
	background: var(--surface-tinted);
	border: 2px solid var(--line);
	color: var(--text);
	border-radius: 14px;
	outline: none;
	width: 100%;
	font-size: 17px;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ui__input,
.ui__listbox-selected,
.personal-data-modal__input {
	height: 54px;
	padding: 0 16px;
}

.ui__textarea {
	padding: 14px 16px;
	height: 164px;
	resize: vertical;
	min-height: 120px;
}

.ui__input:focus,
.ui__textarea:focus,
.ui__listbox-selected:focus,
.personal-data-modal__input:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 4px var(--primary-glow);
	background: #fff;
}

/* ── Radio & Checkbox ── */

.ui__radio,
.ui__checkbox {
	display: grid;
	gap: 10px;
}

.ui__radio-item__wrapper,
.ui__checkbox-item__wrapper {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 18px;
	border-radius: 14px;
	border: 2px solid var(--line);
	background: var(--surface-tinted);
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.ui__radio-item__wrapper:hover,
.ui__checkbox-item__wrapper:hover {
	border-color: #93c5fd;
	background: #eff6ff;
	box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

.ui__radio-item__wrapper:has(input:checked),
.ui__checkbox-item__wrapper:has(input:checked) {
	border-color: var(--primary);
	background: #eff6ff;
	box-shadow: 0 4px 16px rgba(37, 99, 235, 0.14);
}

.ui__radio-item__wrapper__input,
.ui__checkbox-item__wrapper__input {
	width: 22px;
	height: 22px;
	accent-color: var(--primary);
	margin-top: 2px;
	flex: 0 0 auto;
	cursor: pointer;
}

.ui__radio-item__wrapper__label,
.ui__checkbox-item__wrapper__label {
	font-size: 18px;
	line-height: 1.45;
	color: var(--text);
}

/* ── Listbox ── */

.ui__listbox {
	display: grid;
	gap: 0;
	position: relative;
}

.ui__listbox-search-field {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ui__listbox-search {
	padding-left: 16px !important;
	padding-right: 16px !important;
	flex: 1 1 auto;
}

.ui__listbox-clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	border: 2px solid var(--line);
	padding: 0;
	border-radius: 12px;
	background: var(--surface-tinted);
	color: var(--muted);
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.ui__listbox-clear:hover {
	color: var(--text);
	border-color: var(--line-strong);
	background: #fff;
}

.ui__listbox-clear--visible {
	opacity: 1;
	pointer-events: auto;
}

.ui__listbox-clear-icon {
	width: 16px;
	height: 16px;
	display: block;
}

.ui__listbox-clear-icon path {
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
}

.ui__listbox-dropdown {
	position: absolute;
	top: 64px;
	left: 0;
	right: 0;
	z-index: 20;
	padding-top: 8px;
}

.ui__listbox-results {
	display: grid;
	gap: 6px;
	max-height: 300px;
	overflow-y: auto;
	padding: 8px;
	border: 2px solid var(--line-strong);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.ui__listbox-option {
	width: 100%;
	padding: 12px 14px;
	border: 2px solid transparent;
	border-radius: 12px;
	background: transparent;
	color: var(--text);
	text-align: left;
	font-size: 16px;
	line-height: 1.35;
	white-space: normal;
	word-break: break-word;
	cursor: pointer;
	transition: background 0.14s ease, border-color 0.14s ease;
}

.ui__listbox-option:hover {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.ui__listbox-empty {
	padding: 12px 14px;
	color: var(--muted);
	font-size: 15px;
}

.ui__listbox-hint {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--muted);
}

.ui__listbox-state {
	margin-top: 10px;
	padding: 11px 14px;
	border-radius: 12px;
	background: #eff6ff;
	border: 2px solid #bfdbfe;
	color: var(--text);
	font-size: 15px;
	line-height: 1.4;
}

.ui__listbox-state span {
	font-weight: 600;
	color: var(--primary);
}

/* ── Buttons ── */

.form-wrapper-submit__button {
	min-height: 54px;
	padding: 0 28px;
	border-radius: 14px;
	background: var(--primary);
	border: none;
	color: #fff;
	cursor: pointer;
	transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.01em;
	box-shadow: var(--shadow-btn);
}

.form-wrapper-submit__button:hover {
	background: var(--primary-strong);
	box-shadow: 0 12px 32px rgba(37, 99, 235, 0.48);
	transform: translateY(-2px);
}

.pagination-back__button {
	background: #fff;
	color: var(--text);
	border: 2px solid var(--line-strong);
	box-shadow: var(--shadow-card);
}

.pagination-back__button:hover {
	border-color: #94a3b8;
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
}

/* ── Errors & states ── */

.error-text {
	color: var(--danger);
	font-size: 15px;
	line-height: 1.4;
	font-weight: 500;
}

.form-wrapper-form__questions__wrapper-question__error {
	margin-bottom: 10px;
	padding: 11px 14px;
	border-radius: 12px;
	background: #fef2f2;
	border: 2px solid #fecaca;
	color: var(--danger);
	font-weight: 500;
	font-size: 14px;
}

.form__completed-success__text,
.form__completed-error__text {
	margin-top: 20px;
	padding: 22px 26px;
	border-radius: 20px;
	font-size: 26px;
	font-weight: 700;
	box-shadow: var(--shadow-card);
}

.form__completed-success__text {
	color: var(--success);
	background: #f0fdf4;
	border: 2px solid #bbf7d0;
}

.form__completed-error__text {
	color: var(--danger);
	background: #fef2f2;
	border: 2px solid #fecaca;
}

.submit__disabled {
	cursor: not-allowed;
	opacity: 0.5;
	transform: none !important;
}

/* ── Links ── */

.link,
.form-career-result__link,
.personal-data-modal__contact-link {
	color: var(--primary);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 500;
}

.link:hover,
.form-career-result__link:hover,
.personal-data-modal__contact-link:hover {
	color: var(--primary-strong);
}

/* ── Career result ── */

.form-career-result {
	margin-top: 20px;
	padding: 28px;
	border-radius: 20px;
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: var(--shadow-card);
}

.form-career-result__title {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.12;
	color: var(--text);
}

.form-career-result__image {
	display: block;
	width: 100%;
	max-width: 900px;
	max-height: 400px;
	object-fit: cover;
	border-radius: 16px;
	margin-top: 16px;
	border: 1px solid var(--line);
}

.form-career-result__description {
	margin-top: 14px;
	font-size: 18px;
	line-height: 1.55;
	color: var(--text);
}

.form-career-result__link {
	display: inline-block;
	margin-top: 14px;
	font-size: 16px;
	font-weight: 600;
}

/* ── Personal data modal ── */

.personal-data-modal {
	position: fixed;
	inset: 0;
	background: rgba(10, 15, 30, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 3vw, 36px);
	z-index: 9999;
	backdrop-filter: blur(4px);
}

.personal-data-modal__content {
	width: min(860px, 100%);
	max-height: 90vh;
	overflow-y: auto;
	background: var(--surface);
	border-radius: 24px;
	padding: clamp(22px, 2.5vw, 36px);
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
	border: 1px solid var(--line);
}

.personal-data-modal__title {
	font-size: clamp(24px, 2vw, 32px);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var(--text);
}

.personal-data-modal__title--long {
	font-size: clamp(17px, 1.25vw, 23px);
	line-height: 1.55;
	font-weight: 400;
	color: var(--muted);
}

.personal-data-modal__description {
	margin-top: 10px;
	font-size: 16px;
	color: var(--muted);
	line-height: 1.6;
}

.personal-data-modal__input {
	margin-top: 12px;
}

.personal-data-modal__comment {
	margin-top: 12px;
	padding: 14px 16px;
	border-radius: 14px;
	background: var(--surface-tinted);
	color: var(--text);
	font-size: 15px;
	line-height: 1.55;
	white-space: normal;
	overflow-wrap: anywhere;
	border: 1px solid var(--line);
}

.personal-data-modal__comment--contacts {
	background: #f8fafc;
	border-color: var(--line-strong);
}

.personal-data-modal__contact-title {
	font-size: 17px;
	font-weight: 700;
	color: var(--text);
	margin-bottom: 6px;
}

.personal-data-modal__contact-body {
	font-size: 15px;
	line-height: 1.6;
	color: var(--muted);
}

.personal-data-modal__error {
	color: var(--danger);
	font-size: 14px;
	font-weight: 500;
	min-height: 20px;
	margin-top: 10px;
}

.personal-data-modal__actions {
	display: flex;
	gap: 12px;
	margin-top: 12px;
	justify-content: flex-end;
}

.personal-data-modal__button {
	min-height: 50px;
	padding: 0 22px;
	border-radius: 12px;
	border: none;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.personal-data-modal__button--primary {
	background: var(--primary);
	color: #fff;
	box-shadow: var(--shadow-btn);
}

.personal-data-modal__button--primary:hover {
	background: var(--primary-strong);
	transform: translateY(-1px);
}

.personal-data-modal__button--secondary {
	background: var(--surface-tinted);
	color: var(--text);
	border: 2px solid var(--line-strong);
}

.personal-data-modal__button--secondary:hover {
	border-color: #94a3b8;
}

/* ── Form error ── */

.form-wrapper-error {
	padding: 22px 26px;
	border-radius: 20px;
	background: #fef2f2;
	border: 2px solid #fecaca;
	color: var(--danger);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.45;
	box-shadow: var(--shadow-card);
}

/* ── File upload ── */

.ui__scale {
	display: grid;
	gap: 12px;
	margin-top: 16px;
}

.ui__scale-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ui__scale-option {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
}

.ui__scale-option:has(input:checked) {
	border-color: var(--primary);
	background: #eff6ff;
	color: var(--primary);
}

.ui__scale-option input {
	margin: 0 7px 0 0;
}

.ui__scale-labels {
	display: flex;
	justify-content: space-between;
	gap: 18px;
	color: var(--muted);
	font-size: 14px;
}

.ui__range {
	display: grid;
	gap: 10px;
	margin-top: 18px;
}

.ui__range-value {
	justify-self: center;
	min-width: 56px;
	padding: 8px 14px;
	border-radius: 12px;
	background: #eff6ff;
	color: var(--primary);
	font-size: 20px;
	font-weight: 700;
	text-align: center;
}

.ui__range-input {
	width: 100%;
	height: 8px;
	margin: 10px 0;
	border-radius: 999px;
	background: var(--border);
	accent-color: var(--primary);
	cursor: pointer;
}

.ui__range-input::-webkit-slider-thumb {
	width: 24px;
	height: 24px;
	cursor: grab;
}

.ui__range-input:active::-webkit-slider-thumb {
	cursor: grabbing;
}

.ui__range-labels {
	display: flex;
	justify-content: space-between;
	color: var(--muted);
	font-size: 15px;
	font-weight: 600;
}

.ui__other-input,
.ui__answer-rating {
	margin-top: 16px;
}

.ui__answer-rating {
	padding-top: 16px;
	border-top: 1px solid var(--border);
}

.ui__answer-rating-title {
	margin: 0;
	font-weight: 600;
}

.ui__matrix-wrapper {
	overflow-x: auto;
	margin-top: 16px;
}

.ui__matrix {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
}

.ui__matrix th,
.ui__matrix td {
	padding: 12px;
	border: 1px solid var(--border);
	text-align: center;
}

.ui__matrix th[scope="row"] {
	text-align: left;
	font-weight: 500;
}

.ui__matrix input {
	width: 20px;
	height: 20px;
	accent-color: var(--primary);
}

.ui__file-upload {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.ui__file-upload__input {
	display: none;
}

.ui__file-upload__label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 12px;
	background: var(--primary);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: var(--shadow-btn);
	transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
	white-space: nowrap;
}

.ui__file-upload__label:hover {
	background: var(--primary-strong);
	box-shadow: 0 10px 28px rgba(37, 99, 235, 0.44);
	transform: translateY(-1px);
}

.ui__file-upload__status {
	font-size: 15px;
	color: var(--muted);
	min-width: 0;
	word-break: break-all;
}

.ui__file-upload__status--success {
	color: var(--success);
	font-weight: 600;
}

.ui__file-upload__status--error {
	color: var(--danger);
	font-weight: 500;
}

/* ── Responsive ── */

@media (max-width: 900px) {
	.app {
		padding: 14px;
		gap: 14px;
	}

	.portal-header {
		border-radius: 18px;
		padding: 20px 20px;
	}

	.portal-header__logo {
		width: min(220px, 48vw);
	}

	.portal-header__title {
		font-size: clamp(18px, 4.5vw, 24px);
		line-height: 1.15;
		letter-spacing: -0.02em;
	}

	.form-wrapper {
		border-radius: 18px;
		padding: 20px 18px;
	}

	.form-wrapper-form__questions__wrapper-question {
		padding: 20px 18px;
		border-radius: 16px;
	}

	.form-wrapper-form__questions__wrapper {
		gap: 20px;
	}

	.form__page {
		gap: 26px;
	}

	.form-page__actions,
	.personal-data-modal__actions {
		flex-direction: column;
	}

	.form-wrapper-submit__button,
	.personal-data-modal__button {
		width: 100%;
		justify-content: center;
	}

	.ui__listbox-search-field {
		flex-wrap: nowrap;
	}

	.ui__listbox-clear {
		flex: 0 0 36px;
		width: 36px;
		height: 36px;
	}
}
