.watch { padding-block: clamp(28px,5vw,72px); }
.back, .direct { color: var(--forest); text-underline-offset: .25em; }
/* A single bilingual title keeps the reading order consistent at every width. */
.course-masthead {
  padding: clamp(20px, 3vw, 38px);
  margin-bottom: 24px;
  border-radius: 16px;
  background: #e9eee7;
  text-align: center;
}
.course-masthead .course-code { margin: 0 0 10px; }
.course-masthead h1 { margin: 0; color: #254438; }
.course-masthead h1 span { display: block; text-wrap: balance; }
.course-masthead h1 [lang="ar"] {
  font: 700 clamp(30px, 4vw, 48px)/1.35 "Noto Naskh Arabic", serif;
}
.course-masthead h1 [lang="en"] {
  margin-top: 3px;
  font: 400 clamp(20px, 2.3vw, 29px)/1.25 Georgia, serif;
}
.course-summary { max-width: 72ch; margin: 15px auto 0; }
.course-summary p { margin: 3px 0; color: #495c50; line-height: 1.6; text-wrap: pretty; }
.course-summary [lang="en"] { font-size: .9rem; }
.part-switch {
  display: inline-flex;
  max-width: 100%;
  gap: 3px;
  margin-top: 16px;
  padding: 3px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.part-switch > * {
  display: grid;
  gap: 2px;
  padding: 6px clamp(12px, 3vw, 25px);
  border-radius: 9px;
  text-decoration: none;
}
.part-switch [lang="en"] { font-size: .78rem; }
.part-switch [aria-current] { background: var(--forest); color: white; }
.part-switch a:hover { background: var(--soft); }
.classroom { display: grid; gap: 24px; align-items: start; }
.classroom:has(.lessons) { grid-template-columns: minmax(0,1fr) clamp(240px,25%,280px); }
.viewing { min-width: 0; }
.player {
  aspect-ratio: 16/9;
  background: #20332d;
  overflow: hidden;
  border-radius: 12px;
}
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.direct { display: inline-block; padding-block: 16px; }
.lessons {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  max-height: clamp(350px,48vw,580px);
}
.lessons :is(h2,h3,a), .lesson-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 10px 16px;
  margin: 0;
}
.lessons [lang="ar"], .lesson-heading [lang="ar"] { grid-column: 2; grid-row: 1; text-align: right; }
.lessons [lang="en"], .lesson-heading [lang="en"] { grid-column: 1; grid-row: 1; }
.lessons h2 { background: var(--forest); color: white; font-size: 17px; position: sticky; top: 0; }
.lessons h3 { background: var(--soft); font-size: 14px; }
.lessons ul { list-style: none; padding: 0; margin: 0; }
.lessons a { min-height: 44px; text-decoration: none; border-bottom: 1px solid var(--line); font-size: 14px; }
.lessons a:hover, .lessons a[aria-current] { background: #e2ece3; color: #204e39; }
.lessons a[aria-current] { box-shadow: inset 4px 0 var(--forest); font-weight: bold; }
.lessons a:focus-visible { outline-offset: -3px; }
.lesson-heading { font-size: 16px; color: var(--forest); padding-inline: 0; }
@media (max-width: 850px) {
  .classroom:has(.lessons) { grid-template-columns: 1fr; }
  .lessons { max-height: none; }
}
@media (max-width: 600px) {
  .classroom { gap: 8px; }
}
.lesson-heading[hidden] { display: none; }

.video-nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
}
.video-nav a {
  display: grid;
  gap: 3px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--forest);
  background: var(--white);
  text-decoration: none;
}
.video-nav a:hover { border-color: var(--forest); }
.video-nav [rel="next"] { margin-inline-start: auto; text-align: end; }
.video-nav [lang="en"] { font-size: .85rem; }
.video-nav[hidden], .video-nav a[hidden] { display: none; }
