/* ==========================================================================
   إنه القرآن — نظام التصميم
   الألوان مأخوذة من هوية الموقع الأصلية: الكحلي العميق، الذهبي، الأخضر المصحفي
   ========================================================================== */

:root {
  --navy-950: #000b17;
  --navy-900: #001021;
  --navy-800: #06213a;
  --navy-700: #0c2f4f;
  --teal-800: #064f42;
  --teal-700: #086654;
  --teal-600: #0c7365;
  --teal-100: #d7ece5;
  --mint-50: #eef7f3;
  --gold-400: #ffd84d;
  --gold-500: #fdc713;
  --gold-600: #e6be32;
  --gold-700: #b28a0b;
  --gold-100: #fdf3cf;

  --paper: #fbf8f1;
  --surface: #ffffff;
  --ink: #0d1b29;
  --ink-2: #33475b;
  --muted: #56677a;
  --line: #e9e2d3;
  --line-2: #f1ece1;

  --video: #086654;
  --audio: #0c2f4f;
  --pdf: #806200;
  --article: #33475b;
  --gold-ink: #806200;

  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 16, 33, .06), 0 2px 8px rgba(0, 16, 33, .05);
  --shadow: 0 6px 24px rgba(0, 16, 33, .08), 0 2px 6px rgba(0, 16, 33, .05);
  --shadow-lg: 0 24px 60px rgba(0, 16, 33, .16);

  --font-body: "Thmanyah", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Thmanyah", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-quran: "hafs", "Traditional Arabic", "Times New Roman", serif;

  --container: 1220px;
  --header-h: 74px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23fdc713' stroke-width='1'%3E%3Cpath d='M40 6l9.9 24.1L74 40l-24.1 9.9L40 74l-9.9-24.1L6 40l24.1-9.9z'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--focus, var(--teal-700)); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
main:focus { outline: none; }
.site-header, .drawer-panel, .hero, .page-hero, .section--navy, .scholar, .program, .site-footer, .video-frame, .stats-bar .stat-icon { --focus: var(--gold-500); }
::selection { background: var(--gold-500); color: var(--navy-900); }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.icon--fill { fill: currentColor; stroke: none; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -60px; right: 16px; z-index: 200; background: var(--gold-500); color: var(--navy-900); padding: 10px 18px; border-radius: 0 0 10px 10px; font-weight: 700; }
.skip-link:focus { top: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container--narrow { max-width: 860px; }
.muted { color: var(--muted); }
.num { font-feature-settings: "tnum"; direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(0, 16, 33, .96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(253, 199, 19, .12);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-transparent { position: fixed; inset-inline: 0; background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header.is-scrolled { background: rgba(0, 16, 33, .97); box-shadow: 0 8px 30px rgba(0, 0, 0, .25); backdrop-filter: saturate(140%) blur(10px); border-bottom-color: rgba(253, 199, 19, .12); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { width: 92px; height: auto; }
.brand-text { display: none; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 6px; }
.main-nav a {
  position: relative; padding: 8px 14px; border-radius: 999px;
  color: rgba(255, 255, 255, .82); font-weight: 500; font-size: 16px; white-space: nowrap;
  transition: color .2s, background .2s;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.main-nav a[aria-current="page"] { color: var(--gold-500); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--gold-500); }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.search-trigger {
  display: flex; align-items: center; gap: 10px;
  min-width: 230px; height: 44px; padding: 0 14px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px;
  color: rgba(255, 255, 255, .7); font-size: 15px; transition: background .2s, border-color .2s;
}
.search-trigger:hover { background: rgba(255, 255, 255, .12); border-color: rgba(253, 199, 19, .5); color: #fff; }
.search-trigger kbd { margin-inline-start: auto; font-family: inherit; font-size: 12px; padding: 1px 7px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .55); direction: ltr; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff;
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }
.menu-toggle { display: none; }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 150; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 11, 23, .6); opacity: 0; transition: opacity .3s; }
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; right: 0; width: min(340px, 86vw);
  background: var(--navy-900) var(--pattern); background-size: 80px; background-blend-mode: soft-light;
  color: #fff; padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transform: translateX(100%); transition: transform .35s var(--ease);
  box-shadow: var(--shadow-lg);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-head img { width: 84px; }
.drawer nav a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; font-size: 18px; color: rgba(255, 255, 255, .9); }
.drawer nav a:hover, .drawer nav a[aria-current="page"] { background: rgba(253, 199, 19, .12); color: var(--gold-500); }
.drawer .icon { color: var(--gold-500); }
.drawer-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); }

/* ---------------------------------------------------------------- buttons, chips, badges */
.btn {
  --b-bg: var(--gold-500); --b-fg: var(--navy-900); --b-bd: var(--gold-500);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 24px; border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg); border: 1.5px solid var(--b-bd);
  font-weight: 700; font-size: 16px; line-height: 1.2; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(253, 199, 19, .28); }
