/* BLUEXEE Student Learning Library — premium UI */
.lib-page {
  --lib-navy: #020331;
  --lib-navy-mid: #040633;
  --lib-yellow: #ffb000;
  --lib-yellow-light: #ffc400;
  --lib-sky: #3b82c4;
  --lib-border: #eef0f4;
  --lib-text: #1e293b;
  --lib-muted: #5c6b7f;
  --lib-bg: #f3f6fb;
  --lib-radius: 20px;
  --lib-card-shadow: 0 8px 30px rgba(2, 3, 49, 0.07);
  background: var(--lib-bg);
  min-height: 62vh;
  padding: 1.75rem 0 3.25rem;
}

.lib-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.lib-wrap--quiz {
  max-width: 1060px;
}

/* Breadcrumbs */
.lib-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  font-size: 0.8125rem;
  margin-bottom: 1.1rem;
}

.lib-breadcrumb a {
  color: var(--lib-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.lib-breadcrumb a:hover { color: var(--lib-navy); }
.lib-breadcrumb__sep { color: #c5ced9; }
.lib-breadcrumb__current { color: var(--lib-navy); font-weight: 700; }

.lib-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--lib-navy);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color 0.15s ease;
}

.lib-back-link:hover { color: var(--lib-sky); }

/* Cards base */
.lib-card {
  background: #fff;
  border: 1px solid var(--lib-border);
  border-radius: var(--lib-radius);
  box-shadow: var(--lib-card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Hero split */
.lib-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--lib-radius) + 2px);
  margin-bottom: 1.5rem;
  color: #fff;
  box-shadow: 0 16px 48px rgba(2, 3, 49, 0.22);
  background: linear-gradient(128deg, #020331 0%, #040633 42%, #0c1f5c 100%);
}

.lib-hero--split {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  padding: 0;
}

.lib-hero__blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(0);
}

.lib-hero__blob--1 {
  width: 280px;
  height: 280px;
  top: -120px;
  right: 18%;
  background: radial-gradient(circle, rgba(255, 196, 0, 0.22) 0%, transparent 68%);
}

.lib-hero__blob--2 {
  width: 160px;
  height: 160px;
  bottom: -60px;
  left: 8%;
  background: radial-gradient(circle, rgba(74, 159, 216, 0.2) 0%, transparent 70%);
}

.lib-hero__main {
  position: relative;
  z-index: 1;
  padding: 1.85rem 1.75rem 1.75rem;
}

.lib-hero__panel {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.35rem;
  background: rgba(255, 255, 255, 0.06);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
}

.lib-hero__path {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.55rem;
}

.lib-hero__title {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 0.55rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lib-hero__desc {
  margin: 0;
  opacity: 0.9;
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.92);
}

/* Ring progress */
.lib-ring {
  position: relative;
  width: var(--ring-size, 108px);
  height: var(--ring-size, 108px);
}

.lib-ring__svg { transform: rotate(-90deg); display: block; }

.lib-ring__track {
  stroke: rgba(255, 255, 255, 0.15);
}

.lib-ring__fill {
  stroke: url(#libRingGrad);
  stroke: var(--lib-yellow-light);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.lib-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.lib-ring__pct {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.lib-ring__sub {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
  margin-top: 0.15rem;
}

.lib-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
}

.lib-mini-stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.5rem 0.55rem;
  text-align: center;
}

.lib-mini-stat__val {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.1;
}

.lib-mini-stat__lbl {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  margin-top: 0.15rem;
}

/* Section head */
.lib-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.lib-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--lib-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.lib-section-title i { color: var(--lib-yellow); font-size: 1.05rem; }

.lib-section-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lib-muted);
  background: #fff;
  border: 1px solid var(--lib-border);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

/* Lesson list (level) */
.lib-lesson-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lib-lesson-card-v2 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.15rem;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: inherit;
}

.lib-lesson-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(2, 3, 49, 0.12);
  border-color: #dce4f0;
}

.lib-lesson-card-v2--active {
  border-color: rgba(59, 130, 196, 0.35);
  box-shadow: 0 10px 32px rgba(59, 130, 196, 0.1);
}

.lib-lesson-card-v2--done {
  border-color: rgba(34, 197, 94, 0.28);
}

.lib-lesson-card-v2__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(145deg, #f0f4fc 0%, #e4ebf8 100%);
  color: var(--lib-navy);
  border: 1px solid var(--lib-border);
}

.lib-lesson-card-v2--done .lib-lesson-card-v2__icon {
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
  color: #15803d;
}

.lib-lesson-card-v2__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.lib-lesson-card-v2__index {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-muted);
  display: block;
  margin-bottom: 0.15rem;
}

.lib-lesson-card-v2__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0;
  line-height: 1.25;
}

.lib-lesson-card-v2__desc {
  font-size: 0.875rem;
  color: var(--lib-muted);
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.lib-lesson-card-v2__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.lib-pct-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--lib-navy);
  background: rgba(2, 3, 49, 0.06);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  flex-shrink: 0;
}

.lib-lesson-card-v2__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--lib-navy);
  background: linear-gradient(135deg, var(--lib-yellow) 0%, var(--lib-yellow-light) 100%);
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 176, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lib-lesson-card-v2:hover .lib-lesson-card-v2__cta {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(255, 176, 0, 0.45);
}

/* Progress */
.lib-progress__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin-bottom: 0.35rem;
}

.lib-progress__bar {
  height: 7px;
  background: #e8edf4;
  border-radius: 999px;
  overflow: hidden;
}

.lib-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
  transition: width 0.45s ease;
}

.lib-progress__fill--partial {
  background: linear-gradient(90deg, var(--lib-navy) 0%, var(--lib-sky) 100%);
}

.lib-progress--sm {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 140px;
  max-width: 220px;
}

.lib-progress--sm .lib-progress__bar { flex: 1; }

.lib-progress__inline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--lib-muted);
  white-space: nowrap;
}

.lib-progress--lesson { max-width: 340px; }

/* Badges */
.lib-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.32rem 0.68rem;
}

.lib-badge--navy { background: rgba(2, 3, 49, 0.07); color: var(--lib-navy); }
.lib-badge--quiz { background: rgba(59, 130, 196, 0.12); color: #1a5f96; }
.lib-badge--conversation { background: rgba(255, 176, 0, 0.16); color: #8a5a00; }
.lib-badge--progress { background: rgba(59, 130, 196, 0.12); color: #1a5f96; }
.lib-badge--done-soft { background: rgba(34, 197, 94, 0.1); color: #166534; }
.lib-badge--muted { background: #f1f4f8; color: var(--lib-muted); }
.lib-badge--review { background: rgba(255, 176, 0, 0.15); color: #7a5200; }

/* Lesson detail hero */
.lib-lesson-hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1.5rem;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.75rem;
}

.lib-lesson-header__top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.lib-lesson-header__title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
}

.lib-lesson-header__desc {
  color: var(--lib-muted);
  margin: 0;
  line-height: 1.6;
  font-size: 0.95rem;
}

.lib-next-card {
  background: linear-gradient(160deg, #f8fafd 0%, #fff 100%);
  border: 1px solid var(--lib-border);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lib-next-card__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-muted);
  margin-bottom: 0.4rem;
}

.lib-next-card__title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--lib-navy);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.lib-next-card__hint {
  font-size: 0.82rem;
  color: var(--lib-muted);
  line-height: 1.45;
}

.lib-next-card__trophy {
  font-size: 1.75rem;
  color: var(--lib-yellow);
  margin-bottom: 0.5rem;
}

.lib-next-card--done .lib-next-card__trophy { color: #22c55e; }
.lib-next-card--muted { background: #fafbfd; }

/* Media */
.lib-media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.lib-media-card { padding: 1.2rem 1.3rem; }

.lib-media-card__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.lib-media-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.lib-media-card__icon--video { background: rgba(59, 130, 196, 0.12); color: #1a5f96; }
.lib-media-card__icon--audio { background: rgba(34, 197, 94, 0.1); color: #166534; }
.lib-media-card__icon--pdf { background: rgba(239, 68, 68, 0.1); color: #b91c1c; }

.lib-media-card__title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--lib-navy);
  margin: 0;
}

.lib-media-card video { width: 100%; border-radius: 12px; max-height: 400px; background: #000; }
.lib-media-card audio { width: 100%; }

.lib-pdf-frame {
  height: 460px;
  border: 1px solid var(--lib-border);
  border-radius: 12px;
  overflow: hidden;
}

.lib-pdf-frame iframe { width: 100%; height: 100%; border: 0; }

/* Timeline */
.lib-timeline { margin-bottom: 2rem; }

.lib-timeline__item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 1.65rem;
}

.lib-timeline__item:last-child { padding-bottom: 0; }

.lib-timeline__item::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #c5d0e2 0%, rgba(197, 208, 226, 0.2) 100%);
  border-radius: 999px;
}

.lib-timeline__item:last-child::before { display: none; }

.lib-timeline__dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lib-navy) 0%, var(--lib-navy-mid) 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(2, 3, 49, 0.25);
  border: 3px solid #fff;
}

.lib-timeline__chapter-title {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--lib-navy);
  margin: 0 0 0.2rem;
}

.lib-timeline__chapter-desc {
  font-size: 0.875rem;
  color: var(--lib-muted);
  margin: 0 0 0.35rem;
  line-height: 1.45;
}

.lib-timeline__summary {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin: 0 0 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lib-exercise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

/* Exercise card */
.lib-exercise-card {
  padding: 1.15rem 1.2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lib-exercise-card--done {
  border-color: rgba(34, 197, 94, 0.22);
  background: linear-gradient(180deg, #fff 0%, #fafffe 100%);
}

.lib-exercise-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.lib-exercise-card__title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--lib-navy);
  line-height: 1.3;
}

.lib-exercise-card__hint {
  font-size: 0.8rem;
  color: var(--lib-muted);
  margin: 0;
  line-height: 1.45;
}

.lib-exercise-card__check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Buttons */
.lib-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 800;
  font-size: 0.875rem;
  border-radius: 12px;
  padding: 0.58rem 1.15rem;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lib-btn--primary {
  background: linear-gradient(135deg, var(--lib-yellow) 0%, var(--lib-yellow-light) 100%);
  color: var(--lib-navy);
  box-shadow: 0 4px 16px rgba(255, 176, 0, 0.38);
}

.lib-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 176, 0, 0.45);
  color: var(--lib-navy);
}

.lib-btn--hero {
  background: linear-gradient(135deg, var(--lib-yellow) 0%, var(--lib-yellow-light) 100%);
  color: var(--lib-navy);
  box-shadow: 0 6px 20px rgba(255, 176, 0, 0.4);
}

.lib-btn--hero:hover {
  transform: translateY(-2px);
  color: var(--lib-navy);
}

.lib-btn--outline {
  background: #fff;
  color: var(--lib-navy);
  border: 2px solid var(--lib-navy);
}

.lib-btn--outline:hover {
  background: rgba(2, 3, 49, 0.04);
  color: var(--lib-navy);
}

.lib-btn--review {
  background: #fff;
  color: var(--lib-navy);
  border: 2px solid var(--lib-border);
}

.lib-btn--review:hover {
  border-color: var(--lib-navy);
  color: var(--lib-navy);
}

.lib-btn--block { width: 100%; }
.lib-btn--lg { padding: 0.75rem 1.4rem; font-size: 1rem; }
.lib-btn--sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

/* Empty states */
.lib-empty--rich {
  text-align: center;
  padding: 2.25rem 1.75rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafd 100%);
  border: 1px solid var(--lib-border);
  border-radius: var(--lib-radius);
}

