/* Sheikh Hamam Nassereddine — site styles. System fonts only (no font CDN, no icon font).
   Design tokens live in :root below. scripts/check.mjs reads the colour tokens by name and measures
   their contrast, so keep its pair list in sync when you rename or add a colour. */
:root {
  /* Surfaces: soft ivory page, white cards, two warmer tints for bands and quiet controls */
  --ivory: #fbf8f1;
  --ivory-2: #f4efe3;
  --ivory-3: #ebe5d5;
  --paper: #ffffff;
  /* Text and brand */
  --ink: #17241c;          /* body text */
  --muted: #4b5850;        /* secondary text */
  --green: #143f2b;        /* deep forest green: headings, navigation, primary controls */
  --green-2: #0d2e1f;      /* hover / pressed, dark bands */
  --green-3: #1e5039;      /* lighter panel tone on dark bands */
  --green-soft: #e4ede6;   /* tinted chips and hovers */
  --on-dark: #cfe0d4;      /* secondary text on green */
  --red: #8b1e24;          /* restrained Hussaini red accent */
  --red-2: #a3252c;
  --red-soft: #f8ebe8;
  --line: #e6e0d1;
  --line-2: #cfc7b3;
  --focus: #8b1e24;
  /* Shape, depth, layout */
  --radius-sm: 8px;        /* controls */
  --radius: 12px;          /* cards */
  --radius-lg: 20px;       /* panels */
  --shadow-sm: 0 1px 2px rgba(20, 40, 28, .06);
  --shadow: 0 1px 2px rgba(20, 40, 28, .05), 0 8px 24px rgba(20, 40, 28, .07);
  --shadow-lg: 0 2px 6px rgba(20, 40, 28, .06), 0 18px 40px rgba(20, 40, 28, .12);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --gap: clamp(1rem, 2vw, 1.5rem);
  /* Type: serif display + sans body (system stacks that also cover Arabic) */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, "Noto Naskh Arabic", "Traditional Arabic", serif;
  --font-ar: "Noto Naskh Arabic", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma, "Arabic Typesetting", sans-serif;
  --font-ar-display: "Noto Naskh Arabic", "Amiri", "Sakkal Majalla", "Traditional Arabic", "Times New Roman", "Geeza Pro", serif;
  --fs-display: clamp(2.1rem, 1.4rem + 3vw, 3.25rem);  /* ~48px */
  --fs-h1: clamp(1.85rem, 1.35rem + 2vw, 2.4rem);      /* ~36px */
  --fs-h2: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --fs-h3: 1.25rem;                                     /* 20px */
  --fs-lg: 1.125rem;                                    /* 18px */
  --fs-sm: .875rem;                                     /* 14px */
  --fs-label: .75rem;                                   /* 12px */
  /* Role tokens (also redefined for dark below) */
  --fill: #143f2b;         /* background of primary buttons and selected chips (white text) */
  --fill-2: #0d2e1f;       /* its hover */
  --band: #0d2e1f;         /* dark bands: Muharram table, hover on dark panels */
  --panel: #143f2b;        /* Ask panel */
  --red-fill: #8b1e24;     /* red backgrounds with white text: Play, badges */
  --rule: #8b1e24;         /* thin accent rules (header, block tops) */
  --short-bg: #efe9d8;
  --short-fg: #5a4a1c;
  --pod-bg: #ece7f3;
  --pod-fg: #44306b;
  --warn: #b7791f;
  --warn-bg: #fbf4e4;
  --placeholder: #6c766f;
  --search-border: transparent;
  --glow-green: rgba(20, 63, 43, .12);
  --glow-red: rgba(139, 30, 36, .1);
  --img-filter: none;
  --img-ring: rgba(20, 40, 28, .08);
  --backdrop: rgba(10, 24, 16, .5);
  --selection: #ecd6d3;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23143f2b' stroke-width='2'/%3E%3C/svg%3E");
  /* Logo only: the emblem (scripts/lib/html.mjs ICONS.mark) and the thin gold rules in the wordmark */
  --logo-gold: #b68b3b;
  --logo-gold-2: #c49a4f;
  --logo-green: #0e4625;
  --logo-red: #a01c20;
  color-scheme: light;
}
/* Dark theme: follows the system unless the visitor chose Light; [data-theme="dark"] forces it.
   Both blocks must stay identical (scripts/check.mjs compares them and checks their contrast). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ivory: #0d1611;
    --ivory-2: #122019;
    --ivory-3: #1d2e25;
    --paper: #15231b;
    --ink: #ede7d8;
    --muted: #b3bdb5;
    --green: #9ccfae;
    --green-2: #cfe6d6;
    --green-3: #1e4a34;
    --green-soft: #1c3427;
    --on-dark: #cfe0d4;
    --red: #f0a39d;
    --red-2: #b02e36;
    --red-soft: #3a1c1e;
    --line: #26392e;
    --line-2: #3b5245;
    --focus: #f0a39d;
    --fill: #2e7350;
    --fill-2: #255f42;
    --band: #10301f;
    --panel: #153f2a;
    --red-fill: #a3252c;
    --rule: #b3363d;
    --short-bg: #3a3320;
    --short-fg: #e8d9a8;
    --pod-bg: #2e2640;
    --pod-fg: #d5c6f0;
    --warn: #d9a441;
    --warn-bg: #2b2414;
    --placeholder: #8d998f;
    --search-border: #3b5245;
    --glow-green: rgba(110, 190, 140, .09);
    --glow-red: rgba(200, 70, 70, .08);
    --img-filter: brightness(.88);
    --img-ring: rgba(255, 255, 255, .08);
    --backdrop: rgba(0, 0, 0, .65);
    --selection: #4a2a2c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .45);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239ccfae' stroke-width='2'/%3E%3C/svg%3E");
    --logo-gold: #d1a54f;
    --logo-gold-2: #ddb466;
    --logo-green: #4f9c6c;
    --logo-red: #d04a46;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ivory: #0d1611;
  --ivory-2: #122019;
  --ivory-3: #1d2e25;
  --paper: #15231b;
  --ink: #ede7d8;
  --muted: #b3bdb5;
  --green: #9ccfae;
  --green-2: #cfe6d6;
  --green-3: #1e4a34;
  --green-soft: #1c3427;
  --on-dark: #cfe0d4;
  --red: #f0a39d;
  --red-2: #b02e36;
  --red-soft: #3a1c1e;
  --line: #26392e;
  --line-2: #3b5245;
  --focus: #f0a39d;
  --fill: #2e7350;
  --fill-2: #255f42;
  --band: #10301f;
  --panel: #153f2a;
  --red-fill: #a3252c;
  --rule: #b3363d;
  --short-bg: #3a3320;
  --short-fg: #e8d9a8;
  --pod-bg: #2e2640;
  --pod-fg: #d5c6f0;
  --warn: #d9a441;
  --warn-bg: #2b2414;
  --placeholder: #8d998f;
  --search-border: #3b5245;
  --glow-green: rgba(110, 190, 140, .09);
  --glow-red: rgba(200, 70, 70, .08);
  --img-filter: brightness(.88);
  --img-ring: rgba(255, 255, 255, .08);
  --backdrop: rgba(0, 0, 0, .65);
  --selection: #4a2a2c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .45);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239ccfae' stroke-width='2'/%3E%3C/svg%3E");
  --logo-gold: #d1a54f;
  --logo-gold-2: #ddb466;
  --logo-green: #4f9c6c;
  --logo-red: #d04a46;
  color-scheme: dark;
}
::selection { background: var(--selection); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 104px; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 1rem/1.6 var(--font-sans); text-rendering: optimizeLegibility; }
:lang(ar) { font-family: var(--font-ar); line-height: 1.75; }
[lang="en"] { font-family: var(--font-sans); }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
svg { flex: none; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--green); font-family: var(--font-serif); font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h1:lang(ar), h2:lang(ar), h3:lang(ar), h1[lang="en"], h2[lang="en"] { letter-spacing: 0; }
h1:lang(ar), h2:lang(ar), h3:lang(ar) { font-family: var(--font-ar-display); font-weight: 600; line-height: 1.45; }
h1[lang="en"], h2[lang="en"] { font-family: var(--font-serif); }
p { margin: 0 0 1em; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.sep { margin-inline: .45em; color: var(--line-2); }
.no-js .js-only { display: none !important; }
[dir="rtl"] .chev, [dir="rtl"] .ext { transform: scaleX(-1); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--fill); color: #fff; padding: .7em 1.1em; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30; border-top: 3px solid var(--rule);
  background: var(--ivory); box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: flex-end; gap: .7rem; text-decoration: none; color: var(--green); margin-inline-end: auto; min-width: 0; }
.brand:hover { color: var(--green); }
.mark { flex: none; display: block; }
/* Emblem colours: --logo-* tokens are for the logo (and the brand's thin gold rules) only, never general UI */
.mk-g { fill: var(--logo-gold); }
.mk-g2 { fill: var(--logo-gold-2); }
.mk-r { fill: var(--logo-red); }
.mk-s { fill: var(--logo-green); }
/* Wordmark: a centred two-line block. Line 2 (surname between gold rules) stretches to exactly the width of line 1.
   Sizes are in em so the footer can scale the whole lockup with one font-size. */