.btn:active { transform: none; }
.btn--ghost { --b-bg: rgba(255, 255, 255, .06); --b-fg: #fff; --b-bd: rgba(255, 255, 255, .28); }
.btn--ghost:hover { --b-bg: #fff; --b-fg: var(--navy-900); box-shadow: none; }
.btn--outline { --b-bg: transparent; --b-fg: var(--teal-700); --b-bd: var(--teal-700); }
.btn--outline:hover { --b-bg: var(--teal-700); --b-fg: #fff; box-shadow: 0 10px 24px rgba(8, 102, 84, .2); }
.btn--navy { --b-bg: var(--navy-900); --b-fg: #fff; --b-bd: var(--navy-900); }
.btn--navy:hover { box-shadow: 0 10px 24px rgba(0, 16, 33, .25); }
.btn--sm { min-height: 38px; padding: 6px 16px; font-size: 14px; gap: 8px; }
.btn--block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 15px; font-weight: 500; transition: all .2s; white-space: nowrap;
}
.chip:hover { border-color: var(--teal-600); color: var(--teal-700); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.chip .count { font-size: 12px; padding: 0 7px; border-radius: 999px; background: var(--line-2); color: var(--muted); }
.chip[aria-pressed="true"] .count, .chip.is-active .count { background: rgba(253, 199, 19, .2); color: var(--gold-500); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.7; background: #fff; color: var(--ink-2); }
.badge .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.badge--video { color: var(--video); }
.badge--audio { color: var(--audio); }
.badge--pdf { color: var(--pdf); }
.badge--doc { color: var(--pdf); }
.badge--article { color: var(--article); }
.badge--solid { background: var(--gold-100); color: var(--gold-700); }

/* ---------------------------------------------------------------- sections */
.section { padding-block: 88px; position: relative; }
.section--tight { padding-block: 56px; }
.section--mint { background: var(--mint-50); }
.section--white { background: var(--surface); }
.section--navy { background: var(--navy-900); color: #fff; overflow: hidden; }
.section--navy::before { content: ""; position: absolute; inset: 0; background: var(--pattern); background-size: 80px; opacity: .05; pointer-events: none; }
.section--navy > * { position: relative; }

.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 30px; margin-bottom: 38px; }
.sec-head--center { flex-direction: column; align-items: center; text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--teal-700); font-weight: 700; font-size: 15px; letter-spacing: .02em; margin-bottom: 8px; }
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--gold-500); border-radius: 2px; }
.section--navy .kicker { color: var(--gold-500); }
.sec-title { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; color: var(--navy-900); }
.section--navy .sec-title { color: #fff; }
.sec-lead { margin: 10px 0 0; color: var(--muted); max-width: 640px; font-size: 18px; }
.section--navy .sec-lead { color: rgba(255, 255, 255, .7); }
.ornament { display: block; width: 120px; height: 22px; margin: 14px auto 0; color: var(--gold-500); }

.link-more { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-700); font-weight: 700; white-space: nowrap; }
.link-more .icon { transition: transform .2s var(--ease); }
.link-more:hover .icon { transform: translateX(-4px); }
.section--navy .link-more { color: var(--gold-500); }

/* ---------------------------------------------------------------- home hero */
.hero {
  position: relative; min-height: min(92vh, 860px); display: flex; align-items: center;
  padding: calc(var(--header-h) + 50px) 0 110px; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% 0%, rgba(12, 115, 101, .55), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(253, 199, 19, .12), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
}
.hero::before { content: ""; position: absolute; inset: 0; background: var(--pattern); background-size: 92px; opacity: .06; }
.hero::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 90px; background: var(--paper); clip-path: ellipse(75% 100% at 50% 100%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 999px; background: rgba(253, 199, 19, .1); border: 1px solid rgba(253, 199, 19, .3); color: var(--gold-500); font-size: 15px; font-weight: 500; margin-bottom: 22px; }
.hero-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.2vw, 56px); line-height: 1.3; margin-bottom: 22px; }
.hero-title span { display: block; white-space: nowrap; }
.hero-title em { font-style: normal; color: var(--gold-500); }
.hero-tagline { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: clamp(18px, 1.65vw, 22px); font-weight: 500; line-height: 1.6; color: var(--gold-400); }
.hero-tagline::before { content: ""; flex: none; width: 36px; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, var(--gold-500), transparent); }
.hero-lead { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.7; color: rgba(255, 255, 255, .82); margin: 0 0 12px; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin: 0 0 32px; padding: 0; font-size: 15.5px; line-height: 1.6; color: rgba(255, 255, 255, .62); }
.hero-points li { display: inline-flex; align-items: center; }
.hero-points li + li::before { content: ""; width: 5px; height: 5px; margin: 0 12px; border-radius: 50%; background: var(--gold-500); opacity: .75; }
.hero-search { position: relative; max-width: 600px; }
.hero-search input {
  width: 100%; height: 64px; padding: 0 58px 0 150px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .96); color: var(--ink);
  font-size: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); outline: none; transition: border-color .2s, box-shadow .2s;
}
.hero-search input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 5px rgba(253, 199, 19, .25), 0 20px 50px rgba(0, 0, 0, .3); }
.hero-search > .icon { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.hero-search .btn { position: absolute; left: 7px; top: 7px; min-height: 50px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; color: rgba(255, 255, 255, .6); font-size: 14px; }
.hero-tags a { padding: 3px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .85); transition: all .2s; }
.hero-tags a:hover { border-color: var(--gold-500); color: var(--gold-500); }

/* شعار الهيرو: هالة ذهبية هادئة ومدارات رفيعة تدور عليها نقاط ذهبية ببطء */
.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 460px; justify-self: center; width: 100%; }
.hero-art .halo { position: absolute; inset: 20%; border-radius: 50%; background: radial-gradient(circle, rgba(253, 199, 19, .16) 0%, rgba(253, 199, 19, .05) 45%, transparent 70%); animation: breathe 10s ease-in-out infinite; }
.hero-art .orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(253, 199, 19, .12); animation: spin var(--dur, 60s) linear infinite; }
.hero-art .orbit::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; background: conic-gradient(from 270deg, transparent 0deg, var(--tail, rgba(253, 199, 19, .5)) 90deg, transparent 90.4deg); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); }
.hero-art .orbit--outer { inset: 3%; --dur: 96s; border-color: rgba(255, 255, 255, .06); --tail: rgba(255, 255, 255, .22); }
.hero-art .orbit--mid { inset: 13%; --dur: 48s; }
.hero-art .orbit--inner { inset: 24%; --dur: 32s; animation-direction: reverse; border-color: rgba(253, 199, 19, .07); }
.hero-art .orbit--inner::before { display: none; }
.hero-art .dot { position: absolute; top: 0; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-400); transform: translate(-50%, -50%); box-shadow: 0 0 0 4px rgba(253, 199, 19, .12), 0 0 18px 4px rgba(253, 199, 19, .45); }
.hero-art .dot--sm { width: 6px; height: 6px; box-shadow: 0 0 12px 3px rgba(253, 199, 19, .3); }
.hero-art .dot--far { top: 100%; width: 4px; height: 4px; background: #fff; opacity: .55; box-shadow: none; }
.hero-art .gem { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--gold-500); background: transparent; transform: translate(-50%, -50%); box-shadow: 0 0 10px rgba(253, 199, 19, .35); opacity: .75; }
.hero-art .spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--gold-400); opacity: 0; animation: twinkle 8s ease-in-out infinite; }
.hero-art .spark:nth-of-type(1) { top: 9%; left: 24%; animation-delay: .4s; }
.hero-art .spark:nth-of-type(2) { top: 20%; right: 6%; animation-delay: 2.6s; background: #fff; }
.hero-art .spark:nth-of-type(3) { bottom: 16%; left: 8%; animation-delay: 4.8s; }
.hero-art .spark:nth-of-type(4) { bottom: 7%; right: 30%; animation-delay: 6.4s; background: #fff; }
.hero-art .logo-big { position: absolute; inset: 32% 23%; display: grid; place-items: center; animation: float 12s ease-in-out infinite; }
.hero-art .logo-big img { width: 100%; filter: drop-shadow(0 12px 34px rgba(253, 199, 19, .3)); }
@keyframes breathe { 0%, 100% { opacity: .7; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: .8; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hero-ayah { position: absolute; bottom: 4%; inset-inline: 0; text-align: center; font-family: var(--font-quran); font-size: 21px; color: rgba(255, 255, 255, .75); line-height: 1.9; }
@keyframes spin { to { transform: rotate(360deg); } }

.stats { position: relative; z-index: 2; margin-top: -64px; }
.stats-bar { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--line-2); overflow: hidden; }
.stat { display: flex; align-items: center; gap: 14px; padding: 22px 22px; position: relative; transition: background .2s; }
.stat + .stat::before { content: ""; position: absolute; right: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line); }
a.stat:hover { background: var(--mint-50); }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--mint-50); color: var(--teal-700); }
.stat-icon .icon { width: 24px; height: 24px; }
.stat b { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1.1; color: var(--navy-900); font-weight: 600; }
.stat span { font-size: 14.5px; color: var(--muted); }