.lib-empty__icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(2, 3, 49, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  color: var(--lib-muted);
}

.lib-empty__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.4rem;
}

.lib-empty__text {
  font-size: 0.9rem;
  color: var(--lib-muted);
  margin: 0;
  max-width: 40ch;
  margin-inline: auto;
  line-height: 1.5;
}

.lib-empty--compact {
  padding: 1.25rem;
  background: #f8fafd;
  border-radius: 14px;
  border: 1px dashed #d5dde8;
  text-align: center;
  color: var(--lib-muted);
}

.lib-empty--compact i { font-size: 1.35rem; opacity: 0.5; display: block; margin-bottom: 0.35rem; }

.lib-alert-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.04) 100%);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 14px;
  color: #166534;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.15rem;
  font-weight: 700;
}

/* Quiz layout */
.lib-quiz-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.lib-quiz-sidebar {
  padding: 1.25rem 1.3rem;
  position: sticky;
  top: 1rem;
}

.lib-quiz-sidebar__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.lib-quiz-sidebar__stats { margin: 0 0 1rem; }

.lib-quiz-sidebar__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f0f3f8;
  font-size: 0.82rem;
}

.lib-quiz-sidebar__row:last-child { border-bottom: 0; }

.lib-quiz-sidebar__row span:first-child {
  font-weight: 600;
  color: var(--lib-muted);
}

.lib-quiz-sidebar__row span:last-child {
  font-weight: 800;
  color: var(--lib-navy);
}

.lib-quiz-sidebar__score { color: #15803d !important; }

.lib-quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lib-quiz-progress--sidebar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.lib-quiz-progress__bar {
  flex: 1;
  height: 8px;
  background: #e8edf4;
  border-radius: 999px;
  overflow: hidden;
}

.lib-quiz-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lib-navy) 0%, var(--lib-yellow) 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s ease;
}

.lib-quiz-progress__text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lib-muted);
}

/* Result compact */
.lib-result-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.15rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
  border-color: rgba(34, 197, 94, 0.25);
}

.lib-result-compact__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.lib-result-compact__score {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--lib-navy);
  line-height: 1;
}

.lib-result-compact__score small {
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.7;
}

.lib-quiz-header__title {
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.35rem;
}

.lib-quiz-header__desc {
  color: var(--lib-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* Questions */
.lib-question-card {
  padding: 1.4rem 1.45rem;
  margin-bottom: 0.85rem;
}

.lib-question-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lib-question-card__num {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: var(--lib-navy);
  border-radius: 8px;
  padding: 0.28rem 0.55rem;
}

.lib-question-card__text {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--lib-navy);
  line-height: 1.5;
  margin: 0 0 1.15rem;
  letter-spacing: -0.01em;
}

.lib-question-card__media {
  max-height: 220px;
  border-radius: 12px;
}

.lib-question-media {
  border-radius: 14px;
  overflow: hidden;
  background: #0b1028;
  box-shadow: 0 8px 28px rgba(2, 3, 49, 0.12);
}

.lib-question-media__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, rgba(2, 3, 49, 0.95), rgba(26, 95, 150, 0.88));
}

.lib-question-media__label i {
  font-size: 1rem;
  color: var(--lib-yellow, #f5c518);
}

.lib-question-media__image {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #f8fafd;
}

.lib-question-media__audio,
.lib-question-media__video {
  display: block;
  width: 100%;
}

.lib-question-media__audio {
  padding: 0.75rem;
  background: #f8fafd;
}

.lib-question-media__video {
  max-height: 360px;
  background: #000;
  object-fit: contain;
}

.lib-question-media--image {
  background: #f8fafd;
  box-shadow: none;
  border: 1px solid var(--lib-border);
}

.lib-question-card__media-missing {
  padding: 2rem 1rem;
  text-align: center;
  border: 2px dashed var(--lib-border);
  border-radius: 12px;
  color: var(--lib-muted);
  background: #f8fafd;
}

.lib-question-card__media-missing i {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
  color: var(--lib-sky);
}

.lib-option {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.95rem 1.05rem;
  border: 2px solid var(--lib-border);
  border-radius: 14px;
  margin-bottom: 0.65rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.lib-option:hover {
  border-color: #cdd6e4;
  background: #fafbfd;
}

.lib-option input {
  margin-top: 0.25rem;
  accent-color: var(--lib-navy);
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
}

.lib-option--selected {
  border-color: var(--lib-yellow);
  background: rgba(255, 176, 0, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 176, 0, 0.22);
}

.lib-option--correct,
.lib-option--correct-key {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.06);
}

.lib-option--wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.lib-page--review .lib-option--correct-key {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.05);
}

.lib-option--readonly {
  cursor: default;
  pointer-events: none;
}

.lib-option--readonly:hover {
  background: inherit;
}

.lib-option__user-mark {
  flex-shrink: 0;
  width: 1.25rem;
  font-weight: 800;
  font-size: 1rem;
  color: var(--lib-navy);
  line-height: 1;
  margin-top: 0.15rem;
}

.lib-option__user-mark--empty {
  visibility: hidden;
}

.lib-option__radio-faux {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid #c5ced9;
  border-radius: 50%;
  margin-top: 0.2rem;
}

.lib-option__radio-faux--checked {
  border-color: var(--lib-navy);
  box-shadow: inset 0 0 0 3px var(--lib-navy);
}

.lib-option--wrong .lib-option__radio-faux--checked {
  border-color: #ef4444;
  box-shadow: inset 0 0 0 3px #ef4444;
}

.lib-option--correct .lib-option__radio-faux--checked {
  border-color: #22c55e;
  box-shadow: inset 0 0 0 3px #22c55e;
}

.lib-option__verdict {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.lib-option__verdict--up {
  color: #22c55e;
}

.lib-option__verdict--down {
  color: #ef4444;
}

.lib-options-stack--results .lib-option {
  align-items: center;
}

.lib-quiz-steps--results .lib-quiz-step {
  display: block;
  margin-bottom: 1.15rem;
}

.lib-quiz-steps--results .lib-quiz-step--results:last-child {
  margin-bottom: 0;
}

.lib-question-card--result .lib-question-card__head {
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lib-question-card__verdict {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.lib-question-card__verdict--correct {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.lib-question-card__verdict--wrong {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

.lib-answer-result {
  border: 1px solid var(--lib-border);
  border-radius: 14px;
  overflow: hidden;
}

.lib-answer-result__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--lib-border);
}

.lib-answer-result__row:last-child {
  border-bottom: 0;
}

.lib-answer-result__row--key {
  background: rgba(34, 197, 94, 0.06);
}

.lib-answer-result__label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lib-muted);
  min-width: 6.5rem;
}

.lib-answer-result__value {
  flex: 1;
  font-weight: 700;
  color: var(--lib-navy);
}

.lib-answer-result__value--block {
  white-space: pre-wrap;
  line-height: 1.5;
}

.lib-answer-result__value--correct {
  color: #166534;
}

.lib-quiz-retry-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border-color: rgba(255, 176, 0, 0.35);
}

.lib-quiz-retry-banner i {
  font-size: 1.35rem;
  color: var(--lib-yellow);
  margin-top: 0.1rem;
}

.lib-quiz-nav--results {
  justify-content: flex-start;
}

.lib-option__label {
  font-size: 0.98rem;
  color: var(--lib-text);
  line-height: 1.5;
  cursor: pointer;
  margin: 0;
}

.lib-option__letter {
  font-weight: 800;
  color: var(--lib-navy);
  margin-right: 0.35rem;
}

.lib-input-text,
.lib-input-textarea {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  border: 2px solid var(--lib-border);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lib-input-text:focus,
.lib-input-textarea:focus {
  outline: none;
  border-color: var(--lib-navy);
  box-shadow: 0 0 0 3px rgba(2, 3, 49, 0.08);
}

.lib-answer-key { color: #166534; }

.lib-quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.lib-quiz-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 30;
  background: linear-gradient(180deg, transparent 0%, rgba(243, 246, 251, 0.94) 20%, var(--lib-bg) 100%);
  padding: 1.1rem 0 0.65rem;
  margin-top: 0.5rem;
}

/* Chat */
.lib-chat {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.lib-chat__row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
}

.lib-chat__row--student { flex-direction: row-reverse; }

.lib-chat__avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
}

.lib-chat__avatar--tutor { background: linear-gradient(135deg, var(--lib-navy) 0%, var(--lib-navy-mid) 100%); }
.lib-chat__avatar--student { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }

.lib-chat__bubble {
  max-width: 82%;
  padding: 0.9rem 1.05rem;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.lib-chat__bubble--tutor {
  background: #fff;
  border: 1px solid var(--lib-border);
  border-bottom-left-radius: 4px;
  color: var(--lib-text);
}

.lib-chat__bubble--student {
  background: linear-gradient(135deg, var(--lib-navy) 0%, var(--lib-navy-mid) 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.lib-chat__speaker {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  opacity: 0.75;
}

.lib-chat__sample {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  opacity: 0.88;
  font-style: italic;
}

/* Responsive */
@media (max-width: 991.98px) {
  .lib-hero--split {
    grid-template-columns: 1fr;
  }

  .lib-hero__panel {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.25rem;
  }

  .lib-mini-stats { max-width: 320px; }

  .lib-lesson-hero {
    grid-template-columns: 1fr;
  }

  .lib-quiz-layout {
    grid-template-columns: 1fr;
  }

  .lib-quiz-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 767.98px) {
  .lib-page { padding: 1.15rem 0 2.75rem; }

  .lib-hero__main { padding: 1.35rem 1.15rem; }

  .lib-lesson-card-v2 {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .lib-lesson-card-v2__cta {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  .lib-exercise-grid { grid-template-columns: 1fr; }

  .lib-quiz-actions {
    flex-direction: column;
  }

  .lib-quiz-actions .lib-btn--lg {
    width: 100%;
  }

  .lib-pdf-frame { height: 300px; }

  .lib-result-compact {
    flex-direction: column;
    align-items: flex-start;
  }

  .lib-result-compact .lib-btn {
    width: 100%;
  }
}

@media (min-width: 1200px) {
  .lib-wrap {
    max-width: 1120px;
  }
}

/* ============================================================
   Learning platform — gamification, momentum, missions, quiz
   ============================================================ */

.lib-page--learn {
  animation: libFadeIn 0.35s ease;
}

@keyframes libFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero learn (3-column) */
.lib-hero-learn {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--lib-radius) + 4px);
  margin-bottom: 1.35rem;
  color: #fff;
  box-shadow: 0 20px 56px rgba(2, 3, 49, 0.24);
  background: linear-gradient(132deg, #020331 0%, #050842 38%, #0d1f5e 100%);
}

.lib-hero-learn__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 80% at 8% 50%, rgba(255, 196, 0, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 45% 60% at 92% 20%, rgba(59, 130, 196, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 30% 40% at 70% 90%, rgba(255, 176, 0, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.lib-hero-learn__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr auto 220px;
  gap: 1.5rem 1.75rem;
  align-items: center;
  padding: 1.85rem 1.75rem;
}

.lib-hero-learn__path {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.82;
  margin-bottom: 0.5rem;
}

.lib-hero-learn__title {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lib-hero-learn__desc {
  margin: 0 0 1.15rem;
  font-size: 0.94rem;
  line-height: 1.55;
  opacity: 0.9;
  max-width: 44ch;
}

.lib-hero-learn__center {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lib-momentum-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  min-width: 168px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.lib-momentum-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.lib-momentum-card__icon {
  font-size: 1.45rem;
  line-height: 1;
}

.lib-momentum-card__icon--fire {
  animation: libFirePulse 2s ease-in-out infinite;
}

@keyframes libFirePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.lib-momentum-card__val {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.lib-momentum-card__lbl {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.78;
}

.lib-hero-learn__right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.lib-hero-learn .lib-ring__pct,
.lib-hero-learn .lib-ring__sub {
  color: #fff;
}

.lib-hero-learn .lib-ring__fill {
  stroke: var(--lib-yellow-light);
  filter: drop-shadow(0 0 6px rgba(255, 196, 0, 0.45));
}

.lib-achievement-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.lib-achievement-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
}

.lib-achievement-chip i {
  color: var(--lib-yellow-light);
  font-size: 0.78rem;
}

.lib-achievement-chip--gold {
  background: rgba(255, 176, 0, 0.15);
  border-color: rgba(255, 196, 0, 0.35);
  color: #7a5200;
}

.lib-achievement-chip--gold i { color: var(--lib-yellow); }

.lib-hub-header__chips .lib-achievement-chip {
  background: rgba(2, 3, 49, 0.05);
  border-color: var(--lib-border);
  color: var(--lib-navy);
}

.lib-hub-header__chips .lib-achievement-chip i { color: var(--lib-sky); }

/* Pulse CTA */
.lib-btn--pulse {
  animation: libBtnPulse 2.4s ease-in-out infinite;
}

@keyframes libBtnPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(255, 176, 0, 0.38); }
  50% { box-shadow: 0 6px 28px rgba(255, 176, 0, 0.55); }
}

.lib-btn--ghost {
  background: transparent;
  color: var(--lib-navy);
  border: 2px solid transparent;
}

.lib-btn--ghost:hover {
  background: rgba(2, 3, 49, 0.04);
  color: var(--lib-navy);
}

/* Continue where you left off */
.lib-continue-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.75rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  border-color: rgba(59, 130, 196, 0.28);
  background: linear-gradient(135deg, #fff 0%, #f6f9ff 100%);
}

.lib-continue-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(59, 130, 196, 0.14);
  border-color: rgba(59, 130, 196, 0.4);
}

.lib-continue-card__glow {
  position: absolute;
  top: -40%;
  right: -5%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 176, 0, 0.12) 0%, transparent 68%);
  pointer-events: none;
}

.lib-continue-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: linear-gradient(145deg, var(--lib-navy) 0%, #0c1f5c 100%);
  color: var(--lib-yellow-light);
  box-shadow: 0 6px 18px rgba(2, 3, 49, 0.22);
}

.lib-continue-card__eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-sky);
  margin-bottom: 0.2rem;
}

.lib-continue-card__title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.35rem;
}

.lib-continue-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lib-muted);
}

.lib-continue-card__cta {
  flex-shrink: 0;
  pointer-events: none;
}

/* Lesson path cards */
.lib-lesson-path {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.lib-path-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.15rem;
  padding: 1.15rem 1.3rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.lib-path-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(2, 3, 49, 0.11);
}

.lib-path-card--next {
  border-color: rgba(255, 176, 0, 0.45);
  box-shadow: 0 8px 28px rgba(255, 176, 0, 0.12);
}

.lib-path-card--active {
  border-color: rgba(59, 130, 196, 0.35);
}

.lib-path-card--done {
  border-color: rgba(34, 197, 94, 0.3);
}

.lib-path-card--done .lib-path-card__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 100% at 0% 50%, rgba(34, 197, 94, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.lib-path-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: linear-gradient(145deg, #f0f4fc 0%, #e4ebf8 100%);
  color: var(--lib-navy);
  border: 1px solid var(--lib-border);
  transition: transform 0.2s ease;
}

.lib-path-card:hover .lib-path-card__icon { transform: scale(1.05); }

.lib-path-card--done .lib-path-card__icon {
  background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.lib-path-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.2rem;
}

.lib-path-card__step {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lib-muted);
}

.lib-path-card__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.25rem;
  line-height: 1.25;
}

.lib-path-card__desc {
  font-size: 0.85rem;
  color: var(--lib-muted);
  margin: 0 0 0.55rem;
  line-height: 1.45;
}

.lib-path-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lib-muted);
  margin-bottom: 0.45rem;
}

.lib-path-card__pct {
  font-weight: 800;
  color: var(--lib-navy);
}

.lib-path-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--lib-navy);
  background: linear-gradient(135deg, var(--lib-yellow) 0%, var(--lib-yellow-light) 100%);
  border-radius: 12px;
  padding: 0.55rem 0.95rem;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 176, 0, 0.32);
  transition: transform 0.15s ease;
}

.lib-path-card:hover .lib-path-card__action { transform: scale(1.04); }

.lib-badge--next {
  background: rgba(255, 176, 0, 0.2);
  color: #7a5200;
}

/* Status pills */
.lib-status-pill {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  margin-left: auto;
}

.lib-status-pill--completed {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.lib-status-pill--in-progress {
  background: rgba(59, 130, 196, 0.12);
  color: #1a5f96;
}

.lib-status-pill--not-started {
  background: #f1f4f8;
  color: var(--lib-muted);
}

.lib-progress__bar--thin {
  height: 5px;
}

/* Lesson hub header */
.lib-hub-header {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.75rem;
  background: linear-gradient(160deg, #fff 0%, #f8fafd 100%);
}

.lib-hub-header__title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.lib-hub-header__desc {
  color: var(--lib-muted);
  margin: 0 0 0.65rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.lib-hub-header__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Next mission card */
.lib-next-mission {
  background: linear-gradient(165deg, #f0f5ff 0%, #fff 55%);
  border: 1px solid rgba(59, 130, 196, 0.2);
  border-radius: 16px;
  padding: 1.2rem 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lib-next-mission__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-sky);
  margin-bottom: 0.45rem;
}

.lib-next-mission__label i { color: var(--lib-yellow); }

.lib-next-mission__title {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--lib-navy);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.lib-next-mission__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lib-muted);
  margin-bottom: 0.85rem;
}

.lib-next-mission__hint {
  font-size: 0.82rem;
  color: var(--lib-muted);
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.lib-next-mission__trophy {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.lib-next-mission--done {
  background: linear-gradient(165deg, #f0fdf4 0%, #fff 55%);
  border-color: rgba(34, 197, 94, 0.25);
}

.lib-next-mission--muted {
  background: #fafbfd;
  border-color: var(--lib-border);
}

/* Difficulty badges */
.lib-difficulty {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
}

.lib-difficulty--easy {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.lib-difficulty--medium {
  background: rgba(255, 176, 0, 0.15);
  color: #7a5200;
}

.lib-difficulty--hard {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

/* Mission exercise cards */
.lib-mission-card {
  padding: 1.15rem 1.2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lib-mission-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(2, 3, 49, 0.1);
}

.lib-mission-card--done {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(180deg, #fff 0%, #f6fdf9 100%);
}

.lib-mission-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.lib-mission-card__title {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--lib-navy);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.lib-mission-card__hint {
  font-size: 0.8rem;
  color: var(--lib-muted);
  margin: 0 0 0.55rem;
  line-height: 1.45;
}

.lib-mission-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lib-muted);
  margin-bottom: 0.35rem;
}

.lib-mission-card__done {
  color: #15803d;
  font-weight: 800;
}

/* Chapter accordions */
.lib-chapter-accordions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.lib-chapter-acc {
  overflow: hidden;
}

.lib-chapter-acc__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease;
}

.lib-chapter-acc__head::-webkit-details-marker { display: none; }

.lib-chapter-acc__head:hover {
  background: rgba(2, 3, 49, 0.02);
}

.lib-chapter-acc[open] .lib-chapter-acc__chev {
  transform: rotate(180deg);
}

.lib-chapter-acc__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lib-navy) 0%, var(--lib-navy-mid) 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 3, 49, 0.2);
}

.lib-chapter-acc__title {
  display: block;
  font-weight: 800;
  font-size: 1rem;
  color: var(--lib-navy);
  margin-bottom: 0.2rem;
}

.lib-chapter-acc__summary {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lib-muted);
  margin-bottom: 0.45rem;
}

.lib-chapter-acc__chev {
  font-size: 1.1rem;
  color: var(--lib-muted);
  transition: transform 0.25s ease;
}

.lib-chapter-acc__body {
  padding: 0 1.25rem 1.25rem;
  animation: libAccOpen 0.3s ease;
}

@keyframes libAccOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.lib-chapter-acc__desc {
  font-size: 0.875rem;
  color: var(--lib-muted);
  margin: 0 0 0.85rem;
  line-height: 1.5;
}

/* Celebration */
.lib-celebrate {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.5rem;
  border-color: rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 48%, #fffbeb 100%);
}

.lib-celebrate--compact {
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.15rem;
}

.lib-celebrate__confetti {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(255, 176, 0, 0.15) 0%, transparent 35%),
    radial-gradient(circle at 85% 20%, rgba(34, 197, 94, 0.12) 0%, transparent 30%),
    radial-gradient(circle at 70% 80%, rgba(59, 130, 196, 0.1) 0%, transparent 35%);
  pointer-events: none;
}

.lib-celebrate__main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.lib-celebrate__emoji {
  font-size: 2.5rem;
  line-height: 1;
  animation: libCelebratePop 0.5s ease;
}

@keyframes libCelebratePop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.lib-celebrate__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.25rem;
}

.lib-celebrate__score {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--lib-navy);
  line-height: 1;
}

.lib-celebrate__score span {
  font-size: 1.1rem;
  opacity: 0.65;
}

.lib-celebrate__sub {
  font-size: 0.9rem;
  color: var(--lib-muted);
  margin: 0.35rem 0 0;
}

.lib-celebrate__rewards {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.lib-celebrate__rewards .lib-achievement-chip {
  background: rgba(2, 3, 49, 0.05);
  border-color: var(--lib-border);
  color: var(--lib-navy);
}

.lib-celebrate__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Learn empty states */
.lib-empty--learn {
  text-align: center;
  padding: 2rem 1.75rem;
  margin-bottom: 1.75rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafd 100%);
  border: 1px dashed #d5dde8;
  border-radius: var(--lib-radius);
}

