/* ==========================================================================
   PeakPoint Webinars — Front-end Styles
   Scoped to pp-library, pp-card, pp-room, pp-unlock.
   Uses CSS custom properties so the child theme can rebrand with 4 variables.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Brand tokens (override in child theme)
   -------------------------------------------------------------------------- */
:root {
	/* PeakPoint brand: white / black / red only. */
	--pp-primary:        #e10600;
	--pp-primary-dark:   #b30500;
	--pp-primary-light:  #fdeceb;
	--pp-accent:         #0a0a0a;
	--pp-text:           #0a0a0a;
	--pp-text-muted:     #6b7280;
	--pp-bg:             #ffffff;
	--pp-bg-alt:         #f6f7f8;
	--pp-border:         #e2e4e9;
	--pp-radius:         10px;
	--pp-radius-lg:      18px;
	--pp-radius-xl:      20px;
	--pp-page-bg:        #fafafa;
	--pp-shadow-card:    0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06);
	--pp-shadow-hover:   0 4px 16px rgba(16,24,40,.08), 0 12px 36px rgba(16,24,40,.10);
	--pp-shadow-soft:    0 2px 8px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.05);
	/* Shared focus-glow value — was previously the same literal rgba(...)
	   repeated on both the search input and the select's :focus rule. */
	--pp-focus-shadow:   0 0 0 3px rgba(225,6,0,.12);
	--pp-font:           "Inter", "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	/* Color-coded material/file-type icon squares (matches the reference
	   mockup: PDF=red, PowerPoint=orange, Word=blue, ZIP/file=slate,
	   link=green, notes=yellow). */
	--pp-type-pdf:        #e10600;
	--pp-type-powerpoint: #e8720c;
	--pp-type-word:       #1d5fd6;
	--pp-type-excel:      #157a4a;
	--pp-type-zip:        #6b4fd1;
	--pp-type-file:       #64748b;
	--pp-type-link:       #0f9d58;
	--pp-type-text:       #d69e00;
	--pp-type-video:      #e10600;
}

/* Visually hide text while keeping it available to assistive tech — a
   defensive local definition so screen-reader-only labels/announcements
   never depend on the active theme happening to define this class. */
.screen-reader-text,
.pp-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   Shared utilities
   -------------------------------------------------------------------------- */
.pp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .35em;
	padding: .55em 1.2em;
	font-family: var(--pp-font);
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.4;
	border-radius: var(--pp-radius);
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
	background: var(--pp-primary);
	color: #fff;
}
.pp-btn:hover,
.pp-btn:focus-visible {
	background: var(--pp-primary-dark);
	color: #fff;
	text-decoration: none;
}
.pp-btn--outline {
	background: transparent;
	color: var(--pp-primary);
	border-color: var(--pp-primary);
}
.pp-btn--outline:hover,
.pp-btn--outline:focus-visible {
	background: var(--pp-primary-light);
}
.pp-btn--sm {
	font-size: .8rem;
	padding: .4em 1em;
}
.pp-btn--full {
	width: 100%;
}
/* Dark (black) call-to-action — matches the webinar-card reference button. */
.pp-btn--dark {
	background: var(--pp-accent);
	color: #fff;
	border-color: var(--pp-accent);
}
.pp-btn--dark:hover,
.pp-btn--dark:focus-visible {
	background: var(--pp-primary);
	border-color: var(--pp-primary);
	color: #fff;
}
.pp-btn__arrow {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	transition: transform .15s;
}
.pp-btn:hover .pp-btn__arrow,
.pp-btn:focus-visible .pp-btn__arrow {
	transform: translateX(3px);
}
.pp-notice {
	padding: .8em 1.1em;
	border-radius: var(--pp-radius);
	margin-bottom: 1.25rem;
	font-size: .95rem;
}
.pp-notice--success {
	background: var(--pp-bg-alt);
	color: var(--pp-text);
	border-left: 3px solid var(--pp-primary);
}
.pp-notice--error {
	background: var(--pp-primary-light);
	color: #8a0400;
}
.pp-badge--featured {
	display: inline-block;
	padding: .2em .7em;
	background: var(--pp-accent);
	color: #fff;
	border-radius: 20px;
	font-size: .75rem;
	font-weight: 700;
}
.pp-badge-access {
	display: inline-block;
	padding: .2em .7em;
	border-radius: 20px;
	font-size: .7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.pp-badge-access--public {
	background: #f0f0f1;
	color: var(--pp-accent);
}
.pp-badge-access--private {
	background: var(--pp-primary-light);
	color: var(--pp-primary-dark);
}

/* --------------------------------------------------------------------------
   Library page (also used standalone by the Elementor
   "PeakPoint Webinar Library" widget, wherever it's placed)
   -------------------------------------------------------------------------- */
.pp-library {
	font-family: var(--pp-font);
	color: var(--pp-text);
}

/* Toolbar — premium filter bar */
.pp-library__toolbar {
	margin: 0 auto 2rem;
	max-width: 820px;
	background: var(--pp-bg);
	border: 1px solid var(--pp-border);
	border-radius: 999px;
	padding: .6rem .7rem;
	box-shadow: var(--pp-shadow-card);
}
.pp-library__search-form {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	flex-wrap: wrap;
}
.pp-library__search-wrap {
	flex: 1 1 220px;
	min-width: 0;
}
.pp-library__search-input {
	width: 100%;
	padding: .6em 1em .6em 2.4em;
	border: 1px solid var(--pp-border);
	border-radius: 999px;
	font-size: .95rem;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	background-color: var(--pp-bg-alt);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.9 3.5l4.3 4.3-1.4 1.4-4.3-4.3A6 6 0 012 8z' clip-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 16px;
	background-position: .9em center;
}
.pp-library__search-input:focus {
	border-color: var(--pp-primary);
	box-shadow: var(--pp-focus-shadow);
	background-color: var(--pp-bg);
}
.pp-library__clear-search {
	font-size: .85rem;
	color: var(--pp-text-muted);
	text-decoration: none;
}
.pp-library__clear-search:hover { color: var(--pp-primary); }
.pp-library__select {
	appearance: none;
	-webkit-appearance: none;
	padding: .6em 2.2em .6em 1em;
	border: 1px solid var(--pp-border);
	border-radius: 999px;
	font-size: .9rem;
	background-color: var(--pp-bg-alt);
	color: var(--pp-text);
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5H5.5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 16px;
	background-position: right .7em center;
}
.pp-library__select:hover { border-color: var(--pp-text-muted); }
.pp-library__select:focus {
	outline: none;
	border-color: var(--pp-primary);
	box-shadow: var(--pp-focus-shadow);
}

/* Category / access pills */
.pp-library__cats,
.pp-library__access {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-bottom: 1rem;
}
.pp-library__access {
	margin-bottom: 1.25rem;
}
.pp-cat-pill {
	padding: .35em .9em;
	border-radius: 20px;
	font-size: .85rem;
	font-weight: 500;
	border: 1px solid var(--pp-border);
	background: var(--pp-bg);
	color: var(--pp-text-muted);
	text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
}
.pp-cat-pill:hover { border-color: var(--pp-primary); color: var(--pp-primary); }
.pp-cat-pill--active {
	background: var(--pp-primary);
	border-color: var(--pp-primary);
	color: #fff;
}
.pp-cat-pill--active:hover {
	background: var(--pp-primary-dark);
	border-color: var(--pp-primary-dark);
	color: #fff;
}

/* Public / Private segmented toggle */
.pp-library__segmented {
	display: flex;
	gap: .15rem;
	padding: .2rem;
	background: var(--pp-bg-alt);
	border-radius: 999px;
	flex-shrink: 0;
}
.pp-library__segment {
	padding: .45em 1rem;
	font-size: .85rem;
	font-weight: 600;
	color: var(--pp-text-muted);
	text-decoration: none;
	border-radius: 999px;
	white-space: nowrap;
	transition: background .15s, color .15s;
	/* These are <button>s now (client-side filtering) — strip the user-agent
	   button chrome so they match the design. Must stay BEFORE the --active
	   rule below: an equal-specificity rule declared after it would win the
	   cascade and silently cancel the active (red) background. */
	background: transparent;
	border: 0;
	cursor: pointer;
	font-family: inherit;
}
.pp-library__segment:hover { color: var(--pp-text); }
.pp-library__segment--active,
.pp-library__segment--active:hover {
	background: var(--pp-primary);
	color: #fff;
}
.pp-library__search-btn { flex-shrink: 0; }

.pp-library__clear-search {
	background: transparent;
	border: 0;
	cursor: pointer;
	font-family: inherit;
}

/* --------------------------------------------------------------------------
   Client-side webinar filtering (search + Public/Private)
   -------------------------------------------------------------------------- */
.pp-card--filtered-out {
	display: none !important;
}

/* Gentle fade applied only on deliberate filter changes (not per keystroke),
   so persistent cards never flash. */
.pp-grid.is-filtering {
	animation: pp-grid-fade .22s ease;
}
@keyframes pp-grid-fade {
	from { opacity: .35; }
	to   { opacity: 1; }
}

.pp-library__noresults {
	text-align: center;
	padding: 3.5rem 1rem;
	color: var(--pp-text-muted);
}
.pp-library__noresults-icon {
	display: block;
	width: 46px;
	height: 46px;
	margin: 0 auto 1rem;
	color: var(--pp-primary);
	opacity: .85;
}
.pp-library__noresults-title {
	margin: 0 0 .4rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--pp-text);
}
.pp-library__noresults-hint {
	margin: 0;
	font-size: .9rem;
}

