/* ==========================================================================
   IJA MIAMI — CRISP WHITE ARCHITECTURAL DESIGN SYSTEM
   Inspired by idiaz.io editorial precision + Official IJA Poster Palette
   (#FFFFFF Pure White · #044036 Deep Emerald · #B77E2D Burnished Ochre-Gold)
   ========================================================================== */

:root {
  /* Crisp White Surface Hierarchy */
  --bg-canvas: #ffffff;
  --bg-band: #f8f9fa;
  --bg-band-strong: #f1f3f5;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #fcfcfd;
  --bg-elevated: #ffffff;

  /* Official Brand Emerald & Gold Tokens (sampled from IJA 35th Poster) */
  --emerald-950: #032c25;
  --emerald-900: #044036;
  --emerald-800: #0c483e;
  --emerald-700: #156354;
  --emerald-600: #1f7a68;
  --emerald-100: #edf5f2;
  --emerald-50: #f6faf8;

  --gold-700: #8c5d1b;
  --gold-600: #b77e2d;
  --gold-500: #cf9440;
  --gold-200: #f3e3c6;
  --gold-100: #fbf4e6;

  /* Ink & Neutral Hairline Borders (WCAG AA/AAA Verified on White) */
  --ink-primary: #111827;
  --ink-secondary: #374151;
  --ink-muted: #5b6672;
  --line: #e4e7ec;
  --line-strong: #cfd5dd;
  --line-subtle: #eef0f3;

  /* Status & Occasion Tokens */
  --wiladat-bg: #e6f5ee;
  --wiladat-ink: #0a523e;
  --wiladat-border: #9fd1bd;

  --shahadat-bg: #f9efe9;
  --shahadat-ink: #6e2f1a;
  --shahadat-border: #e2bfb0;

  --community-bg: #fbf3e4;
  --community-ink: #6b4710;
  --community-border: #e5ca99;

  --weekly-bg: #eef5f2;
  --weekly-ink: #1e4d41;
  --weekly-border: #c2d9d0;

  /* Typography */
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;

  /* Radii & Shadows */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 22px;

  --shadow-xs: 0 1px 2px rgba(4, 64, 54, 0.05);
  --shadow-sm: 0 6px 18px rgba(4, 64, 54, 0.06), 0 1px 3px rgba(4, 64, 54, 0.04);
  --shadow-md: 0 16px 38px rgba(4, 64, 54, 0.09), 0 2px 8px rgba(4, 64, 54, 0.05);
  --shadow-lg: 0 24px 56px rgba(3, 44, 37, 0.14);

  /* Layout */
  --container-max: 1200px;
  --header-h: 78px;
}

/* Nocturnal Botanical Dark Mode — WCAG AA Verified (Zero low-contrast pairs) */
[data-theme="dark"] {
  --bg-canvas: #061713;
  --bg-band: #0a231d;
  --bg-band-strong: #0f2f27;
  --bg-surface: #0c2620;
  --bg-surface-subtle: #091e19;
  --bg-elevated: #11332b;

  --emerald-100: #13382f;
  --emerald-50: #0d2922;

  --gold-700: #f0c67d;
  --gold-600: #dfaa56;
  --gold-500: #e8b86b;
  --gold-200: #3a2d17;
  --gold-100: #241e12;

  --ink-primary: #ecf7f2;
  --ink-secondary: #c2dcd2;
  --ink-muted: #8fb2a5;
  --line: #1c4239;
  --line-strong: #2b5c50;
  --line-subtle: #15332b;

  --wiladat-bg: #10352a;
  --wiladat-ink: #9be4c6;
  --wiladat-border: #235c4a;

  --shahadat-bg: #2f1b16;
  --shahadat-ink: #f4c2b1;
  --shahadat-border: #5c3329;

  --community-bg: #2b2212;
  --community-ink: #f4d399;
  --community-border: #594421;

  --weekly-bg: #112d26;
  --weekly-ink: #b9ded2;
  --weekly-border: #235045;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 26px 64px rgba(0, 0, 0, 0.58);
}

/* ==========================================================================
   1. RESET & BASE TYPOGRAPHY
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-primary);
  background-color: var(--bg-canvas);
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.nav-locked,
body.modal-open {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--emerald-700);
  text-decoration: none;
  transition: color 0.18s ease;
}

[data-theme="dark"] a {
  color: #7cd4b8;
}

a:hover {
  color: var(--gold-600);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  margin: 0 0 1rem;
  color: var(--ink-secondary);
}

p:last-child {
  margin-bottom: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--emerald-900);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
}

.container {
  width: min(100% - 40px, var(--container-max));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 40px, 820px);
  margin-inline: auto;
}

/* idiaz.io-inspired Monospace Coordinate Eyebrow */
.coord-label {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--emerald-700);
}

[data-theme="dark"] .coord-label {
  color: var(--gold-500);
}

.arabic-bismillah {
  font-family: var(--font-arabic);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.5;
  color: var(--gold-700);
  margin-bottom: 8px;
}

/* ==========================================================================
   2. TOP UTILITY BAR, STICKY HEADER & GROUPED DROPDOWN NAVIGATION
   ========================================================================== */
.top-bar {
  background: linear-gradient(135deg, #04382f 0%, #07473c 100%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 1.35;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .top-bar {
  background: linear-gradient(135deg, #031f1a 0%, #052e27 100%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-bar__address {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  text-decoration: none;
  min-width: 0;
  transition: color 0.16s ease;
}

.top-bar__address:hover {
  color: #f0cf90;
}

[data-theme="dark"] .top-bar__address {
  color: rgba(236, 247, 242, 0.82);
}

[data-theme="dark"] .top-bar__address:hover {
  color: var(--gold-500);
}

.top-bar__address svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.78;
}

.top-bar__address span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-bar__socials {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.top-bar__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.16s ease, transform 0.15s ease;
}

.top-bar__socials a:hover {
  color: #f0cf90;
  transform: translateY(-1px);
}

[data-theme="dark"] .top-bar__socials a {
  color: rgba(236, 247, 242, 0.8);
}

[data-theme="dark"] .top-bar__socials a:hover {
  color: var(--gold-500);
}

.top-bar__socials svg {
  width: 16px;
  height: 16px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

[data-theme="dark"] .header {
  background: rgba(6, 23, 19, 0.92);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--header-h);
}

.header__anniversary {
  display: none;
  margin: 0;
  min-width: 0;
}

.header__anniversary img {
  display: block;
  width: auto;
  height: 56px;
  max-width: min(220px, 34vw);
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
}

/* Uncropped Hexagonal Dome iJA Emblem */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-primary);
  flex-shrink: 0;
}

.logo:hover {
  color: var(--ink-primary);
}

.logo__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: auto;
  flex-shrink: 0;
}

.logo__img {
  height: 48px;
  width: auto;
  object-fit: contain;
  border-radius: 0;
}

.logo__img--dark {
  display: none;
}

[data-theme="dark"] .logo__img--light {
  display: none;
}

[data-theme="dark"] .logo__img--dark {
  display: block;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.logo__name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.logo__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Desktop Grouped Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link,
.nav__dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav__link:hover,
.nav__dropdown-btn:hover,
.nav__dropdown.is-open .nav__dropdown-btn {
  background: var(--bg-band);
  color: var(--ink-primary);
}

.nav__link.active,
.nav__dropdown.has-active .nav__dropdown-btn {
  color: var(--emerald-900);
  background: var(--emerald-100);
  border-color: var(--line);
}

[data-theme="dark"] .nav__link.active,
[data-theme="dark"] .nav__dropdown.has-active .nav__dropdown-btn {
  color: #ecf7f2;
  background: var(--emerald-100);
}

.nav__chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.nav__dropdown.is-open .nav__chevron {
  transform: rotate(180deg);
}

.nav__dropdown {
  position: relative;
}

.nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 284px;
  max-height: min(82vh, 560px);
  overflow-y: auto;
  padding: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.nav__dropdown.is-open .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__menu-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-primary);
  transition: background-color 0.15s ease;
}

.nav__menu-link:hover,
.nav__menu-link.active {
  background: var(--bg-band);
  color: var(--ink-primary);
}

.nav__menu-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
}

.nav__menu-desc {
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Header Action Controls */
.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  color: var(--ink-primary);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.theme-btn:hover {
  border-color: var(--emerald-700);
  background: var(--bg-band);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn--primary {
  background: var(--emerald-900);
  color: #ffffff;
  border-color: var(--emerald-900);
}

.btn--primary:hover {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #ffffff;
}

[data-theme="dark"] .btn--primary {
  background: #176d5b;
  border-color: #218570;
  color: #ffffff;
}

[data-theme="dark"] .btn--primary:hover {
  background: #1e846f;
  color: #ffffff;
}

.btn--gold {
  background: var(--gold-600);
  color: #ffffff;
  border-color: var(--gold-600);
}

.btn--gold:hover {
  background: var(--gold-700);
  border-color: var(--gold-700);
  color: #ffffff;
}

[data-theme="dark"] .btn--gold {
  background: var(--gold-600);
  color: #071915;
  border-color: var(--gold-600);
}

[data-theme="dark"] .btn--gold:hover {
  background: var(--gold-500);
  color: #071915;
}

.btn--outline {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border-color: var(--line-strong);
}

.btn--outline:hover {
  background: var(--bg-band);
  border-color: var(--emerald-700);
  color: var(--ink-primary);
}

@keyframes ija-live-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.38;
  }
}