.lib-empty__visual {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.lib-empty--inline {
  padding: 1.35rem 1.25rem;
  margin-bottom: 0;
}

/* Stepped quiz shell */
.lib-quiz-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.lib-quiz-main {
  min-width: 0;
}

.lib-quiz-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1rem;
  background: linear-gradient(160deg, #fff 0%, #f8fafd 100%);
}

.lib-quiz-topbar__eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-sky);
  margin-bottom: 0.25rem;
}

.lib-quiz-topbar__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0;
  line-height: 1.25;
}

.lib-quiz-topbar__progress {
  min-width: 200px;
  flex: 1;
  max-width: 280px;
}

.lib-quiz-topbar__counter {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin-bottom: 0.35rem;
  text-align: right;
}

.lib-quiz-sidebar__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lib-quiz-sidebar__hint {
  line-height: 1.5;
}

.lib-quiz-steps {
  position: relative;
}

.lib-quiz-step {
  display: none;
  animation: libFadeIn 0.3s ease;
}

.lib-quiz-step--active {
  display: block;
}

.lib-quiz-step--invalid .lib-question-card {
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.45), 0 12px 40px rgba(2, 3, 49, 0.08);
}

.lib-question-card--hero {
  padding: 1.65rem 1.7rem;
  margin-bottom: 0;
  box-shadow: 0 12px 40px rgba(2, 3, 49, 0.08);
}

.lib-question-card--hero .lib-question-card__text {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.lib-options-stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.lib-quiz-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

/* Learn platform responsive */
@media (max-width: 991.98px) {
  .lib-hero-learn__grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .lib-hero-learn__center {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .lib-hero-learn__right {
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .lib-achievement-row {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
  }

  .lib-hub-header {
    grid-template-columns: 1fr;
  }

  .lib-quiz-shell {
    grid-template-columns: 1fr;
  }

  .lib-quiz-sidebar {
    position: static;
    order: -1;
  }

  .lib-continue-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .lib-continue-card__cta {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .lib-path-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .lib-path-card__action {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  .lib-celebrate__main {
    flex-direction: column;
    text-align: center;
  }

  .lib-celebrate__actions {
    flex-direction: column;
  }

  .lib-celebrate__actions .lib-btn {
    width: 100%;
  }

  .lib-quiz-topbar__progress {
    max-width: 100%;
    width: 100%;
  }

  .lib-quiz-nav {
    flex-direction: column;
  }

  .lib-quiz-nav .lib-btn--lg {
    width: 100%;
  }

  .lib-hero-journey__grid {
    grid-template-columns: 1fr;
  }

  .lib-hero-journey__visual {
    min-height: 120px;
  }

  .lib-version-grid {
    grid-template-columns: 1fr;
  }

  .lib-category-grid {
    grid-template-columns: 1fr;
  }

  .lib-learning-path__track {
    flex-wrap: wrap;
    justify-content: center;
  }

  .lib-learning-path__connector {
    display: none;
  }
}

/* ============================================================
   Topic & version hub pages
   ============================================================ */

/* Journey hero (topic page) */
.lib-hero-journey {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--lib-radius) + 4px);
  margin-bottom: 1.5rem;
  color: #fff;
  box-shadow: 0 20px 56px rgba(2, 3, 49, 0.24);
  background: linear-gradient(132deg, #020331 0%, #050842 38%, #0d1f5e 100%);
}

.lib-hero-journey__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 90% 30%, rgba(255, 196, 0, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 10% 80%, rgba(59, 130, 196, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.lib-hero-journey__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  align-items: center;
  padding: 1.85rem 1.75rem;
}

.lib-hero-journey__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.82;
  margin-bottom: 0.45rem;
}

.lib-hero-journey__title {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 0.55rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lib-hero-journey__desc {
  margin: 0 0 1.15rem;
  font-size: 0.94rem;
  line-height: 1.55;
  opacity: 0.9;
  max-width: 50ch;
}

.lib-hero-journey__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.lib-stat-tile {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  min-width: 108px;
  backdrop-filter: blur(8px);
}

.lib-stat-tile--accent {
  background: rgba(255, 176, 0, 0.14);
  border-color: rgba(255, 196, 0, 0.3);
}

.lib-stat-tile__val {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
}

.lib-stat-tile__lbl {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.78;
  margin-top: 0.15rem;
}

.lib-hero-journey__visual {
  position: relative;
  min-height: 180px;
}

.lib-hero-journey__emoji {
  position: absolute;
  font-size: 2.25rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  animation: libFloatEmoji 4s ease-in-out infinite;
}

.lib-hero-journey__emoji--1 { top: 8%; left: 12%; animation-delay: 0s; }
.lib-hero-journey__emoji--2 { top: 18%; right: 8%; animation-delay: 0.6s; font-size: 2rem; }
.lib-hero-journey__emoji--3 { bottom: 22%; left: 28%; animation-delay: 1.2s; }
.lib-hero-journey__emoji--4 { bottom: 10%; right: 18%; animation-delay: 1.8s; font-size: 2.5rem; }

@keyframes libFloatEmoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Version cards (topic page) */
.lib-version-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.lib-version-card {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.3rem;
  text-decoration: none;
  color: inherit;
  gap: 0.55rem;
}

.lib-version-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(2, 3, 49, 0.12);
  border-color: rgba(255, 176, 0, 0.35);
}

.lib-version-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.lib-version-card__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lib-version-card__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lib-version-card__desc {
  font-size: 0.85rem;
  color: var(--lib-muted);
  margin: 0;
  line-height: 1.45;
}

.lib-version-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lib-muted);
}

.lib-version-card__progress {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lib-version-card__progress .lib-progress__bar {
  flex: 1;
}

.lib-version-card__pct {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--lib-navy);
  white-space: nowrap;
}

.lib-version-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin-top: 0.15rem;
}

.lib-version-card:hover .lib-version-card__cta {
  color: var(--lib-sky);
}

.lib-version-card .lib-ring__track { stroke: #e8edf4; }
.lib-version-card .lib-ring__pct,
.lib-version-card .lib-ring__sub { color: var(--lib-navy); }
.lib-version-card .lib-ring__sub { opacity: 0.55; }

/* CEFR difficulty labels */
.lib-difficulty--beginner { background: rgba(34, 197, 94, 0.12); color: #166534; }
.lib-difficulty--elementary { background: rgba(59, 130, 196, 0.12); color: #1a5f96; }
.lib-difficulty--intermediate { background: rgba(255, 176, 0, 0.15); color: #7a5200; }
.lib-difficulty--upper-intermediate { background: rgba(249, 115, 22, 0.12); color: #c2410c; }
.lib-difficulty--advanced { background: rgba(139, 92, 246, 0.12); color: #6d28d9; }
.lib-difficulty--proficient { background: rgba(2, 3, 49, 0.08); color: var(--lib-navy); }
.lib-difficulty--all-levels { background: #f1f4f8; color: var(--lib-muted); }

/* Learning path roadmap */
.lib-learning-path {
  padding: 1.35rem 1.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(160deg, #fff 0%, #f8fafd 100%);
}

.lib-learning-path__head {
  margin-bottom: 1.15rem;
}

.lib-learning-path__hint {
  font-size: 0.85rem;
  color: var(--lib-muted);
  margin-top: 0.25rem;
}

.lib-learning-path__track {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 0.5rem 0 0.25rem;
  scrollbar-width: thin;
}

.lib-learning-path__connector {
  flex: 1;
  min-width: 24px;
  max-width: 48px;
  height: 3px;
  background: #dce4f0;
  border-radius: 999px;
}

.lib-learning-path__connector--done {
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

.lib-learning-path__node {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  padding: 0 0.65rem;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--lib-muted);
  background: #f1f4f8;
  border: 2px solid #e8edf4;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lib-learning-path__node:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 3, 49, 0.1);
}

.lib-learning-path__node--completed {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.lib-learning-path__node--current {
  background: linear-gradient(135deg, var(--lib-yellow) 0%, var(--lib-yellow-light) 100%);
  border-color: transparent;
  color: var(--lib-navy);
  box-shadow: 0 6px 20px rgba(255, 176, 0, 0.4);
  transform: scale(1.06);
}

.lib-learning-path__node--upcoming,
.lib-learning-path__node--available {
  opacity: 0.75;
}

/* Version page hero variant */
.lib-hero-learn--version {
  margin-bottom: 1.35rem;
}

.lib-hero-learn__grid--version {
  grid-template-columns: 1.1fr auto 200px;
}

.lib-badge--version-level {
  display: inline-flex;
  margin-bottom: 0.65rem;
  background: rgba(255, 176, 0, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 196, 0, 0.35);
}

.lib-momentum-card--compact {
  min-width: auto;
  width: 100%;
  padding: 0.6rem 0.85rem;
}

/* Category grid (version page — all 8 visible) */
.lib-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.lib-category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  min-height: 220px;
}

.lib-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(2, 3, 49, 0.11);
}

.lib-category-card--completed:hover {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 16px 40px rgba(34, 197, 94, 0.12);
}

.lib-category-card--in-progress:hover {
  border-color: rgba(255, 176, 0, 0.45);
  box-shadow: 0 16px 40px rgba(255, 176, 0, 0.12);
}

.lib-category-card__indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #dce4f0;
}

.lib-category-card--completed .lib-category-card__indicator {
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

.lib-category-card--in-progress .lib-category-card__indicator {
  background: linear-gradient(90deg, var(--lib-yellow) 0%, var(--lib-yellow-light) 100%);
}

.lib-category-card--not-started .lib-category-card__indicator {
  background: #dce4f0;
}

.lib-category-card__icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  background: linear-gradient(145deg, #f0f4fc 0%, #e4ebf8 100%);
  border: 1px solid var(--lib-border);
  font-size: 1.2rem;
  color: var(--lib-navy);
}

.lib-category-card__emoji {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 1rem;
  line-height: 1;
}

.lib-category-card--completed .lib-category-card__icon {
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
  color: #15803d;
}

.lib-category-card--in-progress .lib-category-card__icon {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  color: #b45309;
}

.lib-category-card__title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.3rem;
  line-height: 1.25;
}

.lib-category-card__desc {
  font-size: 0.78rem;
  color: var(--lib-muted);
  margin: 0 0 0.5rem;
  line-height: 1.4;
  flex: 1;
}

.lib-category-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lib-muted);
  margin-bottom: 0.4rem;
}

.lib-category-card__pct {
  font-weight: 800;
  color: var(--lib-navy);
}

.lib-category-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.lib-category-card__footer .lib-status-pill {
  margin-left: 0;
}

.lib-category-card__cta {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--lib-navy);
  white-space: nowrap;
}

.lib-category-card:hover .lib-category-card__cta {
  color: var(--lib-sky);
}

.lib-continue-card__emoji {
  font-size: 1.5rem;
  line-height: 1;
}

/* Achievements */
.lib-achievements {
  padding: 1.35rem 1.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(160deg, #fff 0%, #f8fafd 100%);
}

.lib-achievements__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.lib-achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--lib-border);
  background: #fff;
  transition: transform 0.2s ease;
}

.lib-achievement-badge--earned {
  border-color: rgba(255, 176, 0, 0.35);
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  box-shadow: 0 4px 16px rgba(255, 176, 0, 0.12);
}

.lib-achievement-badge--locked {
  opacity: 0.65;
  filter: grayscale(0.35);
}

.lib-achievement-badge__emoji {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
  line-height: 1;
}

.lib-achievement-badge__title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.lib-achievement-badge__status {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--lib-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lib-achievement-badge--earned .lib-achievement-badge__status {
  color: #7a5200;
}

@media (max-width: 991.98px) {
  .lib-hero-journey__grid {
    grid-template-columns: 1fr;
  }

  .lib-hero-learn__grid--version {
    grid-template-columns: 1fr;
  }

  .lib-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lib-version-grid {
    grid-template-columns: 1fr;
  }

  .lib-achievements__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .lib-category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   Editorial layout (British Council–style learning journey)
   ============================================================ */

.lib-wrap--wide {
  max-width: 1140px;
}

.lib-page--editorial {
  background: #fff;
}

.lib-layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1.75rem;
  align-items: start;
}

.lib-layout-with-sidebar--skill {
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: 2rem;
}

.lib-layout-with-sidebar__main {
  min-width: 0;
}

/* Editorial hero */
.lib-editorial-hero {
  position: relative;
  margin-bottom: 1.5rem;
  min-height: 220px;
}

.lib-editorial-hero__visual {
  border-radius: calc(var(--lib-radius) + 2px);
  overflow: hidden;
  height: 240px;
  background: linear-gradient(135deg, var(--lib-navy) 0%, #0c1f5c 100%);
}

.lib-editorial-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-editorial-hero__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #020331 0%, #1a3a7a 50%, #ffb00033 100%);
}

.lib-editorial-hero__card {
  position: relative;
  margin-top: -4.5rem;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
  max-width: 520px;
  background: var(--lib-navy);
  color: #fff;
  padding: 1.5rem 1.6rem;
  border-radius: var(--lib-radius);
  box-shadow: 0 16px 48px rgba(2, 3, 49, 0.28);
}

.lib-editorial-hero__title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.lib-editorial-hero__desc {
  margin: 0 0 0.85rem;
  opacity: 0.92;
  line-height: 1.55;
  font-size: 0.94rem;
}

.lib-editorial-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.82rem;
  opacity: 0.88;
}

.lib-editorial-intro {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--lib-navy);
  margin: 0 0 1.5rem;
  max-width: 56ch;
  margin-inline: auto;
}

/* Skill rows (Z-pattern) */
.lib-skill-rows {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.lib-skill-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  color: inherit;
}

.lib-skill-row--reverse {
  grid-template-columns: 1fr 280px;
}

.lib-skill-row--reverse .lib-skill-row__visual {
  order: 2;
}

.lib-skill-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(2, 3, 49, 0.1);
}

.lib-skill-row__visual {
  height: 160px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f0f4fc 0%, #e8eef8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lib-skill-row__emoji {
  font-size: 3.5rem;
  line-height: 1;
}

.lib-skill-row__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.4rem;
}