@media (prefers-reduced-motion: reduce) {
	.pp-grid.is-filtering { animation: none; }
}

/* Empty state */
.pp-library__empty {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--pp-text-muted);
}
.pp-library__empty p { margin-bottom: 1rem; }

/* --------------------------------------------------------------------------
   Webinars section — a self-contained, full-width band so the card grid is
   never squeezed into a narrow theme content column. Provides the
   #pp-webinar-library scroll anchor the primary nav points at.
   -------------------------------------------------------------------------- */
.pp-webinar-section {
	font-family: var(--pp-font);
	/* Full-bleed out of narrow theme containers (OceanWP single-page column,
	   etc.) so the 4-up grid always has room to breathe. Harmless inside a
	   full-width Elementor section. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 3.5rem 1.25rem;
	overflow-x: clip;
	scroll-margin-top: 90px; /* offset for sticky headers when nav scrolls here */
}
.pp-webinar-section__inner {
	/* Full available width (minus the section's own padding) so the card grid
	   starts at the very left edge of the page — no centered max-width column
	   leaving dead space before the first card. The toolbar keeps its own
	   max-width and stays centered independently. */
	max-width: none;
	margin: 0 auto;
}
.pp-webinar-section__head {
	text-align: center;
	margin-bottom: 2rem;
}
.pp-section-title {
	margin: 0;
	font-family: var(--pp-font);
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--pp-text);
}

/* --------------------------------------------------------------------------
   Card grid — fixed, predictable column counts:
   5 desktop / 4 laptop / 3 small-desktop / 2 tablet / 1 mobile.
   Equal width & height; first card always flush at the very left.
   -------------------------------------------------------------------------- */
.pp-grid,
.pp-grid--cols-1,
.pp-grid--cols-2,
.pp-grid--cols-3,
.pp-grid--cols-4 {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(5, minmax(0, 1fr));
}
.pp-grid--dash {
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 1.25rem;
}

