/* Banco BAR — estilo oscuro */

.bq-root {
	--bq-bg: #0a0a0a;
	--bq-panel: #000;
	--bq-side: #141414;
	--bq-chip: #2b2b2b;
	--bq-chip-txt: #9a9a9a;
	--bq-line: #333;
	--bq-txt: #fff;
	--bq-mut: #9a9a9a;
	--bq-blue: #1e73be;
	--bq-blue-h: #2d8ae0;
	--bq-ok: #2e9e5b;
	--bq-ko: #c0392b;
	--bq-alto: 640px;

	background: var(--bq-bg);
	border-radius: 14px;
	padding: 14px;
	display: flex;
	gap: 14px;
	color: var(--bq-txt);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
	min-height: var(--bq-alto);
	position: relative;
}

.bq-root *,
.bq-root *::before,
.bq-root *::after { box-sizing: border-box; }

.bq-main:fullscreen,
.bq-main:-webkit-full-screen {
	border-radius: 0;
	max-height: 100vh;
	height: 100vh;
	width: 100vw;
	background: var(--bq-panel);
}

/* ---- barra lateral ---- */

.bq-side {
	width: 178px;
	flex: 0 0 178px;
	background: var(--bq-side);
	border-radius: 12px;
	padding: 12px 10px;
	overflow-y: auto;
	max-height: calc(var(--bq-alto) - 28px);
}

.bq-side h3 {
	margin: 2px 0 12px;
	font-size: 19px;
	font-weight: 800;
	color: #fff;
	letter-spacing: .2px;
}