.lib-skill-row__desc {
  color: var(--lib-muted);
  margin: 0 0 0.65rem;
  line-height: 1.55;
  font-size: 0.92rem;
}

.lib-skill-row__cta {
  font-weight: 800;
  color: var(--lib-navy);
  font-size: 0.9rem;
}

.lib-skill-row:hover .lib-skill-row__cta {
  color: var(--lib-sky);
}

/* Skill / level heroes */
.lib-skill-hero {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--lib-border);
}

.lib-skill-hero--compact {
  margin-bottom: 1.25rem;
}

.lib-skill-hero__emoji {
  font-size: 2.25rem;
  display: block;
  margin-bottom: 0.35rem;
}

.lib-skill-hero__title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
}

.lib-skill-hero__desc {
  color: var(--lib-muted);
  margin: 0;
  line-height: 1.6;
  max-width: 62ch;
}

/* Level rows */
.lib-level-rows,
.lib-lesson-rows {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lib-level-row,
.lib-lesson-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.15rem;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.lib-lesson-row {
  grid-template-columns: 120px 1fr;
}

.lib-level-row:hover,
.lib-lesson-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(2, 3, 49, 0.09);
  border-color: rgba(59, 130, 196, 0.25);
}

.lib-level-row__thumb,
.lib-lesson-row__thumb {
  height: 88px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--lib-navy) 0%, #0c1f5c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lib-lesson-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-level-row__badge {
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.lib-lesson-row__thumb-icon {
  color: var(--lib-yellow-light);
  font-size: 1.75rem;
}

.lib-level-row__title,
.lib-lesson-row__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.25rem;
}

.lib-level-row__desc,
.lib-lesson-row__desc {
  font-size: 0.88rem;
  color: var(--lib-muted);
  margin: 0 0 0.45rem;
  line-height: 1.45;
}

.lib-level-row__meta,
.lib-lesson-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lib-muted);
  align-items: center;
}

.lib-level-row__cta {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--lib-navy);
}

/* Sidebar */
.lib-sidebar {
  padding: 1.15rem 1.2rem;
  position: sticky;
  top: 1rem;
}

.lib-sidebar__block + .lib-sidebar__block {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--lib-border);
}

.lib-sidebar__title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-navy);
  margin: 0 0 0.55rem;
}

.lib-sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lib-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lib-muted);
  text-decoration: none;
}

.lib-sidebar__link:hover,
.lib-sidebar__link--active {
  color: var(--lib-navy);
}

.lib-sidebar__link--active {
  font-weight: 800;
}

.lib-sidebar__emoji {
  font-size: 1rem;
}

.lib-sidebar__lessons {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lib-sidebar__lesson-link {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lib-muted);
  text-decoration: none;
  line-height: 1.35;
}

.lib-sidebar__lesson-link:hover {
  color: var(--lib-sky);
}

/* Lesson article */
.lib-lesson-article__cover {
  margin-bottom: 1.25rem;
  border-radius: var(--lib-radius);
  overflow: hidden;
}

.lib-lesson-article__cover img,
.lib-lesson-article__cover video {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.lib-lesson-article__title {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.lib-lesson-article__lead {
  font-size: 1.05rem;
  color: var(--lib-text);
  line-height: 1.65;
  margin-bottom: 1.15rem;
}

.lib-lesson-instruction {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #f8fafd 0%, #fff 100%);
  border-color: rgba(59, 130, 196, 0.2);
}

.lib-lesson-instruction i {
  color: var(--lib-sky);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.lib-lesson-section {
  margin-bottom: 2rem;
}

.lib-lesson-section__title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lib-lesson-section__title i {
  color: var(--lib-yellow);
}

.lib-lesson-section__content {
  padding: 1.15rem 1.25rem;
}

.lib-lesson-transcript {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--lib-text);
}

.lib-lesson-task {
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.75rem;
}

.lib-lesson-task__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.5rem;
}

.lib-lesson-task__desc {
  font-size: 0.88rem;
  color: var(--lib-muted);
  margin: 0 0 0.65rem;
}

.lib-lesson-exercise-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid #f0f3f8;
}

.lib-lesson-exercise-link:first-child {
  border-top: 0;
  padding-top: 0;
}

.lib-lesson-exercise-link__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lib-muted);
}

.lib-lesson-discussion__prompt {
  font-size: 1rem;
  font-weight: 700;
  color: var(--lib-navy);
  margin-bottom: 0.65rem;
}

@media (max-width: 991.98px) {
  .lib-layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .lib-layout-with-sidebar--skill {
    grid-template-columns: 1fr;
  }

  .lib-layout-with-sidebar--version {
    grid-template-columns: 1fr;
  }

  .lib-layout-with-sidebar--lesson {
    grid-template-columns: 1fr;
  }

  .lib-sidebar {
    position: static;
  }

  .lib-skill-row,
  .lib-skill-row--reverse {
    grid-template-columns: 1fr;
  }

  .lib-skill-row--reverse .lib-skill-row__visual {
    order: 0;
  }

  .lib-editorial-hero__card {
    margin-top: -3rem;
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

@media (max-width: 767.98px) {
  .lib-level-row,
  .lib-lesson-row {
    grid-template-columns: 1fr;
  }

  .lib-level-row__thumb,
  .lib-lesson-row__thumb {
    height: 120px;
  }

  .lib-lesson-exercise-link {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Topic / subject skills page */
.lib-page--topic {
  background: var(--lib-bg);
  padding-bottom: 2rem;
}

.lib-topic-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--lib-radius) + 4px);
  margin-bottom: 1.15rem;
  background: linear-gradient(132deg, #020331 0%, #050842 42%, #0d1f5e 100%);
  box-shadow: 0 16px 48px rgba(2, 3, 49, 0.2);
}

.lib-topic-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 88% 20%, rgba(255, 196, 0, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 40% 60% at 12% 90%, rgba(59, 130, 196, 0.18) 0%, transparent 50%);
  pointer-events: none;
}

.lib-topic-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem 1.6rem;
  color: #fff;
}

.lib-topic-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.82;
  margin-bottom: 0.4rem;
}

.lib-topic-hero__title {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 800;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.lib-topic-hero__subtitle {
  margin: 0 0 1rem;
  font-size: 0.94rem;
  line-height: 1.55;
  opacity: 0.9;
  max-width: 46ch;
}

.lib-topic-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.25rem;
}

.lib-topic-stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  min-width: 88px;
}

.lib-topic-stat__val {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
}

.lib-topic-stat__lbl {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.78;
  margin-top: 0.1rem;
}

.lib-topic-hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lib-topic-hero__img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.lib-topic-hero__emoji-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  font-size: 1.35rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lib-section-head--tight {
  margin-bottom: 0.85rem;
}

.lib-topic-skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.lib-topic-skill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.15rem 1rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  min-height: 248px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(2, 3, 49, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lib-topic-skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(2, 3, 49, 0.11);
  border-color: rgba(255, 176, 0, 0.35);
}

.lib-topic-skill-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lib-navy) 0%, var(--lib-yellow) 100%);
}

.lib-topic-skill-card--completed .lib-topic-skill-card__accent {
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

.lib-topic-skill-card--in-progress .lib-topic-skill-card__accent {
  background: linear-gradient(90deg, var(--lib-yellow) 0%, var(--lib-yellow-light) 100%);
}

.lib-topic-skill-card__icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  background: linear-gradient(145deg, #f0f4fc 0%, #e4ebf8 100%);
  color: var(--lib-navy);
  font-size: 1.15rem;
}

.lib-topic-skill-card__emoji {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 0.95rem;
  line-height: 1;
}

.lib-topic-skill-card__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.3rem;
  line-height: 1.25;
}

.lib-topic-skill-card__desc {
  font-size: 0.78rem;
  color: var(--lib-muted);
  margin: 0 0 0.55rem;
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lib-topic-skill-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lib-muted);
  margin-bottom: 0.4rem;
}

.lib-topic-skill-card__pct {
  font-weight: 800;
  color: var(--lib-navy);
}

.lib-topic-skill-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.lib-topic-skill-card__footer .lib-status-pill {
  margin-left: 0;
}