.brand-name { display: inline-grid; justify-items: stretch; width: max-content; font-size: 1.3rem; color: var(--green); white-space: nowrap; }
.bn-1 { display: block; text-align: center; font-family: var(--font-serif); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-inline-end: -.06em; line-height: 1; }
.bn-2 { display: flex; align-items: center; gap: .55em; margin-top: .62em; font-family: var(--font-sans); font-size: max(.5em, .62rem); font-weight: 600; letter-spacing: .34em; text-transform: uppercase; line-height: 1; color: var(--muted); }
.bn-2 > span { margin-inline-end: -.34em; }
.bn-2::before, .bn-2::after { content: ""; flex: 1 1 0; min-width: 8px; height: 1px; background: var(--logo-gold); }
/* Arabic: no capitals or tracking; the surname is set small so its rules keep room, and both lines stay centred */
.bn-1:lang(ar) { font-family: var(--font-ar-display); font-size: 1.24em; font-weight: 700; text-transform: none; letter-spacing: 0; margin: 0; line-height: 1; }
.bn-2:lang(ar) { font-family: var(--font-ar); font-size: max(.54em, .68rem); font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.1; margin-top: .45em; gap: .6em; }
.bn-2:lang(ar)::before, .bn-2:lang(ar)::after { min-width: 1.6em; }
.bn-2:lang(ar) > span { margin: 0; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav a { display: block; padding: .5rem .8rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; }
.site-nav a:hover { background: var(--green-soft); color: var(--green); }
.site-nav a[aria-current="page"] { background: var(--fill); color: #fff; }
.lang-switch {
  display: inline-flex; align-items: center; min-height: 44px; padding: .35rem .95rem; border: 1.5px solid var(--green);
  border-radius: var(--radius-sm); color: var(--green); text-decoration: none; font-weight: 600; white-space: nowrap; background: var(--paper);
}
.lang-switch:hover { background: var(--fill); color: #fff; }
.lang-switch [lang="ar"] { font-family: var(--font-ar); font-size: 1.02rem; }
.nav-toggle { display: none; }
/* Theme control (last item of the menu): an icon button on desktop, a labelled row in the phone menu */
.theme-item { margin-inline-start: .35rem; }
.theme-toggle { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-width: 44px; min-height: 44px; padding: 0 .6rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--paper); color: var(--green); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; }
.theme-toggle:hover { border-color: var(--green); background: var(--green-soft); }
.ti { display: none; }
:root:not([data-theme]) .ti-system, :root[data-theme="light"] .ti-light, :root[data-theme="dark"] .ti-dark { display: block; }
.theme-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-nav ul { align-items: center; }
.lang-banner { background: var(--green-soft); font-size: .9rem; color: var(--green-2); }
.lang-banner p { margin: 0; padding: .5rem 0; }

@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; gap: .5rem; min-height: 64px; padding-block: .45rem; }
  .js .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; min-width: 44px; padding: 0 .8rem; order: 2;
    border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--paper); color: var(--green); font: inherit; font-weight: 600; cursor: pointer;
  }
  .js .nav-toggle[aria-expanded="true"] { background: var(--fill); color: #fff; border-color: var(--green); }
  .lang-switch { order: 1; }
  .site-nav { order: 3; flex-basis: 100%; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: .2rem; padding: .3rem 0 .7rem; }
  .no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; }
  .site-nav a { padding: .75rem .9rem; font-size: 1rem; color: var(--ink); }
  .site-nav ul { align-items: stretch; }
  .theme-item { margin: .3rem 0 0; padding-top: .3rem; border-top: 1px solid var(--line); }
  .theme-toggle { width: 100%; justify-content: flex-start; padding: .7rem .9rem; border: 0; background: transparent; color: var(--ink); font-size: 1rem; }
  .theme-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
@media (max-width: 520px) {
  .brand { flex: 1 1 0; gap: .5rem; }
  .brand .mark { width: 41px; height: 38px; }
  .brand .brand-name { font-size: 1rem; }
  .nav-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .js .nav-toggle { padding: 0; width: 44px; }
  .lang-switch { padding-inline: .7rem; }
}
@media (max-width: 359px) {
  .brand .mark { width: 34px; height: 32px; }
  .brand .brand-name { font-size: .86rem; }
}