/* ---------------------------------------------------------------- material cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.m-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.m-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }
.m-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--navy-800), var(--teal-800)); overflow: hidden; }
.m-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.m-card:hover .m-thumb img { transform: scale(1.04); }
.m-thumb .badges { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 1; }
.m-thumb .badge { background: rgba(0, 16, 33, .84); color: #fff; }
.m-thumb .badge .icon { color: var(--gold-500); }
.m-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .25s; background: linear-gradient(0deg, rgba(0, 16, 33, .45), transparent 60%); }
.m-thumb .play span { width: 54px; height: 54px; border-radius: 50%; background: var(--gold-500); color: var(--navy-900); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.m-card:hover .m-thumb .play { opacity: 1; }
.m-thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; text-align: center; color: rgba(255, 255, 255, .92); font-family: var(--font-display); font-size: 18px; line-height: 1.5; }
.m-thumb-fallback::before { content: ""; position: absolute; inset: 0; background: var(--pattern); background-size: 60px; opacity: .08; }
.m-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.m-title { font-size: 16.5px; font-weight: 700; line-height: 1.6; color: var(--navy-900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-title a::after { content: ""; position: absolute; inset: 0; }
.m-card:hover .m-title { color: var(--teal-700); }
.m-meta { margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--muted); }
.m-meta span { display: inline-flex; align-items: center; gap: 5px; }
.m-meta .icon { width: 14px; height: 14px; }
.m-cat { font-size: 13.5px; color: var(--teal-700); font-weight: 500; }

/* list variant */
.cards--list { grid-template-columns: 1fr; gap: 12px; }
.cards--list .m-card { flex-direction: row; align-items: stretch; }
.cards--list .m-thumb { width: 210px; flex: none; aspect-ratio: 16 / 9; }
.cards--list .m-body { padding: 12px 18px; justify-content: center; }
.cards--list .m-title { -webkit-line-clamp: 2; }

.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; margin-inline: -4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.scroller > * { scroll-snap-align: start; }
.scroller-wrap { position: relative; }
.scroller-nav { display: flex; gap: 8px; }
.scroller-nav button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--navy-900); transition: all .2s; }
.scroller-nav button:hover { background: var(--navy-900); color: var(--gold-500); border-color: var(--navy-900); }

/* tabs */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.tabs button { border: 0; background: transparent; padding: 8px 18px; border-radius: 999px; font-weight: 700; color: var(--muted); font-size: 15px; transition: all .2s; }
.tabs button[aria-selected="true"] { background: var(--navy-900); color: #fff; }

/* ---------------------------------------------------------------- scholars */
.scholars { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.scholar { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--navy-900); color: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.scholar-banner { position: relative; aspect-ratio: 16 / 7; overflow: hidden; }
.scholar-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .8s var(--ease); }
.scholar:hover .scholar-banner img { transform: scale(1.04); }
.scholar-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--navy-900) 2%, rgba(0, 16, 33, .2) 60%, transparent); }
.scholar-name { position: absolute; bottom: 14px; inset-inline: 24px; z-index: 1; }
.scholar-name small { display: block; color: var(--gold-500); font-size: 14px; font-weight: 500; }
.scholar-name h3 { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; }
.scholar-body { padding: 8px 24px 24px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.scholar-total { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14.5px; color: rgba(255, 255, 255, .65); }
.scholar-total b { color: #fff; font-weight: 700; }
.flow-links { column-count: 2; column-gap: 26px; }
.flow-links li { list-style: none; break-inside: avoid; }
.flow-links a { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px dashed rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .88); transition: color .2s; }
.flow-links a::after { content: attr(data-count); margin-inline-start: auto; font-size: 13px; color: var(--gold-500); font-weight: 700; }
.flow-links a:hover { color: var(--gold-500); }
.scholar .btn { align-self: flex-start; margin-top: auto; }

/* light flow list (on paper) */
.flow { column-count: 3; column-gap: 34px; }
.flow li { list-style: none; break-inside: avoid; }
.flow a { display: flex; align-items: baseline; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); color: var(--ink-2); transition: color .2s, padding .2s; }
.flow a .n { color: var(--gold-700); font-size: 13px; font-weight: 700; min-width: 22px; }
.flow a .c { margin-inline-start: auto; font-size: 13px; color: var(--muted); background: var(--line-2); padding: 0 8px; border-radius: 999px; }
.flow a:hover { color: var(--teal-700); padding-inline-start: 8px; }

/* ---------------------------------------------------------------- courses */
.course-rows { display: flex; flex-direction: column; gap: 26px; }
.course-row { display: grid; grid-template-columns: 420px 1fr; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); transition: box-shadow .25s, transform .25s var(--ease); }
.course-row:nth-child(even) { grid-template-columns: 1fr 420px; }
.course-row:nth-child(even) .course-media { order: 2; }
.course-row:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.course-media { position: relative; background: var(--navy-900); min-height: 230px; }
.course-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.course-body { padding: 30px 34px; display: flex; flex-direction: column; gap: 12px; }
.course-body h3 { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--navy-900); }
.course-body p { color: var(--ink-2); margin: 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 15px; }
.meta-row span { display: inline-flex; align-items: center; gap: 7px; }
.meta-row .icon { color: var(--teal-700); }
.tag-free { display: inline-flex; align-items: center; padding: 2px 12px; border-radius: 999px; background: var(--mint-50); color: var(--teal-700); font-weight: 700; font-size: 14px; }
.course-body .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 8px; }

/* ---------------------------------------------------------------- programs */
.programs { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.program { position: relative; min-height: 300px; border-radius: var(--radius-lg); overflow: hidden; color: #fff; display: flex; align-items: flex-end; padding: 30px; isolation: isolate; box-shadow: var(--shadow); }
.program img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.program::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 11, 23, .92) 10%, rgba(0, 11, 23, .35) 70%, rgba(0, 11, 23, .15)); }
.program:hover img { transform: scale(1.05); }
.program h3 { font-family: var(--font-display); font-size: 30px; font-weight: 600; margin-bottom: 8px; }
.program p { color: rgba(255, 255, 255, .8); margin: 0 0 16px; max-width: 520px; }
.program .pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(253, 199, 19, .15); border: 1px solid rgba(253, 199, 19, .35); color: var(--gold-500); padding: 3px 12px; border-radius: 999px; font-size: 14px; margin-bottom: 12px; }

