/* Reading progress surfaces on the PUBLIC LISTING pages (21.10.2026, continuous reading Phase 3):
   the home-page shelf «پڑھنا جاری رکھیں» (index.html) and the per-chapter progress chip on the book
   page (book.html). Built by /js/reading-progress.js. Green palette = the home page's own. */

/* ---------------------------------------------------------------- home shelf */
.continue-shelf { background-color: #e8f5e9; padding: 10px 0 0; direction: rtl; }
.continue-shelf[hidden] { display: none; }
.rs-inner { max-width: 1100px; margin: 0 auto; padding: 0 15px; box-sizing: border-box; }
.continue-shelf .rs-heading {
    margin: 0 0 6px; text-align: right; font-size: 1.25em; color: #388e3c; line-height: 1.6;
}
.rs-row {
    display: flex; flex-direction: row; gap: 14px; overflow-x: auto; padding: 2px 2px 12px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.rs-card {
    position: relative; flex: 0 0 230px; width: 230px; box-sizing: border-box; scroll-snap-align: start;
    background: #ffffff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rs-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.rs-link {
    display: flex; flex-direction: column; gap: 2px; height: 100%; box-sizing: border-box;
    padding: 8px 12px 10px 30px; color: inherit; text-decoration: none; text-align: right;
}
.rs-title {
    font-size: 1em; font-weight: bold; line-height: 1.8; color: #2c3e50;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rs-book { font-size: 0.8em; line-height: 1.7; color: #7a8a80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.rs-meter { flex: 1 1 auto; height: 4px; border-radius: 2px; background: #dcedc8; overflow: hidden; }
.rs-meter i { display: block; height: 100%; background: #4CAF50; }   /* RTL: the width grows from the right */
.rs-pct { flex: 0 0 auto; font-size: 0.8em; line-height: 1.4; color: #388e3c; }
.rs-x {
    position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: #9aa8a0; font-size: 12px; line-height: 1; cursor: pointer;
}
.rs-x:hover { background: #eef5ee; color: #333; }
.rs-link:focus-visible, .rs-x:focus-visible { outline: 2px solid #4CAF50; outline-offset: 2px; border-radius: 8px; }
@media (max-width: 768px) {
    .rs-card { flex-basis: 68vw; width: 68vw; max-width: 250px; }
    .continue-shelf .rs-heading { font-size: 1.15em; }
}

/* ---------------------------------------------------------------- book page chapter chip */
.rp-ch { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 10px; vertical-align: middle; font-size: 0.8em; color: #388e3c; line-height: 1.4; }
.rp-ch.done { color: #2e7d32; font-weight: bold; }
.rp-ch-meter { display: inline-block; width: 48px; height: 4px; border-radius: 2px; background: #dcedc8; overflow: hidden; }
.rp-ch-meter i { display: block; height: 100%; background: #4CAF50; }