.btn--live {
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: #d32f2f;
  color: #ffffff;
  border-color: #d32f2f;
}

.btn--live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
  animation: ija-live-pulse 1.5s ease-in-out infinite;
}

.btn--live:hover {
  background: #b71c1c;
  border-color: #b71c1c;
  color: #ffffff;
}

[data-theme="dark"] .btn--live {
  background: #d32f2f;
  border-color: #d32f2f;
  color: #ffffff;
}

[data-theme="dark"] .btn--live:hover {
  background: #b71c1c;
  border-color: #b71c1c;
  color: #ffffff;
}

/* Mobile Hamburger & Drawer */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg-surface);
  padding: 18px 20px 26px;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__group {
  margin-bottom: 16px;
}

.mobile-nav__heading {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.mobile-nav__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mobile-nav__link {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-sm);
  background: var(--bg-surface-subtle);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
}

.mobile-nav__link.active {
  background: var(--emerald-100);
  border-color: var(--emerald-700);
}

.mobile-nav__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.mobile-nav__actions .btn {
  flex: 1;
}

@media (max-width: 1320px) {
  .header__inner {
    gap: 10px;
  }
  .logo__sub {
    display: none;
  }
  .nav__link,
  .nav__dropdown-btn {
    padding: 8px 8px;
    font-size: 13.5px;
  }
  .header__actions .btn--live,
  #header-donate-btn {
    padding: 8px 12px;
    font-size: 12.5px;
  }
}

@media (max-width: 1040px) {
  .nav {
    display: none;
  }
  .hamburger {
    display: inline-flex;
  }
  .header__anniversary {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .mobile-nav__links {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   4. SECTIONS, PAGE HEROES & ARCHITECTURAL GRIDS
   ========================================================================== */
.section {
  padding: clamp(52px, 7vw, 88px) 0;
}

.section--sm {
  padding: clamp(28px, 4vw, 44px) 0;
}

.section--band {
  background: var(--bg-canvas);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

[data-theme="dark"] .section--band {
  background: var(--bg-band);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.section-header__title {
  font-size: clamp(28px, 3.6vw, 42px);
  margin-bottom: 0;
}

.section-header__desc {
  max-width: 58ch;
  margin-top: 8px;
  margin-bottom: 0;
}

/* Subpage Architectural Header */
.page-hero {
  padding: clamp(40px, 5.5vw, 68px) 0;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--line);
}

.page-hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-hero__title {
  font-size: clamp(34px, 4.6vw, 54px);
  margin-bottom: 10px;
}

.page-hero__subtitle {
  max-width: 64ch;
  font-size: 17px;
  color: var(--ink-secondary);
  margin-bottom: 0;
}

.page-hero__meta {
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-secondary);
}

/* ==========================================================================
   5. HOMEPAGE SPLIT HERO & 9-ROW PRAYER WIDGET (.prayer-widget / #timetable)
   ========================================================================== */
.hero {
  padding: clamp(44px, 6vw, 80px) 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-canvas);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 460px);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: start;
}

.hero__title {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.026em;
  margin-bottom: 18px;
}

.hero__desc {
  font-size: clamp(16px, 1.4vw, 18.5px);
  max-width: 56ch;
  margin-bottom: 26px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

/* Poster-inspired Emerald Jummah Strip (1px gold vertical divider, zero cliché stripe) */
.jummah-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding: 16px 20px;
  background: var(--emerald-900);
  color: #f4faf7;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-sm);
}

.jummah-strip__label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0cf90;
}

.jummah-strip__divider {
  width: 1px;
  height: 20px;
  background: rgba(240, 207, 144, 0.42);
}

.jummah-strip__times {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

.jummah-strip__times strong {
  font-family: var(--font-mono);
  color: #ffffff;
}

@media (max-width: 920px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .jummah-strip__divider {
    display: none;
  }
}

/* User's Homepage Prayer Widget (.prayer-widget #timetable) — Light-Green Architectural Theme */
.prayer-widget {
  --pw-white: var(--bg-surface);
  --pw-header: var(--emerald-900);
  --pw-teal: var(--emerald-700);
  font-family: inherit;
  background: var(--pw-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
  max-width: 500px;
  width: 100%;
  border: 1px solid var(--line);
  box-sizing: border-box;
}

[data-theme="dark"] .prayer-widget {
  --pw-teal: #8ce0c5;
}

.prayer-widget #timetable {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.prayer-widget #timetable th {
  background: linear-gradient(135deg, var(--emerald-950), var(--emerald-800));
  color: #ffffff;
  padding: 16px 18px;
  text-align: left;
  border-radius: var(--r-md) var(--r-md) 0 0;
}

.pw-th-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  color: #f0cf90;
  margin-bottom: 4px;
}

.pw-th-date {
  display: block;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}

.pw-th-hijri {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  color: rgba(236, 247, 242, 0.84);
}

.prayer-widget #timetable td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 14.5px;
}

.prayer-widget #timetable td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink-primary);
}

.pw-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
}

.pw-next-tag {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: var(--r-xs);
  background: var(--gold-600);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

[data-theme="dark"] .pw-next-tag {
  color: #061713;
}

.prayer-widget #timetable td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--pw-teal);
  white-space: nowrap;
}

.prayer-widget #timetable tr:last-child td {
  border-bottom: none;
}

.prayer-widget #timetable tbody tr:hover td {
  background-color: var(--bg-band);
}

.prayer-widget #timetable tbody tr.is-next-prayer td {
  background-color: var(--gold-100);
}

.prayer-widget__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
  font-size: 12.5px;
  color: var(--ink-muted);
}

.prayer-widget__footer a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   6. SPECIMEN CARDS, NUMBERED PILLARS & EDITORIAL HADITH PLATE
   ========================================================================== */
.specimen-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.specimen-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.specimen-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 980px) {
  .specimen-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .specimen-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .specimen-grid-4,
  .specimen-grid-3,
  .specimen-grid-2 {
    grid-template-columns: 1fr;
  }
}

.specimen-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

a.specimen-card:hover {
  border-color: var(--emerald-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.specimen-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-subtle);
}

.specimen-card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-700);
}

.specimen-card__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.specimen-card__title {
  font-size: 22px;
  margin-bottom: 10px;
}

.specimen-card__desc {
  font-size: 14.5px;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.specimen-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--emerald-700);
}

[data-theme="dark"] .specimen-card__cta {
  color: #8ce0c5;
}

/* Architectural Notice Banner (1px frame — zero colored border-left stripe) */
.notice-plate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}

.notice-plate strong {
  color: var(--ink-primary);
}

/* ==========================================================================
   7. FEATURED EVENT SHOWCASE (35 Years of IJA Poster + Squarespace Cards)
   ========================================================================== */
.featured-poster-card {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  align-items: center;
}

.featured-poster-card__media {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--emerald-950);
}

.featured-poster-card__media img {
  width: 100%;
  height: auto;
  display: block;
}

.featured-poster-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--bg-band);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-primary);
}

.meta-chip--gold {
  background: var(--community-bg);
  border-color: var(--community-border);
  color: var(--community-ink);
}

.featured-poster-card__title {
  font-size: clamp(26px, 3.2vw, 38px);
  margin-bottom: 12px;
}

.featured-poster-card__highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 18px 0 24px;
  padding: 16px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-sm);
  list-style: none;
}

.featured-poster-card__highlights li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-primary);
}

.featured-poster-card__highlights li::before {
  content: '◆';
  font-size: 9px;
  color: var(--gold-600);
}

.featured-poster-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 820px) {
  .featured-poster-card {
    grid-template-columns: 1fr;
  }
  .featured-poster-card__media {
    max-width: 360px;
    margin-inline: auto;
  }
  .featured-poster-card__highlights {
    grid-template-columns: 1fr;
  }
}

/* Squarespace-style Editorial Event List Cards */
.events-list {
  display: grid;
  gap: 16px;
}

.event-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.event-row:hover {
  border-color: var(--emerald-700);
  box-shadow: var(--shadow-xs);
}

.event-row__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  background: var(--bg-band);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  text-align: center;
}

.event-row__month {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-700);
}

[data-theme="dark"] .event-row__month {
  color: var(--gold-500);
}

.event-row__day {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink-primary);
}

.event-row__year {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
}

.event-row__title {
  font-size: 21px;
  margin-bottom: 6px;
}