/* ---------------------------------------------------------------- about/mission */
.mission { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.mission-text blockquote { margin: 0; font-family: var(--font-body); font-weight: 800; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.75; color: var(--navy-900); }
.mission-text blockquote em { font-style: normal; color: var(--teal-700); background: linear-gradient(transparent 62%, rgba(253, 199, 19, .45) 62%); }
.lite-yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); cursor: pointer; border: 0; padding: 0; width: 100%; display: block; }
.lite-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .3s, transform .6s var(--ease); }
.lite-yt:hover img { opacity: 1; transform: scale(1.02); }
.lite-yt .yt-play { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%; background: var(--gold-500); color: var(--navy-900); display: grid; place-items: center; box-shadow: 0 0 0 12px rgba(253, 199, 19, .25); transition: transform .25s var(--ease), box-shadow .25s; }
.lite-yt:hover .yt-play { transform: scale(1.08); box-shadow: 0 0 0 18px rgba(253, 199, 19, .2); }
.lite-yt .yt-play .icon { width: 30px; height: 30px; margin-inline-start: -4px; }
.lite-yt .yt-label { position: absolute; bottom: 0; inset-inline: 0; padding: 40px 20px 14px; color: #fff; font-weight: 500; background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent); text-align: start; }
.lite-yt iframe, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.feature { padding: 30px 26px 30px 26px; border-bottom: 1px solid rgba(255, 255, 255, .1); display: flex; gap: 16px; }
.feature:not(:nth-child(3n)) { border-inline-end: 1px solid rgba(255, 255, 255, .1); }
.feature .f-icon { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; background: rgba(253, 199, 19, .1); color: var(--gold-500); }
.feature .f-icon .icon { width: 26px; height: 26px; }
.feature h3 { font-size: 19px; margin-bottom: 6px; color: #fff; }
.feature p { margin: 0; color: rgba(255, 255, 255, .66); font-size: 15.5px; line-height: 1.75; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { position: relative; padding: 30px 26px 26px; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line-2); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -20px; right: 24px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-500); color: var(--navy-900); font-weight: 800; font-size: 18px; box-shadow: 0 6px 16px rgba(253, 199, 19, .35); }
.step h3 { font-size: 20px; color: var(--navy-900); margin: 6px 0 8px; }
.step p { margin: 0; color: var(--ink-2); font-size: 16px; }

.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.social { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #fff; font-weight: 500; transition: all .2s; }
.social .icon { width: 20px; height: 20px; }
.social:hover { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); transform: translateY(-2px); }
.socials--light .social { background: var(--surface); border-color: var(--line); color: var(--navy-900); }
.socials--light .social:hover { background: var(--navy-900); color: var(--gold-500); border-color: var(--navy-900); }

/* ---------------------------------------------------------------- page hero (inner pages) */
.page-hero { position: relative; background: linear-gradient(180deg, var(--navy-900), var(--navy-800)); color: #fff; padding: 46px 0 64px; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--pattern); background-size: 80px; opacity: .06; }
.page-hero::after { content: ""; position: absolute; left: -120px; top: -160px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(12, 115, 101, .5), transparent 70%); }
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4vw, 48px); margin: 8px 0 8px; }
.page-hero p { color: rgba(255, 255, 255, .72); max-width: 720px; margin: 0; font-size: 18px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14.5px; color: rgba(255, 255, 255, .55); list-style: none; }
.breadcrumb a { color: rgba(255, 255, 255, .8); }
.breadcrumb a:hover { color: var(--gold-500); }
.breadcrumb li + li::before { content: "‹"; margin-inline-end: 8px; color: rgba(255, 255, 255, .35); }

/* ---------------------------------------------------------------- library page */
.lib-top { background: var(--navy-900); padding: 0 0 30px; position: relative; }
.lib-search { position: relative; margin-top: -30px; z-index: 5; }
.lib-search input { width: 100%; height: 62px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); padding: 0 56px 0 20px; font-size: 18px; box-shadow: var(--shadow); outline: none; transition: box-shadow .2s, border-color .2s; }
.lib-search input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 5px rgba(253, 199, 19, .22), var(--shadow); }
.lib-search > .icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--muted); }
.lib-search .clear { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); border: 0; background: var(--line-2); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }

