/* Lenerg Energetikai Barométer 2026 – űrlap
   Színek felülírhatók a témában: .lb { --lb-accent: #...; } vagy [lenerg_barometer accent="#..."] */

.lb {
	--lb-accent: #1d6b4f;
	--lb-accent-ink: #ffffff;
	--lb-accent-soft: color-mix(in srgb, var(--lb-accent) 8%, #ffffff);
	--lb-accent-line: color-mix(in srgb, var(--lb-accent) 45%, #ffffff);
	--lb-ink: #17211c;
	--lb-muted: #5b665f;
	--lb-line: #dfe4e0;
	--lb-surface: #ffffff;
	--lb-bg: #f5f7f5;
	--lb-error: #b42318;
	--lb-error-soft: #fef3f2;
	--lb-warm: #e8a33d;
	--lb-radius: 12px;
	--lb-radius-sm: 8px;

	width: 100%;
	max-width: none;
	margin: 0;
	color: var(--lb-ink);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
.lb *, .lb *::before, .lb *::after { box-sizing: border-box; }
.lb [hidden] { display: none !important; }

.lb-form, .lb-result {
	background: var(--lb-surface);
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	padding: clamp(20px, 4vw, 40px);
	box-shadow: 0 1px 2px rgba(16, 24, 20, .04), 0 8px 24px -12px rgba(16, 24, 20, .12);
}
.lb-result:focus { outline: none; }

/* ---------- tipográfia ---------- */
.lb .lb-kicker {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--lb-accent);
}
.lb .lb-title {
	margin: 0 0 20px;
	font-size: clamp(26px, 4vw, 34px);
	line-height: 1.2;
	font-weight: 700;
	color: var(--lb-ink);
	text-wrap: balance;
}
.lb-intro p { margin: 0 0 14px; color: var(--lb-ink); }
.lb-intro p:first-of-type + p, .lb-intro p ~ p { color: var(--lb-muted); }
.lb-intro .lb-kicker { color: var(--lb-accent); }

.lb-facts {
	list-style: none;
	margin: 24px 0 8px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	padding-left: 0!important;
}
.lb-facts li {
	margin: 0;
	padding: 14px 16px;
	background: var(--lb-bg);
	border-radius: var(--lb-radius-sm);
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.lb-facts strong { font-size: 18px; color: var(--lb-ink); }
.lb-facts span { font-size: 13px; color: var(--lb-muted); }

.lb .lb-req { color: var(--lb-error); font-weight: 600; }
.lb .lb-req-note { font-size: 14px; color: var(--lb-muted); margin-top: 16px; }

.lb-draft-note {
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: var(--lb-radius-sm);
	background: var(--lb-accent-soft);
	border: 1px solid var(--lb-accent-line);
	font-size: 14px;
}
.lb .lb-link {
	background: none;
	border: 0;
	padding: 0;
	margin-left: 6px;
	color: var(--lb-accent);
	text-decoration: underline;
	font: inherit;
	cursor: pointer;
}

/* ---------- előrehaladás ---------- */
.lb-progress { margin: -4px 0 28px; }
.lb-progress-meta {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var(--lb-muted);
	margin-bottom: 8px;
	font-variant-numeric: tabular-nums;
}
.lb-progress-count { font-weight: 600; color: var(--lb-ink); }
.lb-progress-track { height: 6px; border-radius: 99px; background: var(--lb-bg); overflow: hidden; }
.lb-progress-bar { height: 100%; width: 0; background: var(--lb-accent); border-radius: 99px; transition: width .35s ease; }

/* ---------- szekció ---------- */
.lb-step-head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--lb-line); }
.lb .lb-step-title { margin: 0 0 8px; font-size: clamp(21px, 3vw, 26px); line-height: 1.25; font-weight: 700; color: var(--lb-ink); }
.lb .lb-step-title:focus { outline: none; }
.lb .lb-step-desc { margin: 0; color: var(--lb-muted); font-size: 15px; }
.lb .lb-step-desc + .lb-step-desc { margin-top: 8px; }
.lb .lb-step-desc a { color: var(--lb-accent); }

/* ---------- kérdés ---------- */
.lb .lb-q {
	border: 0;
	margin: 0 0 32px;
	padding: 0;
	min-width: 0;
}
.lb .lb-q:last-child { margin-bottom: 8px; }
.lb .lb-q-label {
	display: block;
	float: none;
	width: 100%;
	margin: 0 0 6px;
	padding: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--lb-ink);
}
.lb .lb-num { color: var(--lb-accent); font-variant-numeric: tabular-nums; margin-right: 2px; }
.lb .lb-help { margin: 0 0 8px; font-size: 14px; color: var(--lb-muted); }
.lb .lb-hint { margin: 0 0 10px; font-size: 13px; color: var(--lb-muted); font-style: italic; }
.lb .lb-q-label + .lb-options, .lb .lb-q-label + .lb-input { margin-top: 12px; }
.lb .lb-help + .lb-options, .lb .lb-help + .lb-input { margin-top: 12px; }

