/*!
 * Rahav LMS — frontend design system (RTL-first, modern, responsive).
 * Palette and spacing are driven by CSS custom properties so a theme can
 * retint the whole UI by overriding --rahav-primary.
 */
:root {
	--rahav-primary: #EE6B65;
	--rahav-primary-dark: #E2564F;
	--rahav-primary-soft: rgba(238, 107, 101, .1);
	--rahav-ink: #111827;
	--rahav-muted: #6b7280;
	--rahav-line: #e5e7eb;
	--rahav-bg: #f9fafb;
	--rahav-surface: #ffffff;
	--rahav-success: #16a34a;
	--rahav-danger: #dc2626;
	--rahav-radius: 16px;
	--rahav-radius-sm: 10px;
	--rahav-shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 8px 24px rgba(17, 24, 39, .06);
	--rahav-space: 16px;
	--rahav-font: "Vazirmatn", "Segoe UI", Tahoma, "Iranian Sans", sans-serif;
}

.rahav-auth,
.rahav-dashboard,
.rahav-catalog,
.rahav-course {
	font-family: var(--rahav-font);
	color: var(--rahav-ink);
	line-height: 1.8;
}

.rahav-muted { color: var(--rahav-muted); }

/* Buttons */
.rahav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid transparent;
	border-radius: var(--rahav-radius-sm);
	padding: 10px 18px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease;
}
.rahav-btn:active { transform: translateY(1px); }
.rahav-btn--primary { background: var(--rahav-primary); color: #fff; }
.rahav-btn--primary:hover { background: var(--rahav-primary-dark); color: #fff; }
.rahav-btn--ghost { background: transparent; border-color: var(--rahav-line); color: var(--rahav-ink); }
.rahav-btn--ghost:hover { background: var(--rahav-bg); }

/* Alerts */
.rahav-alert { border-radius: var(--rahav-radius-sm); padding: 12px 14px; margin: 12px 0; font-size: .95rem; }
.rahav-alert--error { background: #fef2f2; color: var(--rahav-danger); border: 1px solid #fecaca; }
.rahav-alert--info { background: var(--rahav-primary-soft); color: var(--rahav-primary-dark); border: 1px solid #c7d2fe; }

/* Auth — styled after the «hy-llb-card» login card: a soft veil, a rounded
   white card with a close control, a small brand mark, a coral call to action
   and a segmented one-time-code field. */
.rahav-auth {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: clamp(24px, 6vw, 72px) 16px;
	background:
		radial-gradient(60% 90% at 12% 0%, rgba(238, 107, 101, .12), transparent 60%),
		radial-gradient(70% 90% at 100% 100%, rgba(79, 70, 229, .12), transparent 55%),
		#f2f4f7;
	border-radius: var(--rahav-radius);
	overflow: hidden;
	isolation: isolate;
}

/* The card itself: 440px wide, 22px corners, tall floaty shadow. */
.rahav-auth__card {
	position: relative;
	width: 100%;
	max-width: 440px;
	background: var(--rahav-surface);
	color: #1E1C26;
	border-radius: 22px;
	padding: 30px 28px 26px;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
	animation: rahav-llb-in .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes rahav-llb-in {
	from { opacity: 0; transform: translateY(14px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

.rahav-auth__close {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #F5F6F9;
	color: #6F7482;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
.rahav-auth__close:hover,
.rahav-auth__close:focus-visible { background: var(--rahav-primary); color: #fff; }
.rahav-auth__close svg { width: 18px; height: 18px; }

.rahav-auth__brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; text-align: center; }
.rahav-auth__mark {
	display: inline-grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: var(--rahav-primary-soft);
	color: var(--rahav-primary-dark);
}
.rahav-auth__mark svg { width: 26px; height: 26px; }
.rahav-auth__site { font-size: 13.5px; font-weight: 700; color: var(--rahav-muted); }

.rahav-auth__title { margin: 0 0 4px; font-size: 20px; font-weight: 800; line-height: 1.6; text-align: center; color: #1E1C26; }
.rahav-auth__sub { margin: 0 0 16px; font-size: 13.5px; line-height: 1.9; color: var(--rahav-muted); text-align: center; }
.rahav-auth__sent {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 12px;
	background: #F5F6F9;
	font-size: 13px;
	line-height: 1.9;
	text-align: center;
}
.rahav-auth__sent b { font-weight: 800; color: #1E1C26; direction: ltr; unicode-bidi: isolate; }
.rahav-auth__hint { margin-top: -4px; font-size: 12px; line-height: 1.8; color: var(--rahav-muted); text-align: center; }
.rahav-auth__meta { margin: 16px 0 0; font-size: 12.5px; color: var(--rahav-muted); text-align: center; }
.rahav-auth__meta a { color: var(--rahav-primary-dark); }
.rahav-auth__switch-wrap { margin-top: 10px; text-align: center; }
.rahav-auth__switch { font-size: 13px; font-weight: 700; color: var(--rahav-primary-dark); text-decoration: none; }
.rahav-auth__switch:hover { text-decoration: underline; }
.rahav-auth .rahav-alert { border-radius: 12px; }

/* Fields — 50px tall, 10px corners, coral focus ring. */
.rahav-form { display: grid; gap: 12px; }
.rahav-form--inline { margin-top: 10px; }
.rahav-field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: #4b5563; }
.rahav-field > span { padding-inline-start: 2px; }
.rahav-field input {
	height: 50px;
	border: 1px solid var(--rahav-line);
	border-radius: var(--rahav-radius-sm);
	padding: 0 14px;
	font: inherit;
	font-size: 15px;
	background: #fff;
	color: #1E1C26;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.rahav-field input::placeholder { color: #9aa0ac; }
.rahav-field input:focus { outline: none; border-color: var(--rahav-primary); box-shadow: 0 0 0 3px rgba(238, 107, 101, .16); }

/* Buttons fill the card row at the reference heights. */
.rahav-auth .rahav-btn--primary { width: 100%; height: 48px; border-radius: 12px; background: var(--rahav-primary); font-size: 15px; font-weight: 700; }
.rahav-auth .rahav-btn--primary:hover { background: var(--rahav-primary-dark); }
.rahav-auth .rahav-btn--ghost { width: 100%; height: 42px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--rahav-muted); border-color: var(--rahav-line); }
.rahav-auth .rahav-btn--ghost:hover { background: var(--rahav-bg); color: var(--rahav-ink); }

/* One-time code: a row of boxes, first digit on the left (codes read LTR). */
.rahav-otp { display: grid; gap: 10px; }
.rahav-otp__boxes { display: flex; flex-direction: row; justify-content: center; gap: 8px; direction: ltr; }
.rahav-otp__fallback[hidden],
.rahav-otp__boxes[hidden] { display: none; }
.rahav-otp__box {
	width: 52px;
	height: 56px;
	flex: 0 0 52px;
	padding: 0;
	border: 1px solid #dcdcde;
	border-radius: 12px;
	background: #F5F6F9;
	text-align: center;
	font: inherit;
	font-size: 22px;
	font-weight: 700;
	line-height: 56px;
	color: #1E1C26;
	transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.rahav-otp__box:focus { outline: none; border-color: var(--rahav-primary); background: #fff; box-shadow: 0 0 0 3px rgba(238, 107, 101, .16); }
.rahav-otp__box.is-filled { border-color: #cdd0d8; background: #fff; }

@media (max-width: 380px) {
	.rahav-otp__box { width: 44px; flex-basis: 44px; height: 50px; line-height: 50px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.rahav-auth__card { animation: none; }
}

/* Full-canvas login page (login-page.php): the card alone, no theme chrome. */
body.rahav-login-body { margin: 0; min-height: 100vh; min-height: 100dvh; background: #f2f4f7; font-family: var(--rahav-font); }
body.rahav-login-body .rahav-auth { min-height: 100vh; min-height: 100dvh; border-radius: 0; }

/* Grid & cards */
.rahav-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.rahav-card { background: var(--rahav-surface); border: 1px solid var(--rahav-line); border-radius: var(--rahav-radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--rahav-shadow); transition: transform .12s ease; }
.rahav-card:hover { transform: translateY(-2px); }
.rahav-card__thumb { display: block; aspect-ratio: 16 / 9; background: var(--rahav-primary-soft); }
.rahav-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rahav-card__placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--rahav-primary-soft), #eef2ff); }
.rahav-card__body { padding: 16px; display: grid; gap: 10px; }
.rahav-card__title { margin: 0; font-size: 1.05rem; }
.rahav-card__title a { color: inherit; text-decoration: none; }
.rahav-card__excerpt { margin: 0; color: var(--rahav-muted); font-size: .9rem; }
.rahav-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rahav-chip { background: var(--rahav-bg); border: 1px solid var(--rahav-line); border-radius: 999px; padding: 3px 10px; font-size: .78rem; color: var(--rahav-muted); }
.rahav-price { margin-inline-start: auto; font-weight: 700; color: var(--rahav-primary-dark); }

/* Dashboard */
.rahav-dashboard__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.rahav-empty { text-align: center; padding: 48px 16px; background: var(--rahav-bg); border-radius: var(--rahav-radius); }
.rahav-progress { background: var(--rahav-line); border-radius: 999px; height: 8px; overflow: hidden; }
.rahav-progress__bar { height: 100%; background: var(--rahav-primary); border-radius: 999px; }

/* Course page */
.rahav-course__hero { background: linear-gradient(135deg, #111827, #312e81); color: #fff; border-radius: var(--rahav-radius); padding: 36px 28px; margin-bottom: 24px; }
.rahav-course__title { margin: 0 0 10px; font-size: 1.8rem; }
.rahav-course__desc { margin: 0 0 14px; opacity: .9; max-width: 720px; }
.rahav-course__meta { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0 0 18px; opacity: .9; flex-wrap: wrap; }
.rahav-course__layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.rahav-player { background: #000; border-radius: var(--rahav-radius); overflow: hidden; box-shadow: var(--rahav-shadow); }
.rahav-player__stage { position: relative; }
.rahav-video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.rahav-player__stage:fullscreen, .rahav-player__stage:-webkit-full-screen { background: #000; }
.rahav-player__stage:fullscreen .rahav-video, .rahav-player__stage:-webkit-full-screen .rahav-video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
.rahav-fs-btn { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 4; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: rgba(15, 23, 42, .55); color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background-color .2s ease; }
.rahav-fs-btn[hidden] { display: none; }
.rahav-fs-btn:hover { background: rgba(15, 23, 42, .78); }
.rahav-fs-btn:focus-visible { outline: 2px solid var(--rahav-primary, #EE6B65); outline-offset: 2px; }
.rahav-fs-btn svg { width: 21px; height: 21px; }
.rahav-fs-btn__close { display: none; }
.rahav-fs-btn.is-on .rahav-fs-btn__open { display: none; }
.rahav-fs-btn.is-on .rahav-fs-btn__close { display: inline-flex; }
.rahav-cw-player.is-audio .rahav-fs-btn, .rahav-player__stage.is-audio .rahav-fs-btn, .rahav-cw-player.is-release-locked .rahav-fs-btn, .rahav-player__stage.is-release-locked .rahav-fs-btn, .rahav-player.is-release-locked .rahav-fs-btn { display: none; }
.rahav-fs-ready .rahav-video::-webkit-media-controls-fullscreen-button { display: none !important; }
.rahav-wm-faux-fs { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; max-width: none !important; border-radius: 0 !important; z-index: 2147483000 !important; background: #000 !important; }
.rahav-wm-faux-fs .rahav-video { width: 100% !important; height: 100% !important; aspect-ratio: auto !important; object-fit: contain !important; }
html.rahav-wm-faux-fs-lock, html.rahav-wm-faux-fs-lock body { overflow: hidden !important; }
.rahav-wm-faux-exit { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 5; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.rahav-wm-faux-exit:hover { background: rgba(0, 0, 0, .75); }
.rahav-cw-prep { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .95rem; text-align: center; pointer-events: none; }
.rahav-cw-prep[hidden] { display: none; }
.rahav-player__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #0b0f19; color: #fff; padding: 12px 16px; }
.rahav-player__lesson-title { margin: 0; font-size: 1rem; }
.rahav-player__actions { display: flex; align-items: center; gap: 10px; }
.rahav-player__percent { font-size: .85rem; opacity: .8; }
.rahav-lesson-content { margin-top: 20px; }
.rahav-lesson-content .rahav-ts { color: var(--rahav-primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.rahav-lesson-content .rahav-ts:hover { background: var(--rahav-primary-soft); color: var(--rahav-primary-dark); }
.rahav-lesson-content .rahav-ts:focus-visible { border-radius: 4px; outline: 2px solid var(--rahav-primary); outline-offset: 2px; }
.rahav-lesson-content table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.rahav-lesson-content th, .rahav-lesson-content td { border: 1px solid var(--rahav-line); padding: 8px 10px; text-align: right; vertical-align: top; }
.rahav-lesson-content thead th { background: var(--rahav-bg); font-weight: 700; }
.rahav-course__aside { background: var(--rahav-surface); border: 1px solid var(--rahav-line); border-radius: var(--rahav-radius); padding: 16px; position: sticky; top: 16px; }
.rahav-aside__title { margin: 0 0 12px; }
.rahav-section-block { border-top: 1px solid var(--rahav-line); padding: 12px 0; }
.rahav-section-block__title { margin: 0 0 8px; font-size: .95rem; }
.rahav-lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rahav-lesson-item__link { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: var(--rahav-radius-sm); text-decoration: none; color: var(--rahav-ink); font-size: .9rem; }
.rahav-lesson-item__link:hover { background: var(--rahav-bg); }
.rahav-lesson-item.is-active .rahav-lesson-item__link { background: var(--rahav-primary-soft); color: var(--rahav-primary-dark); font-weight: 600; }
.rahav-lesson-item.is-done .rahav-lesson-item__title::after { content: " ✓"; color: var(--rahav-success); }
.rahav-lesson-item__link.is-locked { opacity: .6; cursor: not-allowed; }
.rahav-badge { background: var(--rahav-primary-soft); color: var(--rahav-primary-dark); border-radius: 999px; padding: 2px 8px; font-size: .72rem; }
.rahav-badge--ok { background: #dcfce7; color: var(--rahav-success); }

/* Responsive */
@media (max-width: 900px) {
	.rahav-course__layout { grid-template-columns: 1fr; }
	.rahav-course__aside { position: static; }
}
@media (max-width: 480px) {
	.rahav-course__hero { padding: 24px 18px; }
	.rahav-auth { padding: 24px 12px; }
	.rahav-player__bar { flex-direction: column; align-items: flex-start; }
}

/* Rahav LMS - audio lesson player: compact bar instead of a 16:9 box */
.rahav-video.rahav-media--audio { aspect-ratio: auto; height: 74px; background: #0b0f19; border-radius: 12px; }
.rahav-cw .rahav-video.rahav-media--audio { aspect-ratio: auto; height: 74px; }

/* Rahav LMS - scheduled lesson release (0.1.36): countdown card + rail chips. */
.rahav-release {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 10px; text-align: center; padding: clamp(20px, 4vw, 36px);
	background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 100%);
	color: #fff; border-radius: 16px; min-height: 230px;
}
.rahav-release__icon { color: rgba(255, 255, 255, .92); }
.rahav-release__icon svg { width: 34px; height: 34px; }
.rahav-release__title { margin: 0; font-size: clamp(17px, 2.4vw, 22px); font-weight: 800; }
.rahav-release__note { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .78); }
.rahav-release__timer { display: flex; gap: 8px; direction: ltr; flex-wrap: wrap; justify-content: center; }
.rahav-release__unit {
	display: flex; flex-direction: column; align-items: center; min-width: 58px;
	padding: 8px 6px; border-radius: 12px; background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .14);
}
.rahav-release__unit b { font-size: clamp(18px, 2.6vw, 26px); line-height: 1.4; font-variant-numeric: tabular-nums; }
.rahav-release__unit i { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .7); }
.rahav-release__notify { margin-top: 4px; }
.rahav-release__hint { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.rahav-release__hint a { color: #c7d2fe; }
.rahav-release__msg { margin: 0; font-size: 12.5px; color: #bbf7d0; }
.rahav-release__msg.is-error { color: #fecaca; }
.rahav-release__time { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, .82); direction: rtl; }
.rahav-release__time time { font-variant-numeric: tabular-nums; }
.rahav-release__badge {
	display: inline-flex; align-items: center; margin-inline-start: 6px; padding: 1px 8px;
	border-radius: 999px; font-size: 11px; color: #bfdbfe;
	background: rgba(96, 165, 250, .18); border: 1px solid rgba(147, 197, 253, .35);
}
.rahav-release__refresh { margin-top: 2px; }
.rahav-release__refresh.is-busy { opacity: .6; pointer-events: none; }
.rahav-release .rahav-btn--ghost { color: #e2e8f0; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .06); }
.rahav-release .rahav-btn--ghost:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.rahav-release__summary { margin: 0; }
.rahav-release.is-soon .rahav-release__icon { opacity: .9; }
.rahav-release.is-estimate { background: linear-gradient(160deg, #111c3d 0%, #1e3a8a 100%); }
.rahav-release.is-due { background: linear-gradient(160deg, #2a1c09 0%, #4a2c06 100%); }
.rahav-release.is-due .rahav-release__icon { color: #fcd34d; }
.rahav-release.is-held { background: linear-gradient(160deg, #1f2937 0%, #374151 100%); }
.rahav-release.is-held .rahav-release__icon { color: #fca5a5; }
.rahav-release.is-estimate .rahav-release__timer { border-radius: 12px; }
.rahav-release.is-due .rahav-release__timer { display: none; }

/* While a lesson is locked, its media and progress actions stay hidden. */
/* Release card: drop the empty video frame entirely (no black box). */
.rahav-cw-player.is-release-locked .rahav-video,
.rahav-player.is-release-locked .rahav-video { display: none; }
.rahav-cw-player.is-release-locked,
.rahav-cw.is-release-locked .rahav-cw-player,
.rahav-player.is-release-locked { background: transparent; box-shadow: none; }
.rahav-player.is-release-locked .rahav-player__actions,
.rahav-cw.is-release-locked .rahav-cw-title-actions { display: none; }

/* Rail: countdown chip on locked lessons, play icon on freshly released ones. */
.rahav-cw-locktime-chip {
	display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px;
	background: rgba(148, 163, 184, .18); color: inherit; font-size: 11.5px;
	font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rahav-cw-locktime-chip.is-estimate { background: rgba(96, 165, 250, .16); }
.rahav-cw-locktime-chip.is-due,
.rahav-cw-badge.is-due,
.rahav-badge.is-due { background: rgba(245, 158, 11, .18); color: #92400e; }
.rahav-cw-badge.is-held,
.rahav-badge.is-held,
.rahav-lesson-item__link.is-held .rahav-badge { background: rgba(239, 68, 68, .14); color: #991b1b; }
.rahav-cw-badge.is-unknown,
.rahav-badge.is-unknown { background: rgba(148, 163, 184, .18); }
.rahav-cw-topic.is-released .rahav-cw-play { color: var(--rahav-primary, #EE6B65); }



/* Waiting screen: progress text + bar (mirrors panel.css so the public
   single-course page styles it too). */
.rahav-cw-prep {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
}
.rahav-cw-prep__text { max-width: 38ch; line-height: 1.9; }
.rahav-cw-prep__bar { width: min(260px, 60%); height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.rahav-cw-prep__bar[hidden] { display: none; }
.rahav-cw-prep__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: #fff; transition: width .6s ease; }

/* Adaptive quality selector (0.2.0) */
.rahav-qsel { position: relative; display: inline-flex; }
.rahav-qsel__btn { padding: 6px 12px; font-size: .82rem; }
.rahav-qsel__menu {
	position: absolute;
	top: calc(100% + 6px);
	inset-inline-start: 0;
	z-index: 30;
	min-width: 200px;
	padding: 6px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--rahav-line, #e5e7eb);
	box-shadow: 0 10px 30px rgba(17, 24, 39, .14);
	display: grid;
	gap: 2px;
}
.rahav-qsel__menu[hidden] { display: none; }
.rahav-qsel__item {
	appearance: none;
	border: 0;
	background: transparent;
	text-align: start;
	padding: 8px 10px;
	border-radius: 8px;
	font: inherit;
	font-size: .85rem;
	color: var(--rahav-ink, #111827);
	cursor: pointer;
}
.rahav-qsel__item:hover,
.rahav-qsel__item:focus-visible { background: var(--rahav-bg, #f9fafb); outline: none; }
.rahav-qsel__item[aria-checked="true"] { background: var(--rahav-primary-soft, rgba(238, 107, 101, .1)); color: var(--rahav-primary-dark, #E2564F); font-weight: 700; }
.rahav-qsel__item[aria-checked="true"]::before { content: "✓ "; }

.rahav-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.rahav-qtoast {
	position: absolute;
	inset-inline-end: 12px;
	bottom: 12px;
	z-index: 25;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(17, 24, 39, .88);
	color: #fff;
	font-size: .8rem;
	opacity: 0;
	transform: translateY(6px);
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
}
.rahav-qtoast.is-on { opacity: 1; transform: none; }

/* Private lesson notes (0.2.0) */
.rahav-notes {
	margin-top: 18px;
	padding: 16px;
	border: 1px solid var(--rahav-line, #e5e7eb);
	border-radius: var(--rahav-radius, 16px);
	background: var(--rahav-surface, #fff);
}
.rahav-notes.is-hidden { display: none; }
.rahav-notes__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rahav-notes__ico { display: inline-flex; color: var(--rahav-primary, #EE6B65); }
.rahav-notes__ico svg { width: 18px; height: 18px; }
.rahav-notes__title { margin: 0; font-size: 1rem; }
.rahav-notes__status { margin-inline-start: auto; font-size: .78rem; color: var(--rahav-muted, #6b7280); }
.rahav-notes__guest { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; }
.rahav-notes__draft { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; font-size: .82rem; }
.rahav-notes__draft[hidden] { display: none; }
.rahav-notes__draft-text { color: #9a3412; }
.rahav-notes__field {
	width: 100%;
	box-sizing: border-box;
	margin-top: 10px;
	min-height: 120px;
	resize: vertical;
	padding: 12px 14px;
	border: 1px solid var(--rahav-line, #e5e7eb);
	border-radius: 12px;
	font: inherit;
	font-size: .95rem;
	line-height: 1.9;
	background: #fff;
	color: var(--rahav-ink, #111827);
}
.rahav-notes__field:focus { outline: none; border-color: var(--rahav-primary, #EE6B65); box-shadow: 0 0 0 3px rgba(238, 107, 101, .16); }
.rahav-notes__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rahav-notes__count { font-size: .78rem; color: var(--rahav-muted, #6b7280); font-variant-numeric: tabular-nums; }
.rahav-notes__spacer { flex: 1 1 auto; }
.rahav-notes__bar .rahav-btn { padding: 7px 14px; font-size: .82rem; }
.rahav-btn--danger { color: #b91c1c; border-color: #fecaca; }
.rahav-btn--danger:hover { background: #fef2f2; color: #b91c1c; }

.rahav-cw-notemark { display: inline-flex; color: var(--rahav-primary, #EE6B65); }
.rahav-cw-notemark svg { width: 14px; height: 14px; }

@media (max-width: 620px) {
	.rahav-notes__bar { justify-content: stretch; }
	.rahav-notes__spacer { display: none; }
	.rahav-notes__bar .rahav-btn { flex: 1 1 45%; }
}
/* Audio mode: compact bar for audio-only lessons (0.2.4). */
.rahav-cw-player.is-audio,
.rahav-player__stage.is-audio {
	background: #0b0f19;
	padding-bottom: 10px;
}

/* Audio track: the lesson's dedicated audio edition plays in its own bar
   below the video box (0.2.4). */
.rahav-audio-track {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 12px;
	padding: 10px 14px;
	border: 1px solid var(--rp-line, rgba(15, 23, 42, .1));
	border-radius: 14px;
	background: var(--rp-card, #fff);
}
.rahav-audio-track[hidden] { display: none; }
.rahav-audio-track__label {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--rp-ink, #1f2937);
	opacity: .8;
}
.rahav-audio-track audio {
	display: block;
	width: 100%;
	height: 44px;
}
.rahav-cw > .rahav-audio-track { margin-top: 0; }

/* Media card: the dedicated audio edition and the lesson step navigation
   share one card under the video box. */
.rahav-media-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid var(--rp-line, rgba(15, 23, 42, .1));
	border-radius: 14px;
	background: var(--rp-card, #fff);
}
.rahav-media-card .rahav-audio-track {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

/* Skip ±N seconds (0.2.44): round overlay buttons on the player stage.
   The native control bar has no rewind/forward buttons on touch devices,
   so these are the only way to jump back or ahead five seconds. */
.rahav-seek {
	position: absolute;
	top: 50%;
	inset-inline-start: 14px;
	inset-inline-end: 14px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transform: translateY(-50%);
	pointer-events: none;
}
.rahav-seek__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 50%;
	background: rgba(15, 23, 42, .55);
	color: #fff;
	cursor: pointer;
	pointer-events: auto;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
}
.rahav-seek__btn:hover { background: var(--rahav-primary, #EE6B65); border-color: transparent; }
.rahav-seek__btn:active { transform: scale(.94); }
.rahav-seek__btn:focus-visible { outline: 2px solid var(--rahav-primary, #EE6B65); outline-offset: 2px; }
.rahav-seek__ico { display: inline-flex; }
.rahav-seek__ico svg { width: 26px; height: 26px; }
.rahav-seek__btn--fwd .rahav-seek__ico { transform: scaleX(-1); }
.rahav-seek__num {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1;
	pointer-events: none;
}
/* Audio-only stage (and the dedicated audio bar): the native bar spans the
   full width, so centre the buttons in their own row underneath instead of
   covering the play/volume controls. */
.rahav-cw-player.is-audio .rahav-seek,
.rahav-player__stage.is-audio .rahav-seek,
.rahav-audio-track .rahav-seek {
	position: static;
	justify-content: center;
	gap: 14px;
	margin-top: 8px;
	transform: none;
	pointer-events: auto;
}
.rahav-cw-player.is-audio .rahav-seek__btn,
.rahav-player__stage.is-audio .rahav-seek__btn,
.rahav-audio-track .rahav-seek__btn { width: 38px; height: 38px; }
.rahav-cw-player.is-audio .rahav-seek__ico svg,
.rahav-player__stage.is-audio .rahav-seek__ico svg,
.rahav-audio-track .rahav-seek__ico svg { width: 22px; height: 22px; }
/* The smaller audio buttons shrink their icon but keep the same font size, so
   pull the numeral in a notch to keep clear of the (now thinner) ring. */
.rahav-cw-player.is-audio .rahav-seek__num,
.rahav-player__stage.is-audio .rahav-seek__num,
.rahav-audio-track .rahav-seek__num { font-size: 11px; }
/* Never draw the overlay while the lesson is release-locked (no video yet). */
.rahav-player.is-release-locked .rahav-seek,
.rahav-cw-player.is-release-locked .rahav-seek,
.rahav-player__stage.is-release-locked .rahav-seek { display: none; }
@media (max-width: 480px) {
	.rahav-seek { inset-inline-start: 8px; inset-inline-end: 8px; }
	.rahav-seek__btn { width: 40px; height: 40px; }
	.rahav-seek__ico svg { width: 23px; height: 23px; }
}

/* ===== BEGIN RAHAV-CORAL-ACCENT — added 2026-10-26 (visual only, no layout) ===== */
/* ==========================================================================
   Rahav — coral accent layer (visual only, no layout changes)
   Palette: #EE6B65 / #E2564F / tinted coral (no new hues)
   Scope: LMS auth pages, catalog, course view and student panel.
   ========================================================================== */

:root {
  --rahav-primary-soft: rgba(238, 107, 101, .10);
  --rahav-primary-tint: rgba(238, 107, 101, .18);
  --rahav-primary-glow: rgba(226, 86, 79, .38);
}

@keyframes rahav-coral-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(5%, -5%, 0) scale(1.14); }
}
@keyframes rahav-coral-pulse {
  0%   { transform: scale(.94); opacity: .75; }
  70%  { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}
@keyframes rahav-coral-pop {
  0%   { transform: scale(.9); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes rahav-coral-flow {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}
@keyframes rahav-hero-breathe {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 60%; }
}

/* --------------------------------------------------------------------------
   Auth / public entry cards (login, support, contest entry)
   -------------------------------------------------------------------------- */

body.rahav-login-body {
  background:
    radial-gradient(70% 60% at 50% 0%, #fff6f4 0%, #f4f2f3 55%, #eef0f3 100%);
}

.rahav-auth {
  background:
    radial-gradient(60% 90% at 12% 0%, rgba(238, 107, 101, .20), transparent 62%),
    radial-gradient(70% 90% at 100% 100%, rgba(238, 107, 101, .14), transparent 58%),
    radial-gradient(45% 60% at 50% 45%, rgba(238, 107, 101, .05), transparent 72%),
    #f2f2f4;
}

.rahav-auth::before,
.rahav-auth::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: min(46vmax, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
  opacity: .55;
}
.rahav-auth::before {
  top: -20%;
  inset-inline-start: -12%;
  background: radial-gradient(circle, rgba(238, 107, 101, .4), transparent 66%);
  animation: rahav-coral-drift 18s ease-in-out infinite alternate;
}
.rahav-auth::after {
  bottom: -24%;
  inset-inline-end: -10%;
  background: radial-gradient(circle, rgba(226, 86, 79, .26), transparent 68%);
  animation: rahav-coral-drift 24s ease-in-out infinite alternate-reverse;
}

.rahav-auth__card {
  z-index: 1;
  box-shadow:
    0 30px 80px -22px rgba(28, 20, 22, .42),
    0 0 0 1px rgba(238, 107, 101, .08);
  transition: box-shadow .35s ease, transform .35s ease;
}
.rahav-auth__card::before {
  content: "";
  position: absolute;
  inset-inline: 22px;
  top: 0;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--rahav-primary) 30%, var(--rahav-primary-dark) 70%, transparent);
  opacity: .85;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .rahav-auth__card:hover {
    transform: translateY(-3px);
    box-shadow:
      0 42px 92px -24px rgba(28, 20, 22, .46),
      0 0 0 1px rgba(238, 107, 101, .18),
      0 24px 60px -34px rgba(226, 86, 79, .55);
  }
}

.rahav-auth__mark {
  position: relative;
  background: linear-gradient(140deg, #f1918b 0%, var(--rahav-primary) 45%, var(--rahav-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(226, 86, 79, .9);
  transition: transform .35s ease, box-shadow .35s ease;
}
.rahav-auth__mark::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 18px;
  border: 1px solid rgba(238, 107, 101, .38);
  animation: rahav-coral-pulse 3.4s ease-out infinite;
  pointer-events: none;
}
.rahav-auth__mark:hover {
  transform: translateY(-2px) rotate(-3deg);
  box-shadow: 0 18px 34px -14px rgba(226, 86, 79, .95);
}

.rahav-auth__site {
  color: var(--rahav-primary-dark);
  letter-spacing: .02em;
}

.rahav-auth__meta a,
.rahav-auth__switch {
  color: var(--rahav-primary-dark);
  background-image: linear-gradient(var(--rahav-primary), var(--rahav-primary));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 100% 100%;
  transition: background-size .3s ease, color .2s ease;
}
.rahav-auth__meta a:hover,
.rahav-auth__switch:hover {
  color: var(--rahav-primary-dark);
  background-size: 100% 2px;
  text-decoration: none;
}

.rahav-auth__close {
  transition: background-color .25s ease, color .25s ease, transform .3s ease;
}
.rahav-auth__close:hover,
.rahav-auth__close:focus-visible {
  transform: rotate(90deg) scale(1.04);
  box-shadow: 0 10px 20px -12px rgba(226, 86, 79, .9);
}

.rahav-field input {
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.rahav-field input:hover {
  border-color: rgba(238, 107, 101, .45);
}
.rahav-field input:focus {
  background: #fffafa;
}

.rahav-auth .rahav-btn--primary {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, #f1918b 0%, var(--rahav-primary) 48%, var(--rahav-primary-dark) 100%);
  box-shadow: 0 14px 30px -16px rgba(226, 86, 79, .95);
  transition: background-color .3s ease, box-shadow .3s ease, transform .2s ease;
}
.rahav-auth .rahav-btn--primary::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 38%;
  inset-inline-start: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-18deg);
  transition: inset-inline-start .55s ease;
  pointer-events: none;
}
.rahav-auth .rahav-btn--primary:hover {
  background-image: linear-gradient(135deg, #f49b95 0%, var(--rahav-primary) 40%, var(--rahav-primary-dark) 100%);
  box-shadow: 0 20px 38px -16px rgba(226, 86, 79, 1);
  transform: translateY(-2px);
}
.rahav-auth .rahav-btn--primary:hover::after {
  inset-inline-start: 130%;
}
.rahav-auth .rahav-btn--primary:active {
  transform: translateY(0) scale(.985);
  box-shadow: 0 10px 22px -14px rgba(226, 86, 79, .9);
}

.rahav-otp__box {
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.rahav-otp__box:hover {
  border-color: rgba(238, 107, 101, .45);
}
.rahav-otp__box.is-filled {
  border-color: rgba(238, 107, 101, .55);
  background: #fff7f6;
  color: var(--rahav-primary-dark);
  box-shadow: 0 8px 16px -12px rgba(226, 86, 79, .9);
  animation: rahav-coral-pop .22s ease;
}
.rahav-otp__box:focus {
  transform: translateY(-2px) scale(1.03);
}

.rahav-auth__card .rahav-alert--info {
  background: rgba(238, 107, 101, .08);
  color: var(--rahav-primary-dark);
}

/* --------------------------------------------------------------------------
   Buttons, cards, catalog and course (non-panel pages)
   -------------------------------------------------------------------------- */

.rahav-btn--primary {
  background-image: linear-gradient(135deg, #f1918b 0%, var(--rahav-primary) 50%, var(--rahav-primary-dark) 100%);
  box-shadow: 0 10px 24px -16px rgba(226, 86, 79, .9);
}
.rahav-btn--primary:hover {
  background-image: linear-gradient(135deg, #f49b95 0%, var(--rahav-primary) 42%, var(--rahav-primary-dark) 100%);
  box-shadow: 0 16px 30px -16px rgba(226, 86, 79, 1);
}

.rahav-card,
.rahav-contest-card {
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .rahav-card:hover {
    transform: translateY(-4px);
    border-color: rgba(238, 107, 101, .42);
    box-shadow: 0 26px 46px -30px rgba(226, 86, 79, .6);
  }
  .rahav-card:hover .rahav-card__title a {
    color: var(--rahav-primary-dark);
  }
  .rahav-card:hover .rahav-card__thumb img {
    transform: scale(1.05);
  }
}
.rahav-card__thumb {
  overflow: hidden;
}
.rahav-card__thumb img {
  transition: transform .65s cubic-bezier(.2, .8, .2, 1);
}
.rahav-card__title a {
  transition: color .2s ease;
}

.rahav-chip {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.rahav-chip:hover {
  background: var(--rahav-primary-soft);
  border-color: rgba(238, 107, 101, .35);
  color: var(--rahav-primary-dark);
}

.rahav-progress__bar {
  background: linear-gradient(90deg, var(--rahav-primary), var(--rahav-primary-dark));
  background-size: 200% 100%;
  animation: rahav-coral-flow 4.5s linear infinite;
}

.rahav-course__hero {
  background:
    radial-gradient(60% 100% at 15% 0%, rgba(238, 107, 101, .38), transparent 62%),
    radial-gradient(55% 85% at 100% 100%, rgba(226, 86, 79, .34), transparent 62%),
    linear-gradient(135deg, #2b1416 0%, #4a1e1d 55%, #6d2a25 100%);
  background-size: 150% 150%;
  animation: rahav-hero-breathe 18s ease-in-out infinite alternate;
}
.rahav-course__hero .rahav-btn--primary {
  box-shadow: 0 12px 28px -14px rgba(238, 107, 101, .9);
}

.rahav-lesson-item__link {
  transition: background-color .2s ease, color .2s ease;
}
.rahav-lesson-item__link:hover {
  background: var(--rahav-primary-soft);
  color: var(--rahav-primary-dark);
}
.rahav-lesson-item.is-active .rahav-lesson-item__link {
  background: var(--rahav-primary-soft);
  box-shadow: inset -2px 0 0 var(--rahav-primary-dark);
}
.rahav-player__percent {
  color: var(--rahav-primary);
  opacity: 1;
}
.rahav-pagination a,
.rahav-pagination .page-numbers {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.rahav-pagination a:hover,
.rahav-pagination .page-numbers:hover {
  background: var(--rahav-primary-soft);
  color: var(--rahav-primary-dark);
}

.rahav-card:active {
  border-color: rgba(238, 107, 101, .6);
  box-shadow: 0 0 0 2px rgba(238, 107, 101, .28), 0 18px 34px -26px rgba(226, 86, 79, .75);
}
.rahav-card__title a:active {
  color: var(--rahav-primary-dark);
}
.rahav-btn--primary:active {
  background-image: linear-gradient(135deg, var(--rahav-primary), var(--rahav-primary-dark));
  box-shadow: 0 6px 16px -12px rgba(226, 86, 79, .95);
}

@media (prefers-reduced-motion: reduce) {
  .rahav-auth::before,
  .rahav-auth::after,
  .rahav-auth__mark::after,
  .rahav-progress__bar,
  .rahav-course__hero {
    animation: none !important;
  }
  .rahav-auth__card,
  .rahav-auth__mark,
  .rahav-auth__close,
  .rahav-auth .rahav-btn--primary,
  .rahav-auth .rahav-btn--primary::after,
  .rahav-otp__box,
  .rahav-card,
  .rahav-card__thumb img {
    transition: none !important;
  }
  .rahav-auth__card:hover,
  .rahav-auth__mark:hover,
  .rahav-otp__box:focus,
  .rahav-card:hover,
  .rahav-card:hover .rahav-card__thumb img {
    transform: none !important;
  }
}

/* ===== END RAHAV-CORAL-ACCENT ===== */


/* ==========================================================================
   پیش‌مطالعه — lesson pre-study modal
   Opened on the lesson page when the editor enabled «فعال‌سازی پیش مطالعه»
   and the lesson has a description. Uses the existing design tokens so it
   follows the coral accent layer on both the theme page and the panel.
   ========================================================================== */
.rahav-prestudy {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 4vw, 40px);
  direction: rtl;
  font-family: var(--rahav-font, "Vazirmatn", "Segoe UI", Tahoma, sans-serif);
  color: var(--rahav-ink, #1e1c26);
}

.rahav-prestudy[hidden] { display: none; }

.rahav-prestudy__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 19, 24, .64);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.rahav-prestudy__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  background: var(--rahav-surface, #fff);
  border: 1px solid var(--rahav-line, #e5e7eb);
  border-radius: 20px;
  box-shadow: 0 34px 90px -26px rgba(16, 19, 24, .6);
  overflow: hidden;
  animation: rahav-prestudy-in .24s cubic-bezier(.2, .8, .2, 1);
}

@keyframes rahav-prestudy-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.rahav-prestudy__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--rahav-line, #e5e7eb);
  background: linear-gradient(135deg, rgba(238, 107, 101, .12), rgba(238, 107, 101, .03));
}

.rahav-prestudy__title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--rahav-primary-dark, #b3413b);
}

.rahav-prestudy__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--rahav-muted, #6b7280);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.rahav-prestudy__close:hover,
.rahav-prestudy__close:focus-visible {
  background: var(--rahav-primary-soft, rgba(238, 107, 101, .12));
  color: var(--rahav-primary-dark, #b3413b);
}

.rahav-prestudy__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px 12px;
  font-size: 15px;
  line-height: 2;
  overflow-wrap: anywhere;
}

.rahav-prestudy__body > :first-child { margin-top: 0; }
.rahav-prestudy__body > :last-child { margin-bottom: 0; }
.rahav-prestudy__body h1,
.rahav-prestudy__body h2,
.rahav-prestudy__body h3,
.rahav-prestudy__body h4 {
  margin: .9em 0 .45em;
  font-weight: 800;
  line-height: 1.7;
}
.rahav-prestudy__body p { margin: 0 0 .9em; }
.rahav-prestudy__body ul,
.rahav-prestudy__body ol { margin: 0 0 .9em; padding-inline-start: 1.5em; }
.rahav-prestudy__body img { max-width: 100%; height: auto; border-radius: 10px; }
.rahav-prestudy__body a { color: var(--rahav-primary-dark, #b3413b); }
.rahav-prestudy__body table { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.rahav-prestudy__body th,
.rahav-prestudy__body td { border: 1px solid var(--rahav-line, #e5e7eb); padding: 8px 10px; text-align: right; vertical-align: top; }
.rahav-prestudy__body blockquote {
  margin: 0 0 1em;
  padding: 10px 14px;
  border-inline-start: 3px solid var(--rahav-primary, #ee6b65);
  background: var(--rahav-bg, #f8fafc);
  border-radius: 10px;
}

.rahav-prestudy__footer {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--rahav-line, #e5e7eb);
}

body.rahav-prestudy-open { overflow: hidden; }

.rahav-dark .rahav-prestudy__dialog {
  background: var(--rp-card, #181c24);
  border-color: var(--rp-line, #262b36);
  color: var(--rp-ink, #eef0f4);
}
.rahav-dark .rahav-prestudy__head { border-color: var(--rp-line, #262b36); }
.rahav-dark .rahav-prestudy__footer { border-color: var(--rp-line, #262b36); }
.rahav-dark .rahav-prestudy__title { color: #f0a39f; }
.rahav-dark .rahav-prestudy__body blockquote { background: var(--rp-ground, #101318); }
.rahav-dark .rahav-prestudy__body th,
.rahav-dark .rahav-prestudy__body td { border-color: var(--rp-line, #262b36); }

@media (max-width: 575px) {
  .rahav-prestudy { padding: 12px; }
  .rahav-prestudy__dialog { max-height: 88vh; border-radius: 16px; }
  .rahav-prestudy__head { padding: 14px 16px; }
  .rahav-prestudy__body { padding: 16px 16px 8px; font-size: 14.5px; }
  .rahav-prestudy__footer { padding: 12px 16px 16px; }
  .rahav-prestudy__footer .rahav-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rahav-prestudy__dialog { animation: none; }
  .rahav-prestudy__close { transition: none; }
}

/* Rahav LMS - AI workshop sample edition (0.3.62) */
.rahav-lesson-item__link.is-trial {
  opacity: .72;
}
.rahav-trial-cta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 12px;
  padding: 12px;
  border: 1px dashed rgba(238, 107, 101, .5);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--rahav-primary-soft), #fff);
  color: var(--rahav-ink);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.rahav-trial-cta:hover {
  border-color: var(--rahav-primary);
  transform: translateY(-1px);
}
.rahav-trial-cta__ico {
  display: inline-flex;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--rahav-primary);
  color: #fff;
}
.rahav-trial-cta__ico svg {
  width: 18px;
  height: 18px;
}
.rahav-trial-cta__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.rahav-trial-cta__title {
  color: var(--rahav-primary-dark);
  font-size: 12.5px;
  font-weight: 800;
}
.rahav-trial-cta__text {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.8;
}
.rahav-trial-cta__action {
  align-self: flex-start;
  margin-top: 3px;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--rahav-primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}
/* Rahav LMS - trial loyalty line (0.3.64) */
.rahav-trial-cta__loyalty {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--rahav-line);
  color: #2A8F64;
  font-size: 10.5px;
  line-height: 1.9;
}