/* ---------- Buttons, chips, labels ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .65rem 1.25rem;
  border-radius: var(--radius-sm); border: 1.5px solid transparent; font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-sm { min-height: 44px; padding: .5rem 1rem; font-size: .9rem; }
.btn-primary { background: var(--fill); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--fill-2); color: #fff; box-shadow: var(--shadow); }
.btn-secondary { background: var(--paper); color: var(--green); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--green); color: var(--green); background: var(--paper); box-shadow: var(--shadow); }
.btn-quiet { background: transparent; color: var(--green); border-color: var(--line-2); }
.btn-quiet:hover { background: var(--green-soft); color: var(--green-2); }
.btn-light { background: #fff; color: #143f2b; }
.btn-light:hover { background: #f4efe3; color: #0d2e1f; }
.btn-on-dark { background: var(--green-3); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn-on-dark:hover { background: var(--band); color: #fff; border-color: #fff; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); cursor: pointer; }
.ext { opacity: .8; vertical-align: -2px; }
.icon-link { display: inline-flex; align-items: center; gap: .45rem; }

.kicker { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem .5rem; margin: 0 0 .55rem; color: var(--red); font-size: var(--fs-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.kicker:lang(ar) { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.kicker .sep { margin: 0; color: var(--line-2); }
.kicker-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--green); text-transform: none; letter-spacing: 0; font-size: .85rem; text-decoration: none; min-height: 32px; }
.kicker-link:hover { text-decoration: underline; }
.kicker-dark { color: #f2c4bf; }
.pill-eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.1rem; padding: .32rem .85rem; border-radius: 999px; background: var(--green-soft); color: var(--green-2); font-size: var(--fs-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.pill-eyebrow:lang(ar) { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.pill-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red-fill); }

.tag { display: inline-block; font-size: var(--fs-label); font-weight: 700; line-height: 1.2; padding: .25rem .6rem; border-radius: 999px; background: var(--green-soft); color: var(--green-2); white-space: nowrap; }
.tag-live { background: var(--red-soft); color: var(--red); }
.tag-short { background: var(--short-bg); color: var(--short-fg); }
.tag-podcast { background: var(--pod-bg); color: var(--pod-fg); }
a.tag-link { text-decoration: none; }
a.tag-link:hover { background: var(--fill); color: #fff; }
.count-pill { display: inline-block; vertical-align: middle; padding: .2rem .65rem; border-radius: 999px; background: var(--ivory-3); color: var(--muted); font: 700 var(--fs-label)/1.4 var(--font-sans); letter-spacing: 0; }
.count-pill:lang(ar) { font-family: var(--font-ar); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; overflow: hidden; overflow: clip; background: var(--ivory-2); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 520px; height: 520px; inset-inline-end: -160px; top: -200px; background: radial-gradient(closest-side, var(--glow-green), transparent); }
.hero::after { width: 420px; height: 420px; inset-inline-start: -160px; bottom: -220px; background: radial-gradient(closest-side, var(--glow-red), transparent); }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "head featured" "body featured"; column-gap: clamp(1.5rem, 5vw, 4.5rem); padding-block: clamp(2.2rem, 6vw, 5rem); align-items: end; }
.hero-head { grid-area: head; }
.hero-body { grid-area: body; align-self: start; }
.hero .featured { grid-area: featured; align-self: center; }
.hero-title { font-size: var(--fs-display); line-height: 1.08; letter-spacing: -.02em; margin-bottom: .15em; }
.hero-alt { font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); color: var(--red); margin-bottom: 1.1rem; }
[dir="ltr"] .hero-alt { text-align: left; }
[dir="rtl"] .hero-alt { text-align: right; }
.hero-alt:lang(ar) { font-family: var(--font-ar-display); font-weight: 600; }
.hero-alt:lang(en) { font-family: var(--font-serif); }
.hero-intro { font-size: var(--fs-lg); line-height: 1.6; color: var(--muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.4rem 0; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 1rem 2.5rem; padding: 1.2rem 0 0; margin: 0; border-top: 1px solid var(--line-2); }
.stats li { display: flex; flex-direction: column; }
.stats strong { font-family: var(--font-serif); font-weight: 500; font-size: 1.9rem; line-height: 1.1; color: var(--green); }
.stats span { font-size: var(--fs-sm); color: var(--muted); }

.featured { position: relative; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.featured .player { border-radius: 0; }
.featured-card { padding: 1rem 1.2rem 1.15rem; border-top: 4px solid var(--rule); }
.featured-title { font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.35; margin: 0 0 .35rem; }
.featured-title a { color: var(--ink); text-decoration: none; }
.featured-title a:hover { color: var(--green); text-decoration: underline; }
.featured-title a:lang(ar) { font-family: var(--font-ar-display); font-weight: 600; }
.featured-meta, .featured-src { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 .2rem; }
.featured-pl { display: flex; gap: .7rem; align-items: center; margin-top: .75rem; padding: .6rem .7rem; border-radius: var(--radius-sm); background: var(--ivory-2); text-decoration: none; color: var(--ink); }
.featured-pl:hover { background: var(--green-soft); color: var(--ink); }
.fp-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--fill); color: #fff; flex: none; }
.fp-text { display: flex; flex-direction: column; min-width: 0; }
.fp-pos { font-size: var(--fs-label); font-weight: 700; color: var(--red); letter-spacing: .04em; }
.fp-title { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Player (click-to-load) ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: #0f2419; border-radius: var(--radius); overflow: hidden; isolation: isolate; }
.player > img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-badges { position: absolute; top: .8rem; inset-inline-start: .8rem; inset-inline-end: .8rem; display: flex; gap: .4rem; flex-wrap: wrap; pointer-events: none; }
.pchip { padding: .28rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #17241c; font-size: var(--fs-label); font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.pchip-accent { background: var(--red-fill); color: #fff; letter-spacing: .06em; text-transform: uppercase; direction: inherit; }
.pchip-accent:lang(ar) { letter-spacing: 0; text-transform: none; }
.player-play {
  position: absolute; inset: 0; margin: auto; width: max-content; height: 58px; padding: 0 1.5rem 0 1.15rem; display: inline-flex; align-items: center; gap: .5rem;
  background: var(--red-fill); color: #fff; border: 0; border-radius: 999px; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .35), 0 0 0 6px rgba(255, 255, 255, .18); transition: transform .15s ease, background-color .15s ease;
}
[dir="rtl"] .player-play { padding: 0 1.15rem 0 1.5rem; }
.player-play, .player-play:hover { text-decoration: none; color: #fff; }
.player-play:hover { background: var(--red-2); transform: scale(1.04); }
.player-play:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 7px var(--red-fill); }
.player-note { position: absolute; inset-inline: 0; bottom: 0; margin: 0; padding: 1.8rem .9rem .55rem; font-size: .75rem; color: #fff; background: linear-gradient(to top, rgba(10, 24, 16, .88), transparent); }
.player-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .7rem; padding: 1rem; text-align: center; background: rgba(12, 30, 20, .84); color: #fff; }
.player-overlay p { margin: 0; max-width: 30em; }
.player-overlay :focus-visible { outline-color: #fff; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.4rem, 6vw, 4.5rem); }
.section-tint { background: var(--ivory-2); }
.page-playlists .section { padding-block: clamp(1.8rem, 4vw, 2.8rem); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; margin-bottom: clamp(1.2rem, 3vw, 2rem); }
.section-head h2 { margin: 0; }
.section-intro { color: var(--muted); margin: .45rem 0 0; max-width: 46em; }
.more-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .95rem; white-space: nowrap; text-decoration: none; min-height: 44px; }
.more-link:hover { text-decoration: underline; }
.more-link:hover .chev { transform: translateX(3px); }
[dir="rtl"] .more-link:hover .chev { transform: scaleX(-1) translateX(3px); }

.quote-band { background: var(--paper); border-block: 1px solid var(--line); }
.channel-quote { margin: 0 auto; padding-block: clamp(1.8rem, 4vw, 2.8rem); max-width: 900px; text-align: center; }
.channel-quote blockquote { margin: 0; font-family: var(--font-serif); font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); line-height: 1.6; color: var(--green); }
.channel-quote blockquote::before { content: "\201C"; display: block; font-size: 3.2rem; line-height: .8; color: var(--red); margin-bottom: .2rem; }
.channel-quote blockquote p { margin: 0; }
.channel-quote figcaption { margin-top: .8rem; color: var(--muted); font-size: var(--fs-sm); }

/* Muharram & Ashura: dark forest band with the year table */
.band-muharram { position: relative; background: var(--band); color: #eef3ee; border-top: 4px solid var(--rule); overflow: hidden; overflow: clip; }
.band-muharram::after { content: ""; position: absolute; width: 460px; height: 460px; inset-inline-end: -140px; top: -180px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .07), transparent); pointer-events: none; }
.band-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: clamp(1.4rem, 4vw, 3.5rem); padding-block: clamp(2.4rem, 5vw, 4rem); align-items: start; }
.band-head h2 { color: #fff; margin-bottom: .5rem; }
.band-head p { color: var(--on-dark); margin-bottom: .6rem; }
.band-muharram a { color: #fff; }
.band-muharram a:hover { color: #f6d3cf; }
.band-muharram :focus-visible { outline-color: #fff; }
.mt-table { width: 100%; border-collapse: separate; border-spacing: 0 .5rem; margin-top: -.5rem; }
.mt-table th, .mt-table td { background: rgba(255, 255, 255, .06); }
.mt-year { text-align: start; white-space: nowrap; font-family: var(--font-serif); font-weight: 500; font-size: 1.15rem; padding: .7rem 1.1rem; color: #fff; width: 1%; border-start-start-radius: var(--radius); border-end-start-radius: var(--radius); }
.mt-year:lang(ar) { font-family: var(--font-ar-display); }
.mt-year::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--red-fill); border-radius: 50%; margin-inline-end: .6rem; vertical-align: middle; box-shadow: 0 0 0 3px rgba(139, 30, 36, .35); }
.mt-table td { padding: .3rem; vertical-align: top; width: 49%; }
.mt-table td:last-child { border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
.mt-table td a { display: block; padding: .45rem .7rem; border-radius: var(--radius-sm); text-decoration: none; min-height: 44px; }
.mt-table td a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.mt-main { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.mt-lang { font-weight: 700; }
.mt-count { font-size: .85rem; color: var(--on-dark); }
.mt-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .8rem; color: var(--on-dark); line-height: 1.45; margin-top: .1rem; max-width: 40ch; overflow-wrap: anywhere; }
[dir="ltr"] .mt-title { text-align: left; }
[dir="rtl"] .mt-title { text-align: right; }
.mt-none { display: block; padding: .45rem .7rem; color: var(--on-dark); }
.section-muharram .mt-table { background: var(--band); border-radius: var(--radius-lg); padding: .5rem .75rem; border-spacing: 0 .4rem; margin: 0; }
.section-muharram .mt-table a { color: #fff; }
.section-muharram .mt-table :focus-visible { outline-color: #fff; }
@media (max-width: 800px) {
  .band-inner { grid-template-columns: 1fr; }
  .mt-title { display: none; }
  .mt-main { flex-direction: column; gap: 0; }
  .mt-year { padding-inline: .8rem; font-size: 1.05rem; }
}

/* Lesson series: numbered cards */
.series { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem var(--gap); counter-reset: series; }
.series-item { counter-increment: series; }
.series-link { display: grid; grid-template-columns: 2.4rem 128px minmax(0, 1fr); gap: 1rem; align-items: center; height: 100%; padding: .75rem; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .2s ease, border-color .2s ease; }
.series-link::before { content: counter(series, decimal-leading-zero); font-family: var(--font-serif); font-size: 1.4rem; color: var(--red); text-align: center; font-variant-numeric: tabular-nums; }
.series-link:hover { border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.series-thumb { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--ivory-3); }
.series-thumb img { width: 100%; height: 100%; object-fit: cover; }
.series-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.series-title { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.35; overflow-wrap: anywhere; }
.series-title:lang(ar) { font-family: var(--font-ar-display); font-weight: 600; }
.series-link:hover .series-title { color: var(--green); text-decoration: underline; }
.series-meta { font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 800px) {
  .series { grid-template-columns: 1fr; }
  .series-link { grid-template-columns: 1.8rem 104px minmax(0, 1fr); gap: .75rem; padding: .6rem; }
  .series-link::before { font-size: 1.1rem; }
}

/* Topic tiles */
.topic-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: .75rem; }
.topic-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name arrow" "n arrow"; align-items: center; column-gap: .8rem; height: 100%;
  padding: .95rem 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); min-height: 64px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.topic-list a:hover { border-color: var(--green); box-shadow: var(--shadow); color: var(--ink); }
.topic-name { grid-area: name; font-weight: 700; color: var(--green); }
.topic-n { grid-area: n; font-size: var(--fs-sm); color: var(--muted); }
.topic-list .chev { grid-area: arrow; color: var(--red); }

/* Ask panel (home) */
.ask-panel { position: relative; overflow: hidden; overflow: clip; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap) clamp(1.5rem, 4vw, 3rem); align-items: center; padding: clamp(1.6rem, 5vw, 3.5rem); border-radius: var(--radius-lg); background: var(--panel); color: #fff; box-shadow: var(--shadow-lg); }
.ask-panel::before { content: ""; position: absolute; width: 320px; height: 320px; inset-inline-end: -80px; top: -110px; border-radius: 50%; background: var(--green-3); opacity: .8; pointer-events: none; }
.ask-panel::after { content: ""; position: absolute; width: 240px; height: 240px; inset-inline-start: -90px; bottom: -120px; border-radius: 50%; border: 2px solid rgba(242, 196, 191, .22); pointer-events: none; }
.ask-text, .ask-card { position: relative; z-index: 1; }
.ask-text h2 { color: #fff; }
.ask-text p { color: var(--on-dark); font-size: var(--fs-lg); max-width: 34em; }
.ask-text .hero-actions { margin-bottom: 0; }
.ask-panel :focus-visible { outline-color: #fff; }
.ask-card { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-lg); }
.ask-card :focus-visible { outline-color: var(--focus); }
.ask-card .status-note { margin: 0; }
.section-updates { padding-top: 0; }

/* Notes and empty states */
.empty-note { display: flex; gap: 1rem; align-items: flex-start; border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 1.2rem 1.3rem; background: var(--paper); }
.empty-note p { margin: 0 0 .5rem; color: var(--muted); max-width: 48em; }
.empty-note p:last-child { margin: .8rem 0 0; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--green-soft); color: var(--green); flex: none; }
.empty-title { font-family: var(--font-serif); font-size: var(--fs-h3); color: var(--green) !important; }
.empty-title:lang(ar) { font-family: var(--font-ar-display); font-weight: 600; }
.empty-note-lg { flex-direction: column; align-items: center; text-align: center; padding: clamp(2rem, 6vw, 3.5rem) 1.3rem; }
.empty-note-lg .empty-icon { width: 64px; height: 64px; }
.empty-note-lg p { margin-inline: auto; }
.status-note { border-inline-start: 4px solid var(--warn); background: var(--warn-bg); padding: .9rem 1.1rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
[dir="rtl"] .status-note { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.status-note p { margin: 0 0 .45rem; }
.status-note p:last-child { margin: 0; }
.status-title { font-weight: 700; display: flex; align-items: center; gap: .5rem; color: var(--ink); }
.status-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--warn); flex: none; }
.notice { background: var(--paper); border: 1px solid var(--line); border-inline-start: 4px solid var(--line-2); border-radius: var(--radius-sm); padding: .7rem .95rem; font-size: .92rem; color: var(--muted); margin: .8rem 0 0; }

/* ---------- Video cards ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: var(--gap); }
.grid-feature { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease; }
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.card-link { display: block; text-decoration: none; color: var(--ink); }
/* Keyboard focus: the ring goes round the whole card where :has() exists, otherwise on the link itself. */
.card-link:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: var(--radius); }
@supports selector(:has(*)) {
  .card-link:focus-visible { outline: none; }
  .card:has(.card-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
}
.thumb, .ep-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--ivory-3); overflow: hidden; }
.thumb img, .ep-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.thumb img, .ep-thumb img, .pl-row-thumb img, .series-thumb img, .pn-thumb img, .qa-thumb img, .pl-head-thumb img, .player > img { filter: var(--img-filter); }
.card:hover .thumb img, .pl-row:hover img, .ep-link:hover img { transform: scale(1.04); }
/* Play cue over thumbnails: one CSS shape, no per-card markup */
.thumb::after, .pl-row-thumb::after { content: ""; position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; opacity: 0; transform: scale(.9); transition: opacity .2s ease, transform .2s ease;
  background: rgba(255, 255, 255, .95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l8.5-5.5z' fill='%23143f2b'/%3E%3C/svg%3E") center / 26px no-repeat; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.card:hover .thumb::after, .card-link:focus-visible .thumb::after { opacity: 1; transform: none; }
.duration { position: absolute; inset-inline-end: 8px; bottom: 8px; background: rgba(13, 30, 21, .86); color: #fff; font-size: var(--fs-label); font-weight: 700; padding: .15rem .45rem; border-radius: 6px; direction: ltr; font-variant-numeric: tabular-nums; }
.ep-badge { position: absolute; inset-inline-start: 8px; top: 8px; background: var(--paper); color: var(--green); font-size: var(--fs-label); font-weight: 700; padding: .15rem .5rem; border-radius: 999px; box-shadow: var(--shadow-sm); }
.card-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: .9rem 1rem .35rem; font-family: var(--font-serif); font-size: 1.06rem; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.card-title:lang(ar) { font-family: var(--font-ar-display); font-weight: 600; font-size: 1.08rem; line-height: 1.6; }
.card:hover .card-title { color: var(--green); }
.card-src { font-size: .8rem; color: var(--muted); margin: 0 1rem .35rem; overflow-wrap: anywhere; }
.card-src::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red-fill); margin-inline-end: .4rem; vertical-align: middle; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin: auto 1rem 0; padding: .55rem 0 .9rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.card-title + .card-meta, .card-src + .card-meta { margin-top: auto; }
.card-meta .sep { display: none; }
.card-meta > span:not(.tag) { white-space: nowrap; }
@supports (grid-template-rows: subgrid) {
  @media (min-width: 601px) {
    .grid > .card { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; }
    .card > .card-link { grid-row: 1; }
    .card > .card-src { grid-row: 2; }
    .card > .card-meta { grid-row: 3; margin-top: 0; align-self: stretch; align-content: flex-start; }
  }
}
.grid-feature .card-title { font-size: 1.18rem; }

/* Playlist cards */
.pl-count { position: absolute; inset-inline-end: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 999px; background: rgba(13, 30, 21, .86); color: #fff; font-size: var(--fs-label); font-weight: 700; }
.pl-count svg { width: 14px; height: 14px; }
/* Playlists index: topic groups as blocks (they hold 1-5 playlists each) */
.pl-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: var(--gap); align-items: stretch; }
.pl-group { display: flex; flex-direction: column; min-width: 0; padding: 1.3rem 1.3rem 1.1rem; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .2s ease; }
.pl-group:hover { box-shadow: var(--shadow); }
.pl-group-head { padding-bottom: .8rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line); }
.pl-group-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin: 0; font-size: clamp(1.45rem, 1.25rem + .6vw, 1.75rem); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.pl-group-head h2:lang(ar) { font-weight: 700; line-height: 1.5; letter-spacing: 0; }
.pl-rows { list-style: none; margin: 0 0 1rem; padding: 0; }
.pl-rows li + li { border-top: 1px solid var(--line); }
.pl-row { display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 1rem; align-items: center; margin-inline: -.55rem; padding: .75rem .55rem; text-decoration: none; color: var(--ink); border-radius: var(--radius-sm); transition: background-color .15s ease; }
.pl-row:hover { background: var(--ivory); color: var(--ink); }
.pl-row:focus-visible { outline-offset: 0; border-radius: var(--radius-sm); }
.pl-row-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--ivory-3); box-shadow: 0 0 0 1px var(--img-ring), var(--shadow-sm); }
.pl-row-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pl-row-thumb::after { width: 38px; height: 38px; background-size: 20px; }
.pl-row:hover .pl-row-thumb::after, .pl-row:focus-visible .pl-row-thumb::after { opacity: 1; transform: none; }
.pl-row-text { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.pl-row-title { font-family: var(--font-serif); font-size: 1.14rem; font-weight: 600; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.pl-row-title:lang(ar) { font-family: var(--font-ar-display); font-weight: 700; font-size: 1.12rem; line-height: 1.6; }
.pl-row:hover .pl-row-title { color: var(--green); }
.pl-row-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag-count { display: inline-flex; align-items: center; gap: .3rem; }
.tag-count svg { width: 13px; height: 13px; }
[dir="ltr"] .pl-row-title { text-align: left; }
[dir="rtl"] .pl-row-title { text-align: right; }
/* A group with one playlist shows it as a feature (wide thumbnail above the text) so the block is not mostly empty */
.pl-rows-single .pl-row { grid-template-columns: minmax(0, 1fr); gap: .8rem; padding-top: .9rem; }
.pl-rows-single .pl-row-thumb { aspect-ratio: 2 / 1; }
.pl-rows-single .pl-row-thumb::after { width: 52px; height: 52px; background-size: 28px; }
.pl-rows-single .pl-row-title { font-size: 1.25rem; }
/* An odd last group takes the full row (its playlists side by side) instead of leaving a hole */
.pl-group:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pl-group:last-child:nth-child(odd) .pl-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); column-gap: 1.6rem; }
.pl-group:last-child:nth-child(odd) .pl-rows li + li { border-top: 0; }
.pl-group-more { margin-top: auto; align-self: flex-start; min-height: 40px; padding: .4rem 1rem; border-radius: 999px; background: var(--green-soft); color: var(--green-2); font-size: .88rem; }
.pl-group-more:hover { background: var(--fill); color: #fff; text-decoration: none; }
@media (max-width: 520px) {
  .pl-group { padding: 1.05rem .9rem .9rem; }
  .pl-row { grid-template-columns: 112px minmax(0, 1fr); gap: .8rem; margin-inline: -.4rem; padding-inline: .4rem; }
  .pl-row-title, .pl-rows-single .pl-row-title { font-size: 1.04rem; }
}

/* ---------- Page heads ---------- */
.page-head { position: relative; overflow: hidden; overflow: clip; background: var(--ivory-2); padding-block: clamp(1.8rem, 5vw, 3.2rem); }
.page-head::after { content: ""; position: absolute; width: 380px; height: 380px; inset-inline-end: -120px; top: -180px; border-radius: 50%; background: radial-gradient(closest-side, var(--glow-green), transparent); pointer-events: none; }
.page-head > .wrap { position: relative; z-index: 1; }
.page-head h1 { margin-bottom: .35em; }
.lede { font-size: var(--fs-lg); line-height: 1.6; color: var(--muted); max-width: 44em; margin: 0; }
.crumbs { font-size: .92rem; margin-bottom: 1rem; }
.crumbs a { display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.jump ul { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.jump a { display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .95rem; border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--muted); background: var(--ivory-3); }
.jump a:hover { background: var(--fill); color: #fff; }
.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: clamp(1.3rem, 4vw, 2rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.cta-card h2 { font-size: var(--fs-h3); }
.cta-card p { margin: 0; color: var(--muted); }

/* Playlist page */
.pl-head-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); gap: clamp(1.4rem, 4vw, 3rem); align-items: center; padding: clamp(.8rem, 2vw, 1.2rem); background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.pl-head-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ivory-3); }
.pl-head-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pl-head-thumb .pchip { position: absolute; top: .8rem; inset-inline-start: .8rem; }
.pl-head-thumb .pl-count { inset-inline-end: .8rem; bottom: .8rem; font-size: .85rem; padding: .35rem .8rem; }
.pl-head-text { padding: .4rem .8rem .4rem 0; min-width: 0; }
[dir="rtl"] .pl-head-text { padding: .4rem 0 .4rem .8rem; }
.pl-head h1 { font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.3rem); overflow-wrap: anywhere; }
.pl-head .lede { font-size: 1rem; }
.pl-facts { color: var(--muted); margin: .9rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: var(--fs-sm); }
.pl-facts > span { margin-inline-end: .3rem; }
.section-episodes { padding-top: clamp(1.8rem, 4vw, 2.6rem); }
.episodes-h { font-size: var(--fs-h3); margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.ep-link { display: grid; grid-template-columns: 2.8rem 184px minmax(0, 1fr); gap: 1.1rem; align-items: center; padding: .6rem; border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); transition: border-color .15s ease, box-shadow .15s ease; }
.ep-link:hover { border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.ep-link:focus-visible { outline-offset: 2px; border-radius: var(--radius); }
.ep-num { font-family: var(--font-serif); font-size: 1.4rem; text-align: center; color: var(--red); font-variant-numeric: tabular-nums; }
.ep-thumb { border-radius: var(--radius-sm); }
.ep-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.ep-title { font-family: var(--font-serif); font-size: 1.06rem; line-height: 1.4; overflow-wrap: anywhere; }
.ep-title:lang(ar) { font-family: var(--font-ar-display); font-weight: 600; line-height: 1.6; }
.ep-link:hover .ep-title { color: var(--green); text-decoration: underline; }
.ep-meta, .ep-src { display: flex; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); }
@media (max-width: 860px) {
  .pl-head-inner { grid-template-columns: 1fr; }
  .pl-head-text { padding: 0 .3rem .4rem; }
  [dir="rtl"] .pl-head-text { padding: 0 .3rem .4rem; }
}
@media (max-width: 640px) {
  .ep-link { grid-template-columns: 1.6rem 112px minmax(0, 1fr); gap: .65rem; padding: .5rem; }
  .ep-num { font-size: 1.05rem; }
  .ep-title { font-size: .98rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .ep-thumb .duration { font-size: .68rem; inset-inline-end: 4px; bottom: 4px; }
}

/* Video page */
.video-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(1.4rem, 3vw, 3rem); padding-block: clamp(1rem, 3vw, 2.2rem) 3.5rem; align-items: start; }
.video-main .player { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.video-head { margin: 1.3rem 0 1rem; }
.video-title { font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.1rem); line-height: 1.25; margin: .5rem 0 .8rem; overflow-wrap: anywhere; }
.video-title:lang(ar) { line-height: 1.5; }
.video-meta { display: flex; flex-wrap: wrap; align-items: center; color: var(--muted); margin: 0; font-size: .92rem; }
.player-actions { margin: 0; }
.facts { display: grid; gap: .7rem; margin: 0 0 1.4rem; padding: 1rem 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.facts div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .8rem; }
.facts div + div { border-top: 1px solid var(--line); padding-top: .7rem; }
.facts dt { font-weight: 700; color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.host-note { display: block; font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.description h2, .side-title, .sub-h { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; color: var(--green); }
.description h2:lang(ar), .side-title:lang(ar), .sub-h:lang(ar) { font-family: var(--font-ar); }
.desc-text { white-space: pre-line; overflow-wrap: anywhere; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: .5rem; }
.video-side { position: sticky; top: 88px; }
.side-title { display: flex; align-items: center; gap: .45rem; margin-bottom: .8rem; }
.side-title svg { color: var(--red); }
.side-empty { padding: 1rem; border: 1.5px dashed var(--line-2); border-radius: var(--radius); }
.pl-navs { display: grid; gap: .9rem; margin-bottom: 1.6rem; }
.pl-nav { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.pl-nav.current { border-color: var(--green); box-shadow: var(--shadow), inset 0 3px 0 var(--rule); }
.pl-nav-pos { margin: 0 0 .2rem; font-size: var(--fs-label); font-weight: 700; color: var(--red); letter-spacing: .04em; }
.pl-nav-title { font-size: 1.02rem; line-height: 1.4; margin: 0 0 .6rem; }
.pl-nav-title a { color: var(--ink); text-decoration: none; }
.pl-nav-title a:lang(ar) { font-family: var(--font-ar-display); }
.pl-nav-title a:hover { text-decoration: underline; color: var(--green); }
.pn-bar { height: 4px; border-radius: 4px; background: var(--ivory-3); margin-bottom: .8rem; overflow: hidden; }
.pn-bar span { display: block; height: 100%; background: var(--fill); border-radius: 4px; }
.prevnext { display: grid; gap: .5rem; }
.pn { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: .75rem; align-items: center; padding: .45rem; border-radius: var(--radius-sm); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 44px; font-size: .85rem; min-width: 0; }
a.pn:hover { border-color: var(--green); background: var(--green-soft); color: var(--ink); }
.pn-thumb { display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--ivory-3); }
.pn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pn-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pn-label { display: flex; flex-wrap: wrap; gap: 0 .5rem; font-weight: 700; color: var(--green); }
.pn-ep { color: var(--red); }
.pn-prev .pn-label::before { content: "\2190"; }
.pn-next .pn-label::before { content: "\2192"; }
[dir="rtl"] .pn-prev .pn-label::before { content: "\2192"; }
[dir="rtl"] .pn-next .pn-label::before { content: "\2190"; }
.pn-title { color: var(--ink); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pn-disabled { display: block; min-height: 0; padding: .45rem .7rem; color: var(--muted); background: var(--ivory); border-style: dashed; font-size: .8rem; }
.topic-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.topic-chips a { display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .9rem; border-radius: 999px; background: var(--green-soft); color: var(--green-2); text-decoration: none; font-size: .88rem; font-weight: 600; }
.topic-chips a:hover { background: var(--fill); color: #fff; }
@media (max-width: 960px) {
  .video-layout { grid-template-columns: 1fr; padding-top: 0; }
  .video-side { position: static; }
  .video-main .player { margin-inline: calc(var(--gutter) * -1); border-radius: 0; box-shadow: none; }
}
@media (max-width: 520px) { .facts div { grid-template-columns: 1fr; gap: .1rem; } }

/* ---------- Library ---------- */
.lib-head { padding-bottom: 1.2rem; }
.lib-head-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 1.2rem 3rem; align-items: end; }
.lib-head-text .lede { font-size: 1.02rem; }
.field-label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .35rem; color: var(--ink); padding: 0; }
.field-help { font-size: .8rem; color: var(--muted); margin: .35rem 0 0; }
.search-box { position: relative; }
.search-box svg { position: absolute; inset-inline-start: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
input[type="search"], select { width: 100%; min-height: 48px; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); }
input[type="search"] { min-height: 52px; padding: .6rem 1rem; padding-inline-start: 2.9rem; font-size: 1rem; border-color: var(--search-border); border-radius: var(--radius); box-shadow: var(--shadow); }
input[type="search"]::placeholder { color: var(--placeholder); }
input[type="search"]:focus, select:focus { border-color: var(--green); }
select { padding: .55rem 2.2rem .55rem .8rem; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: var(--select-arrow);
  background-repeat: no-repeat; background-position: right .85rem center; }
[dir="rtl"] select { padding: .55rem .8rem .55rem 2.2rem; background-position: left .85rem center; }
.topic-pills { list-style: none; margin: 1.4rem 0 0; padding: 0 0 .2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.topic-pills button { min-height: 40px; padding: .4rem 1rem; border: 0; border-radius: 999px; background: var(--ivory-3); color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
.topic-pills button:hover { background: var(--green-soft); color: var(--green); }
.topic-pills button[aria-pressed="true"] { background: var(--fill); color: #fff; box-shadow: var(--shadow-sm); }
.topic-pills button:disabled { opacity: .5; cursor: not-allowed; background: var(--ivory-3); color: var(--muted); }
.topic-pills .n { margin-inline-start: .4rem; font-size: .78rem; font-weight: 700; opacity: .8; font-variant-numeric: tabular-nums; }
.library { padding-block: 1.6rem 3.5rem; }
.lib-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; }
.no-js .lib-body { grid-template-columns: 1fr; }
.filters-panel { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; border-radius: var(--radius); scrollbar-width: thin; }
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.15rem .3rem; }
.sheet-head h2 { display: flex; align-items: center; gap: .5rem; font-family: var(--font-sans); font-size: 1.02rem; font-weight: 700; letter-spacing: 0; margin: 0; color: var(--green); }
.sheet-head h2:lang(ar) { font-family: var(--font-ar); }
.sheet-close, .sheet-done { display: none; }
.sheet-body { padding: .3rem 1.15rem 1rem; }
.field { border: 0; margin: 0; padding: .75rem 0; min-width: 0; }
.field + .field { border-top: 1px solid var(--line); }
legend.field-label { float: inline-start; width: 100%; }
legend.field-label + * { clear: both; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip > span { display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; padding: .35rem .8rem; border: 1.5px solid var(--line-2); border-radius: 999px; font-size: .86rem; background: var(--paper); cursor: pointer; }
.chip input:checked + span { background: var(--fill); border-color: var(--green); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip input:disabled + span { opacity: .45; cursor: not-allowed; }
.chip .n { font-size: .76rem; opacity: .85; font-variant-numeric: tabular-nums; }
.sheet-foot { display: flex; gap: .6rem; justify-content: space-between; padding: .8rem 1.15rem; border-top: 1px solid var(--line); }
.sort-note { margin-top: .4rem; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-bottom: 1.2rem; }
.result-count { margin: 0; display: inline-flex; align-items: center; min-height: 36px; padding: .2rem .9rem; border-radius: 999px; background: var(--green-soft); color: var(--green-2); font-weight: 700; font-size: .95rem; }
.results-tools { display: flex; align-items: center; gap: .6rem; margin-inline-start: auto; }
.sort-field { display: flex; align-items: center; gap: .5rem; }
.sort-field .field-label { margin: 0; white-space: nowrap; }
.sort-field select { min-width: 190px; min-height: 44px; }
.filters-toggle { display: none; }
.badge { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--red-fill); color: #fff; font-size: .76rem; }
.active-filters { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; flex-basis: 100%; }
.active-filters:empty { display: none; }
.active-filters button { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .25rem .5rem .25rem .8rem; border-radius: 999px; border: 1px solid var(--green); background: var(--paper); color: var(--green-2); font: inherit; font-size: .85rem; cursor: pointer; max-width: 100%; }
[dir="rtl"] .active-filters button { padding: .25rem .8rem .25rem .5rem; }
.active-filters button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 24ch; }
.active-filters button:hover { background: var(--fill); color: #fff; }
.active-filters svg { width: 16px; height: 16px; }
.more-wrap { text-align: center; margin-top: 2.2rem; }
.lib-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2.8rem 1rem; margin-bottom: 1rem; background: var(--paper); border: 1.5px dashed var(--line-2); border-radius: var(--radius); }
.lib-state p { margin: 0 0 .7rem; color: var(--muted); }
.lib-state .state-title { font-family: var(--font-serif); font-size: var(--fs-h3); color: var(--green); }
.lib-state .state-title:lang(ar) { font-family: var(--font-ar-display); font-weight: 600; }
.lib-state .state-icon { color: var(--line-2); margin-bottom: .6rem; }
.grid.is-loading { opacity: .55; }

@media (max-width: 960px) {
  .lib-head-inner { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .lib-body { grid-template-columns: 1fr; }
  .js .filters-panel { position: fixed; inset: 0; z-index: 60; max-height: none; overflow: hidden; border-radius: 0; background: var(--backdrop); display: none; align-items: flex-end; }
  .js .filters-panel.open { display: flex; }
  .js .filters { width: 100%; max-height: 88vh; display: flex; flex-direction: column; border-radius: var(--radius-lg) var(--radius-lg) 0 0; border: 0; box-shadow: var(--shadow-lg); animation: sheet-up .2s ease-out; }
  .sheet-head { position: relative; padding: 1.3rem 1.15rem .7rem; border-bottom: 1px solid var(--line); }
  .sheet-head::before { content: ""; position: absolute; left: 50%; top: .5rem; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); }
  .sheet-body { overflow: auto; flex: 1; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .sheet-close, .sheet-done { display: inline-flex; }
  .sheet-done { flex: 1; }
  .sheet-foot { padding-bottom: max(.8rem, env(safe-area-inset-bottom)); }
  .chip > span { min-height: 44px; }
  body.sheet-open { overflow: hidden; }
}
@keyframes sheet-up { from { transform: translateY(30%); opacity: .4; } to { transform: none; opacity: 1; } }

/* Phones: compact list (thumbnail beside title) for library and home results */
@media (max-width: 600px) {
  .topic-pills { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: .5rem; scrollbar-width: none; }
  .topic-pills::-webkit-scrollbar { display: none; }
  .results-tools { margin-inline-start: 0; flex-basis: 100%; }
  .sort-field { flex: 1; min-width: 0; }
  .sort-field .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sort-field select { min-width: 0; }
  .page-library .grid, .page-home .grid { grid-template-columns: 1fr; gap: .7rem; }
  .page-library .card, .page-home .card { display: grid; grid-template-columns: 128px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: .8rem; padding: .55rem; align-items: start; }
  .page-library .card-link, .page-home .card-link { display: contents; }
  .page-library .thumb, .page-home .thumb { grid-row: 1 / span 3; border-radius: var(--radius-sm); }
  .page-library .card-title, .page-home .card-title { margin: 0 0 .25rem; font-size: .98rem; -webkit-line-clamp: 3; }
  .page-library .card-src, .page-home .card-src { margin: 0 0 .2rem; }
  .page-library .card-meta, .page-home .card-meta { margin: 0; padding: .3rem 0 0; border-top: 0; font-size: .76rem; align-self: end; }
  .thumb::after { display: none; }
  .duration { font-size: .68rem; inset-inline-end: 4px; bottom: 4px; }
  .ep-badge { font-size: .66rem; inset-inline-start: 4px; top: 4px; }
}

/* ---------- Updates, ask, about, state pages ---------- */
.posts { list-style: none; margin: 0; padding: 0; columns: 3 300px; column-gap: var(--gap); }
.post { break-inside: avoid; margin-bottom: var(--gap); display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post::before { content: ""; width: 5px; flex: none; background: var(--red-fill); }
.post-body { padding: 1.1rem 1.2rem; min-width: 0; }
.post-meta { font-size: .85rem; color: var(--muted); }
.post-text { white-space: pre-line; }
.post-embed iframe { width: 100%; min-height: 560px; border: 0; border-radius: 8px; background: var(--ivory); }
.posts-compact .post-body { padding: .9rem 1rem; }
.accounts { list-style: none; padding: 0; margin: 0 0 1.8rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.ask-page-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-sm); }
.qa-card { display: grid; grid-template-columns: 144px minmax(0, 1fr) auto; gap: 1rem; align-items: center; margin-top: 1rem; padding: .7rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.qa-card:hover { border-color: var(--green); box-shadow: var(--shadow); color: var(--ink); }
.qa-card .chev { color: var(--red); }
.qa-thumb { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--ivory-3); }
.qa-thumb img { width: 100%; height: 100%; object-fit: cover; }
.qa-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.qa-label { font-size: var(--fs-label); font-weight: 700; color: var(--red); letter-spacing: .04em; }
.qa-title { font-family: var(--font-serif); font-size: 1.05rem; overflow-wrap: anywhere; }
.qa-meta { font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 520px) { .qa-card { grid-template-columns: 96px minmax(0, 1fr); } .qa-card .chev { display: none; } }
.posts + .accounts { margin: 1rem 0 0; }
/* Homepage Q&A panel while no question destination is configured: the card sits on the dark panel. */
.ask-card-qa { padding: 0; background: transparent; box-shadow: none; }
.ask-card-qa .qa-card { margin-top: 0; box-shadow: var(--shadow-lg); }

/* Static archive pager (library page 1 and library/page/N/): plain links, works without JavaScript. */
.pager { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pager-h { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 700; color: var(--muted); margin: 0 0 .7rem; letter-spacing: normal; }
.pager-pages { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.pager-pages a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; min-height: 2.5rem; padding: 0 .5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--green); text-decoration: none; font-variant-numeric: tabular-nums; }
.pager-pages a:hover { border-color: var(--green); }
.pager-pages a[aria-current="page"] { background: var(--fill); border-color: var(--fill); color: #fff; font-weight: 700; }
.pager-step { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin: 1rem 0 0; }
.pager-step a { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.5rem; font-weight: 700; }
.pager-step a[rel="next"] { margin-inline-start: auto; }
.prose { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.2rem, 4vw, 2.4rem) !important; margin-block: clamp(1.6rem, 4vw, 2.6rem); }
.prose h2 { font-size: 1.45rem; margin-top: 1.8rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-inline-start: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--red); }
.state-page { padding-block: clamp(2.5rem, 8vw, 5.5rem); }
.state-card { max-width: 640px; margin: 0 auto; text-align: center; padding: clamp(1.6rem, 5vw, 3rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.state-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--green-soft); margin-bottom: 1rem; }
.state-icon .mark { width: 44px; height: 41px; }
.state-card .lede { margin-inline: auto; }
.state-card .hero-actions { justify-content: center; margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ivory-2); color: var(--ink); border-top: 1px solid var(--line); }
.site-footer a { color: var(--green); }
.site-footer a:hover { color: var(--red); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1.6rem 2.5rem; padding-block: clamp(2.2rem, 5vw, 3.2rem) 1.6rem; }
.footer-lockup { display: flex; align-items: flex-end; gap: .85rem; margin: 0 0 .9rem; }
.footer-lockup .mark { width: 64px; height: 60px; }
.footer-lockup .brand-name { font-size: 1.55rem; }
.footer-note { font-size: .9rem; color: var(--muted); margin: 0; max-width: 36em; }
.footer-h { font-weight: 700; font-size: .92rem; margin: 0 0 .6rem; color: var(--ink); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; font-size: .92rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-handle { color: var(--muted); font-size: .85rem; }
[dir="rtl"] .footer-handle { text-align: end; }
.footer-data { grid-column: 1 / -1; margin: 0; padding-top: 1.2rem; border-top: 1px solid var(--line-2); font-size: .85rem; color: var(--muted); }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; grid-template-areas: "head" "featured" "body"; row-gap: 1.4rem; padding-block: 1.5rem 2.4rem; }
  .hero-alt { margin-bottom: 0; }
  .hero-body .hero-actions { margin-top: .2rem; }
  .ask-panel { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .pill-eyebrow { margin-bottom: .7rem; }
  .hero-title { font-size: 2rem; }
  .hero-alt { font-size: 1.15rem; }
  .featured-card { padding: .85rem .95rem 1rem; }
  .featured-title { font-size: 1.05rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .stats { gap: .8rem 1.6rem; }
  .stats strong { font-size: 1.55rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: .2rem; }
  .empty-note { flex-direction: column; }
  .channel-quote { text-align: start; }
  .topic-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .topic-list a { grid-template-columns: 1fr; grid-template-areas: "name" "n"; padding: .65rem .75rem; min-height: 0; align-content: start; }
  .topic-list .chev { display: none; }
  .topic-name { font-size: .92rem; line-height: 1.3; }
  .player-badges .pchip:not(.pchip-accent) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover .thumb img, .pl-row:hover img, .ep-link:hover img, .player-play:hover, .more-link:hover .chev { transform: none; }
  [dir="rtl"] .more-link:hover .chev { transform: scaleX(-1); }
}
@media (forced-colors: active) {
  .chip input:checked + span, .topic-pills button[aria-pressed="true"], .site-nav a[aria-current="page"] { outline: 2px solid CanvasText; }
  .player-play { border: 2px solid ButtonText; }
  .mark .mk-g, .mark .mk-g2, .mark .mk-r, .mark .mk-s { fill: CanvasText; }
  .bn-2::before, .bn-2::after { background: CanvasText; }
  .card, .pl-group { border: 1px solid CanvasText; }
}
@media print {
  .site-header, .site-footer, .player, .filters-panel, .results-tools, .topic-pills, .search-field { display: none !important; }
}
