/* e-Koncept Listen & Learn - all rules scoped under .ekl- */
.ekl-wrap,
.ekl-all {
	--ekl-navy: #1F3A5F;
	--ekl-navy-2: #2C5282;
	--ekl-ink: #1C2430;
	--ekl-muted: #5B6675;
	--ekl-line: #DDE3EA;
	--ekl-soft: #F4F7FA;
	--ekl-ok: #1E7F4F;
	--ekl-ok-bg: #E8F5EE;
	--ekl-bad: #B3261E;
	--ekl-bad-bg: #FCEDEC;
	--ekl-warn-bg: #FFF6E0;
	--ekl-radius: 14px;
	font-size: 16px;
	line-height: 1.5;
	color: var(--ekl-ink);
}
.ekl-wrap *,
.ekl-all * { box-sizing: border-box; }
.ekl-wrap { margin: 1.5em 0; max-width: 760px; }
.ekl-all { max-width: 760px; margin: 1.5em 0; }

/* Exercise card */
.ekl-exercise {
	background: #fff;
	border: 1px solid var(--ekl-line);
	border-top: 4px solid var(--ekl-navy);
	border-radius: var(--ekl-radius);
	padding: 22px 24px 20px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
	outline: none;
}
.ekl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ekl-badge {
	flex: 0 0 auto;
	display: inline-flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; border-radius: 12px;
	background: var(--ekl-navy); color: #fff;
	font-weight: 700; font-size: 15px; letter-spacing: .02em;
}
.ekl-head-text { min-width: 0; }
.ekl-exercise .ekl-title {
	margin: 0; padding: 0; border: 0;
	font-size: 1.25em; line-height: 1.3; font-weight: 700; color: var(--ekl-navy);
}
.ekl-exercise .ekl-unit { margin: 2px 0 0; font-size: .9em; color: var(--ekl-muted); }
.ekl-exercise .ekl-instructions { margin: 14px 0 10px; font-weight: 600; color: var(--ekl-ink); }

/* Audio */
.ekl-audio audio { display: block; width: 100%; margin: 4px 0 0; }
.ekl-audio-soon {
	display: flex; align-items: center; gap: 10px;
	padding: 12px 14px; border-radius: 10px;
	background: var(--ekl-soft); border: 1px dashed #B8C4D2; color: var(--ekl-navy);
	font-weight: 600; font-size: .95em;
}