.event-row__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.event-row__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 760px) {
  .event-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .event-row__date {
    flex-direction: row;
    gap: 8px;
    justify-content: flex-start;
    width: fit-content;
    padding: 6px 12px;
  }
  .event-row__day {
    font-size: 18px;
  }
  .event-row__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   8. OPTION-BASED STRIPE CHECKOUT & LINK STEWARDSHIP SELECTOR
      Inspired by Flume pricing architecture & Perplexity plan cards
   ========================================================================== */
.stewardship-plans {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.stewardship-plans__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.stewardship-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(183, 126, 45, 0.11);
  border: 1px solid rgba(183, 126, 45, 0.34);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-600);
}

[data-theme="dark"] .stewardship-eyebrow {
  background: rgba(240, 207, 144, 0.1);
  border-color: rgba(240, 207, 144, 0.3);
  color: #f0cf90;
}

.stewardship-plans__title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  margin: 0 0 12px;
}

.stewardship-dot {
  color: var(--gold-600);
}

.stewardship-plans__subtitle {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin: 0 0 22px;
  max-width: 620px;
}

.stewardship-controls {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* Category Fund / Niyyah Switcher (Perplexity segmented category bar) */
.stewardship-funds {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 100%;
}

.stewardship-funds__btn {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
}

.stewardship-funds__btn:hover {
  color: var(--ink-primary);
  background: var(--bg-band);
}

.stewardship-funds__btn.is-selected {
  background: rgba(4, 64, 54, 0.09);
  border-color: rgba(4, 64, 54, 0.24);
  color: var(--emerald-900);
}

[data-theme="dark"] .stewardship-funds__btn.is-selected {
  background: rgba(240, 207, 144, 0.14);
  border-color: rgba(240, 207, 144, 0.34);
  color: #f0cf90;
}

/* Plan grid: family, individual, monthly, custom */
.stewardship-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  padding-top: 6px;
}

.stewardship-plan-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 22px;
  padding: 26px 22px 22px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(4, 64, 54, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.stewardship-plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(4, 64, 54, 0.09);
  border-color: var(--line-strong);
}

.stewardship-plan-card--featured {
  border: 1.5px solid var(--gold-600);
  box-shadow: 0 18px 46px rgba(183, 126, 45, 0.13);
}

.stewardship-plan-card--featured:hover {
  border-color: var(--gold-600);
  box-shadow: 0 22px 52px rgba(183, 126, 45, 0.18);
}

[data-theme="dark"] .stewardship-plan-card {
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .stewardship-plan-card--featured {
  border-color: var(--gold-500);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(240, 207, 144, 0.16);
}

.stewardship-plan-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold-600);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(183, 126, 45, 0.28);
}

.stewardship-plan-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
}

.stewardship-plan-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  min-width: 0;
}

.stewardship-plan-card__tier {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stewardship-plan-card__tier--accent {
  color: var(--gold-600);
}

[data-theme="dark"] .stewardship-plan-card__tier--accent {
  color: #f0cf90;
}

.stewardship-plan-card__fund,
.stewardship-plan-card__pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-band);
  border: 1px solid var(--line-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-secondary);
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stewardship-plan-card__pill {
  background: rgba(4, 64, 54, 0.08);
  border-color: rgba(4, 64, 54, 0.22);
  color: var(--emerald-800);
  letter-spacing: 0.06em;
}

[data-theme="dark"] .stewardship-plan-card__pill {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.28);
  color: #6ee7b7;
}

.stewardship-plan-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.stewardship-plan-card__price {
  font-family: var(--font-sans);
  font-size: clamp(32px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
}

.stewardship-plan-card__period {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}

.stewardship-plan-card__fee-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--emerald-800);
  margin: 0 0 10px;
}

[data-theme="dark"] .stewardship-plan-card__fee-note {
  color: #8ce0bf;
}

.stewardship-plan-card__tagline {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
  margin: 0 0 14px;
}

.stewardship-plan-card__divider {
  height: 1px;
  width: 100%;
  background: var(--line-subtle);
  margin-bottom: 14px;
}

.stewardship-plan-card__includes {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 0 0 10px;
}

.stewardship-plan-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 9px;
}

.stewardship-plan-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.stewardship-plan-card__features li svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--emerald-700);
}

.stewardship-plan-card__features li.is-highlighted {
  color: var(--ink-primary);
  font-weight: 600;
}

.stewardship-plan-card__features li.is-highlighted svg {
  color: var(--gold-600);
}

[data-theme="dark"] .stewardship-plan-card__features li svg {
  color: #6ee7b7;
}

[data-theme="dark"] .stewardship-plan-card__features li.is-highlighted svg {
  color: #f0cf90;
}

/* Custom Pledge Inline Amount Field */
.stewardship-custom-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 14px;
}

.stewardship-custom-field__prefix {
  position: absolute;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  pointer-events: none;
}

.stewardship-custom-field__input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 54px 0 28px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-surface-subtle);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-primary);
}

.stewardship-custom-field__input:focus {
  outline: 2px solid var(--emerald-700);
  outline-offset: 1px;
  background: var(--bg-surface);
}

.stewardship-custom-field__suffix {
  position: absolute;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  pointer-events: none;
}

/* Plan Card Bottom Pill CTAs */
.stewardship-plan-card__cta-stack {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}

.stewardship-copy-chip {
  width: 100%;
  padding: 6px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: var(--bg-band);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
}

.stewardship-copy-chip:hover {
  border-color: var(--emerald-700);
  color: var(--ink-primary);
}

.stewardship-plan-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-primary);
  text-decoration: none;
  text-align: center;
  transition: all 0.18s ease;
}

.stewardship-plan-card__cta:hover {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #ffffff;
}

[data-theme="dark"] .stewardship-plan-card__cta:hover {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #ffffff;
}

.stewardship-plan-card__cta--featured {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(183, 126, 45, 0.25);
}

.stewardship-plan-card__cta--featured:hover {
  background: #9f6b22;
  border-color: #9f6b22;
  color: #ffffff;
}

[data-theme="dark"] .stewardship-plan-card__cta--featured {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: #061713;
}

[data-theme="dark"] .stewardship-plan-card__cta--featured:hover {
  background: #f0cf90;
  border-color: #f0cf90;
  color: #061713;
}

/* Stripe Checkout + Link Express Dock & Scan-to-Subscribe QR */
.stewardship-dock {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.stewardship-dock__express,
.stewardship-qr-card {
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.stewardship-dock__express {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 14px;
}

.stewardship-dock__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.stewardship-method-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-band);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.stewardship-method-pill--stripe {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #ffffff;
}

.stewardship-method-pill--link {
  background: rgba(0, 168, 107, 0.12);
  border-color: rgba(0, 168, 107, 0.34);
  color: #036b46;
}

[data-theme="dark"] .stewardship-method-pill--link {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.stewardship-dock__inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.stewardship-dock__email-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 5px;
}

.stewardship-dock__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stewardship-dock__email {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-surface-subtle);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-primary);
}

.stewardship-dock__email:focus {
  outline: 2px solid var(--emerald-700);
  outline-offset: 1px;
  background: var(--bg-surface);
}

.stewardship-dock__fee {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  background: var(--bg-band);
  border: 1px solid var(--line-subtle);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-primary);
  cursor: pointer;
}

.stewardship-dock__fee input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--emerald-900);
}

.stewardship-dock__summary {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-secondary);
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-subtle);
}

.stewardship__total-figure {
  font-family: var(--font-mono);
  color: var(--emerald-800);
}

[data-theme="dark"] .stewardship__total-figure {
  color: var(--gold-500);
}

/* Scan cards — monthly Stripe subscription and Zeffy annual fees */
.stewardship-pay-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.stewardship-qr-card {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  background: linear-gradient(145deg, var(--bg-surface), var(--bg-band));
}

.stewardship-qr-card[hidden] {
  display: none;
}

.stewardship-pay-row:has(> .stewardship-qr-card[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.stewardship-qr-card__img-link {
  flex-shrink: 0;
  display: inline-flex;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(4, 64, 54, 0.08);
  transition: transform 0.16s ease;
}

.stewardship-qr-card__img-link:hover {
  transform: scale(1.03);
}

.stewardship-qr-card__img-link img {
  display: block;
  width: 104px;
  height: 104px;
}

.stewardship-qr-card__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 4px;
}

.stewardship-qr-card__badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(4, 64, 54, 0.1);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--emerald-900);
}

[data-theme="dark"] .stewardship-qr-card__badge {
  background: rgba(240, 207, 144, 0.14);
  color: #f0cf90;
}

.stewardship-qr-card__title {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink-primary);
  margin: 2px 0 0;
}

.stewardship-qr-card__desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
  margin: 0 0 4px;
}

.stewardship-qr-card__link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--emerald-800);
  text-decoration: none;
}

.stewardship-qr-card__link:hover {
  text-decoration: underline;
}

[data-theme="dark"] .stewardship-qr-card__link {
  color: #f0cf90;
}