/* ---------- opciók ---------- */
.lb-options { display: grid; gap: 8px; }
.lb-layout-inline .lb-options { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.lb-layout-scale .lb-options { grid-template-columns: repeat(5, 1fr); }

.lb .lb-opt {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius-sm);
	background: var(--lb-surface);
	cursor: pointer;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--lb-ink);
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.lb .lb-opt:hover { border-color: var(--lb-accent-line); }
.lb .lb-opt input[type=radio],
.lb .lb-opt input[type=checkbox] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}
.lb .lb-opt-mark {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	border: 2px solid #aab4ae;
	background: #fff;
	transition: border-color .15s, background-color .15s;
	position: relative;
}
.lb input[type=radio] + .lb-opt-mark { border-radius: 50%; }
.lb input[type=checkbox] + .lb-opt-mark { border-radius: 5px; }
.lb input:checked + .lb-opt-mark { border-color: var(--lb-accent); background: var(--lb-accent); }
.lb input[type=radio]:checked + .lb-opt-mark::after {
	content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff;
}
.lb input[type=checkbox]:checked + .lb-opt-mark::after {
	content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px;
	border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.lb input:focus-visible + .lb-opt-mark { box-shadow: 0 0 0 3px color-mix(in srgb, var(--lb-accent) 30%, transparent); }
.lb .lb-opt:has(input:checked) { border-color: var(--lb-accent); background: var(--lb-accent-soft); }
.lb .lb-opt-text { flex: 1; min-width: 0; }
.lb input[data-exclusive] ~ .lb-opt-text { font-style: italic; }

.lb-layout-scale .lb-opt { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 8px; font-size: 14px; }

.lb .lb-opt-other { display: block; cursor: default; padding: 0; }
.lb .lb-opt-other-head { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 8px; margin: 0; cursor: pointer; font-weight: 400; }
.lb .lb-opt-other .lb-other-text { margin: 0 14px 12px 46px; width: calc(100% - 60px); }

/* ---------- szövegmezők ---------- */
.lb .lb-input {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 11px 14px;
	border: 1px solid #c5cdc8;
	border-radius: var(--lb-radius-sm);
	background: #fff;
	color: var(--lb-ink);
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}
.lb textarea.lb-input { resize: vertical; min-height: 110px; }
.lb .lb-input:focus { outline: none; border-color: var(--lb-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lb-accent) 22%, transparent); }
.lb .lb-other-text { padding: 8px 12px; font-size: 15px; }

