/* Tajweed hub + lesson */
.tj-overview-wrap { position: relative; z-index: 3; margin-top: -48px; }
.tj-overview { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.tj-overview .ring { width: 140px; height: 140px; }
.tj-ov-text { flex: 1 1 280px; }
.tj-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 10px; }
.tj-stats li { padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.tj-stats b { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--accent-strong); line-height: 1.2; }
.tj-stats span { font-size: .82rem; color: var(--muted); }
@media (max-width: 767.98px) { .tj-overview { justify-content: center; text-align: center; } .tj-overview .d-flex { justify-content: center; } .tj-stats { width: 100%; grid-template-columns: repeat(4, 1fr); } .tj-stats li { padding: 10px 4px; } }
.level-card { display: flex; flex-direction: column; }
.level-card .lv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.level-card h3 { font-size: 1.25rem; margin: 10px 0 4px; }
.level-card .lv-prog { margin: 12px 0 6px; }
.level-card .lv-num { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; color: var(--accent); opacity: .25; position: absolute; top: 12px; inset-inline-end: 18px; }
.unit-row .u-meta { font-size: .8rem; color: var(--muted); }
.unit-row .u-go { margin-inline-start: auto; color: var(--accent-strong); }
.unit-row:hover .u-t { color: var(--accent-strong); }
.tj-ref td, .tj-ref th { font-size: .95rem; }
.tj-topic { font-family: var(--font-head); font-weight: 800; color: var(--heading); background: var(--surface-2); }
.tj-letters { font-family: var(--font-display); font-size: 1.12rem; color: var(--accent-strong); letter-spacing: .04em; direction: rtl; }

/* lesson page */
.tl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
@media (max-width: 991.98px) { .tl-layout { grid-template-columns: 1fr; } .tl-side .sticky-side { position: static; } }
.tl-content { padding: clamp(22px, 3.5vw, 44px); }
.tl-content h2 { font-size: 1.45rem; margin: 1.8em 0 .7em; display: flex; align-items: center; gap: 10px; scroll-margin-top: 100px; }
.tl-content h2::before { content: ""; width: 8px; height: 28px; border-radius: 4px; background: linear-gradient(180deg, var(--nq-gold-300), var(--nq-gold-600)); }
.tl-content h2:first-child { margin-top: 0; }
.tl-rule { border: 1px solid var(--border); border-radius: 18px; padding: 20px; margin-bottom: 14px; background: var(--surface); position: relative; overflow: hidden; }
.tl-rule::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--accent); }
.tl-rule h3 { font-size: 1.12rem; margin-bottom: 6px; }
.tl-rule .letters { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tl-rule .letters span { font-family: var(--font-display); font-size: 1.15rem; min-width: 38px; height: 38px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.tl-rule p { margin-bottom: 10px; color: var(--text-2); }
.tl-ex { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-ex a { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); transition: border-color .2s; }
[dir="rtl"] .tl-ex a { padding: 6px 14px 6px 8px; }
.tl-ex a:hover { border-color: var(--accent); color: var(--text); }
.tl-ex .quran-text { font-size: 1.35rem; line-height: 1.7; color: var(--quran-ink); }
.tl-ex small { font-family: var(--font-head); font-size: .72rem; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 2px 8px; direction: ltr; }
.tl-ex .ex-play { width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-size: .9rem; cursor: pointer; flex: none; }
.tl-note { display: flex; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--accent-soft); color: var(--text-2); margin: 16px 0; }
.tl-note i { color: var(--accent-strong); font-size: 1.2rem; }
.tl-ayah { text-align: center; padding: 22px; border-radius: 18px; background: var(--surface-2); margin: 18px 0; }
.tl-ayah .quran-text { text-align: center; font-size: 1.7rem; margin: 0; }
.tl-ayah small { display: block; color: var(--muted); direction: ltr; margin-top: 6px; }
.tl-ayah cite { color: var(--accent-strong); font-style: normal; font-weight: 700; font-family: var(--font-head); font-size: .9rem; }
.tl-content .table-nq { margin: 14px 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.tl-content .table-nq th { background: var(--surface-2); }
.quiz { padding: clamp(20px, 3vw, 32px); }
.quiz-q { margin-bottom: 22px; }
.quiz-q p { font-family: var(--font-head); font-weight: 700; color: var(--heading); margin-bottom: 10px; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opts button { text-align: start; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 10px; transition: all .2s; font-family: var(--font-body); font-size: 1rem; }
.quiz-opts button:hover:not(:disabled) { border-color: var(--accent); }
.quiz-opts button.is-right { border-color: var(--success); background: color-mix(in srgb, var(--surface) 85%, var(--success)); }
.quiz-opts button.is-wrong { border-color: var(--danger); background: color-mix(in srgb, var(--surface) 88%, var(--danger)); }
.quiz-opts button:disabled { cursor: default; }
.quiz-opts button i { margin-inline-start: auto; }
.quiz-score { font-family: var(--font-head); font-weight: 800; }
.tl-toc a { display: block; padding: 7px 10px; border-radius: 10px; color: var(--text-2); font-size: .93rem; }
.tl-toc a:hover, .tl-toc a.is-active { background: var(--surface-2); color: var(--heading); }
.tl-done-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 85%, var(--success)); border: 1px solid var(--success); color: var(--text); margin-bottom: 18px; }
.tl-done-banner i { color: var(--success); font-size: 1.4rem; }
@media print {
  .site-header, .site-footer, .mini-player, .to-top, .page-hero::after, .tl-side, .quiz, .no-print, .surah-nav, .toast-stack, .nq-loader { display: none !important; }
  .page-hero { padding: 20px 0 !important; background: none !important; color: #000 !important; }
  .page-hero h1, .page-hero .ph-sub { color: #000 !important; }
  .page-hero .ph-bg, .page-hero .ph-ornament, .breadcrumb-nq { display: none !important; }
  .tl-layout { display: block; }
  .card-nq, .tl-rule { box-shadow: none !important; break-inside: avoid; }
  body { background: #fff !important; padding: 0 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
.level-card .lv-badge { align-self: flex-start; }
@media (max-width: 575.98px) { .tj-stats { grid-template-columns: repeat(2, 1fr); } }