/* Flume-style Monospace Bottom Trust Strip */
.stewardship-trust-strip {
  margin: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@media (max-width: 1080px) {
  .stewardship-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stewardship-dock {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .stewardship-dock__inputs {
    grid-template-columns: minmax(0, 1fr);
  }

  .stewardship-plan-grid,
  .stewardship-pay-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   9. PERPETUAL PRAYER TIMINGS COMPONENT ([data-ija-prayer-times])
      Exact user-supplied component enhanced for Light-Green & Dark Mode
   ========================================================================== */
.ija-prayer-times-divider {
  display: grid;
  place-items: center;
  width: min(100%, 1080px);
  height: 16px;
  margin: 0 auto 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: linear-gradient(180deg, #173d32, #071f19);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.17), 0 5px 14px rgba(8, 45, 36, 0.14);
}

.ija-prayer-times-divider span {
  width: 90%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(213, 181, 108, 0.78), transparent);
}

.ija-prayer-times {
  --ija-green-950: #04322a;
  --ija-green-900: #044036;
  --ija-green-700: #156354;
  --ija-green-100: #f3f4f6;
  --ija-gold-500: #b77e2d;
  --ija-gold-100: #fbf4e6;
  --ija-ink: var(--ink-primary);
  --ija-muted: var(--ink-muted);
  --ija-line: var(--line);
  --ija-surface: var(--bg-surface);
  --ija-zebra: var(--bg-surface-subtle);
  --ija-controls-bg: var(--bg-band);
  width: min(100%, 1080px);
  margin: 0 auto;
  color: var(--ija-ink);
  font-family: inherit;
}

.ija-prayer-times *,
.ija-prayer-times *::before,
.ija-prayer-times *::after {
  box-sizing: border-box;
}

.ija-prayer-times__header {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 22px 22px 0 0;
  color: #fff;
  background: radial-gradient(circle at 92% 14%, rgba(183, 146, 63, 0.28) 0 8%, transparent 8.5%),
    radial-gradient(circle at 92% 14%, transparent 0 16%, rgba(255, 255, 255, 0.08) 16.5% 17%, transparent 17.5%),
    linear-gradient(135deg, var(--ija-green-950), var(--ija-green-700));
}

.ija-prayer-times__header::after {
  content: '';
  position: absolute;
  inset: auto -42px -78px auto;
  width: 210px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.11);
  transform: rotate(45deg);
  pointer-events: none;
}

.ija-prayer-times__eyebrow {
  margin-bottom: 10px;
  color: #f0cf90;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ija-prayer-times__header h2 {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 600;
  letter-spacing: -0.024em;
  line-height: 1.1;
}

.ija-prayer-times__header > p {
  max-width: 580px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(15px, 2vw, 17.5px);
  line-height: 1.55;
}

/* Friday Jummah Timings Box inside Perpetual Header */
.ija-prayer-times__jumma {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(240, 207, 144, 0.36);
  background: rgba(3, 33, 27, 0.46);
  max-width: 680px;
}

.ija-prayer-times__jumma svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  fill: none;
  stroke: #f0cf90;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ija-prayer-times__jumma-copy {
  flex: 1;
  min-width: 0;
}

.ija-prayer-times__jumma-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.ija-prayer-times__noscript {
  margin: 0;
  padding: 16px 22px;
  border: 1px solid var(--ija-line);
  border-top: 0;
  color: var(--shahadat-ink);
  background: var(--shahadat-bg);
  font-size: 14px;
}

.ija-prayer-times__jumma-top > strong {
  color: #f0cf90;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.ija-prayer-times__jumma-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
  color: #ffffff;
}

.ija-prayer-times__jumma-times time {
  font-family: var(--font-mono);
  font-weight: 600;
}

.ija-prayer-times__jumma-note {
  margin: 6px 0 0 !important;
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.78) !important;
}

.ija-prayer-times__controls {
  display: grid;
  grid-template-columns: 44px minmax(280px, 390px) 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 22px;
  border: 1px solid var(--ija-line);
  border-top: 0;
  background: var(--ija-controls-bg);
}

.ija-prayer-times:not(.has-selection) .ija-prayer-times__controls {
  grid-template-columns: minmax(0, 500px);
  border-radius: 0 0 22px 22px;
}

.ija-prayer-times:not(.has-selection) .ija-prayer-times__month-button {
  display: none;
}

.ija-prayer-times__month-button,
.ija-prayer-times__picker-trigger {
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--ija-surface);
  color: var(--ija-ink);
}

.ija-prayer-times__month-button {
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.ija-prayer-times__month-button:hover {
  border-color: var(--ija-green-700);
  background: var(--ija-green-100);
}

.ija-prayer-times__month-button svg,
.ija-prayer-times__picker-trigger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ija-prayer-times__picker {
  position: relative;
  min-width: 0;
}

.ija-prayer-times__picker-trigger {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 14px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ija-prayer-times__picker-trigger > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ija-prayer-times__picker-trigger[aria-expanded="true"] .ija-prayer-times__picker-chevron {
  transform: rotate(180deg);
}

.ija-prayer-times__month-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  max-height: min(420px, 65vh);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
}

.ija-prayer-times__month-menu[hidden] {
  display: none !important;
}

.ija-prayer-times__month-menu-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ija-muted);
}

.ija-prayer-times__month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ija-prayer-times__month-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--ija-line);
  border-radius: 10px;
  background: var(--ija-surface);
  color: var(--ija-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ija-prayer-times__month-option span:first-child {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gold-600);
}

.ija-prayer-times__month-option:hover {
  border-color: var(--ija-green-700);
  background: var(--ija-green-100);
}

.ija-prayer-times__month-option[aria-selected="true"] {
  background: var(--ija-green-900);
  border-color: var(--ija-green-900);
  color: #ffffff;
}

.ija-prayer-times__month-option[aria-selected="true"] span:first-child {
  color: #f0cf90;
}

.ija-prayer-times__today {
  padding: 22px;
  border: 1px solid var(--ija-line);
  border-top: 0;
  background: var(--gold-100);
}

.ija-prayer-times__today-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ija-prayer-times__today-heading span {
  color: var(--gold-700);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ija-prayer-times__today-heading strong {
  color: var(--ija-ink);
  font-family: var(--font-serif);
  font-size: 18px;
}

.ija-prayer-times__today-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(85px, 1fr));
  gap: 8px;
}

.ija-prayer-times__today-item {
  padding: 11px 10px;
  border: 1px solid var(--community-border);
  border-radius: 10px;
  background: var(--ija-surface);
  text-align: center;
}

.ija-prayer-times__today-item span {
  display: block;
  margin-bottom: 3px;
  color: var(--ija-muted);
  font-size: 11px;
  font-weight: 600;
}

.ija-prayer-times__today-item strong {
  color: var(--ija-ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.ija-prayer-times__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  border: 1px solid var(--ija-line);
  border-top: 0;
  color: var(--ija-muted);
  background: var(--ija-surface);
}

.ija-prayer-times__meta p {
  margin: 0;
  font-size: 13px;
}

.ija-prayer-times__meta p:first-child {
  color: var(--ija-ink);
  font-family: var(--font-mono);
  font-weight: 600;
}

.ija-prayer-times__swipe-hint {
  display: none;
}

.ija-prayer-times__table-shell {
  overflow: auto;
  max-height: 680px;
  border: 1px solid var(--ija-line);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  background: var(--ija-surface);
}

.ija-prayer-times table {
  width: 100%;
  min-width: 760px;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  table-layout: fixed;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.ija-prayer-times th,
.ija-prayer-times td {
  height: 46px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line-subtle);
  text-align: center;
  white-space: nowrap;
}

.ija-prayer-times thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: #ffffff;
  background: var(--ija-green-900);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ija-prayer-times thead th:first-child,
.ija-prayer-times tbody th {
  position: sticky;
  z-index: 1;
  left: 0;
  width: 130px;
  text-align: left;
}

.ija-prayer-times thead th:first-child {
  z-index: 3;
}

.ija-prayer-times tbody th {
  color: var(--ija-ink);
  background: var(--ija-surface);
  font-weight: 600;
}

.ija-prayer-times tbody tr:nth-child(even) td,
.ija-prayer-times tbody tr:nth-child(even) th {
  background: var(--ija-zebra);
}

.ija-prayer-times tbody tr:hover td,
.ija-prayer-times tbody tr:hover th {
  background: var(--bg-band);
}

.ija-prayer-times tbody tr.is-today td,
.ija-prayer-times tbody tr.is-today th {
  color: var(--community-ink);
  background: var(--community-bg);
  font-weight: 700;
}

.ija-prayer-times__today-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffffff;
  background: var(--gold-600);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ija-prayer-times .ija-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 760px) {
  .ija-prayer-times__table-shell {
    max-height: none;
  }
  .ija-prayer-times__today-grid {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }
  .ija-prayer-times__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .ija-prayer-times__swipe-hint {
    display: block;
    color: var(--emerald-700);
    font-weight: 600;
  }
}