/* ---------- hibák ---------- */
.lb .lb-error { margin: 8px 0 0; font-size: 14px; color: var(--lb-error); font-weight: 500; min-height: 0; }
.lb .lb-error:empty { display: none; }
.lb .lb-has-error .lb-opt { border-color: color-mix(in srgb, var(--lb-error) 40%, #fff); }
.lb .lb-has-error .lb-input { border-color: var(--lb-error); }
.lb .lb-form-error {
	margin: 20px 0 0;
	padding: 12px 14px;
	border-radius: var(--lb-radius-sm);
	background: var(--lb-error-soft);
	color: var(--lb-error);
	font-size: 15px;
	border: 1px solid color-mix(in srgb, var(--lb-error) 25%, #fff);
}

/* ---------- navigáció ---------- */
.lb-nav {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	align-items: center;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--lb-line);
}
.lb .lb-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	margin: 0;
	padding: 0 22px;
	border-radius: 99px;
	border: 1px solid transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, opacity .15s, transform .05s;
	box-shadow: none;
}
.lb .lb-btn:active { transform: translateY(1px); }
.lb .lb-btn-primary { background: var(--lb-accent); color: var(--lb-accent-ink); }
.lb .lb-btn-primary:hover { background: color-mix(in srgb, var(--lb-accent) 86%, #000); color: var(--lb-accent-ink); }
.lb .lb-btn-ghost { background: transparent; color: var(--lb-ink); border-color: var(--lb-line); margin-right: auto; }
.lb .lb-btn-ghost:hover { border-color: var(--lb-ink); background: transparent; color: var(--lb-ink); }
.lb .lb-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--lb-accent) 35%, transparent); outline-offset: 2px; }
.lb .lb-btn[disabled] { opacity: .6; cursor: progress; }

.lb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- eredmény ---------- */
.lb-result-inner .lb-title { margin-bottom: 24px; }
.lb .lb-score {
	padding: 24px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-bg);
	margin: 0 0 16px;
}
.lb .lb-score:last-child { margin-bottom: 0; }
.lb .lb-score-label { margin: 0 0 14px; font-size: 16px; color: var(--lb-muted); }
.lb .lb-score-label strong { display: block; margin-top: 2px; font-size: 30px; line-height: 1.15; color: var(--lb-ink); font-variant-numeric: tabular-nums; }
.lb .lb-score-state .lb-score-label strong { font-size: 22px; }
.lb .lb-score-cat { margin: 16px 0 6px; font-size: 19px; font-weight: 700; color: var(--lb-accent); line-height: 1.3; }
.lb .lb-score-text { margin: 0; color: var(--lb-ink); }

.lb .lb-meter { position: relative; height: 10px; border-radius: 99px; background: #e4e9e5; overflow: hidden; }
.lb .lb-meter-fill { height: 100%; background: linear-gradient(90deg, var(--lb-warm), var(--lb-accent)); border-radius: 99px; }
.lb .lb-meter-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, .85); }

/* ---------- mobil ---------- */
@media (max-width: 640px) {
	.lb-facts { grid-template-columns: 1fr; }
	.lb-layout-scale .lb-options { grid-template-columns: 1fr; }
	.lb-layout-scale .lb-opt { flex-direction: row; text-align: left; padding: 12px 14px; font-size: 15px; gap: 12px; }
	.lb-nav { flex-wrap: wrap; }
	.lb .lb-btn-primary { flex: 1 1 auto; }
	.lb .lb-score { padding: 18px; }
	.lb .lb-score-label strong { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
	.lb *, .lb *::before, .lb *::after { transition: none !important; }
}

/* ---------- 1.1: alcím, skálavégek, mátrix, eredmény-kiegészítések ---------- */
.lb .lb-subtitle { margin: -10px 0 20px; font-size: 17px; font-weight: 600; color: var(--lb-muted); }

.lb .lb-scale-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--lb-muted); }
.lb .lb-scale-ends span:last-child { text-align: right; }
.lb-layout-scale .lb-opt-text { font-weight: 600; font-variant-numeric: tabular-nums; }