/* Laptop → 4 across */
@media (max-width: 1440px) {
	.pp-grid,
	.pp-grid--cols-1,
	.pp-grid--cols-2,
	.pp-grid--cols-3,
	.pp-grid--cols-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Small desktop / large tablet → 3 across */
@media (max-width: 1180px) {
	.pp-grid,
	.pp-grid--cols-1,
	.pp-grid--cols-2,
	.pp-grid--cols-3,
	.pp-grid--cols-4 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Tablet → 2 across */
@media (max-width: 900px) {
	.pp-grid,
	.pp-grid--cols-1,
	.pp-grid--cols-2,
	.pp-grid--cols-3,
	.pp-grid--cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Mobile → 1 per row */
@media (max-width: 600px) {
	.pp-grid,
	.pp-grid--cols-1,
	.pp-grid--cols-2,
	.pp-grid--cols-3,
	.pp-grid--cols-4,
	.pp-grid--dash {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}
	.pp-webinar-section { padding: 2.5rem 1rem; }
}

/* --------------------------------------------------------------------------
   Webinar card
   -------------------------------------------------------------------------- */
.pp-card {
	background: var(--pp-bg);
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--pp-shadow-card);
	transition: box-shadow .25s cubic-bezier(.22,.9,.3,1), transform .25s cubic-bezier(.22,.9,.3,1), border-color .25s;
}
.pp-card:hover {
	box-shadow: var(--pp-shadow-hover);
	transform: translateY(-4px);
	border-color: #d7dbe2;
}
.pp-card--featured { border-color: var(--pp-accent); }
.pp-card--pinned   { order: -1; }

/* Thumbnail */
.pp-card__thumb-link { display: block; }
.pp-card__thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--pp-bg-alt);
}
.pp-card__thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s;
}
.pp-card:hover .pp-card__thumb-img { transform: scale(1.04); }
.pp-card__thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #d1d5db;
}
.pp-card__thumb-placeholder svg { width: 48px; height: 48px; }
.pp-card__lock {
	position: absolute;
	top: .5rem;
	right: .5rem;
	background: rgba(0,0,0,.6);
	color: #fff;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pp-card__lock svg { width: 14px; height: 14px; }
.pp-card__featured-badge {
	position: absolute;
	top: .5rem;
	right: .5rem;
	background: var(--pp-accent);
	color: #fff;
	padding: .2em .55em;
	border-radius: 4px;
	font-size: .7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* Access badge overlaid on the thumbnail (Public / Private) */
.pp-card__badge {
	position: absolute;
	top: .7rem;
	left: .7rem;
	display: inline-flex;
	align-items: center;
	gap: .3em;
	padding: .3em .7em;
	border-radius: 5px;
	font-size: .68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #fff;
	line-height: 1;
	box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.pp-card__badge svg { width: 11px; height: 11px; }
.pp-card__badge--public  { background: var(--pp-primary); }
.pp-card__badge--private { background: var(--pp-accent); }

/* Body */
.pp-card__body {
	padding: 1.15rem 1.15rem 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: .55rem;
}
.pp-card__cat {
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--pp-primary);
}
.pp-card__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
}
.pp-card__title a {
	color: var(--pp-text);
	text-decoration: none;
}
.pp-card__title a:hover { color: var(--pp-primary); }
.pp-card__excerpt {
	margin: 0;
	font-size: .875rem;
	color: var(--pp-text-muted);
	line-height: 1.55;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}
.pp-card__speaker {
	font-size: .8rem;
	color: var(--pp-text-muted);
	margin: 0;
}
.pp-card__speaker-label { font-weight: 600; }
.pp-card__meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
}
.pp-card__stats {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0;
	font-size: .78rem;
	color: var(--pp-text-muted);
}
.pp-card__stat {
	display: inline-flex;
	align-items: center;
	gap: .3em;
}
.pp-card__stat svg {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
}
.pp-card__stats + .pp-card__footer,
.pp-card__excerpt + .pp-card__footer { margin-top: .25rem; }
.pp-card__footer {
	margin-top: auto;
	padding-top: .85rem;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pp-pagination {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   Room page
   -------------------------------------------------------------------------- */
.pp-room {
	font-family: var(--pp-font);
	color: var(--pp-text);
	background: var(--pp-page-bg);
	padding: clamp(1.25rem, 3vw, 2.5rem);
	/* The theme's logo/header bar overlays the top of the page (a transparent/
	   overlay header) and would otherwise collide with the room's breadcrumb +
	   title card. Clearance is applied as padding-top, NOT margin-top: a top
	   margin on this element can silently collapse into the theme's content
	   wrapper and never actually push the content down (which is why an earlier
	   margin-only fix didn't take). padding-top never collapses, so it reliably
	   pushes the breadcrumb + card down clear of the logo. The logo itself is
	   untouched. */
	padding-top: clamp(6rem, 12vw, 9rem);
	border-radius: var(--pp-radius-xl);
	margin-top: clamp(1rem, 3vw, 2rem);
}
.pp-room__breadcrumb { margin-bottom: 1.25rem; }
.pp-room__back {
	font-size: .875rem;
	font-weight: 600;
	color: var(--pp-text-muted);
	text-decoration: none;
	transition: color .15s ease;
}
.pp-room__back:hover { color: var(--pp-primary); }

.pp-room__hero {
	border-radius: var(--pp-radius-xl);
	overflow: hidden;
	margin-bottom: 1.5rem;
	box-shadow: var(--pp-shadow-soft);
}
.pp-room__hero-img {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
}

/* Header card — thumbnail + title/badge/description stacked beside it,
   never overlapping, in a single elevated white card. */
.pp-room__header {
	margin-bottom: 1.75rem;
	background: var(--pp-bg);
	border-radius: var(--pp-radius-xl);
	padding: 1.75rem clamp(1.25rem, 3vw, 2rem);
	box-shadow: var(--pp-shadow-soft);
}
.pp-room__header-top {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin-bottom: .75rem;
}
.pp-room__thumb {
	width: 84px;
	height: 84px;
	border-radius: var(--pp-radius-lg);
	object-fit: cover;
	flex-shrink: 0;
	background: var(--pp-bg-alt);
	box-shadow: var(--pp-shadow-card);
}
.pp-room__title {
	font-size: clamp(1.4rem, 2.4vw, 1.85rem);
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.25;
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	color: var(--pp-text);
}
.pp-room__meta {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin-bottom: .6rem;
}
.pp-room__cat {
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--pp-primary);
}
.pp-room__short-desc {
	font-size: .95rem;
	color: var(--pp-text-muted);
	margin: 0;
	line-height: 1.55;
	max-width: 68ch;
}
@media (max-width: 560px) {
	.pp-room__header-top { align-items: flex-start; gap: 1rem; }
	.pp-room__thumb { width: 60px; height: 60px; }
}

/* Speaker card */
.pp-room__speaker-card {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding: .8rem 1rem;
	background: var(--pp-bg-alt);
	border-radius: var(--pp-radius);
	margin-bottom: 1.75rem;
	border: 1px solid var(--pp-border);
}
.pp-room__speaker-photo {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pp-room__speaker-photo--placeholder svg { width: 24px; height: 24px; color: #9ca3af; }
.pp-room__speaker-info { display: flex; flex-direction: column; }
.pp-room__speaker-name { font-size: .95rem; font-weight: 600; }
.pp-room__speaker-role { font-size: .8rem; color: var(--pp-text-muted); }

/* Content grid — 70/30 viewer/curriculum split on desktop. */
.pp-room__content-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}
.pp-room__content-grid--sidebar {
	grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
}
@media (max-width: 1180px) {
	.pp-room__content-grid--sidebar { grid-template-columns: minmax(0, 6.5fr) minmax(260px, 3.5fr); }
}
@media (max-width: 960px) {
	.pp-room__content-grid--sidebar { grid-template-columns: 1fr; }
	.pp-room__sidebar { order: 2; }
}
.pp-room__sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}
.pp-room__section-heading {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 .85rem;
}
.pp-room__speaker-card--sidebar {
	border: 0;
	padding: 0;
	background: transparent;
	margin-bottom: .75rem;
}
.pp-lessons__count {
	display: inline-block;
	min-width: 1.6em;
	padding: .1em .45em;
	margin-left: .35em;
	background: var(--pp-bg-alt);
	border-radius: 20px;
	font-size: .75rem;
	color: var(--pp-text-muted);
	text-align: center;
}
/* Mobile-only collapse toggle — the curriculum is always expanded on
   desktop; on narrow viewports it becomes a tap-to-expand accordion below
   the content viewer. */
.pp-lessons__toggle {
	display: none;
	margin-left: auto;
	background: transparent;
	border: 0;
	padding: 4px;
	color: var(--pp-text-muted);
	cursor: pointer;
}
.pp-lessons__toggle .dashicons { transition: transform .15s ease; }
.pp-lessons__toggle[aria-expanded="false"] .dashicons { transform: rotate(-90deg); }
@media (max-width: 640px) {
	.pp-lessons__heading { display: flex; align-items: center; }
	.pp-lessons__toggle { display: inline-flex; }
	.pp-lessons__list.is-collapsed { display: none; }
}

/* "Lesson X of Y" / red progress bar / "N% Complete" — one horizontal row
   above the viewer. The bar starts as an honest, purely computed lesson-
   position indicator (no-JS fallback) and is immediately enhanced by
   frontend.js's ppUpdateProgressUI() into a real completion percentage
   drawn from localStorage "visited" tracking. */
.pp-room__progress {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.1rem;
	background: var(--pp-bg);
	border-radius: var(--pp-radius-lg);
	padding: .9rem 1.25rem;
	box-shadow: var(--pp-shadow-card);
}
.pp-room__progress-label {
	flex-shrink: 0;
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--pp-text-muted);
}
.pp-room__progress-track {
	flex: 1 1 auto;
	height: 8px;
	border-radius: 999px;
	background: var(--pp-bg-alt);
	overflow: hidden;
}
.pp-room__progress-fill {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--pp-primary), var(--pp-primary-dark));
	/* Compositor-only animation: scale the full-width bar via transform
	   instead of animating `width` (a layout-triggering property). The
	   fraction is supplied inline as the --pp-progress custom property. */
	transform-origin: left center;
	transform: scaleX(var(--pp-progress, 1));
	transition: transform .3s ease;
}
.pp-room__progress-percent {
	flex-shrink: 0;
	font-size: .8rem;
	font-weight: 700;
	color: var(--pp-primary-dark);
	white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
	.pp-room__progress-fill { transition: none; }
}
@media (max-width: 560px) {
	.pp-room__progress { flex-wrap: wrap; gap: .5rem .85rem; padding: .85rem 1rem; }
	.pp-room__progress-track { flex-basis: 100%; order: 3; }
}