@media (max-width: 480px) {
  .ija-prayer-times__controls {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    padding: 14px 12px;
  }
  .ija-prayer-times__month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ija-prayer-times__today-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   10. IMAMALASR-INSPIRED GREGORIAN + HIJRI MONTHLY CALENDAR (pages/events.html)
   ========================================================================== */
.ija-cal {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ija-cal__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  background: var(--bg-band);
  border-bottom: 1px solid var(--line);
}

.ija-cal__titles h3 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 2px;
}

.ija-cal__hijri-span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--emerald-700);
}

[data-theme="dark"] .ija-cal__hijri-span {
  color: var(--gold-500);
}

.ija-cal__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ija-cal__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-surface-subtle);
}

.filter-chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--emerald-700);
  color: var(--ink-primary);
}

.filter-chip.is-active {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #ffffff;
}

[data-theme="dark"] .filter-chip.is-active {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: #061713;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--emerald-900);
  color: #ffffff;
  border-bottom: 1px solid var(--line);
}

.cal-weekdays span {
  padding: 10px 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.cal-cell {
  min-height: 118px;
  padding: 8px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.cal-cell:hover {
  background: var(--bg-surface-subtle);
}

.cal-cell--empty {
  background: var(--bg-surface-subtle);
  opacity: 0.55;
  cursor: default;
}

.cal-cell.is-today {
  background: var(--gold-100);
}

.cal-cell.is-selected {
  box-shadow: inset 0 0 0 2px var(--emerald-700);
}

.cal-cell__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}

.cal-cell__day-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.cal-cell__today-tag {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--gold-600);
  color: #ffffff;
  font-size: 9px;
  text-transform: uppercase;
}

.cal-cell__hijri {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.cal-cell__events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cal-pill {
  display: block;
  width: 100%;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-pill--wiladat {
  background: var(--wiladat-bg);
  color: var(--wiladat-ink);
  border-color: var(--wiladat-border);
}

.cal-pill--shahadat,
.cal-pill--commemoration {
  background: var(--shahadat-bg);
  color: var(--shahadat-ink);
  border-color: var(--shahadat-border);
}

.cal-pill--community {
  background: var(--community-bg);
  color: var(--community-ink);
  border-color: var(--community-border);
}

.cal-pill--weekly {
  background: var(--weekly-bg);
  color: var(--weekly-ink);
  border-color: var(--weekly-border);
}

.cal-more {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  padding-left: 2px;
}

.cal-dots {
  display: none;
  gap: 4px;
  margin-top: 4px;
}

.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: var(--emerald-700);
}

.cal-dot--wiladat {
  background: #14825e;
}
.cal-dot--shahadat,
.cal-dot--commemoration {
  background: #b04a2b;
}
.cal-dot--community {
  background: var(--gold-600);
}

/* Selected Day Agenda Drawer below Month Grid */
.cal-agenda {
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg-band);
}

.cal-agenda__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cal-agenda__header h4 {
  font-size: 19px;
  margin: 0;
}

.cal-agenda__list {
  display: grid;
  gap: 10px;
}

.cal-agenda__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.cal-agenda__time {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gold-700);
  margin-bottom: 2px;
}

.cal-agenda__info strong {
  display: block;
  font-size: 15.5px;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.cal-agenda__info p {
  font-size: 13.5px;
  margin: 0;
}

.cal-agenda__empty {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
}

@media (max-width: 780px) {
  .cal-cell {
    min-height: 68px;
    padding: 6px;
  }
  .cal-cell__events {
    display: none;
  }
  .cal-dots {
    display: flex;
  }
  .cal-cell__today-tag {
    display: none;
  }
}

/* Event Detail Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 28, 23, 0.65);
  backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: min(100%, 540px);
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.modal-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-surface-subtle);
  color: var(--ink-primary);
  font-size: 18px;
  cursor: pointer;
}

.modal-card__time {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--gold-700);
  margin-bottom: 12px;
}

.modal-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-subtle);
}

/* Subscribe to Events Calendar Hub */
.subscribe-hub {
  padding: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.subscribe-hub__feed-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  margin: 18px 0 24px;
}

.subscribe-hub__input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg-surface-subtle);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-primary);
}

.subscribe-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.subscribe-tab {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-surface-subtle);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
}

.subscribe-tab.is-active {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #ffffff;
}

[data-theme="dark"] .subscribe-tab.is-active {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: #061713;
}

.subscribe-panel {
  padding: 18px 20px;
  background: var(--bg-band);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.subscribe-panel ol {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-primary);
}

.subscribe-panel li {
  margin-bottom: 8px;
  font-size: 14.5px;
}

.subscribe-panel li:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .subscribe-hub__feed-bar {
    grid-template-columns: 1fr;
  }
  .subscribe-hub {
    padding: 22px;
  }
}

/* ==========================================================================
   11. CEMETERY RECORDS & THAQALAYN EMBEDS (#cemetery-frame, #quran-frame, #hadith-frame, #duas-frame)
   ========================================================================== */
.cemetery-embed-shell {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cemetery-embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-band);
}

.cemetery-embed-bar__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cemetery-embed-shell:fullscreen {
  display: flex;
  flex-direction: column;
  border-radius: 0;
  background: var(--bg-surface);
}

.cemetery-embed-shell:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  border-radius: 0;
  background: var(--bg-surface);
}

.cemetery-embed-shell:fullscreen #cemetery-frame {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.cemetery-embed-shell:-webkit-full-screen #cemetery-frame {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

#cemetery-frame,
#quran-frame,
#hadith-frame,
#duas-frame {
  display: block;
  width: 100%;
  height: 85vh;
  min-height: 560px;
  border: 0;
  background: #ffffff;
}

.quran-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

.quran-toolbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.quran-toolbar__selector {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  flex: 1 1 340px;
}

.quran-toolbar__label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-700);
  white-space: nowrap;
}

.quran-select {
  flex: 1 1 240px;
  max-width: 380px;
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
  background: var(--bg-band);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.quran-select:hover,
.quran-select:focus-visible {
  border-color: var(--emerald-700);
  background: var(--bg-surface);
  outline: none;
}

.quran-toolbar__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.quran-toolbar__current {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.quran-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.quran-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--bg-band);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.quran-chip:hover {
  background: var(--emerald-50);
  border-color: var(--emerald-600);
  color: var(--emerald-900);
}

.quran-chip.is-active {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #ffffff;
}

[data-theme="dark"] .quran-chip.is-active {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: #10241d;
}

@media (max-width: 640px) {
  .cemetery-embed-shell--bleed {
    border-radius: var(--r-md);
    margin-inline: 0;
  }
  #cemetery-frame,
  #quran-frame,
  #hadith-frame,
  #duas-frame {
    width: 100%;
    height: 72vh;
    min-height: 440px;
  }
  .quran-toolbar {
    padding: 14px 16px;
  }
  .quran-toolbar__row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .quran-toolbar__selector {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .quran-toolbar__label {
    white-space: normal;
  }
  .quran-select {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .quran-toolbar__meta {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   12. DUAS, SCHOLARS, LEADERSHIP, IJEC, RESOURCES & CONTACT
   ========================================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 920px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.video-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.video-card[hidden] {
  display: none !important;
}

.video-card:hover {
  border-color: var(--emerald-700);
  transform: translateY(-2px);
}

.video-card__banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--emerald-950), var(--emerald-800));
  color: #ffffff;
}

.video-card__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #f0cf90;
}

.video-card__play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(240, 207, 144, 0.5);
  display: grid;
  place-items: center;
  color: #f0cf90;
}

.video-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.video-card__reciter {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.video-card__title {
  font-size: 20px;
  margin-bottom: 10px;
}

.video-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-subtle);
}

/* Staff & Leadership Dossier Cards */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 980px) {
  .roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .roster-grid {
    grid-template-columns: 1fr;
  }
}

.officer-card {
  padding: 22px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.officer-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.officer-card__monogram {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: var(--emerald-100);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald-900);
}

[data-theme="dark"] .officer-card__monogram {
  color: #ecf7f2;
}

.officer-card__role {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold-700);
}

.officer-card__name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 0;
}

.officer-card__phone {
  font-family: var(--font-mono);
  font-size: 13px;
  margin-top: auto;
}

/* Forms & Contact */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-primary);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--emerald-700);
  box-shadow: 0 0 0 3px rgba(21, 99, 84, 0.14);
}

.form-input[aria-invalid="true"] {
  border-color: #c23b2b;
}

.form-error {
  margin-top: 5px;
  font-size: 12.5px;
  color: #c23b2b;
}

[data-theme="dark"] .form-error {
  color: #f3988c;
}

.form-status {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--wiladat-border);
  border-radius: var(--r-sm);
  background: var(--wiladat-bg);
  color: var(--wiladat-ink);
  font-size: 14px;
}

.form-status a {
  font-weight: 700;
  text-decoration: underline;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: start;
}

.contact-map {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-band);
  min-height: 400px;
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

.contact-directory {
  display: grid;
  gap: 12px;
}

