/* Tender Wisdom LMS: layout for course, lesson and dashboard pages */
.twlms { padding-bottom: 2rem; }
.twlms-hero img { display: block; width: 100%; height: auto; border-radius: 14px; }
.twlms-prose { margin: 1.5rem 0; }
.twlms-access { margin: 1.5rem 0; }
.twlms-heading { font-size: 1.5rem; margin: 2rem 0 0.8rem; }
.twlms-note { font-size: 0.95rem; opacity: 0.8; }
.twlms-progress { height: 10px; background: #ece6f2; border-radius: 999px; overflow: hidden; margin: 0.8rem 0 0.4rem; }
.twlms-progress span { display: block; height: 100%; background: var(--tw-gold, #b8975a); }
.twlms-lessons, .twlms-sidebar ol { padding-left: 1.2rem; line-height: 1.9; }
.twlms-layout { display: grid; gap: 2rem; }
.twlms-sidebar li.is-current a { font-weight: 700; }
.twlms-video video, .twlms-video iframe { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 14px; background: #000; }
.twlms-title { font-size: 2rem; margin: 1.5rem 0 0.5rem; }
.twlms-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.twlms-dashboard { display: grid; gap: 1.2rem; }
.twlms-card { border: 1px solid #e4dcea; border-radius: 12px; padding: 1.2rem; background: #fff; }
.twlms-card h3 { margin: 0 0 0.4rem; }
@media (min-width: 900px) {
	.twlms-layout { grid-template-columns: 260px 1fr; align-items: start; }
	.twlms-dashboard { grid-template-columns: repeat(2, 1fr); }
}

/* Courses page: cards with description and curriculum preview */
.twlms-course-list { display: grid; gap: 2rem; }
.twlms-course-card { border: 1px solid #e4dcea; border-radius: 14px; padding: 1.4rem; background: #fff; }
.twlms-course-thumb img { display: block; width: 100%; height: auto; border-radius: 12px; margin-bottom: 1rem; }
.twlms-course-title { font-size: 1.6rem; margin: 0.2rem 0 0.4rem; }
.twlms-price { font-weight: 700; margin: 0 0 0.6rem; }
.twlms-details { border-top: 1px solid #efe9f4; padding: 0.7rem 0; }
.twlms-details summary { cursor: pointer; font-weight: 600; }
.twlms-details__body { padding-top: 0.6rem; }
.twlms-details__body h4 { margin: 1rem 0 0.3rem; }
.twlms-course-actions { margin-top: 1rem; }
@media (min-width: 900px) { .twlms-course-list { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Classroom lesson view (v0.4.0) ---------- */
.twlms, .twlms * { font-family: inherit; }
.twlms-classroom { --cr-ink: #2b1338; --cr-muted: #6b5f75; --cr-line: #e6dcef; --cr-card: #ffffff; --cr-accent: var(--tw-gold, #b8975a); --cr-soft: #faf7fc; }
.twlms-classroom .container { max-width: 1180px; }
.twlms-classroom__head { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; align-items: center; justify-content: space-between; margin: 0 0 1.2rem; }
.twlms-back { color: var(--cr-muted); text-decoration: none; font-weight: 600; }
.twlms-back:hover { color: var(--cr-ink); }
.twlms-stat { display: flex; align-items: center; gap: 0.7rem; color: var(--cr-muted); font-size: 0.92rem; flex-wrap: wrap; }
.twlms-stat .twlms-progress { width: 180px; margin: 0; }
.twlms-classroom__layout { display: grid; gap: 1.6rem; }
.twlms-menu-desktop { display: none; }
.twlms-menu-mobile { border: 1px solid var(--cr-line); border-radius: 14px; padding: 0.9rem 1.1rem; background: var(--cr-card); margin-bottom: 1.2rem; }
.twlms-menu-mobile summary { cursor: pointer; font-weight: 700; color: var(--cr-ink); list-style: none; }
.twlms-menu-mobile summary::-webkit-details-marker { display: none; }
.twlms-menu-mobile .twlms-menu { margin-top: 0.8rem; }
.twlms-menu__title { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--cr-muted); margin: 0 0 0.8rem; }
.twlms-menu__section { font-weight: 700; color: var(--cr-ink); margin: 1rem 0 0.4rem; font-size: 0.95rem; }
.twlms-menu__list { list-style: none; margin: 0; padding: 0; }
.twlms-menu__list li a { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0.6rem; border-radius: 10px; color: var(--cr-ink); text-decoration: none; line-height: 1.4; }
.twlms-menu__list li a:hover { background: var(--cr-soft); }
.twlms-menu__list li.is-current a { background: var(--cr-soft); font-weight: 700; box-shadow: inset 3px 0 0 var(--cr-accent); }
.twlms-menu__list .bi-check-circle-fill { color: #2e7d5b; }
.twlms-menu__list .bi-circle { color: #b9a9c6; }
.twlms-menu__list .bi { margin-top: 0.2rem; flex: 0 0 auto; }
.twlms-chip { display: inline-block; background: var(--cr-soft); color: var(--cr-ink); border: 1px solid var(--cr-line); padding: 0.25rem 0.8rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; margin: 0 0 0.6rem; }
.twlms-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); line-height: 1.2; margin: 0 0 1.2rem; color: var(--cr-ink); }
.twlms-stage { background: #000; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 40px -22px rgba(43, 19, 56, 0.55); margin-bottom: 1.4rem; }
.twlms-stage video, .twlms-stage .twlms-player-frame { display: block; width: 100%; }
.twlms-player { width: 100%; height: auto; max-height: 75vh; background: #000; }
.twlms-player-frame { position: relative; aspect-ratio: 16 / 9; }
.twlms-player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.twlms-card { background: var(--cr-card); border: 1px solid var(--cr-line); border-radius: 18px; padding: 1.5rem 1.6rem; margin: 0 0 1.4rem; }
.twlms-card--center { text-align: center; }
.twlms-lesson-body { font-size: 1.05rem; line-height: 1.75; color: var(--cr-ink); }
.twlms-lesson-body h1, .twlms-lesson-body h2, .twlms-lesson-body h3 { color: var(--cr-ink); line-height: 1.3; margin: 1.4rem 0 0.6rem; }
.twlms-lesson-body p { margin: 0 0 1rem; }
.twlms-lesson-body ul, .twlms-lesson-body ol { padding-left: 1.3rem; }
.twlms-lesson-body img { max-width: 100%; height: auto; border-radius: 12px; }
.twlms-heading { font-size: 1.2rem; margin: 1.8rem 0 0.8rem; color: var(--cr-ink); display: flex; align-items: center; gap: 0.5rem; }
.twlms-files { display: grid; gap: 0.8rem; grid-template-columns: 1fr; margin-bottom: 1.4rem; }
.twlms-file { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.8rem; align-items: center; padding: 0.9rem 1.1rem; border: 1px solid var(--cr-line); border-radius: 14px; background: var(--cr-card); color: var(--cr-ink); text-decoration: none; }
.twlms-file:hover { border-color: var(--cr-accent); box-shadow: 0 10px 22px -16px rgba(43, 19, 56, 0.5); }
.twlms-file .bi { grid-row: span 2; font-size: 1.6rem; color: var(--cr-accent); }
.twlms-file span { font-weight: 600; word-break: break-word; }
.twlms-file small { color: var(--cr-muted); }
.twlms-complete { background: var(--cr-soft); border: 1px dashed var(--cr-line); border-radius: 16px; padding: 1.1rem 1.2rem; text-align: center; margin-bottom: 1.4rem; }
.twlms-complete.is-done { border-style: solid; border-color: #bfe3d2; background: #f2fbf6; color: #1e5b41; }
.twlms-complete p { margin: 0; font-weight: 600; }
.twlms-complete__btn { font-size: 1.05rem; padding: 0.9rem 1.6rem; }
.twlms-pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.twlms-pager__link { display: inline-flex; gap: 0.5rem; align-items: center; padding: 0.7rem 1rem; border-radius: 999px; border: 1px solid var(--cr-line); color: var(--cr-ink); text-decoration: none; font-weight: 600; background: var(--cr-card); }
.twlms-pager__link:hover { border-color: var(--cr-accent); }
.twlms-pager__link--next { margin-left: auto; }
.twlms-finish { font-weight: 700; color: #1e5b41; margin: 0; }
.twlms-finish .bi { color: var(--cr-accent); }
@media (min-width: 900px) {
	.twlms-classroom__layout { grid-template-columns: 300px 1fr; align-items: start; }
	.twlms-menu-desktop { display: block; position: sticky; top: 110px; max-height: calc(100vh - 130px); overflow-y: auto; background: var(--cr-card); border: 1px solid var(--cr-line); border-radius: 18px; padding: 1.1rem 1rem; }
	.twlms-menu-mobile { display: none; }
	.twlms-files { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.twlms-card { padding: 1.1rem 1rem; border-radius: 14px; }
	.twlms-lesson-body { font-size: 1rem; }
	.twlms-stat .twlms-progress { width: 140px; }
	.twlms-pager__link { flex: 1 1 100%; justify-content: center; }
	.twlms-pager__link--next { margin-left: 0; }
}

/* ---------- v0.5.0: course category, filter tabs, view-only PDFs ---------- */
.twlms-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 1.5rem; }
.twlms-tabs a { padding: 0.5rem 1.1rem; border-radius: 999px; border: 1px solid #e4dcea; color: #2b1338; text-decoration: none; font-weight: 600; background: #fff; }
.twlms-tabs a.is-active, .twlms-tabs a:hover { background: #2b1338; color: #fff; border-color: #2b1338; }
.twlms-kind { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #6b5f75; margin-bottom: 0.3rem; }
.twlms-pdf { margin: 0 0 1.4rem; }
.twlms-pdf figcaption { font-weight: 600; margin-bottom: 0.5rem; color: #2b1338; }
.twlms-pdf iframe { display: block; width: 100%; height: 75vh; min-height: 420px; border: 1px solid #e6dcef; border-radius: 14px; background: #f4f0f7; }
@media (max-width: 640px) { .twlms-pdf iframe { height: 65vh; min-height: 360px; } }

/* ---------- v0.6.0: e-books as books, PDF scroll view, quizzes ---------- */
.twlms-course-list--books { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.8rem 1.4rem; }
.twlms-course-card--book .twlms-course-thumb { display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 4px 10px 10px 4px; box-shadow: inset 6px 0 0 -2px rgba(0, 0, 0, 0.28), 0 16px 24px -14px rgba(43, 19, 56, 0.6); }
.twlms-course-card--book .twlms-course-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.twlms-pdf iframe { height: 85vh; min-height: 560px; }
@media (max-width: 640px) { .twlms-pdf iframe { height: 75vh; min-height: 440px; } }
.twlms-quiz fieldset { border: 1px solid var(--cr-line); border-radius: 12px; padding: 0.9rem 1rem; margin: 0 0 1rem; }
.twlms-quiz legend { font-weight: 600; padding: 0 0.4rem; }
.twlms-quiz label { display: block; padding: 0.3rem 0; }
.twlms-quiz__result { font-weight: 600; padding: 0.8rem 1rem; border-radius: 12px; margin: 0 0 1rem; }
.twlms-quiz__result.is-pass { background: #f2fbf6; color: #1e5b41; }
.twlms-quiz__result.is-fail { background: #fdf3f3; color: #7a2a2a; }


/* ---------- v0.7.0: bolder, non-pastel course pages, member learning, PDF reader, video progress, certificates ---------- */
.twlms-classroom { --cr-ink: #140a1c; --cr-muted: #3b2a48; --cr-line: #4b0f7a; --cr-card: #ffffff; --cr-accent: #b8860b; --cr-soft: #e6d6f7; }
.twlms-classroom .twlms-card, .twlms-classroom .twlms-menu-desktop, .twlms-classroom .twlms-menu-mobile { border: 2px solid #4b0f7a; }
.twlms-classroom .twlms-title { font-weight: 900; }
.twlms-classroom .twlms-heading { font-weight: 900; }
.twlms .twlms-tabs a { border: 2px solid #1a0b24; color: #140a1c; font-weight: 800; background: #fff; }
.twlms .twlms-tabs a.is-active, .twlms .twlms-tabs a:hover { background: #4b0f7a; border-color: #4b0f7a; color: #fff; }
.twlms .twlms-course-card { border: 2px solid #1a0b24; border-radius: 16px; background: #fff; box-shadow: 6px 6px 0 #1a0b24; padding: 1.2rem 1.3rem; }
.twlms .twlms-course-card--book { box-shadow: none; padding: 0.6rem; }
.twlms .twlms-course-title { font-weight: 900; font-size: 1.35rem; line-height: 1.2; color: #140a1c; }
.twlms .twlms-course-title a { color: #140a1c; text-decoration: none; }
.twlms .twlms-kind { background: #4b0f7a; color: #fff; padding: 0.25rem 0.6rem; border-radius: 6px; font-weight: 800; letter-spacing: 0.06em; }
.twlms .twlms-price { font-weight: 900; color: #6b4a00; font-size: 1.15rem; }
.twlms .twlms-note { color: #3b2a48; font-weight: 700; }
.twlms .twlms-details { border-top: 2px solid #1a0b24; }
.twlms .twlms-details summary { font-weight: 800; color: #140a1c; }
.twlms .twlms-section { font-weight: 900; color: #4b0f7a; }
.twlms .twlms-lessons li { font-weight: 600; color: #140a1c; }
.twlms .twlms-progress { height: 10px; background: #d9c4f0; border-radius: 999px; overflow: hidden; margin: 0.5rem 0; }
.twlms .twlms-progress span { display: block; height: 100%; background: #4b0f7a; }
.twlms-course-list { gap: 1.8rem; }

/* Member's own learning block (top of /courses/) */
.twlms-learning { background: #4b0f7a; color: #fff; border-radius: 18px; padding: 1.4rem 1.5rem; margin: 0 0 2rem; }
.twlms-learning__title { color: #fff; font-size: 1.6rem; font-weight: 900; margin: 0 0 0.6rem; }
.twlms-learning__group { color: #f3d98b; font-size: 1.05rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; margin: 1.2rem 0 0.6rem; }
.twlms-learning__grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .twlms-learning__grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.twlms-learning__item { background: #fff; color: #140a1c; border-radius: 14px; padding: 1rem 1.1rem; border: 2px solid #1a0b24; }
.twlms-learning__item h4 { margin: 0 0 0.5rem; font-size: 1.1rem; font-weight: 900; }
.twlms-learning__item h4 a { color: #140a1c; text-decoration: none; }
.twlms-learning__item .twlms-note { color: #3b2a48; }
.twlms-learning__cert { font-weight: 800; color: #4b0f7a; text-decoration: underline; }

/* View-only PDF reader: pages drawn on the page, no download, print or save controls */
.twlms-pdf { margin: 0 0 1.4rem; }
.twlms-pdf figcaption { font-weight: 800; margin-bottom: 0.5rem; color: #140a1c; }
.twlms-pdf-viewer { height: 85vh; min-height: 560px; overflow-y: auto; background: #3b2a48; border-radius: 14px; padding: 12px; user-select: none; -webkit-user-select: none; }
.twlms-pdf-page { display: block; margin: 0 auto 12px; max-width: 100%; background: #fff; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.6); }
.twlms-pdf-status { color: #fff; text-align: center; padding: 2rem 1rem; margin: 0; }
@media (max-width: 640px) { .twlms-pdf-viewer { height: 75vh; min-height: 440px; } }
@media print { .twlms-pdf, .twlms-pdf-viewer { display: none !important; } }

/* Video progress */
.twlms-watch__text, .twlms-watch__pct { margin: 0 0 0.4rem; }
.twlms-watch__pct { font-weight: 800; }
.twlms-watch__bar { max-width: 420px; margin: 0.6rem auto; }
.twlms-menu__tag { font-style: normal; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; background: #4b0f7a; color: #fff; padding: 0.1rem 0.45rem; border-radius: 6px; align-self: center; margin-left: 0.3rem; }
.twlms-menu__list .bi-patch-question { color: #4b0f7a; }
.twlms-complete.twlms-watch { background: #e6d6f7; border: 2px solid #4b0f7a; }

/* ---------- v0.8.0: sequential lessons, PDF download button, lesson menu locks, quizzes group ---------- */
.twlms-menu__list li.is-locked span { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0.6rem; color: #8a7d96; line-height: 1.4; }
.twlms-menu__list li.is-locked .bi-lock-fill { color: #8a7d96; margin-top: 0.2rem; flex: 0 0 auto; }
.twlms-pager__link--locked { background: #efe9f4; color: #6b5f75; border-color: #d9c4f0; cursor: not-allowed; }
.twlms-pdf-download { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin: 1.6rem 0 0.4rem; }
.twlms-pdf-download .btn { display: inline-flex; gap: 0.5rem; align-items: center; }
@media print { .twlms-pdf-download { display: none !important; } }

/* ---------- v0.9.0: MP3 audio player, course on lessons, quizzes section ---------- */
.twlms-stage:has(.twlms-audio) { background: none; box-shadow: none; border-radius: 0; }
.twlms-audio { background: #ffffff; border: 2px solid #4b0f7a; border-radius: 18px; padding: 1.1rem 1.2rem; margin-bottom: 1.4rem; box-shadow: 6px 6px 0 #b8860b; }
.twlms-audio__el { display: none; }
.twlms-audio__bar { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.twlms-audio__btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; width: 56px; height: 56px; border-radius: 50%; border: 0; background: #4b0f7a; color: #ffffff; font-size: 1.5rem; cursor: pointer; flex: 0 0 auto; }
.twlms-audio__btn:hover, .twlms-audio__btn:focus-visible { background: #b8860b; outline: none; }
.twlms-audio__btn--alt { width: auto; border-radius: 999px; height: 44px; padding: 0 1rem; font-size: 1rem; background: #ffffff; color: #4b0f7a; border: 2px solid #4b0f7a; font-weight: 800; }
.twlms-audio__btn--alt:hover, .twlms-audio__btn--alt:focus-visible { background: #4b0f7a; color: #ffffff; }
.twlms-audio__seek { flex: 1 1 200px; accent-color: #4b0f7a; min-width: 0; }
.twlms-audio__time { font-weight: 800; color: #140a1c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.twlms-course-of { margin: -0.4rem 0 1.2rem; font-weight: 700; color: #3b2a48; }
.twlms-course-of a { color: #4b0f7a; font-weight: 800; }

/* ---------- v0.10.0: lessons shown on each course card ---------- */
.twlms-curriculum { border-top: 2px solid #1a0b24; padding: 0.8rem 0; }
.twlms-curriculum__title { font-size: 1.05rem; font-weight: 900; color: #140a1c; margin: 0.2rem 0 0.4rem; }
.twlms .twlms-lessons { margin: 0 0 0.6rem; padding-left: 1.3rem; }
.twlms .twlms-lessons li { padding: 0.2rem 0; }
.twlms .twlms-lessons li.is-done a::after { content: " \2713"; color: #2e7d5b; font-weight: 900; }
.twlms .twlms-lessons li.is-done { color: #2e7d5b; }

/* v0.10.2: extra buttons under YouTube lesson videos */
.twlms-yt-bar { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.7rem; }

/* v0.10.3: click shield over YouTube iframe, YouTube's own controls are hidden */
.twlms-player-frame iframe[src*="youtube-nocookie"] { pointer-events: none; }
.twlms-yt-shield { position: absolute; inset: 0; z-index: 2; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.twlms-yt-vol { display: inline-flex; align-items: center; min-width: 140px; }
.twlms-yt-vol input { width: 140px; accent-color: #4b0f7a; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* v0.10.9: My Account dashboard */
.twlms-account { display: grid; gap: 1.2rem; }
.twlms-account__box { background: #fff; border: 1px solid #e4dcec; border-radius: 16px; padding: 1.2rem; }
.twlms-account__box h3 { margin: 0 0 0.6rem; color: #2b1338; }
.twlms-account__courses { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.twlms-account__course { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between; align-items: center; border-bottom: 1px solid #e4dcec; padding-bottom: 0.9rem; }
.twlms-account__course:last-child { border-bottom: 0; }
.twlms-account__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.twlms-account__avatar { border-radius: 50%; }
.twlms-account__remove { margin-top: 0.6rem; }
.twlms-account__notice { background: #f1ebf7; border-top: 4px solid #9564B1; border-radius: 12px; padding: 0.8rem 1rem; margin: 0; }
.twlms-account__links { text-align: center; }

/* v0.11.1: lesson preview is hidden until the Preview button is pressed */
.twlms-preview { margin: 1.5rem 0; }
.twlms-preview > summary { display: inline-block; cursor: pointer; list-style: none; }
.twlms-preview > summary::-webkit-details-marker { display: none; }
.twlms-preview[open] > summary { margin-bottom: 1rem; }

/* v0.11.1: My Account dashboard uses the theme's look */
.twlms-account { font-family: var(--tw-font, Georgia, serif); color: var(--tw-ink, #253031); font-size: 1.1rem; line-height: 1.6; }
.twlms-account h2, .twlms-account h3 { font-family: var(--tw-font, Georgia, serif); color: var(--tw-purple-deep, #2b1338); }
.twlms-account__box { background: #fff; border: 1px solid var(--tw-line, #e4dcec); border-radius: 16px; }
.twlms-account__course { border-bottom-color: var(--tw-line, #e4dcec); }
.twlms-account__notice { background: var(--tw-lavender, #f1ebf7); border-top-color: var(--tw-purple, #9564B1); color: var(--tw-purple-deep, #2b1338); }
.twlms-account .twlms-progress { background: var(--tw-lavender, #f1ebf7); }
.twlms-account .twlms-progress span { background: var(--tw-purple, #9564B1); }
.twlms-account .twlms-note { color: var(--tw-muted, #5b6669); }
.twlms-account a { color: var(--tw-purple, #9564B1); }
.twlms-account input[type="file"] { max-width: 100%; }