.lib-layout { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; padding-block: 34px 90px; }
.filters { position: sticky; top: calc(var(--header-h) + 18px); max-height: calc(100vh - var(--header-h) - 36px); overflow: auto; display: flex; flex-direction: column; gap: 16px; padding-inline-end: 4px; scrollbar-width: thin; }
.f-block { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px; }
.f-title { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 800; color: var(--navy-900); margin-bottom: 10px; }
.f-title button { border: 0; background: none; color: var(--teal-700); font-size: 13.5px; font-weight: 700; padding: 0; }
.seg { display: grid; gap: 6px; }
.seg button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; border: 1px solid transparent; background: var(--paper); padding: 9px 12px; border-radius: 10px; font-weight: 500; color: var(--ink-2); transition: all .15s; }
.seg button:hover { border-color: var(--line); }
.seg button[aria-pressed="true"] { background: var(--navy-900); color: #fff; }
.seg button .count { margin-inline-start: auto; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] .count { color: var(--gold-500); }
.seg .dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #fff; flex: none; }
.seg .dot .icon { width: 15px; height: 15px; }
.seg button[aria-pressed="true"] .dot { background: rgba(255, 255, 255, .14); color: var(--gold-500); }
.seg--row { grid-template-columns: repeat(2, 1fr); }

.tree { list-style: none; display: grid; gap: 2px; }
.tree ul { list-style: none; margin: 2px 22px 6px 0; padding-inline-start: 10px; border-inline-start: 1px dashed var(--line); display: grid; gap: 1px; }
.tree-item { display: flex; align-items: center; gap: 4px; }
.tree-item button.t-link { flex: 1; display: flex; align-items: center; gap: 8px; text-align: start; border: 0; background: none; padding: 6px 8px; border-radius: 8px; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.tree-item button.t-link:hover { background: var(--paper); color: var(--teal-700); }
.tree-item button.t-link[aria-pressed="true"] { background: var(--mint-50); color: var(--teal-700); font-weight: 700; }
.tree-item .count { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); }
.tree-item .t-toggle { width: 26px; height: 26px; border: 0; background: none; border-radius: 6px; display: grid; place-items: center; color: var(--muted); flex: none; }
.tree-item .t-toggle:hover { background: var(--paper); }
.tree-item .t-toggle .icon { width: 14px; height: 14px; transition: transform .2s; }
.tree-item .t-toggle[aria-expanded="true"] .icon { transform: rotate(-90deg); }
.tree-item .t-spacer { width: 26px; flex: none; }
.tree li[data-depth="0"] > .tree-item button.t-link { font-weight: 800; color: var(--navy-900); }

.results-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.results-count { font-size: 16px; color: var(--ink-2); }
.results-count b { color: var(--navy-900); font-size: 20px; }
.results-bar .spacer { flex: 1; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; height: 42px; padding: 0 16px 0 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; color: var(--ink-2); }
.select .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; pointer-events: none; color: var(--muted); }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 3px; }
.view-toggle button { width: 36px; height: 34px; border-radius: 999px; border: 0; background: none; display: grid; place-items: center; color: var(--muted); }
.view-toggle button[aria-pressed="true"] { background: var(--navy-900); color: var(--gold-500); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.active-filters:empty { display: none; }
.af { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 12px; border-radius: 999px; background: var(--mint-50); color: var(--teal-700); font-size: 14px; font-weight: 700; border: 1px solid var(--teal-100); }
.af button { border: 0; background: rgba(8, 102, 84, .12); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--teal-700); padding: 0; }
.af button .icon { width: 12px; height: 12px; }
.load-more { display: flex; justify-content: center; margin-top: 30px; }
.empty { text-align: center; padding: 70px 20px; background: var(--surface); border-radius: var(--radius-lg); border: 1px dashed var(--line); }
.empty .icon { width: 46px; height: 46px; color: var(--gold-600); margin-bottom: 10px; }
.empty h3 { font-size: 21px; margin-bottom: 6px; color: var(--navy-900); }
.filters-open { display: none; }
.filters-head { display: none; }
mark { background: rgba(253, 199, 19, .38); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------------------------------------------------------------- material page */
.mat-hero { padding: 34px 0 44px; }
.mat-hero h1 { font-size: clamp(26px, 3.4vw, 40px); max-width: 980px; line-height: 1.45; }
.mat-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 14px; color: rgba(255, 255, 255, .72); font-size: 15.5px; }
.mat-meta span, .mat-meta a { display: inline-flex; align-items: center; gap: 7px; }
.mat-meta a:hover { color: var(--gold-500); }
.mat-meta .icon { color: var(--gold-500); }
.mat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 34px; align-items: start; padding-block: 34px 90px; }
.mat-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.panel-head h2 { font-size: 18px; color: var(--navy-900); display: flex; align-items: center; gap: 10px; }
.panel-head h2 .icon { color: var(--teal-700); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 20px 22px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame .lite-yt { border-radius: 0; box-shadow: none; height: 100%; }
.video-switch { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.sc-frame { display: block; width: 100%; height: 166px; border: 0; }
.sc-placeholder { display: flex; align-items: center; gap: 16px; padding: 18px 22px; }
.sc-placeholder .sc-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--mint-50); color: var(--teal-700); flex: none; }
.sc-placeholder .sc-icon .icon { width: 26px; height: 26px; }
.doc-list { display: grid; gap: 12px; }
.doc { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); }
.doc-ico { width: 48px; height: 56px; border-radius: 8px; display: grid; place-items: center; color: var(--gold-500); font-size: 12px; font-weight: 800; flex: none; background: var(--navy-900); position: relative; letter-spacing: .03em; }
.doc-ico.word { background: var(--teal-700); color: #fff; }
.doc-ico.ppt { background: #c43e1c; }
.doc-ico.zip { background: #6b5b2b; }
.doc-ico::after { content: ""; position: absolute; top: 0; left: 0; border-style: solid; border-width: 0 0 12px 12px; border-color: transparent transparent rgba(255, 255, 255, .35) var(--paper); }
.doc-info { flex: 1; min-width: 0; }
.doc-info b { display: block; color: var(--navy-900); }
.doc-info small { color: var(--muted); }
.doc .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pdf-frame { width: 100%; height: 78vh; min-height: 520px; border: 0; display: block; background: #525659; }

.article-body { font-size: 19px; line-height: 2.05; color: #1b2a38; padding: 34px clamp(20px, 5vw, 56px) 40px; }
.article-body p { margin: 0 0 1.05em; }
.article-body p:empty { display: none; }
.article-body b, .article-body strong { color: var(--navy-900); }
.article-body h1, .article-body h2, .article-body h3, .article-body h4 { font-family: var(--font-display); color: var(--teal-700); margin: 1.4em 0 .6em; font-weight: 600; }
.article-body blockquote { margin: 1.4em 0; padding: 14px 22px; border-inline-start: 4px solid var(--gold-500); background: var(--gold-100); border-radius: 0 12px 12px 0; }
.article-body a { color: var(--teal-700); text-decoration: underline; text-underline-offset: 4px; }
.article-body ul, .article-body ol { padding-inline-start: 1.4em; margin: 0 0 1em; }
.article-body img { border-radius: 12px; margin: 1em auto; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 16px; }
.article-body td, .article-body th { border: 1px solid var(--line); padding: 8px 10px; }
.reading-tools { display: flex; align-items: center; gap: 6px; }
.reading-tools button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-weight: 800; color: var(--ink-2); }
.reading-tools button:hover { border-color: var(--teal-700); color: var(--teal-700); }
.desc { color: var(--ink-2); }

.ayah { font-family: var(--font-quran); color: var(--teal-700); font-size: 1.22em; line-height: 1.2; font-weight: normal; }
.ayah::before { content: "﴿"; margin-inline-end: .15em; color: var(--gold-700); }
.ayah::after { content: "﴾"; margin-inline-start: .15em; color: var(--gold-700); }
.ayah-ref { color: var(--muted); font-size: .8em; margin-inline-start: .3em; }

.mat-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: calc(var(--header-h) + 18px); }
.playlist { max-height: 560px; overflow: auto; scrollbar-width: thin; counter-reset: pl; }
.playlist li { list-style: none; }
.playlist a { display: flex; gap: 12px; align-items: flex-start; padding: 11px 18px; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.playlist a:hover { background: var(--paper); }
.playlist a[aria-current="page"] { background: var(--mint-50); box-shadow: inset -3px 0 0 var(--teal-700); }
.playlist .pl-n { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--line-2); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--muted); margin-top: 2px; }
.playlist a[aria-current="page"] .pl-n { background: var(--teal-700); color: #fff; }
.playlist .pl-t { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.playlist a[aria-current="page"] .pl-t { color: var(--teal-700); font-weight: 700; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: all .2s; min-width: 0; }
.pager a:hover { border-color: var(--teal-700); box-shadow: var(--shadow-sm); }
.pager small { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.pager b { font-size: 15px; color: var(--navy-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager .next { text-align: end; align-items: flex-end; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share a, .share button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); transition: all .2s; }
.share a:hover, .share button:hover { background: var(--navy-900); color: var(--gold-500); border-color: var(--navy-900); }
.info-list { display: grid; gap: 0; }
.info-list div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.info-list div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.info-list dd { margin: 0; font-weight: 700; color: var(--navy-900); text-align: end; }
.info-list dd a { color: var(--teal-700); }
.related-mini { display: grid; gap: 4px; }
.related-mini a { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px; border-radius: 12px; transition: background .15s; align-items: center; }
.related-mini a:hover { background: var(--paper); }
.related-mini .thumb { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--navy-800); }
.related-mini .thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-mini span { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); background: var(--navy-900); color: #fff; padding: 12px 22px; border-radius: 999px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 300; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- course page */
.course-hero { display: grid; grid-template-columns: 1fr 440px; gap: 44px; align-items: center; }
.course-hero .cover { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; background: var(--navy-800); }
.course-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.course-facts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.fact { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.fact .icon { color: var(--gold-500); width: 22px; height: 22px; }
.fact b { display: block; font-size: 18px; line-height: 1.2; }
.fact small { color: rgba(255, 255, 255, .6); font-size: 13px; }
.levels { display: flex; flex-direction: column; gap: 16px; counter-reset: lvl; }
.level { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.level summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 18px 22px; }
.level summary::-webkit-details-marker { display: none; }
.level .lvl-n { counter-increment: lvl; width: 50px; height: 50px; border-radius: 16px; background: var(--mint-50); color: var(--teal-700); display: grid; place-items: center; font-family: var(--font-display); font-size: 22px; font-weight: 600; flex: none; }
.level .lvl-n::before { content: counter(lvl); }
.level[open] .lvl-n { background: var(--teal-700); color: #fff; }
.level .lvl-t { flex: 1; min-width: 0; }
.level .lvl-t small { color: var(--gold-ink); font-weight: 700; font-size: 13.5px; }
.level .lvl-t h3 { font-size: 19px; color: var(--navy-900); }
.level .lvl-c { color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.level .chev { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); transition: transform .25s var(--ease); flex: none; }
.level[open] .chev { transform: rotate(180deg); }
.level-body { padding: 0 22px 20px; }
.level-intro { background: var(--paper); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; color: var(--ink-2); white-space: pre-line; font-size: 15.5px; }
.lessons { list-style: none; display: grid; gap: 4px; counter-reset: ls; }
.lesson { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; transition: background .15s; }
.lesson:hover { background: var(--paper); }
.lesson .ls-thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--navy-800); flex: none; }
.lesson .ls-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lesson .ls-t { flex: 1; min-width: 0; }
.lesson .ls-t b { display: block; font-weight: 700; color: var(--navy-900); font-size: 16px; line-height: 1.6; }
.lesson .ls-t small { color: var(--muted); }
.lesson .ls-a { display: flex; gap: 6px; flex: none; }
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: 14px; background: var(--gold-100); color: #5d4a06; border: 1px solid rgba(178, 138, 11, .25); }
.notice .icon { color: var(--gold-700); width: 22px; height: 22px; margin-top: 4px; }

/* ---------------------------------------------------------------- lectures (series) */
.series-group + .series-group { margin-top: 60px; }
.series-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.series { position: relative; display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); transition: all .25s var(--ease); }
.series:hover { border-color: var(--teal-600); box-shadow: var(--shadow); transform: translateY(-3px); }
.series .s-thumb { position: relative; width: 120px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; flex: none; background: var(--navy-800); }
.series .s-thumb img { width: 100%; height: 100%; object-fit: cover; }
.series .s-thumb::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); border-radius: 10px; }
.series .s-stack { position: absolute; top: 6px; left: 6px; background: rgba(0, 16, 33, .85); color: var(--gold-500); font-size: 12px; font-weight: 800; padding: 0 7px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.series .s-stack .icon { width: 12px; height: 12px; }
.series h3 { font-size: 16.5px; color: var(--navy-900); line-height: 1.5; }
.series small { color: var(--muted); font-size: 13.5px; }
.series a::after { content: ""; position: absolute; inset: 0; }

.surah-flow { column-width: 190px; column-gap: 18px; }
.surah-flow li { list-style: none; break-inside: avoid; margin-bottom: 8px; }
.surah-flow a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); transition: all .2s; }
.surah-flow a:hover { border-color: var(--teal-600); color: var(--teal-700); transform: translateX(-3px); }
.surah-flow .sn { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--teal-700); background: var(--mint-50); border-radius: 50%; }
.surah-flow .st { font-weight: 700; color: var(--navy-900); }
.surah-flow .sc { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- about & contact */
.prose { font-size: 19px; line-height: 2.1; color: #1c2a37; }
.prose p { margin-bottom: 1.2em; }
.vm { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.vm-card { padding: 30px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line-2); position: relative; overflow: hidden; }
.vm-card::after { content: ""; position: absolute; left: -40px; bottom: -40px; width: 160px; height: 160px; background: var(--pattern); background-size: 80px; opacity: .08; }
.vm-card .f-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--mint-50); color: var(--teal-700); margin-bottom: 14px; }
.vm-card h3 { font-family: var(--font-display); font-size: 26px; color: var(--navy-900); font-weight: 600; margin-bottom: 8px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.channel-list { display: grid; gap: 12px; }
.channel { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); transition: all .2s var(--ease); }
.channel:hover { border-color: var(--teal-600); transform: translateX(-4px); box-shadow: var(--shadow-sm); }
.channel .c-ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.channel .c-ico .icon { width: 24px; height: 24px; }
.channel b { display: block; color: var(--navy-900); font-size: 17px; }
.channel small { color: var(--muted); direction: ltr; unicode-bidi: isolate; }
.channel > .icon { margin-inline-start: auto; color: var(--muted); }
.form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; color: var(--navy-900); }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal-600); box-shadow: 0 0 0 4px rgba(12, 115, 101, .12); }