.contact-row {
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.contact-row__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.contact-row__value {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 0;
}

@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   13. GLOBAL FOOTER & SCROLL-TO-TOP
   ========================================================================== */
.footer {
  background: var(--emerald-950);
  color: #d9ede5;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 64px 0 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer__brand img {
  height: 46px;
  width: auto;
}

.footer__brand-name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
}

.footer__brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f0cf90;
}

.footer p {
  color: rgba(217, 237, 229, 0.8);
  font-size: 14px;
}

.footer__heading {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0cf90;
  margin-bottom: 14px;
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer__link {
  font-size: 14px;
  color: rgba(236, 247, 242, 0.86);
}

.footer__link:hover {
  color: #f0cf90;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 24px;
  font-size: 13px;
}

.footer__copy {
  color: rgba(217, 237, 229, 0.72);
  margin: 0;
}

.footer__tagline {
  font-family: var(--font-arabic);
  font-size: 17px;
  color: #f0cf90;
  margin: 0;
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   14. PRAYER TIMINGS PAGE — TODAY'S 9-CARD GRID & FULL-HEIGHT MONTHLY TABLE
   (Matches idiaz-io/New-IJA-Website/pages/prayer-timings.html + TODAY row badge)
   ========================================================================== */
.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;
}

.prayer-date {
  text-align: center;
  margin-bottom: 24px;
}

.prayer-date .gregorian {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.3vw, 25px);
  font-weight: 600;
  color: var(--ink-primary);
}

.prayer-date .hijri {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--emerald-700);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

[data-theme="dark"] .prayer-date .hijri {
  color: var(--gold-500);
}

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 12px;
  max-width: 1140px;
  margin: 0 auto;
}

@media (max-width: 980px) {
  .prayer-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .prayer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

.prayer-time-card {
  text-align: center;
  padding: 16px 10px;
  border-radius: var(--r-md);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  min-width: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.prayer-time-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.prayer-time-card .prayer-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.prayer-time-card .prayer-time {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 440px) {
  .prayer-time-card {
    padding: 12px 6px;
  }
  .prayer-time-card .prayer-name {
    font-size: 10px;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
  }
  .prayer-time-card .prayer-time {
    font-size: 13.5px;
  }
}

.prayer-time-card.next-prayer {
  border-color: var(--gold-600);
  background: var(--gold-100);
  box-shadow: 0 6px 18px rgba(183, 126, 45, 0.14);
}

.prayer-time-card.next-prayer .prayer-name {
  color: var(--gold-700);
  font-weight: 600;
}

.prayer-time-card.next-prayer .prayer-time {
  color: var(--emerald-900);
}

[data-theme="dark"] .prayer-time-card.next-prayer {
  background: rgba(223, 170, 86, 0.14);
  border-color: var(--gold-500);
}

[data-theme="dark"] .prayer-time-card.next-prayer .prayer-time {
  color: var(--ink-primary);
}

.table-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}

.table-controls button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-primary);
  background: var(--bg-surface);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.table-controls button:hover {
  border-color: var(--emerald-800);
  background: var(--emerald-50);
  color: var(--emerald-900);
}

[data-theme="dark"] .table-controls button:hover {
  border-color: var(--gold-500);
  background: var(--emerald-100);
  color: var(--gold-500);
}

.table-controls #month-title {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.4vw, 22px);
  font-weight: 600;
  color: var(--ink-primary);
  min-width: 170px;
  text-align: center;
}

/* Full-height Monthly Table — NO max-height & NO scrollbars */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.prayer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.prayer-table th {
  padding: 13px 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: var(--emerald-900);
  white-space: nowrap;
}

.prayer-table td {
  padding: 10px 10px;
  text-align: center;
  border-bottom: 1px solid var(--line-subtle);
  color: var(--ink-secondary);
  white-space: nowrap;
}

.prayer-table__mobile-date {
  display: none;
}

@media (max-width: 1120px) {
  .prayer-table {
    font-size: 12.5px;
  }
  .prayer-table th {
    padding: 11px 6px;
    font-size: 10px;
    letter-spacing: 0.05em;
  }
  .prayer-table td {
    padding: 9px 6px;
  }
}

.prayer-table tbody tr:last-child td {
  border-bottom: 0;
}

.prayer-table tbody tr:hover td {
  background: var(--bg-band);
}

/* Highlighted TODAY Row + Burnished Gold TODAY Badge on Today's Line */
.prayer-table .today-row td,
.prayer-table tbody tr.today-row:hover td {
  background: var(--gold-100);
  color: var(--ink-primary);
  font-weight: 700;
}

[data-theme="dark"] .prayer-table .today-row td,
[data-theme="dark"] .prayer-table tbody tr.today-row:hover td {
  background: rgba(223, 170, 86, 0.16);
  color: var(--ink-primary);
}

.prayer-table__today-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--gold-600);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
}

[data-theme="dark"] .prayer-table__today-badge {
  background: var(--gold-600);
  color: #061713;
}

/* Mobile & Narrow-Tablet Card Stack for Monthly Prayer Table (Zero Horizontal Scroll) */
@media (max-width: 860px) {
  .table-wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .prayer-table,
  .prayer-table tbody {
    display: grid;
    gap: 10px;
    width: 100%;
  }
  .prayer-table thead {
    display: none;
  }
  .prayer-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xs);
  }
  .prayer-table tbody tr.today-row {
    background: var(--gold-100);
    border-color: var(--gold-600);
    box-shadow: 0 6px 18px rgba(183, 126, 45, 0.14);
  }
  [data-theme="dark"] .prayer-table tbody tr.today-row {
    background: #2b2212;
    border-color: var(--gold-500);
  }
  .prayer-table tbody tr td,
  .prayer-table tbody tr:hover td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 6px 8px;
    border: 1px solid var(--line-subtle);
    border-radius: var(--r-xs);
    background: var(--bg-surface-subtle);
    text-align: left;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-primary);
    min-width: 0;
  }
  .prayer-table tbody tr.today-row td,
  .prayer-table tbody tr.today-row:hover td {
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--community-border);
    color: var(--ink-primary);
  }
  [data-theme="dark"] .prayer-table tbody tr.today-row td,
  [data-theme="dark"] .prayer-table tbody tr.today-row:hover td {
    background: rgba(6, 23, 19, 0.5);
    border-color: #594421;
    color: var(--ink-primary);
  }
  .prayer-table tbody tr td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }
  .prayer-table tbody tr td.prayer-table__day-cell,
  .prayer-table tbody tr:hover td.prayer-table__day-cell,
  .prayer-table tbody tr.today-row td.prayer-table__day-cell,
  .prayer-table tbody tr.today-row:hover td.prayer-table__day-cell {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 1px solid var(--line-subtle);
    border-radius: 0;
    background: transparent;
    font-family: var(--font-serif);
    font-size: 16.5px;
    font-weight: 700;
    color: var(--emerald-900);
  }
  [data-theme="dark"] .prayer-table tbody tr td.prayer-table__day-cell,
  [data-theme="dark"] .prayer-table tbody tr.today-row td.prayer-table__day-cell {
    color: var(--ink-primary);
  }
  .prayer-table tbody tr td.prayer-table__day-cell::before {
    display: none;
  }
  .prayer-table__day-num {
    display: none;
  }
  .prayer-table__mobile-date {
    display: inline;
  }
  .prayer-table__today-badge {
    margin-left: 0;
  }
  .prayer-table tbody tr td.prayer-table__wday-cell {
    display: none !important;
  }
}

/* ==========================================================================
   15. RESIDENT SCHOLAR PROFILE LAYOUT (Imam al-Asr Inspired Split Biography)
   ========================================================================== */
.scholar-profile {
  display: grid;
  grid-template-columns: minmax(290px, 410px) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

@media (max-width: 900px) {
  .scholar-profile {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.scholar-profile__card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.scholar-profile__portrait {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 20%;
  border-bottom: 3px solid var(--gold-600);
}

.scholar-profile__facts {
  padding: 20px 22px;
  display: grid;
  gap: 12px;
}

.scholar-profile__fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-subtle);
}

.scholar-profile__fact:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.scholar-profile__fact-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.scholar-profile__fact-value {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

.scholar-profile__role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.scholar-profile__name {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.12;
  margin-bottom: 6px;
}

.scholar-profile__honorific {
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  color: var(--emerald-700);
  margin-bottom: 20px;
}

[data-theme="dark"] .scholar-profile__honorific {
  color: var(--gold-500);
}

.scholar-profile__prose p {
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--ink-secondary);
  margin-bottom: 16px;
}

.scholar-profile__quote {
  margin: 22px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--gold-600);
  background: var(--bg-band);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-primary);
}

.scholar-profile__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* ==========================================================================
   16. STUDY SUITE SUB-NAV & SHIA QUR'AN MCP DOCUMENTATION
   ========================================================================== */
.study-suite-band {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--line);
}

.study-suite-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0;
}

