/* IELTS course player (owner's Coursera reference, 1 Nov 2026), in the Vidi IELTS game style.
   Lesson page: the skill roadmap on the left, the lesson (video, transcript, text) in the middle, notes on the right.
   Exercise page: the roadmap on the left, the exercise on the right. Phones: one column, the roadmap behind a button. */
:root {
  --course-play: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M8%205.5v13l11-6.5z%27%20fill%3D%27%23ffffff%27/%3E%3C/svg%3E");
}

/* ── three columns ── */
html body .lesson-page .wrap.lesson-layout.course-layout { display: grid !important; grid-template-columns: 300px minmax(0, 1fr) 280px; gap: 22px;
  width: auto; max-width: 1680px; margin: 0 auto; padding: 18px 20px 48px; align-items: start; }
html body .lesson-page .wrap.lesson-layout.course-layout:has(> .course-notes.is-folded) { grid-template-columns: 300px minmax(0, 1fr) 132px; }
html body .exercise-page .wrap.lesson-layout.course-layout { grid-template-columns: 300px minmax(0, 1fr); }
html body .lesson-page .course-layout > .lesson { min-width: 0; margin: 0 !important; max-width: none !important; }
html body .lesson-page .course-layout > .lr-outline-toggle { display: none; }

/* ── the skill roadmap (left) ── */
html body .lesson-page .course-layout > .course-outline { position: sticky !important; top: 12px !important; max-height: calc(100vh - 24px) !important; overflow: auto;
  margin: 0 !important; padding: 0 !important; background: #fff !important; border: 1px solid var(--vg-line) !important; border-radius: 0 !important;
  box-shadow: none !important; clip-path: none !important; outline: 0 !important; }