/* "Your Progress" sidebar card. */
.pp-room__progress-card {
	background: var(--pp-bg);
	border-radius: var(--pp-radius-lg);
	padding: 1.35rem 1.5rem;
	box-shadow: var(--pp-shadow-card);
}
.pp-room__progress-card-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .75rem;
	margin-bottom: .75rem;
}
.pp-room__progress-card-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: var(--pp-text);
}
.pp-room__progress-card-pct {
	font-size: 1rem;
	font-weight: 800;
	color: var(--pp-primary);
}
.pp-room__progress-track--card {
	height: 8px;
	margin-bottom: .65rem;
}
.pp-room__progress-card-sub {
	margin: 0;
	font-size: .82rem;
	color: var(--pp-text-muted);
}

/* "Need Help? / Contact Support" sidebar card. */
.pp-room__support-card {
	background: var(--pp-bg);
	border-radius: var(--pp-radius-lg);
	padding: 1.35rem 1.5rem;
	box-shadow: var(--pp-shadow-card);
}
.pp-room__support-card-title {
	margin: 0 0 .4rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--pp-text);
}
.pp-room__support-card-body {
	margin: 0 0 1rem;
	font-size: .87rem;
	color: var(--pp-text-muted);
	line-height: 1.55;
}

/* Main player (active lesson) — large, clean, no card chrome. */
.pp-room__player {
	position: relative;
	margin-bottom: 1.75rem;
	transition: opacity .2s ease;
}
.pp-room__player .pp-resource {
	border: 0;
	padding: 0;
	background: transparent;
}
.pp-room__player .pp-resource__title {
	font-size: 1.15rem;
	margin-bottom: .5rem;
}
.pp-room__empty-resources {
	text-align: center;
	padding: 3rem 1.5rem;
	color: var(--pp-text-muted);
	background: var(--pp-bg);
	border-radius: var(--pp-radius-lg);
	box-shadow: var(--pp-shadow-card);
}

/* Content viewer swap — a gentle dip + centered spinner while a lesson
   loads via AJAX, never an abrupt blank flash or layout jump. */
.pp-room__player.is-loading {
	opacity: .45;
	pointer-events: none;
}
.pp-room__player.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border-radius: 50%;
	border: 3px solid var(--pp-border);
	border-top-color: var(--pp-primary);
	animation: pp-spin .7s linear infinite;
}
@keyframes pp-spin {
	to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
	.pp-room__player { transition: none; }
	.pp-room__player.is-loading::after { animation-duration: 1.4s; }
}

/* Lesson / resource list (course-content style) */
.pp-lessons {
	background: var(--pp-bg);
	border-radius: var(--pp-radius-lg);
	padding: 1.35rem 1.35rem 1.1rem;
	box-shadow: var(--pp-shadow-card);
}
.pp-lessons__heading {
	display: flex;
	align-items: center;
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 .9rem;
}
.pp-lessons__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius);
	overflow: hidden;
	background: var(--pp-bg);
}
.pp-lesson + .pp-lesson {
	border-top: 1px solid var(--pp-border);
}
.pp-lesson {
	position: relative;
}
.pp-lesson__row {
	display: flex;
	align-items: center;
	gap: .85rem;
	padding: .9rem 1rem;
	color: var(--pp-text);
	text-decoration: none;
	cursor: pointer;
	transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
a.pp-lesson__row:hover,
.pp-lesson__details summary.pp-lesson__row:hover {
	background: var(--pp-bg-alt);
	box-shadow: inset 3px 0 0 var(--pp-border);
	transform: translateX(2px);
}
.pp-lesson--active > .pp-lesson__row {
	background: var(--pp-primary-light);
	box-shadow: inset 4px 0 0 var(--pp-primary);
	font-weight: 700;
}
.pp-lesson--active > .pp-lesson__row:hover {
	transform: none;
}
.pp-lesson__icon {
	position: relative;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--pp-bg-alt);
	color: var(--pp-primary);
	transition: background .18s ease, color .18s ease, transform .18s ease;
}
/* "Video • PDF" content-type summary shown under each lesson title. */
.pp-lesson__badge {
	font-size: .75rem;
	font-weight: 500;
	color: var(--pp-text-muted);
}
.pp-lesson--active .pp-lesson__badge {
	color: var(--pp-primary-dark);
}
/* Completed indicator — purely client-side (localStorage "visited" set),
   no schema change. Can appear together with --active (two different,
   simultaneously-possible states). */