/* Questions + watermark */
.ekl-questions {
	position: relative;
	border-radius: 12px;
	padding: 4px;
}
.ekl-questions::after {
	content: "";
	position: absolute; inset: 0; z-index: 2;
	pointer-events: none;
	border-radius: 12px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='150'%3E%3Ctext x='10' y='105' transform='rotate(-24 130 75)' font-family='Arial,Helvetica,sans-serif' font-size='17' font-weight='700' fill='%231F3A5F' fill-opacity='0.06'%3Ee-koncept.com.pl%3C/text%3E%3C/svg%3E");
	background-repeat: repeat;
}
.ekl-exercise .ekl-q {
	position: relative;
	margin: 0 0 10px; padding: 12px 14px 12px;
	border: 1px solid var(--ekl-line); border-radius: 12px;
	background: #fff;
	min-width: 0;
	transition: border-color .15s, background-color .15s;
}
.ekl-exercise .ekl-q-legend {
	display: flex; gap: 10px; align-items: flex-start;
	float: left; width: 100%;
	margin: 0 0 8px; padding: 0; border: 0;
	font-weight: 600; font-size: 1em; color: var(--ekl-ink);
}
.ekl-exercise .ekl-q-legend + * { clear: both; }
.ekl-q-num {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; border-radius: 50%;
	background: #E6ECF3; color: var(--ekl-navy); font-size: .85em; font-weight: 700;
}
.ekl-q-text { padding-top: 1px; }
.ekl-opts { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 36px; }
.ekl-type-mcq .ekl-opts { flex-direction: column; }
.ekl-exercise .ekl-opt {
	display: flex; align-items: center; gap: 10px;
	margin: 0; padding: 8px 12px;
	border: 1px solid var(--ekl-line); border-radius: 10px; background: #fff;
	cursor: pointer; font-weight: 400; font-size: .97em; line-height: 1.35;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ekl-type-tf .ekl-opt { min-width: 110px; }
.ekl-exercise .ekl-opt:hover { border-color: var(--ekl-navy-2); }
.ekl-exercise .ekl-opt input {
	margin: 0; width: 18px; height: 18px; flex: 0 0 auto;
	accent-color: var(--ekl-navy);
}
.ekl-exercise .ekl-opt:has(input:checked) {
	border-color: var(--ekl-navy); background: #EEF3F9;
	box-shadow: 0 0 0 1px var(--ekl-navy) inset;
}
.ekl-exercise .ekl-opt:has(input:focus-visible) { outline: 2px solid var(--ekl-navy-2); outline-offset: 2px; }
.ekl-opt-letter {
	font-weight: 700; color: var(--ekl-navy); text-transform: lowercase; min-width: 1em;
}
.ekl-exercise .ekl-opt input:disabled { cursor: default; }
.ekl-checked .ekl-opt { cursor: default; }

.ekl-mark { display: none; }
.ekl-q--ok, .ekl-exercise .ekl-q--ok { border-color: var(--ekl-ok); background: var(--ekl-ok-bg); }
.ekl-q--bad, .ekl-exercise .ekl-q--bad { border-color: var(--ekl-bad); background: var(--ekl-bad-bg); }
.ekl-exercise .ekl-q--missing { border-color: #D9A400; background: var(--ekl-warn-bg); }
.ekl-q--ok .ekl-mark,
.ekl-q--bad .ekl-mark {
	display: inline-block; position: absolute; top: 12px; right: 12px;
	padding: 2px 10px; border-radius: 999px;
	font-size: .78em; font-weight: 700; color: #fff;
}
.ekl-q--ok .ekl-mark { background: var(--ekl-ok); }
.ekl-q--bad .ekl-mark { background: var(--ekl-bad); }
.ekl-q--ok .ekl-q-legend,
.ekl-q--bad .ekl-q-legend { padding-right: 90px; }
.ekl-q--ok .ekl-q-num { background: var(--ekl-ok); color: #fff; }
.ekl-q--bad .ekl-q-num { background: var(--ekl-bad); color: #fff; }

/* Buttons */
.ekl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ekl-wrap .ekl-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 10px 20px; border-radius: 10px;
	font: inherit; font-weight: 700; font-size: .97em; line-height: 1.2;
	text-decoration: none; cursor: pointer; border: 2px solid var(--ekl-navy);
	transition: background-color .15s, color .15s, transform .05s;
}
.ekl-wrap .ekl-btn:active { transform: translateY(1px); }
.ekl-wrap .ekl-btn--primary { background: var(--ekl-navy); color: #fff; }
.ekl-wrap .ekl-btn--primary:hover { background: var(--ekl-navy-2); border-color: var(--ekl-navy-2); }
.ekl-wrap .ekl-btn--primary:disabled { opacity: .55; cursor: default; }
.ekl-wrap .ekl-btn--ghost { background: #fff; color: var(--ekl-navy); }
.ekl-wrap .ekl-btn--ghost:hover { background: var(--ekl-soft); }
.ekl-wrap .ekl-btn:focus-visible { outline: 3px solid #9DB7D5; outline-offset: 2px; }

/* Result */
.ekl-result:empty { display: none; }
.ekl-result {
	margin-top: 14px; padding: 12px 16px; border-radius: 12px;
	background: var(--ekl-soft); border: 1px solid var(--ekl-line);
}
.ekl-result p { margin: 0; }
.ekl-result--warn { background: var(--ekl-warn-bg); border-color: #F0D58A; }
.ekl-result--perfect { background: var(--ekl-ok-bg); border-color: #A9D8BF; }
.ekl-result--done { background: #EEF3F9; border-color: #C9D6E6; }
.ekl-score { font-size: 1.05em; }
.ekl-score-num { font-size: 1.35em; color: var(--ekl-navy); }
.ekl-result--perfect .ekl-score-num { color: var(--ekl-ok); }
.ekl-result-msg { color: var(--ekl-ink); }

/* Buy box */
.ekl-buy {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	margin-top: 12px; padding: 16px 20px;
	border-radius: var(--ekl-radius);
	background: linear-gradient(135deg, #1F3A5F 0%, #2C5282 100%);
	color: #fff;
}
.ekl-buy p { margin: 0; color: #fff; }
.ekl-buy-title { font-weight: 700; font-size: 1.05em; }
.ekl-buy-desc { opacity: .88; font-size: .93em; margin-top: 2px !important; }
.ekl-wrap .ekl-btn--buy {
	flex: 0 0 auto; background: #fff; color: var(--ekl-navy); border-color: #fff; white-space: nowrap;
}
.ekl-wrap .ekl-btn--buy:hover { background: #E9EFF6; color: var(--ekl-navy); }

.ekl-print-notice { display: none; }
.ekl-noscript, .ekl-error { color: var(--ekl-bad); font-weight: 600; }

/* Collapsible list */
.ekl-details {
	border: 1px solid var(--ekl-line); border-radius: var(--ekl-radius);
	margin: 0 0 10px; background: #fff; overflow: hidden;
}
.ekl-summary {
	list-style: none; cursor: pointer;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 18px; font-weight: 700; color: var(--ekl-navy);
}
.ekl-summary::-webkit-details-marker { display: none; }
.ekl-summary::after {
	content: ""; flex: 0 0 auto; width: 10px; height: 10px;
	border-right: 2px solid var(--ekl-navy); border-bottom: 2px solid var(--ekl-navy);
	transform: rotate(45deg); margin-top: -4px; transition: transform .2s;
}
.ekl-details[open] > .ekl-summary { background: var(--ekl-soft); border-bottom: 1px solid var(--ekl-line); }
.ekl-details[open] > .ekl-summary::after { transform: rotate(-135deg); margin-top: 4px; }
.ekl-summary:focus-visible { outline: 3px solid #9DB7D5; outline-offset: -3px; }
.ekl-details-body { padding: 14px; }
.ekl-details-body .ekl-wrap { margin: 0; }

/* Exercise labels */
.ekl-exercise .ekl-exlabel {
	margin: 18px 0 0; font-size: .75em; font-weight: 700; letter-spacing: .08em;
	text-transform: uppercase; color: #4A7AB0;
}
.ekl-exercise .ekl-exlabel + .ekl-instructions { margin-top: 2px; }

/* Exercise 2: gap-fill */
.ekl-gaps { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--ekl-line); }
.ekl-gaps .ekl-exlabel { margin-top: 0; }
.ekl-exercise .ekl-subtitle {
	margin: 2px 0 0; padding: 0; border: 0;
	font-size: 1.12em; line-height: 1.3; font-weight: 700; color: var(--ekl-navy);
}
.ekl-gaps .ekl-instructions { margin-top: 6px; }
.ekl-script {
	position: relative;
	border: 1px solid var(--ekl-line); border-radius: 12px;
	background: #fff; padding: 6px 4px;
}
.ekl-script::after {
	content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 12px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='150'%3E%3Ctext x='10' y='105' transform='rotate(-24 130 75)' font-family='Arial,Helvetica,sans-serif' font-size='17' font-weight='700' fill='%231F3A5F' fill-opacity='0.06'%3Ee-koncept.com.pl%3C/text%3E%3C/svg%3E"); background-repeat: repeat;
}
.ekl-exercise .ekl-line {
	display: flex; gap: 10px; align-items: baseline;
	margin: 0; padding: 7px 10px; border-radius: 8px;
	font-size: .98em; line-height: 2.05;
}
.ekl-exercise .ekl-line:nth-child(even) { background: #F7F9FC; }
.ekl-speaker { flex: 0 0 auto; min-width: 5.5em; font-weight: 700; color: var(--ekl-navy); line-height: 2.05; }
.ekl-line-text { flex: 1 1 auto; min-width: 0; }
.ekl-gap { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; margin: 0 1px 0 3px; vertical-align: baseline; }
.ekl-gap-num {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
	background: var(--ekl-navy); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.ekl-exercise input.ekl-gap-input {
	-webkit-user-select: text; user-select: text;
	box-sizing: border-box; display: inline-block; width: 9.5em; max-width: 100%;
	height: 30px; margin: 0; padding: 2px 6px;
	font: inherit; font-size: .95em; line-height: 1.2; color: var(--ekl-ink);
	background: #F4F7FA; border: 0; border-bottom: 2px solid #8FA3BA; border-radius: 6px 6px 0 0;
	box-shadow: none; outline: none; min-width: 0;
}
.ekl-exercise input.ekl-gap-input:focus { background: #EEF3F9; border-bottom-color: var(--ekl-navy); box-shadow: 0 0 0 2px #C9D6E6; }
.ekl-gap--ok .ekl-gap-num { background: var(--ekl-ok); }
.ekl-gap--bad .ekl-gap-num { background: var(--ekl-bad); }
.ekl-exercise .ekl-gap--ok input.ekl-gap-input { background: var(--ekl-ok-bg); border-bottom-color: var(--ekl-ok); color: var(--ekl-ok); font-weight: 600; }
.ekl-exercise .ekl-gap--bad input.ekl-gap-input { background: var(--ekl-bad-bg); border-bottom-color: var(--ekl-bad); color: var(--ekl-bad); font-weight: 600; text-decoration: line-through; text-decoration-thickness: 1px; }

/* Mobile */
@media (max-width: 600px) {
	.ekl-exercise { padding: 16px 14px; }
	.ekl-badge { width: 40px; height: 40px; }
	.ekl-opts { padding-left: 0; }
	.ekl-type-tf .ekl-opt { flex: 1 1 0; min-width: 0; }
	.ekl-actions .ekl-btn { flex: 1 1 auto; }
	.ekl-buy { flex-direction: column; align-items: stretch; text-align: left; }
	.ekl-wrap .ekl-btn--buy { width: 100%; }
	.ekl-details-body { padding: 8px; }
	.ekl-summary { padding: 12px 14px; }
	.ekl-exercise .ekl-line { display: block; padding: 6px 8px; line-height: 1.95; }
	.ekl-speaker { display: inline; min-width: 0; margin-right: 4px; }
	.ekl-line-text { display: inline; }
	.ekl-exercise input.ekl-gap-input { width: 9em; max-width: calc(100% - 26px); }
}

/* Print: hide the exercise */
@media print {
	.ekl-exercise, .ekl-buy, .ekl-details-body .ekl-exercise { display: none !important; }
	.ekl-print-notice {
		display: block !important; padding: 12px 14px; border: 1px solid #999;
		font-weight: 700; color: #000;
	}
	.ekl-details > .ekl-details-body { display: block !important; }
}