.lb .lb-grid-wrap { margin-top: 12px; border: 1px solid var(--lb-line); border-radius: var(--lb-radius-sm); overflow: hidden; }
.lb table.lb-grid { width: 100%; margin: 0; border-collapse: collapse; border: 0; table-layout: fixed; font-size: 14px; background: var(--lb-surface); }
.lb table.lb-grid th, .lb table.lb-grid td { border: 0; padding: 0; background: transparent; vertical-align: middle; }
.lb table.lb-grid thead th, .lb table.lb-grid thead td {
	padding: 10px 6px; font-size: 12.5px; font-weight: 600; line-height: 1.3; text-align: center;
	color: var(--lb-muted); background: var(--lb-bg); border-bottom: 1px solid var(--lb-line);
}
.lb table.lb-grid thead td { width: 26%; }
.lb table.lb-grid tbody tr + tr { border-top: 1px solid var(--lb-line); }
.lb table.lb-grid tbody tr:nth-child(even) { background: #fafbfa; }
.lb table.lb-grid tbody th { padding: 12px 14px; text-align: left; font-weight: 600; color: var(--lb-ink); line-height: 1.35; }
.lb .lb-grid-cell { display: flex; justify-content: center; align-items: center; min-height: 48px; margin: 0; padding: 8px; cursor: pointer; }
.lb .lb-grid-cell:hover .lb-opt-mark { border-color: var(--lb-accent); }
.lb .lb-grid-cell input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.lb .lb-grid-cell input + .lb-opt-mark { border-radius: 50%; }
.lb .lb-grid-collabel { display: none; }
.lb table.lb-grid tr.lb-row-missing th { color: var(--lb-error); }
.lb table.lb-grid tr.lb-row-missing { background: var(--lb-error-soft) !important; }

@media (max-width: 720px) {
	.lb .lb-grid-wrap { border: 0; border-radius: 0; overflow: visible; }
	.lb table.lb-grid, .lb table.lb-grid tbody, .lb table.lb-grid tr, .lb table.lb-grid th, .lb table.lb-grid td { display: block; width: 100%; }
	.lb table.lb-grid thead { display: none; }
	.lb table.lb-grid tbody tr { border: 1px solid var(--lb-line) !important; border-radius: var(--lb-radius-sm); margin-bottom: 10px; padding: 4px 0 8px; background: var(--lb-surface) !important; }
	.lb table.lb-grid tbody tr.lb-row-missing { border-color: color-mix(in srgb, var(--lb-error) 45%, #fff) !important; }
	.lb table.lb-grid tbody th { padding: 10px 14px 6px; }
	.lb .lb-grid-cell { justify-content: flex-start; gap: 12px; min-height: 0; padding: 7px 14px; }
	.lb .lb-grid-collabel { display: inline; font-size: 15px; }
}

.lb .lb-score-note { margin: 12px 0 0; padding: 10px 12px; font-size: 14px; color: var(--lb-muted); background: var(--lb-surface); border-left: 3px solid var(--lb-line); border-radius: 0 6px 6px 0; }
.lb .lb-footnote { margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: var(--lb-muted); }
@media (max-width: 640px) {
	.lb .lb-scale-compact .lb-options { grid-template-columns: repeat(5, 1fr); }
	.lb .lb-scale-compact .lb-opt { flex-direction: column; align-items: center; text-align: center; padding: 12px 4px; gap: 6px; }
}

/* ---------- 1.6: több bekezdéses súgó, köszönő sor, opcionális mátrixsor törlése ---------- */
.lb .lb-help p { margin: 0 0 6px; }
.lb .lb-help p:last-child { margin-bottom: 0; }
.lb .lb-help { margin: 0 0 8px; font-size: 14px; color: var(--lb-muted); }
.lb .lb-intro-thanks { font-weight: 600; color: var(--lb-ink) !important; }
.lb table.lb-grid .lb-grid-clear-cell { width: 40px; text-align: center; }
.lb table.lb-grid thead .lb-grid-clear-cell { width: 40px; }
.lb .lb-grid-clear {
	appearance: none; width: 28px; height: 28px; margin: 0; padding: 0;
	border: 1px solid var(--lb-line); border-radius: 50%; background: #fff;
	color: var(--lb-muted); font: inherit; font-size: 16px; line-height: 1; cursor: pointer;
	visibility: hidden;
}
.lb tr.lb-row-set .lb-grid-clear { visibility: visible; }
.lb .lb-grid-clear:hover { border-color: var(--lb-error); color: var(--lb-error); }
.lb .lb-grid-clear:focus-visible { outline: 3px solid color-mix(in srgb, var(--lb-accent) 35%, transparent); outline-offset: 1px; visibility: visible; }
.lb table.lb-grid tbody th { overflow-wrap: anywhere; }
@media (max-width: 720px) {
	.lb table.lb-grid tbody tr { position: relative; }
	.lb table.lb-grid .lb-grid-clear-cell { position: absolute; top: 6px; right: 6px; width: auto; }
	.lb table.lb-grid tbody th { padding-right: 44px; }
}