.study-suite-bar__link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink-primary);
  text-decoration: none;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.15s ease;
}

.study-suite-bar__link:hover {
  background: var(--bg-band);
  border-color: var(--emerald-700);
  color: var(--ink-primary);
  transform: translateY(-1px);
}

.study-suite-bar__link.is-active {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

[data-theme="dark"] .study-suite-bar__link.is-active {
  background: var(--emerald-800);
  border-color: var(--gold-500);
  color: #ffffff;
}

.study-suite-bar__idx {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
  background: var(--emerald-50);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald-800);
  flex-shrink: 0;
}

[data-theme="dark"] .study-suite-bar__idx {
  background: var(--bg-band);
  color: var(--gold-500);
}

.study-suite-bar__link.is-active .study-suite-bar__idx {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #f3e3c6;
}

.study-suite-bar__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.study-suite-bar__title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.study-suite-bar__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.study-suite-bar__link.is-active .study-suite-bar__sub {
  color: rgba(251, 244, 230, 0.85);
}

@media (max-width: 980px) {
  .study-suite-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .study-suite-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* MCP Two-Column Documentation Shell (inspired by mcp.quran.ai/documentation) */
.mcp-docs-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.mcp-toc {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  padding: 18px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

#ija-viewport-frame .mcp-toc {
  top: calc(var(--header-h) + 62px);
}

.mcp-toc__heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-subtle);
}

.mcp-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.mcp-toc__link {
  display: block;
  padding: 7px 10px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.mcp-toc__link:hover {
  background: var(--bg-band);
  color: var(--ink-primary);
}

.mcp-toc__link.is-active {
  background: var(--emerald-50);
  color: var(--emerald-900);
}

[data-theme="dark"] .mcp-toc__link.is-active {
  background: var(--emerald-100);
  color: var(--gold-500);
}

.mcp-toc__sublist {
  list-style: none;
  margin: 2px 0 6px 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 2px;
}

.mcp-toc__sublink {
  display: block;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  text-decoration: none;
}

.mcp-toc__sublink:hover {
  color: var(--ink-primary);
  background: var(--bg-band);
}

.mcp-content {
  display: grid;
  gap: 44px;
  min-width: 0;
}

.mcp-section {
  scroll-margin-top: calc(var(--header-h) + 28px);
}

.mcp-section__head {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mcp-section__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.18;
  margin: 4px 0 8px;
}

.mcp-section__desc {
  font-size: 15.5px;
  color: var(--ink-secondary);
  margin: 0;
  max-width: 72ch;
}

/* Metric Strip & Endpoint Bar */
.mcp-meta-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 18px;
}

.mcp-meta-item {
  padding: 14px 16px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mcp-meta-item__val {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.2;
}

.mcp-meta-item__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.mcp-endpoint-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--emerald-950), var(--emerald-900));
  border: 1px solid var(--emerald-800);
  border-radius: var(--r-lg);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.mcp-endpoint-bar__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mcp-endpoint-bar__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0cf90;
}

.mcp-endpoint-bar__url {
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.6vw, 15.5px);
  font-weight: 600;
  color: #ffffff;
  word-break: break-all;
}

.mcp-endpoint-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.mcp-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.mcp-copy-btn:hover {
  border-color: var(--emerald-700);
  background: var(--bg-band);
}

.mcp-copy-btn.is-copied {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #ffffff;
}

.mcp-copy-btn--gold {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: #ffffff;
}

.mcp-copy-btn--gold:hover {
  background: var(--gold-700);
  border-color: var(--gold-700);
  color: #ffffff;
}

[data-theme="dark"] .mcp-copy-btn--gold {
  color: #071915;
}

/* 4-Step Study Session Flow */
.mcp-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mcp-step-card {
  padding: 20px 22px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcp-step-card__num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold-700);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mcp-step-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0;
}

.mcp-step-card p {
  font-size: 14.5px;
  color: var(--ink-secondary);
  margin: 0;
}

/* Client Setup Tabs & Code Blocks (#advanced-setup) */
.mcp-client-shell {
  background: var(--bg-surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.mcp-client-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-band);
  border-bottom: 1px solid var(--line);
}

.mcp-client-tab {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mcp-client-tab:hover {
  border-color: var(--emerald-700);
  color: var(--ink-primary);
}

.mcp-client-tab.is-active {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #ffffff;
}

[data-theme="dark"] .mcp-client-tab.is-active {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: #061713;
}

.mcp-client-panel {
  padding: 24px;
}

.mcp-client-panel[hidden] {
  display: none !important;
}

.mcp-setup-steps {
  margin: 0 0 18px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--ink-primary);
  font-size: 14.5px;
}

.mcp-setup-steps code,
.mcp-section code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-band-strong);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--emerald-800);
}

[data-theme="dark"] .mcp-setup-steps code,
[data-theme="dark"] .mcp-section code {
  color: var(--gold-500);
}

.mcp-code-shell {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #071b16;
  color: #ecf7f2;
  margin-top: 12px;
}

.mcp-code-shell__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: #0c2922;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #b9ded2;
}

.mcp-code-block {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #ecf7f2;
}

.mcp-code-block code {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: inherit;
}

.mcp-path-list {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* Live MCP Verse & Shia Tafsir Explorer */
.mcp-explorer {
  background: var(--bg-surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mcp-explorer__top {
  padding: 18px 22px;
  background: var(--bg-band);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mcp-explorer__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
}

.mcp-explorer__inputs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.mcp-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mcp-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.mcp-field input {
  width: 96px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.mcp-explorer__status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--emerald-700);
}

[data-theme="dark"] .mcp-explorer__status {
  color: var(--gold-500);
}

.mcp-explorer__body {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.mcp-explorer__verse-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mcp-explorer__arabic {
  margin: 0;
  padding: 22px 24px;
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  border-radius: var(--r-md);
  font-family: var(--font-arabic);
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 2;
  color: var(--ink-primary);
  text-align: right;
  direction: rtl;
}

.mcp-explorer__trans-box {
  padding: 16px 18px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.mcp-explorer__trans-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-700);
  margin-bottom: 6px;
}

.mcp-explorer__trans-box p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-primary);
}

.mcp-explorer__tafsir-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mcp-tafsir-pane {
  padding: 18px 20px;
  background: var(--bg-band);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcp-tafsir-pane h4 {
  font-family: var(--font-serif);
  font-size: 18px;
  margin: 0;
  color: var(--ink-primary);
}

.mcp-tafsir-pane__text {
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-secondary);
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-line;
  padding-right: 4px;
}

/* Example Study Prompts */
.mcp-prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mcp-prompt-card {
  padding: 18px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.mcp-prompt-card__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--emerald-700);
}

[data-theme="dark"] .mcp-prompt-card__tag {
  color: var(--gold-500);
}

.mcp-prompt-card blockquote {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-primary);
}

/* 17-Tool Reference Groups */
.mcp-tool-group {
  margin-bottom: 26px;
  scroll-margin-top: calc(var(--header-h) + 28px);
}

.mcp-tool-group:last-child {
  margin-bottom: 0;
}

.mcp-tool-group__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin: 0 0 12px;
}

.mcp-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mcp-tool-card {
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mcp-tool-card__name {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--emerald-800);
}

[data-theme="dark"] .mcp-tool-card__name {
  color: var(--gold-500);
}

.mcp-tool-card__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  margin: 0;
}

.mcp-tool-card__params {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

/* 7 Supported Editions Table */
.mcp-editions-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow-x: auto;
}

.mcp-editions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 620px;
}

.mcp-editions-table th {
  padding: 12px 16px;
  text-align: left;
  background: var(--bg-band);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.mcp-editions-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-subtle);
  color: var(--ink-primary);
  vertical-align: top;
}

.mcp-editions-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 960px) {
  .mcp-docs-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .mcp-toc {
    position: static;
  }
  .mcp-toc__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mcp-toc__sublist {
    display: none;
  }
  .mcp-meta-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .mcp-step-grid,
  .mcp-explorer__tafsir-grid,
  .mcp-prompt-grid,
  .mcp-tool-grid,
  .mcp-toc__list {
    grid-template-columns: 1fr;
  }
  .mcp-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mcp-client-panel,
  .mcp-explorer__body {
    padding: 18px;
  }
  .mcp-editions-wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }
  .mcp-editions-table {
    min-width: 0;
    display: block;
  }
  .mcp-editions-table thead {
    display: none;
  }
  .mcp-editions-table tbody {
    display: grid;
    gap: 10px;
  }
  .mcp-editions-table tbody tr {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
  }
  .mcp-editions-table tbody td {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line-subtle);
    font-size: 13.5px;
  }
  .mcp-editions-table tbody td:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .mcp-editions-table tbody td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }
}

/* ==========================================================================
   17. MOBILE WRAPPING & EDGE-TO-EDGE ALIGNMENT PERFECTION (ALL 15 PAGES)
   ========================================================================== */
