/* Shift English R40: crawlable course overview, stronger lesson visuals and accessible controls. */
.course-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin: 0 0 22px;
  padding: clamp(22px, 4vw, 38px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(105deg, rgba(8, 22, 27, .98) 0%, rgba(8, 22, 27, .91) 54%, rgba(8, 22, 27, .56) 100%),
    url("media/photos/team-handover.jpg") center 42% / cover;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.course-intro-copy { max-width: 760px; }
.course-intro .eyebrow { margin-bottom: 10px; }
.course-intro h1 {
  margin: 0;
  font: 800 clamp(32px, 5vw, 56px) / 1.02 Archivo, Cairo, sans-serif;
  letter-spacing: -.035em;
}
.course-intro p {
  max-width: 66ch;
  margin: 12px 0 0;
  color: #e5efec;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.75;
}
.course-facts {
  display: grid;
  gap: 8px;
  min-width: 205px;
}
.course-fact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 12px;
  color: #f7f2e7;
  background: rgba(7, 20, 25, .62);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 11px;
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
}
.course-fact i { width: 18px; color: #f0c777; text-align: center; }

/* These ID/important overrides intentionally beat the shared legacy course rule. */
#shiftHero {
  background-size: 100% 100%, 100% 100%, cover !important;
  background-position: center, center, center !important;
}
.scene-visual img {
  object-fit: cover !important;
  object-position: center !important;
}
.hero h2 {
  margin: 12px 0;
  color: #fff;
  font: 800 clamp(30px, 5vw, 50px) / 1.08 Archivo, Cairo, sans-serif;
}
.tabs[hidden] { display: none !important; }
.status:empty { display: none; }
.status { font-size: 15px; line-height: 1.65; }

.lesson-step,
.primary,
.secondary,
.option,
.move,
.week-toggle,
.lesson-row,
select,
input { font-size: 14px; }
.lesson-step b { font-size: 13px; }
.side-head small,
.rank-summary,
.rank-title span,
.week-copy b,
.week-copy small,
.week-state,
.lesson-title,
.lesson-day,
.side-legend { font-size: 12px; }
.week-toggle { min-height: 52px; }
.lesson-row { min-height: 46px; }

.step-photo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 42%) minmax(0, 1fr);
  min-height: 210px;
  margin: 0 0 24px;
  overflow: hidden;
  background: #0e2026;
  border: 1px solid #c9d2cd;
  border-radius: 16px;
  box-shadow: 0 16px 38px -30px rgba(14, 32, 38, .8);
}
.step-photo img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  object-position: center;
}
.step-photo figcaption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: clamp(18px, 3vw, 28px);
  color: #fff;
  background: linear-gradient(135deg, #0e2026, #17343d);
}
.step-photo figcaption span {
  color: #f0c777;
  font: 800 11px Archivo, Cairo, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.step-photo figcaption b {
  font: 800 clamp(18px, 2.3vw, 24px) / 1.25 Archivo, Cairo, sans-serif;
}
.step-photo figcaption small { color: #dce8e4; font-size: 14px; line-height: 1.7; }

.phrase-audio {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.phrase-audio label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.phrase-audio audio { display: block; width: 100%; height: 38px; margin-top: 5px; }
.phrase small { display: block; margin-top: 7px; line-height: 1.55; }

.assessment-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  color: #17343d;
  background: #fff8e9;
  border: 1px solid #dfbd7d;
  border-radius: 12px;
  line-height: 1.6;
}
.assessment-note[hidden] { display: none !important; }
#voicePreview[hidden],
#viewCertificate[hidden] { display: none !important; }
.feedback-fieldset {
  min-width: 0;
  margin: 14px 0;
  padding: 0;
  border: 0;
}
.feedback-fieldset legend {
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}
.assessment-note i { margin-top: 4px; color: var(--gold2); }
.score-summary { margin-top: 12px; font-weight: 800; }
.option[aria-pressed="true"] { border-color: var(--gold); background: var(--soft); }
.option.correct { border-color: #82b99b; background: #edf8f1; }
.option.incorrect { border-color: #d49a9a; background: #fff2f2; }
.drill.answer-correct { border-color: #82b99b; box-shadow: inset 4px 0 #2c7a55; }
.drill.answer-incorrect { border-color: #d49a9a; box-shadow: inset 4px 0 #a43e3e; }
.item-feedback { margin: 12px 0 0; font-weight: 800; }
.assessment-instructions {
  margin-bottom: 20px;
  padding: 18px 20px;
  color: #17343d;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.assessment-instructions b { display: block; margin-bottom: 8px; font-size: 17px; }
.assessment-instructions ol { margin: 0; padding-inline-start: 22px; }
.assessment-instructions li + li { margin-top: 7px; }

.course-about {
  margin-top: 28px;
  padding: clamp(24px, 5vw, 44px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 48px -42px rgba(14, 32, 38, .75);
}
.course-about > header { max-width: 800px; }
.course-about h2 { margin: 0 0 10px; color: var(--ink); font: 800 clamp(25px, 3.5vw, 38px) / 1.18 Archivo, Cairo, sans-serif; }
.course-about p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.course-about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 24px; }
.course-about-card { padding: 20px; background: #f8faf7; border: 1px solid var(--line); border-radius: 14px; }
.course-about-card span { display: block; margin-bottom: 7px; color: var(--gold2); font: 800 12px Archivo, Cairo, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.course-about-card b { display: block; margin-bottom: 8px; color: var(--ink); font: 800 18px Archivo, Cairo, sans-serif; }
.course-about-card p { font-size: 14px; line-height: 1.7; }

/* Signed-in learners go straight to the active shift; the crawlable overview stays on the public page. */
.course-active .course-intro,
.course-active .course-about { display: none; }

button,
a,
select,
input,
audio { -webkit-tap-highlight-color: transparent; }
:where(a, button, select, input, audio):focus-visible {
  outline: 3px solid #1976a3 !important;
  outline-offset: 3px !important;
}

@media (max-width: 900px) {
  .course-intro { grid-template-columns: 1fr; align-items: start; }
  .course-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; }
  .course-fact { justify-content: center; text-align: center; }
  .course-about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .course-intro {
    margin-bottom: 14px;
    padding: 24px 20px;
    background-position: 62% center;
  }
  .course-facts { grid-template-columns: 1fr; }
  .course-fact { justify-content: flex-start; text-align: start; }
  #shiftHero {
    min-height: 390px;
    background-position: center, center, 60% center !important;
  }
  .hero h2 { font-size: clamp(29px, 9vw, 42px); }
  .lesson-flow {
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
  }
  .lesson-step { min-width: 165px; scroll-snap-align: start; }
  .step-photo { grid-template-columns: 1fr; }
  .step-photo img { min-height: 190px; max-height: 230px; }
  .step-photo figcaption { padding: 17px; }
  .phrase-audio { grid-template-columns: 1fr; }
  .course-about { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
