/* МАСГ — глибинне анкетування. Стилі форми. */

.masg-survey {
	--masg-bg: #0f1b2d;
	--masg-card: #16253c;
	--masg-line: #27405f;
	--masg-gold: #c9a961;
	--masg-gold-soft: rgba(201, 169, 97, .14);
	--masg-text: #eaf0f8;
	--masg-mute: #93a6c0;
	--masg-err: #ff8c7a;
	--masg-ok: #7fd1a0;

	max-width: 720px;
	margin: 0 auto;
	padding: 0 16px;
	color: var(--masg-text);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.masg-survey *,
.masg-survey *::before,
.masg-survey *::after { box-sizing: border-box; }

.masg-card-wrap {
	background: var(--masg-card);
	border: 1px solid var(--masg-line);
	border-radius: 18px;
	padding: 28px;
	margin: 24px 0;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

/* ---------- Прогрес ---------- */

.masg-head { margin-bottom: 22px; }

.masg-block-name {
	font-size: 12px;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--masg-gold);
	font-weight: 700;
	margin-bottom: 10px;
}

.masg-bar {
	height: 4px;
	background: var(--masg-line);
	border-radius: 4px;
	overflow: hidden;
}

.masg-bar-fill {
	height: 100%;
	background: var(--masg-gold);
	border-radius: 4px;
	transition: width .35s ease;
}

/* ---------- Текст питання ---------- */

.masg-q-text {
	font-size: 22px;
	line-height: 1.35;
	font-weight: 700;
	margin: 0 0 20px;
	color: var(--masg-text);
}

.masg-info-title {
	font-size: 24px;
	font-weight: 800;
	margin: 0 0 14px;
	color: var(--masg-gold);
	line-height: 1.25;
}

.masg-info-text {
	margin: 0 0 12px;
	color: var(--masg-mute);
	font-size: 16px;
}

/* ---------- Варіанти ---------- */

.masg-opt {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 13px 16px;
	margin-bottom: 9px;
	border: 1px solid var(--masg-line);
	border-radius: 12px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
	background: rgba(255, 255, 255, .02);
}

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

.masg-opt.is-on {
	border-color: var(--masg-gold);
	background: var(--masg-gold-soft);
}

.masg-opt input[type="radio"],
.masg-opt input[type="checkbox"] {
	margin: 4px 0 0;
	accent-color: var(--masg-gold);
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	cursor: pointer;
}

.masg-opt-text { flex: 1; font-size: 16px; }

.masg-other-text {
	flex: 1;
	background: transparent;
	border: none;
	border-bottom: 1px dashed var(--masg-line);
	color: var(--masg-text);
	font-size: 16px;
	padding: 2px 0;
	outline: none;
	font-family: inherit;
}

.masg-other-text:focus { border-bottom-color: var(--masg-gold); }

/* ---------- Шкали ---------- */

.masg-scale {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 6px;
}

.masg-scale-btn {
	appearance: none;
	border: 1px solid var(--masg-line);
	background: rgba(255, 255, 255, .02);
	color: var(--masg-text);
	border-radius: 9px;
	padding: 12px 0;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: border-color .15s, background .15s, color .15s;
}

.masg-scale-btn:hover { border-color: var(--masg-gold); }

.masg-scale-btn.is-on {
	background: var(--masg-gold);
	border-color: var(--masg-gold);
	color: #16253c;
}

.masg-scale-sm .masg-scale-btn { padding: 8px 0; font-size: 13px; }

.masg-scale-legend {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--masg-mute);
	margin-top: 8px;
}

.masg-matrix-row {
	padding: 14px 0;
	border-bottom: 1px solid var(--masg-line);
}

.masg-matrix-row:last-child { border-bottom: none; }

.masg-matrix-label {
	font-size: 15px;
	margin-bottom: 10px;
	line-height: 1.4;
}

/* ---------- Текстові поля ---------- */

.masg-textarea,
.masg-text {
	width: 100%;
	background: rgba(255, 255, 255, .03);
	border: 1px solid var(--masg-line);
	border-radius: 12px;
	color: var(--masg-text);
	font-size: 16px;
	font-family: inherit;
	line-height: 1.5;
	padding: 14px 16px;
	outline: none;
	resize: vertical;
	transition: border-color .15s;
}

.masg-textarea:focus,
.masg-text:focus { border-color: var(--masg-gold); }

.masg-textarea::placeholder,
.masg-text::placeholder { color: #6b809c; }

.masg-hint {
	font-size: 13px;
	color: var(--masg-mute);
	margin-top: 8px;
}

.masg-hint.is-ok { color: var(--masg-ok); }

.masg-hint-center {
	font-size: 13px;
	color: var(--masg-mute);
	text-align: center;
	margin-top: 14px;
}

/* ---------- Помилка ---------- */

.masg-error {
	display: none;
	color: var(--masg-err);
	font-size: 14px;
	margin-top: 14px;
}

.masg-error.is-on { display: block; }

/* ---------- Кнопки ---------- */

.masg-nav {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 26px;
	padding-top: 20px;
	border-top: 1px solid var(--masg-line);
}

.masg-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 11px;
	padding: 13px 26px;
	font-size: 16px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: opacity .15s, background .15s;
}