.pp-lesson--completed .pp-lesson__icon::after {
	content: "✓";
	position: absolute;
	bottom: -3px;
	right: -3px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: var(--pp-accent);
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	line-height: 15px;
	text-align: center;
	border: 2px solid var(--pp-bg);
}
.pp-lesson--active.pp-lesson--completed .pp-lesson__icon::after {
	background: var(--pp-primary-dark);
}
.pp-lesson__icon svg { width: 15px; height: 15px; }
.pp-lesson--active .pp-lesson__icon {
	background: var(--pp-primary);
	color: #fff;
}
a.pp-lesson__row:hover .pp-lesson__icon {
	transform: scale(1.06);
}
.pp-lesson__body {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	flex: 1 1 auto;
	min-width: 0;
}
.pp-lesson__title {
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.3;
}
.pp-lesson--active .pp-lesson__title {
	color: var(--pp-primary-dark);
}
/* "Now viewing" indicator — always in the DOM (so the AJAX lesson-switch
   handler never has to inject/remove it), hidden by default and revealed
   purely by the .pp-lesson--active class that JS toggles on the parent <li>. */
.pp-lesson__type {
	flex-shrink: 0;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--pp-primary);
	text-decoration: none;
	visibility: hidden;
}
.pp-lesson--active .pp-lesson__type { visibility: visible; }
.pp-lesson__details summary { list-style: none; }
.pp-lesson__details summary::-webkit-details-marker { display: none; }
.pp-lesson__details[open] summary.pp-lesson__row { background: var(--pp-bg-alt); }
.pp-lesson__content {
	padding: 1rem 1.25rem 1.25rem;
	border-top: 1px dashed var(--pp-border);
}
.pp-lesson__content iframe { max-width: 100%; }

/* Lesson header atop the main viewer — title + optional description of
   whichever lesson is currently active. */
.pp-room__lesson-header {
	margin-bottom: 1.25rem;
}
.pp-room__lesson-title {
	margin: 0 0 .4rem;
	font-size: 1.4rem;
	line-height: 1.3;
	color: var(--pp-text);
}
.pp-room__lesson-desc {
	margin: 0;
	font-size: .95rem;
	color: var(--pp-text-muted);
	line-height: 1.55;
}

/* Stacked multi-item viewer — every content item attached to a lesson
   (video, then PDF, then a Word doc, then a link, then notes, ...) renders
   via frontend/resource-item.php one after another with nothing in between
   (the AJAX lesson-switch response is built the same way), so the divider
   between items is drawn off adjacent .pp-resource siblings rather than a
   wrapper element — this keeps the initial page-load markup and the
   AJAX-swapped markup byte-for-byte structurally identical. */
.pp-room__lesson-items > .pp-resource + .pp-resource {
	margin-top: 1.75rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--pp-border);
}

/* A lesson with zero content items yet — never a blank area. */
.pp-room__lesson-items .pp-room__empty-resources {
	border: 1px dashed var(--pp-border);
	border-radius: var(--pp-radius);
	background: var(--pp-bg-alt);
}

.pp-resource {
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius-lg);
	padding: 1.25rem;
	background: var(--pp-bg);
}
.pp-resource__title {
	margin: 0 0 .4rem;
	font-size: 1.05rem;
}
.pp-resource__desc {
	margin: 0 0 .75rem;
	color: var(--pp-text-muted);
	font-size: .9rem;
}
.pp-player-wrap {
	/* Sensible default while a native upload's metadata loads, and the final
	   ratio for provider embeds (YouTube/Vimeo) whose true ratio can't be read
	   cross-origin. Native uploads get their REAL aspect ratio applied by JS
	   (ppMeasureVideos in frontend.js) through the classes/vars below, so a
	   portrait (Reels/Shorts/TikTok) or square clip is shown in full instead
	   of being cropped into this 16:9 box. */
	aspect-ratio: 16 / 9;
	width: 100%;
	margin-inline: auto;
	border: 0;
	border-radius: var(--pp-radius-xl);
	overflow: hidden;
	background: #000;
	box-shadow: var(--pp-shadow-hover);
	/* Brand the Plyr control accents red. */
	--plyr-color-main: var(--pp-primary);
}
/* Real ratio measured from the uploaded file. --pp-video-ar is the "w / h"
   ratio for aspect-ratio; --pp-video-ar-num is the same as a unitless w/h
   decimal, used to derive a capped width for tall videos. */
.pp-player-wrap.is-measured {
	aspect-ratio: var(--pp-video-ar);
}
/* Landscape videos stay full width. */
.pp-player-wrap.is-landscape {
	width: 100%;
}
/* Portrait / square videos are never cropped: cap the height so a tall clip
   doesn't dominate the page, and let the width shrink to match the real
   ratio — which centers the player with natural side spacing. On narrow
   screens it falls back to full width (max-width:100%) with height following
   the ratio, so it stays responsive on tablet/mobile. */
.pp-player-wrap.is-portrait,
.pp-player-wrap.is-square {
	width: min( 100%, calc( min( 78vh, 720px ) * var(--pp-video-ar-num, 1) ) );
	max-width: 100%;
}
/* Phones: every orientation (portrait included) expands to the full available
   width so nothing is cramped or unnecessarily narrow — the way TikTok /
   Reels / Shorts fill a phone screen. Height follows the real ratio via the
   measured aspect-ratio, so the video is still never cropped. */
