/* Resource views are scoped; shared topic library cards/search and the Quran are unchanged. */
.irtl-library{--r-bg:#fff;--r-ink:#183d30;--r-edge:#c9dfd0;--r-accent:#216e49;--r-soft:#eff7f0;--r-muted:#526f60;color:var(--r-ink);padding:24px;box-sizing:border-box;border:1px solid var(--r-edge);border-radius:24px;background:var(--r-bg);overflow-wrap:anywhere}
:is(html[data-irhp-theme=dark],html.dark,html[data-theme=dark],body.dark-mode,body.irhp-dark) .irtl-library{--r-bg:#13271e;--r-ink:#e1f2e6;--r-edge:#41634e;--r-accent:#94e2ad;--r-soft:#1e392a;--r-muted:#b3cdbd;color-scheme:dark}
.irtl-library *{box-sizing:border-box}.irtl-library [hidden]{display:none!important}.irtl-library :is(h1,h2,h3,p){color:inherit}.irtl-library :is(a,button,input,select):focus-visible{outline:3px solid #69bd8d;outline-offset:3px}.irtl-library a{color:var(--r-accent)}.irtl-library a:hover{color:var(--r-accent)}
.irtl-breadcrumb{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px;color:var(--r-muted)}.irtl-breadcrumb a{text-decoration:none}.irtl-heading{padding-block:18px 10px}.irtl-heading>span{color:var(--r-muted);font-size:12px;letter-spacing:.03em}.irtl-heading h1{font-size:clamp(24px,3vw,34px);margin:6px 0 10px;line-height:1.6}.irtl-heading p{margin:0;font-size:14px}.irtl-notice{padding:14px 18px;border:1px solid var(--r-edge);border-radius:14px;background:var(--r-soft);font-size:14px}
.irtl-topics{display:flex;flex-wrap:wrap;gap:8px;margin-block:18px 22px}.irtl-topics a{display:inline-flex;align-items:center;min-height:40px;padding:8px 14px;border:1px solid var(--r-edge);border-radius:12px;text-decoration:none;font-size:13px;background:var(--r-bg);line-height:1.5}.irtl-topics a:hover,.irtl-topics a[aria-current=page]{color:#fff;background:#245e43;border-color:#245e43}
body .irtl-library .irtl-filters{display:grid;grid-template-columns:minmax(160px,2fr) minmax(170px,1.4fr) minmax(130px,1fr) auto;gap:18px;align-items:end;margin:0 0 26px}
body .irtl-library .irtl-filters>label{display:grid;gap:8px;min-width:0;margin:0!important;color:var(--r-ink)!important;font-size:14px;font-weight:600;line-height:1.6}
body .irtl-library .irtl-filters :is(input:not([type=hidden]),select,button[type=submit]){box-sizing:border-box!important;width:100%!important;max-width:100%;min-width:0;height:52px!important;min-height:52px!important;margin:0!important;padding:0 14px!important;border:1px solid var(--r-edge);border-radius:12px;font:inherit;line-height:1.5;color:var(--r-ink);background:var(--r-bg)}
body .irtl-library .irtl-filters button[type=submit]{background:#245e43;color:white;border-color:#245e43;white-space:normal}
.irtl-button,.irtl-pagination a{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid var(--r-edge,#c9dfd0);border-radius:12px;color:var(--r-accent,#216e49);background:var(--r-soft,#eff7f0);font:inherit;font-size:14px;text-decoration:none;cursor:pointer;line-height:1.5}.irtl-button svg{width:20px;height:20px;fill:currentColor;flex-shrink:0}.irtl-button:hover,.irtl-pagination a:hover{border-color:var(--r-accent,#216e49);background:var(--r-soft,#eff7f0)}
.irtl-workspace{scroll-margin-top:110px;border:1px solid var(--r-edge);padding:22px;border-radius:20px;min-width:0}.irtl-material h2{font-size:clamp(21px,3vw,28px);margin:5px 0 10px;line-height:1.65}.irtl-material p{font-size:13px;margin:0 0 8px;color:var(--r-muted)}.irtl-material{margin-bottom:18px}
.irtl-playlist{list-style:none!important;display:grid;gap:8px;max-height:360px;overflow:auto;overscroll-behavior:contain;padding:3px!important;margin:18px 0!important;scrollbar-color:#a8c9b5 transparent}.irtl-playlist li{margin:0;list-style:none}.irtl-playlist button{display:grid;grid-template-columns:36px minmax(0,1fr) 22px;align-items:center;gap:12px;width:100%;padding:12px!important;min-height:66px;border:1px solid var(--r-edge);border-radius:14px;text-align:start;font:inherit;color:var(--r-ink);background:var(--r-bg);cursor:pointer}.irtl-playlist strong{font-size:14px;font-weight:600;line-height:1.6}.irtl-track-number{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--r-soft);font-size:12px}.irtl-playlist button:hover{border-color:var(--r-accent)}.irtl-playlist button.is-current{color:#fff;background:linear-gradient(125deg,#28794e,#14523a);border-color:#216e49}.irtl-playlist .is-current .irtl-track-number{color:#f3e1aa;background:#ffffff18}
.irtl-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin-block:20px}.irtl-pagination span{font-size:13px}.irtl-library details{border:1px solid var(--r-edge);border-radius:14px;margin-block:20px;padding:14px}.irtl-library summary{font-size:14px;font-weight:700;color:var(--r-accent);cursor:pointer;line-height:1.6}.irtl-source{font-size:14px;line-height:1.9}.irtl-source p{margin-block:16px}
.irtl-choices .irtl-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-block:16px 0;max-height:480px;overflow:auto}.irtl-results>a{display:flex;flex-direction:column;gap:6px;border:1px solid var(--r-edge);border-radius:12px;padding:14px;text-decoration:none;color:var(--r-ink);background:var(--r-bg);min-width:0}.irtl-results>a:hover{border-color:var(--r-accent);background:var(--r-soft)}.irtl-results h3{font-size:15px;margin:0;line-height:1.7}.irtl-results p,.irtl-results small{font-size:12px;margin:0;color:var(--r-muted)}
.irtl-source-text{margin-block:24px;border-block:1px solid var(--r-edge);padding-block:18px;scroll-margin-top:110px}.irtl-source-text h3{margin:0;font-size:18px}.irtl-source-text>p{font-size:13px;color:var(--r-muted)}.irtl-text{white-space:pre-wrap;font-size:18px;line-height:2.15;overflow-wrap:anywhere;padding-block:16px}.irtl-files ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;list-style:none;padding:0;margin:16px 0 0}.irtl-files li{list-style:none;min-width:0}.irtl-files a{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--r-edge);border-radius:12px;text-decoration:none}.irtl-files small{font-size:11px;color:var(--r-muted)}
.irtl-tf-player .irtl-audio-workspace__actions{flex-wrap:wrap}.irtl-tf-player button:hover{background-color:#ffffff25}.irtl-tf-player .irtl-audio-workspace__photo-fallback{display:grid;place-items:center;font-size:52px;aspect-ratio:1;width:130px;border-radius:50%;background:#ffffff0c;color:#9fe5bb;border:1px solid #b7f1d12b}.irtl-tf-player .irtl-audio-workspace__visual{position:relative}.irtl-tf-player .irtl-audio-workspace__halo{max-width:160px}.irtl-tf-player input{box-sizing:border-box}.irtl-tf-player label{color:#fff!important}
@media(max-width:1000px){body .irtl-library .irtl-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.irtl-library{padding:20px}}
@media(max-width:580px){.irtl-library{padding:14px;border-radius:18px}.irtl-workspace{padding:0;border:0}.irtl-topics{gap:7px}.irtl-topics a{flex:1 1 calc(50% - 8px);justify-content:center;text-align:center;font-size:12px;padding:8px}.irtl-heading h1{font-size:24px}body .irtl-library .irtl-filters{grid-template-columns:minmax(0,1fr);gap:14px}.irtl-choices .irtl-results,.irtl-files ul{grid-template-columns:minmax(0,1fr)}.irtl-tf-player .irtl-audio-workspace__photo-fallback{width:82px;font-size:36px}.irtl-playlist button{gap:8px}.irtl-text{font-size:17px}.irtl-library details{padding:12px}.irtl-tf-player .irtl-audio-workspace__timeline-group{grid-template-columns:minmax(0,1fr);gap:10px}.irtl-tf-player .irtl-audio-workspace__timeline-group>.irtl-audio-workspace__timeline{grid-column:1!important;grid-row:1!important}.irtl-tf-player .irtl-audio-workspace__timeline-group>.irtl-workspace-volume{grid-column:1;grid-row:2;justify-self:center;width:130px}}
@media(prefers-reduced-motion:reduce){.irtl-library *{scroll-behavior:auto!important;transition:none!important}}
.irtl-library .irtl-filters .irtl-mobile-topic{display:none}
.irtl-filter-toggle{display:none}
.irtl-course ol{max-height:280px;overflow:auto;padding-inline-start:24px;line-height:1.9}.irtl-course a[aria-current=page]{font-weight:700}
.irtl-tf-player .irtl-workspace-volume svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:580px){.irtl-topics{display:none}body .irtl-library .irtl-filters{grid-template-columns:repeat(2,minmax(0,1fr))}body .irtl-library .irtl-filters>label:first-of-type,body .irtl-library .irtl-filters>button,body .irtl-library .irtl-filters .irtl-mobile-topic{grid-column:1/-1}body .irtl-library .irtl-filters .irtl-mobile-topic{display:grid}}
@media(max-width:580px){body .irtl-library[data-irtl-ready] .irtl-filters:not(.is-open)>label:not(:nth-of-type(2)),body .irtl-library[data-irtl-ready] .irtl-filters:not(.is-open)>button[type=submit]{display:none!important}body .irtl-library[data-irtl-ready] .irtl-filters>label:nth-of-type(2){grid-column:1;grid-row:1}body .irtl-library[data-irtl-ready] .irtl-filter-toggle{display:flex;grid-column:2;grid-row:1;height:52px;min-height:52px;margin:0;padding:8px;font-size:12px}body .irtl-library[data-irtl-ready] .irtl-filters.is-open>label:first-of-type{grid-row:2}body .irtl-library[data-irtl-ready] .irtl-filters.is-open>label:nth-of-type(3){grid-row:3;grid-column:1}body .irtl-library[data-irtl-ready] .irtl-filters.is-open>.irtl-mobile-topic{grid-row:3;grid-column:2}body .irtl-library[data-irtl-ready] .irtl-filters.is-open>button[type=submit]{grid-row:4}}

body .irtl-library{max-width:1260px;margin:28px auto;font-family:inherit;line-height:1.7}
.irtl-library .irtl-heading{display:grid;grid-template-columns:1fr auto;column-gap:18px;align-items:center}
.irtl-heading>span,.irtl-heading>p{grid-column:1}.irtl-heading h1{grid-column:1}.irtl-heading>button{grid-column:2;grid-row:1/4}
.irtl-material .irtl-kind{display:inline-flex;gap:7px;align-items:center;padding:4px 10px;border-radius:999px;background:var(--r-soft);color:var(--r-accent);font-size:12px}
.irtl-material .irtl-kind svg{width:18px;height:18px}.irtl-material .irtl-kind path{fill:none;stroke:currentColor;stroke-width:1.7}
.irtl-library .irtl-paging-note{font-size:12px;color:var(--r-muted)}
.irtl-source-text .irtl-text{font-family:inherit}.irtl-library .irtl-source p{white-space:pre-line}
.irtl-library .irtl-choices[open]>.irtl-results{max-height:420px}
.irtl-library .irtl-results a[aria-current=page]{border-color:var(--r-accent);background:var(--r-soft)}
.irtl-library .irtl-filters select{padding-inline-end:32px!important;overflow:hidden;text-overflow:ellipsis}
.irtl-library .irtl-tf-player .irtl-audio-workspace__timeline{grid-template-columns:64px minmax(0,1fr) 64px}
@media(max-width:600px){body .irtl-library{margin:12px 8px;padding:16px;border-radius:18px}.irtl-library .irtl-workspace{padding:14px}.irtl-heading>button{padding:8px;min-width:44px}.irtl-library .irtl-breadcrumb{font-size:12px}}

@media(max-width:580px){body .irtl-library[data-irtl-ready] .irtl-filters{grid-template-columns:minmax(0,1fr) 52px}body .irtl-library[data-irtl-ready] .irtl-filter-toggle span{display:none}body .irtl-library[data-irtl-ready] .irtl-filter-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor}body .irtl-library[data-irtl-ready] .irtl-filters.is-open>label:nth-of-type(3),body .irtl-library[data-irtl-ready] .irtl-filters.is-open>.irtl-mobile-topic{grid-column:1/-1}body .irtl-library[data-irtl-ready] .irtl-filters.is-open>.irtl-mobile-topic{grid-row:4}body .irtl-library[data-irtl-ready] .irtl-filters.is-open>button[type=submit]{grid-row:5}}

/* Keep the unloaded video quiet until Play creates its source connection. */
.irtl-tf-stage{position:relative}.irtl-tf-stage video:not([src]){visibility:hidden}
.irtl-tf-stage-play{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:76px;height:76px;padding:0;border:2px solid #a4e9c5;border-radius:50%;background:linear-gradient(145deg,#83dfae,#39865f);color:#103d2b;font:28px/1 sans-serif;cursor:pointer;box-shadow:0 10px 28px #0003}
.irtl-tf-stage:has(video[src])>.irtl-tf-stage-play{display:none}

.irtl-library .irtl-material h2{font-size:clamp(20px,2.2vw,26px)}

/* Root-query pages can inherit the homepage overlay header. Reserve its measured space locally. */
body.irtl-public-page .irtl-header-space{height:var(--irtl-header-gap,180px);pointer-events:none}
