/* Chem-Bio Player — first-party player chrome (dark, Bunny-like). */

.cbp-player {
	--cbp-accent: #3754ED;
	--cbp-accent-2: #ED008C;
	--cbp-bg: #0d0f14;
	--cbp-bar: rgba(13, 15, 20, .92);
	--cbp-text: #f4f6fb;
	--cbp-dim: rgba(244, 246, 251, .6);
	position: relative;
	width: 100%;
	background: var(--cbp-bg);
	color: var(--cbp-text);
	font-family: inherit;
	line-height: normal;
	border-radius: 10px;
	overflow: hidden;
	contain: layout paint;
}

/* 16:9 stage, zero layout shift. */
.cbp-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.cbp-stage iframe,
.cbp-iframe-holder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* The transparent capture layer that sits ABOVE the iframe and eats every
   pointer event, so YouTube's own context menu / title strip / watch link /
   double-click-fullscreen never fire. All real interaction happens on our
   controls, which sit above this. */
.cbp-capture {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: transparent;
	cursor: pointer;
}

/* Poster + big play (lazy state). */
.cbp-poster {
	position: absolute;
	inset: 0;
	z-index: 5;
	background: #000 center / cover no-repeat;
	cursor: pointer;
}
.cbp-poster-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.cbp-bigplay {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 68px;
	height: 48px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	transition: transform .15s ease;
}
.cbp-bigplay:hover { transform: scale(1.08); }
.cbp-bigplay svg { width: 100%; height: 100%; }
.cbp-bigplay-bg { fill: rgba(13,15,20,.8); transition: fill .15s ease; }
.cbp-bigplay:hover .cbp-bigplay-bg { fill: var(--cbp-accent); }
.cbp-poster-duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	background: rgba(0,0,0,.8);
	color: #fff;
	font-size: 12px;
	padding: 2px 6px;
	border-radius: 4px;
}

