/* Калькулятор благополучия семьи — etaji.md
   Палитра сайта: синий #1DB2FF, светло-голубой #E7F6FD, оранжевый #FF9638; шрифт берётся из темы.
   Всё ограничено .etj-fc, чтобы не задеть оформление темы. */

.etj-fc {
	--etj-ink: #1f2a37;
	--etj-muted: #5a6675;
	--etj-faint: #8592a3;
	--etj-line: #dfe7ef;
	--etj-paper: #f5f9fc;
	--etj-card: #ffffff;
	--etj-blue: #1db2ff;
	--etj-blue-ink: #0b7fc0;
	--etj-blue-soft: #e7f6fd;
	--etj-orange: #ff9638;
	--etj-ok: #18794e;
	--etj-warn: #b8600c;
	--etj-bad: #c0281b;
	--etj-a: #18794e;
	--etj-b: #0b7fc0;
	--etj-c: #627083;
	--etj-d: #e07b1f;
	--etj-e: #c0281b;
	--etj-r: 8px;

	max-width: 860px;
	margin: 0 auto;
	padding: 8px 0 32px;
	color: var(--etj-ink);
	font-size: 16px;
	line-height: 1.5;
	display: flex;
	flex-direction: column;
	gap: 14px;
	box-sizing: border-box;
}
.etj-fc *, .etj-fc *::before, .etj-fc *::after { box-sizing: border-box; }
.etj-fc [hidden] { display: none !important; }

.etj-fc .etj-intro { display: flex; flex-direction: column; gap: 8px; }
.etj-fc .etj-h { font-size: clamp(22px, 3.6vw, 28px); line-height: 1.25; margin: 0; font-weight: 700; color: var(--etj-ink); text-wrap: balance; }
.etj-fc .etj-lead { margin: 0; color: var(--etj-muted); max-width: 66ch; }

