/* ==========================================================================
   Sehar-e-Bayan — "Lapis & Gold" theme
   RTL-first, vanilla CSS. Light theme on :root, dark ("mushaira night")
   via [data-theme="dark"] or prefers-color-scheme.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-alt: #E9EDF7;
  --surface-sunk: #EEF1F8;
  --midnight: #0F1733;
  --midnight-2: #1C2650;
  --glow: #22357A;
  --lapis: #2C47A6;
  --lapis-hover: #1F3787;
  --lapis-tint: #E3E9F8;
  --gold: #D4A24C;
  --gold-bright: #E9C072;
  --gold-text: #8C6418;
  --emerald: #0E7A63;
  --emerald-tint: #DDF2EC;
  --text: #141A33;
  --muted: #556079;
  --on-dark: #E8ECF7;
  --on-dark-muted: #AEB7D3;
  --on-dark-strong: #F7F9FF;
  --line: rgba(20, 26, 51, .12);
  --line-dark: rgba(232, 236, 247, .14);
  --shadow-sm: 0 2px 8px rgba(15, 23, 51, .06);
  --shadow-md: 0 14px 30px rgba(15, 23, 51, .12);
  --shadow-lg: 0 30px 60px rgba(0, 0, 0, .35);

  --urdu: 'Nafees Nastaleeq', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', serif;
  --latin: Georgia, 'Times New Roman', serif;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 86px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1026;
  --surface: #121A3A;
  --surface-alt: #172045;
  --surface-sunk: #141C3E;
  --lapis: #8FA6F0;
  --lapis-hover: #B3C3F7;
  --lapis-tint: rgba(143, 166, 240, .14);
  --gold-text: #E9C072;
  --emerald: #5FD0B5;
  --emerald-tint: rgba(95, 208, 181, .14);
  --text: #E8ECF7;
  --muted: #A3ADCB;
  --line: rgba(232, 236, 247, .12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-md: 0 14px 30px rgba(0, 0, 0, .35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0B1026;
    --surface: #121A3A;
    --surface-alt: #172045;
    --surface-sunk: #141C3E;
    --lapis: #8FA6F0;
    --lapis-hover: #B3C3F7;
    --lapis-tint: rgba(143, 166, 240, .14);
    --gold-text: #E9C072;
    --emerald: #5FD0B5;
    --emerald-tint: rgba(95, 208, 181, .14);
    --text: #E8ECF7;
    --muted: #A3ADCB;
    --line: rgba(232, 236, 247, .12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
    --shadow-md: 0 14px 30px rgba(0, 0, 0, .35);
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--urdu);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
picture { display: contents; }
a { color: var(--lapis); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--lapis-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.lat { font-family: var(--latin); }
.sr-only { position: absolute; 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; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--midnight); padding: 6px 16px; border-radius: 999px; }
.skip-link:focus { top: 12px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.7; }

/* ---------- 3. Buttons, chips, icons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-size: 16px; line-height: 2.2; cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--midnight); }
.btn-gold:hover { background: var(--gold-bright); color: var(--midnight); }
.btn-lapis { background: var(--lapis); color: #fff; }
.btn-lapis:hover { background: var(--lapis-hover); color: #fff; }
.btn-ink { background: var(--midnight); color: var(--on-dark); }
.btn-ink:hover { background: var(--midnight-2); color: #fff; }
.btn-line { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-line:hover { border-color: var(--gold); color: var(--text); }
.btn-ghost { border-color: rgba(232, 236, 247, .4); color: var(--on-dark); background: transparent; }
.btn-ghost:hover { border-color: var(--gold-bright); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }

.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { border-color: var(--gold); color: var(--lapis); }
.icon-btn svg { width: 18px; height: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; line-height: 2; color: var(--text); cursor: pointer;
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--lapis); border-color: var(--lapis); color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 2; padding: 0 12px; border-radius: 999px; background: var(--lapis-tint); color: var(--lapis); }
.tag-gold { background: rgba(212, 162, 76, .16); color: var(--gold-text); }

.play-btn {
  width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lapis); color: #fff; transition: background .2s var(--ease), transform .2s var(--ease);
}
.play-btn:hover { background: var(--lapis-hover); color: #fff; transform: scale(1.04); }
.play-btn svg { width: 16px; height: 16px; }
.play-btn.is-playing .i-play, .play-btn:not(.is-playing) .i-pause { display: none; }
.play-btn-gold { background: var(--gold); color: var(--midnight); }
.play-btn-gold:hover { background: var(--gold-bright); color: var(--midnight); }
.play-mini {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; background: var(--lapis); color: #fff;
}
.play-mini svg { width: 12px; height: 12px; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--gold-text); line-height: 2; }
.ornament { display: inline-block; width: 44px; height: 10px; flex: none; }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 38px; flex: none; }
.brand-word { font-size: 24px; font-weight: 700; line-height: 1.7; }
.main-nav { display: flex; gap: 26px; font-size: 16px; }
.main-nav a { color: var(--text); padding: 4px 0; border-bottom: 2px solid transparent; line-height: 2; }
.main-nav a:hover { color: var(--lapis); }
.main-nav a[aria-current="page"] { color: var(--lapis); border-bottom-color: var(--gold); font-weight: 600; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.header-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.header-search input { border: 0; outline: 0; background: transparent; width: 200px; font-size: 13px; line-height: 2.4; color: var(--text); }
.header-search svg { width: 18px; height: 18px; flex: none; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.menu-toggle { display: none; }

/* in-menu search (phones only, see the drawer below) */
.nav-search { display: none; }
@media (max-width: 980px) {
  .header-search input { width: 130px; }
}
@media (max-width: 860px) {
  :root { --header-h: 66px; }
  .menu-toggle { display: inline-flex; }
  /* The header's backdrop-filter makes it the containing block for fixed children, so the drawer is
     positioned from the header's bottom edge with an explicit full-screen height instead. */
  .header-actions .header-search { display: none; }
  .main-nav {
    position: absolute; top: 100%; inset-inline: 0; z-index: 59;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    flex-direction: column; gap: 0; padding: 12px var(--gutter) 32px;
    background: var(--bg); border-top: 1px solid var(--line);
    transform: translateX(100%); visibility: hidden;
    transition: transform .25s var(--ease), visibility 0s linear .25s;
    font-size: 20px; overflow-y: auto;
  }
  .main-nav.is-open { transform: none; visibility: visible; transition: transform .25s var(--ease); }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .main-nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .main-nav .nav-search { display: flex; height: 48px; margin: 4px 0 12px; }
  .main-nav .nav-search input { width: 100%; font-size: 16px; }
  .header-inner { gap: 12px; }
  .brand-word { font-size: 21px; }
}
body.menu-open { overflow: hidden; }

