/* =====================================================================
   Course preview player: a full screen version of the learner app's players (video, lab, quick note, interview Q&A, skill test).
   Same structure as the app: course sidebar with modules, top bar, content, bottom bar. Same cyan to blue palette, light and dark.
   Opened from CourseDetails and Bootcamp (see Views/Components/_VideoPage.cshtml, wwwroot/js/preview-player.js).
   ===================================================================== */
#myVideoModal {
    --pv-bg: #f3f4f6; --pv-panel: #ffffff; --pv-panel2: #f8fafc; --pv-line: #e5e7eb; --pv-ink: #1f2937; --pv-body: #4b5563; --pv-soft: #6b7280;
    --pv-a: #06b6d4; --pv-a2: #0891b2; --pv-b: #3b82f6; --pv-tint: #ecfeff; --pv-tint2: #cffafe; --pv-ok: #16a34a; --pv-warn: #f59e0b; --pv-bad: #dc2626;
    --pv-glow: 6, 182, 212; --pv-side: 380px;
    font-family: 'Plus Jakarta Sans', Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
    padding: 0 !important;
}
[data-bs-theme="dark"] #myVideoModal {
    --pv-bg: #1e293b; --pv-panel: #05182c; --pv-panel2: #0b2138; --pv-line: #334155; --pv-ink: #f1f5f9; --pv-body: #cbd5e1; --pv-soft: #94a3b8;
    --pv-a: #22d3ee; --pv-a2: #06b6d4; --pv-b: #60a5fa; --pv-tint: rgba(34, 211, 238, .12); --pv-tint2: rgba(34, 211, 238, .22); --pv-ok: #4ade80; --pv-warn: #fbbf24; --pv-bad: #f87171;
    --pv-glow: 34, 211, 238;
}
#myVideoModal .modal-dialog { max-width: none; margin: 0; width: 100vw; height: 100dvh; }
#myVideoModal .modal-content.pv { position: relative; display: grid; grid-template-columns: var(--pv-side) minmax(0, 1fr); width: 100%; height: 100dvh; border: 0; border-radius: 0; background: var(--pv-bg); color: var(--pv-ink); overflow: hidden; transition: grid-template-columns .3s cubic-bezier(.2, .7, .2, 1); }
#myVideoModal .pv.is-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
#myVideoModal .pv *, #myVideoModal .pv *::before, #myVideoModal .pv *::after { box-sizing: border-box; }
#myVideoModal .pv button { font-family: inherit; }
#myVideoModal .pv :focus-visible { outline: 2px solid var(--pv-a); outline-offset: 2px; }

/* ---------- sidebar ---------- */
.pv-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--pv-panel); border-right: 1px solid var(--pv-line); z-index: 3; }
.pv.is-collapsed .pv-side { visibility: hidden; border: 0; }
.pv-side__head { flex: none; padding: 18px 18px 14px; background: linear-gradient(135deg, #ecfeff, #eff6ff); border-bottom: 1px solid var(--pv-line); }
[data-bs-theme="dark"] .pv-side__head { background: linear-gradient(135deg, #1e293b, #05182c); }
.pv-course { display: flex; align-items: center; gap: 12px; }
.pv-course__ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--pv-a), var(--pv-b)); font-size: 1.25rem; box-shadow: 0 8px 18px -10px rgba(var(--pv-glow), .9); }
.pv-course b { display: block; font-size: .95rem; line-height: 1.3; font-weight: 800; color: var(--pv-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pv-course small { display: block; margin-top: 2px; font-size: .75rem; color: var(--pv-soft); }
.pv-prog { margin-top: 12px; font-size: .8125rem; color: var(--pv-body); }
.pv-prog b { color: var(--pv-a2); }
[data-bs-theme="dark"] .pv-prog b { color: var(--pv-a); }
.pv-bar2 { height: 8px; margin-top: 7px; border-radius: 999px; background: rgba(100, 116, 139, .25); overflow: hidden; }
.pv-bar2 i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pv-a), var(--pv-b)); transition: width .5s cubic-bezier(.2, .7, .2, 1); }

.pv-types { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--pv-line); background: var(--pv-panel); }