.lib-topic-skill-card__cta {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--lib-navy);
  white-space: nowrap;
}

.lib-topic-skill-card:hover .lib-topic-skill-card__cta {
  color: var(--lib-sky);
}

.lib-continue-card--topic {
  margin-bottom: 1.25rem;
}

.lib-continue-card--suggest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
}

.lib-compact-footer {
  background: var(--lib-navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.85rem 0;
  margin-top: 0;
}

.lib-compact-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  font-size: 0.82rem;
}

.lib-compact-footer__brand {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lib-compact-footer__brand:hover {
  color: var(--lib-yellow-light);
}

.lib-compact-footer__link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-decoration: none;
}

.lib-compact-footer__link:hover {
  color: #fff;
}

@media (max-width: 1199.98px) {
  .lib-topic-skill-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991.98px) {
  .lib-topic-hero__grid {
    grid-template-columns: 1fr;
  }

  .lib-topic-hero__visual {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .lib-topic-skill-grid {
    grid-template-columns: 1fr;
  }

  .lib-continue-card--topic {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .lib-continue-card--topic .lib-continue-card__cta {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
}

/* Skill hub page (CEFR level picker) */
.lib-page--skill {
  background: var(--lib-bg);
  padding-bottom: 2rem;
}

.lib-skill-page-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--lib-radius) + 4px);
  margin-bottom: 1.35rem;
  background: linear-gradient(132deg, #020331 0%, #050842 42%, #0d1f5e 100%);
  box-shadow: 0 16px 48px rgba(2, 3, 49, 0.2);
  color: #fff;
}

.lib-skill-page-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 75% at 92% 15%, rgba(255, 196, 0, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 45% 55% at 8% 88%, rgba(59, 130, 196, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.lib-skill-page-hero__inner {
  position: relative;
  display: flex;
  gap: 1.35rem;
  align-items: flex-start;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.lib-skill-page-hero__icon {
  flex-shrink: 0;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--lib-yellow-light);
  font-size: 1.85rem;
}

.lib-skill-page-hero__content {
  min-width: 0;
  flex: 1;
}

.lib-skill-page-hero__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.35rem;
}

.lib-skill-page-hero__title {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 800;
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lib-skill-page-hero__desc {
  margin: 0 0 1.1rem;
  max-width: 58ch;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
}

.lib-skill-page-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-bottom: 1.15rem;
}

.lib-skill-page-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.lib-skill-page-stat__val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--lib-yellow-light);
  line-height: 1;
}

.lib-skill-page-stat__lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
}

/* Skill intro split */
.lib-skill-intro {
  padding: 0;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.lib-skill-intro__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 280px;
}

.lib-skill-intro__content {
  padding: clamp(1.35rem, 2.5vw, 2rem);
}

.lib-skill-intro__title {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.lib-skill-intro__lead {
  color: var(--lib-text);
  line-height: 1.65;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.lib-skill-intro__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.lib-skill-intro__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--lib-navy);
  line-height: 1.45;
}

.lib-skill-intro__list i {
  color: var(--lib-yellow);
  flex-shrink: 0;
  margin-top: 0.12rem;
}

.lib-skill-intro__visual {
  min-height: 220px;
  background: linear-gradient(145deg, #eef3fb 0%, #f8fafd 100%);
  border-left: 1px solid var(--lib-border);
}

.lib-skill-intro__visual-inner {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--lib-navy) 0%, #0c1f5c 55%, #1a3a7a 100%);
}

.lib-skill-intro__visual-inner--listening {
  background: linear-gradient(145deg, #020331 0%, #0d2a6e 50%, #1a4480 100%);
}

.lib-skill-intro__visual-emoji {
  font-size: 3.5rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

.lib-skill-intro__visual-icon {
  font-size: 4rem;
  color: rgba(255, 196, 0, 0.35);
  position: absolute;
  bottom: -0.5rem;
  right: 1.25rem;
}

/* Premium level blocks */
.lib-skill-level-blocks {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

.lib-skill-level-block {
  padding: 0;
  overflow: hidden;
}

.lib-skill-level-block__link {
  display: grid;
  grid-template-columns: minmax(220px, 38%) 1fr;
  text-decoration: none;
  color: inherit;
  min-height: 220px;
}

.lib-skill-level-block--reverse .lib-skill-level-block__link {
  direction: rtl;
}

.lib-skill-level-block--reverse .lib-skill-level-block__body,
.lib-skill-level-block--reverse .lib-skill-level-block__visual {
  direction: ltr;
}

.lib-skill-level-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(2, 3, 49, 0.11);
  border-color: rgba(59, 130, 196, 0.28);
}

.lib-skill-level-block__visual {
  position: relative;
  min-height: 220px;
  background: linear-gradient(145deg, var(--lib-navy) 0%, #0c1f5c 100%);
  overflow: hidden;
}

.lib-skill-level-block__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 220px;
}

.lib-skill-level-block__placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  padding: 1.25rem;
}

.lib-skill-level-block__placeholder i {
  font-size: 2.5rem;
  color: var(--lib-yellow-light);
}

.lib-skill-level-block__placeholder span {
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.85;
}

.lib-skill-level-block__placeholder--1 {
  background: linear-gradient(145deg, #020331 0%, #14306e 100%);
}

.lib-skill-level-block__placeholder--2 {
  background: linear-gradient(145deg, #0a1850 0%, #1e4a8a 100%);
}

.lib-skill-level-block__placeholder--3 {
  background: linear-gradient(145deg, #051040 0%, #2563a8 100%);
}

.lib-skill-level-block__placeholder--4 {
  background: linear-gradient(145deg, #020331 0%, #0f3d7a 55%, #ffb00033 100%);
}

.lib-skill-level-block__placeholder--5 {
  background: linear-gradient(145deg, #040633 0%, #1a4480 100%);
}

.lib-skill-level-block__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--lib-yellow);
  color: var(--lib-navy);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lib-skill-level-block__body {
  padding: clamp(1.15rem, 2vw, 1.65rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lib-skill-level-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.45rem;
}

.lib-skill-level-block__level {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--lib-navy);
  letter-spacing: -0.02em;
}

.lib-skill-level-block__difficulty {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lib-sky);
  background: rgba(59, 130, 196, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.lib-skill-level-block__desc {
  font-size: 0.9rem;
  color: var(--lib-muted);
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.lib-skill-level-block__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin-bottom: 0.75rem;
}

.lib-skill-level-block__meta i {
  color: var(--lib-sky);
  margin-right: 0.2rem;
}

.lib-skill-level-block__progress {
  margin-bottom: 0.85rem;
  max-width: 320px;
}

.lib-skill-level-block__progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin-bottom: 0.3rem;
}

.lib-skill-level-block__cta {
  align-self: flex-start;
  pointer-events: none;
}

/* Learning journey roadmap */
.lib-skill-journey {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-top: 0.25rem;
}

.lib-skill-journey__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lib-skill-journey__title i {
  color: var(--lib-yellow);
}

.lib-skill-journey__lead {
  font-size: 0.88rem;
  color: var(--lib-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.lib-skill-journey__roadmap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 0;
}

.lib-skill-journey__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 4.5rem;
  text-align: center;
}

.lib-skill-journey__node {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  border: 2px solid var(--lib-border);
  background: #fff;
  color: var(--lib-muted);
}

.lib-skill-journey__step--completed .lib-skill-journey__node {
  background: var(--lib-navy);
  border-color: var(--lib-navy);
  color: var(--lib-yellow-light);
}

.lib-skill-journey__step--current .lib-skill-journey__node {
  background: var(--lib-yellow);
  border-color: var(--lib-yellow);
  color: var(--lib-navy);
  box-shadow: 0 0 0 4px rgba(255, 176, 0, 0.25);
}

.lib-skill-journey__step--upcoming .lib-skill-journey__node {
  opacity: 0.65;
}

.lib-skill-journey__label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--lib-muted);
  max-width: 5.5rem;
  line-height: 1.25;
}

.lib-skill-journey__step--current .lib-skill-journey__label {
  color: var(--lib-navy);
  font-weight: 800;
}

.lib-skill-journey__connector {
  flex: 1;
  min-width: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--lib-border) 0%, #d8dee8 100%);
  margin-top: 1.35rem;
  max-width: 3rem;
}

.lib-skill-journey__step--completed + .lib-skill-journey__connector {
  background: linear-gradient(90deg, var(--lib-navy) 0%, var(--lib-border) 100%);
}

/* Sidebar enhancements */
.lib-sidebar__list--skills .lib-sidebar__link--active {
  background: rgba(59, 130, 196, 0.08);
  border-radius: 10px;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  margin-left: -0.45rem;
  margin-right: -0.45rem;
}

.lib-sidebar__check {
  color: var(--lib-yellow);
  font-size: 1rem;
  line-height: 1;
}

.lib-sidebar__progress {
  background: linear-gradient(180deg, #f8fafd 0%, #fff 100%);
  margin-left: -1.2rem;
  margin-right: -1.2rem;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  padding-bottom: 0.25rem;
  border-radius: 0 0 var(--lib-radius) var(--lib-radius);
}

.lib-sidebar-progress__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f0f3f8;
}

.lib-sidebar-progress__row:last-of-type {
  border-bottom: 0;
  margin-bottom: 0.65rem;
}

.lib-sidebar-progress__lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lib-muted);
}

.lib-sidebar-progress__val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--lib-navy);
}

.lib-sidebar-progress__val--level {
  color: var(--lib-sky);
}

.lib-sidebar-progress__pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin-top: 0.35rem;
  display: block;
}

.lib-empty--premium .lib-empty__visual {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--lib-navy) 0%, #0c1f5c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--lib-yellow-light);
  margin: 0 auto 1rem;
}

@media (max-width: 991.98px) {
  .lib-skill-intro__grid {
    grid-template-columns: 1fr;
  }

  .lib-skill-intro__visual {
    border-left: 0;
    border-top: 1px solid var(--lib-border);
  }

  .lib-skill-intro__visual-inner {
    min-height: 200px;
  }

  .lib-skill-level-block__link {
    grid-template-columns: 1fr;
  }

  .lib-skill-level-block--reverse .lib-skill-level-block__link {
    direction: ltr;
  }

  .lib-skill-level-block__visual {
    min-height: 180px;
  }

  .lib-skill-level-block__img,
  .lib-skill-level-block__placeholder {
    min-height: 180px;
  }
}

@media (max-width: 767.98px) {
  .lib-skill-page-hero__inner {
    flex-direction: column;
  }

  .lib-skill-journey__roadmap {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
  }

  .lib-skill-journey__connector {
    flex: 0 0 1.25rem;
  }
}

/* Skill version page (lesson library) */
.lib-layout-with-sidebar--version {
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 2rem;
}

.lib-page--skill-version {
  background: var(--lib-bg);
  padding-bottom: 2rem;
}