/* ---------------------------------------------------------------- search dialog */
.search-dialog { position: fixed; inset: 0; z-index: 250; display: none; }
.search-dialog.is-open { display: block; }
.search-dialog .sd-backdrop { position: absolute; inset: 0; background: rgba(0, 11, 23, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s; }
.sd-panel { position: relative; margin: 8vh auto 0; width: min(760px, calc(100% - 28px)); background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .25s var(--ease); display: flex; flex-direction: column; max-height: 80vh; }
.sd-input { position: relative; border-bottom: 1px solid var(--line-2); }
.sd-input input { width: 100%; height: 66px; border: 0; outline: none; padding: 0 58px 0 70px; font-size: 19px; background: transparent; }
.sd-input > .icon { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--teal-700); }
.sd-input .sd-close { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--muted); }
.sd-input .sd-close:hover { background: var(--navy-900); color: var(--gold-500); border-color: var(--navy-900); }
.sd-input input::-webkit-search-cancel-button, .lib-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.sd-results { overflow: auto; padding: 8px; }
.sd-group { padding: 10px 14px 4px; font-size: 13px; font-weight: 800; color: var(--muted); }
.sd-item { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 12px; }
.sd-item:hover, .sd-item.is-active { background: var(--mint-50); }
.sd-item .thumb { width: 84px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--navy-800); flex: none; }
.sd-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.sd-item .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--line-2); color: var(--teal-700); flex: none; }
.sd-item b { display: block; font-size: 15.5px; color: var(--navy-900); line-height: 1.55; font-weight: 700; }
.sd-item small { color: var(--muted); font-size: 13px; }
.sd-empty, .sd-hint { padding: 26px; text-align: center; color: var(--muted); }
.sd-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line-2); background: var(--paper); font-size: 13.5px; color: var(--muted); }
.sd-foot a { color: var(--teal-700); font-weight: 700; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ---------------------------------------------------------------- footer */
.site-footer { position: relative; background: var(--navy-950); color: rgba(255, 255, 255, .72); padding: 70px 0 0; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0; background: var(--pattern); background-size: 80px; opacity: .035; }
.site-footer > * { position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.footer-brand img { width: 118px; margin-bottom: 18px; }
.footer-brand p { font-size: 15.5px; line-height: 1.9; }
.site-footer .footer-title { color: #fff; font-size: 17px; font-weight: 700; line-height: 1.4; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.site-footer .footer-title::before { content: ""; width: 8px; height: 8px; background: var(--gold-500); transform: rotate(45deg); }
.footer-links { list-style: none; display: grid; gap: 8px; }
.footer-links a { font-size: 15.5px; transition: color .2s; }
.footer-links a:hover { color: var(--gold-500); }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-social a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: #fff; transition: all .2s; }
.footer-social a:hover { background: var(--gold-500); color: var(--navy-900); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 14px; color: rgba(255, 255, 255, .5); }
.to-top { position: fixed; left: 20px; bottom: 20px; z-index: 90; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--gold-500); color: var(--navy-900); display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; transform: translateY(20px); pointer-events: none; transition: all .3s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- page-specific additions */
.lib-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--navy-900); line-height: 1.35; }
.results-head { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.hero-ayah { position: static; margin: 0; max-width: 460px; text-align: center; font-family: var(--font-quran); font-size: 22px; line-height: 2.1; color: rgba(255, 255, 255, .85); text-wrap: balance; }
.hero-ayah .ayah { color: inherit; font-size: inherit; }
.hero-ayah .ayah::before, .hero-ayah .ayah::after { color: var(--gold-500); }
.hero-ayah .ayah-ref { font-family: var(--font-body); font-size: 14px; color: rgba(255, 255, 255, .5); }
.page-hero .kicker { color: var(--gold-500); }
.playlist { position: relative; }
.panel audio, .panel video { width: 100%; display: block; border-radius: 10px; }
.media-files { display: grid; gap: 14px; padding: 4px 22px 20px; }
.media-files figure { margin: 0; }
.media-files figcaption { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.sc-placeholder + .sc-placeholder { border-top: 1px solid var(--line-2); }
.sc-frame { border-bottom: 1px solid var(--line-2); }
.video-switch .chip .icon { color: #e62117; }
.follow { margin-top: 64px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.follow h3 { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: #fff; }
.follow .socials { justify-content: center; }
.level-points { list-style: none; display: grid; gap: 4px; margin: 0 0 12px; padding: 12px 16px; background: var(--paper); border-radius: 12px; }
.level-points li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 15.5px; }
.level-points .icon { color: var(--teal-700); width: 16px; height: 16px; margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.program-rows { display: flex; flex-direction: column; gap: 34px; }
.program-row { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); }
.program-row:nth-child(even) .pr-media { order: 2; }
.pr-media { position: relative; min-height: 320px; background: var(--navy-900); }
.pr-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pr-body { padding: 38px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.pr-body h2 { font-family: var(--font-display); font-size: 32px; font-weight: 600; color: var(--navy-900); }
.pr-body p { margin: 0; color: var(--ink-2); font-size: 18px; }
.pr-body .pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; background: var(--gold-100); color: var(--gold-ink); border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 700; }
.services-flow { counter-reset: svc; display: grid; gap: 16px; }
.svc { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line-2); }
.svc::before { counter-increment: svc; content: "0" counter(svc); font-family: var(--font-display); font-size: 34px; line-height: 1.1; color: var(--gold-600); font-weight: 600; }
.svc h3 { font-size: 20px; color: var(--navy-900); margin-bottom: 6px; }
.svc p { margin: 0; color: var(--ink-2); font-size: 16px; }
.steps--stack { grid-template-columns: 1fr; gap: 34px; padding-top: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.notfound .big { font-family: var(--font-display); font-size: clamp(96px, 16vw, 180px); line-height: 1; color: var(--gold-500); }
.yt-lists { column-width: 330px; column-gap: 18px; }
.yt-lists li { list-style: none; break-inside: avoid; margin-bottom: 10px; }
.yt-lists a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; color: var(--ink-2); font-weight: 500; transition: all .2s var(--ease); }
.yt-lists a:hover { border-color: #e62117; color: var(--navy-900); transform: translateX(-3px); }
.yt-lists .icon { color: #e62117; width: 26px; height: 26px; }
.drawer-social { margin-top: 14px; }
.mat-hero h1 { font-family: var(--font-body); font-weight: 800; }
.m-thumb img { background: var(--navy-800); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .main-nav a { padding: 8px 10px; font-size: 15px; }
  .search-trigger { min-width: 0; width: 44px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .stats-bar { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4)::before { display: none; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .mat-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1000px) {
  :root { --header-h: 66px; }
  .main-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .brand img { width: 80px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-lead, .hero-search { margin-inline: auto; }
  .hero-tagline, .hero-points { justify-content: center; }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 56px); }
  .hero-tagline::after { content: ""; flex: none; width: 36px; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold-500)); }
  .hero-tags { justify-content: center; }
  .hero-art { display: none; }
  .hero-eyebrow { margin-inline: auto; }
  .scholars, .programs, .mission, .contact-grid, .vm { grid-template-columns: 1fr; }
  .course-row, .course-row:nth-child(even) { grid-template-columns: 1fr; }
  .course-row:nth-child(even) .course-media { order: 0; }
  .course-media { aspect-ratio: 16 / 8; min-height: 0; }
  .features { grid-template-columns: 1fr 1fr; }
  .feature:not(:nth-child(3n)) { border-inline-end: 0; }
  .feature:nth-child(odd) { border-inline-end: 1px solid rgba(255, 255, 255, .1); }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .flow { column-count: 2; }
  .lib-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0; z-index: 160; max-height: none; top: 0; background: var(--paper); padding: 0 16px 90px; transform: translateY(100%); transition: transform .35s var(--ease); visibility: hidden; }
  .filters.is-open { transform: none; visibility: visible; }
  .filters-head { display: flex; position: sticky; top: 0; z-index: 2; align-items: center; justify-content: space-between; padding: 14px 0; background: var(--paper); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .filters-head h2 { font-size: 20px; }
  .filters-head .icon-btn { color: var(--navy-900); border-color: var(--line); background: var(--surface); }
  .filters-apply { position: fixed; bottom: 0; inset-inline: 0; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); display: flex; }
  .filters-open { display: inline-flex; }
  .mat-layout { grid-template-columns: 1fr; }
  .mat-side { position: static; }
  .course-hero { grid-template-columns: 1fr; }
}
@media (min-width: 1001px) { .filters-apply { display: none; } }
@media (max-width: 1000px) {
  .program-row { grid-template-columns: 1fr; }
  .program-row:nth-child(even) .pr-media { order: 0; }
  .pr-media { min-height: 220px; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
}
@media (max-width: 640px) {
  .pr-body { padding: 22px; }
  .pr-body h2 { font-size: 26px; }
  .lib-title { font-size: 19px; }
  .surah-flow { column-width: auto; column-count: 2; column-gap: 8px; }
  .surah-flow a { padding: 7px 8px; gap: 7px; }
  .surah-flow .sn { width: 28px; height: 28px; font-size: 12px; }
  .surah-flow .st { font-size: 15px; }
  .sc-placeholder { flex-wrap: wrap; }
  .sc-placeholder .actions { width: 100%; }
  .sc-placeholder .actions .btn { flex: 1; }
  .lesson { gap: 10px; padding: 10px 4px; }
  .lesson .ls-thumb { width: 60px; }
  .lesson .btn-txt { display: none; }
  .lesson .ls-a .btn { width: 40px; min-height: 40px; padding: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding-block: 64px; }
  .container { padding-inline: 16px; }
  .hero { padding-bottom: 96px; min-height: auto; }
  .hero-search input { height: 58px; padding: 0 48px 0 16px; font-size: 16px; }
  .hero-search > .icon { right: 16px; }
  .hero-search .btn { display: none; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stat { padding: 16px; gap: 10px; }
  .stat-icon { width: 40px; height: 40px; }
  .stat b { font-size: 22px; }
  .stat::before { display: none !important; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat:nth-child(odd):not(:last-child) { border-inline-end: 1px solid var(--line); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .flow-links { column-count: 1; }
  .flow { column-count: 1; }
  .features { grid-template-columns: 1fr; }
  .feature:nth-child(odd) { border-inline-end: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .cards { grid-template-columns: 1fr; }
  .cards--list .m-thumb { width: 130px; }
  .cards--list .m-meta { font-size: 12.5px; }
  .course-body { padding: 22px; }
  .program { min-height: 260px; padding: 22px; }
  .pager { grid-template-columns: 1fr; }
  .article-body { font-size: 18px; padding: 24px 18px; }
  .lesson .ls-thumb { width: 74px; }
  .level summary { padding: 14px 16px; gap: 12px; }
  .level .lvl-c { display: none; }
  .level-body { padding: 0 12px 14px; }
  .doc { flex-wrap: wrap; }
  .doc .actions { width: 100%; }
  .doc .actions .btn { flex: 1; }
  .series-grid { grid-template-columns: 1fr; }
  .sd-panel { margin-top: 0; width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .scroller { grid-auto-columns: 82%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .mat-side, .to-top, .search-dialog, .drawer { display: none !important; }
  body { background: #fff; }
}

/* ---------------------------------------------------------------- YouTube player */
.yt-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.yt-embed iframe, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.yt-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: #000; color: #fff; text-align: center; overflow: hidden; }
.yt-fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; transition: opacity .3s; }
.yt-fallback:hover img { opacity: .75; }
.yt-fallback-play { position: relative; width: 70px; height: 50px; border-radius: 14px; background: #e62117; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.yt-fallback-play .icon { width: 24px; height: 24px; }
.yt-fallback-note { position: absolute; bottom: 0; inset-inline: 0; padding: 26px 18px 12px; font-size: 14px; line-height: 1.6; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent); }

/* ---------------------------------------------------------------- refinements */
.m-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
.m-views { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); flex: none; }
.m-views .icon { width: 14px; height: 14px; }
.video-frame .lite-yt .yt-play { inset: auto; left: 22px; bottom: 22px; margin: 0; width: 66px; height: 66px; z-index: 2; }
.video-frame .lite-yt::after { content: ""; position: absolute; inset: auto 0 0 0; height: 38%; background: linear-gradient(0deg, rgba(0, 16, 33, .6), transparent); pointer-events: none; }
.video-frame .lite-yt.is-playing::after { display: none; }
.mat-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-related .lib-title { margin-bottom: 16px; }
.mat-related .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .mat-related .cards { grid-template-columns: 1fr; } }
.cards--pair { grid-template-columns: 1fr 1fr; }
.media-files figure .actions { margin-top: 8px; }
.sec-lead, .page-hero p, .sec-title, .page-hero h1 { text-wrap: balance; }
.hero-lead, .course-body p, .program p, .pr-body p, .vm-card p { text-wrap: pretty; }
@media (min-width: 1001px) {
  .mat-side { max-height: calc(100vh - var(--header-h) - 36px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 4px 4px 2px; margin: -2px -4px 0 -2px; }
  .mat-side > * { flex: none; }
  .playlist { max-height: min(560px, 44vh); }
}
@media (min-width: 1181px) {
  .scroller { grid-auto-columns: calc((100% - 60px) / 4); }
}
@media (max-width: 1000px) {
  .tree-item .t-toggle, .tree-item .t-spacer { width: 40px; height: 40px; }
  .tree-item button.t-link { min-height: 44px; }
  .seg button { min-height: 44px; }
  .f-title button { padding: 8px 10px; margin: -8px -10px; }
  .af button { width: 30px; height: 30px; }
  .view-toggle button { width: 42px; height: 36px; }
  .filters-open { min-height: 42px; }
}
@media (max-width: 640px) {
  .hero-lead span { display: block; }
  .hero-points { gap: 8px; font-size: 14px; margin-bottom: 26px; }
  .hero-points li { padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .78); }
  .hero-points li + li::before { display: none; }
  .sd-panel { height: 100dvh; max-height: 100dvh; }
  .sd-input .sd-close { width: 44px; height: 44px; }
  .sd-foot span { display: none; }
  .sd-foot { justify-content: center; }
  .page-hero { padding: 28px 0 46px; }
  .page-hero p { font-size: 15.5px; }
  .cards--pair { grid-template-columns: 1fr; }
  .cards--list .m-thumb { width: 124px; align-self: flex-start; aspect-ratio: 16 / 9; }
  .cards--list .m-thumb .badges { display: none; }
  .video-frame .lite-yt .yt-play { width: 54px; height: 54px; left: 14px; bottom: 14px; }
}