@media ( max-width: 600px ) {
	.pp-player-wrap.is-portrait,
	.pp-player-wrap.is-square {
		width: 100%;
		max-width: 100%;
	}
}
.pp-player-wrap video.pp-player,
.pp-player-wrap iframe,
.pp-player-wrap .plyr,
.pp-player-wrap .plyr__video-wrapper {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
/* Never crop or zoom — always show the entire frame. object-fit: contain is
   a safety net even when the wrap already carries the exact measured ratio
   (e.g. for Plyr's reparented <video>). */
.pp-player-wrap video.pp-player,
.pp-player-wrap .plyr video,
.pp-player-wrap iframe {
	object-fit: contain;
	background: #000;
}
/* Premium download card — the honest, safe equivalent of "preview if
   possible" for Word/PowerPoint/Excel/ZIP: no same-origin preview channel
   exists for office documents, so the card itself is made to feel complete
   (distinct icon per kind, filename, size, type badge, prominent CTA)
   rather than a bare link. */
.pp-resource__file {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	padding: 1.25rem 1.4rem;
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius-lg);
	background: var(--pp-bg-alt);
	color: var(--pp-text);
	transition: box-shadow .2s ease, border-color .2s ease;
}
.pp-resource__file:hover {
	border-color: #d7dbe2;
	box-shadow: var(--pp-shadow-card);
}
.pp-resource__file-icon {
	font-size: 26px;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--pp-radius);
	color: #fff;
	background: var(--pp-type-file);
	flex-shrink: 0;
}
/* Color-coded per file kind, matching the reference mockup. */
.pp-resource__file--word .pp-resource__file-icon       { background: var(--pp-type-word); }
.pp-resource__file--powerpoint .pp-resource__file-icon { background: var(--pp-type-powerpoint); }
.pp-resource__file--excel .pp-resource__file-icon      { background: var(--pp-type-excel); }
.pp-resource__file--zip .pp-resource__file-icon        { background: var(--pp-type-zip); }
.pp-resource__file--file .pp-resource__file-icon       { background: var(--pp-type-file); }
.pp-resource__file--word .pp-resource__file-badge       { color: var(--pp-type-word); }
.pp-resource__file--powerpoint .pp-resource__file-badge { color: var(--pp-type-powerpoint); }
.pp-resource__file--excel .pp-resource__file-badge      { color: var(--pp-type-excel); }
.pp-resource__file--zip .pp-resource__file-badge        { color: var(--pp-type-zip); }
.pp-resource__file--file .pp-resource__file-badge       { color: var(--pp-type-file); }
.pp-resource__file-meta {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	flex: 1 1 auto;
	min-width: 0;
}
.pp-resource__file-badge {
	font-size: .7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--pp-primary);
}
.pp-resource__file-name {
	font-weight: 600;
	word-break: break-word;
}
.pp-resource__file-size {
	font-size: .8rem;
	color: var(--pp-text-muted);
}
.pp-resource__file-btn {
	flex-shrink: 0;
	gap: .4em;
}
.pp-resource__file-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}
@media (max-width: 480px) {
	.pp-resource__file {
		flex-wrap: wrap;
	}
	.pp-resource__file-btn {
		width: 100%;
	}
}
.pp-resource__embed iframe {
	width: 100%;
	border-radius: var(--pp-radius);
}

/* --------------------------------------------------------------------------
   Lesson Materials — compact SaaS-style cards below the primary viewer.
   -------------------------------------------------------------------------- */
.pp-room__materials {
	margin-top: 2rem;
}
.pp-room__materials-heading {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 .9rem;
	color: var(--pp-text);
}
.pp-material-list {
	display: flex;
	flex-direction: column;
	gap: .75rem;
}
.pp-material {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.1rem;
	padding: 1.1rem 1.25rem;
	background: var(--pp-bg);
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius-lg);
	box-shadow: var(--pp-shadow-card);
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.pp-material:hover {
	box-shadow: var(--pp-shadow-hover);
	transform: translateY(-2px);
	border-color: #d7dbe2;
}
.pp-material__icon {
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--pp-radius);
	color: #fff;
	font-size: 22px;
	background: var(--pp-type-file);
}
.pp-material--video .pp-material__icon { background: var(--pp-type-video); }
.pp-material--pdf   .pp-material__icon { background: var(--pp-type-pdf); }
.pp-material--link  .pp-material__icon { background: var(--pp-type-link); }
.pp-material--text  .pp-material__icon { background: var(--pp-type-text); }
.pp-material--file  .pp-material__icon { background: var(--pp-type-file); }
.pp-material__meta {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	flex: 1 1 auto;
	min-width: 0;
}
.pp-material__title {
	font-weight: 700;
	font-size: 1rem;
	color: var(--pp-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pp-material__sub {
	font-size: .84rem;
	color: var(--pp-text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pp-material__actions {
	display: flex;
	flex-shrink: 0;
	gap: .6rem;
}
.pp-material__action {
	flex-shrink: 0;
	gap: .35em;
}
.pp-material__action .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
}
.pp-material__missing {
	flex-shrink: 0;
	font-size: .8rem;
	font-weight: 600;
	color: var(--pp-text-muted);
	font-style: italic;
}
/* Lesson Notes ("text" resource type) — always-visible article card, not a
   collapsed row; notes are core lesson content, not an attachment. */
.pp-material-article {
	background: var(--pp-bg);
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius-lg);
	box-shadow: var(--pp-shadow-card);
	padding: 1.5rem 1.75rem 1.75rem;
}
.pp-material-article__head {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding-bottom: 1rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid var(--pp-border);
}
.pp-material-article__icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--pp-radius);
	color: #fff;
	font-size: 18px;
	background: var(--pp-type-text);
}
.pp-material-article__title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--pp-text);
}
.pp-material-article__body.pp-prose {
	max-width: none;
}
@media (max-width: 480px) {
	.pp-material { flex-wrap: wrap; }
	.pp-material__actions { width: 100%; }
	.pp-material__action { flex: 1 1 auto; justify-content: center; }
}

/* Rich-text lessons — read like a beautifully formatted article: readable
   measure, generous rhythm, clear heading/list/blockquote spacing. Shared by
   the "text" resource type and the webinar description. */
.pp-prose {
	max-width: 70ch;
	font-size: 1rem;
	line-height: 1.75;
	color: var(--pp-text);
}
.pp-prose p { margin: 0 0 1.1em; }
.pp-prose h1,
.pp-prose h2,
.pp-prose h3,
.pp-prose h4 {
	margin: 1.6em 0 .6em;
	line-height: 1.3;
	font-weight: 700;
	color: var(--pp-text);
}
.pp-prose h1:first-child,
.pp-prose h2:first-child,
.pp-prose h3:first-child,
.pp-prose h4:first-child { margin-top: 0; }
.pp-prose ul,
.pp-prose ol {
	margin: 0 0 1.1em;
	padding-left: 1.4em;
}
.pp-prose li { margin-bottom: .4em; }
.pp-prose blockquote {
	margin: 1.25em 0;
	padding: .25em 1.25em;
	border-left: 3px solid var(--pp-primary);
	color: var(--pp-text-muted);
	font-style: italic;
}
.pp-prose img {
	max-width: 100%;
	height: auto;
	border-radius: var(--pp-radius);
	cursor: zoom-in;
}
.pp-prose a { color: var(--pp-primary); }
.pp-prose code {
	background: var(--pp-bg-alt);
	padding: .15em .4em;
	border-radius: 4px;
	font-size: .9em;
}
.pp-prose pre {
	background: var(--pp-bg-alt);
	padding: 1em 1.2em;
	border-radius: var(--pp-radius);
	overflow-x: auto;
	margin: 0 0 1.1em;
}
.pp-prose pre code {
	background: none;
	padding: 0;
}
.pp-prose hr {
	border: 0;
	border-top: 1px solid var(--pp-border);
	margin: 2em 0;
}
.pp-prose table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.1em;
	font-size: .92rem;
}
.pp-prose table th,
.pp-prose table td {
	border: 1px solid var(--pp-border);
	padding: .55em .8em;
	text-align: left;
}
.pp-prose table th {
	background: var(--pp-bg-alt);
	font-weight: 700;
}
/* WordPress's classic-editor image alignment/caption markup (added when an
   admin aligns or captions an inserted image) — without this, aligned or
   captioned images render unstyled/full-width and captions look like plain
   trailing text. */