.lib-version-hero {
  position: relative;
  border-radius: calc(var(--lib-radius) + 4px);
  overflow: hidden;
  margin-bottom: 1.35rem;
  background: linear-gradient(132deg, #020331 0%, #050842 42%, #0d1f5e 100%);
  box-shadow: 0 16px 48px rgba(2, 3, 49, 0.2);
  color: #fff;
}

.lib-version-hero__banner {
  position: relative;
  height: clamp(140px, 22vw, 200px);
  overflow: hidden;
}

.lib-version-hero__banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.55;
}

.lib-version-hero__banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a1850 0%, #1a4480 55%, #ffb00022 100%);
  font-size: 3rem;
  color: rgba(255, 196, 0, 0.45);
}

.lib-version-hero__banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 3, 49, 0.15) 0%, rgba(2, 3, 49, 0.92) 100%);
}

.lib-version-hero__content {
  position: relative;
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  padding: 0 clamp(1.25rem, 2.5vw, 2rem) clamp(1.35rem, 2.5vw, 2rem);
  margin-top: -1.25rem;
}

.lib-version-hero__icon {
  flex-shrink: 0;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lib-yellow);
  color: var(--lib-navy);
  font-size: 1.65rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.lib-version-hero__text {
  min-width: 0;
  flex: 1;
}

.lib-version-hero__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.3rem;
}

.lib-version-hero__title {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lib-version-hero__desc {
  margin: 0 0 1rem;
  max-width: 58ch;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.lib-version-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-bottom: 0.85rem;
}

.lib-version-hero__progress {
  max-width: 340px;
  margin-bottom: 1rem;
}

.lib-version-hero__progress .lib-progress__bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.lib-skill-intro--version {
  margin-bottom: 1.25rem;
}

.lib-skill-intro__visual-inner--version {
  background: linear-gradient(145deg, #020331 0%, #14306e 50%, #ffb00033 100%);
}

.lib-skill-intro__visual-badge {
  font-size: 2rem;
  font-weight: 800;
  color: var(--lib-yellow-light);
  letter-spacing: -0.02em;
}

/* Resume / continue card */
.lib-resume-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.35rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  border-color: rgba(59, 130, 196, 0.22);
}

.lib-resume-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(2, 3, 49, 0.1);
  border-color: rgba(255, 176, 0, 0.35);
}

.lib-resume-card__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 0% 50%, rgba(255, 176, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.lib-resume-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--lib-navy) 0%, #0c1f5c 100%);
  color: var(--lib-yellow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.lib-resume-card__body {
  min-width: 0;
}

.lib-resume-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-sky);
  display: block;
  margin-bottom: 0.2rem;
}

.lib-resume-card__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.35rem;
}

.lib-resume-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin-bottom: 0.45rem;
}

.lib-resume-card__body .lib-progress__bar {
  max-width: 280px;
}

.lib-resume-card__cta {
  flex-shrink: 0;
  pointer-events: none;
}

/* Premium lesson article cards */
.lib-lesson-articles {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.lib-lesson-article {
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
}

.lib-lesson-article__link {
  display: grid;
  grid-template-columns: minmax(200px, 36%) 1fr;
  text-decoration: none;
  color: inherit;
  min-height: 200px;
}

.lib-lesson-article--reverse .lib-lesson-article__link {
  direction: rtl;
}

.lib-lesson-article--reverse .lib-lesson-article__body,
.lib-lesson-article--reverse .lib-lesson-article__visual {
  direction: ltr;
}

.lib-lesson-article:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(2, 3, 49, 0.11);
  border-color: rgba(59, 130, 196, 0.28);
}

.lib-lesson-article__visual {
  position: relative;
  min-height: 200px;
  background: linear-gradient(145deg, var(--lib-navy) 0%, #0c1f5c 100%);
  overflow: hidden;
}

.lib-lesson-article__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 200px;
  transition: transform 0.35s ease;
}

.lib-lesson-article:hover .lib-lesson-article__img {
  transform: scale(1.03);
}

.lib-lesson-article__placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  padding: 1.25rem;
}

.lib-lesson-article__placeholder i {
  font-size: 2.25rem;
  color: var(--lib-yellow-light);
}

.lib-lesson-article__placeholder span {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.85;
}

.lib-lesson-article__placeholder--1 { background: linear-gradient(145deg, #020331 0%, #14306e 100%); }
.lib-lesson-article__placeholder--2 { background: linear-gradient(145deg, #0a1850 0%, #1e4a8a 100%); }
.lib-lesson-article__placeholder--3 { background: linear-gradient(145deg, #051040 0%, #2563a8 100%); }
.lib-lesson-article__placeholder--4 { background: linear-gradient(145deg, #020331 0%, #0f3d7a 55%, #ffb00033 100%); }
.lib-lesson-article__placeholder--5 { background: linear-gradient(145deg, #040633 0%, #1a4480 100%); }

.lib-lesson-article__complete {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--lib-yellow);
  color: var(--lib-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lib-lesson-article__body {
  padding: clamp(1.15rem, 2vw, 1.65rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lib-lesson-article__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.4rem;
}

.lib-lesson-article__title {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.lib-lesson-article__difficulty {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lib-sky);
  background: rgba(59, 130, 196, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.lib-lesson-article__desc {
  font-size: 0.9rem;
  color: var(--lib-muted);
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

.lib-lesson-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin-bottom: 0.65rem;
}

.lib-lesson-article__meta i {
  color: var(--lib-sky);
  margin-right: 0.15rem;
}

.lib-lesson-article__progress {
  margin-bottom: 0.85rem;
  max-width: 300px;
}

.lib-lesson-article__cta {
  align-self: flex-start;
  pointer-events: none;
}

/* Sidebar level navigation */
.lib-sidebar__context {
  background: linear-gradient(180deg, #f8fafd 0%, #fff 100%);
  margin: -0.15rem -1.2rem 0;
  padding: 0.15rem 1.2rem 0.5rem;
}

.lib-sidebar-context__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f0f3f8;
}

.lib-sidebar-context__lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lib-muted);
}

.lib-sidebar-context__val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--lib-navy);
  text-align: right;
}

.lib-sidebar-context__val--highlight {
  color: var(--lib-yellow);
  background: var(--lib-navy);
  padding: 0.15rem 0.55rem;
  border-radius: 8px;
  font-size: 0.82rem;
}

.lib-sidebar-context__progress {
  padding-top: 0.65rem;
}

.lib-sidebar-context__progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin-bottom: 0.35rem;
}

.lib-sidebar-context__stats {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lib-muted);
  margin-top: 0.4rem;
}

.lib-sidebar__list--levels {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lib-sidebar__level-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--lib-border);
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.lib-sidebar__level-link:hover {
  border-color: rgba(59, 130, 196, 0.35);
  transform: translateX(2px);
}

.lib-sidebar__level-link--active {
  background: var(--lib-navy);
  border-color: var(--lib-navy);
}

.lib-sidebar__level-badge {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--lib-navy);
}

.lib-sidebar__level-link--active .lib-sidebar__level-badge {
  color: var(--lib-yellow-light);
}

.lib-sidebar__level-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--lib-muted);
  text-align: right;
}

.lib-sidebar__level-link--active .lib-sidebar__level-label {
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 991.98px) {
  .lib-layout-with-sidebar--version {
    grid-template-columns: 1fr;
  }

  .lib-lesson-article__link {
    grid-template-columns: 1fr;
  }

  .lib-lesson-article--reverse .lib-lesson-article__link {
    direction: ltr;
  }

  .lib-lesson-article__visual {
    min-height: 180px;
  }

  .lib-lesson-article__img,
  .lib-lesson-article__placeholder {
    min-height: 180px;
  }

  .lib-resume-card {
    grid-template-columns: auto 1fr;
  }

  .lib-resume-card__cta {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 767.98px) {
  .lib-version-hero__content {
    flex-direction: column;
    margin-top: -0.75rem;
  }
}

/* Lesson hub page */
.lib-layout-with-sidebar--lesson {
  grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr);
  gap: 2rem;
}

.lib-page--lesson-hub {
  background: var(--lib-bg);
  padding-bottom: 2rem;
}

.lib-lesson-hub-hero {
  border-radius: calc(var(--lib-radius) + 4px);
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: 0 16px 48px rgba(2, 3, 49, 0.12);
}

.lib-lesson-hub-hero__visual {
  position: relative;
  min-height: clamp(280px, 38vw, 360px);
  overflow: hidden;
  background: linear-gradient(145deg, var(--lib-navy) 0%, #0c1f5c 100%);
  display: flex;
  align-items: flex-end;
}

.lib-lesson-hub-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lib-lesson-hub-hero__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: rgba(255, 196, 0, 0.45);
}

.lib-lesson-hub-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 3, 49, 0.35) 0%, rgba(2, 3, 49, 0.92) 100%);
}

.lib-lesson-hub-hero__content {
  position: relative;
  z-index: 1;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  width: 100%;
}

.lib-lesson-hub-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.lib-lesson-hub-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.lib-lesson-hub-badge--level {
  background: var(--lib-yellow);
  color: var(--lib-navy);
}

.lib-lesson-hub-badge--diff {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
}

.lib-lesson-hub-hero__title {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.lib-lesson-hub-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.75rem;
}

.lib-lesson-hub-hero__stats i {
  color: var(--lib-yellow-light);
  margin-right: 0.2rem;
}

.lib-lesson-hub-hero__progress {
  max-width: 340px;
  margin-bottom: 1rem;
}

.lib-lesson-hub-hero__progress .lib-progress__bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
}

/* Lesson journey */
.lib-lesson-journey {
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.15rem;
  overflow-x: auto;
}

.lib-lesson-journey__track {
  display: flex;
  align-items: flex-start;
  min-width: min-content;
}

.lib-lesson-journey__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  min-width: 4.75rem;
  text-align: center;
}

.lib-lesson-journey__node {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: 2px solid var(--lib-border);
  background: #fff;
  color: var(--lib-muted);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lib-lesson-journey__step:hover .lib-lesson-journey__node {
  transform: scale(1.05);
}

.lib-lesson-journey__step--completed .lib-lesson-journey__node {
  background: var(--lib-navy);
  border-color: var(--lib-navy);
  color: var(--lib-yellow-light);
}

.lib-lesson-journey__step--current .lib-lesson-journey__node {
  background: var(--lib-yellow);
  border-color: var(--lib-yellow);
  color: var(--lib-navy);
  box-shadow: 0 0 0 4px rgba(255, 176, 0, 0.25);
}

.lib-lesson-journey__label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--lib-muted);
  line-height: 1.25;
  max-width: 5.25rem;
}

.lib-lesson-journey__step--current .lib-lesson-journey__label {
  color: var(--lib-navy);
  font-weight: 800;
}

.lib-lesson-journey__connector {
  flex: 0 0 1.75rem;
  height: 2px;
  background: var(--lib-border);
  margin-top: 1.3rem;
}

.lib-lesson-journey__connector--done {
  background: var(--lib-navy);
}

/* Overview card */
.lib-lesson-overview {
  display: flex;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.35rem;
}

.lib-lesson-overview__icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--lib-navy) 0%, #0c1f5c 100%);
  color: var(--lib-yellow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.lib-lesson-overview__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.45rem;
}

.lib-lesson-overview__text,
.lib-lesson-overview__outcome {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--lib-text);
  margin: 0 0 0.55rem;
}

