.reading-progress-bar {
  position: fixed;
  top: 118px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: 999;
  transition: width 0.15s linear;
}

body.admin-bar .reading-progress-bar {
  top: calc(118px + 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .reading-progress-bar {
    top: calc(118px + 46px);
  }
}
.learn-article-hero { background: #f0f2f5; padding: 40px 0; border-bottom: 1px solid #e0e0e0; }
.learn-article-hero-inner { display: flex; gap: 32px; align-items: flex-start; }
.learn-article-hero-left { flex: 1; }
.learn-breadcrumb { font-size: 12px; color: #999; margin-bottom: 14px; }
.learn-breadcrumb a { color: #999; }
.learn-hero-tags { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.lesson-difficulty-tag, .lesson-topic-hero-tag { font-size: 11px; border-radius: 3px; padding: 3px 10px; background: #e6f1fb; color: #185fa5; }
.learn-article-hero h1 { margin: 0 0 14px; line-height: 1.15; max-width: 700px; }
.learn-article-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #888; margin-bottom: 14px; }
.learn-article-lead { font-size: 15px; color: #444; line-height: 1.75; max-width: 640px; border-left: 3px solid var(--color-primary); padding-left: 14px; }

.lesson-overview-card { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 20px 22px; min-width: 280px; box-shadow: var(--shadow-sm); }
.lesson-overview-title { margin: 0 0 12px; border-bottom: 2px solid var(--color-primary); padding-bottom: 10px; font-size: 14px; }
.lesson-overview-row { margin: 0; font-size: 13px; color: #555; padding: 4px 0; }
.lesson-overview-divider { border: none; border-top: 1px solid #f0f0f0; margin: 12px 0; }
.lesson-covers-title { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.lesson-covers-item { font-size: 13px; color: #333; padding: 2px 0; }
.lesson-covers-item::before { content: "✓ "; color: #2e7d32; font-weight: 700; }
.lesson-start-btn { display: block; text-align: center; width: 100%; margin-top: 14px; border-radius: 5px; background: var(--color-primary); color: #fff; padding: 10px 0; font-size: 13px; font-weight: 700; }

.article-main { padding: 28px 0 42px; }
.article-layout { display: flex; gap: 28px; align-items: flex-start; }
.article-left { flex: 0 0 68%; min-width: 0; }
.article-right { flex: 0 0 28%; margin-left: auto; }

.toc-card { background: #f8f9fa; border: 1px solid #e8e8e8; border-radius: 8px; padding: 16px 20px; margin-bottom: 24px; }
.toc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.toc-title { margin: 0; font-size: 14px; }
.toc-toggle { border: none; background: transparent; color: var(--color-primary); font-size: 12px; cursor: pointer; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-item { padding: 4px 0; border-bottom: 1px solid #eee; }
.toc-item:last-child { border-bottom: none; }
.toc-link { color: #555; font-size: 13px; display: flex; gap: 8px; }
.toc-link.active { color: var(--color-primary); font-weight: 600; }
.toc-link-num { color: var(--color-primary); font-weight: 700; min-width: 16px; font-size: 12px; }

.article-content { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; font-size: 16px; line-height: 1.85; }
.article-content h2 { margin: 34px 0 14px; display: inline-block; border-bottom: 2px solid var(--color-primary); padding-bottom: 8px; scroll-margin-top: 80px; }
.article-content p { margin-bottom: 18px; }
.article-content table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; }
.article-content th { background: #f0f0f0; text-align: left; padding: 10px 14px; font-size: 12px; text-transform: uppercase; }
.article-content td { border-bottom: 1px solid #eee; padding: 10px 14px; }

.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.lesson-nav-card { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 16px 18px; }
.lesson-nav-card.next { text-align: right; }
.lesson-nav-card.disabled { opacity: .5; }
.lesson-nav-label { margin: 0 0 6px; font-size: 11px; color: #aaa; text-transform: uppercase; }
.lesson-nav-title { margin: 0 0 4px; font-size: 14px; }
.lesson-nav-chapter { margin: 0; font-size: 12px; color: var(--color-primary); }

.sidebar-widget { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 18px; margin-bottom: 16px; }
.widget-title { margin: 0 0 12px; border-bottom: 2px solid var(--color-primary); padding-bottom: 10px; font-size: 16px; }
.terms-list { display: flex; flex-wrap: wrap; gap: 6px; }
.term-chip { background: #f0f0f0; color: #444; border-radius: 12px; padding: 4px 10px; font-size: 12px; }
.term-chip:hover { background: var(--color-primary); color: #fff; }
.glossary-link { display: inline-block; margin-top: 10px; color: var(--color-primary); font-size: 12px; font-weight: 600; }
.share-btns { display: flex; gap: 8px; }
.share-btn-sm { border: none; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; }
.share-copy-sm { background: #f0f0f0; color: #555; padding: 8px 10px; }

.related-lessons-section { background: #f8f9fa; padding: 40px 0; }
.related-title { margin: 0; font-size: 28px; }
.related-lessons-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0 24px; }
.related-lesson-card { background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden; transition: all .2s; }
.related-lesson-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-orange); transform: translateY(-2px); }
.related-lesson-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #e0e0e0; }
.related-lesson-body { padding: 12px 14px; }
.related-lesson-title { margin: 0 0 8px; font-size: 13px; line-height: 1.4; }
.related-lesson-meta { margin: 0; font-size: 11px; color: #aaa; }
.related-all-link { display: block; text-align: center; color: var(--color-primary); font-size: 14px; font-weight: 600; }

@media (max-width: 1100px) {
  .learn-article-hero-inner, .article-layout { flex-direction: column; }
  .article-left, .article-right { width: 100%; flex: 1 1 100%; }
  .related-lessons-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .lesson-nav, .related-lessons-grid { grid-template-columns: 1fr; }
  .learn-article-hero h1 { font-size: 34px; }
}