.mcp-content,
.mcp-explorer__body,
.events-list,
.contact-directory,
.cal-agenda__list,
.scholar-profile__facts {
  grid-template-columns: minmax(0, 1fr);
}

.hero__grid > *,
.scholar-profile > *,
.featured-poster-card > *,
.event-row > *,
.contact-layout > *,
.mcp-docs-layout > *,
.mcp-content > *,
.mcp-section,
.mcp-client-shell,
.mcp-client-panel,
.mcp-code-shell,
.mcp-explorer,
.mcp-explorer__body,
.mcp-explorer__body > *,
.footer__grid > *,
.page-hero__inner > *,
.section-header > *,
.notice-plate,
.notice-plate > *,
.specimen-grid-4 > *,
.specimen-grid-3 > *,
.specimen-grid-2 > *,
.video-grid > *,
.roster-grid > * {
  min-width: 0;
  max-width: 100%;
}

.coord-label {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.45;
}

.mcp-setup-steps code,
.mcp-section code,
.notice-plate code,
.contact-row__value,
.scholar-profile__fact-value,
.officer-card__phone,
.footer p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 920px) {
  .prayer-widget {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  body,
  #ija-viewport-frame {
    --header-h: 64px;
  }

  .container,
  .container--narrow {
    width: min(100% - 32px, var(--container-max));
  }

  .coord-label {
    font-size: 11px;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
  }

  /* Top Utility Bar, Header & Mobile Navigation */
  .top-bar {
    padding: 6px 0;
    font-size: 11px;
  }

  .top-bar__inner {
    gap: 8px;
  }

  .top-bar__address {
    font-size: 11px;
    gap: 5px;
  }

  .top-bar__socials {
    gap: 11px;
  }

  .top-bar__socials svg {
    width: 15px;
    height: 15px;
  }

  .header__inner {
    gap: 6px;
  }

  .logo {
    gap: 8px;
    min-width: 0;
  }

  .logo__mark,
  .logo__img {
    height: 36px;
  }

  .logo__name {
    font-size: 16px;
    white-space: nowrap;
  }

  .header__actions {
    gap: 5px;
  }

  #header-live-btn,
  #header-donate-btn {
    padding: 7px 10px;
    font-size: 12px;
    gap: 5px;
  }

  #header-live-btn::before {
    width: 6px;
    height: 6px;
  }

  .theme-btn,
  .hamburger {
    width: 34px;
    height: 34px;
  }

  .mobile-nav {
    padding: 16px 16px 22px;
  }

  /* Sections, Page Heroes, Section Headers & Notice Plates */
  .section {
    padding: 40px 0;
  }

  .section--sm {
    padding: 24px 0;
  }

  .page-hero {
    padding: 28px 0;
  }

  .page-hero__inner {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 16px;
  }

  .page-hero__title {
    font-size: clamp(28px, 7.8vw, 38px);
    line-height: 1.12;
    margin-bottom: 8px;
  }

  .page-hero__subtitle {
    font-size: 15.5px;
    line-height: 1.6;
  }

  .page-hero__meta {
    width: 100%;
    padding: 11px 14px;
    text-align: left;
  }

  .page-hero__inner > div:last-child:not(:first-child) {
    width: 100%;
  }

  .section-header {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  .notice-plate {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 14px;
    padding: 16px 18px;
  }

  /* Homepage Hero, Jummah Strip & Prayer Widget */
  .hero {
    padding: 32px 0 40px;
  }

  .hero__title {
    font-size: clamp(30px, 8.2vw, 40px);
    line-height: 1.1;
  }

  .hero__desc {
    font-size: 15.5px;
    margin-bottom: 20px;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
  }

  .hero__actions .btn {
    width: 100%;
    padding-inline: 10px;
    text-align: center;
  }

  .jummah-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
  }

  .jummah-strip__times {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }

  .prayer-widget {
    padding: 14px;
  }

  .prayer-widget #timetable th {
    padding: 14px;
  }

  .prayer-widget #timetable td {
    padding: 9px 10px;
    font-size: 13.5px;
  }

  .prayer-widget__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Cards, Featured Event Poster, Event Rows & Hijri Calendar */
  .specimen-card {
    padding: 20px;
  }

  .specimen-card__top {
    flex-wrap: wrap;
    gap: 6px;
  }

  .featured-poster-card {
    padding: 18px;
    gap: 20px;
  }

  .featured-poster-card__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .featured-poster-card__actions .btn {
    width: 100%;
  }

  .event-row {
    padding: 16px;
  }

  .ija-cal__toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }

  .ija-cal__nav {
    width: 100%;
    justify-content: space-between;
  }

  .ija-cal__nav .btn {
    flex: 1;
    padding-inline: 10px;
  }

  .ija-cal__filters {
    padding: 12px 16px;
    gap: 6px;
  }

  .cal-weekdays span {
    padding: 8px 2px;
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .cal-cell {
    min-height: 54px;
    padding: 5px 4px;
    min-width: 0;
  }

  .cal-cell__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }

  .cal-cell__day-btn {
    font-size: 12px;
  }

  .cal-cell__hijri {
    font-size: 9px;
  }

  .cal-agenda {
    padding: 16px;
  }

  .cal-agenda__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cal-agenda__item .btn {
    width: 100%;
  }

  .modal-backdrop {
    padding: 14px;
  }

  .modal-card {
    padding: 20px;
  }

  .modal-card__actions {
    flex-direction: column;
  }

  .modal-card__actions .btn {
    width: 100%;
  }

  .subscribe-hub {
    padding: 18px;
  }

  .subscribe-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .subscribe-tab {
    text-align: center;
    padding: 8px 10px;
    font-size: 12.5px;
  }

  /* Option-Based Stewardship Plan Selector */
  .stewardship-plans {
    gap: 22px;
  }

  .stewardship-funds {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
  }

  .stewardship-funds__btn {
    text-align: center;
    padding: 8px 8px;
    font-size: 12px;
  }

  .stewardship-funds__btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .stewardship-plan-card {
    padding: 22px 18px 18px;
    gap: 18px;
  }

  .stewardship-dock__express,
  .stewardship-qr-card {
    padding: 16px 18px;
  }

  .stewardship-trust-strip {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  /* Shia Qur'an MCP Documentation & Explorer */
  .mcp-endpoint-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .mcp-endpoint-bar__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .mcp-endpoint-bar__actions .mcp-copy-btn,
  .mcp-endpoint-bar__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .mcp-client-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 12px;
  }

  .mcp-client-tab {
    text-align: center;
    padding: 8px 10px;
    font-size: 12.5px;
  }

  .mcp-code-shell__bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mcp-code-block {
    padding: 14px;
    font-size: 12px;
  }

  .mcp-explorer__top {
    padding: 14px 16px;
  }

  .mcp-explorer__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .mcp-explorer__inputs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mcp-field input {
    width: 100%;
  }

  #mcp-run-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mcp-explorer__verse-head {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .mcp-explorer__verse-head .btn {
    width: 100%;
    justify-content: center;
  }

  .mcp-explorer__arabic {
    padding: 16px;
    font-size: 22px;
  }

  /* Duas Filter Bar, Forms, Scholar Profile, Contact & Footer */
  .duas-filter-bar {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    padding: 14px 16px !important;
  }

  .form-submit-row {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
  }

  .form-submit-row .btn {
    width: 100%;
  }

  .scholar-profile__facts {
    padding: 16px 18px;
  }

  .scholar-profile__prose p {
    font-size: 15.5px;
    line-height: 1.72;
  }

  .contact-map {
    min-height: 300px;
  }

  .contact-map iframe {
    height: 320px;
  }

  .footer {
    padding: 44px 0 28px;
  }

  .footer__grid {
    gap: 28px;
    padding-bottom: 28px;
  }

  .footer__bottom {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 8px;
  }

  .scroll-top {
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .section-header > .btn,
  .notice-plate > .btn {
    flex: 0 0 auto;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .page-hero__inner > div:last-child:not(:first-child) .btn,
  .notice-plate > div:last-child:not(:first-child) .btn,
  .event-row__actions .btn,
  .scholar-profile__actions .btn,
  .quran-toolbar__meta .btn {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .mobile-nav__actions {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .mobile-nav__actions .btn {
    width: 100%;
  }

  .stewardship-qr-card {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .stewardship-funds {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .hero__actions {
    grid-template-columns: 1fr;
  }

  .prayer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prayer-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 359px) {
  .logo__text {
    display: none;
  }
}

@media print {
  :root,
  [data-theme="dark"] {
    --bg-canvas: #ffffff !important;
    --bg-surface: #ffffff !important;
    --bg-band: #ffffff !important;
    --ink-primary: #000000 !important;
    --ink-secondary: #222222 !important;
    --line: #d1d5db !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .top-bar,
  .marquee-bar,
  .header,
  .nav-mobile,
  .study-suite-bar,
  .month-nav__controls button,
  .footer,
  .scroll-top {
    display: none !important;
  }
  .section {
    padding: 18px 0 !important;
  }
}