.lib-lesson-overview__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.lib-lesson-overview__chip {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lib-navy);
  background: #f0f4fc;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.lib-lesson-overview__chip i {
  color: var(--lib-sky);
  margin-right: 0.15rem;
}

/* Section blocks */
.lib-lesson-hub-section {
  margin-bottom: 1.75rem;
  scroll-margin-top: 1rem;
}

.lib-lesson-hub-section__header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.lib-lesson-hub-section__header-main {
  flex: 1;
  min-width: 0;
}

.lib-lesson-hub-section__icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--lib-navy);
  background: #f0f4fc;
}

.lib-lesson-hub-section__icon--prep { background: rgba(255, 176, 0, 0.15); color: #7a5200; }
.lib-lesson-hub-section__icon--listen { background: rgba(59, 130, 196, 0.12); color: var(--lib-sky); }
.lib-lesson-hub-section__icon--transcript { background: rgba(2, 3, 49, 0.08); }
.lib-lesson-hub-section__icon--quiz { background: rgba(255, 176, 0, 0.12); }
.lib-lesson-hub-section__icon--vocab { background: rgba(34, 197, 94, 0.1); color: #166534; }
.lib-lesson-hub-section__icon--speak { background: rgba(236, 72, 153, 0.1); color: #9d174d; }
.lib-lesson-hub-section__icon--discuss { background: rgba(59, 130, 196, 0.1); }

.lib-lesson-hub-section__title {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.lib-lesson-hub-section__desc {
  font-size: 0.88rem;
  color: var(--lib-muted);
  margin: 0;
  line-height: 1.5;
}

.lib-lesson-hub-section__progress {
  margin-top: 0.65rem;
  max-width: 320px;
}

.lib-lesson-hub-section__progress span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lib-muted);
  display: block;
  margin-bottom: 0.3rem;
}

.lib-lesson-hub-section__card {
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.85rem;
}

.lib-lesson-hub-section__card-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--lib-text);
}

/* Activity cards */
.lib-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lib-activity-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  border-radius: 20px;
}

.lib-activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(2, 3, 49, 0.1);
}

.lib-activity-card--done {
  border-color: rgba(34, 197, 94, 0.25);
}

.lib-activity-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #f0f4fc 0%, #e4ebf8 100%);
  color: var(--lib-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.lib-activity-card--done .lib-activity-card__icon {
  background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
}

.lib-activity-card__task {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-sky);
  display: block;
  margin-bottom: 0.15rem;
}

.lib-activity-card__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.25rem;
}

.lib-activity-card__desc {
  font-size: 0.82rem;
  color: var(--lib-muted);
  margin: 0 0 0.45rem;
  line-height: 1.45;
}

.lib-activity-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lib-muted);
}

.lib-activity-card__type {
  background: rgba(255, 176, 0, 0.15);
  color: #7a5200;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.lib-activity-card__done {
  color: #166534;
}

.lib-activity-card__cta {
  flex-shrink: 0;
}

.lib-activity-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-shrink: 0;
}

.lib-activity-card__actions .lib-btn {
  justify-content: center;
  white-space: nowrap;
}

/* Media player */
.lib-media-player {
  padding: 1.25rem 1.35rem;
  border-radius: 20px;
}

.lib-media-player__header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.lib-media-player__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--lib-navy);
  color: var(--lib-yellow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.lib-media-player__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.2rem;
}

.lib-media-player__hint {
  font-size: 0.82rem;
  color: var(--lib-muted);
  margin: 0;
}

.lib-media-player__audio,
.lib-media-player__video {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.lib-media-player__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.lib-media-player__speed {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lib-muted);
}

.lib-media-player__speed select {
  border: 1px solid var(--lib-border);
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  font-size: 0.78rem;
}

.lib-media-player__progress-track {
  height: 4px;
  background: #eef0f4;
  border-radius: 999px;
  margin-top: 0.85rem;
  overflow: hidden;
}

.lib-media-player__progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lib-yellow) 0%, var(--lib-sky) 100%);
  border-radius: 999px;
  transition: width 0.15s linear;
}

.lib-media-player__empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--lib-muted);
}

.lib-media-player__empty i {
  font-size: 2rem;
  color: var(--lib-sky);
  display: block;
  margin-bottom: 0.5rem;
}

/* Transcript */
.lib-transcript-card {
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
}

.lib-transcript-card__toolbar {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--lib-border);
  background: #f8fafd;
}

.lib-transcript-card__body {
  padding: 1.15rem 1.35rem;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--lib-text);
  max-height: none;
  overflow: visible;
}

.lib-transcript-card__body--collapsed {
  max-height: 180px;
  overflow: hidden;
  position: relative;
}

.lib-transcript-card__body--collapsed::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 4rem;
  background: linear-gradient(transparent, #fff);
}

.lib-transcript-line {
  margin: 0 0 0.65rem;
}

.lib-transcript-speaker {
  font-weight: 800;
  color: var(--lib-navy);
  margin-right: 0.35rem;
}

.lib-transcript-keyword {
  background: rgba(255, 176, 0, 0.22);
  color: var(--lib-navy);
  padding: 0 0.15rem;
  border-radius: 3px;
}

/* Vocabulary */
.lib-vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.lib-vocab-card {
  padding: 1.15rem 1.25rem;
  border-radius: 20px;
}

.lib-vocab-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.lib-vocab-card__head i {
  color: var(--lib-yellow);
  margin-top: 0.15rem;
}

.lib-vocab-card__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0;
}

.lib-vocab-card__def {
  font-size: 0.85rem;
  color: var(--lib-muted);
  line-height: 1.5;
  margin: 0 0 0.75rem;
}

/* Discussion */
.lib-discussion {
  padding: 1.25rem 1.35rem;
  border-radius: 20px;
}

.lib-discussion__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lib-sky);
  margin-bottom: 0.35rem;
}

.lib-discussion__prompt p,
.lib-discussion__reflection p {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lib-navy);
  line-height: 1.55;
  margin: 0 0 1rem;
}

.lib-discussion__areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.lib-discussion__area {
  padding: 1rem;
  background: #f8fafd;
  border-radius: 14px;
  border: 1px solid var(--lib-border);
}

.lib-discussion__placeholder {
  font-size: 0.85rem;
  color: var(--lib-muted);
  margin: 0;
}

.lib-discussion__notes {
  width: 100%;
  border: 1px solid var(--lib-border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  resize: vertical;
  min-height: 88px;
}

.lib-discussion__future {
  font-size: 0.78rem;
  color: var(--lib-muted);
  margin: 0;
}

/* Completion */
.lib-lesson-complete {
  padding: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  border-radius: 20px;
  margin-top: 0.5rem;
}

.lib-lesson-complete__emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.35rem;
}

.lib-lesson-complete__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--lib-navy);
  margin: 0 0 0.35rem;
}

.lib-lesson-complete__sub {
  color: var(--lib-muted);
  margin: 0 0 1rem;
}

.lib-lesson-complete__rewards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.lib-lesson-complete__pending {
  padding: 0.5rem 0;
}

/* Sidebar journey links */
.lib-sidebar__list--journey {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lib-sidebar__journey-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.45rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--lib-muted);
  text-decoration: none;
}

.lib-sidebar__journey-link:hover {
  background: #f0f4fc;
  color: var(--lib-navy);
}

.lib-sidebar__journey-link--current {
  background: rgba(255, 176, 0, 0.12);
  color: var(--lib-navy);
  font-weight: 800;
}

.lib-sidebar__journey-link--completed {
  color: var(--lib-navy);
}

.lib-sidebar__journey-link--completed i {
  color: #22c55e;
}

@media (max-width: 991.98px) {
  .lib-lesson-overview {
    flex-direction: column;
  }

  .lib-discussion__areas {
    grid-template-columns: 1fr;
  }

  .lib-activity-card {
    grid-template-columns: auto 1fr;
  }

  .lib-activity-card__cta {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 767.98px) {
  .lib-lesson-hub-hero__visual {
    min-height: 320px;
  }
}

/* ── Flashcard player ───────────────────────────────────────────────────── */
.fc-platform-body {
  margin: 0;
  min-height: 100vh;
  background: #eef1f5;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.fc-platform-nav {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 16px 0;
}

.fc-platform-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1e3a5f;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.fc-platform-nav__link:hover {
  text-decoration: underline;
}

.fc-player {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

.fc-player--standalone {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fc-player__top {
  text-align: center;
  margin-bottom: 16px;
}

.fc-player__mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1e3a5f;
  margin-bottom: 8px;
}

.fc-player__counter {
  display: block;
  font-size: 0.9rem;
  color: #64748b;
}

.fc-player__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 4px 0 0;
  color: #0f172a;
}

.fc-player__stage {
  position: relative;
  min-height: 380px;
}

.fc-card {
  display: none;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  padding: 20px 24px 16px;
  min-height: 360px;
  flex-direction: column;
}

.fc-card--active {
  display: flex;
}

.fc-card__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  min-height: 36px;
}

.fc-card__toolbar-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.fc-card__tool {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.fc-card__icon-btn {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}

.fc-card__inner {
  flex: 1;
  min-height: 0;
  position: relative;
  perspective: 1200px;
  cursor: pointer;
  min-height: 240px;
}

.fc-card__inner--single {
  cursor: default;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 12px;
}

.fc-card__face-body {
  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 14px;
}

.fc-card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transition: transform 0.45s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 12px;
}

.fc-card__face--front {
  z-index: 2;
}

.fc-card__face--back {
  transform: rotateY(-180deg);
  z-index: 1;
  pointer-events: none;
}

.fc-card__inner--flipped .fc-card__face--front {
  transform: rotateY(180deg);
  pointer-events: none;
}

.fc-card__inner--flipped .fc-card__face--back {
  transform: rotateY(0deg);
  pointer-events: auto;
  z-index: 2;
}

.fc-card__content {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #0f172a;
  text-align: left;
  width: 100%;
  max-width: 640px;
}

.fc-card__media {
  width: 100%;
  max-width: 640px;
  flex-shrink: 0;
}

.fc-card__media audio,
.fc-card__media video {
  width: 100%;
  max-width: 480px;
  display: block;
}

.fc-card__media img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
}

.fc-card__flip-hint {
  margin-top: 12px;
  background: #1e3a5f;
  color: #fff;
  text-align: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.fc-card__hint-banner {
  flex: 1;
  min-width: 160px;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #92400e;
  line-height: 1.45;
}

.fc-card__hint-banner--hidden {
  display: none !important;
}

.fc-player__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  gap: 12px;
}

.fc-player__play,
.fc-player__fullscreen,
.fc-player__nav-btn {
  border: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.fc-player__nav {
  display: flex;
  gap: 12px;
}

.fc-player__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.fc-player__empty {
  text-align: center;
  padding: 48px 16px;
  color: #64748b;
}

.lib-badge--flashcards {
  background: #ede9fe;
  color: #5b21b6;
}

.fc-player--library .fc-player__stage {
  min-height: 320px;
}

.fc-player--library .fc-card {
  min-height: 300px;
}