/* разделы анкеты */
.etj-fc .etj-sec {
	background: var(--etj-card);
	border: 1px solid var(--etj-line);
	border-radius: var(--etj-r);
	padding: 18px 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.etj-fc .etj-sec-head { display: flex; align-items: baseline; gap: 10px; }
.etj-fc .etj-num { font-weight: 700; color: var(--etj-blue-ink); min-width: 1.8em; }
.etj-fc .etj-sec-title { font-size: 19px; line-height: 1.3; margin: 0; font-weight: 700; color: var(--etj-ink); }
.etj-fc .etj-sub { font-size: 16px; margin: 6px 0 0; font-weight: 700; color: var(--etj-ink); }
.etj-fc .etj-sum { margin-left: auto; font-size: 14px; color: var(--etj-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.etj-fc .etj-sum b { color: var(--etj-ink); }

.etj-fc .etj-people { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.etj-fc .etj-people .lbl { min-width: 0; }
.etj-fc .etj-people .lbl small { display: block; color: var(--etj-faint); font-size: 13px; line-height: 1.3; }
.etj-fc .etj-divider { grid-column: 1 / -1; border-top: 1px dashed var(--etj-line); margin: 4px 0; }

.etj-fc .etj-step { display: inline-flex; align-items: center; border: 1px solid var(--etj-line); border-radius: var(--etj-r); overflow: hidden; background: var(--etj-paper); }
/* Тема сайта красит все кнопки — здесь стиль закреплён жёстко. */
.etj-fc .etj-step button {
	width: 38px !important; height: 38px !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
	background: transparent !important; color: var(--etj-blue-ink) !important;
	font: inherit; font-size: 20px !important; line-height: 1 !important; text-transform: none !important; letter-spacing: 0 !important; text-decoration: none !important;
	cursor: pointer;
}
.etj-fc .etj-step button:hover, .etj-fc .etj-step button:focus { background: var(--etj-blue-soft) !important; color: var(--etj-blue-ink) !important; }
.etj-fc .etj-step output { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.etj-fc .etj-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.etj-fc .etj-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.etj-fc .etj-field label, .etj-fc .etj-cap { font-size: 14px; color: var(--etj-muted); margin: 0; font-weight: 400; line-height: 1.35; }
.etj-fc .etj-field input, .etj-fc .etj-field select {
	height: 44px; width: 100%; max-width: 100%; margin: 0;
	padding: 0 12px;
	border: 1px solid var(--etj-line); border-radius: var(--etj-r); box-shadow: none;
	background: var(--etj-paper); color: var(--etj-ink);
	font: inherit; font-size: 16px; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.etj-fc .etj-field input::placeholder { color: var(--etj-faint); opacity: 1; }
.etj-fc .etj-field input:focus, .etj-fc .etj-field select:focus { outline: 2px solid var(--etj-blue); outline-offset: 1px; border-color: var(--etj-blue); }
.etj-fc .etj-field small { font-size: 12px; color: var(--etj-faint); line-height: 1.35; }
.etj-fc .etj-wide { grid-column: 1 / -1; }
.etj-fc .etj-hint { margin: 0; font-size: 13px; color: var(--etj-faint); }
.etj-fc .etj-check { display: flex; gap: 8px; align-items: center; font-size: 15px; cursor: pointer; margin: 0; color: var(--etj-ink); }
.etj-fc .etj-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--etj-blue-ink); }
.etj-fc .etj-tip { margin: 0; padding: 10px 12px; border-radius: var(--etj-r); background: var(--etj-blue-soft); color: var(--etj-ink); font-size: 14px; }

.etj-fc .etj-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.etj-fc .etj-seg label { position: relative; margin: 0; }
.etj-fc .etj-seg input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.etj-fc .etj-seg span { display: inline-block; padding: 8px 14px; border: 1px solid var(--etj-line); border-radius: var(--etj-r); cursor: pointer; background: var(--etj-paper); font-size: 15px; color: var(--etj-ink); }
.etj-fc .etj-seg input:checked + span { background: var(--etj-blue-ink); border-color: var(--etj-blue-ink); color: #fff; font-weight: 700; }
.etj-fc .etj-seg input:focus-visible + span,
.etj-fc button:focus-visible,
.etj-fc summary:focus-visible,
.etj-fc a:focus-visible { outline: 2px solid var(--etj-blue); outline-offset: 2px; }

/* итог */
.etj-fc .etj-result {
	background: var(--etj-card);
	border: 1px solid var(--etj-line);
	border-top: 4px solid var(--cls, var(--etj-blue));
	border-radius: var(--etj-r);
	padding: 20px 18px 18px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.etj-fc .etj-example { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--etj-warn); border: 1px solid currentColor; border-radius: 999px; padding: 2px 9px; align-self: flex-start; }
.etj-fc .etj-basis { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 14px; color: var(--etj-muted); }
.etj-fc .etj-res-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 22px; }
.etj-fc .etj-letter { font-size: 64px; line-height: .9; font-weight: 700; color: var(--cls, var(--etj-blue-ink)); }
.etj-fc .etj-res-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.etj-fc .etj-cls { font-size: 22px; font-weight: 700; line-height: 1.2; }
.etj-fc .etj-k { color: var(--etj-muted); font-variant-numeric: tabular-nums; }
.etj-fc .etj-k b { color: var(--etj-ink); }
.etj-fc .etj-desc { margin: 0; max-width: 66ch; }

.etj-fc .etj-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; position: relative; padding-top: 14px; }
.etj-fc .seg { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--etj-faint); text-align: center; font-variant-numeric: tabular-nums; }
.etj-fc .seg .bar { height: 8px; border-radius: 4px; background: var(--etj-line); }
.etj-fc .seg b { font-size: 14px; }
.etj-fc .seg.on { color: var(--etj-ink); }
.etj-fc .seg.on .bar { background: var(--cls); }
.etj-fc .etj-marker { position: absolute; top: 0; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--etj-ink); transform: translateX(-7px); transition: left .25s; }
@media (prefers-reduced-motion: reduce) { .etj-fc .etj-marker { transition: none; } }

.etj-fc .etj-cmp, .etj-fc .etj-risks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.etj-fc .etj-cmp > div, .etj-fc .etj-risk { border: 1px solid var(--etj-line); border-radius: var(--etj-r); padding: 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.etj-fc .etj-cmp .t, .etj-fc .etj-risk .t { font-size: 13px; color: var(--etj-muted); }
.etj-fc .etj-cmp .v, .etj-fc .etj-risk .v { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.etj-fc .etj-cmp .s { font-size: 13px; color: var(--etj-faint); }
.etj-fc .etj-risk .s { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.etj-fc .etj-risk .s::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.etj-fc .s.ok { color: var(--etj-ok); }
.etj-fc .s.warn { color: var(--etj-warn); }
.etj-fc .s.bad { color: var(--etj-bad); }
.etj-fc .s.na { color: var(--etj-faint); }

.etj-fc .etj-block h4 { font-size: 17px; margin: 0 0 8px; font-weight: 700; color: var(--etj-ink); }
.etj-fc .etj-norm-row { margin-bottom: 8px; }
.etj-fc .etj-tbl { overflow-x: auto; }
.etj-fc table { width: 100%; border-collapse: collapse; border: 0; margin: 0; font-variant-numeric: tabular-nums; font-size: 15px; background: transparent; }
.etj-fc th, .etj-fc td { background: transparent; border: 0; }
.etj-fc th { font-weight: 400; color: var(--etj-muted); font-size: 13px; text-align: right; padding: 4px 0 6px 10px; border-bottom: 1px solid var(--etj-line); }
.etj-fc th:first-child { text-align: left; padding-left: 0; }
.etj-fc td { padding: 7px 0 7px 10px; border-bottom: 1px solid var(--etj-line); vertical-align: top; text-align: right; white-space: nowrap; color: var(--etj-ink); }
.etj-fc td:first-child { text-align: left; white-space: normal; padding-left: 0; }
.etj-fc tr:last-child td { border-bottom: 0; }
.etj-fc tr.tot td { font-weight: 700; }
.etj-fc td small { display: block; font-size: 12px; color: var(--etj-faint); font-weight: 400; }
.etj-fc td.note { font-size: 13px; color: var(--etj-faint); white-space: normal; text-align: left; padding-left: 0; }
.etj-fc td.note.warn { color: var(--etj-warn); }
.etj-fc .bar-cell { width: 28%; }
.etj-fc .mini { height: 8px; border-radius: 4px; background: var(--etj-blue); }

.etj-fc details { border-top: 1px solid var(--etj-line); padding-top: 12px; margin: 0; }
.etj-fc summary { cursor: pointer; color: var(--etj-blue-ink); font-weight: 700; }
.etj-fc .etj-det { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.etj-fc .etj-prices { display: grid; grid-template-columns: 1fr 92px 92px; gap: 6px 10px; align-items: center; font-size: 14px; }
.etj-fc .etj-prices .hd { font-size: 12px; color: var(--etj-faint); text-align: center; }
.etj-fc .etj-prices .grp { grid-column: 1 / -1; font-weight: 700; margin-top: 8px; }
.etj-fc .etj-prices input { height: 36px; width: 100%; margin: 0; padding: 0 8px; border: 1px solid var(--etj-line); border-radius: 6px; box-shadow: none; background: var(--etj-paper); color: var(--etj-ink); font: inherit; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.etj-fc .etj-prices input::placeholder { color: var(--etj-faint); opacity: 1; }

.etj-fc .etj-actions, .etj-fc .etj-cta-act { display: flex; gap: 10px; flex-wrap: wrap; }
.etj-fc .etj-btn {
	display: inline-flex !important; align-items: center; justify-content: center;
	height: 42px !important; min-height: 0 !important; margin: 0 !important; padding: 0 18px !important;
	border-radius: var(--etj-r) !important; border: 1px solid var(--etj-line) !important; box-shadow: none !important;
	background: var(--etj-card) !important; color: var(--etj-ink) !important;
	font: inherit; font-size: 15px !important; font-weight: 700 !important; line-height: 1 !important; text-transform: none !important; letter-spacing: 0 !important; text-decoration: none !important;
	cursor: pointer;
}
.etj-fc .etj-btn:hover, .etj-fc .etj-btn:focus { border-color: var(--etj-blue-ink) !important; color: var(--etj-blue-ink) !important; background: var(--etj-card) !important; }
.etj-fc .etj-btn-p, .etj-fc .etj-btn-p:focus { background: var(--etj-orange) !important; border-color: var(--etj-orange) !important; color: #1f2a37 !important; }
.etj-fc .etj-btn-p:hover { background: #ff8a1f !important; border-color: #ff8a1f !important; color: #1f2a37 !important; }

.etj-fc .etj-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 18px; border-radius: var(--etj-r); background: var(--etj-blue-soft); }
.etj-fc .etj-cta-text { flex: 1 1 320px; min-width: 0; }
.etj-fc .etj-cta-text b { font-size: 18px; }
.etj-fc .etj-cta-text p { margin: 4px 0 0; color: var(--etj-muted); }

.etj-fc .etj-note { font-size: 13px; color: var(--etj-muted); line-height: 1.55; display: flex; flex-direction: column; gap: 8px; }
.etj-fc .etj-note p { margin: 0; }
.etj-fc .etj-note ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.etj-fc .etj-note a { color: var(--etj-blue-ink); }

@media (max-width: 600px) {
	.etj-fc .etj-fields { grid-template-columns: 1fr; }
	.etj-fc .etj-cmp, .etj-fc .etj-risks { grid-template-columns: 1fr; }
	.etj-fc .seg span { font-size: 11px; }
	.etj-fc .bar-cell { display: none; }
	.etj-fc .etj-prices { grid-template-columns: 1fr 76px 76px; }
	.etj-fc .etj-sec { padding: 16px 14px 18px; }
}

/* Страница калькулятора: тема ставит его в узкую колонку рядом с «Рубриками» и «Быстрым фильтром» */
body.etj-fc-page .rh-page-container .row > .sidebar-content { display: none !important; }
body.etj-fc-page .rh-page-container .row > .main-content { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }
body.etj-fc-page .breadcrumbs, body.etj-fc-page .breadcrumb-item, body.etj-fc-page .breadcrumb-item a { text-transform: none !important; }