/* Resume prompt. */
.cbp-resume {
	position: absolute;
	left: 12px;
	bottom: 12px;
	z-index: 6;
	display: flex;
	gap: 8px;
	align-items: center;
	background: rgba(13,15,20,.92);
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 13px;
}
.cbp-resume button {
	border: 0;
	border-radius: 6px;
	padding: 4px 10px;
	cursor: pointer;
	font: inherit;
}
.cbp-resume .cbp-resume-go { background: var(--cbp-accent); color: #fff; }
.cbp-resume .cbp-resume-restart { background: rgba(255,255,255,.14); color: var(--cbp-text); }

/* End card — painted on ENDED so YouTube's related-video screen never shows. */
.cbp-endcard {
	position: absolute;
	inset: 0;
	z-index: 7;
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: center;
	justify-content: center;
	background: rgba(6,8,12,.96);
	text-align: center;
	padding: 24px;
}
.cbp-endcard h4 { margin: 0; font-size: 18px; }
.cbp-endcard-row {
	display: flex;
	gap: 10px;
	align-items: stretch;
	flex-wrap: wrap;
	justify-content: center;
}
.cbp-endcard button {
	border: 0;
	border-radius: 8px;
	padding: 10px 18px;
	background: var(--cbp-accent);
	color: #fff;
	font: inherit;
	cursor: pointer;
}
.cbp-endcard button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Replay is the secondary action once there is a next lesson to go to. */
.cbp-endcard-replay { background: rgba(255,255,255,.16); }
.cbp-endcard-replay:hover { background: rgba(255,255,255,.24); }
.cbp-endcard-next {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	text-align: left;
	max-width: 60%;
}
.cbp-endcard-next:hover { filter: brightness(1.1); }
.cbp-endcard-next-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.cbp-endcard-next-title {
	font-weight: 700;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cbp-endcard-countdown {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--cbp-dim);
}
.cbp-endcard-countdown .cbp-endcard-cancel {
	background: transparent;
	border: 1px solid rgba(255,255,255,.3);
	padding: 4px 10px;
	font-size: 13px;
}

/* Locked / error overlay. */
.cbp-overlay {
	position: absolute;
	inset: 0;
	z-index: 8;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	justify-content: center;
	background: rgba(6,8,12,.96);
	text-align: center;
	padding: 24px;
}
.cbp-overlay svg { width: 40px; height: 40px; opacity: .85; }
.cbp-overlay p { margin: 0; font-size: 15px; }
.cbp-overlay .cbp-retry {
	border: 1px solid rgba(255,255,255,.7);
	border-radius: 6px;
	background: #fff;
	color: #111;
	font: inherit;
	font-weight: 700;
	padding: 9px 16px;
	cursor: pointer;
}
.cbp-overlay .cbp-retry:hover { background: #f0f0f0; }
.cbp-overlay .cbp-retry:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Control bar. */
.cbp-controls {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	z-index: 6;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px 10px 10px;
	background: linear-gradient(to top, var(--cbp-bar), rgba(13,15,20,0));
	opacity: 1;
	transition: opacity .2s ease;
	font-size: 13px;
}
.cbp-player.cbp-playing:not(.cbp-hover):not(.cbp-focuswithin) .cbp-controls { opacity: 0; }
.cbp-player.cbp-playing:not(.cbp-hover):not(.cbp-focuswithin) { cursor: none; }

/* Scrub bar. */
.cbp-scrub {
	position: relative;
	height: 16px;
	display: flex;
	align-items: center;
	cursor: pointer;
}
.cbp-scrub-track {
	position: relative;
	width: 100%;
	height: 4px;
	background: rgba(255,255,255,.25);
	border-radius: 2px;
}
.cbp-scrub:hover .cbp-scrub-track { height: 6px; }
.cbp-scrub-buffered {
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 0;
	background: rgba(255,255,255,.35);
	border-radius: 2px;
}
.cbp-scrub-played {
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 0;
	background: var(--cbp-accent);
	border-radius: 2px;
}
.cbp-scrub-handle {
	position: absolute;
	top: 50%;
	width: 12px; height: 12px;
	background: #fff;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	left: 0;
	opacity: 0;
	transition: opacity .12s ease;
	pointer-events: none;
}
.cbp-scrub:hover .cbp-scrub-handle,
.cbp-scrub:focus-within .cbp-scrub-handle { opacity: 1; }
.cbp-chapter-tick {
	position: absolute;
	top: 50%;
	width: 2px; height: 10px;
	background: rgba(255,255,255,.85);
	transform: translate(-50%, -50%);
	pointer-events: none;
}
.cbp-bookmark-tick {
	position: absolute;
	top: 50%;
	width: 8px;
	height: 8px;
	border: 1px solid rgba(255,255,255,.9);
	border-radius: 2px 2px 2px 0;
	background: var(--cbp-accent-2);
	transform: translate(-50%, -50%) rotate(-45deg);
	pointer-events: none;
}

/* Button row. */
.cbp-buttons {
	display: flex;
	align-items: center;
	gap: 6px;
}
.cbp-buttons .cbp-spacer { flex: 1; }
.cbp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px; height: 34px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--cbp-text);
	cursor: pointer;
	border-radius: 6px;
}
.cbp-btn:hover { background: rgba(255,255,255,.14); }
.cbp-btn:focus-visible { outline: 2px solid var(--cbp-accent); outline-offset: 2px; }
.cbp-btn svg { width: 20px; height: 20px; fill: currentColor; }
.cbp-btn[hidden] { display: none; }
/* The speed control is a text label of the current rate, not an icon. */
.cbp-speed-btn {
	width: auto;
	min-width: 34px;
	padding: 0 7px;
	font-size: 13px;
	font-weight: 750;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.cbp-bookmark-btn { position: relative; }
.cbp-bookmark-btn[data-count]:not([data-count=""])::after {
	content: attr(data-count);
	position: absolute;
	right: -1px;
	top: -2px;
	display: grid;
	place-items: center;
	min-width: 14px;
	height: 14px;
	padding: 0 3px;
	border-radius: 999px;
	background: var(--cbp-accent-2);
	color: #fff;
	font-size: 9px;
	font-weight: 800;
	line-height: 1;
}

.cbp-time {
	font-variant-numeric: tabular-nums;
	padding: 0 6px;
	color: var(--cbp-text);
	white-space: nowrap;
}
.cbp-time .cbp-dim { color: var(--cbp-dim); }

/* Volume. */
.cbp-volume {
	display: flex;
	align-items: center;
	gap: 4px;
}
.cbp-volume input[type="range"] {
	width: 0;
	opacity: 0;
	transition: width .15s ease, opacity .15s ease;
	accent-color: var(--cbp-accent);
	cursor: pointer;
}
.cbp-volume:hover input[type="range"],
.cbp-volume:focus-within input[type="range"] {
	width: 70px;
	opacity: 1;
}

/* Popover menus (speed, captions). */
.cbp-menu-wrap { position: relative; }
.cbp-menu {
	position: absolute;
	right: 0;
	bottom: 42px;
	min-width: 150px;
	background: rgba(20,23,30,.98);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 8px;
	padding: 4px;
	list-style: none;
	margin: 0;
	max-height: 220px;
	overflow: auto;
}
.cbp-menu[hidden] { display: none; }
.cbp-menu li { margin: 0; }
.cbp-menu button {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	border: 0;
	background: transparent;
	color: var(--cbp-text);
	padding: 7px 10px;
	border-radius: 6px;
	cursor: pointer;
	font: inherit;
	text-align: left;
}
.cbp-menu button:hover { background: rgba(255,255,255,.12); }
.cbp-menu button[aria-checked="true"]::after { content: "✓"; color: var(--cbp-accent); }

.cbp-shortcuts {
	position: absolute;
	z-index: 9;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(360px, calc(100% - 32px));
	max-height: calc(100% - 32px);
	overflow: auto;
	padding: 20px;
	border: 1px solid rgba(255,255,255,.18);
	border-radius: 12px;
	background: rgba(16,18,24,.98);
	color: #fff;
	box-shadow: 0 20px 70px rgba(0,0,0,.45);
}
.cbp-shortcuts h4 { margin: 0 32px 14px 0; font-size: 17px; }
.cbp-shortcuts dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; font-size: 13px; }
.cbp-shortcuts dt { font-weight: 700; color: #fff; }
.cbp-shortcuts dd { margin: 0; color: rgba(255,255,255,.72); }
.cbp-shortcuts-close {
	position: absolute; right: 10px; top: 8px;
	width: 34px; height: 34px; border: 0; border-radius: 50%;
	background: transparent; color: #fff; font-size: 24px; cursor: pointer;
}
.cbp-shortcuts-close:hover { background: rgba(255,255,255,.12); }
.cbp-shortcuts-close:focus-visible { outline: 2px solid var(--cbp-accent); }

.cbp-bookmarks {
	position: absolute;
	z-index: 9;
	right: 10px;
	bottom: 58px;
	width: min(430px, calc(100% - 20px));
	max-height: calc(100% - 76px);
	overflow: auto;
	border: 1px solid rgba(255,255,255,.16);
	border-radius: 12px;
	background: rgba(16,18,24,.98);
	color: #fff;
	box-shadow: 0 20px 70px rgba(0,0,0,.45);
}
.cbp-bookmarks-head {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border-bottom: 1px solid rgba(255,255,255,.1);
	background: rgba(16,18,24,.98);
}
.cbp-bookmarks-head h4 { margin: 0; color: #fff; font-size: 16px; }
.cbp-bookmarks-close {
	width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: #fff; font: inherit; font-size: 23px; cursor: pointer;
}
.cbp-bookmarks-close:hover { background: rgba(255,255,255,.12); }
.cbp-bookmarks-close:focus-visible,
.cbp-bookmarks input:focus-visible,
.cbp-bookmarks button:focus-visible { outline: 2px solid var(--cbp-accent); outline-offset: 2px; }
.cbp-bookmarks-add {
	display: grid;
	grid-template-columns: max-content minmax(100px, 1fr) max-content;
	align-items: center;
	gap: 8px;
	padding: 12px 14px 6px;
}
.cbp-bookmarks-time {
	padding: 6px 8px;
	border-radius: 6px;
	background: rgba(255,255,255,.1);
	font-variant-numeric: tabular-nums;
	font-size: 13px;
}
.cbp-bookmarks input {
	min-width: 0;
	min-height: 36px;
	box-sizing: border-box;
	border: 1px solid rgba(255,255,255,.2);
	border-radius: 7px;
	background: #242832;
	color: #fff;
	font: inherit;
	font-size: 13px;
	padding: 7px 9px;
}
.cbp-bookmarks input::placeholder { color: rgba(255,255,255,.52); }
.cbp-bookmarks-save {
	min-height: 36px;
	border: 0;
	border-radius: 7px;
	background: var(--cbp-accent);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 750;
	padding: 7px 11px;
	cursor: pointer;
}
.cbp-bookmarks-save:disabled { opacity: .55; cursor: wait; }
.cbp-bookmarks-status { min-height: 1.2em; margin: 0; padding: 0 14px 5px; color: #b8c2df; font-size: 12px; }
.cbp-bookmarks-list { list-style: none; margin: 0; padding: 0 8px 10px; }
.cbp-bookmarks-empty { padding: 11px 8px; color: rgba(255,255,255,.65); font-size: 13px; }
.cbp-bookmark-row { display: flex; align-items: center; gap: 6px; margin: 0; border-top: 1px solid rgba(255,255,255,.08); }
.cbp-bookmark-jump {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	align-items: center;
	gap: 9px;
	min-width: 0;
	flex: 1;
	padding: 9px 7px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: #fff;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.cbp-bookmark-jump:hover { background: rgba(255,255,255,.08); }
.cbp-bookmark-jump strong { color: #c8d0ff; font-size: 12px; font-variant-numeric: tabular-nums; }
.cbp-bookmark-jump span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cbp-bookmark-delete { flex: none; color: #ffb8c1; }

/* Cover mode — the default "enlarge": fills the viewport in-page. No Fullscreen
   API, so the URL never changes and mobile can't hand off to native YouTube. */
.cbp-player.cbp-cover {
	position: fixed;
	inset: 0;
	z-index: 999999;
	width: 100vw;
	width: 100dvw;
	height: 100vh;
	height: 100dvh;
	/* Block themes (constrained layout) put a max-width on every child of the
	   content column; without these resets it clamps the fixed cover box. */
	max-width: none;
	max-height: none;
	margin: 0;
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cbp-player.cbp-cover .cbp-stage {
	aspect-ratio: auto;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
}
html.cbp-cover-lock,
body.cbp-cover-lock {
	overflow: hidden !important;
	touch-action: none;
}

/* Native fullscreen (opt-in on desktop): our wrapper goes fullscreen, chrome intact. */
.cbp-player:fullscreen { border-radius: 0; }
.cbp-player:fullscreen .cbp-stage { aspect-ratio: auto; height: 100%; }

/* Lesson caption bar (1.7) — BELOW the video stage, in normal flow. */
.cbp-captionbar {
	position: relative;
	padding: 10px 96px 10px 14px;
	background: rgba(13, 15, 20, .96);
	color: var(--cbp-text, #f4f6fb);
	min-height: 2.6em;
}
.cbp-captionbar[hidden] { display: none !important; }
.cbp-captionbar-text {
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cbp-cap-lines-1 .cbp-captionbar-text { -webkit-line-clamp: 1; }
.cbp-cap-size-s .cbp-captionbar-text { font-size: 13px; }
.cbp-cap-size-l .cbp-captionbar-text { font-size: 21px; }
.cbp-cap-contrast { background: #000; }
.cbp-cap-contrast .cbp-captionbar-text { color: #fff; text-shadow: 0 0 2px #000; }
.cbp-captionbar-controls {
	position: absolute;
	right: 8px;
	top: 8px;
	display: flex;
	gap: 4px;
}
.cbp-captionbar-controls button {
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 5px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}
.cbp-captionbar-controls button:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }

/* Editor / admin inline notice. */
.cbp-notice {
	padding: 12px 14px;
	background: #fff3cd;
	border: 1px solid #ffe69c;
	border-radius: 6px;
	color: #664d03;
	font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
	.cbp-controls, .cbp-bigplay, .cbp-scrub-handle, .cbp-volume input[type="range"] { transition: none; }
}

/* Branded stand-in poster for lessons with no thumbnail (see CBP_Render::title_card).
   Drawn here rather than generated as an image file, so it costs nothing at import
   time and stays consistent across a whole back catalogue. */
.cbp-titlecard {
	position: absolute;
	inset: 0;
	display: flex;
	/* Bottom-left, not centred: the big play button owns the middle of the stage. */
	align-items: flex-end;
	justify-content: flex-start;
	padding: 7% 7%;
	text-align: left;
	background:
		radial-gradient(120% 120% at 12% 0%, rgba(237, 0, 140, .5) 0%, rgba(237, 0, 140, 0) 58%),
		linear-gradient(135deg, var(--cbp-accent) 0%, #16205f 100%);
}
/* A hairline of brand pink along the base — reads as a deliberate card, not a
   coloured rectangle, and ties the catalogue together. */
.cbp-titlecard::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: .9cqw;
	min-height: 3px;
	background: linear-gradient(90deg, var(--cbp-accent-2) 0%, rgba(237, 0, 140, 0) 70%);
}
.cbp-titlecard-inner {
	display: flex;
	flex-direction: column;
	gap: .8cqw;
	max-width: 88%;
}
.cbp-titlecard-course {
	width: fit-content;
	max-width: 100%;
	padding: .32em .72em;
	border: 1px solid rgba(255,255,255,.24);
	border-radius: 999px;
	background: rgba(8,12,38,.22);
	color: rgba(255,255,255,.92);
	font-size: clamp(9px, 1.35cqw, 14px);
	font-weight: 750;
	letter-spacing: .09em;
	line-height: 1.25;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cbp-titlecard-context {
	display: flex;
	align-items: center;
	gap: .7em;
	min-width: 0;
	color: rgba(255,255,255,.78);
	font-size: clamp(9px, 1.65cqw, 17px);
	font-weight: 650;
	letter-spacing: .055em;
	line-height: 1.25;
	text-transform: uppercase;
}
.cbp-titlecard-module {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cbp-titlecard-lesson { flex: none; }
.cbp-titlecard-module + .cbp-titlecard-lesson::before {
	content: "•";
	margin-right: .7em;
	color: var(--cbp-accent-2);
}
.cbp-titlecard-kicker {
	font-size: clamp(9px, 1.7cqw, 17px);
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .82);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cbp-titlecard-text {
	font-size: clamp(17px, 4.4cqw, 46px);
	font-weight: 800;
	line-height: 1.14;
	letter-spacing: -.015em;
	color: #fff;
	text-wrap: balance;
	/* Two lines, not three: with the kicker above it, a third line pushes the
	   block up into the centred play button. The kicker already carries the
	   context, so a long title can afford to ellipsize. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .3);
}
/* cqw above needs the stage to be a container. */
.cbp-stage { container-type: inline-size; }

/* B5 — narrow phones: the centred play button was overlapping the course-name
   pill (~1,292px² measured at 390px). Pin the pill to the TOP edge of the
   card, out of the button's hit area; the title block stays bottom-left. The
   68×48 play button itself already exceeds the 44×44 tap-target minimum. */
@media (max-width: 430px) {
	.cbp-player .cbp-titlecard-course {
		position: absolute;
		top: 4.5%;
		left: 5%;
		max-width: 90%;
	}
	.cbp-player .cbp-titlecard-inner {
		/* Two lines of title + kicker at most — keeps the block clear of the
		   centred button on a 16:9 stage as narrow as 320px. */
		max-width: 100%;
	}
	.cbp-player .cbp-titlecard-text {
		font-size: clamp(15px, 5.4cqw, 22px);
	}
}

/* ---------------------------------------------------------------------------
   Playlist block: one player + a searchable lesson list.

   Desktop gets a sidebar beside the player; narrow screens stack it underneath
   and collapse it behind the "12 lessons" button, so a phone shows the video
   first and the list only on request.
   --------------------------------------------------------------------------- */
/* The container is .cbp-playlist; the grid is .cbp-playlist-grid INSIDE it.
   A @container query only matches descendants of the container, never the
   container element itself — putting both roles on one element silently never
   matches, and the sidebar stays stacked at every width. */
.cbp-playlist {
	container-type: inline-size;
	margin-bottom: 10px;
}
.cbp-playlist-main { min-width: 0; }

.cbp-continue {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	margin: 0 0 10px;
	padding: 12px 16px;
	border: 1px solid rgba(55,84,237,.28);
	border-radius: 10px;
	background: rgba(55,84,237,.07);
	color: #17204d;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.cbp-continue span { font-size: 13px; color: #4f5b79; }
.cbp-continue strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbp-continue:hover { background: rgba(55,84,237,.12); }
.cbp-continue:focus-visible,
.cbp-course-nav button:focus-visible { outline: 2px solid var(--cbp-accent, #3754ed); outline-offset: 2px; }

.cbp-course-nav {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin-top: 10px;
}
.cbp-course-nav.is-guest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cbp-course-nav button {
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid rgba(0,0,0,.16);
	border-radius: 9px;
	background: #fff;
	color: #252832;
	font: inherit;
	font-weight: 650;
	cursor: pointer;
}
.cbp-course-nav button:hover:not(:disabled) { border-color: rgba(55,84,237,.55); color: #263ec7; }
.cbp-course-nav button:disabled { opacity: .45; cursor: default; }
.cbp-course-complete[aria-pressed="true"] { border-color: #1f8a4c; background: #edf8f1; color: #176a3a; }

.cbp-playlist-side {
	display: flex;
	flex-direction: column;
	min-height: 0;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}
.cbp-pl-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.cbp-pl-titles { min-width: 0; }
.cbp-pl-name {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cbp-pl-progress {
	margin: 2px 0 0;
	font-size: 12px;
	color: #5c5f66;
}
.cbp-pl-toggle {
	flex: none;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 999px;
	background: #fff;
	padding: 5px 12px;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.cbp-pl-body {
	display: flex;
	flex-direction: column;
	min-height: 0;
}
.cbp-pl-search { padding: 10px 12px 6px; }
.cbp-pl-q {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
}
.cbp-pl-q:focus-visible,
.cbp-pl-toggle:focus-visible {
	outline: 2px solid var(--cbp-accent, #3754ED);
	outline-offset: 1px;
}

.cbp-pl-list {
	list-style: none;
	margin: 0;
	padding: 4px;
	overflow-y: auto;
	flex: 1 1 auto;
}
.cbp-pl-list:focus-visible {
	outline: 2px solid var(--cbp-accent, #3754ED);
	outline-offset: -2px;
}
.cbp-pl-module {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin: 8px 8px 3px;
	padding: 8px 0 6px;
	border-bottom: 1px solid rgba(0,0,0,.08);
	color: #252832;
	font-size: 12px;
	font-weight: 750;
	letter-spacing: .025em;
	text-transform: uppercase;
}
.cbp-pl-module:first-child { margin-top: 1px; }
.cbp-pl-module small { flex: none; color: #7a7d85; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
/* The HTML `hidden` attribute loses to any explicit `display`, so every class
   here that sets one AND is hidden by JS carries its own override. Gate 6.5
   (tests/css-hidden-check.js) fails the build if a new one is added without
   deciding this. !important so no later specificity war can resurrect B1. */
.cbp-pl-item[hidden],
.cbp-pl-module[hidden],
.cbp-continue[hidden] { display: none !important; }
.cbp-pl-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 8px;
	border-radius: 8px;
	cursor: pointer;
	line-height: 1.3;
}
.cbp-pl-item:hover { background: rgba(55, 84, 237, .07); }
.cbp-pl-item.is-current { background: rgba(55, 84, 237, .12); }
.cbp-pl-item.is-current .cbp-pl-title { font-weight: 700; }
.cbp-pl-thumb {
	position: relative;
	flex: 0 0 92px;
	aspect-ratio: 16 / 9;
	container-type: inline-size;
	overflow: hidden;
	border-radius: 7px;
	background: #16205f;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.cbp-pl-thumb > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cbp-titlecard--compact { padding: 7%; }
.cbp-titlecard--compact::after { min-height: 2px; height: 1.5cqw; }
.cbp-titlecard--compact .cbp-titlecard-inner { gap: 1.5cqw; max-width: 92%; }
.cbp-titlecard--compact .cbp-titlecard-course {
	max-width: 82%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-size: 6.8cqw;
	letter-spacing: .06em;
}
.cbp-titlecard--compact .cbp-titlecard-context {
	display: block;
	font-size: 6.2cqw;
	letter-spacing: .035em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cbp-titlecard--compact .cbp-titlecard-lesson,
.cbp-titlecard--compact .cbp-titlecard-module + .cbp-titlecard-lesson::before { display: none; }
.cbp-titlecard--compact .cbp-titlecard-text {
	font-size: 10.5cqw;
	line-height: 1.08;
	-webkit-line-clamp: 2;
}
.cbp-pl-num {
	position: absolute;
	right: 4px;
	top: 4px;
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: rgba(8,10,20,.72);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.cbp-pl-text { min-width: 0; flex: 1; }
.cbp-pl-title {
	display: block;
	font-size: 14px;
	/* Two lines then ellipsis: lesson titles are long and a ragged list is hard
	   to scan, but one line hides too much to tell lessons apart. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cbp-pl-dur {
	display: block;
	font-size: 12px;
	color: #7a7d85;
	font-variant-numeric: tabular-nums;
}
/* The tick: only drawn once the lesson is done, so an unwatched row has no
   empty checkbox sitting there looking like a to-do. */
.cbp-pl-tick {
	flex: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: grid;
	place-items: center;
}
.cbp-pl-item.is-watched .cbp-pl-tick {
	background: #1f8a4c;
}
.cbp-pl-item.is-watched .cbp-pl-tick::after {
	content: "";
	width: 9px;
	height: 5px;
	border: 2px solid #fff;
	border-top: 0;
	border-right: 0;
	transform: translateY(-1px) rotate(-45deg);
}
.cbp-pl-item.is-watched .cbp-pl-title { color: #5c5f66; }

.cbp-pl-empty {
	margin: 0;
	padding: 14px 12px;
	font-size: 13px;
	color: #7a7d85;
}
.cbp-pl-autoplay {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid rgba(0, 0, 0, .08);
	font-size: 13px;
	cursor: pointer;
}

/* Narrow: list under the player, collapsed until asked for. */
.cbp-playlist-side { margin-top: 10px; }
.cbp-pl-body { display: none; }
.cbp-playlist.is-open .cbp-pl-body { display: flex; }
.cbp-pl-list { max-height: 46vh; }

/* Wide: a real sidebar, always open, matched to the player's height.
   Container query, not a media query — the block can sit in a narrow column on a
   wide screen, and it is the block's own width that decides if a sidebar fits. */
@container (min-width: 780px) {
	.cbp-playlist-grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 14px;
		align-items: start;
	}
	.cbp-playlist-side {
		margin-top: 0;
		/* 1.21.1: this used to cap at the player's height ("the list ends
		   where the video does"). The sidebar chrome has grown since (two
		   search boxes + hints, Autoplay, the Revision reel), and the lesson
		   list is the only flexing child — the cap squeezed it to ONE visible
		   row on a real course, hiding the other 46 lessons. The sidebar may
		   now extend below the video; the LIST carries its own bounds. */
		max-height: none;
	}
	.cbp-pl-body { display: flex; min-height: 0; }
	.cbp-pl-toggle { display: none; }
	.cbp-pl-list {
		/* ≥5 rows always visible (a row is ~68px: 92px 16:9 thumb + padding),
		   capped so 47 lessons scroll inside the list, never the page. */
		min-height: 360px;
		max-height: 480px;
		overflow-y: auto;
	}
}

/* B6 / 0.2: this block used to carry a prefers-color-scheme:dark palette.
   Removed on purpose — the sidebar and course chrome sit in THEME content, so
   they must follow the site's theme, not the visitor's OS. Only .cbp-player
   itself is deliberately always-dark. Do not reintroduce an OS dark-mode
   query for anything outside .cbp-player. */

@media (max-width: 560px) {
	.cbp-controls { padding-inline: 6px; }
	.cbp-buttons { gap: 1px; }
	.cbp-btn { width: 31px; height: 31px; }
	.cbp-time { padding-inline: 3px; font-size: 11px; }
	.cbp-volume input[type="range"] { display: none; }
	.cbp-course-nav { grid-template-columns: 1fr 1fr; }
	.cbp-course-complete { grid-column: 1 / -1; grid-row: 2; }
	.cbp-continue { align-items: flex-start; flex-direction: column; gap: 2px; }
	.cbp-pl-thumb { flex-basis: 104px; }
	.cbp-bookmarks { right: 6px; bottom: 52px; width: calc(100% - 12px); max-height: calc(100% - 64px); }
	.cbp-bookmarks-add { grid-template-columns: max-content minmax(0, 1fr); }
	.cbp-bookmarks-save { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
	.cbp-btn { width: 29px; height: 29px; }
	.cbp-time .cbp-dim { display: none; }
}

/* Visually-hidden text. Ships here rather than relying on the theme: .screen-reader-text
   is a theme convention, not a WordPress guarantee, and a block theme without it would
   dump "Watched" as visible text beside every finished lesson. Scoped so it can never
   fight a theme's own rule elsewhere on the page. */
.cbp-playlist .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------------------
   Study panel — summary, key takeaways, and the searchable transcript.

   Sits under the player in the main column, not in the sidebar: the sidebar is
   the course (where am I?), this is the lesson (what's in it?). Content is
   teacher-authored and uploaded; the plugin never generates it.
   --------------------------------------------------------------------------- */
.cbp-study {
	margin-top: 12px;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}
.cbp-study[hidden] { display: none; }

.cbp-study-tabs {
	display: flex;
	gap: 2px;
	padding: 6px 6px 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.cbp-study-tab {
	border: 0;
	background: transparent;
	padding: 8px 14px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #5c5f66;
	cursor: pointer;
	border-radius: 8px 8px 0 0;
	border-bottom: 2px solid transparent;
}
.cbp-study-tab:hover { background: rgba(55, 84, 237, .06); }
.cbp-study-tab.is-on { color: var(--cbp-accent, #3754ED); border-bottom-color: var(--cbp-accent, #3754ED); }
.cbp-study-tab[hidden] { display: none; }
.cbp-study-tab:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: -2px; }

.cbp-study-panel { padding: 14px 16px; }
.cbp-study-panel[hidden] { display: none; }

.cbp-study-summary { margin: 0 0 .8em; line-height: 1.55; }
.cbp-study-summary[hidden] { display: none; }
.cbp-study-h { margin: 0 0 .4em; font-size: 14px; font-weight: 700; }
.cbp-study-h[hidden] { display: none; }
.cbp-study-takeaways { margin: 0; padding-left: 1.2em; line-height: 1.55; }
.cbp-study-takeaways li { margin-bottom: .3em; }

.cbp-study-keywords { margin-top: .9em; display: flex; flex-wrap: wrap; gap: 6px; }
.cbp-kw {
	font-size: 12px;
	padding: 3px 10px;
	border: 0;
	border-radius: 999px;
	background: rgba(55, 84, 237, .1);
	color: #2c3ea8;
	font-family: inherit;
	cursor: pointer;
}
.cbp-kw:hover { background: rgba(55, 84, 237, .2); }
.cbp-kw:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }

/* Transcript */
.cbp-tr-search { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.cbp-tr-search[hidden] { display: none !important; }
.cbp-tr-hint { margin: 0 0 10px; font-size: 12px; opacity: .65; }
.cbp-tr-hint[hidden] { display: none !important; }
.cbp-pl-hint { margin: 4px 0 0; font-size: 12px; opacity: .65; }

/* Prev/next match controls + highlighting (0.3). */
.cbp-tr-prev,
.cbp-tr-next {
	flex: none;
	width: 30px;
	height: 30px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 7px;
	background: transparent;
	font: inherit;
	cursor: pointer;
}
.cbp-tr-prev[hidden], .cbp-tr-next[hidden] { display: none !important; }
.cbp-tr-prev:focus-visible, .cbp-tr-next:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }
.cbp-tr-line mark {
	background: color-mix(in srgb, var(--cbp-accent-2, #ED008C) 22%, transparent);
	color: inherit;
	border-radius: 3px;
	padding: 0 1px;
}
.cbp-tr-line.is-current-match {
	background: rgba(55, 84, 237, .12);
	outline: 2px solid var(--cbp-accent, #3754ED);
	outline-offset: -2px;
}
.cbp-tr-q {
	flex: 1;
	padding: 7px 10px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
}
.cbp-tr-q:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }
.cbp-tr-count { font-size: 12px; color: #7a7d85; white-space: nowrap; }

.cbp-tr-body {
	max-height: 22em;
	overflow-y: auto;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 8px;
	padding: 4px;
}
.cbp-tr-body:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: -2px; }
/* Each line is a button: click to jump the player to that moment. */
.cbp-tr-line {
	display: flex;
	gap: 10px;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	line-height: 1.45;
	padding: 5px 8px;
	border-radius: 6px;
	cursor: pointer;
}
.cbp-tr-line[hidden] { display: none; }
.cbp-tr-line:hover { background: rgba(55, 84, 237, .08); }
.cbp-tr-line:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: -2px; }
/* Definitions tab (B3). A <dl> of teacher-written terms; each entry may carry
   a "jump to" review action that seeks the player. */
.cbp-gl-body {
	margin: 0;
	max-height: 22em;
	overflow-y: auto;
}
.cbp-gl-body:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: -2px; }
.cbp-gl-item { padding: 8px 4px; }
.cbp-gl-item + .cbp-gl-item { border-top: 1px solid rgba(0, 0, 0, .08); }
.cbp-gl-item dt { font-weight: 700; }
.cbp-gl-term { font-style: normal; }
.cbp-gl-aliases { font-weight: 400; font-size: 13px; opacity: .7; }
.cbp-gl-def { margin: .25em 0 0; line-height: 1.5; }
.cbp-gl-jump {
	display: inline-block;
	margin-left: .6em;
	border: 0;
	background: transparent;
	padding: 0;
	font: inherit;
	font-size: 13px;
	color: var(--cbp-accent, #3754ED);
	text-decoration: underline;
	cursor: pointer;
}
.cbp-gl-jump:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 2px; }

/* Timeline tab (2.2): filter chips + one marker list. Colour per type is
   backed by a glyph and a text type label, never colour alone. */
.cbp-tl-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cbp-tl-filter {
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 999px;
	background: transparent;
	padding: 4px 12px;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.cbp-tl-filter[aria-pressed="true"] { background: var(--cbp-accent, #3754ED); color: #fff; border-color: transparent; }
.cbp-tl-filter:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }
.cbp-tl-body { max-height: 22em; overflow-y: auto; }
.cbp-tl-body:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: -2px; }
.cbp-tl-item {
	display: flex;
	gap: 10px;
	width: 100%;
	text-align: left;
	border: 0;
	border-left: 3px solid transparent;
	background: transparent;
	font: inherit;
	padding: 7px 8px;
	border-radius: 6px;
	cursor: pointer;
}
.cbp-tl-item[hidden] { display: none !important; }
.cbp-tl-item:hover { background: rgba(55, 84, 237, .08); }
.cbp-tl-item:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: -2px; }
.cbp-tl-glyph { flex: none; width: 1.4em; text-align: center; }
.cbp-tl-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cbp-tl-label { font-weight: 600; }
.cbp-tl-meta { font-size: 12px; opacity: .65; }
.cbp-tl-note { font-size: 13px; line-height: 1.4; opacity: .8; }
.cbp-tl-chapter        { border-left-color: #3754ED; }
.cbp-tl-worked_example { border-left-color: #1f8a4c; }
.cbp-tl-definition     { border-left-color: #7c3aed; }
.cbp-tl-exam_tip       { border-left-color: #b45309; }
.cbp-tl-common_mistake { border-left-color: #dc2626; }
.cbp-tl-checkpoint     { border-left-color: #0e7490; }
.cbp-tl-note           { border-left-color: #6b7280; }

/* Current chapter beside the transcript controls. */
.cbp-tr-current { font-size: 12px; font-weight: 600; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12em; }

/* Seek-bar markers (decorative layer; the Timeline tab is the a11y path). */
.cbp-marker-tick {
	position: absolute;
	top: 50%;
	transform: translate(-50%, -140%);
	font-size: 9px;
	line-height: 1;
	pointer-events: none;
}
.cbp-marker-tick::after { content: attr(data-glyph); }
.cbp-marker-worked_example { color: #4ade80; }
.cbp-marker-definition     { color: #c4b5fd; }
.cbp-marker-exam_tip       { color: #fbbf24; }
.cbp-marker-common_mistake { color: #f87171; }
.cbp-marker-checkpoint     { color: #67e8f9; }
.cbp-marker-note           { color: #d1d5db; }

/* Course-wide search (Phase 4). */
.cbp-cs { padding: 0 12px 6px; }
.cbp-cs-q {
	width: 100%;
	box-sizing: border-box;
	padding: 7px 10px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
}
.cbp-cs-q:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }
.cbp-cs-hint { margin: 4px 0 0; font-size: 12px; opacity: .65; }
.cbp-cs-results {
	margin-top: 6px;
	max-height: 20em;
	overflow-y: auto;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 8px;
	padding: 4px;
}
.cbp-cs-results[hidden] { display: none !important; }
.cbp-cs-heading { margin: 6px 4px 2px; font-size: 11px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; opacity: .6; }
.cbp-cs-hit {
	display: flex;
	flex-direction: column;
	gap: 1px;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 13px;
	padding: 6px 8px;
	border-radius: 6px;
	cursor: pointer;
}
.cbp-cs-hit:hover { background: rgba(55, 84, 237, .08); }
.cbp-cs-hit:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: -2px; }
.cbp-cs-main { line-height: 1.4; }
.cbp-cs-meta { font-size: 11px; opacity: .6; }

/* Practice tab (Phase 3). */
.cbp-pr-progress { margin: 0 0 .4em; font-size: 12px; opacity: .65; }
.cbp-pr-prompt { margin: 0 0 .8em; font-weight: 600; line-height: 1.5; }
.cbp-pr-options { display: grid; gap: 8px; margin-bottom: 12px; }
.cbp-pr-option {
	text-align: left;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 9px;
	background: transparent;
	font: inherit;
	padding: 10px 14px;
	cursor: pointer;
}
.cbp-pr-option[aria-pressed="true"] { border-color: var(--cbp-accent, #3754ED); background: rgba(55, 84, 237, .08); }
.cbp-pr-option:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }
.cbp-pr-short {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 8px;
	font: inherit;
	margin-bottom: 12px;
}
.cbp-pr-check, .cbp-pr-next, .cbp-pr-restart {
	border: 0;
	border-radius: 8px;
	background: var(--cbp-accent, #3754ED);
	color: #fff;
	font: inherit;
	font-weight: 650;
	padding: 9px 18px;
	cursor: pointer;
}
.cbp-pr-check:disabled { opacity: .5; cursor: default; }
.cbp-pr-check[hidden] { display: none !important; }
.cbp-pr-confwrap { margin-top: 10px; }
.cbp-pr-confwrap p { margin: 0 0 .5em; font-size: 14px; }
.cbp-pr-conf {
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 999px;
	background: transparent;
	font: inherit;
	font-size: 14px;
	padding: 6px 14px;
	margin-right: 6px;
	cursor: pointer;
}
.cbp-pr-conf:hover { border-color: var(--cbp-accent, #3754ED); }
.cbp-pr-result { margin-top: 12px; padding: 12px 14px; border-radius: 9px; }
.cbp-pr-result.is-right { background: rgba(31, 138, 76, .1); border: 1px solid rgba(31, 138, 76, .4); }
.cbp-pr-result.is-wrong { background: rgba(220, 38, 38, .07); border: 1px solid rgba(220, 38, 38, .35); }
.cbp-pr-verdict { margin: 0 0 .4em; font-weight: 700; }
.cbp-pr-expl { margin: 0 0 .7em; line-height: 1.5; }
.cbp-pr-rewatch, .cbp-pr-retry {
	border: 1px solid rgba(0, 0, 0, .25);
	border-radius: 8px;
	background: transparent;
	font: inherit;
	padding: 7px 14px;
	margin-right: 8px;
	cursor: pointer;
}
.cbp-pr-rewatch { color: var(--cbp-accent, #3754ED); border-color: rgba(55, 84, 237, .5); }
.cbp-pr-conf:focus-visible, .cbp-pr-rewatch:focus-visible, .cbp-pr-retry:focus-visible,
.cbp-pr-next:focus-visible, .cbp-pr-check:focus-visible, .cbp-pr-restart:focus-visible {
	outline: 2px solid var(--cbp-accent, #3754ED);
	outline-offset: 1px;
}

/* The spaced-review chip on the course page (3.3). */
.cbp-due-chip {
	margin: 0 0 10px;
	padding: 8px 14px;
	border: 1px solid rgba(237, 0, 140, .35);
	border-radius: 999px;
	display: inline-block;
	background: color-mix(in srgb, var(--cbp-accent-2, #ED008C) 8%, transparent);
	font-size: 13px;
	font-weight: 600;
}

/* Transcript failure states (B4): distinct from the "no transcript" text and
   always paired with a working action. */
.cbp-tr-error { margin: 8px 8px 10px; }
.cbp-tr-action {
	margin: 0 8px 8px;
	padding: 7px 14px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 8px;
	background: transparent;
	color: var(--cbp-accent, #3754ED);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.cbp-tr-action:hover { border-color: var(--cbp-accent, #3754ED); }
.cbp-tr-action:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }

/* Transcript toolbar buttons (follow / original wording). */
.cbp-tr-follow, .cbp-tr-orig {
	flex: none;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 999px;
	background: transparent;
	font: inherit;
	font-size: 12px;
	padding: 5px 11px;
	cursor: pointer;
	white-space: nowrap;
}
.cbp-tr-follow[aria-pressed="true"], .cbp-tr-orig[aria-pressed="true"] {
	background: var(--cbp-accent, #3754ED);
	color: #fff;
	border-color: transparent;
}
.cbp-tr-follow:focus-visible, .cbp-tr-orig:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }

/* Reading mode (6.4): size + spacing ride together; contrast is separate. */
.cbp-tr-body.cbp-read-l .cbp-tr-line { font-size: 17px; line-height: 1.7; }
.cbp-tr-body.cbp-read-xl .cbp-tr-line { font-size: 20px; line-height: 1.9; }
.cbp-tr-body.cbp-read-contrast { background: #000; }
.cbp-tr-body.cbp-read-contrast .cbp-tr-line { color: #fff; }
.cbp-tr-body.cbp-read-contrast .cbp-tr-t { color: #9db2ff; }
.cbp-tr-size, .cbp-tr-contrast {
	flex: none;
	width: 32px;
	height: 30px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 7px;
	background: transparent;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.cbp-tr-size:focus-visible, .cbp-tr-contrast:focus-visible { outline: 2px solid var(--cbp-accent, #3754ED); outline-offset: 1px; }

.cbp-tr-t {
	flex: none;
	font-variant-numeric: tabular-nums;
	color: var(--cbp-accent, #3754ED);
	font-size: 12px;
	padding-top: 2px;
}
.cbp-tr-s { min-width: 0; }

/* (B6: the study panel's OS dark-mode palette was removed here too — the
   study card is theme content and inherits the page's scheme.) */
/* The syllabus chapter, distinguished from the looser keyword chips. */
.cbp-kw-topic { background: var(--cbp-accent, #3754ED); color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------------------
   Topic cross-linking.

   A recorded class does not respect chapter boundaries, so a chapter page has
   two kinds of row: lessons that ARE this chapter, and lessons that merely
   contain it. The second kind must look different — a student following one is
   being dropped into the middle of a lesson named after something else, and
   needs to know that before they click.

   These blocks sit in THEME content, not inside .cbp-player, so they must not
   set a colour scheme of their own: an earlier draft keyed its dark styling off
   prefers-color-scheme and rendered black-on-black inside a light theme whose
   visitor had a dark OS. Everything here inherits the theme's text colour and
   tints with alpha over whatever the theme's background happens to be.
   --------------------------------------------------------------------------- */
.cbp-topic {
	--cbp-accent: #3754ED;
	--cbp-accent-2: #ED008C;
	margin-bottom: 1.5em;
	color: inherit;
}
.cbp-topic-title { margin: 0 0 .6em; }
.cbp-topic-none {
	margin: 0;
	padding: 12px 14px;
	border: 1px dashed currentColor;
	border-color: color-mix(in srgb, currentColor 28%, transparent);
	border-radius: 8px;
	font-size: 14px;
	opacity: .8;
}
.cbp-topic-h { margin: 1.2em 0 .4em; font-size: 15px; font-weight: 700; }

.cbp-topic-list { list-style: none; margin: 0; padding: 0; }
.cbp-topic-item {
	padding: 10px 12px;
	border: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 8px;
	margin-bottom: 8px;
	background: transparent;
}
.cbp-topic-link {
	font-weight: 600;
	text-decoration: none;
	color: inherit;
}
.cbp-topic-link:hover { text-decoration: underline; }
.cbp-topic-note,
.cbp-topic-label {
	display: block;
	margin-top: .25em;
	font-size: 13px;
	line-height: 1.45;
	opacity: .72;
}
.cbp-topic-label { font-weight: 600; opacity: .85; }

/* The "also covered" group: tinted, rule down the left, and each row says
   which chapter it actually belongs to before it says anything else. */
.cbp-topic-also { margin-top: 1.4em; }
.cbp-topic-also-intro { margin: 0 0 .7em; font-size: 13px; opacity: .72; max-width: 46em; }
.cbp-topic-item--also {
	background: color-mix(in srgb, var(--cbp-accent-2) 7%, transparent);
	border-color: color-mix(in srgb, var(--cbp-accent-2) 32%, transparent);
	border-left: 3px solid var(--cbp-accent-2);
}
.cbp-topic-from {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .07em;
	opacity: .75;
	margin-bottom: .2em;
}
.cbp-topic-at {
	display: inline-block;
	margin-left: .5em;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	font-size: 13px;
	color: var(--cbp-accent);
}

/* "Also in this lesson:" — the reverse direction, under the player. This one
   DOES live next to the player, but the playlist panel around it follows the
   theme, so the same inherit-and-tint rules apply. */
.cbp-also {
	--cbp-accent: #3754ED;
	--cbp-accent-2: #ED008C;
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px solid color-mix(in srgb, var(--cbp-accent-2) 32%, transparent);
	border-left: 3px solid var(--cbp-accent-2);
	border-radius: 8px;
	background: color-mix(in srgb, var(--cbp-accent-2) 7%, transparent);
	font-size: 14px;
	color: inherit;
}
.cbp-also[hidden] { display: none; }
.cbp-also-label { font-weight: 600; margin-right: .4em; }
.cbp-also-list { list-style: none; margin: .3em 0 0; padding: 0; }
.cbp-also-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45em; margin-bottom: .3em; }
.cbp-also-topic { font-weight: 600; }
.cbp-also-dash { opacity: .5; }
.cbp-also-label-text { opacity: .82; }
.cbp-also-jump {
	border: 0;
	background: transparent;
	padding: 0;
	font: inherit;
	color: var(--cbp-accent);
	text-decoration: underline;
	cursor: pointer;
}
.cbp-also-jump:focus-visible { outline: 2px solid var(--cbp-accent); outline-offset: 2px; }
.cbp-also-note { flex: 1 1 100%; font-size: 13px; line-height: 1.45; opacity: .72; }

/* Older engines without color-mix still need a visible boundary. */
@supports not (background: color-mix(in srgb, red 5%, transparent)) {
	.cbp-topic-item--also,
	.cbp-also { background: rgba(237, 0, 140, .07); border-color: rgba(237, 0, 140, .32); }
	.cbp-topic-item { border-color: rgba(128, 128, 128, .35); }
}

/* --- Revision reel (1.20.0) ---------------------------------------------- */
.cbp-reel { margin-top: 1.1rem; border-top: 1px solid rgba(128, 128, 128, 0.35); padding-top: 0.8rem; }
.cbp-reel-h { margin: 0 0 0.35rem; font-size: 0.95rem; }
.cbp-reel-status { margin: 0.25rem 0; font-size: 0.85rem; opacity: 0.85; }
.cbp-reel-list { list-style: none; margin: 0.4rem 0; padding: 0; max-height: 14rem; overflow-y: auto; }
.cbp-reel-item { display: flex; align-items: center; gap: 0.45rem; padding: 0.22rem 0; font-size: 0.88rem; }
.cbp-reel-item[hidden] { display: none; }
.cbp-reel-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbp-reel-del { flex: 0 0 auto; border: 0; background: transparent; cursor: pointer; font-size: 1rem; line-height: 1; opacity: 0.65; }
.cbp-reel-del:hover, .cbp-reel-del:focus-visible { opacity: 1; }
.cbp-reel-controls { display: flex; gap: 0.5rem; margin: 0.4rem 0 0; }
.cbp-reel-controls[hidden] { display: none; }
.cbp-addreel { border: 1px solid rgba(128, 128, 128, 0.5); background: transparent; border-radius: 999px; cursor: pointer; font-size: 0.75rem; padding: 0.1rem 0.5rem; margin: 0.15rem 0 0.35rem; }
.cbp-addreel:hover, .cbp-addreel:focus-visible { border-color: currentColor; }
.cbp-bookmark-reel { border: 1px solid rgba(128, 128, 128, 0.5); background: transparent; border-radius: 999px; cursor: pointer; font-size: 0.75rem; padding: 0.1rem 0.5rem; }

/* --- Quick Watch (1.21.0) ------------------------------------------------- */
.cbp-qw { margin: 0.9rem 0; }
.cbp-qw[hidden] { display: none; }
.cbp-qw-card { border: 1px solid rgba(128, 128, 128, 0.4); border-left: 4px solid currentColor; border-radius: 6px; padding: 0.75rem 0.9rem; }
.cbp-qw-kind { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; margin-right: 0.6rem; }
.cbp-qw-kind[hidden] { display: none; }
.cbp-qw-text { margin: 0.3rem 0; font-size: 1rem; line-height: 1.45; transition: opacity 160ms ease; }
.cbp-qw-count, .cbp-qw-elapsed { font-size: 0.8rem; opacity: 0.75; margin-right: 0.8rem; }
.cbp-qw-controls { display: flex; gap: 0.5rem; margin: 0.5rem 0 0; }
.cbp-qw-controls[hidden] { display: none; }
.cbp-qw-skip, .cbp-qw-exit, .cbp-qw-btn { border: 1px solid rgba(128, 128, 128, 0.5); background: transparent; border-radius: 999px; cursor: pointer; padding: 0.25rem 0.75rem; font-size: 0.85rem; }
.cbp-qw-skip:hover, .cbp-qw-exit:hover, .cbp-qw-btn:hover,
.cbp-qw-skip:focus-visible, .cbp-qw-exit:focus-visible, .cbp-qw-btn:focus-visible { border-color: currentColor; }
.cbp-qw-row { margin: 0 0 0.6rem; }
@media (prefers-reduced-motion: reduce) {
	.cbp-qw-text { transition: none; }
}