/* ---------- 5. Dark hero (shared page header) ---------- */
.hero-dark {
  position: relative; overflow: hidden; color: var(--on-dark);
  background: radial-gradient(ellipse 80% 70% at 50% 0%, var(--glow) 0%, var(--midnight) 70%);
}
.hero-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .11;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath d='M36 6l8 20 20 8-20 8-8 20-8-20-20-8 20-8z' fill='none' stroke='%23E9C072' stroke-width='1'/%3E%3Ccircle cx='36' cy='36' r='2.5' fill='%23E9C072'/%3E%3C/svg%3E");
  background-size: 72px 72px;
}
.hero-dark > * { position: relative; }
.hero-dark a { color: var(--on-dark); }
.hero-dark a:hover { color: var(--gold-bright); }
.hero-dark .eyebrow { color: var(--gold-bright); }
.page-hero { padding-block: 8px 52px; }
.page-hero h1 { font-size: clamp(28px, 3.6vw, 40px); color: var(--on-dark-strong); line-height: 2; }
.page-hero .lead { margin: 0; font-size: 17px; line-height: 2.2; color: var(--on-dark-muted); max-width: 640px; }
.page-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.page-hero-row > :first-child { flex: 1 1 420px; min-width: 0; }

.crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-block: 16px 4px; font-size: 13px; line-height: 2; color: var(--on-dark-muted); }
.crumb a { color: var(--on-dark-muted); }
.crumb a:hover { color: var(--gold-bright); }
.crumb [aria-current] { color: var(--on-dark); }