.pp-prose .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.pp-prose .alignright { float: right; margin: .3em 0 1em 1.5em; }
.pp-prose .aligncenter { display: block; margin: 1em auto; }
.pp-prose .wp-caption { max-width: 100%; }
.pp-prose .wp-caption img,
.pp-prose figure img { display: block; }
.pp-prose .wp-caption-text,
.pp-prose figcaption {
	font-size: .82rem;
	color: var(--pp-text-muted);
	text-align: center;
	margin-top: .5em;
}
.pp-prose::after { content: ''; display: table; clear: both; }
.pp-resource__text.pp-prose p {
	margin: 0 0 1em;
}

/* A lesson whose media can no longer be resolved — never a silent blank. */
.pp-resource__missing {
	padding: 2rem 1.25rem;
	text-align: center;
	background: var(--pp-bg-alt);
	border: 1px dashed var(--pp-border);
	border-radius: var(--pp-radius);
	color: var(--pp-text-muted);
	font-size: .9rem;
}

/* PDF lesson — rendered inline, never force-downloaded. */
.pp-pdf-viewer-wrap {
	position: relative;
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius);
	overflow: hidden;
	background: var(--pp-bg-alt);
}
.pp-pdf-viewer {
	width: 100%;
	height: 80vh;
	min-height: 420px;
	display: block;
	border: 0;
	background: var(--pp-bg-alt);
}
.pp-pdf-viewer__fallback {
	display: block;
	padding: .6rem .85rem;
	border-top: 1px solid var(--pp-border);
	font-size: .85rem;
	font-weight: 600;
	color: var(--pp-primary);
	text-decoration: none;
}
.pp-pdf-viewer__fallback:hover { text-decoration: underline; }

/* External URL lesson — iframe by default, always-visible new-tab fallback
   since cross-origin framing can't be reliably detected client-side. */
.pp-link-viewer-wrap {
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius);
	overflow: hidden;
}
.pp-link-viewer-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: .5rem .85rem;
	background: var(--pp-bg-alt);
	border-bottom: 1px solid var(--pp-border);
	font-size: .8rem;
}
.pp-link-viewer-host {
	color: var(--pp-text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pp-link-viewer-bar a {
	flex-shrink: 0;
	font-weight: 600;
	color: var(--pp-primary);
	text-decoration: none;
}
.pp-link-viewer-bar a:hover { text-decoration: underline; }
.pp-link-viewer {
	width: 100%;
	height: 75vh;
	min-height: 380px;
	border: 0;
	display: block;
	background: var(--pp-bg-alt);
}
/* Shown after ~3s if the iframe's load event hasn't fired — a common sign of
   X-Frame-Options/CSP blocking. The iframe itself is never hidden; this is
   an additive, inline prompt alongside the always-visible new-tab link. */
.pp-link-viewer-slow {
	padding: .65rem .85rem;
	border-top: 1px solid var(--pp-border);
	background: var(--pp-primary-light);
	color: var(--pp-primary-dark);
	font-size: .85rem;
	text-align: center;
}
.pp-link-viewer-slow a {
	font-weight: 700;
	color: var(--pp-primary-dark);
	text-decoration: underline;
	margin-left: .3em;
}

/* Description */
.pp-room__description.pp-prose {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--pp-text);
	background: var(--pp-bg);
	border-radius: var(--pp-radius-lg);
	padding: 1.5rem clamp(1.25rem, 3vw, 2rem);
	box-shadow: var(--pp-shadow-card);
	max-width: none;
}
.pp-room__description.pp-prose p { margin-bottom: 1em; }
.pp-room__description.pp-prose h2,
.pp-room__description.pp-prose h3 { margin: 1.5em 0 .5em; }

.pp-room__speaker-bio {
	font-size: .875rem;
	color: var(--pp-text-muted);
	line-height: 1.6;
	margin: 0;
}
.pp-room__resources-placeholder {
	font-size: .875rem;
	color: var(--pp-text-muted);
	font-style: italic;
	margin: 0;
}
.pp-room--not-found {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--pp-text-muted);
}

/* --------------------------------------------------------------------------
   Pass-key unlock form
   -------------------------------------------------------------------------- */
.pp-unlock {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 2rem 1rem;
	min-height: 300px;
	font-family: var(--pp-font);
}
.pp-unlock__card {
	background: var(--pp-bg);
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius-lg);
	padding: 2rem 2.25rem;
	width: 100%;
	max-width: 420px;
	box-shadow: var(--pp-shadow-card);
	text-align: center;
}
.pp-unlock__icon {
	display: flex;
	justify-content: center;
	margin-bottom: 1rem;
}
.pp-unlock__icon svg {
	width: 48px;
	height: 48px;
	color: var(--pp-text-muted);
}
.pp-unlock__title {
	margin: 0 0 .4rem;
	font-size: 1.3rem;
}
.pp-unlock__subtitle {
	color: var(--pp-text-muted);
	font-size: .9rem;
	margin: 0 0 1.25rem;
}
.pp-unlock__errors {
	background: var(--pp-primary-light);
	color: #8a0400;
	border-radius: var(--pp-radius);
	padding: .7rem 1rem;
	margin-bottom: 1rem;
	font-size: .875rem;
	text-align: left;
}
.pp-unlock__errors p { margin: 0; }
.pp-unlock__login-prompt {
	font-size: .95rem;
	color: var(--pp-text-muted);
	margin-bottom: 1rem;
}
.pp-unlock__login-btn { width: 100%; margin-bottom: 1rem; }
.pp-unlock__form { text-align: left; margin-bottom: 1rem; }
.pp-unlock__field { margin-bottom: 1rem; }
.pp-unlock__label {
	display: block;
	font-size: .875rem;
	font-weight: 600;
	margin-bottom: .4rem;
}
.pp-unlock__input-wrap {
	position: relative;
}
.pp-unlock__input {
	width: 100%;
	padding: .6em .9em;
	padding-right: 2.5em;
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius);
	font-size: .95rem;
	outline: none;
	transition: border-color .15s;
	box-sizing: border-box;
}
.pp-unlock__input:focus { border-color: var(--pp-primary); }
.pp-unlock__reveal {
	position: absolute;
	right: .6rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--pp-text-muted);
	padding: 0;
	display: flex;
	align-items: center;
}
.pp-unlock__reveal:hover { color: var(--pp-text); }
.pp-eye { width: 18px; height: 18px; }
.pp-unlock__submit { margin-top: .25rem; }
.pp-unlock__footer {
	margin-top: 1.25rem;
	border-top: 1px solid var(--pp-border);
	padding-top: 1rem;
}
.pp-unlock__back {
	font-size: .85rem;
	color: var(--pp-text-muted);
	text-decoration: none;
}
.pp-unlock__back:hover { color: var(--pp-primary); }