.course-outline .course-head { position: sticky; top: 0; z-index: 2; padding: 16px 18px 14px; background: radial-gradient(320px 140px at 100% 0%, rgba(138, 114, 246, .5), transparent 70%), var(--vg-night); color: #fff; }
.course-outline .course-back { display: inline-block; margin-bottom: 8px; color: var(--vg-aqua); font-size: 13px; font-weight: 700; text-decoration: none; }
.course-outline .course-back:hover { text-decoration: underline; }
.course-outline .course-kicker { margin: 0; color: var(--vg-text-3); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.course-outline .course-name { margin: 0 0 10px; font: 800 26px/1.2 var(--vg-display); color: #fff; }
.course-outline .course-progress { display: grid; gap: 6px; }
.course-outline .course-progress .vg-bar { display: block; height: 8px; background: rgba(150, 170, 255, .2); }
.course-outline .course-progress .vg-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--vg-aqua), var(--vg-violet)); box-shadow: 0 0 8px var(--vg-aqua); transition: width .6s ease; }
.course-outline .course-count { color: var(--vg-text-2); font-size: 13px; }
.course-outline .course-stages, .course-outline .course-steps { list-style: none; margin: 0; padding: 0; }
.course-outline .course-stage + .course-stage { border-top: 1px solid var(--vg-line); }
.course-outline .course-stage summary { display: grid; gap: 2px; padding: 14px 40px 14px 18px; cursor: pointer; list-style: none; position: relative; background: var(--vg-paper); }
.course-outline .course-stage summary::-webkit-details-marker { display: none; }
.course-outline .course-stage summary::after { content: '▾'; position: absolute; right: 16px; top: 14px; color: var(--vg-ink-2); transition: transform .2s; }
.course-outline .course-stage details:not([open]) summary::after { transform: rotate(-90deg); }
.course-outline .course-stage-n { color: #6a4fe0; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.course-outline .course-stage-title { color: var(--vg-ink); font-size: 15px; font-weight: 800; line-height: 1.35; }

/* one step: the node, "Video lesson: title", the time */
.course-outline .course-step > a { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 14px 12px 18px;
  color: var(--vg-ink); text-decoration: none; border: 0; }
.course-outline .course-step > a:hover { background: #f6f3ff; }
.course-outline .course-step > a:focus-visible { outline: 3px solid var(--vg-violet); outline-offset: -3px; }
.course-outline .course-step.current > a { background: #efeaff; box-shadow: inset 4px 0 0 var(--vg-violet); }
.course-outline .course-ico { width: 26px; height: 26px; margin-top: 1px; background-repeat: no-repeat; background-position: center; background-size: 14px; }
.course-outline .course-step[data-kind="lesson"] .course-ico { border-radius: 50% !important; background-color: var(--vg-violet); background-image: var(--path-book); }
.course-outline .course-step[data-kind="video"] .course-ico { border-radius: 50% !important; background-color: var(--vg-violet); background-image: var(--course-play); background-size: 16px; }
.course-outline .course-step[data-kind="exercise"] .course-ico { background-color: var(--vg-night); background-image: var(--path-pen); clip-path: var(--path-diamond); }
.course-outline .course-step[data-state="done"] .course-ico { background-color: var(--vg-aqua); background-image: var(--path-tick); }
.course-outline .course-step.is-placeholder .course-ico { opacity: .45; }
.course-outline .course-step-text { min-width: 0; font-size: 14px; line-height: 1.45; }
.course-outline .course-step-type { font-weight: 800; }
.course-outline .course-step[data-kind="exercise"] .course-step-type { color: #8a6500; }
.course-outline .course-step:not([data-kind="exercise"]) .course-step-type { color: #5a43c9; }
.course-outline .course-step-type::after { content: ':'; }
.course-outline .course-step-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; color: var(--vg-ink-2); font-size: 12px; }
.course-outline .course-step-meta .badge { font-size: 10px; padding: 2px 6px; border-radius: 0 !important; }
.course-outline .course-step-meta .badge-free { border: 1px solid var(--vg-ink); background: var(--vg-gold); color: var(--vg-night); }
.course-outline .course-step-meta .badge-pro { border: 1px solid var(--vg-night); background: var(--vg-night); color: var(--vg-violet-lite); }

/* ── the lesson (middle) ── */
html body .lesson-page .course-layout .lg-hero { padding: 22px 26px !important; }
html body .lesson-page .course-layout .lg-hero .lg-otter { width: 110px; }
html body .lesson-page .course-layout .lesson .lg-hero h1 { font-size: clamp(28px, 2.6vw, 40px) !important; }
.course-layout .lesson-video { margin: 18px 0 22px; }
.course-layout .lesson-video video { border-radius: 0 !important; clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); box-shadow: none; }
.course-layout .lesson-video-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 10px; }
.course-layout .lesson-video-bar p { margin: 0; color: var(--vg-ink-2); font-size: 13px; }
.course-layout .course-mark { padding: 8px 14px; border: 2px solid var(--vg-violet); background: #fff; color: #5a43c9; font-family: inherit; font-size: 14px; font-weight: 800; line-height: 1.2; cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.course-layout .course-mark:hover { background: #f4f1ff; }
.course-layout .lesson-transcript { margin-top: 12px; border: 1px solid var(--vg-line); background: #fff; }
.course-layout .lesson-transcript summary { padding: 12px 16px; font-weight: 800; cursor: pointer; color: var(--vg-ink); }
.course-layout .lesson-transcript ol { list-style: none; margin: 0; padding: 0 0 8px; max-height: 340px; overflow: auto; }
.course-layout .lesson-transcript li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 8px 16px; font-size: 15px; line-height: 1.6; }
.course-layout .lesson-transcript li.is-now { background: #fff8e1; box-shadow: inset 4px 0 0 var(--vg-gold); }
.course-layout .lesson-transcript button { align-self: start; padding: 0; border: 0; background: none; color: #5a43c9; font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.6; cursor: pointer; text-align: left; }
.course-layout .lesson-transcript button:hover { text-decoration: underline; }

/* ── notes (right) ── */
.course-layout > .course-notes { position: sticky; top: 12px; padding: 16px; background: #fff; border: 1px solid var(--vg-line); }
.course-notes .course-notes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.course-notes h2 { margin: 0; font: 800 22px/1.2 var(--vg-display); color: var(--vg-ink); }
.course-notes .course-notes-fold { padding: 4px 8px; border: 0; background: none; color: #5a43c9; font-weight: 800; font-size: 13px; cursor: pointer; }
.course-notes .course-notes-hint { margin: 10px 0; color: var(--vg-ink-2); font-size: 13px; line-height: 1.5; }
.course-notes textarea { display: block; width: 100%; min-height: 280px; padding: 10px 12px; border: 1px solid var(--vg-line); background: var(--vg-paper);
  color: var(--vg-ink); font-family: inherit; font-size: 15px; line-height: 1.6; resize: vertical; border-radius: 0 !important; }
.course-notes textarea:focus { outline: 2px solid var(--vg-violet); outline-offset: 0; background: #fff; }
.course-notes .course-notes-saved { min-height: 1.4em; margin: 6px 0 0; color: #0a8a91; font-size: 12px; }
.course-notes.is-folded { padding: 12px; }
.course-notes.is-folded h2 { font-size: 18px; }
.course-notes.is-folded .course-notes-body { display: none; }

/* ── narrower screens ── */
@media (max-width: 1279px) {
  html body .lesson-page .wrap.lesson-layout.course-layout, html body .lesson-page .wrap.lesson-layout.course-layout:has(> .course-notes.is-folded) { grid-template-columns: 280px minmax(0, 1fr); }
  .course-layout > .course-notes { position: static; grid-column: 2; }
}
@media (max-width: 1000px) {
  html body .lesson-page .wrap.lesson-layout.course-layout, html body .lesson-page .wrap.lesson-layout.course-layout:has(> .course-notes.is-folded) { grid-template-columns: minmax(0, 1fr); padding: 12px 12px 40px; }
  html body .lesson-page .course-layout > .lr-outline-toggle { display: inline-flex; justify-self: start; }
  html body .lesson-page .course-layout > .course-outline { display: none; order: 0; position: static !important; max-height: none !important; }   /* hub.css moves the old outline below the lesson */
  html body .lesson-page .course-layout > .course-outline.lr-outline-open { display: block; }
  .course-layout > .course-notes { grid-column: 1; }
}