.hero-search { display: flex; gap: 8px; background: #fff; border-radius: 999px; padding: 6px; box-shadow: var(--shadow-lg); max-width: 580px; }
.hero-search label { flex: 1; display: flex; align-items: center; gap: 10px; padding-inline: 14px; color: #556079; min-width: 0; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #141A33; font-size: 15px; line-height: 2.4; }
.hero-search svg { width: 20px; height: 20px; flex: none; }
.hero-search .btn { min-height: 48px; }
.search-dark { display: flex; gap: 10px; flex: 1 1 380px; min-width: 0; }
.search-dark label { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 52px; padding-inline: 18px; border-radius: 999px; background: var(--midnight-2); border: 1px solid var(--line-dark); color: var(--on-dark-muted); min-width: 0; }
.search-dark input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--on-dark); font-size: 14px; line-height: 2.4; }
.search-dark input::placeholder { color: var(--on-dark-muted); }
.search-dark svg { width: 18px; height: 18px; flex: none; }

.stat-row { display: flex; flex-wrap: wrap; gap: 28px 36px; }
.stat-num { font-family: var(--latin); font-size: 30px; font-weight: 600; line-height: 1.3; color: var(--gold-bright); }
.stat-label { font-size: 14px; line-height: 2; color: var(--on-dark-muted); }
.stat-row.divided { gap: 0; }
.stat-row.divided > div { padding-inline-end: 28px; margin-inline-end: 28px; border-inline-end: 1px solid var(--line-dark); }
.stat-row.divided > div:last-child { border: 0; margin: 0; padding: 0; }