.masg-btn-main {
	background: var(--masg-gold);
	color: #14213a;
}

.masg-btn-main:hover { opacity: .88; color: #14213a; }

.masg-btn-ghost {
	background: transparent;
	border-color: var(--masg-line);
	color: var(--masg-mute);
}

.masg-btn-ghost:hover { border-color: var(--masg-gold); color: var(--masg-text); }

.masg-btn-lg {
	width: 100%;
	text-align: center;
	padding: 17px 26px;
	font-size: 17px;
	margin-top: 22px;
}

/* ---------- Інтро і фінал ---------- */

.masg-intro-title {
	font-size: 30px;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 16px;
	color: var(--masg-text);
}

.masg-bonus {
	background: var(--masg-gold-soft);
	border: 1px solid var(--masg-gold);
	border-radius: 12px;
	padding: 14px 18px;
	margin-top: 20px;
	font-weight: 600;
	font-size: 16px;
}

/* ---------- Мобільні ---------- */

@media (max-width: 600px) {
	.masg-survey { font-size: 16px; padding: 0 14px; }
	.masg-card-wrap { padding: 20px 16px; border-radius: 14px; margin: 14px 0; }
	.masg-q-text { font-size: 19px; }
	.masg-intro-title { font-size: 25px; }
	.masg-info-title { font-size: 20px; }
	.masg-scale { grid-template-columns: repeat(5, 1fr); }
	.masg-scale-btn { padding: 13px 0; }
	.masg-nav { flex-direction: column-reverse; }
	.masg-btn { width: 100%; text-align: center; }
}

/* ---------- Світла тема сайту ---------- */

.masg-survey.is-light {
	--masg-card: #ffffff;
	--masg-line: #dfe5ee;
	--masg-text: #16253c;
	--masg-mute: #5d6b80;
	--masg-gold: #a8842f;
	--masg-gold-soft: rgba(168, 132, 47, .10);
}

.masg-bonus-line { margin: 2px 0; }
.masg-bonus-line + .masg-bonus-line { border-top: 1px solid rgba(201,169,97,.3); padding-top: 8px; margin-top: 8px; }

/* ---------- Підказка під питанням ---------- */

.masg-q-help {
	font-size: 15px;
	color: var(--masg-mute);
	margin: -12px 0 18px;
	line-height: 1.45;
}

/* ---------- Легенда шкали зверху ---------- */

.masg-legend-top { margin: 0 0 16px; }

.masg-matrix-legend {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--masg-mute);
	margin-top: 6px;
	opacity: .75;
}

/* ---------- Кілька сум на одному екрані ---------- */

.masg-money-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--masg-line);
}

.masg-money-row:last-child { border-bottom: none; }

.masg-money-label {
	flex: 1;
	font-size: 15px;
	line-height: 1.4;
}

.masg-money-box {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

.masg-money-input {
	width: 130px;
	text-align: right;
	padding: 11px 12px;
}

.masg-money-cur {
	color: var(--masg-mute);
	font-size: 16px;
}

@media (max-width: 600px) {
	.masg-money-row { flex-direction: column; align-items: stretch; gap: 8px; }
	.masg-money-box { justify-content: flex-start; }
	.masg-money-input { width: 100%; text-align: left; }
	.masg-q-help { font-size: 14px; }
}

/* ---------- Підзаголовки і списки в текстових екранах ---------- */

.masg-info-head {
	font-size: 13px;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--masg-gold);
	font-weight: 700;
	margin: 22px 0 8px;
}

.masg-info-head:first-child { margin-top: 0; }

.masg-info-list {
	margin: 0 0 14px;
	padding-left: 20px;
	color: var(--masg-mute);
	font-size: 16px;
}

.masg-info-list li { margin-bottom: 8px; line-height: 1.5; }

/* ---------- Підвал ---------- */

.masg-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: -8px 0 32px;
	padding: 0 6px;
	font-size: 13px;
	color: var(--masg-mute);
	line-height: 1.5;
}

.masg-foot-links {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.masg-foot a {
	color: var(--masg-mute);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.masg-foot a:hover { color: var(--masg-gold); }

.masg-foot-dot { opacity: .5; }

@media (max-width: 600px) {
	.masg-foot {
		flex-direction: column;
		align-items: flex-start;
		font-size: 12px;
		margin-bottom: 24px;
	}
}

/* ---------- Підпис під прогресом ---------- */

.masg-subline {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin-top: 9px;
}

.masg-block-note {
	font-size: 13px;
	color: var(--masg-mute);
	line-height: 1.45;
	flex: 1;
}

.masg-left {
	font-size: 12px;
	color: var(--masg-gold);
	font-weight: 600;
	white-space: nowrap;
	flex: 0 0 auto;
}

@media (max-width: 600px) {
	.masg-subline { flex-direction: column; gap: 5px; }
	.masg-block-note { font-size: 12px; }
}
