/* Watch page refinements (2026-11): calmer frame for the player, a readable lesson list, tactile rows. */
.watch-page .watch-video{border-radius:18px;box-shadow:0 1px 0 #ffffff12 inset,0 24px 50px -30px #0b1a14cc,0 2px 6px #0000001f}
@media(max-width:850px){.watch-page .watch-video{border-radius:0;box-shadow:none}}
/* the player carries the listen control; the old floating pill goes away */
.watch-page:has(.pgv) .watch-listen #backgroundListen{display:none}
.watch-page .watch-title-row h1{letter-spacing:-.6px}

/* lesson list: number · thumbnail with watched bar · title */
.watch-page .watch-lessons .lesson{position:relative;display:grid;grid-template-columns:26px 104px minmax(0,1fr) 20px;align-items:center;gap:12px;min-height:84px;padding:10px 10px 10px 6px;margin:2px 0;border:0;border-radius:14px;outline:0;background:transparent;box-shadow:none;transition:background .15s,transform .2s cubic-bezier(.2,1.6,.4,1)}
.watch-page .watch-lessons .lesson:hover{background:var(--w-soft)}
.watch-page .watch-lessons .lesson:active{transform:scale(.985);transition-duration:.06s}
.watch-page .watch-lessons .lesson .number{position:static;order:0;grid-column:1;width:auto;min-width:0;padding:0;background:none;color:var(--w-muted);font-size:13px;font-weight:800;text-align:center;font-variant-numeric:tabular-nums;border-radius:0}
.watch-page .watch-lessons .lesson .lesson-thumb{grid-column:2;grid-row:1;width:104px;aspect-ratio:16/9;border-radius:9px;object-fit:cover;box-shadow:0 0 0 1px #0000000f}
.watch-page .watch-lessons .lesson .lessontext{grid-column:3;font-size:14px;font-weight:650;line-height:1.45;letter-spacing:-.2px}
.watch-page .watch-lessons .lesson .lessontext small{display:block;margin-top:3px;font-size:11.5px;font-weight:600;color:var(--w-muted)}
.watch-page .watch-lessons .lesson .status{grid-column:4;font-size:13px;color:var(--w-muted);text-align:center}
/* watched progress drawn under the thumbnail */
.watch-page .watch-lessons .lesson::after{content:'';position:absolute;left:44px;top:calc(50% + 24px);height:3px;width:calc(104px * var(--seen,0));max-width:104px;border-radius:0 0 0 9px;background:var(--w-accent);pointer-events:none}
.watch-page .watch-lessons .lesson.active{background:var(--w-selected)}
.watch-page .watch-lessons .lesson.active .number{color:var(--w-accent)}
.watch-page .watch-lessons .lesson.active .lesson-thumb{box-shadow:0 0 0 2px var(--w-accent)}
.watch-page .watch-lessons .lesson.active .status{color:var(--w-accent)}
.watch-page .watch-lessons .lesson.active .status{font-size:0}
.watch-page .watch-lessons .lesson.active .status::before{content:'';display:inline-block;width:14px;height:12px;background:linear-gradient(var(--w-accent),var(--w-accent)) 0 100%/3px 60% no-repeat,linear-gradient(var(--w-accent),var(--w-accent)) 5.5px 100%/3px 100% no-repeat,linear-gradient(var(--w-accent),var(--w-accent)) 11px 100%/3px 45% no-repeat;animation:w-eq 1s ease-in-out infinite alternate;animation-play-state:paused}
@keyframes w-eq{0%{background-size:3px 35%,3px 90%,3px 60%}50%{background-size:3px 90%,3px 40%,3px 100%}100%{background-size:3px 55%,3px 75%,3px 30%}}
@media(max-width:850px){.watch-page .watch-lessons .lesson{grid-template-columns:22px 92px minmax(0,1fr) 16px;gap:10px;min-height:76px}.watch-page .watch-lessons .lesson .lesson-thumb{width:92px}.watch-page .watch-lessons .lesson::after{left:38px;width:calc(92px * var(--seen,0));top:calc(50% + 20px)}}
/* offline panel when the lesson cannot be saved yet */
.watch-offline.wo.wo-off .wo-icon{background:var(--w-line);color:var(--w-muted)}
/* bottom actions: quieter, tactile */
.watch-page .watch-actions button{border-radius:14px;transition:transform .2s cubic-bezier(.2,1.6,.4,1),background .15s}
.watch-page .watch-actions button:active:not(:disabled){transform:scale(.97);transition-duration:.06s}
@media(prefers-reduced-motion:reduce){.watch-page .watch-lessons .lesson.active .status::before{animation:none}.watch-page .watch-lessons .lesson,.watch-page .watch-actions button{transition:none}}

/* Smoothness (2026-11). The now-playing bars move only while the video actually plays. */
.watch-page:has(.pgv[data-state=playing]) .watch-lessons .lesson.active .status::before{animation-play-state:running}
@media(prefers-reduced-motion:reduce){.watch-page .watch-lessons .lesson.active .status::before{animation:none}}
/* The sticky header scrolls over the video on phones: a solid bar instead of a live backdrop blur. */
html body.watch-page .pg-site-header.ac-header{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:var(--sh-bg)!important}
/* Long curricula: off-screen chapters skip layout/paint until they scroll near. */
.watch-page .watch-lessons .lesson{content-visibility:auto;contain-intrinsic-size:auto 84px}

/* Phone held sideways: the player takes the whole screen height (no cropped controls, no half-visible video). */
@media (orientation:landscape) and (max-height:500px) and (pointer:coarse){
 .watch-page .watch-video{width:min(100%,calc(100dvh * 16 / 9));max-height:100dvh;margin-inline:auto;border-radius:0}
}

/* Watch-only slate palette and concise controls. The video/image pixels are not filtered. */
body.watch-page{--w-bg:#fff;--w-text:#192331;--w-muted:#536176;--w-line:#dce3eb;--w-soft:#f2f5f8;--w-selected:#e6edf8;--w-accent:#435e8c;--w-primary:#283d5c;--classroom-paper:#f7f8fa;--classroom-ink:#1b2635;--classroom-green:#405981;--classroom-line:#dce3eb;--watch-accent-border:#acbdd6}
html[data-pg-theme=dark] body.watch-page{--w-bg:#171d27;--w-text:#e8eef6;--w-muted:#aab7ca;--w-line:#394556;--w-soft:#212938;--w-selected:#283955;--w-accent:#aec4e8;--w-primary:#dce8fb;--classroom-paper:#141923;--classroom-ink:#edf2f9;--classroom-green:#bfd1ed;--classroom-line:#394556;--watch-accent-border:#546986}
.watch-page.watch-page .watch-video{border-radius:15px;box-shadow:0 10px 24px -18px #1a2b43}
.watch-page .watch-title-row{margin-bottom:12px}
.watch-page .watch-meta{padding-top:17px}
.watch-page .watch-actions{gap:6px}
.watch-page .watch-actions button{min-height:44px;border-radius:10px}
html body.watch-page .watch-actions #next{background:var(--w-primary);border-color:var(--w-primary);color:var(--w-bg)}
.watch-page .watch-offline.wo{border-radius:13px;padding:12px;gap:8px;margin-bottom:11px}
.watch-page .watch-offline.wo .wo-icon{width:34px;height:34px;border-radius:9px;background:var(--w-selected);color:var(--w-accent)}
.watch-page .watch-offline.wo.wo-off .wo-icon{background:var(--w-line);color:var(--w-muted)}
.watch-page .watch-offline .wo-btn,.watch-page .watch-offline .wo-link{min-height:44px}
.watch-page .watch-offline .wo-link{display:inline-flex;align-items:center}
html body.watch-page .watch-training button,html body.watch-page .watch-training.is-complete button{color:var(--w-accent);border:1px solid var(--watch-accent-border);border-radius:9px;min-height:44px}
.watch-page .lesson.active{outline-color:var(--watch-accent-border)}
.watch-page .lesson-thumb{background:#26364e}
.watch-page #lessonNote:focus-visible,.watch-page :is(.watch-actions button,.wo-btn,.wo-link,.watch-training button,.watch-curriculum-toggle):focus-visible{outline:2px solid var(--w-accent);outline-offset:2px}
@media(max-width:850px) and (orientation:portrait){.watch-page.watch-page .watch-video{margin:10px 12px 0;width:calc(100% - 24px)}.watch-page .watch-meta{padding:13px 14px 0}.watch-page .watch-title-row{margin-bottom:9px}.watch-page .watch-training{margin:11px 14px 0;padding:9px 0}.watch-page .watch-curriculum{margin-top:17px;padding-inline:14px}}
@media(orientation:landscape) and (max-height:500px) and (pointer:coarse){.watch-page.watch-page .watch-video{border-radius:0;box-shadow:none}}

/* A single offline row until the learner chooses to manage local files. */
.watch-page .watch-offline.wo[hidden]{display:none!important}
.watch-page .watch-offline.wo{padding:0;display:block}
.watch-page .wo-disclosure>summary{cursor:pointer;min-height:48px;padding:6px 10px;list-style:none;border-radius:13px}
.watch-page .wo-disclosure>summary::-webkit-details-marker{display:none}
.watch-page .wo-disclosure>summary:focus-visible{outline:2px solid var(--w-accent);outline-offset:2px}
.watch-page .wo-disclosure .wo-copy strong{font-size:14px}
.watch-page .wo-chevron{margin-left:auto;font-size:17px;line-height:1;color:var(--w-muted)}
.watch-page .wo-disclosure[open] .wo-chevron{transform:rotate(180deg)}
.watch-page .wo-panel{display:grid;gap:8px;margin:0;padding:8px 10px 4px;border-top:1px solid var(--w-line)}
.watch-page .wo-panel>small{font-size:12px;color:var(--w-muted)}
.watch-page .wo-panel .wo-link{justify-self:start}

.watch-page .wo-disclosure:not([open])>.wo-panel{display:none}