.bq-lec {
	display: block;
	width: 100%;
	text-align: center;
	background: var(--bq-chip);
	color: var(--bq-chip-txt);
	border: 0;
	border-radius: 9px;
	padding: 9px 8px;
	margin-bottom: 9px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.25;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.bq-lec:hover { background: #3a3a3a; color: #ddd; }
.bq-lec.is-act { background: #fff; color: #111; }
.bq-lec.is-done::after { content: " ✓"; color: var(--bq-ok); }
.bq-lec.bq-especial { background: #1c2f45; color: #cfe3fb; }
.bq-lec.bq-especial:hover { background: #24405e; }

/* ---- panel principal ---- */

.bq-main {
	flex: 1 1 auto;
	background: var(--bq-panel);
	border-radius: 12px;
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	max-height: calc(var(--bq-alto) - 28px);
	overflow: hidden;
}

.bq-fs {
	flex: 0 0 auto;
	background: transparent;
	border: 0;
	color: #cfcfcf;
	cursor: pointer;
	padding: 4px;
	line-height: 0;
	opacity: .8;
}
.bq-fs:hover { opacity: 1; }
.bq-fs svg { width: 18px; height: 18px; }

.bq-scroll {
	overflow-y: auto;
	padding: 26px 30px 30px;
	flex: 1 1 auto;
}

/* ---- portada ---- */

.bq-cover {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 100%;
	gap: 18px;
	padding: 20px;
}
.bq-cover img, .bq-cover svg.bq-logo { width: 190px; max-width: 60%; height: auto; opacity: .95; }
.bq-cover h2 {
	margin: 0;
	font-size: clamp(20px, 3vw, 30px);
	font-weight: 700;
	letter-spacing: .5px;
	color: #fff;
}
.bq-cover p { margin: -6px 0 0; color: var(--bq-mut); font-size: 14px; }

.bq-btn {
	background: var(--bq-blue);
	color: #fff;
	border: 0;
	border-radius: 7px;
	padding: 12px 30px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s;
}
.bq-btn:hover { background: var(--bq-blue-h); }
.bq-btn:disabled { opacity: .45; cursor: default; }
.bq-btn.bq-sec { background: #2b2b2b; }
.bq-btn.bq-sec:hover { background: #3a3a3a; }

/* ---- barra superior ---- */

.bq-barra {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px 0;
	flex: 0 0 auto;
}
.bq-barra .bq-hueco { flex: 1 1 auto; }
.bq-progreso {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.bq-volver {
	background: #1b1b1b;
	border: 1px solid #2e2e2e;
	color: #cfcfcf;
	border-radius: 7px;
	padding: 6px 13px 6px 10px;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, color .15s;
}
.bq-volver:hover { background: #2b2b2b; color: #fff; }
.bq-volver span { font-size: 10px; margin-right: 3px; }
.bq-bar {
	flex: 1 1 auto;
	height: 15px;
	background: #1b1b1b;
	border-radius: 999px;
	overflow: hidden;
	position: relative;
}
.bq-bar span {
	display: block;
	height: 100%;
	background: #4a4a4a;
	border-radius: 999px;
	transition: width .25s;
	min-width: 42px;
}
.bq-bar b {
	position: absolute;
	left: 12px;
	top: 0;
	line-height: 15px;
	font-size: 10.5px;
	font-weight: 700;
	color: #ddd;
}
.bq-cont { font-size: 13px; color: #bdbdbd; white-space: nowrap; }

/* ---- pregunta ---- */

.bq-q {
	font-size: clamp(17px, 2.1vw, 25px);
	font-weight: 800;
	line-height: 1.35;
	text-align: center;
	margin: 26px auto 26px;
	max-width: 1050px;
}
.bq-q .bq-num { color: #fff; }

.bq-ops {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	max-width: 1120px;
	margin: 0 auto;
}
@media (max-width: 820px) {
	.bq-ops { grid-template-columns: 1fr; }
}

.bq-op {
	background: transparent;
	border: 1px solid var(--bq-line);
	border-radius: 8px;
	padding: 14px 15px;
	color: #d8d8d8;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, background .15s, color .15s;
}
.bq-op:hover { border-color: #777; background: #101010; color: #fff; }
.bq-op.is-ok { border-color: var(--bq-ok); background: rgba(46, 158, 91, .16); color: #eafff1; }
.bq-op.is-ko { border-color: var(--bq-ko); background: rgba(192, 57, 43, .16); color: #ffecea; }
.bq-op[disabled] { cursor: default; }

.bq-acciones {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin: 26px 0 6px;
	flex-wrap: wrap;
}

/* ---- accesibilidad: foco y marcas de respuesta ---- */

/* El tema de WordPress suele poner su propio box-shadow gris en button:focus.
   Lo anulamos y dejamos solo el anillo nuestro, y solo con teclado. */
.bq-root button:focus,
.bq-root a:focus,
.bq-root [tabindex]:focus {
	outline: none;
	box-shadow: none;
}
.bq-root :focus-visible,
.bq-root button:focus-visible,
.bq-root a:focus-visible,
.bq-root [tabindex]:focus-visible {
	outline: 3px solid #6fa8dc;
	outline-offset: 2px;
	border-radius: 6px;
	box-shadow: none;
}
.bq-op:focus-visible { border-color: #6fa8dc; }

.bq-marca {
	display: block;
	margin-top: 7px;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .4px;
	text-transform: uppercase;
}
.bq-op.is-ok .bq-marca { color: #7ee2a8; }
.bq-op.is-ko .bq-marca { color: #ff9d94; }

.bq-vivo {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* pantalla completa simulada, para navegadores sin Fullscreen API (iOS Safari) */
.bq-root.bq-pseudo-fs {
	position: fixed;
	inset: 0;
	z-index: 99999;
	border-radius: 0;
	padding: 12px;
	min-height: 100vh;
	min-height: 100dvh;
}
.bq-root.bq-pseudo-fs .bq-main { max-height: none; height: 100%; }
html.bq-pseudo-fs-html, html.bq-pseudo-fs-html body { overflow: hidden; }

/* ---- corrección ---- */

.bq-fb {
	max-width: 1000px;
	margin: 24px auto 0;
	border-top: 1px solid #242424;
	padding-top: 18px;
	text-align: left;
}
.bq-fb h4 {
	margin: 0 0 8px;
	font-size: 12px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: #7e7e7e;
	font-weight: 700;
}
.bq-fb p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: #d5d5d5; text-align: justify; }
.bq-fb .bq-ctx { color: #9fc4ea; font-style: italic; }
.bq-mind {
	background: #101820;
	border-left: 3px solid var(--bq-blue);
	border-radius: 0 8px 8px 0;
	padding: 12px 14px;
	margin: 4px 0 14px;
	font-size: 14px;
	line-height: 1.55;
	color: #cfe3fb;
}
.bq-porqueno { list-style: none; padding: 0; margin: 0 0 16px; }
.bq-porqueno li {
	border-left: 3px solid #6b3030;
	background: #170f0f;
	border-radius: 0 8px 8px 0;
	padding: 10px 13px;
	margin-bottom: 8px;
	font-size: 13.5px;
	line-height: 1.55;
	color: #d5c9c9;
}
.bq-porqueno b { color: #ffb4ab; font-weight: 700; }

.bq-svg { margin: 6px 0 4px; text-align: center; }
.bq-svg svg { max-width: 100%; height: auto; border-radius: 8px; }

/* ---- tablas de bloque ---- */

.bq-tbl { margin: 0 auto 22px; max-width: 1000px; }
.bq-tbl h4 { font-size: 15px; color: #fff; margin: 0 0 10px; }
.bq-tblscroll { overflow-x: auto; }
.bq-tbl table, .bq-root table.qz-tbl {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	color: #d5d5d5;
}
.bq-tbl th, .bq-root table.qz-tbl th {
	background: #17202b;
	color: #cfe3fb;
	text-align: left;
	padding: 8px 10px;
	border: 1px solid #26313d;
	font-weight: 700;
}
.bq-tbl td, .bq-root table.qz-tbl td {
	padding: 8px 10px;
	border: 1px solid #242424;
	vertical-align: top;
	line-height: 1.45;
}

/* ---- resultado ---- */

.bq-res { text-align: center; padding: 30px 10px; }
.bq-res .bq-nota { font-size: 54px; font-weight: 800; margin: 8px 0 2px; }
.bq-res .bq-sub { color: var(--bq-mut); margin-bottom: 22px; font-size: 14.5px; }
.bq-res ul { list-style: none; padding: 0; margin: 18px auto 0; max-width: 780px; text-align: left; }
.bq-res li {
	border: 1px solid #262626;
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 8px;
	font-size: 13.5px;
	color: #cfcfcf;
	line-height: 1.45;
}
.bq-res li b { color: #fff; }

/* ---- menús (asignaturas y lecciones) ---- */

.bq-menu { max-width: 1080px; margin: 0 auto; }
.bq-menu > h2 { text-align: center; font-size: clamp(20px, 2.4vw, 27px); margin: 6px 0 4px; font-weight: 800; }
.bq-menu > p.bq-hint { text-align: center; color: var(--bq-mut); font-size: 13.5px; margin: 0 0 22px; }

.bq-cab {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 0 0 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid #1e1e1e;
}
.bq-cab img { width: 74px; height: 74px; flex: 0 0 74px; }
.bq-cab h2 { margin: 0 0 2px; font-size: clamp(19px, 2.3vw, 26px); font-weight: 800; }
.bq-cab p.bq-hint { margin: 0; color: var(--bq-mut); font-size: 13.5px; text-align: left; }

.bq-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
	gap: 14px;
}
.bq-grid-lec { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); }

.bq-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	background: #101010;
	border: 1px solid #242424;
	border-radius: 11px;
	padding: 18px 14px 16px;
	color: #fff;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s, background .15s, transform .15s;
}
.bq-card:hover { border-color: #4a76ad; background: #141a22; transform: translateY(-2px); }
.bq-card img { width: 58px; height: 58px; }
.bq-card strong { font-size: 14px; font-weight: 700; line-height: 1.3; }
.bq-card small { color: #7d7d7d; font-size: 11.5px; }

.bq-card-lec { align-items: flex-start; text-align: left; gap: 5px; padding: 14px 15px; }
.bq-card-lec strong { font-size: 13px; font-weight: 700; line-height: 1.35; }
.bq-nlec {
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--bq-blue-h);
	font-weight: 800;
}
.bq-card-lec.is-done { border-color: #2a5b3f; }
.bq-card-lec.is-done .bq-nlec::after { content: " ✓"; color: var(--bq-ok); }

.bq-select {
	background: #141414;
	color: #ddd;
	border: 1px solid var(--bq-line);
	border-radius: 7px;
	padding: 11px 14px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.bq-concepto { color: #6f6f6f !important; font-size: 12.5px !important; }

/* ---- selector de ruta aleatoria ---- */

.bq-sel { max-width: 720px; margin: 0 auto; }
.bq-sel h2 { text-align: center; font-size: 22px; margin: 6px 0 4px; }
.bq-sel p.bq-hint { text-align: center; color: var(--bq-mut); font-size: 13.5px; margin: 0 0 18px; }
.bq-chks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
@media (max-width: 640px) { .bq-chks { grid-template-columns: 1fr; } }
.bq-chk {
	display: flex;
	align-items: center;
	gap: 9px;
	background: #121212;
	border: 1px solid #262626;
	border-radius: 8px;
	padding: 9px 11px;
	font-size: 13.5px;
	color: #d0d0d0;
	cursor: pointer;
}
.bq-chk input { accent-color: var(--bq-blue); width: 15px; height: 15px; }
.bq-chk small { color: #6f6f6f; margin-left: auto; }

.bq-msg { text-align: center; color: var(--bq-mut); padding: 40px 20px; font-size: 14.5px; line-height: 1.6; }

/* ---- responsive ---- */

@media (max-width: 900px) {
	.bq-root { --bq-alto: 78vh; }
}

@media (max-width: 700px) {
	.bq-root {
		flex-direction: column;
		--bq-alto: auto;
		padding: 10px;
		gap: 10px;
	}
	.bq-side { width: auto; flex: none; max-height: 168px; }
	.bq-scroll { padding: 20px 16px 24px; }
	.bq-cab img { width: 54px; height: 54px; flex: 0 0 54px; }
	.bq-root { min-height: 0; }
	.bq-main, .bq-side { max-height: none; }
	.bq-side { max-height: 150px; }
	.bq-svg svg { min-width: 520px; }
	.bq-svg { overflow-x: auto; }
}

.bq-pool {
	margin: 14px 0 0;
	padding: 8px 12px;
	border-left: 3px solid #6fa8dc;
	background: rgba( 111, 168, 220, .10 );
	border-radius: 0 6px 6px 0;
	font-size: 13px;
	color: #cfd9e6;
}