.pv-type { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border: 0; border-radius: 10px; background: #edf2fa; color: var(--pv-a2); font-size: .8125rem; font-weight: 700; cursor: pointer; transition: transform .2s, background-color .2s, color .2s, box-shadow .2s; }
[data-bs-theme="dark"] .pv-type { background: #1e293b; color: var(--pv-body); }
.pv-type small { font-size: .6875rem; font-weight: 800; opacity: .8; }
.pv-type:hover { transform: translateY(-1px); }
.pv-type.on { color: #fff; background: linear-gradient(90deg, var(--pv-a), var(--pv-b)); box-shadow: 0 8px 16px -10px rgba(var(--pv-glow), 1); }
.pv-lists { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pv-list[hidden] { display: none; }

.pv-mod { border-bottom: 1px solid var(--pv-line); }
.pv-mod > summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; list-style: none; cursor: pointer; font-size: .9375rem; font-weight: 800; color: var(--pv-ink); transition: background-color .2s; }
.pv-mod > summary::-webkit-details-marker { display: none; }
.pv-mod > summary:hover { background: var(--pv-panel2); }
.pv-mod > summary span { flex: 1 1 auto; min-width: 0; }
.pv-mod > summary small { flex: none; padding: 1px 8px; border-radius: 999px; font-size: .6875rem; font-weight: 800; color: var(--pv-a2); background: var(--pv-tint); }
[data-bs-theme="dark"] .pv-mod > summary small { color: var(--pv-a); }
.pv-mod > summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--pv-soft); border-bottom: 2px solid var(--pv-soft); transform: rotate(45deg) translateY(-2px); transition: transform .25s; }
.pv-mod[open] > summary { color: var(--pv-a2); background: var(--pv-tint); box-shadow: inset 3px 0 0 var(--pv-a); }
[data-bs-theme="dark"] .pv-mod[open] > summary { color: var(--pv-a); }
.pv-mod[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
.pv-items { margin: 0; padding: 8px 10px 12px 14px; list-style: none; background: var(--pv-panel2); border-left: 2px solid var(--pv-tint2); }
.pv-items li + li { margin-top: 6px; }

.pv-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--pv-line); border-radius: 10px; background: var(--pv-panel); color: var(--pv-ink); text-decoration: none; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s, background-color .2s; }
.pv-item:hover { transform: translateX(2px); border-color: rgba(var(--pv-glow), .55); box-shadow: 0 10px 20px -16px rgba(var(--pv-glow), 1); color: var(--pv-ink); }
.pv-item.on { border-color: var(--pv-a); background: var(--pv-tint); }
.pv-item__ic { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--pv-a2); background: var(--pv-tint); font-size: 1rem; }
[data-bs-theme="dark"] .pv-item__ic { color: var(--pv-a); }
.pv-item.on .pv-item__ic { color: #fff; background: linear-gradient(135deg, var(--pv-a), var(--pv-b)); }
.pv-item__t { font-size: .875rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.pv-item.on .pv-item__t { color: var(--pv-a2); }
[data-bs-theme="dark"] .pv-item.on .pv-item__t { color: var(--pv-a); }
.pv-item__m { grid-column: 3; grid-row: 1; font-size: .75rem; color: var(--pv-soft); white-space: nowrap; }
.pv-item__s { grid-column: 2 / 4; display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--pv-soft); }
.pv-item__s .is-free { color: var(--pv-a2); font-weight: 700; }
[data-bs-theme="dark"] .pv-item__s .is-free { color: var(--pv-a); }
.pv-item__s .is-view { display: none; color: var(--pv-ok); font-weight: 700; }
.pv-item.is-viewed .is-view { display: inline; }
.pv-item.is-viewed .is-free, .pv-item.is-viewed .is-gate { display: none; }
.pv-item.is-open .is-gate { display: none; }

.pv-side__foot { flex: none; padding: 12px 18px; border-top: 1px solid var(--pv-line); font-size: .8125rem; color: var(--pv-body); background: var(--pv-panel); }
.pv-side__foot a { color: var(--pv-a2); font-weight: 700; text-decoration: none; }
[data-bs-theme="dark"] .pv-side__foot a { color: var(--pv-a); }

/* ---------- main column ---------- */
.pv-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pv-top { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--pv-panel); border-bottom: 1px solid var(--pv-line); }
.pv-top__l { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1 1 auto; }
.pv-ib { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--pv-body); font-size: 1.125rem; cursor: pointer; transition: background-color .2s, color .2s, transform .15s; }
.pv-ib:hover { background: var(--pv-tint); color: var(--pv-a2); }
[data-bs-theme="dark"] .pv-ib:hover { color: var(--pv-a); }
.pv-ib:active { transform: scale(.94); }
.pv-back { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px 0 6px; border: 0; border-radius: 10px; background: transparent; color: var(--pv-a2); font-size: .9375rem; font-weight: 700; cursor: pointer; transition: background-color .2s; }
[data-bs-theme="dark"] .pv-back { color: var(--pv-a); }
.pv-back:hover { background: var(--pv-tint); }
.pv-title { min-width: 0; margin: 0 6px 0 4px; font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; color: var(--pv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-top__r { display: flex; align-items: center; gap: 6px; flex: none; }

.pv-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 10px; color: #fff !important; background: linear-gradient(90deg, var(--pv-a2), var(--pv-b)); font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: 0 10px 20px -12px rgba(var(--pv-glow), 1); transition: transform .2s, box-shadow .2s, filter .2s; }
.pv-cta:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 24px -12px rgba(var(--pv-glow), 1); }
.pv-cta:active { transform: scale(.98); }

.pv-body { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; scroll-behavior: smooth; }
.pv-readbar { position: sticky; top: -16px; z-index: 2; height: 3px; margin: -16px -16px 13px; background: transparent; }
.pv-readbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pv-a), var(--pv-b)); transition: width .15s linear; }