/* identity heroes (poet / speaker / space) */
.identity { display: flex; gap: 44px; align-items: center; flex-wrap: wrap; padding-block: 28px 52px; }
.identity-photo { flex: none; width: 220px; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; border: 2px solid var(--gold); box-shadow: 0 0 0 8px rgba(212, 162, 76, .14); background: var(--midnight-2); }
.identity-photo img { width: 100%; height: 100%; object-fit: cover; }
.identity-photo.round { width: 190px; aspect-ratio: 1; border-radius: 50%; }
.identity-text { flex: 1 1 420px; min-width: 0; }
.identity-text h1 { font-size: clamp(32px, 4vw, 46px); color: var(--on-dark-strong); }
.identity-latin { margin: 0 0 18px; font-family: var(--latin); font-style: italic; font-size: 19px; color: var(--on-dark-muted); }
.identity-quote { margin: 0 0 22px; font-size: 19px; line-height: 2.3; color: #CFD6EA; }
.identity .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
@media (max-width: 600px) {
  .identity { gap: 24px; justify-content: center; text-align: center; }
  .identity-photo { width: 170px; }
  .identity-photo.round { width: 150px; }
  .identity .actions, .identity .stat-row { justify-content: center; }
}

/* ---------- 6. Sections ---------- */
.section { padding-block: clamp(44px, 7vw, 72px); }
.section-alt { background: var(--surface-alt); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(24px, 3vw, 30px); }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; line-height: 2; }
.see-all svg { width: 16px; height: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.grid-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.empty-note { color: var(--muted); font-size: 16px; }
.layout-2col { display: flex; gap: 44px; flex-wrap: wrap; }
.layout-2col > .main { flex: 999 1 580px; min-width: 0; }
.layout-2col > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* ---------- 7. Home hero ---------- */
.home-hero { padding-top: clamp(40px, 6vw, 64px); background: radial-gradient(ellipse 70% 80% at 85% 0%, var(--glow) 0%, var(--midnight) 65%); }
.home-hero-grid { display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.home-hero-copy { flex: 1 1 500px; min-width: 0; }
.home-hero-side { flex: 1 1 420px; min-width: 0; position: relative; padding-bottom: 40px; }
.pill { display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(212, 162, 76, .4); background: rgba(212, 162, 76, .1); color: var(--gold-bright); border-radius: 999px; padding: 0 16px; font-size: 14px; line-height: 2.1; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-bright); }
.home-hero h1 { margin: 18px 0 10px; font-size: clamp(32px, 4.6vw, 56px); white-space: nowrap; line-height: 1.9; color: var(--on-dark-strong); }
.home-hero h1 em { font-style: normal; color: var(--gold-bright); }
.home-hero .lead { margin: 0 0 28px; font-size: 19px; line-height: 2.3; color: #CFD6EA; max-width: 560px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; font-size: 14px; line-height: 2; }
.quick-links span { color: var(--on-dark-muted); }
.quick-links a { border: 1px solid rgba(232, 236, 247, .22); border-radius: 999px; padding: 0 14px; }
.home-hero .stat-row { margin-top: 36px; }
.poet-ribbon { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line-dark); margin-top: 40px; padding-block: 22px; }
.poet-ribbon > span { font-size: 14px; color: var(--on-dark-muted); }
.poet-ribbon .faces { display: flex; gap: 10px; flex-wrap: wrap; }
.poet-ribbon .faces a { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(232, 236, 247, .2); display: flex; align-items: center; justify-content: center; }
.poet-ribbon .faces img { width: 100%; height: 100%; object-fit: cover; }
.poet-ribbon .more { background: rgba(212, 162, 76, .15); border-color: rgba(212, 162, 76, .4) !important; color: var(--gold-bright) !important; font-family: var(--latin); font-size: 15px; }

/* sher of the day card (double manuscript frame) */
.sher-frame {
  margin: 0; text-align: center; color: var(--on-dark-strong);
  border: 1px solid rgba(212, 162, 76, .5); border-radius: var(--radius-lg);
  padding: 36px 32px 24px; background: rgba(28, 38, 80, .6);
  box-shadow: inset 0 0 0 7px rgba(15, 23, 51, .55), inset 0 0 0 8px rgba(212, 162, 76, .35), var(--shadow-lg);
}
.sher-frame blockquote { margin: 16px 0 6px; font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; line-height: 2.3; }
.sher-frame blockquote span { display: block; }
.sher-frame .roman { margin: 0 0 18px; font-family: var(--latin); font-style: italic; font-size: 15px; color: var(--on-dark-muted); }
.sher-frame figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line-dark); padding-top: 16px; }
.byline { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; line-height: 2; white-space: nowrap; }
.byline img, .byline .avatar-ph { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.sher-frame .actions { display: flex; gap: 8px; align-items: center; }
.ghost-icon { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(232, 236, 247, .3); background: transparent; color: var(--on-dark); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ghost-icon:hover { border-color: var(--gold-bright); color: #fff; }
.ghost-icon svg { width: 16px; height: 16px; }
.pill-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(212, 162, 76, .5); color: var(--gold-bright) !important; font-size: 14px; }
.float-card {
  position: relative; display: flex; align-items: center; gap: 14px; max-width: 360px;
  margin: -18px 32px 0 0; padding: 12px 16px; border-radius: 16px;
  background: #fff; color: #141A33 !important; box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.float-card:hover { color: #141A33 !important; transform: translateY(-2px); }
.float-card .meta { flex: 1; min-width: 0; }
.float-card .meta small { display: block; font-size: 12px; color: #0E7A63; line-height: 1.9; }
.float-card .meta span { display: block; font-size: 15px; line-height: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 8. Cards ---------- */
.date-badge { width: 60px; height: 60px; flex: none; border-radius: 12px; background: var(--midnight); color: var(--gold-bright); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.4; }
.date-badge b { font-family: var(--latin); font-size: 21px; font-weight: 600; }
.date-badge small { font-size: 11px; color: var(--on-dark-muted); }
.wave { display: flex; align-items: center; gap: 3px; height: 28px; }
.wave i { width: 3px; border-radius: 2px; background: var(--gold); display: block; }

.space-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; color: var(--text); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.space-card:hover { color: var(--text); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.space-card .top { display: flex; align-items: center; gap: 14px; }
.space-card .top .wave { margin-inline-start: auto; }
.space-card h3 { font-size: 19px; font-weight: 600; line-height: 2.1; }
.space-card .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); line-height: 2; }
.avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-ph { display: inline-flex; align-items: center; justify-content: center; flex: none; color: #F7F9FF; background: linear-gradient(160deg, var(--glow), var(--midnight)); }
.avatar-ph.t1 { background: linear-gradient(160deg, #0E7A63, #0F1733); }
.avatar-ph.t2 { background: linear-gradient(160deg, #8C6418, #0F1733); }

.rec-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.rec-card .info { flex: 1; min-width: 0; }
.rec-card .info a { color: var(--text); font-size: 18px; line-height: 2.1; }
.rec-card .info a:hover { color: var(--lapis); }
.rec-card small { display: block; font-size: 13px; color: var(--muted); line-height: 2; }
.rec-card .avatar { width: 44px; height: 44px; }

.poet-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 18px; text-align: center; color: var(--text); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.poet-card:hover { color: var(--text); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.poet-photo { width: 100%; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--surface-alt); }
.poet-photo img { width: 100%; height: 100%; object-fit: cover; }
.poet-photo .avatar-ph { width: 100%; height: 100%; font-size: 54px; }
.poet-card .name { font-size: 18px; line-height: 2.1; }
.poet-card .latin { font-family: var(--latin); font-size: 13px; color: var(--muted); line-height: 1.6; }
.poet-card .counts { display: flex; justify-content: center; gap: 12px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.poet-card .counts .audio { display: inline-flex; align-items: center; gap: 4px; color: var(--lapis); font-family: var(--latin); }
.poet-card .counts svg { width: 10px; height: 10px; }
.poets-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.poets-grid.compact { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 20px; }
@media (min-width: 1100px) { .poets-grid.compact { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 520px) { .home-hero h1 { white-space: normal; } }
.poets-grid.compact .poet-card { padding: 0; background: none; border: 0; }
.poets-grid.compact .poet-card:hover { box-shadow: none; }

.speaker-card { display: flex; gap: 16px; padding: 20px; align-items: flex-start; color: var(--text); transition: box-shadow .2s var(--ease); }
.speaker-card:hover { color: var(--text); box-shadow: var(--shadow-md); }
.speaker-card .avatar, .speaker-card .avatar-ph { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--gold); font-size: 28px; }
.speaker-card .name { font-size: 19px; line-height: 2; }
.handle { font-family: var(--latin); font-size: 13px; color: var(--muted); direction: ltr; unicode-bidi: isolate; display: inline-block; }
.speaker-card p { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 2.1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* poem rows */
.poem-rows { list-style: none; margin: 0; padding: 0; }
.poem-rows li { border-bottom: 1px solid var(--line); }
.poem-rows a.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 4px; color: var(--text); }
.poem-rows a.row:hover .t { color: var(--lapis); }
.poem-rows .num { font-family: var(--latin); color: var(--gold-text); font-size: 14px; }
.poem-rows .t { display: block; font-size: 18px; line-height: 2.1; }
.poem-rows .r { display: block; font-family: var(--latin); font-size: 13px; color: var(--muted); direction: ltr; text-align: right; line-height: 1.6; }
.poem-rows .by { font-size: 13px; color: var(--muted); }
.poem-rows .end { display: flex; align-items: center; gap: 8px; }

/* alphabet */
.alpha-bar { border-bottom: 1px solid var(--line); background: var(--bg); }
.alpha { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 10px; }
.alpha a { min-width: 40px; height: 40px; padding: 0 6px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1; color: var(--text); }
.alpha a:hover { background: var(--surface-alt); color: var(--lapis); }
.alpha a[aria-current="true"] { background: var(--midnight); color: var(--gold-bright); }
.alpha.boxed a { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); }

/* pagination */
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-family: var(--latin); font-size: 15px; }
.pagination a:hover { border-color: var(--gold); }
.pagination [aria-current="page"] { background: var(--midnight); border-color: var(--midnight); color: var(--gold-bright); }
.pagination .disabled { opacity: .45; }
.pagination .word { font-family: var(--urdu); }

.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.result-bar p { margin: 0; font-size: 14px; color: var(--muted); }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 9. Tabs & identity pages ---------- */
.tabbar { position: sticky; top: var(--header-h); z-index: 40; background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.tabbar nav { display: flex; gap: 6px; }
.tabbar a { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 22px; font-size: 17px; color: var(--muted); border-bottom: 3px solid transparent; line-height: 2; }
.tabbar a:hover { color: var(--text); }
.tabbar a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); font-weight: 600; }
.count { font-family: var(--latin); font-size: 12px; background: var(--surface-alt); border-radius: 999px; padding: 2px 8px; color: var(--muted); line-height: 1.4; }
.prose { font-size: 19px; line-height: 2.1; }
.prose p { margin: 0 0 18px; }
.facts .fact { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 2; }
.facts .fact:last-child { border-bottom: 0; }
.facts .fact span:first-child { color: var(--muted); }
.side-card { padding: 22px; }
.side-card h3 { font-size: 19px; margin-bottom: 8px; }
.mini-list { display: flex; flex-direction: column; gap: 12px; }
.mini-list a { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 16px; line-height: 2; }
.mini-list a:hover { color: var(--lapis); }
.mini-list img, .mini-list .avatar-ph { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; font-size: 18px; }
.sher-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.sher-card { margin: 0; border-radius: 18px; padding: 30px 26px; text-align: center; color: var(--on-dark-strong); background: var(--midnight); box-shadow: inset 0 0 0 6px rgba(15, 23, 51, .6), inset 0 0 0 7px rgba(212, 162, 76, .3); }
.sher-card:nth-child(2n) { background: var(--midnight-2); }
.sher-card p { margin: 0; font-size: 21px; line-height: 2.3; }
.sher-card figcaption { margin-top: 12px; font-size: 14px; }
.sher-card figcaption a { color: var(--gold-bright); }

/* roster (space) */
.host-strip { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.host-strip .card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.host-strip .avatar, .host-strip .avatar-ph { width: 56px; height: 56px; font-size: 22px; }
.role { display: inline-block; font-size: 11px; line-height: 1.9; padding: 0 10px; border-radius: 999px; }
.role-host { background: var(--midnight); color: var(--gold-bright); }
.role-cohost { background: var(--lapis-tint); color: var(--lapis); }
.role-guest { background: var(--emerald-tint); color: var(--emerald); }
.carousel { position: relative; }
.roster { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; /* = side padding, so the initial position is a snap point (no auto-scroll on load, which stopped LCP) */ scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; padding: 6px 4px 10px; overscroll-behavior-x: contain; }
.roster::-webkit-scrollbar { display: none; }
.roster > a { flex: 0 0 148px; scroll-snap-align: start; }
.carousel-btn {
  position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -26px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow-md);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: opacity .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.carousel-btn:hover { border-color: var(--gold); color: var(--lapis); }
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-prev { right: -18px; }
.carousel-prev svg { transform: scaleX(-1); }
.carousel-next { left: -18px; }
.carousel-btn[hidden] { display: none; }
.carousel::before, .carousel::after { content: ""; position: absolute; top: 0; bottom: 0; width: 36px; z-index: 1; pointer-events: none; }
.carousel.can-next::after { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.carousel.can-prev::before { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
@media (max-width: 600px) { .carousel-prev { right: -6px; } .carousel-next { left: -6px; } .roster > a { flex-basis: 128px; } }
.roster a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; text-align: center; color: var(--text); }
.roster a:hover { color: var(--text); box-shadow: var(--shadow-md); }
.roster a[aria-current="page"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.roster .avatar, .roster .avatar-ph { width: 84px; height: 84px; font-size: 30px; }
.roster .name { font-size: 16px; line-height: 2; }

/* ---------- 10. Poem reading ---------- */
.poem-hero header { text-align: center; padding-block: 12px 26px; }
.poem-hero .tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.poem-hero .tags .tag { background: rgba(212, 162, 76, .18); color: var(--gold-bright); }
.poem-hero .tags .tag + .tag { background: rgba(232, 236, 247, .1); color: #CFD6EA; }
.poem-hero h1 { font-size: clamp(24px, 3.2vw, 36px); line-height: 2.1; color: var(--on-dark-strong); }
.poem-hero .roman-title { margin: 0 0 14px; font-family: var(--latin); font-style: italic; font-size: 19px; color: var(--on-dark-muted); }
.poem-hero .byline img, .poem-hero .byline .avatar-ph { border-radius: 50%; border: 2px solid var(--gold); width: 42px; height: 42px; }
.player-bar { max-width: 760px; margin: 0 auto; display: flex; flex-direction: row-reverse; align-items: center; gap: 16px; flex-wrap: nowrap; padding: 14px 18px; border-radius: 16px; background: rgba(28, 38, 80, .7); border: 1px solid rgba(212, 162, 76, .35); }
.player-bar .track { flex: 1 1 auto; min-width: 0; }
.player-bar .track b { display: block; font-weight: 400; font-size: 15px; line-height: 2; color: var(--on-dark); }
.progress { height: 6px; border-radius: 3px; background: rgba(232, 236, 247, .16); overflow: hidden; cursor: pointer; direction: ltr; }
.progress i { display: block; height: 100%; width: 0; background: var(--gold-bright); }
.player-bar time, .mini-player time { font-family: var(--latin); font-size: 13px; color: var(--on-dark-muted); direction: ltr; white-space: nowrap; flex: none; }
.player-row { display: flex; flex-direction: row-reverse; align-items: center; gap: 14px; }

.reader-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 10px 18px; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; background: var(--surface-alt); border-radius: 999px; padding: 4px; }
.seg button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font-size: 14px; color: var(--muted); cursor: pointer; line-height: 2; }
.seg button[aria-pressed="true"] { background: var(--midnight); color: var(--gold-bright); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tools .icon-btn { font-family: var(--latin); font-size: 15px; }

.poem-text { --poem-size: 24px; padding-block: 32px 10px; text-align: center; }
.sher { font-size: var(--poem-size); line-height: 1.95; position: relative; margin: 0 0 .5em; }
.sher .misra { display: block; }

.poem-text .signature { font-size: 18px; color: var(--muted); margin: 0; }
.poem-roman { padding-block: 40px 10px; text-align: center; font-family: var(--latin); font-style: italic; direction: ltr; }
.poem-roman .sher { font-size: calc(var(--poem-size) * .72); line-height: 1.9; }
.poem-text[hidden], .poem-roman[hidden] { display: none; }
.prose-block { padding: 24px; margin-bottom: 18px; }
.prose-block h2 { font-size: 22px; margin-bottom: 10px; }
.glossary { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.glossary div { background: var(--surface-sunk); border-radius: 10px; padding: 10px 14px; font-size: 15px; line-height: 2; }
.glossary b { color: var(--lapis); font-weight: 600; }
.source-line { font-size: 14px; color: var(--muted); }
.prev-next { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 28px; }
.prev-next a { display: block; padding: 16px 20px; color: var(--text); }
.prev-next a:hover { color: var(--text); box-shadow: var(--shadow-md); }
.prev-next small { display: block; font-size: 12px; color: var(--muted); line-height: 2; }
.prev-next span { font-size: 17px; line-height: 2.1; }
.prev-next .next { text-align: left; }
.share-card .preview { aspect-ratio: 1200 / 630; border-radius: 10px; overflow: hidden; background: var(--midnight); }
.share-card .preview img { width: 100%; height: 100%; object-fit: cover; }
.share-card p { margin: 12px 0 10px; font-size: 14px; color: var(--muted); line-height: 2.1; }
.recited-by { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.recited-by a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); }
.recited-by a:hover { color: var(--text); box-shadow: var(--shadow-md); }
.recited-by .avatar, .recited-by .avatar-ph { width: 48px; height: 48px; font-size: 18px; }
.recited-by small { display: block; font-size: 12px; color: var(--muted); line-height: 1.9; }

/* sticky mini player */
.mini-player {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 70;
  background: var(--midnight); color: var(--on-dark); border-top: 1px solid rgba(212, 162, 76, .4);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(110%); transition: transform .3s var(--ease);
}
.mini-player.is-visible { transform: none; }
.mini-player .wrap { display: flex; flex-direction: row-reverse; align-items: center; gap: 14px; min-height: 66px; padding-block: 8px; }
.mini-player .track { flex: 1; min-width: 0; }
.mini-player .track b { display: block; font-weight: 400; font-size: 15px; line-height: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player .progress { height: 4px; }
.mini-player .close { background: none; border: 0; color: var(--on-dark-muted); cursor: pointer; width: 44px; height: 44px; }
.mini-player img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
body.has-mini-player { padding-bottom: 72px; }

/* ---------- 11. Ads ---------- */
.ad-slot { display: flex; align-items: center; justify-content: center; min-height: 120px; border-radius: 12px; background: var(--surface-sunk); border: 1px dashed var(--line); color: var(--muted); font-size: 12px; margin-block: 28px; }
.ad-slot.tall { min-height: 250px; }
.ad-slot:empty::before { content: "اشتہار"; }

/* ---------- 12. Footer ---------- */
.site-footer { background: var(--midnight); color: var(--on-dark-muted); padding: 56px 0 26px; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--gold-bright); }
.footer-ornament { display: block; width: 100%; height: 12px; margin-bottom: 40px; opacity: .5; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-grid h2 { font-family: var(--latin); font-size: 12px; letter-spacing: .14em; color: var(--gold-bright); font-weight: 600; margin-bottom: 12px; line-height: 2; }
.footer-links { display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 2.1; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--on-dark-strong); font-size: 24px; font-weight: 700; }
.footer-tag { font-size: 14px; line-height: 2.2; margin: 12px 0 16px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-dark); display: inline-flex; align-items: center; justify-content: center; }
.socials svg { width: 16px; height: 16px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line-dark); margin-top: 40px; padding-top: 20px; font-family: var(--latin); font-size: 13px; }

/* ---------- 13. Forms & notices ---------- */
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-field label { font-size: 15px; }
.form-field input, .form-field textarea { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; line-height: 2; }
.form-field input:focus, .form-field textarea:focus { outline: 0; border-color: var(--lapis); box-shadow: 0 0 0 3px var(--lapis-tint); }
.form-error { color: #B3202A; font-size: 13px; }
.notice-ok { border: 1px solid var(--emerald); background: var(--emerald-tint); color: var(--emerald); padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; }
.cookie-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 80; background: var(--midnight); color: var(--on-dark); padding: 14px var(--gutter); box-shadow: 0 -4px 16px rgba(0, 0, 0, .15); }
.cookie-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 0; }
.cookie-bar p { margin: 0; font-size: 14px; line-height: 2.1; }
.cookie-bar a { color: var(--gold-bright); text-decoration: underline; }

/* ---------- 14. Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .tabbar, .reader-tools, .ad-slot, .mini-player, .player-bar, .side, .prev-next, .cookie-bar, .recited-by { display: none !important; }
  .hero-dark { background: none !important; color: #000 !important; }
  .hero-dark::before { display: none; }
  .hero-dark h1, .hero-dark a { color: #000 !important; }
  body { background: #fff; color: #000; }
}

/* static page articles */
.prose-h { font-size: 24px; margin: 32px 0 8px; line-height: 2; }
.prose a { text-decoration: underline; text-underline-offset: 4px; }

/* compact poem rows inside sidebars */
.side .poem-rows a.row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; }
.side .poem-rows .num, .side .poem-rows .r, .side .poem-rows .tag { display: none; }
.side .poem-rows .t { font-size: 16px; }

@media (max-width: 600px) {
  .poem-text, .poem-roman { --poem-size: 20px; }
  .sher { line-height: 1.9; }
}
.sher .misra { text-wrap: balance; }

/* volume controls (header player + sticky mini player) */
.vol { display: flex; align-items: center; gap: 6px; flex: none; direction: ltr; }
.vol-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--on-dark-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.vol-btn:hover { color: var(--gold-bright); }
.vol-btn svg { width: 20px; height: 20px; }
.vol-btn .i-mut, .vol-btn.is-muted .i-vol { display: none; }
.vol-btn.is-muted .i-mut { display: block; }
.vol-range { width: 84px; accent-color: var(--gold-bright); cursor: pointer; }
@media (max-width: 600px) { .vol-range { display: none; } }

/* Nafees Nastaleeq is optically small at a given px — lift the small UI text */
.main-nav { font-size: 18px; }
.header-search input { font-size: 15px; }
.eyebrow, .pill, .stat-label, .quick-links, .see-all { font-size: 15px; }
.crumb { font-size: 14px; }
.space-card .meta, .speaker-card p, .result-bar p { font-size: 15px; }
.rec-card small, .sub, .recited-by small, .prev-next small { font-size: 14px; }
.poet-card .counts, .role, .tag { font-size: 13px; }
.btn { font-size: 17px; }
.btn-sm { font-size: 15px; }
.footer-links { font-size: 16px; }

/* Space page: compact host strip on phones (2 × 2) */
@media (max-width: 600px) {
  .host-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .host-strip .card { padding: 10px 12px; gap: 10px; }
  .host-strip .avatar, .host-strip .avatar-ph { width: 44px !important; height: 44px !important; font-size: 18px !important; }
  .host-strip .card span span { font-size: 15px !important; }
}

/* brand logo — original colours on every surface (navy sits inside a gold outline, so it reads on dark too) */
.brand { line-height: 0; }
.brand-logo { height: 70px; width: auto; display: block; }
@media (max-width: 860px) { .brand-logo { height: 52px; } }
.footer-logo { display: inline-block; }
.footer-logo img { width: 190px; height: auto; display: block; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }

/* home: most visited speakers (compact cards) */
.popular-speakers { display: grid; gap: 12px; }
.popular-speakers .speaker-card { padding: 12px 16px; align-items: center; }
.popular-speakers .speaker-card .avatar, .popular-speakers .speaker-card .avatar-ph { width: 56px; height: 56px; font-size: 22px; }
.popular-speakers .speaker-card .name { font-size: 17px; }

/* factual note under a recitation player (who recited it, where, when, how long) */
.recitation-note { margin: 14px 0 0; font-size: 15px; line-height: 2.2; color: var(--muted); }
.hero-dark .recitation-note { color: var(--on-dark-muted); max-width: 52em; }
