/* ============================================================
   Uppen — Lecture player ("Explained")
   Microphone button · sticky controls · unit highlighting · dock
   ============================================================ */

/* ---------- microphone button under the topic progress figure ---------- */
.trow-m {
  display: flex !important;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; flex: 0 0 46px; min-height: 34px;
}
.trow-pct { font-size: 13px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.trow-mic-slot { display: block; min-height: 22px; }
.trow-mic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  cursor: pointer; line-height: 0;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.trow-mic:hover, .trow-mic:focus-visible {
  background: var(--accent); color: #fff; transform: translateY(-1px); outline: none;
}
.trow-mic:active { transform: translateY(0); }

/* ---------- MCQ correction: show the correct letter ---------- */
.mcq-ans {
  display: flex; align-items: flex-start; gap: 10px;
  background: color-mix(in srgb, #0E9F55 9%, transparent);
  border: 1px solid color-mix(in srgb, #0E9F55 30%, transparent);
  border-radius: 10px; padding: 10px 12px; margin: 2px 0 10px;
}
.mcq-ans-key {
  flex: 0 0 auto; min-width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: #0E9F55; color: #fff;
  font-size: 13px; font-weight: 800; line-height: 1; margin-top: 1px;
}
.mcq-ans-txt { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.6; }
.mcq-ans-txt p { margin: 0; }

/* ---------- explained view ---------- */
.lec-head { margin: 4px 0 18px; }
.lec-head h1 {
  font-family: var(--serif, Georgia, serif); font-size: 26px; line-height: 1.2;
  margin: 6px 0 6px; letter-spacing: -.02em;
}
.lec-meta { color: var(--muted); font-size: 14px; margin: 0; }
.lec-warn {
  background: #fff4e5; border: 1px solid #f0c27a; color: #7a4b00;
  padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 14.5px;
}

/* controls */
.lec-ctrl {
  background: var(--surface, #fff); border: 1px solid var(--border, #e3e7ec);
  border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  position: sticky; top: 0; z-index: 25;
}
.lec-row { display: flex; align-items: center; gap: 12px; }
.lec-row2 { margin-top: 12px; flex-wrap: wrap; gap: 8px; }
.lec-play {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  cursor: pointer; font-size: 15px; transition: transform .14s ease, filter .14s ease;
}
.lec-play:hover { filter: brightness(1.08); transform: scale(1.04); }
.lec-play:active { transform: scale(.98); }
.lec-mid { flex: 1 1 160px; min-width: 120px; }
.lec-bar {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.lec-bar > i {
  display: block; height: 100%; width: 0%; border-radius: 999px;
  background: var(--accent); transition: width .15s linear;
}
.lec-times {
  display: flex; justify-content: space-between; font-size: 12px;
  color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; gap: 8px;
}
.lec-sm {
  border: 1px solid var(--border, #e3e7ec); background: transparent;
  color: var(--text-body, #2c3540); border-radius: 999px;
  padding: 6px 10px; font-size: 12.5px; cursor: pointer;
}
.lec-sm:hover { background: var(--soft, #f2f5f4); }
.lec-fld { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.lec-fld select {
  border: 1px solid var(--border, #e3e7ec); background: var(--surface, #fff);
  color: var(--text-body, #2c3540); border-radius: 999px;
  padding: 5px 8px; font-size: 12.5px; max-width: 100%;
}
.lec-grow { flex: 1 1 180px; min-width: 140px; }
.lec-grow select { width: 100%; border-radius: 8px; }
.lec-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }

/* transcript document */
.lec-doc { margin-top: 18px; }
.lec-doc h1.t {
  font-family: var(--serif, Georgia, serif); font-size: 25px;
  color: var(--accent); margin: 6px 0 10px;
}
.lec-doc h2 {
  font-family: var(--serif, Georgia, serif); font-size: 20px;
  color: var(--accent); margin: 28px 0 8px;
  border-top: 1px solid var(--border, #e3e7ec); padding-top: 18px;
}
.lec-doc h3 {
  font-family: var(--serif, Georgia, serif); font-size: 17px;
  color: var(--text-body, #2c3540); margin: 20px 0 6px;
}
.lec-doc p { margin: 10px 0; line-height: 1.8; }

/* THE highlighter: the unit currently being spoken */
.unit { padding: 4px 8px; margin: 2px -8px; border-radius: 8px; cursor: pointer; transition: background .18s ease; }
.unit:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.unit.speaking {
  background: #fff3c4;
  box-shadow: 0 0 0 2px #f1d56a;
}
.lec-doc .unit.speaking h2, .lec-doc .unit.speaking h3 { color: #6b5200; }
.meta { color: var(--muted); font-size: 13.5px; font-style: italic; }
.cue {
  font-size: 11px; background: #e3f2f0; color: #0f766e;
  padding: 1px 8px; border-radius: 99px; font-weight: 600; font-style: normal;
}
.tablewrap { overflow-x: auto; margin: 14px 0; }
.lec-doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lec-doc th, .lec-doc td { border: 1px solid var(--border, #e3e7ec); padding: 7px 10px; text-align: left; }
.lec-doc th { background: var(--soft, #f2f5f4); }

/* topic pills + footer */
.lec-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 4px; }
.lec-pill {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; text-decoration: none;
  border: 1px solid var(--border, #e3e7ec); background: var(--surface, #fff);
  color: var(--text-body, #2c3540);
}
.lec-pill:hover { border-color: var(--accent); color: var(--accent); }
.lec-pill.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.lec-foot {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border, #e3e7ec);
}
.lec-nav { font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
.lec-nav:hover { text-decoration: underline; }

/* ---------- floating dock (appears when the controls scroll away) ---------- */
.lec-dock {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e3e7ec);
  border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 6px 24px rgba(16, 24, 40, .16);
}
.lec-dock[hidden] { display: none; }
.lec-dock-play {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  cursor: pointer; font-size: 13px;
}
.lec-dock-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lec-dock-txt b {
  font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lec-dock-txt span {
  font-size: 11.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lec-dock-x {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border, #e3e7ec); background: transparent;
  color: var(--muted); cursor: pointer; font-size: 13px;
}

.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;
}

@media (max-width: 560px) {
  .lec-head h1 { font-size: 21px; }
  .lec-ctrl { padding: 12px; }
  .lec-play { width: 44px; height: 44px; }
  .lec-grow { flex: 1 1 100%; }
  .trow-m { flex: 0 0 40px; }
}