.pv-foot { flex: none; display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 58px; padding: 6px 14px calc(6px + env(safe-area-inset-bottom)); background: var(--pv-panel); border-top: 1px solid var(--pv-line); }
.pv-round { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--pv-a2); font-size: 1.25rem; cursor: pointer; transition: background-color .2s, transform .15s, opacity .2s; }
[data-bs-theme="dark"] .pv-round { color: var(--pv-a); }
.pv-round:hover:not(:disabled) { background: var(--pv-tint); }
.pv-round:active:not(:disabled) { transform: scale(.92); }
.pv-round:disabled { opacity: .35; cursor: default; }
.pv-foot__mid { min-width: 240px; }
.pv-foot__hint { display: none; margin-right: auto; font-size: .8125rem; color: var(--pv-soft); }

/* ---------- stage: video ---------- */
.pv-stage { min-height: 100%; }
.pv-video { max-width: 1240px; margin: 0 auto; }
.pv-video__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100dvh - 190px); margin-inline: auto; border-radius: 14px; overflow: hidden; background: #020b16; box-shadow: 0 24px 48px -28px rgba(2, 11, 22, .8); }
.pv-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pv-video__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; color: var(--pv-body); font-size: .875rem; }
.pv-video__meta b { color: var(--pv-ink); font-size: 1rem; }
.pv-fade { animation: pv-in .35s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes pv-in { from { opacity: 0; transform: translateY(10px); } }

/* loading + empty + error */
.pv-skel { max-width: 1100px; margin: 0 auto; display: grid; gap: 14px; }
.pv-skel i { display: block; border-radius: 14px; background: linear-gradient(100deg, var(--pv-panel) 30%, var(--pv-panel2) 50%, var(--pv-panel) 70%); background-size: 220% 100%; animation: pv-shim 1.3s linear infinite; }
.pv-skel i:nth-child(1) { height: 56px; } .pv-skel i:nth-child(2) { height: 300px; } .pv-skel i:nth-child(3) { height: 120px; }
@keyframes pv-shim { to { background-position: -220% 0; } }
.pv-empty { display: grid; place-items: center; min-height: 50vh; text-align: center; color: var(--pv-body); }
.pv-empty .pv-lockic { margin-inline: auto; }

/* ---------- content documents ---------- */
.pv-doc { max-width: 1240px; margin: 0 auto; animation: pv-in .35s cubic-bezier(.2, .7, .2, 1) both; }
.pv-card { background: var(--pv-panel); border: 1px solid var(--pv-line); border-radius: 14px; padding: 22px; }
.pv-h { margin: 0 0 14px; padding-left: 12px; border-left: 4px solid var(--pv-a); font-size: 1.25rem; font-weight: 800; color: var(--pv-ink); }
.pv-h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 1.25rem; font-weight: 800; color: var(--pv-ink); }
.pv-h2 i { color: var(--pv-b); }
.pv-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--pv-a2); background: var(--pv-tint); border: 1px solid var(--pv-tint2); }
[data-bs-theme="dark"] .pv-chip { color: var(--pv-a); }
.pv-pill { padding: 3px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--pv-a2); background: var(--pv-tint); }
[data-bs-theme="dark"] .pv-pill { color: var(--pv-a); }

.pv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px; border: 0; border-radius: 10px; color: #fff !important; background: linear-gradient(90deg, var(--pv-a2), var(--pv-b)); font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .2s, box-shadow .2s, filter .2s, background-color .2s, opacity .2s; }
.pv-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.07); box-shadow: 0 12px 22px -14px rgba(var(--pv-glow), 1); }
.pv-btn:active:not(:disabled) { transform: scale(.98); }
.pv-btn:disabled { opacity: .4; cursor: default; }
.pv-btn--ghost { color: var(--pv-body) !important; background: transparent; border: 1px solid var(--pv-line); }
.pv-btn--ghost:hover:not(:disabled) { color: var(--pv-a2) !important; border-color: var(--pv-a); background: var(--pv-tint); box-shadow: none; filter: none; }
.pv-btn--danger { background: var(--pv-bad); min-height: 38px; }
.pv-btn--wide { width: 100%; min-height: 50px; margin-top: 18px; font-size: 1rem; }

/* lab */
.pv-bar { position: sticky; top: -16px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin: -16px -16px 14px; padding: 8px 16px; background: var(--pv-panel); border-bottom: 1px solid var(--pv-line); }
.pv-tabs { display: flex; gap: 8px; }
.pv-tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 12px; background: #edf2fa; color: var(--pv-a2); font-size: .875rem; font-weight: 700; cursor: pointer; transition: transform .2s, background-color .2s, color .2s, box-shadow .2s; }
[data-bs-theme="dark"] .pv-tab { background: #1e293b; color: var(--pv-body); }
.pv-tab:hover { transform: translateY(-1px); }
.pv-tab.on { color: #fff; background: linear-gradient(90deg, var(--pv-a), var(--pv-b)); box-shadow: 0 10px 18px -12px rgba(var(--pv-glow), 1); }
.pv-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: .8125rem; color: var(--pv-soft); }
.pv-meta li { display: inline-flex; align-items: center; gap: 6px; }
.pv-meta i { color: var(--pv-a2); }
.pv-pane[hidden] { display: none; }
.pv-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--pv-line); color: var(--pv-body); font-size: .9375rem; }