/* --------------------------------------------------------------------------
   Webinar access gate (register / login / pass key)
   -------------------------------------------------------------------------- */
.pp-gate__card { max-width: 440px; }
.pp-gate__eyebrow {
	text-transform: uppercase;
	letter-spacing: .06em;
	font-size: .72rem;
	font-weight: 700;
	color: var(--pp-primary);
	margin: 0 0 .35rem;
}
.pp-unlock__input--plain { padding-right: .9em; }

/* Radio-driven tab switch (no JS needed) */
.pp-gate__tab-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}
.pp-gate__tabs {
	display: flex;
	gap: .25rem;
	background: var(--pp-bg-alt);
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-radius);
	padding: .25rem;
	margin-bottom: 1.25rem;
}
.pp-gate__tab {
	flex: 1;
	text-align: center;
	padding: .5rem .75rem;
	font-size: .9rem;
	font-weight: 600;
	color: var(--pp-text-muted);
	border-radius: calc(var(--pp-radius) - 2px);
	cursor: pointer;
	transition: background-color .15s, color .15s;
	user-select: none;
}
.pp-gate__tab:hover { color: var(--pp-text); }
#pp-tab-register:checked ~ .pp-gate__tabs .pp-gate__tab--register,
#pp-tab-login:checked ~ .pp-gate__tabs .pp-gate__tab--login {
	background: var(--pp-bg);
	color: var(--pp-primary);
	box-shadow: var(--pp-shadow-card);
}
.pp-gate__tab-input:focus-visible ~ .pp-gate__tabs .pp-gate__tab {
	outline: 2px solid var(--pp-primary);
	outline-offset: 2px;
}
.pp-gate__panel { display: none; }
#pp-tab-register:checked ~ .pp-gate__panel--register { display: block; }
#pp-tab-login:checked ~ .pp-gate__panel--login { display: block; }

.pp-gate__row {
	display: flex;
	gap: .75rem;
}
.pp-gate__row .pp-unlock__field { flex: 1; }
.pp-gate__remember {
	display: flex;
	align-items: center;
	gap: .45rem;
	font-size: .85rem;
	color: var(--pp-text-muted);
	margin-bottom: 1rem;
	cursor: pointer;
}
.pp-gate__forgot {
	text-align: center;
	margin: .9rem 0 0;
	font-size: .85rem;
}
.pp-gate__forgot a { color: var(--pp-text-muted); text-decoration: none; }
.pp-gate__forgot a:hover { color: var(--pp-primary); }

/* --------------------------------------------------------------------------
   Small-screen polish
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
	.pp-room { padding: 1rem; border-radius: var(--pp-radius-lg); }
	.pp-room__header { padding: 1.25rem 1.1rem; }
	.pp-room__title { font-size: 1.35rem; }
	.pp-room__thumb { width: 40px; height: 40px; }
	.pp-room__hero-img { max-height: 220px; }
	.pp-room__content-grid { gap: 1.5rem; }
	.pp-lessons { padding: 1.1rem 1rem .9rem; }
	.pp-lesson__row { padding: .7rem .75rem; gap: .6rem; }
	.pp-lesson__icon { width: 30px; height: 30px; }
	.pp-room__lesson-title { font-size: 1.2rem; }
	.pp-room__progress-card,
	.pp-room__support-card { padding: 1.1rem 1.2rem; }
	.pp-library__search-form { gap: .5rem; }
	.pp-library__select { flex: 1 1 45%; min-width: 0; }
	.pp-library__search-wrap { flex: 1 1 100%; }
	.pp-library__segmented { flex: 1 1 100%; justify-content: center; }
	.pp-unlock__card { padding: 1.5rem 1.25rem; }
}
@media (max-width: 420px) {
	.pp-lesson__type { display: none; }
	.pp-lesson--active > .pp-lesson__row::after {
		content: "▶";
		color: var(--pp-primary);
		font-size: .7rem;
	}
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
.pp-btn:focus-visible,
.pp-cat-pill:focus-visible,
.pp-lesson__row:focus-visible,
.pp-card__title a:focus-visible,
.pp-library__clear-search:focus-visible,
.pp-library__segment:focus-visible,
.pp-room__back:focus-visible,
.pp-unlock__back:focus-visible,
.pp-lessons__toggle:focus-visible,
.pp-pdf-viewer__fallback:focus-visible,
.pp-link-viewer-bar a:focus-visible,
.pp-link-viewer-slow a:focus-visible,
.pp-material__action:focus-visible,
.pp-room__support-card a:focus-visible {
	outline: 2px solid var(--pp-primary);
	outline-offset: 2px;
	border-radius: var(--pp-radius);
}
@media (prefers-reduced-motion: reduce) {
	.pp-card,
	.pp-card__thumb-img,
	.pp-btn,
	.pp-lesson__row,
	.pp-lesson__icon,
	.pp-cat-pill,
	.pp-library__select,
	.pp-library__search-input,
	.pp-library__segment {
		transition: none !important;
	}
	.pp-card:hover { transform: none; }
	.pp-card:hover .pp-card__thumb-img { transform: none; }
	a.pp-lesson__row:hover .pp-lesson__icon { transform: none; }
}

/* Lightbox for images inside lesson notes/prose content (click to enlarge). */
.pp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3vh 3vw;
	background: rgba(0, 0, 0, .85);
	cursor: zoom-out;
}
.pp-lightbox img {
	max-width: 100%;
	max-height: 100%;
	border-radius: var(--pp-radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.pp-lightbox__close {
	position: absolute;
	top: 1.25rem;
	right: 1.5rem;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
}
.pp-lightbox__close:hover { background: rgba(255, 255, 255, .22); }
@media (prefers-reduced-motion: no-preference) {
	.pp-lightbox { animation: pp-lightbox-fade .15s ease; }
}
@keyframes pp-lightbox-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* Brand logo centered above the title on the webinar gate card. */
.pp-gate__card .pp-brand-logo {
	display: block;
	text-align: center;
	margin: 0 auto 1.1rem;
	line-height: 1;
}
.pp-gate__card .pp-brand-logo img {
	height: 52px;
	width: auto;
	display: inline-block;
}
.pp-gate__card .pp-brand-logo--text {
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--pp-text);
	text-decoration: none;
	letter-spacing: .02em;
}
