.course-page { background: #f7f8fa; }
.course-page [hidden] { display: none !important; }
.poster-open { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 4px 0; background: none; color: var(--muted); font-size: 12px; }
.poster-open:hover { color: var(--primary); }
.course-poster, #poster-large, #course-video { -webkit-touch-callout: none; user-select: none; -webkit-user-drag: none; }
.course-watermark { position: absolute; right: 14px; top: 14px; z-index: 1; color: rgba(255,255,255,.6); font-size: 12px; text-shadow: 0 1px 3px #000; pointer-events: none; }
body.poster-view-open { overflow: hidden; }
#poster-dialog { width: min(1200px, calc(100vw - 40px)); height: calc(100dvh - 48px); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #eff0f3; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
#poster-dialog::backdrop { background: rgba(17,18,24,.72); }
.poster-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.poster-dialog-bar h2 { font-size: 16px; margin: 0; }
.poster-dialog-bar button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.poster-dialog-bar button:hover:not(:disabled) { background: var(--primary-soft); }
.poster-dialog-bar button:disabled { opacity: .3; cursor: not-allowed; }
.poster-dialog-bar img { width: 18px; height: 18px; }
.poster-zoom-controls { display: flex; align-items: center; gap: 8px; }
#poster-zoom-value { width: 44px; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
#poster-viewport { overflow: auto; height: calc(100% - 65px); padding: 16px 0; overscroll-behavior: contain; }
.poster-zoom-canvas { width: max-content; min-width: 100%; }
#poster-large { display: block; max-width: none; height: auto; margin: 0 auto; }
#poster-image-status { margin: 10px; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 480px) { #poster-dialog { width: calc(100vw - 16px); height: calc(100dvh - 24px); } .poster-dialog-bar { padding: 12px 8px; gap: 6px; } .poster-dialog-bar h2 { font-size: 13px; } .poster-zoom-controls { gap: 3px; } .poster-dialog-bar button { width: 30px; } }
.course-home { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.course-main { display: block; width: 100%; margin: 0 auto; padding: 28px 160px 48px; gap: 0; }
.course-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.course-eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.course-heading h1 { margin: 0; font-size: 28px; line-height: 1.5; font-weight: 750; overflow-wrap: anywhere; }
.course-detail-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; flex-shrink: 0; }
.course-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 16px; }
.course-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 112px; height: 36px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font-size: 13px; }
.course-share:hover { border-color: var(--primary); color: var(--primary); }
#course-share-fallback { width: 280px; max-width: 100%; height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; }
.course-layout { display: grid; grid-template-columns: minmax(240px, 500px) minmax(0, 1fr); align-items: start; gap: 28px; }
.course-details, .course-study { min-width: 0; }
.course-details { scroll-margin-top: 100px; }
.course-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 28px; margin-bottom: 14px; }
.course-section-heading h2 { margin: 0; font-size: 16px; font-weight: 700; }
.course-section-heading a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.course-section-heading a:hover, .course-detail-link:hover { color: var(--primary); }
.course-poster { display: block; width: 100%; height: auto; background: #080808; }
.course-poster:not([src]) { visibility: hidden; }
.course-study { position: sticky; top: 88px; max-height: calc(100dvh - 112px); overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #dedfe5 transparent; padding-right: 4px; }
.course-availability { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.course-availability::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #a9acb6; }
.course-availability.is-ready::before { background: #19866c; }
.course-player-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.course-light-controls { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px 0; background: #fff; }
.course-light-controls button { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 5px; background: transparent; }
.course-light-controls button:hover:not(:disabled) { background: var(--primary-soft); }
.course-light-controls button:disabled { opacity: .35; cursor: not-allowed; }
.course-light-controls img { width: 18px; height: 18px; }
#playback-progress { --played: 0%; --buffered: 0%; appearance: none; -webkit-appearance: none; flex: 1; min-width: 0; height: 5px; margin: 10px 0; border-radius: 3px; background: linear-gradient(to right, var(--primary) 0% var(--played), #bbbfc9 var(--played) var(--buffered), #e9ebf0 var(--buffered) 100%); cursor: pointer; }
#playback-progress::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
#playback-progress::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--primary); }
#playback-progress:disabled { cursor: not-allowed; opacity: .45; }
#playback-time { min-width: 96px; color: #626875; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.course-volume { display: flex; align-items: center; gap: 2px; }
#playback-volume { width: 58px; height: 4px; margin: 0 8px 0 0; accent-color: var(--primary); cursor: pointer; }
.course-player-shell:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; background: #08090c; }
.course-player-shell:fullscreen .course-screen { flex: 1; min-height: 0; aspect-ratio: auto; }
.course-player-shell:fullscreen .course-light-controls, .course-player-shell:fullscreen .course-player-tools { flex: 0 0 auto; background: #fff; }
@media (max-width: 480px) { .course-light-controls { padding: 6px 8px 0; gap: 8px; } #playback-time { min-width: 88px; font-size: 10px; } #playback-volume { width: 40px; margin-right: 4px; } .course-player-tools { justify-content: flex-start; } .course-playback-options { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; } }
.course-screen { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; background: #17181d; color: #fff; }
.course-player-shell:fullscreen .course-screen { max-height: none; }
.course-screen video { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; background: #08090c; }
.course-video-empty { display: flex; align-items: center; flex-direction: column; gap: 10px; padding: 20px; text-align: center; }
.course-video-empty img { margin-bottom: 8px; filter: invert(1); opacity: 0.5; }
.course-video-empty strong { font-size: 18px; font-weight: 600; }
.course-video-empty span { font-size: 12px; color: #abafba; }
.course-player-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; min-height: 54px; }
.course-transport, .course-playback-options { display: flex; align-items: center; gap: 8px; }
.course-player-tools button { position: relative; display: grid; place-items: center; width: 36px; height: 34px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--ink); }
.course-player-tools button img { width: 21px; height: 21px; }
.course-player-tools button span { position: absolute; top: 13px; left: 0; width: 100%; font-size: 8px; font-weight: 750; text-align: center; }
.course-player-tools button:disabled, .course-player-tools select:disabled { opacity: 0.35; cursor: not-allowed; }
.course-player-tools button:hover:not(:disabled) { background: var(--primary-soft); }
.course-player-tools select { max-width: 138px; height: 32px; border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; background: #fff; color: var(--ink-soft); font-size: 12px; }
.course-now-playing { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 10px; row-gap: 4px; padding: 12px 0 0; }
.course-playback-status { padding: 8px 0 16px; border-bottom: 1px solid var(--line); }
.course-now-label { color: var(--muted); font-size: 11px; }
.course-now-playing h3 { min-width: 0; margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
#player-status { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
#player-status.is-error { color: #b54735; }
.course-retry { margin-top: 10px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--ink); font-size: 12px; }
.course-playlist { padding-top: 22px; }
#lesson-count { margin-left: 7px; color: var(--muted); font-size: 12px; font-weight: 400; }
.course-autoplay { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.course-autoplay input { accent-color: var(--primary); margin: 0; }
.course-lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.course-lesson-list button { width: 100%; min-height: 62px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid transparent; border-radius: 6px; text-align: left; background: transparent; color: var(--ink); }
.course-lesson-list button:hover:not(:disabled) { background: #fff; }
.course-lesson-list button[aria-current="true"] { background: var(--primary-soft); border-color: var(--primary-border); }
.course-lesson-list button:disabled { cursor: not-allowed; color: var(--muted); }
.lesson-number { color: var(--muted); font-size: 12px; }
.lesson-copy { display: grid; gap: 5px; min-width: 0; }
.lesson-copy strong { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; font-weight: 600; }
.lesson-copy small { color: var(--muted); font-size: 11px; }
.lesson-state { color: var(--muted); font-size: 11px; white-space: nowrap; }
.course-lesson-list button[aria-current="true"] .lesson-state { color: var(--brand-ink); }
.course-playlist-empty { display: flex; gap: 14px; align-items: center; padding: 25px 18px; border: 1px dashed #dcdee5; border-radius: 6px; color: var(--muted); }
.course-playlist-empty img { opacity: 0.5; }
.course-playlist-empty strong { font-size: 13px; font-weight: 500; }
.course-playlist-empty p { margin: 6px 0 0; font-size: 12px; color: #8b8f99; }
.course-footer { padding: 24px; text-align: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.course-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.course-noscript { font-size: 13px; line-height: 1.8; }
@media (max-width: 1200px) { .course-main { padding: 24px; } .course-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 24px; } .course-heading h1 { font-size: 24px; } }
@media (max-width: 940px) { .course-study { top: 126px; max-height: calc(100dvh - 148px); } .course-home { grid-row: 1; grid-column: 2; } .course-page .brand-name { font-size: 18px; } .course-page .brand-logo { width: 36px; height: 36px; flex-basis: 36px; } }
@media (max-width: 820px) { .course-main { padding: 24px 16px 32px; } .course-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } .course-study { position: static; max-height: none; overflow: visible; grid-row: 1; padding: 0; } .course-heading { margin-bottom: 24px; gap: 12px; align-items: flex-start; } .course-heading h1 { font-size: 22px; } .course-detail-link { margin-top: 5px; } .course-details { scroll-margin-top: 128px; } }
@media (max-width: 480px) { .course-home { display: none; } .course-page .site-header { grid-template-columns: minmax(0, 1fr); } .course-heading { flex-direction: column; gap: 10px; } .course-heading h1 { font-size: 21px; } .course-heading .course-detail-link { font-size: 12px; } .course-player-tools { gap: 6px; padding: 8px; } .course-transport, .course-playback-options { gap: 3px; } .course-video-empty strong { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .course-page { scroll-behavior: auto; } }
@media (max-width: 820px) { .course-screen { max-height: none; } .course-heading-actions { justify-content: flex-start; } }
/* Desktop columns own their scroll; the study scrollbar sits at the window edge. */
@media (min-width: 821px) {
  .course-page { --course-gutter: 160px; display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
  .course-page .site-header { flex: 0 0 auto; }
  .course-main { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-top: 16px; padding-bottom: 0; overflow: hidden; }
  .course-heading { flex: 0 0 auto; margin-bottom: 12px; }
  .course-eyebrow { margin-bottom: 6px; }
  .course-layout { flex: 1; min-height: 0; align-items: stretch; }
  .course-details { display: flex; flex-direction: column; min-height: 0; padding-bottom: 24px; }
  .course-details > .course-section-heading { flex: 0 0 auto; }
  .course-poster-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #c5c8d0 transparent; overscroll-behavior: contain; }
  .course-study { position: static; height: 100%; max-height: none; margin-right: calc(-1 * var(--course-gutter)); padding: 0 var(--course-gutter) 32px 0; overscroll-behavior: contain; }
  .course-footer { display: none; }
}
@media (min-width: 821px) and (max-width: 1200px) { .course-page { --course-gutter: 24px; } }
/* Fit the entire 16:9 player and its lesson title in shorter desktop windows. */
@media (min-width: 1201px) {
  .course-player-shell:not(:fullscreen), .course-now-playing, .course-playback-status { width: 100%; max-width: max(320px, calc((100dvh - 360px) * 1.777778)); margin-inline: auto; }
}
