/* Public Lessons directory + study viewer — white/blue theme (boardsy-home.css tokens). */
.pl-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--line, #dce6f5); background: #fff;
  position: sticky; top: 0; z-index: 10;
}
.pl-nav .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink, #0f1e35); text-decoration: none; font-size: 1.15rem; }
.pl-nav .brand img { width: 30px; height: 30px; }
.pl-nav-links { display: flex; align-items: center; gap: 16px; }
.pl-nav-links > a:not(.btn) { color: var(--muted, #5a6b85); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.pl-nav-links > a.active { color: var(--brand, #2563ff); }

.pl-main { max-width: 1100px; margin: 0 auto; padding: 34px 24px 60px; }
.pl-head .eyebrow { color: var(--brand, #2563ff); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.pl-head h1 { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 2rem; margin: 6px 0 8px; color: var(--ink, #0f1e35); }
.pl-lede { color: var(--muted, #5a6b85); max-width: 640px; margin: 0 0 22px; }

.pl-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.pl-filters input, .pl-filters select {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line, #dce6f5);
  border-radius: 10px; background: var(--panel, #f3f7ff); color: var(--ink, #0f1e35);
}
.pl-filters input[type="search"] { flex: 1; min-width: 220px; }

.pl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pl-empty { color: var(--muted, #5a6b85); grid-column: 1 / -1; }
.pl-card {
  background: #fff; border: 1px solid var(--line, #dce6f5); border-radius: 16px;
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 6px 18px rgba(15,30,53,0.05);
}
.pl-card-top { display: flex; gap: 6px; }
.pl-card h3 { margin: 2px 0; font-size: 1.08rem; color: var(--ink, #0f1e35); font-family: 'Space Grotesk', Inter, sans-serif; }
.pl-meta { color: var(--ink, #1f3a5f); font-size: 0.88rem; margin: 0; }
.pl-by { color: var(--muted, #5a6b85); font-size: 0.8rem; margin: 0; }
.pl-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; align-items: center; flex-wrap: wrap; }

.subj-badge { display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.subj-badge.math { background: rgba(37,99,255,0.12); color: #2563ff; }
.subj-badge.science { background: rgba(18,181,166,0.14); color: #0f9c8f; }
.type-badge { display: inline-block; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.type-badge.board { background: rgba(37,99,255,0.12); color: #2563ff; }
.type-badge.lesson { background: rgba(147,112,255,0.14); color: #6d4fd6; }

.pl-stars { display: inline-flex; align-items: center; gap: 1px; }
.pl-star { border: 0; background: none; cursor: pointer; font-size: 1.05rem; line-height: 1; color: #d7deea; padding: 0 1px; }
.pl-star.on { color: #ffb020; }
.pl-star:hover { color: #ffcf6b; }
.pl-rating-count { margin-left: 8px; font-size: 0.78rem; color: var(--muted, #5a6b85); }
.pl-stars.big .pl-star { font-size: 1.6rem; }

/* Study viewer */
.study-main { max-width: 820px; }
.study-head-pub .eyebrow { color: var(--brand, #2563ff); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.study-head-pub h1 { font-family: 'Space Grotesk', Inter, sans-serif; margin: 6px 0; color: var(--ink, #0f1e35); }
.study-cards { display: grid; gap: 12px; margin: 18px 0; }
.study-item { border: 1px solid var(--line, #dce6f5); border-radius: 12px; padding: 14px 16px; background: #fff; }
.study-item .sc-front, .study-item .sc-q, .study-item .sc-title { font-weight: 700; margin-bottom: 6px; color: var(--ink, #0f1e35); }
.study-item .sc-back, .study-item .sc-ans { color: #1f3a5f; }
.study-item .sc-opts { margin: 6px 0 0; padding-left: 18px; }
.study-rate { display: flex; align-items: center; gap: 10px; padding: 16px; border-top: 1px solid var(--line, #dce6f5); margin-top: 10px; }
.pl-rate-label { font-weight: 600; color: var(--ink, #0f1e35); }

/* ===== One-line filters (works on Library too; overrides global width:100%) ===== */
.pl-filters, .library-filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.pl-filters input[type="search"], .library-filter-row input[type="search"] { flex: 1 1 240px; width: auto !important; min-width: 200px; }
.pl-filters select, .library-filter-row select { width: auto !important; flex: 0 0 auto; min-width: 130px; padding: 9px 12px !important; border-radius: 10px !important; }
.library-filter-row input[type="search"] { padding: 9px 12px !important; border-radius: 10px !important; }
@media (max-width: 620px) { .pl-filters, .library-filter-row { flex-direction: column; align-items: stretch; } .pl-filters input, .pl-filters select, .library-filter-row input, .library-filter-row select { width: 100% !important; } }

/* ===== Dense metadata list (both Public Lessons and Library) ===== */
.row-list { border: 1px solid var(--line, #dce6f5); border-radius: 12px; overflow: hidden; background: #fff; }
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-bottom: 1px solid var(--line, #eef2fa);
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #f7faff; }
.lr-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lr-titleline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lr-title { font-weight: 700; font-size: 0.94rem; color: var(--ink, #0f1e35); text-decoration: none; }
.lr-title:hover { color: var(--brand, #2563ff); }
.lr-meta { font-size: 0.78rem; color: var(--muted, #5a6b85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-rate { flex: 0 0 auto; }
.lr-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }

/* Extra-small buttons for dense rows */
.btn.xs { padding: 5px 10px !important; font-size: 0.78rem !important; border-radius: 8px !important; line-height: 1.1; }

/* Compact badges/pills inside rows */
.list-row .type-badge { font-size: 0.6rem; padding: 1px 6px; }
.list-row .subj-badge, .list-row .pub-pill { font-size: 0.64rem; padding: 1px 7px; }
.list-row .pl-stars .pl-star { font-size: 0.92rem; }
.list-row .pl-rating-count { font-size: 0.72rem; }
.list-empty { padding: 16px; color: var(--muted, #5a6b85); }

/* Pagination footer */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 4px 0; font-size: 0.82rem; color: var(--muted, #5a6b85); }
.pager-info { margin-right: auto; }
.pager-btn {
  border: 1px solid var(--line, #dce6f5); background: #fff; color: var(--ink, #0f1e35);
  border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 0.82rem; cursor: pointer;
}
.pager-btn:disabled { opacity: 0.4; cursor: default; }
.pager-btn:not(:disabled):hover { border-color: var(--brand, #2563ff); color: var(--brand, #2563ff); }

/* ===== Public lesson slide/flashcard/quiz rendering ===== */
.study-slide {
  border: 1px solid var(--line, #dce6f5); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px;
  background: #fff; box-shadow: 0 4px 14px rgba(15,30,53,0.05);
}
.ss-kicker { color: var(--brand, #2563ff); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.ss-title { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 1.15rem; margin: 0 0 12px; color: var(--ink, #0f1e35); }
.ss-body { display: flex; gap: 18px; align-items: flex-start; }
.ss-body.has-media .ss-text { flex: 1; }
.ss-media { flex: 0 0 42%; max-width: 42%; margin: 0; }
.ss-media img { width: 100%; border-radius: 10px; display: block; border: 1px solid var(--line, #dce6f5); }
.ss-media figcaption { font-size: 0.7rem; color: var(--muted, #5a6b85); margin-top: 4px; }
.ss-text { flex: 1; min-width: 0; }
.ss-text ul { margin: 0; padding-left: 20px; line-height: 1.6; color: #1f3a5f; }
.ss-text li { margin-bottom: 4px; }
.ss-stat { padding: 8px 0; }
.ss-stat strong { font-size: 2rem; color: var(--brand, #2563ff); display: block; font-family: 'Space Grotesk', Inter, sans-serif; }
.ss-stat span { color: var(--muted, #5a6b85); }
.ss-quote { border-left: 3px solid var(--brand, #2563ff); margin: 0; padding: 4px 0 4px 14px; font-style: italic; color: #1f3a5f; }
.ss-quote cite { display: block; font-style: normal; font-size: 0.82rem; color: var(--muted, #5a6b85); margin-top: 6px; }
.ss-notes { color: var(--muted, #5a6b85); font-size: 0.86rem; margin: 10px 0 0; }
@media (max-width: 640px) { .ss-body { flex-direction: column; } .ss-media, .ss-body.has-media .ss-media { max-width: 100%; flex-basis: auto; } }

.study-item .sc-note { color: var(--muted, #5a6b85); font-size: 0.82rem; margin-top: 6px; }
.sc-opts li.correct { color: #0f9c8f; font-weight: 600; }
.qa-tag { font-size: 0.72rem; color: #0f9c8f; }

.live-badge { display: inline-block; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 999px; background: rgba(226,59,59,0.14); color: #e23b3b; animation: livePulse 1.4s infinite; }
@keyframes livePulse { 50% { opacity: 0.5; } }