.pv-strip { display: none; margin-bottom: 14px; padding: 12px; background: var(--pv-panel); border: 1px solid var(--pv-line); border-radius: 12px; }
.pv-strip__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: .875rem; color: var(--pv-body); }
.pv-strip__top i { margin-right: 6px; color: var(--pv-a); }
.pv-dots { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.pv-dot { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #e5e7eb; color: #6b7280; font-size: .75rem; font-weight: 700; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
[data-bs-theme="dark"] .pv-dot { background: #334155; color: #94a3b8; }
.pv-dot.is-done { background: #10b981; color: #fff; }
.pv-dot.on { background: var(--pv-a2); color: #fff; box-shadow: 0 0 0 4px rgba(var(--pv-glow), .22); }
.pv-dot.is-locked { opacity: .7; }

.pv-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.pv-step { border-color: #a5f3fc; animation: pv-in .3s cubic-bezier(.2, .7, .2, 1) both; }
[data-bs-theme="dark"] .pv-step { border-color: rgba(34, 211, 238, .35); }
.pv-step[hidden] { display: none; }
.pv-step__k { font-size: .75rem; font-weight: 700; color: var(--pv-a2); }
[data-bs-theme="dark"] .pv-step__k { color: var(--pv-a); }
.pv-step h3 { margin: 4px 0 8px; font-size: 1.375rem; font-weight: 800; letter-spacing: -.01em; color: var(--pv-ink); }
.pv-steps__nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--pv-line); }
.pv-step--locked { text-align: center; padding: 48px 22px; }
.pv-step--locked p { max-width: 460px; margin: 0 auto; color: var(--pv-body); }
.pv-step--locked .pv-steps__nav { justify-content: center; border: 0; }
.pv-lockic { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 10px; border-radius: 50%; color: var(--pv-a2); background: var(--pv-tint); font-size: 1.4rem; }
.pv-lockic--ok { color: var(--pv-ok); background: rgba(22, 163, 74, .12); }

.pv-rail { position: sticky; top: 58px; max-height: calc(100dvh - 230px); overflow-y: auto; padding: 8px; background: var(--pv-panel); border: 1px solid var(--pv-line); border-radius: 14px; }
.pv-rail__i { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin-bottom: 4px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; color: var(--pv-ink); cursor: pointer; transition: background-color .2s; }
.pv-rail__i:hover { background: var(--pv-panel2); }
.pv-rail__i.on { background: var(--pv-tint); }
.pv-rail__n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; background: #e5e7eb; color: #6b7280; font-size: .6875rem; font-weight: 700; transition: background-color .2s, color .2s; }
[data-bs-theme="dark"] .pv-rail__n { background: #334155; color: #94a3b8; }
.pv-rail__i.on .pv-rail__n { background: var(--pv-a2); color: #fff; }
.pv-rail__i.is-done .pv-rail__n { background: #10b981; color: #fff; }
.pv-rail__t { min-width: 0; }
.pv-rail__t b { display: block; font-size: .8125rem; font-weight: 600; line-height: 1.35; }
.pv-rail__i.on .pv-rail__t b { color: var(--pv-a2); }
[data-bs-theme="dark"] .pv-rail__i.on .pv-rail__t b { color: var(--pv-a); }
.pv-rail__i.is-locked .pv-rail__t b { color: var(--pv-soft); font-weight: 500; }
.pv-rail__t small { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: .6875rem; color: var(--pv-soft); }
.pv-rail__end { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: .8125rem; color: var(--pv-soft); }
.pv-rail__end span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e5e7eb; color: #9ca3af; font-size: .7rem; }
[data-bs-theme="dark"] .pv-rail__end span { background: #334155; }
.pv-rail__end.is-all span { background: var(--pv-warn); color: #fff; }
.pv-rail__end.is-all b { color: var(--pv-warn); }

/* markdown / html body, same reading style as the app */
.pv-prose { color: var(--pv-body); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.pv-prose--sm { margin-top: 16px; font-size: .9rem; }
.pv-prose h1, .pv-prose h2, .pv-prose h3, .pv-prose h4 { margin: 1.5em 0 .5em; color: var(--pv-ink); font-weight: 800; line-height: 1.3; }
.pv-prose h1 { font-size: 1.5rem; } .pv-prose h2 { font-size: 1.3rem; } .pv-prose h3 { font-size: 1.15rem; } .pv-prose h4 { font-size: 1.05rem; }
.pv-prose > :first-child { margin-top: 0; }
.pv-prose p { margin: 0 0 1em; }
.pv-prose ul, .pv-prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.pv-prose li { margin-bottom: .3em; }
.pv-prose img { display: block; max-width: 100%; height: auto; margin: 1em auto; border: 1px solid var(--pv-line); border-radius: 12px; }
.pv-prose a { color: var(--pv-a2); }
.pv-prose strong { color: var(--pv-ink); }
.pv-prose blockquote { margin: 1em 0; padding: 10px 16px; border-left: 4px solid var(--pv-a); background: var(--pv-tint); border-radius: 0 10px 10px 0; }
.pv-prose table { width: 100%; margin: 1em 0; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.pv-prose th, .pv-prose td { padding: 8px 12px; border: 1px solid var(--pv-line); }
.pv-prose th { background: var(--pv-panel2); color: var(--pv-ink); }
.pv-prose code { padding: 1px 6px; border-radius: 6px; font-size: .86em; color: #be185d; background: rgba(100, 116, 139, .14); }
[data-bs-theme="dark"] .pv-prose code { color: #f9a8d4; }
.pv-prose pre { position: relative; margin: 1em 0; padding: 14px 16px; overflow-x: auto; border-radius: 12px; color: #e6edf3; background: #0d1117; border: 1px solid #1f2937; font-size: .84rem; line-height: 1.6; }
.pv-prose pre code { padding: 0; color: inherit; background: none; }
.pv-copy { position: absolute; top: 8px; right: 8px; padding: 3px 10px; border: 1px solid #30363d; border-radius: 8px; color: #c9d1d9; background: #161b22; font-size: .75rem; font-weight: 600; cursor: pointer; opacity: 0; transition: opacity .2s, background-color .2s; }
.pv-prose pre:hover .pv-copy, .pv-copy:focus-visible { opacity: 1; }
.pv-copy:hover { background: #21262d; }

/* quick note + Q&A */
.pv-card--read { padding: clamp(18px, 3vw, 36px); }
.pv-read__h { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--pv-line); }
.pv-read__h h3 { margin: 10px 0 6px; font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -.015em; color: var(--pv-ink); }
.pv-read__m { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--pv-soft); }
.pv-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding: 16px 18px; border-radius: 12px; background: var(--pv-tint); color: var(--pv-ink); font-weight: 600; }

/* skill test */
.pv-test .pv-thead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.pv-thead h1 { flex: 1 1 100%; margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.015em; color: var(--pv-ink); }
.pv-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.pv-two--q { grid-template-columns: minmax(0, 1fr) 280px; }
.pv-tiles { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pv-tiles li { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: linear-gradient(90deg, #ecfeff, #eff6ff); border: 1px solid #cffafe; }
[data-bs-theme="dark"] .pv-tiles li { background: linear-gradient(90deg, rgba(34, 211, 238, .1), rgba(96, 165, 250, .1)); border-color: rgba(34, 211, 238, .25); }
.pv-tile__ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--pv-a), var(--pv-b)); font-size: 1.2rem; }
.pv-tiles b { display: block; font-size: 1.125rem; color: var(--pv-ink); }
.pv-tiles small { color: var(--pv-body); font-size: .8125rem; }
.pv-ins { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: pvi; color: var(--pv-body); }
.pv-ins li { position: relative; padding-left: 44px; counter-increment: pvi; line-height: 1.55; }
.pv-ins li::before { content: counter(pvi); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--pv-b), var(--pv-a)); font-size: .8125rem; font-weight: 800; }
.pv-tview[hidden] { display: none; }
.pv-tbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; padding: 14px 18px; }
.pv-tbar__l { flex: 1 1 260px; }
.pv-tbar__l h2 { margin: 0; font-size: 1.125rem; font-weight: 800; color: var(--pv-ink); }
.pv-tbar__l .pv-bar2 { max-width: 320px; }
.pv-tbar__r { display: flex; align-items: center; gap: 14px; }
.pv-timer { display: inline-flex; align-items: center; gap: 8px; color: var(--pv-body); }
.pv-timer b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.1rem; color: var(--pv-ink); }
.pv-qcard { padding: clamp(18px, 3vw, 30px); }
.pv-q[hidden] { display: none; }
.pv-q { animation: pv-in .3s cubic-bezier(.2, .7, .2, 1) both; }
.pv-q__t { display: flex; gap: 10px; margin-bottom: 14px; font-size: 1.25rem; font-weight: 700; color: var(--pv-ink); }
.pv-q__t > span { flex: none; }
.pv-q__t > div { min-width: 0; }
.pv-q__d { margin-bottom: 14px; color: var(--pv-body); }
.pv-opts { display: grid; gap: 12px; }
.pv-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--pv-line); border-radius: 12px; color: var(--pv-body); cursor: pointer; transition: border-color .2s, background-color .2s, box-shadow .2s, transform .15s; }
.pv-opt:hover { border-color: #93c5fd; box-shadow: 0 10px 20px -16px rgba(59, 130, 246, .9); }
.pv-opt:active { transform: scale(.995); }
.pv-opt:has(input:checked) { border-color: var(--pv-b); background: rgba(59, 130, 246, .08); }
.pv-opt input { flex: none; width: 20px; height: 20px; accent-color: var(--pv-b); }
.pv-opt b { flex: none; color: var(--pv-ink); }
.pv-opt > div { min-width: 0; flex: 1 1 auto; }
.pv-md > :first-child { margin-top: 0; } .pv-md > :last-child { margin-bottom: 0; }
.pv-md p { margin: 0 0 .5em; }
.pv-md pre { margin: .5em 0; padding: 10px 12px; overflow-x: auto; border-radius: 10px; color: #e6edf3; background: #0d1117; font-size: .82rem; font-weight: 400; }
.pv-md code { font-size: .88em; }
.pv-md img { max-width: 100%; height: auto; }
.pv-qnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--pv-line); }
.pv-pal { position: sticky; top: 0; }
.pv-pal h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; color: var(--pv-ink); }
.pv-pal p { margin: 0 0 14px; font-size: .875rem; color: var(--pv-body); }
.pv-pal__g { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.pv-pal__b { height: 40px; border: 0; border-radius: 10px; background: #f3f4f6; color: #4b5563; font-weight: 700; cursor: pointer; transition: background-color .2s, color .2s, transform .15s; }
[data-bs-theme="dark"] .pv-pal__b { background: #1e293b; color: #cbd5e1; }
.pv-pal__b:hover { transform: translateY(-1px); }
.pv-pal__b.is-ans { background: #dcfce7; color: #15803d; }
[data-bs-theme="dark"] .pv-pal__b.is-ans { background: rgba(74, 222, 128, .16); color: #4ade80; }
.pv-pal__b.on { color: #fff; background: linear-gradient(135deg, var(--pv-b), var(--pv-a)); box-shadow: 0 8px 16px -10px rgba(var(--pv-glow), 1); }
.pv-key { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: .8125rem; color: var(--pv-body); }
.pv-key li { display: flex; align-items: center; gap: 8px; }
.pv-key i { width: 16px; height: 16px; border-radius: 5px; }
.k-cur { background: linear-gradient(135deg, var(--pv-b), var(--pv-a)); } .k-ans { background: #dcfce7; border: 1px solid #86efac; } .k-no { background: #f3f4f6; border: 1px solid #d1d5db; }
[data-bs-theme="dark"] .k-ans { background: rgba(74, 222, 128, .16); border-color: rgba(74, 222, 128, .4); } [data-bs-theme="dark"] .k-no { background: #1e293b; border-color: #475569; }
.pv-done { max-width: 620px; margin: 6vh auto 0; text-align: center; padding: 38px 26px; }
.pv-done h2 { margin: 4px 0 8px; font-size: 1.6rem; font-weight: 800; color: var(--pv-ink); }
.pv-done p { margin: 0 0 8px; color: var(--pv-body); }
.pv-done__s { font-size: .9rem; }
.pv-done__a { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }

/* ---------- the lead form, as a card over the content ---------- */
#myVideoModal .pv-gate { position: absolute; inset: 0; z-index: 8; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 18px 14px; background: rgba(15, 23, 42, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#myVideoModal .pv-gate .container { width: 100%; max-width: 520px; margin: auto; padding: 0; }
#myVideoModal .pv-gate #formvideo { padding: 24px 24px 20px; border-radius: 18px; border: 1px solid var(--pv-line); background: var(--pv-panel); color: var(--pv-ink); box-shadow: 0 30px 60px -28px rgba(2, 11, 22, .7); }
.pv-gate__h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pv-gate__h .pv-lockic { width: 44px; height: 44px; margin: 0; font-size: 1.1rem; }
.pv-gate__h b { display: block; font-size: 1.125rem; font-weight: 800; color: var(--pv-ink); }
.pv-gate__h small { display: block; font-size: .8125rem; color: var(--pv-body); }
#myVideoModal .pv-gate .pv-lbl { display: block; margin: 0 0 5px; font-size: .75rem; font-weight: 700; color: var(--pv-body); }
#myVideoModal .pv-gate .mb-1 { margin-bottom: 12px !important; }
#myVideoModal .pv-gate .form-control, #myVideoModal .pv-gate .form-select, #myVideoModal .pv-gate .selectize-control .selectize-input { min-height: 42px; border: 1px solid var(--pv-line) !important; border-radius: 10px !important; background: var(--pv-panel2) !important; color: var(--pv-ink) !important; font-size: .875rem !important; box-shadow: none; }
#myVideoModal .pv-gate .form-control:focus, #myVideoModal .pv-gate .selectize-input.focus { border-color: var(--pv-a) !important; box-shadow: 0 0 0 3px rgba(var(--pv-glow), .2) !important; }
#myVideoModal .pv-gate .form-control::placeholder { color: var(--pv-soft); }
#myVideoModal .pv-gate .input-validation-error { border-color: var(--pv-bad) !important; }
#myVideoModal .pv-gate .form-check-label { color: var(--pv-body); }
#myVideoModal .pv-gate #btndownddemo, #myVideoModal .pv-gate #btnwaitdemo { width: 100%; min-height: 46px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(90deg, var(--pv-a2), var(--pv-b)); font-weight: 700; }
#myVideoModal .pv-gate #btndownddemo .d-none { display: inline !important; }
#myVideoModal .pv-gate .selectize-dropdown { z-index: 2100; }

/* ---------- small screens: the sidebar slides over the content ---------- */
@media (max-width: 991.98px) {
    #myVideoModal .modal-content.pv, #myVideoModal .pv.is-collapsed { grid-template-columns: minmax(0, 1fr); }
    .pv-side { position: absolute; inset: 0 auto 0 0; width: min(92vw, 400px); box-shadow: 0 0 60px rgba(2, 11, 22, .5); transition: transform .3s cubic-bezier(.2, .7, .2, 1); z-index: 20; }
    .pv.is-collapsed .pv-side { visibility: visible; transform: translateX(-105%); box-shadow: none; }
    .pv-scrim { position: absolute; inset: 0; z-index: 15; background: rgba(2, 11, 22, .5); }
    .pv.is-collapsed .pv-scrim { display: none; }
    .pv-split { grid-template-columns: minmax(0, 1fr); }
    .pv-rail { display: none; }
    .pv-strip { display: block; }
    .pv-two, .pv-two--q { grid-template-columns: minmax(0, 1fr); }
    .pv-pal { position: static; }
    .pv-top .pv-cta span { display: none; }
}
@media (min-width: 992px) { .pv-scrim { display: none; } }
@media (max-width: 575.98px) {
    .pv-body { padding: 10px; }
    .pv-bar, .pv-readbar { margin-inline: -10px; top: -10px; padding-inline: 10px; }
    .pv-bar { margin-top: -10px; }
    .pv-readbar { margin-top: -10px; }
    .pv-back span, .pv-top__r .pv-cta { display: none; }
    .pv-title { font-size: 1rem; }
    .pv-card { padding: 16px; }
    .pv-foot__mid { min-width: 0; flex: 1 1 auto; }
    .pv-foot .pv-cta { flex: 1 1 auto; }
    .pv-video__frame { max-height: none; border-radius: 10px; }
    .pv-tab { padding: 0 12px; }
    #myVideoModal .pv-gate #formvideo { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    #myVideoModal .pv, #myVideoModal .pv * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* theme button shows the icon of the mode you would switch to */
.pv-sun { display: none; }
[data-bs-theme="dark"] .pv-sun { display: inline; }
[data-bs-theme="dark"] .pv-moon { display: none; }

/* gate: one card holds the heading and the form; selectize copies form-select onto its wrapper, so the wrapper itself stays plain */
#myVideoModal .pv-gate .container { padding: 24px 24px 20px; border: 1px solid var(--pv-line); border-radius: 18px; background: var(--pv-panel); box-shadow: 0 30px 60px -28px rgba(2, 11, 22, .7); }
#myVideoModal .pv-gate #formvideo { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#myVideoModal .pv-gate .selectize-control.form-select { padding: 0; border: 0 !important; background: none !important; box-shadow: none; height: auto; }
#myVideoModal .pv-gate .selectize-input { display: flex; align-items: center; }
#myVideoModal .pv-gate .selectize-input > input { color: var(--pv-ink) !important; }
@media (max-width: 575.98px) { #myVideoModal .pv-gate .container { padding: 18px 16px; } }

/* ===== content types live in a bar under the top bar (more visible than a small block in the sidebar) ===== */
.pv-course__img { flex: none; width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: #fff; padding: 3px; border: 1px solid var(--pv-line); box-shadow: 0 8px 18px -12px rgba(var(--pv-glow), .9); }
.pv-types { flex: none; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; background: var(--pv-panel); border-bottom: 1px solid var(--pv-line); }
.pv-types::-webkit-scrollbar { display: none; }
.pv-type { height: 42px; padding: 0 18px; gap: 9px; font-size: .9375rem; border-radius: 12px; scroll-snap-align: start; }
.pv-type i { font-size: 1.05rem; }
.pv-type small { padding: 1px 8px; border-radius: 999px; background: rgba(var(--pv-glow), .14); font-size: .75rem; opacity: 1; }
.pv-type.on small { background: rgba(255, 255, 255, .25); }
/* lab Problem / Solution tabs: a lighter underline style so the two tab rows do not compete */
.pv-tabs { gap: 4px; }
.pv-tab { height: 42px; padding: 0 14px; border-radius: 0; background: transparent !important; color: var(--pv-body); border-bottom: 3px solid transparent; box-shadow: none !important; transform: none !important; }
.pv-tab:hover { color: var(--pv-a2); }
.pv-tab.on { color: var(--pv-a2); border-bottom-color: var(--pv-a); background: transparent; }
[data-bs-theme="dark"] .pv-tab.on, [data-bs-theme="dark"] .pv-tab:hover { color: var(--pv-a); }
.pv-bar { padding-block: 0; }

/* ===== the lead form covers the whole player ===== */
#myVideoModal .pv > .pv-gate { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 18px 14px; background: rgba(2, 11, 22, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#myVideoModal .pv > .pv-gate .container { position: relative; width: 100%; max-width: 540px; margin: auto; }
.pv-gate__h { position: relative; padding-right: 36px; }
.pv-gate__x { position: absolute; top: -4px; right: -6px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--pv-soft); font-size: 1rem; cursor: pointer; transition: background-color .2s, color .2s; }
.pv-gate__x:hover { background: var(--pv-tint); color: var(--pv-a2); }
@media (max-width: 575.98px) {
    #myVideoModal .pv > .pv-gate { align-items: flex-start; padding: 12px; }
    .pv-types { padding: 8px 10px; }
    .pv-type { height: 40px; padding: 0 10px; gap: 6px; font-size: .8125rem; }
    .pv-type small { padding: 0 6px; }
    .pv-course__img { width: 44px; height: 44px; }
}

/* ===== a dialog over the course page (about 80% of the screen), not a separate page ===== */
body:has(#myVideoModal.show) .modal-backdrop { --bs-backdrop-opacity: 1; background: rgba(2, 11, 22, .5); -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%); }
body:has(#myVideoModal.show) .modal-backdrop.fade { transition: opacity .35s ease; }
#myVideoModal { --pv-side: clamp(280px, 27%, 380px); --pv-h: 84dvh; }
#myVideoModal .modal-dialog { position: relative; width: 80vw; max-width: 1560px; height: var(--pv-h); margin: calc((100dvh - var(--pv-h)) / 2) auto; transform: translateY(28px) scale(.96); opacity: 0; transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .3s ease; }
#myVideoModal.show .modal-dialog { transform: none; opacity: 1; }
#myVideoModal .modal-content.pv { height: 100%; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 50px 120px -30px rgba(2, 11, 22, .75), 0 0 0 1px rgba(var(--pv-glow), .08); }
.pv-video__frame { max-height: calc(var(--pv-h) - 210px); }
.pv-rail { max-height: calc(var(--pv-h) - 270px); }
.pv-x { display: none; }
@media (min-width: 992px) { .pv-x { display: inline-grid; } }

/* open: the parts of the dialog settle in one after another so it feels like it grows out of the page */
@media (prefers-reduced-motion: no-preference) {
    #myVideoModal.show .pv-side { animation: pv-slide-l .55s .05s cubic-bezier(.16, 1, .3, 1) both; }
    #myVideoModal.show .pv-top { animation: pv-drop .45s .08s cubic-bezier(.16, 1, .3, 1) both; }
    #myVideoModal.show .pv-types .pv-type { animation: pv-pop .45s cubic-bezier(.16, 1, .3, 1) both; }
    #myVideoModal.show .pv-types .pv-type:nth-child(1) { animation-delay: .14s; } #myVideoModal.show .pv-types .pv-type:nth-child(2) { animation-delay: .19s; }
    #myVideoModal.show .pv-types .pv-type:nth-child(3) { animation-delay: .24s; } #myVideoModal.show .pv-types .pv-type:nth-child(4) { animation-delay: .29s; }
    #myVideoModal.show .pv-types .pv-type:nth-child(5) { animation-delay: .34s; }
    #myVideoModal.show .pv-foot { animation: pv-rise .45s .2s cubic-bezier(.16, 1, .3, 1) both; }
}
@keyframes pv-slide-l { from { opacity: 0; transform: translateX(-22px); } }
@keyframes pv-drop { from { opacity: 0; transform: translateY(-12px); } }
@keyframes pv-pop { from { opacity: 0; transform: translateY(8px) scale(.94); } }
@keyframes pv-rise { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 991.98px) {
    #myVideoModal { --pv-h: 92dvh; }
    #myVideoModal .modal-dialog { width: 94vw; }
    .pv-rail { max-height: none; }
}
/* phones: a sheet that rises from the bottom and fills the screen width, so everything stays readable */
@media (max-width: 575.98px) {
    #myVideoModal { --pv-h: 95dvh; }
    #myVideoModal .modal-dialog { width: 100vw; margin: calc(100dvh - var(--pv-h)) 0 0; transform: translateY(60px); }
    #myVideoModal.show .modal-dialog { transform: none; }
    #myVideoModal .modal-content.pv { border-radius: 22px 22px 0 0; border-bottom: 0; }
    .pv-back { display: none; }
    .pv-x { display: inline-grid; }
    .pv-top { padding: 8px 10px; }
    .pv-video__frame { max-height: none; }
}
@media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { #myVideoModal .modal-dialog { transform: none; } }
